SDK for PHP 3.x

Client: Aws\CognitoIdentity\CognitoIdentityClient
Service ID: cognito-identity
Version: 2014-06-30

This page describes the parameters and results for the operations of the Amazon Cognito Identity (2014-06-30), and shows how to use the Aws\CognitoIdentity\CognitoIdentityClient object to call the described operations. This documentation is specific to the 2014-06-30 API version of the service.

Operation Summary

Each of the following operations can be created from a client using $client->getCommand('CommandName'), where "CommandName" is the name of one of the following operations. Note: a command is a value that encapsulates an operation and the parameters used to create an HTTP request.

You can also create and send a command immediately using the magic methods available on a client object: $client->commandName(/* parameters */). You can send the command asynchronously (returning a promise) by appending the word "Async" to the operation name: $client->commandNameAsync(/* parameters */).

CreateIdentityPool ( array $params = [] )
Creates a new identity pool.
DeleteIdentities ( array $params = [] )
Deletes identities from an identity pool.
DeleteIdentityPool ( array $params = [] )
Deletes an identity pool.
DescribeIdentity ( array $params = [] )
Returns metadata related to the given identity, including when the identity was created and any associated linked logins.
DescribeIdentityPool ( array $params = [] )
Gets details about a particular identity pool, including the pool name, ID description, creation date, and current number of users.
GetCredentialsForIdentity ( array $params = [] )
Returns credentials for the provided identity ID.
GetId ( array $params = [] )
Generates (or retrieves) a Cognito ID.
GetIdentityPoolRoles ( array $params = [] )
Gets the roles for an identity pool.
GetOpenIdToken ( array $params = [] )
Gets an OpenID token, using a known Cognito ID.
GetOpenIdTokenForDeveloperIdentity ( array $params = [] )
Registers (or retrieves) a Cognito IdentityId and an OpenID Connect token for a user authenticated by your backend authentication process.
GetPrincipalTagAttributeMap ( array $params = [] )
Use GetPrincipalTagAttributeMap to list all mappings between PrincipalTags and user attributes.
ListIdentities ( array $params = [] )
Lists the identities in an identity pool.
ListIdentityPools ( array $params = [] )
Lists all of the Cognito identity pools registered for your account.
ListTagsForResource ( array $params = [] )
Lists the tags that are assigned to an Amazon Cognito identity pool.
LookupDeveloperIdentity ( array $params = [] )
Retrieves the IdentityID associated with a DeveloperUserIdentifier or the list of DeveloperUserIdentifier values associated with an IdentityId for an existing identity.
MergeDeveloperIdentities ( array $params = [] )
Merges two users having different IdentityIds, existing in the same identity pool, and identified by the same developer provider.
SetIdentityPoolRoles ( array $params = [] )
Sets the roles for an identity pool.
SetPrincipalTagAttributeMap ( array $params = [] )
You can use this operation to use default (username and clientID) attribute or custom attribute mappings.
TagResource ( array $params = [] )
Assigns a set of tags to the specified Amazon Cognito identity pool.
UnlinkDeveloperIdentity ( array $params = [] )
Unlinks a DeveloperUserIdentifier from an existing identity.
UnlinkIdentity ( array $params = [] )
Unlinks a federated identity from an existing account.
UntagResource ( array $params = [] )
Removes the specified tags from the specified Amazon Cognito identity pool.
UpdateIdentityPool ( array $params = [] )
Updates an identity pool.

Paginators

Paginators handle automatically iterating over paginated API results. Paginators are associated with specific API operations, and they accept the parameters that the corresponding API operation accepts. You can get a paginator from a client class using getPaginator($paginatorName, $operationParameters). This client supports the following paginators:

ListIdentityPools

Operations

CreateIdentityPool

$result = $client->createIdentityPool([/* ... */]);
$promise = $client->createIdentityPoolAsync([/* ... */]);

Creates a new identity pool. The identity pool is a store of user identity information that is specific to your AWS account. The keys for SupportedLoginProviders are as follows:

  • Facebook: graph.facebook.com

  • Google: accounts.google.com

  • Amazon: www.amazon.com

  • Twitter: api.twitter.com

  • Digits: www.digits.com

You must use AWS Developer credentials to call this API.

Parameter Syntax

$result = $client->createIdentityPool([
    'AllowClassicFlow' => true || false,
    'AllowUnauthenticatedIdentities' => true || false, // REQUIRED
    'CognitoIdentityProviders' => [
        [
            'ClientId' => '<string>',
            'ProviderName' => '<string>',
            'ServerSideTokenCheck' => true || false,
        ],
        // ...
    ],
    'DeveloperProviderName' => '<string>',
    'IdentityPoolName' => '<string>', // REQUIRED
    'IdentityPoolTags' => ['<string>', ...],
    'OpenIdConnectProviderARNs' => ['<string>', ...],
    'SamlProviderARNs' => ['<string>', ...],
    'SupportedLoginProviders' => ['<string>', ...],
]);

Parameter Details

Members
AllowClassicFlow
Type: boolean

Enables or disables the Basic (Classic) authentication flow. For more information, see Identity Pools (Federated Identities) Authentication Flow in the Amazon Cognito Developer Guide.

AllowUnauthenticatedIdentities
Required: Yes
Type: boolean

TRUE if the identity pool supports unauthenticated logins.

CognitoIdentityProviders
Type: Array of CognitoIdentityProvider structures

An array of Amazon Cognito user pools and their client IDs.

DeveloperProviderName
Type: string

The "domain" by which Cognito will refer to your users. This name acts as a placeholder that allows your backend and the Cognito service to communicate about the developer provider. For the DeveloperProviderName, you can use letters as well as period (.), underscore (_), and dash (-).

Once you have set a developer provider name, you cannot change it. Please take care in setting this parameter.

IdentityPoolName
Required: Yes
Type: string

A string that you provide.

IdentityPoolTags
Type: Associative array of custom strings keys (TagKeysType) to strings

Tags to assign to the identity pool. A tag is a label that you can apply to identity pools to categorize and manage them in different ways, such as by purpose, owner, environment, or other criteria.

OpenIdConnectProviderARNs
Type: Array of strings

The Amazon Resource Names (ARN) of the OpenID Connect providers.

SamlProviderARNs
Type: Array of strings

An array of Amazon Resource Names (ARNs) of the SAML provider for your identity pool.

SupportedLoginProviders
Type: Associative array of custom strings keys (IdentityProviderName) to strings

Optional key:value pairs mapping provider names to provider app IDs.

Result Syntax

[
    'AllowClassicFlow' => true || false,
    'AllowUnauthenticatedIdentities' => true || false,
    'CognitoIdentityProviders' => [
        [
            'ClientId' => '<string>',
            'ProviderName' => '<string>',
            'ServerSideTokenCheck' => true || false,
        ],
        // ...
    ],
    'DeveloperProviderName' => '<string>',
    'IdentityPoolId' => '<string>',
    'IdentityPoolName' => '<string>',
    'IdentityPoolTags' => ['<string>', ...],
    'OpenIdConnectProviderARNs' => ['<string>', ...],
    'SamlProviderARNs' => ['<string>', ...],
    'SupportedLoginProviders' => ['<string>', ...],
]

Result Details

Members
AllowClassicFlow
Type: boolean

Enables or disables the Basic (Classic) authentication flow. For more information, see Identity Pools (Federated Identities) Authentication Flow in the Amazon Cognito Developer Guide.

AllowUnauthenticatedIdentities
Required: Yes
Type: boolean

TRUE if the identity pool supports unauthenticated logins.

CognitoIdentityProviders
Type: Array of CognitoIdentityProvider structures

A list representing an Amazon Cognito user pool and its client ID.

DeveloperProviderName
Type: string

The "domain" by which Cognito will refer to your users.

IdentityPoolId
Required: Yes
Type: string

An identity pool ID in the format REGION:GUID.

IdentityPoolName
Required: Yes
Type: string

A string that you provide.

IdentityPoolTags
Type: Associative array of custom strings keys (TagKeysType) to strings

The tags that are assigned to the identity pool. A tag is a label that you can apply to identity pools to categorize and manage them in different ways, such as by purpose, owner, environment, or other criteria.

OpenIdConnectProviderARNs
Type: Array of strings

The ARNs of the OpenID Connect providers.

SamlProviderARNs
Type: Array of strings

An array of Amazon Resource Names (ARNs) of the SAML provider for your identity pool.

SupportedLoginProviders
Type: Associative array of custom strings keys (IdentityProviderName) to strings

Optional key:value pairs mapping provider names to provider app IDs.

Errors

InvalidParameterException:

Thrown for missing or bad input parameter(s).

NotAuthorizedException:

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

ResourceConflictException:

Thrown when a user tries to use a login which is already linked to another account.

TooManyRequestsException:

Thrown when a request is throttled.

InternalErrorException:

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

LimitExceededException:

Thrown when the total number of user pools has exceeded a preset limit.

DeleteIdentities

$result = $client->deleteIdentities([/* ... */]);
$promise = $client->deleteIdentitiesAsync([/* ... */]);

Deletes identities from an identity pool. You can specify a list of 1-60 identities that you want to delete.

You must use AWS Developer credentials to call this API.

Parameter Syntax

$result = $client->deleteIdentities([
    'IdentityIdsToDelete' => ['<string>', ...], // REQUIRED
]);

Parameter Details

Members
IdentityIdsToDelete
Required: Yes
Type: Array of strings

A list of 1-60 identities that you want to delete.

Result Syntax

[
    'UnprocessedIdentityIds' => [
        [
            'ErrorCode' => 'AccessDenied|InternalServerError',
            'IdentityId' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
UnprocessedIdentityIds
Type: Array of UnprocessedIdentityId structures

An array of UnprocessedIdentityId objects, each of which contains an ErrorCode and IdentityId.

Errors

InvalidParameterException:

Thrown for missing or bad input parameter(s).

TooManyRequestsException:

Thrown when a request is throttled.

InternalErrorException:

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

DeleteIdentityPool

$result = $client->deleteIdentityPool([/* ... */]);
$promise = $client->deleteIdentityPoolAsync([/* ... */]);

Deletes an identity pool. Once a pool is deleted, users will not be able to authenticate with the pool.

You must use AWS Developer credentials to call this API.

Parameter Syntax

$result = $client->deleteIdentityPool([
    'IdentityPoolId' => '<string>', // REQUIRED
]);

Parameter Details

Members
IdentityPoolId
Required: Yes
Type: string

An identity pool ID in the format REGION:GUID.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

InvalidParameterException:

Thrown for missing or bad input parameter(s).

ResourceNotFoundException:

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

NotAuthorizedException:

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

TooManyRequestsException:

Thrown when a request is throttled.

InternalErrorException:

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

DescribeIdentity

$result = $client->describeIdentity([/* ... */]);
$promise = $client->describeIdentityAsync([/* ... */]);

Returns metadata related to the given identity, including when the identity was created and any associated linked logins.

You must use AWS Developer credentials to call this API.

Parameter Syntax

$result = $client->describeIdentity([
    'IdentityId' => '<string>', // REQUIRED
]);

Parameter Details

Members
IdentityId
Required: Yes
Type: string

A unique identifier in the format REGION:GUID.

Result Syntax

[
    'CreationDate' => <DateTime>,
    'IdentityId' => '<string>',
    'LastModifiedDate' => <DateTime>,
    'Logins' => ['<string>', ...],
]

Result Details

Members
CreationDate
Type: timestamp (string|DateTime or anything parsable by strtotime)

Date on which the identity was created.

IdentityId
Type: string

A unique identifier in the format REGION:GUID.

LastModifiedDate
Type: timestamp (string|DateTime or anything parsable by strtotime)

Date on which the identity was last modified.

Logins
Type: Array of strings

The provider names.

Errors

InvalidParameterException:

Thrown for missing or bad input parameter(s).

ResourceNotFoundException:

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

NotAuthorizedException:

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

TooManyRequestsException:

Thrown when a request is throttled.

InternalErrorException:

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

DescribeIdentityPool

$result = $client->describeIdentityPool([/* ... */]);
$promise = $client->describeIdentityPoolAsync([/* ... */]);

Gets details about a particular identity pool, including the pool name, ID description, creation date, and current number of users.

You must use AWS Developer credentials to call this API.

Parameter Syntax

$result = $client->describeIdentityPool([
    'IdentityPoolId' => '<string>', // REQUIRED
]);

Parameter Details

Members
IdentityPoolId
Required: Yes
Type: string

An identity pool ID in the format REGION:GUID.

Result Syntax

[
    'AllowClassicFlow' => true || false,
    'AllowUnauthenticatedIdentities' => true || false,
    'CognitoIdentityProviders' => [
        [
            'ClientId' => '<string>',
            'ProviderName' => '<string>',
            'ServerSideTokenCheck' => true || false,
        ],
        // ...
    ],
    'DeveloperProviderName' => '<string>',
    'IdentityPoolId' => '<string>',
    'IdentityPoolName' => '<string>',
    'IdentityPoolTags' => ['<string>', ...],
    'OpenIdConnectProviderARNs' => ['<string>', ...],
    'SamlProviderARNs' => ['<string>', ...],
    'SupportedLoginProviders' => ['<string>', ...],
]

Result Details

Members
AllowClassicFlow
Type: boolean

Enables or disables the Basic (Classic) authentication flow. For more information, see Identity Pools (Federated Identities) Authentication Flow in the Amazon Cognito Developer Guide.

AllowUnauthenticatedIdentities
Required: Yes
Type: boolean

TRUE if the identity pool supports unauthenticated logins.

CognitoIdentityProviders
Type: Array of CognitoIdentityProvider structures

A list representing an Amazon Cognito user pool and its client ID.

DeveloperProviderName
Type: string

The "domain" by which Cognito will refer to your users.

IdentityPoolId
Required: Yes
Type: string

An identity pool ID in the format REGION:GUID.

IdentityPoolName
Required: Yes
Type: string

A string that you provide.

IdentityPoolTags
Type: Associative array of custom strings keys (TagKeysType) to strings

The tags that are assigned to the identity pool. A tag is a label that you can apply to identity pools to categorize and manage them in different ways, such as by purpose, owner, environment, or other criteria.

OpenIdConnectProviderARNs
Type: Array of strings

The ARNs of the OpenID Connect providers.

SamlProviderARNs
Type: Array of strings

An array of Amazon Resource Names (ARNs) of the SAML provider for your identity pool.

SupportedLoginProviders
Type: Associative array of custom strings keys (IdentityProviderName) to strings

Optional key:value pairs mapping provider names to provider app IDs.

Errors

InvalidParameterException:

Thrown for missing or bad input parameter(s).

ResourceNotFoundException:

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

NotAuthorizedException:

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

TooManyRequestsException:

Thrown when a request is throttled.

InternalErrorException:

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

GetCredentialsForIdentity

$result = $client->getCredentialsForIdentity([/* ... */]);
$promise = $client->getCredentialsForIdentityAsync([/* ... */]);

Returns credentials for the provided identity ID. Any provided logins will be validated against supported login providers. If the token is for cognito-identity.amazonaws.com, it will be passed through to AWS Security Token Service with the appropriate role for the token.

This is a public API. You do not need any credentials to call this API.

Parameter Syntax

$result = $client->getCredentialsForIdentity([
    'CustomRoleArn' => '<string>',
    'IdentityId' => '<string>', // REQUIRED
    'Logins' => ['<string>', ...],
]);

Parameter Details

Members
CustomRoleArn
Type: string

The Amazon Resource Name (ARN) of the role to be assumed when multiple roles were received in the token from the identity provider. For example, a SAML-based identity provider. This parameter is optional for identity providers that do not support role customization.

IdentityId
Required: Yes
Type: string

A unique identifier in the format REGION:GUID.

Logins
Type: Associative array of custom strings keys (IdentityProviderName) to strings

A set of optional name-value pairs that map provider names to provider tokens. The name-value pair will follow the syntax "provider_name": "provider_user_identifier".

Logins should not be specified when trying to get credentials for an unauthenticated identity.

The Logins parameter is required when using identities associated with external identity providers such as Facebook. For examples of Logins maps, see the code examples in the External Identity Providers section of the Amazon Cognito Developer Guide.

Result Syntax

[
    'Credentials' => [
        'AccessKeyId' => '<string>',
        'Expiration' => <DateTime>,
        'SecretKey' => '<string>',
        'SessionToken' => '<string>',
    ],
    'IdentityId' => '<string>',
]

Result Details

Members
Credentials
Type: Credentials structure

Credentials for the provided identity ID.

IdentityId
Type: string

A unique identifier in the format REGION:GUID.

Errors

InvalidParameterException:

Thrown for missing or bad input parameter(s).

ResourceNotFoundException:

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

NotAuthorizedException:

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

ResourceConflictException:

Thrown when a user tries to use a login which is already linked to another account.

TooManyRequestsException:

Thrown when a request is throttled.

InvalidIdentityPoolConfigurationException:

Thrown if the identity pool has no role associated for the given auth type (auth/unauth) or if the AssumeRole fails.

InternalErrorException:

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

ExternalServiceException:

An exception thrown when a dependent service such as Facebook or Twitter is not responding

GetId

$result = $client->getId([/* ... */]);
$promise = $client->getIdAsync([/* ... */]);

Generates (or retrieves) a Cognito ID. Supplying multiple logins will create an implicit linked account.

This is a public API. You do not need any credentials to call this API.

Parameter Syntax

$result = $client->getId([
    'AccountId' => '<string>',
    'IdentityPoolId' => '<string>', // REQUIRED
    'Logins' => ['<string>', ...],
]);

Parameter Details

Members
AccountId
Type: string

A standard AWS account ID (9+ digits).

IdentityPoolId
Required: Yes
Type: string

An identity pool ID in the format REGION:GUID.

Logins
Type: Associative array of custom strings keys (IdentityProviderName) to strings

A set of optional name-value pairs that map provider names to provider tokens. The available provider names for Logins are as follows:

  • Facebook: graph.facebook.com

  • Amazon Cognito user pool: cognito-idp.<region>.amazonaws.com/<YOUR_USER_POOL_ID>, for example, cognito-idp.us-east-1.amazonaws.com/us-east-1_123456789.

  • Google: accounts.google.com

  • Amazon: www.amazon.com

  • Twitter: api.twitter.com

  • Digits: www.digits.com

Result Syntax

[
    'IdentityId' => '<string>',
]

Result Details

Members
IdentityId
Type: string

A unique identifier in the format REGION:GUID.

Errors

InvalidParameterException:

Thrown for missing or bad input parameter(s).

ResourceNotFoundException:

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

NotAuthorizedException:

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

ResourceConflictException:

Thrown when a user tries to use a login which is already linked to another account.

TooManyRequestsException:

Thrown when a request is throttled.

InternalErrorException:

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

LimitExceededException:

Thrown when the total number of user pools has exceeded a preset limit.

ExternalServiceException:

An exception thrown when a dependent service such as Facebook or Twitter is not responding

GetIdentityPoolRoles

$result = $client->getIdentityPoolRoles([/* ... */]);
$promise = $client->getIdentityPoolRolesAsync([/* ... */]);

Gets the roles for an identity pool.

You must use AWS Developer credentials to call this API.

Parameter Syntax

$result = $client->getIdentityPoolRoles([
    'IdentityPoolId' => '<string>', // REQUIRED
]);

Parameter Details

Members
IdentityPoolId
Required: Yes
Type: string

An identity pool ID in the format REGION:GUID.

Result Syntax

[
    'IdentityPoolId' => '<string>',
    'RoleMappings' => [
        '<IdentityProviderName>' => [
            'AmbiguousRoleResolution' => 'AuthenticatedRole|Deny',
            'RulesConfiguration' => [
                'Rules' => [
                    [
                        'Claim' => '<string>',
                        'MatchType' => 'Equals|Contains|StartsWith|NotEqual',
                        'RoleARN' => '<string>',
                        'Value' => '<string>',
                    ],
                    // ...
                ],
            ],
            'Type' => 'Token|Rules',
        ],
        // ...
    ],
    'Roles' => ['<string>', ...],
]

Result Details

Members
IdentityPoolId
Type: string

An identity pool ID in the format REGION:GUID.

RoleMappings
Type: Associative array of custom strings keys (IdentityProviderName) to RoleMapping structures

How users for a specific identity provider are to mapped to roles. This is a String-to-RoleMapping object map. The string identifies the identity provider, for example, "graph.facebook.com" or "cognito-idp.us-east-1.amazonaws.com/us-east-1_abcdefghi:app_client_id".

Roles
Type: Associative array of custom strings keys (RoleType) to strings

The map of roles associated with this pool. Currently only authenticated and unauthenticated roles are supported.

Errors

InvalidParameterException:

Thrown for missing or bad input parameter(s).

ResourceNotFoundException:

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

NotAuthorizedException:

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

ResourceConflictException:

Thrown when a user tries to use a login which is already linked to another account.

TooManyRequestsException:

Thrown when a request is throttled.

InternalErrorException:

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

GetOpenIdToken

$result = $client->getOpenIdToken([/* ... */]);
$promise = $client->getOpenIdTokenAsync([/* ... */]);

Gets an OpenID token, using a known Cognito ID. This known Cognito ID is returned by GetId. You can optionally add additional logins for the identity. Supplying multiple logins creates an implicit link.

The OpenID token is valid for 10 minutes.

This is a public API. You do not need any credentials to call this API.

Parameter Syntax

$result = $client->getOpenIdToken([
    'IdentityId' => '<string>', // REQUIRED
    'Logins' => ['<string>', ...],
]);

Parameter Details

Members
IdentityId
Required: Yes
Type: string

A unique identifier in the format REGION:GUID.

Logins
Type: Associative array of custom strings keys (IdentityProviderName) to strings

A set of optional name-value pairs that map provider names to provider tokens. When using graph.facebook.com and www.amazon.com, supply the access_token returned from the provider's authflow. For accounts.google.com, an Amazon Cognito user pool provider, or any other OpenID Connect provider, always include the id_token.

Result Syntax

[
    'IdentityId' => '<string>',
    'Token' => '<string>',
]

Result Details

Members
IdentityId
Type: string

A unique identifier in the format REGION:GUID. Note that the IdentityId returned may not match the one passed on input.

Token
Type: string

An OpenID token, valid for 10 minutes.

Errors

InvalidParameterException:

Thrown for missing or bad input parameter(s).

ResourceNotFoundException:

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

NotAuthorizedException:

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

ResourceConflictException:

Thrown when a user tries to use a login which is already linked to another account.

TooManyRequestsException:

Thrown when a request is throttled.

InternalErrorException:

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

ExternalServiceException:

An exception thrown when a dependent service such as Facebook or Twitter is not responding

GetOpenIdTokenForDeveloperIdentity

$result = $client->getOpenIdTokenForDeveloperIdentity([/* ... */]);
$promise = $client->getOpenIdTokenForDeveloperIdentityAsync([/* ... */]);

Registers (or retrieves) a Cognito IdentityId and an OpenID Connect token for a user authenticated by your backend authentication process. Supplying multiple logins will create an implicit linked account. You can only specify one developer provider as part of the Logins map, which is linked to the identity pool. The developer provider is the "domain" by which Cognito will refer to your users.

You can use GetOpenIdTokenForDeveloperIdentity to create a new identity and to link new logins (that is, user credentials issued by a public provider or developer provider) to an existing identity. When you want to create a new identity, the IdentityId should be null. When you want to associate a new login with an existing authenticated/unauthenticated identity, you can do so by providing the existing IdentityId. This API will create the identity in the specified IdentityPoolId.

You must use AWS Developer credentials to call this API.

Parameter Syntax

$result = $client->getOpenIdTokenForDeveloperIdentity([
    'IdentityId' => '<string>',
    'IdentityPoolId' => '<string>', // REQUIRED
    'Logins' => ['<string>', ...], // REQUIRED
    'PrincipalTags' => ['<string>', ...],
    'TokenDuration' => <integer>,
]);

Parameter Details

Members
IdentityId
Type: string

A unique identifier in the format REGION:GUID.

IdentityPoolId
Required: Yes
Type: string

An identity pool ID in the format REGION:GUID.

Logins
Required: Yes
Type: Associative array of custom strings keys (IdentityProviderName) to strings

A set of optional name-value pairs that map provider names to provider tokens. Each name-value pair represents a user from a public provider or developer provider. If the user is from a developer provider, the name-value pair will follow the syntax "developer_provider_name": "developer_user_identifier". The developer provider is the "domain" by which Cognito will refer to your users; you provided this domain while creating/updating the identity pool. The developer user identifier is an identifier from your backend that uniquely identifies a user. When you create an identity pool, you can specify the supported logins.

PrincipalTags
Type: Associative array of custom strings keys (PrincipalTagID) to strings

Use this operation to configure attribute mappings for custom providers.

TokenDuration
Type: long (int|float)

The expiration time of the token, in seconds. You can specify a custom expiration time for the token so that you can cache it. If you don't provide an expiration time, the token is valid for 15 minutes. You can exchange the token with Amazon STS for temporary AWS credentials, which are valid for a maximum of one hour. The maximum token duration you can set is 24 hours. You should take care in setting the expiration time for a token, as there are significant security implications: an attacker could use a leaked token to access your AWS resources for the token's duration.

Please provide for a small grace period, usually no more than 5 minutes, to account for clock skew.

Result Syntax

[
    'IdentityId' => '<string>',
    'Token' => '<string>',
]

Result Details

Members
IdentityId
Type: string

A unique identifier in the format REGION:GUID.

Token
Type: string

An OpenID token.

Errors

InvalidParameterException:

Thrown for missing or bad input parameter(s).

ResourceNotFoundException:

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

NotAuthorizedException:

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

ResourceConflictException:

Thrown when a user tries to use a login which is already linked to another account.

TooManyRequestsException:

Thrown when a request is throttled.

InternalErrorException:

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

DeveloperUserAlreadyRegisteredException:

The provided developer user identifier is already registered with Cognito under a different identity ID.

GetPrincipalTagAttributeMap

$result = $client->getPrincipalTagAttributeMap([/* ... */]);
$promise = $client->getPrincipalTagAttributeMapAsync([/* ... */]);

Use GetPrincipalTagAttributeMap to list all mappings between PrincipalTags and user attributes.

Parameter Syntax

$result = $client->getPrincipalTagAttributeMap([
    'IdentityPoolId' => '<string>', // REQUIRED
    'IdentityProviderName' => '<string>', // REQUIRED
]);

Parameter Details

Members
IdentityPoolId
Required: Yes
Type: string

You can use this operation to get the ID of the Identity Pool you setup attribute mappings for.

IdentityProviderName
Required: Yes
Type: string

You can use this operation to get the provider name.

Result Syntax

[
    'IdentityPoolId' => '<string>',
    'IdentityProviderName' => '<string>',
    'PrincipalTags' => ['<string>', ...],
    'UseDefaults' => true || false,
]

Result Details

Members
IdentityPoolId
Type: string

You can use this operation to get the ID of the Identity Pool you setup attribute mappings for.

IdentityProviderName
Type: string

You can use this operation to get the provider name.

PrincipalTags
Type: Associative array of custom strings keys (PrincipalTagID) to strings

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

UseDefaults
Type: boolean

You can use this operation to list

Errors

InvalidParameterException:

Thrown for missing or bad input parameter(s).

ResourceNotFoundException:

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

NotAuthorizedException:

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

TooManyRequestsException:

Thrown when a request is throttled.

InternalErrorException:

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

ListIdentities

$result = $client->listIdentities([/* ... */]);
$promise = $client->listIdentitiesAsync([/* ... */]);

Lists the identities in an identity pool.

You must use AWS Developer credentials to call this API.

Parameter Syntax

$result = $client->listIdentities([
    'HideDisabled' => true || false,
    'IdentityPoolId' => '<string>', // REQUIRED
    'MaxResults' => <integer>, // REQUIRED
    'NextToken' => '<string>',
]);

Parameter Details

Members
HideDisabled
Type: boolean

An optional boolean parameter that allows you to hide disabled identities. If omitted, the ListIdentities API will include disabled identities in the response.

IdentityPoolId
Required: Yes
Type: string

An identity pool ID in the format REGION:GUID.

MaxResults
Required: Yes
Type: int

The maximum number of identities to return.

NextToken
Type: string

A pagination token.

Result Syntax

[
    'Identities' => [
        [
            'CreationDate' => <DateTime>,
            'IdentityId' => '<string>',
            'LastModifiedDate' => <DateTime>,
            'Logins' => ['<string>', ...],
        ],
        // ...
    ],
    'IdentityPoolId' => '<string>',
    'NextToken' => '<string>',
]

Result Details

Members
Identities
Type: Array of IdentityDescription structures

An object containing a set of identities and associated mappings.

IdentityPoolId
Type: string

An identity pool ID in the format REGION:GUID.

NextToken
Type: string

A pagination token.

Errors

InvalidParameterException:

Thrown for missing or bad input parameter(s).

ResourceNotFoundException:

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

NotAuthorizedException:

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

TooManyRequestsException:

Thrown when a request is throttled.

InternalErrorException:

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

ListIdentityPools

$result = $client->listIdentityPools([/* ... */]);
$promise = $client->listIdentityPoolsAsync([/* ... */]);

Lists all of the Cognito identity pools registered for your account.

You must use AWS Developer credentials to call this API.

Parameter Syntax

$result = $client->listIdentityPools([
    'MaxResults' => <integer>, // REQUIRED
    'NextToken' => '<string>',
]);

Parameter Details

Members
MaxResults
Required: Yes
Type: int

The maximum number of identities to return.

NextToken
Type: string

A pagination token.

Result Syntax

[
    'IdentityPools' => [
        [
            'IdentityPoolId' => '<string>',
            'IdentityPoolName' => '<string>',
        ],
        // ...
    ],
    'NextToken' => '<string>',
]

Result Details

Members
IdentityPools
Type: Array of IdentityPoolShortDescription structures

The identity pools returned by the ListIdentityPools action.

NextToken
Type: string

A pagination token.

Errors

InvalidParameterException:

Thrown for missing or bad input parameter(s).

NotAuthorizedException:

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

TooManyRequestsException:

Thrown when a request is throttled.

ResourceNotFoundException:

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

InternalErrorException:

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

ListTagsForResource

$result = $client->listTagsForResource([/* ... */]);
$promise = $client->listTagsForResourceAsync([/* ... */]);

Lists the tags that are assigned to an Amazon Cognito identity pool.

A tag is a label that you can apply to identity pools to categorize and manage them in different ways, such as by purpose, owner, environment, or other criteria.

You can use this action up to 10 times per second, per account.

Parameter Syntax

$result = $client->listTagsForResource([
    'ResourceArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
ResourceArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the identity pool that the tags are assigned to.

Result Syntax

[
    'Tags' => ['<string>', ...],
]

Result Details

Members
Tags
Type: Associative array of custom strings keys (TagKeysType) to strings

The tags that are assigned to the identity pool.

Errors

InvalidParameterException:

Thrown for missing or bad input parameter(s).

ResourceNotFoundException:

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

NotAuthorizedException:

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

TooManyRequestsException:

Thrown when a request is throttled.

InternalErrorException:

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

LookupDeveloperIdentity

$result = $client->lookupDeveloperIdentity([/* ... */]);
$promise = $client->lookupDeveloperIdentityAsync([/* ... */]);

Retrieves the IdentityID associated with a DeveloperUserIdentifier or the list of DeveloperUserIdentifier values associated with an IdentityId for an existing identity. Either IdentityID or DeveloperUserIdentifier must not be null. If you supply only one of these values, the other value will be searched in the database and returned as a part of the response. If you supply both, DeveloperUserIdentifier will be matched against IdentityID. If the values are verified against the database, the response returns both values and is the same as the request. Otherwise a ResourceConflictException is thrown.

LookupDeveloperIdentity is intended for low-throughput control plane operations: for example, to enable customer service to locate an identity ID by username. If you are using it for higher-volume operations such as user authentication, your requests are likely to be throttled. GetOpenIdTokenForDeveloperIdentity is a better option for higher-volume operations for user authentication.

You must use AWS Developer credentials to call this API.

Parameter Syntax

$result = $client->lookupDeveloperIdentity([
    'DeveloperUserIdentifier' => '<string>',
    'IdentityId' => '<string>',
    'IdentityPoolId' => '<string>', // REQUIRED
    'MaxResults' => <integer>,
    'NextToken' => '<string>',
]);

Parameter Details

Members
DeveloperUserIdentifier
Type: string

A unique ID used by your backend authentication process to identify a user. Typically, a developer identity provider would issue many developer user identifiers, in keeping with the number of users.

IdentityId
Type: string

A unique identifier in the format REGION:GUID.

IdentityPoolId
Required: Yes
Type: string

An identity pool ID in the format REGION:GUID.

MaxResults
Type: int

The maximum number of identities to return.

NextToken
Type: string

A pagination token. The first call you make will have NextToken set to null. After that the service will return NextToken values as needed. For example, let's say you make a request with MaxResults set to 10, and there are 20 matches in the database. The service will return a pagination token as a part of the response. This token can be used to call the API again and get results starting from the 11th match.

Result Syntax

[
    'DeveloperUserIdentifierList' => ['<string>', ...],
    'IdentityId' => '<string>',
    'NextToken' => '<string>',
]

Result Details

Members
DeveloperUserIdentifierList
Type: Array of strings

This is the list of developer user identifiers associated with an identity ID. Cognito supports the association of multiple developer user identifiers with an identity ID.

IdentityId
Type: string

A unique identifier in the format REGION:GUID.

NextToken
Type: string

A pagination token. The first call you make will have NextToken set to null. After that the service will return NextToken values as needed. For example, let's say you make a request with MaxResults set to 10, and there are 20 matches in the database. The service will return a pagination token as a part of the response. This token can be used to call the API again and get results starting from the 11th match.

Errors

InvalidParameterException:

Thrown for missing or bad input parameter(s).

ResourceNotFoundException:

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

NotAuthorizedException:

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

ResourceConflictException:

Thrown when a user tries to use a login which is already linked to another account.

TooManyRequestsException:

Thrown when a request is throttled.

InternalErrorException:

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

MergeDeveloperIdentities

$result = $client->mergeDeveloperIdentities([/* ... */]);
$promise = $client->mergeDeveloperIdentitiesAsync([/* ... */]);

Merges two users having different IdentityIds, existing in the same identity pool, and identified by the same developer provider. You can use this action to request that discrete users be merged and identified as a single user in the Cognito environment. Cognito associates the given source user (SourceUserIdentifier) with the IdentityId of the DestinationUserIdentifier. Only developer-authenticated users can be merged. If the users to be merged are associated with the same public provider, but as two different users, an exception will be thrown.

The number of linked logins is limited to 20. So, the number of linked logins for the source user, SourceUserIdentifier, and the destination user, DestinationUserIdentifier, together should not be larger than 20. Otherwise, an exception will be thrown.

You must use AWS Developer credentials to call this API.

Parameter Syntax

$result = $client->mergeDeveloperIdentities([
    'DestinationUserIdentifier' => '<string>', // REQUIRED
    'DeveloperProviderName' => '<string>', // REQUIRED
    'IdentityPoolId' => '<string>', // REQUIRED
    'SourceUserIdentifier' => '<string>', // REQUIRED
]);

Parameter Details

Members
DestinationUserIdentifier
Required: Yes
Type: string

User identifier for the destination user. The value should be a DeveloperUserIdentifier.

DeveloperProviderName
Required: Yes
Type: string

The "domain" by which Cognito will refer to your users. This is a (pseudo) domain name that you provide while creating an identity pool. This name acts as a placeholder that allows your backend and the Cognito service to communicate about the developer provider. For the DeveloperProviderName, you can use letters as well as period (.), underscore (_), and dash (-).

IdentityPoolId
Required: Yes
Type: string

An identity pool ID in the format REGION:GUID.

SourceUserIdentifier
Required: Yes
Type: string

User identifier for the source user. The value should be a DeveloperUserIdentifier.

Result Syntax

[
    'IdentityId' => '<string>',
]

Result Details

Members
IdentityId
Type: string

A unique identifier in the format REGION:GUID.

Errors

InvalidParameterException:

Thrown for missing or bad input parameter(s).

ResourceNotFoundException:

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

NotAuthorizedException:

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

ResourceConflictException:

Thrown when a user tries to use a login which is already linked to another account.

TooManyRequestsException:

Thrown when a request is throttled.

InternalErrorException:

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

SetIdentityPoolRoles

$result = $client->setIdentityPoolRoles([/* ... */]);
$promise = $client->setIdentityPoolRolesAsync([/* ... */]);

Sets the roles for an identity pool. These roles are used when making calls to GetCredentialsForIdentity action.

You must use AWS Developer credentials to call this API.

Parameter Syntax

$result = $client->setIdentityPoolRoles([
    'IdentityPoolId' => '<string>', // REQUIRED
    'RoleMappings' => [
        '<IdentityProviderName>' => [
            'AmbiguousRoleResolution' => 'AuthenticatedRole|Deny',
            'RulesConfiguration' => [
                'Rules' => [ // REQUIRED
                    [
                        'Claim' => '<string>', // REQUIRED
                        'MatchType' => 'Equals|Contains|StartsWith|NotEqual', // REQUIRED
                        'RoleARN' => '<string>', // REQUIRED
                        'Value' => '<string>', // REQUIRED
                    ],
                    // ...
                ],
            ],
            'Type' => 'Token|Rules', // REQUIRED
        ],
        // ...
    ],
    'Roles' => ['<string>', ...], // REQUIRED
]);

Parameter Details

Members
IdentityPoolId
Required: Yes
Type: string

An identity pool ID in the format REGION:GUID.

RoleMappings
Type: Associative array of custom strings keys (IdentityProviderName) to RoleMapping structures

How users for a specific identity provider are to mapped to roles. This is a string to RoleMapping object map. The string identifies the identity provider, for example, "graph.facebook.com" or "cognito-idp.us-east-1.amazonaws.com/us-east-1_abcdefghi:app_client_id".

Up to 25 rules can be specified per identity provider.

Roles
Required: Yes
Type: Associative array of custom strings keys (RoleType) to strings

The map of roles associated with this pool. For a given role, the key will be either "authenticated" or "unauthenticated" and the value will be the Role ARN.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

InvalidParameterException:

Thrown for missing or bad input parameter(s).

ResourceNotFoundException:

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

NotAuthorizedException:

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

ResourceConflictException:

Thrown when a user tries to use a login which is already linked to another account.

TooManyRequestsException:

Thrown when a request is throttled.

InternalErrorException:

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

ConcurrentModificationException:

Thrown if there are parallel requests to modify a resource.

SetPrincipalTagAttributeMap

$result = $client->setPrincipalTagAttributeMap([/* ... */]);
$promise = $client->setPrincipalTagAttributeMapAsync([/* ... */]);

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

Parameter Syntax

$result = $client->setPrincipalTagAttributeMap([
    'IdentityPoolId' => '<string>', // REQUIRED
    'IdentityProviderName' => '<string>', // REQUIRED
    'PrincipalTags' => ['<string>', ...],
    'UseDefaults' => true || false,
]);

Parameter Details

Members
IdentityPoolId
Required: Yes
Type: string

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

IdentityProviderName
Required: Yes
Type: string

The provider name you want to use for attribute mappings.

PrincipalTags
Type: Associative array of custom strings keys (PrincipalTagID) to strings

You can use this operation to add principal tags.

UseDefaults
Type: boolean

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

Result Syntax

[
    'IdentityPoolId' => '<string>',
    'IdentityProviderName' => '<string>',
    'PrincipalTags' => ['<string>', ...],
    'UseDefaults' => true || false,
]

Result Details

Members
IdentityPoolId
Type: string

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

IdentityProviderName
Type: string

The provider name you want to use for attribute mappings.

PrincipalTags
Type: Associative array of custom strings keys (PrincipalTagID) to strings

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

UseDefaults
Type: boolean

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

Errors

InvalidParameterException:

Thrown for missing or bad input parameter(s).

ResourceNotFoundException:

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

NotAuthorizedException:

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

TooManyRequestsException:

Thrown when a request is throttled.

InternalErrorException:

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

TagResource

$result = $client->tagResource([/* ... */]);
$promise = $client->tagResourceAsync([/* ... */]);

Assigns a set of tags to the specified Amazon Cognito identity pool. A tag is a label that you can use to categorize and manage identity pools in different ways, such as by purpose, owner, environment, or other criteria.

Each tag consists of a key and value, both of which you define. A key is a general category for more specific values. For example, if you have two versions of an identity pool, one for testing and another for production, you might assign an Environment tag key to both identity pools. The value of this key might be Test for one identity pool and Production for the other.

Tags are useful for cost tracking and access control. You can activate your tags so that they appear on the Billing and Cost Management console, where you can track the costs associated with your identity pools. In an IAM policy, you can constrain permissions for identity pools based on specific tags or tag values.

You can use this action up to 5 times per second, per account. An identity pool can have as many as 50 tags.

Parameter Syntax

$result = $client->tagResource([
    'ResourceArn' => '<string>', // REQUIRED
    'Tags' => ['<string>', ...], // REQUIRED
]);

Parameter Details

Members
ResourceArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the identity pool.

Tags
Required: Yes
Type: Associative array of custom strings keys (TagKeysType) to strings

The tags to assign to the identity pool.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

InvalidParameterException:

Thrown for missing or bad input parameter(s).

ResourceNotFoundException:

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

NotAuthorizedException:

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

TooManyRequestsException:

Thrown when a request is throttled.

InternalErrorException:

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

UnlinkDeveloperIdentity

$result = $client->unlinkDeveloperIdentity([/* ... */]);
$promise = $client->unlinkDeveloperIdentityAsync([/* ... */]);

Unlinks a DeveloperUserIdentifier from an existing identity. Unlinked developer users will be considered new identities next time they are seen. If, for a given Cognito identity, you remove all federated identities as well as the developer user identifier, the Cognito identity becomes inaccessible.

You must use AWS Developer credentials to call this API.

Parameter Syntax

$result = $client->unlinkDeveloperIdentity([
    'DeveloperProviderName' => '<string>', // REQUIRED
    'DeveloperUserIdentifier' => '<string>', // REQUIRED
    'IdentityId' => '<string>', // REQUIRED
    'IdentityPoolId' => '<string>', // REQUIRED
]);

Parameter Details

Members
DeveloperProviderName
Required: Yes
Type: string

The "domain" by which Cognito will refer to your users.

DeveloperUserIdentifier
Required: Yes
Type: string

A unique ID used by your backend authentication process to identify a user.

IdentityId
Required: Yes
Type: string

A unique identifier in the format REGION:GUID.

IdentityPoolId
Required: Yes
Type: string

An identity pool ID in the format REGION:GUID.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

InvalidParameterException:

Thrown for missing or bad input parameter(s).

ResourceNotFoundException:

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

NotAuthorizedException:

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

ResourceConflictException:

Thrown when a user tries to use a login which is already linked to another account.

TooManyRequestsException:

Thrown when a request is throttled.

InternalErrorException:

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

UnlinkIdentity

$result = $client->unlinkIdentity([/* ... */]);
$promise = $client->unlinkIdentityAsync([/* ... */]);

Unlinks a federated identity from an existing account. Unlinked logins will be considered new identities next time they are seen. Removing the last linked login will make this identity inaccessible.

This is a public API. You do not need any credentials to call this API.

Parameter Syntax

$result = $client->unlinkIdentity([
    'IdentityId' => '<string>', // REQUIRED
    'Logins' => ['<string>', ...], // REQUIRED
    'LoginsToRemove' => ['<string>', ...], // REQUIRED
]);

Parameter Details

Members
IdentityId
Required: Yes
Type: string

A unique identifier in the format REGION:GUID.

Logins
Required: Yes
Type: Associative array of custom strings keys (IdentityProviderName) to strings

A set of optional name-value pairs that map provider names to provider tokens.

LoginsToRemove
Required: Yes
Type: Array of strings

Provider names to unlink from this identity.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

InvalidParameterException:

Thrown for missing or bad input parameter(s).

ResourceNotFoundException:

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

NotAuthorizedException:

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

ResourceConflictException:

Thrown when a user tries to use a login which is already linked to another account.

TooManyRequestsException:

Thrown when a request is throttled.

InternalErrorException:

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

ExternalServiceException:

An exception thrown when a dependent service such as Facebook or Twitter is not responding

UntagResource

$result = $client->untagResource([/* ... */]);
$promise = $client->untagResourceAsync([/* ... */]);

Removes the specified tags from the specified Amazon Cognito identity pool. You can use this action up to 5 times per second, per account

Parameter Syntax

$result = $client->untagResource([
    'ResourceArn' => '<string>', // REQUIRED
    'TagKeys' => ['<string>', ...], // REQUIRED
]);

Parameter Details

Members
ResourceArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the identity pool.

TagKeys
Required: Yes
Type: Array of strings

The keys of the tags to remove from the user pool.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

InvalidParameterException:

Thrown for missing or bad input parameter(s).

ResourceNotFoundException:

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

NotAuthorizedException:

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

TooManyRequestsException:

Thrown when a request is throttled.

InternalErrorException:

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

UpdateIdentityPool

$result = $client->updateIdentityPool([/* ... */]);
$promise = $client->updateIdentityPoolAsync([/* ... */]);

Updates an identity pool.

You must use AWS Developer credentials to call this API.

Parameter Syntax

$result = $client->updateIdentityPool([
    'AllowClassicFlow' => true || false,
    'AllowUnauthenticatedIdentities' => true || false, // REQUIRED
    'CognitoIdentityProviders' => [
        [
            'ClientId' => '<string>',
            'ProviderName' => '<string>',
            'ServerSideTokenCheck' => true || false,
        ],
        // ...
    ],
    'DeveloperProviderName' => '<string>',
    'IdentityPoolId' => '<string>', // REQUIRED
    'IdentityPoolName' => '<string>', // REQUIRED
    'IdentityPoolTags' => ['<string>', ...],
    'OpenIdConnectProviderARNs' => ['<string>', ...],
    'SamlProviderARNs' => ['<string>', ...],
    'SupportedLoginProviders' => ['<string>', ...],
]);

Parameter Details

Members
AllowClassicFlow
Type: boolean

Enables or disables the Basic (Classic) authentication flow. For more information, see Identity Pools (Federated Identities) Authentication Flow in the Amazon Cognito Developer Guide.

AllowUnauthenticatedIdentities
Required: Yes
Type: boolean

TRUE if the identity pool supports unauthenticated logins.

CognitoIdentityProviders
Type: Array of CognitoIdentityProvider structures

A list representing an Amazon Cognito user pool and its client ID.

DeveloperProviderName
Type: string

The "domain" by which Cognito will refer to your users.

IdentityPoolId
Required: Yes
Type: string

An identity pool ID in the format REGION:GUID.

IdentityPoolName
Required: Yes
Type: string

A string that you provide.

IdentityPoolTags
Type: Associative array of custom strings keys (TagKeysType) to strings

The tags that are assigned to the identity pool. A tag is a label that you can apply to identity pools to categorize and manage them in different ways, such as by purpose, owner, environment, or other criteria.

OpenIdConnectProviderARNs
Type: Array of strings

The ARNs of the OpenID Connect providers.

SamlProviderARNs
Type: Array of strings

An array of Amazon Resource Names (ARNs) of the SAML provider for your identity pool.

SupportedLoginProviders
Type: Associative array of custom strings keys (IdentityProviderName) to strings

Optional key:value pairs mapping provider names to provider app IDs.

Result Syntax

[
    'AllowClassicFlow' => true || false,
    'AllowUnauthenticatedIdentities' => true || false,
    'CognitoIdentityProviders' => [
        [
            'ClientId' => '<string>',
            'ProviderName' => '<string>',
            'ServerSideTokenCheck' => true || false,
        ],
        // ...
    ],
    'DeveloperProviderName' => '<string>',
    'IdentityPoolId' => '<string>',
    'IdentityPoolName' => '<string>',
    'IdentityPoolTags' => ['<string>', ...],
    'OpenIdConnectProviderARNs' => ['<string>', ...],
    'SamlProviderARNs' => ['<string>', ...],
    'SupportedLoginProviders' => ['<string>', ...],
]

Result Details

Members
AllowClassicFlow
Type: boolean

Enables or disables the Basic (Classic) authentication flow. For more information, see Identity Pools (Federated Identities) Authentication Flow in the Amazon Cognito Developer Guide.

AllowUnauthenticatedIdentities
Required: Yes
Type: boolean

TRUE if the identity pool supports unauthenticated logins.

CognitoIdentityProviders
Type: Array of CognitoIdentityProvider structures

A list representing an Amazon Cognito user pool and its client ID.

DeveloperProviderName
Type: string

The "domain" by which Cognito will refer to your users.

IdentityPoolId
Required: Yes
Type: string

An identity pool ID in the format REGION:GUID.

IdentityPoolName
Required: Yes
Type: string

A string that you provide.

IdentityPoolTags
Type: Associative array of custom strings keys (TagKeysType) to strings

The tags that are assigned to the identity pool. A tag is a label that you can apply to identity pools to categorize and manage them in different ways, such as by purpose, owner, environment, or other criteria.

OpenIdConnectProviderARNs
Type: Array of strings

The ARNs of the OpenID Connect providers.

SamlProviderARNs
Type: Array of strings

An array of Amazon Resource Names (ARNs) of the SAML provider for your identity pool.

SupportedLoginProviders
Type: Associative array of custom strings keys (IdentityProviderName) to strings

Optional key:value pairs mapping provider names to provider app IDs.

Errors

InvalidParameterException:

Thrown for missing or bad input parameter(s).

ResourceNotFoundException:

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

NotAuthorizedException:

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

ResourceConflictException:

Thrown when a user tries to use a login which is already linked to another account.

TooManyRequestsException:

Thrown when a request is throttled.

InternalErrorException:

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

ConcurrentModificationException:

Thrown if there are parallel requests to modify a resource.

LimitExceededException:

Thrown when the total number of user pools has exceeded a preset limit.

Shapes

CognitoIdentityProvider

Description

A provider representing an Amazon Cognito user pool and its client ID.

Members
ClientId
Type: string

The client ID for the Amazon Cognito user pool.

ProviderName
Type: string

The provider name for an Amazon Cognito user pool. For example, cognito-idp.us-east-1.amazonaws.com/us-east-1_123456789.

ServerSideTokenCheck
Type: boolean

TRUE if server-side token validation is enabled for the identity provider’s token.

Once you set ServerSideTokenCheck to TRUE for an identity pool, that identity pool will check with the integrated user pools to make sure that the user has not been globally signed out or deleted before the identity pool provides an OIDC token or AWS credentials for the user.

If the user is signed out or deleted, the identity pool will return a 400 Not Authorized error.

ConcurrentModificationException

Description

Thrown if there are parallel requests to modify a resource.

Members
message
Type: string

The message returned by a ConcurrentModificationException.

Credentials

Description

Credentials for the provided identity ID.

Members
AccessKeyId
Type: string

The Access Key portion of the credentials.

Expiration
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date at which these credentials will expire.

SecretKey
Type: string

The Secret Access Key portion of the credentials

SessionToken
Type: string

The Session Token portion of the credentials

DeveloperUserAlreadyRegisteredException

Description

The provided developer user identifier is already registered with Cognito under a different identity ID.

Members
message
Type: string

This developer user identifier is already registered with Cognito.

ExternalServiceException

Description

An exception thrown when a dependent service such as Facebook or Twitter is not responding

Members
message
Type: string

The message returned by an ExternalServiceException

IdentityPoolShortDescription

Description

A description of the identity pool.

Members
IdentityPoolId
Type: string

An identity pool ID in the format REGION:GUID.

IdentityPoolName
Type: string

A string that you provide.

InternalErrorException

Description

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

Members
message
Type: string

The message returned by an InternalErrorException.

InvalidIdentityPoolConfigurationException

Description

Thrown if the identity pool has no role associated for the given auth type (auth/unauth) or if the AssumeRole fails.

Members
message
Type: string

The message returned for an InvalidIdentityPoolConfigurationException

InvalidParameterException

Description

Thrown for missing or bad input parameter(s).

Members
message
Type: string

The message returned by an InvalidParameterException.

LimitExceededException

Description

Thrown when the total number of user pools has exceeded a preset limit.

Members
message
Type: string

The message returned by a LimitExceededException.

MappingRule

Description

A rule that maps a claim name, a claim value, and a match type to a role ARN.

Members
Claim
Required: Yes
Type: string

The claim name that must be present in the token, for example, "isAdmin" or "paid".

MatchType
Required: Yes
Type: string

The match condition that specifies how closely the claim value in the IdP token must match Value.

RoleARN
Required: Yes
Type: string

The role ARN.

Value
Required: Yes
Type: string

A brief string that the claim must match, for example, "paid" or "yes".

NotAuthorizedException

Description

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

Members
message
Type: string

The message returned by a NotAuthorizedException

ResourceConflictException

Description

Thrown when a user tries to use a login which is already linked to another account.

Members
message
Type: string

The message returned by a ResourceConflictException.

ResourceNotFoundException

Description

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

Members
message
Type: string

The message returned by a ResourceNotFoundException.

RoleMapping

Description

A role mapping.

Members
AmbiguousRoleResolution
Type: string

If you specify Token or Rules as the Type, AmbiguousRoleResolution is required.

Specifies the action to be taken if either no rules match the claim value for the Rules type, or there is no cognito:preferred_role claim and there are multiple cognito:roles matches for the Token type.

RulesConfiguration
Type: RulesConfigurationType structure

The rules to be used for mapping users to roles.

If you specify Rules as the role mapping type, RulesConfiguration is required.

Type
Required: Yes
Type: string

The role mapping type. Token will use cognito:roles and cognito:preferred_role claims from the Cognito identity provider token to map groups to roles. Rules will attempt to match claims from the token to map to a role.

RulesConfigurationType

Description

A container for rules.

Members
Rules
Required: Yes
Type: Array of MappingRule structures

An array of rules. You can specify up to 25 rules per identity provider.

Rules are evaluated in order. The first one to match specifies the role.

TooManyRequestsException

Description

Thrown when a request is throttled.

Members
message
Type: string

Message returned by a TooManyRequestsException

UnprocessedIdentityId

Description

An array of UnprocessedIdentityId objects, each of which contains an ErrorCode and IdentityId.

Members
ErrorCode
Type: string

The error code indicating the type of error that occurred.

IdentityId
Type: string

A unique identifier in the format REGION:GUID.