Skip to main content

principal_tag_attribute_maps

Creates, updates, deletes, gets or lists a principal_tag_attribute_maps resource.

Overview

Nameprincipal_tag_attribute_maps
TypeResource
Idaws.cognito_identity.principal_tag_attribute_maps

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
identity_pool_idstringYou 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_namestringYou can use this operation to get the provider name.
principal_tagsobjectYou can use this operation to add principal tags. The PrincipalTagsoperation enables you to reference user attributes in your IAM permissions policy.
use_defaultsbooleanYou can use this operation to list

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_principal_tag_attribute_mapselectregionUse GetPrincipalTagAttributeMap to list all mappings between PrincipalTags and user attributes.
set_principal_tag_attribute_mapupdateregion, IdentityPoolId, IdentityProviderNameYou 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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

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

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;