principal_tag_attribute_maps
Creates, updates, deletes, gets or lists a principal_tag_attribute_maps resource.
Overview
| Name | principal_tag_attribute_maps |
| Type | Resource |
| Id | aws.cognito_identity.principal_tag_attribute_maps |
Fields
The following fields are returned by SELECT queries:
- get_principal_tag_attribute_map
| Name | Datatype | Description |
|---|---|---|
identity_pool_id | string | You can use this operation to get the ID of the Identity Pool you setup attribute mappings for. (pattern: <code>[\w-]+:[0-9a-f-]+</code>) |
identity_provider_name | string | You can use this operation to get the provider name. |
principal_tags | object | You can use this operation to add principal tags. The PrincipalTagsoperation enables you to reference user attributes in your IAM permissions policy. |
use_defaults | boolean | You can use this operation to list |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_principal_tag_attribute_map | select | region | Use GetPrincipalTagAttributeMap to list all mappings between PrincipalTags and user attributes. | |
set_principal_tag_attribute_map | update | region, IdentityPoolId, IdentityProviderName | You can use this operation to use default (username and clientID) attribute or custom attribute mappings. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_principal_tag_attribute_map
Use GetPrincipalTagAttributeMap to list all mappings between PrincipalTags and user attributes.
SELECT
identity_pool_id,
identity_provider_name,
principal_tags,
use_defaults
FROM aws.cognito_identity.principal_tag_attribute_maps
WHERE region = '{{ region }}' -- required
;
UPDATE examples
- set_principal_tag_attribute_map
You can use this operation to use default (username and clientID) attribute or custom attribute mappings.
UPDATE aws.cognito_identity.principal_tag_attribute_maps
SET
IdentityPoolId = '{{ IdentityPoolId }}',
IdentityProviderName = '{{ IdentityProviderName }}',
UseDefaults = {{ UseDefaults }},
PrincipalTags = '{{ PrincipalTags }}'
WHERE
region = '{{ region }}' --required
AND IdentityPoolId = '{{ IdentityPoolId }}' --required
AND IdentityProviderName = '{{ IdentityProviderName }}' --required
RETURNING
identity_pool_id,
identity_provider_name,
principal_tags,
use_defaults;