Skip to main content

identity_pool_roles

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

Overview

Nameidentity_pool_roles
TypeResource
Idaws.cognito_identity.identity_pool_roles

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
identity_pool_idstringAn identity pool ID in the format REGION:GUID. (pattern: <code>[\w-]+:[0-9a-f-]+</code>)
role_mappingsobjectHow 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.
rolesobjectThe map of roles associated with this pool. Currently only authenticated and unauthenticated roles are supported.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_identity_pool_rolesselectregionGets the roles for an identity pool. You must use Amazon Web Services developer credentials to call this operation.
set_identity_pool_rolesupdateregion, IdentityPoolIdSets the roles for an identity pool. These roles are used when making calls to GetCredentialsForIdentity action. 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 the roles for an identity pool. You must use Amazon Web Services developer credentials to call this operation.

SELECT
identity_pool_id,
role_mappings,
roles
FROM aws.cognito_identity.identity_pool_roles
WHERE region = '{{ region }}' -- required
;

UPDATE examples

Sets the roles for an identity pool. These roles are used when making calls to GetCredentialsForIdentity action. You must use Amazon Web Services developer credentials to call this operation.

UPDATE aws.cognito_identity.identity_pool_roles
SET
IdentityPoolId = '{{ IdentityPoolId }}',
Roles = '{{ Roles }}',
RoleMappings = '{{ RoleMappings }}'
WHERE
region = '{{ region }}' --required
AND IdentityPoolId = '{{ IdentityPoolId }}' --required;