identity_pool_roles
Creates, updates, deletes, gets or lists an identity_pool_roles resource.
Overview
| Name | identity_pool_roles |
| Type | Resource |
| Id | aws.cognito_identity.identity_pool_roles |
Fields
The following fields are returned by SELECT queries:
- get_identity_pool_roles
| Name | Datatype | Description |
|---|---|---|
identity_pool_id | string | An identity pool ID in the format REGION:GUID. (pattern: <code>[\w-]+:[0-9a-f-]+</code>) |
role_mappings | object | 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 | object | The map of roles associated with this pool. Currently only authenticated and unauthenticated roles are supported. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_identity_pool_roles | select | region | Gets the roles for an identity pool. You must use Amazon Web Services developer credentials to call this operation. | |
set_identity_pool_roles | update | region, IdentityPoolId | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_identity_pool_roles
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
- set_identity_pool_roles
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;