SetPrincipalTagAttributeMap - Amazon Cognito Federated Identities

SetPrincipalTagAttributeMap

You can use this operation to use default (username and clientID) attribute or custom attribute mappings.

Request Syntax

{ "IdentityPoolId": "string", "IdentityProviderName": "string", "PrincipalTags": { "string" : "string" }, "UseDefaults": boolean }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

IdentityPoolId

The ID of the Identity Pool you want to set attribute mappings for.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 55.

Pattern: [\w-]+:[0-9a-f-]+

Required: Yes

IdentityProviderName

The provider name you want to use for attribute mappings.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 128.

Required: Yes

PrincipalTags

You can use this operation to add principal tags.

Type: String to string map

Map Entries: Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Value Length Constraints: Minimum length of 1. Maximum length of 256.

Required: No

UseDefaults

You can use this operation to use default (username and clientID) attribute mappings.

Type: Boolean

Required: No

Response Syntax

{ "IdentityPoolId": "string", "IdentityProviderName": "string", "PrincipalTags": { "string" : "string" }, "UseDefaults": boolean }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

IdentityPoolId

The ID of the Identity Pool you want to set attribute mappings for.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 55.

Pattern: [\w-]+:[0-9a-f-]+

IdentityProviderName

The provider name you want to use for attribute mappings.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 128.

PrincipalTags

You can use this operation to add principal tags. The PrincipalTagsoperation enables you to reference user attributes in your IAM permissions policy.

Type: String to string map

Map Entries: Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Value Length Constraints: Minimum length of 1. Maximum length of 256.

UseDefaults

You can use this operation to select default (username and clientID) attribute mappings.

Type: Boolean

Errors

For information about the errors that are common to all actions, see Common Errors.

InternalErrorException

Thrown when the service encounters an error during processing the request.

HTTP Status Code: 500

InvalidParameterException

Thrown for missing or bad input parameter(s).

HTTP Status Code: 400

NotAuthorizedException

Thrown when a user is not authorized to access the requested resource.

HTTP Status Code: 400

ResourceNotFoundException

Thrown when the requested resource (for example, a dataset or record) does not exist.

HTTP Status Code: 400

TooManyRequestsException

Thrown when a request is throttled.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: