Skip to main content

identity_pools

Creates, updates, deletes, gets or lists an identity_pools resource.

Overview

Nameidentity_pools
TypeResource
Idaws.cognito_identity.identity_pools

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
allow_classic_flowbooleanEnables or disables the Basic (Classic) authentication flow. For more information, see Identity Pools (Federated Identities) Authentication Flow in the Amazon Cognito Developer Guide.
allow_unauthenticated_identitiesbooleanTRUE if the identity pool supports unauthenticated logins.
cognito_identity_providersarrayA list representing an Amazon Cognito user pool and its client ID.
developer_provider_namestringThe "domain" by which Cognito will refer to your users. (pattern: <code>[\w._-]+</code>)
identity_pool_idstringAn identity pool ID in the format REGION:GUID. (pattern: <code>[\w-]+:[0-9a-f-]+</code>)
identity_pool_namestringA string that you provide. (pattern: <code>[\w\s+=,.@-]+</code>)
identity_pool_tagsobjectThe 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.
open_id_connect_provider_arnsarrayThe ARNs of the OpenID Connect providers.
saml_provider_arnsarrayAn array of Amazon Resource Names (ARNs) of the SAML provider for your identity pool.
supported_login_providersobjectOptional key:value pairs mapping provider names to provider app IDs.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_identity_poolselectregionGets details about a particular identity pool, including the pool name, ID description, creation date, and current number of users. You must use Amazon Web Services developer credentials to call this operation.
list_identity_poolsselectregionLists all of the Cognito identity pools registered for your account. You must use Amazon Web Services developer credentials to call this operation.
create_identity_poolinsertregion, IdentityPoolName, AllowUnauthenticatedIdentitiesCreates a new identity pool. The identity pool is a store of user identity information that is specific to your Amazon Web Services account. The keys for SupportedLoginProviders are as follows: Facebook: graph.facebook.com Google: accounts.google.com Sign in With Apple: appleid.apple.com Amazon: www.amazon.com Twitter: api.twitter.com Digits: www.digits.com If you don't provide a value for a parameter, Amazon Cognito sets it to its default value. You must use Amazon Web Services developer credentials to call this operation.
update_identity_poolupdateregion, IdentityPoolId, IdentityPoolName, AllowUnauthenticatedIdentitiesUpdates the configuration of an identity pool. If you don't provide a value for a parameter, Amazon Cognito sets it to its default value. You must use Amazon Web Services developer credentials to call this operation.
delete_identity_pooldeleteregionDeletes an identity pool. Once a pool is deleted, users will not be able to authenticate with the pool. You must use Amazon Web Services developer credentials to call this operation.
unlink_developer_identityexecregion, IdentityId, IdentityPoolId, DeveloperProviderName, DeveloperUserIdentifierUnlinks 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 Amazon Web Services developer credentials to call this operation.

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

Gets details about a particular identity pool, including the pool name, ID description, creation date, and current number of users. You must use Amazon Web Services developer credentials to call this operation.

SELECT
allow_classic_flow,
allow_unauthenticated_identities,
cognito_identity_providers,
developer_provider_name,
identity_pool_id,
identity_pool_name,
identity_pool_tags,
open_id_connect_provider_arns,
saml_provider_arns,
supported_login_providers
FROM aws.cognito_identity.identity_pools
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a new identity pool. The identity pool is a store of user identity information that is specific to your Amazon Web Services account. The keys for SupportedLoginProviders are as follows: Facebook: graph.facebook.com Google: accounts.google.com Sign in With Apple: appleid.apple.com Amazon: www.amazon.com Twitter: api.twitter.com Digits: www.digits.com If you don't provide a value for a parameter, Amazon Cognito sets it to its default value. You must use Amazon Web Services developer credentials to call this operation.

INSERT INTO aws.cognito_identity.identity_pools (
IdentityPoolName,
AllowUnauthenticatedIdentities,
AllowClassicFlow,
SupportedLoginProviders,
DeveloperProviderName,
OpenIdConnectProviderARNs,
CognitoIdentityProviders,
SamlProviderARNs,
IdentityPoolTags,
region
)
SELECT
'{{ IdentityPoolName }}' /* required */,
{{ AllowUnauthenticatedIdentities }} /* required */,
{{ AllowClassicFlow }},
'{{ SupportedLoginProviders }}',
'{{ DeveloperProviderName }}',
'{{ OpenIdConnectProviderARNs }}',
'{{ CognitoIdentityProviders }}',
'{{ SamlProviderARNs }}',
'{{ IdentityPoolTags }}',
'{{ region }}'
RETURNING
allow_classic_flow,
allow_unauthenticated_identities,
cognito_identity_providers,
developer_provider_name,
identity_pool_id,
identity_pool_name,
identity_pool_tags,
open_id_connect_provider_arns,
saml_provider_arns,
supported_login_providers
;

UPDATE examples

Updates the configuration of an identity pool. If you don't provide a value for a parameter, Amazon Cognito sets it to its default value. You must use Amazon Web Services developer credentials to call this operation.

UPDATE aws.cognito_identity.identity_pools
SET
IdentityPoolId = '{{ IdentityPoolId }}',
IdentityPoolName = '{{ IdentityPoolName }}',
AllowUnauthenticatedIdentities = {{ AllowUnauthenticatedIdentities }},
AllowClassicFlow = {{ AllowClassicFlow }},
SupportedLoginProviders = '{{ SupportedLoginProviders }}',
DeveloperProviderName = '{{ DeveloperProviderName }}',
OpenIdConnectProviderARNs = '{{ OpenIdConnectProviderARNs }}',
CognitoIdentityProviders = '{{ CognitoIdentityProviders }}',
SamlProviderARNs = '{{ SamlProviderARNs }}',
IdentityPoolTags = '{{ IdentityPoolTags }}'
WHERE
region = '{{ region }}' --required
AND IdentityPoolId = '{{ IdentityPoolId }}' --required
AND IdentityPoolName = '{{ IdentityPoolName }}' --required
AND AllowUnauthenticatedIdentities = {{ AllowUnauthenticatedIdentities }} --required
RETURNING
allow_classic_flow,
allow_unauthenticated_identities,
cognito_identity_providers,
developer_provider_name,
identity_pool_id,
identity_pool_name,
identity_pool_tags,
open_id_connect_provider_arns,
saml_provider_arns,
supported_login_providers;

DELETE examples

Deletes an identity pool. Once a pool is deleted, users will not be able to authenticate with the pool. You must use Amazon Web Services developer credentials to call this operation.

DELETE FROM aws.cognito_identity.identity_pools
WHERE region = '{{ region }}' --required
;

Lifecycle Methods

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 Amazon Web Services developer credentials to call this operation.

EXEC aws.cognito_identity.identity_pools.unlink_developer_identity
@region='{{ region }}' --required
@@json=
'{
"IdentityId": "{{ IdentityId }}",
"IdentityPoolId": "{{ IdentityPoolId }}",
"DeveloperProviderName": "{{ DeveloperProviderName }}",
"DeveloperUserIdentifier": "{{ DeveloperUserIdentifier }}"
}'
;