Skip to content

CognitoIdentityClient.set_identity_pool_roles

rboto-cognito-identity==0.4.0 · Service index · Types

Model summary (excerpt): 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.

Install and imports

python -m pip install "rboto[cognito-identity]==0.4.0"
from rboto import CognitoIdentityClient
from rboto_cognito_identity.types import (
    RoleMapping,
)

Signature

async def set_identity_pool_roles(
    *,
    identity_pool_id: str,
    roles: dict[str, str],
    role_mappings: dict[str, RoleMapping] | None = None,
) -> None: ...

Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.

Arguments

Argument Required Model notes (excerpt)
identity_pool_id Yes An identity pool ID in the format REGION:GUID.
roles Yes 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.
role_mappings No 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.

Output

None.

| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.

RoleMapping

Follow these links for nested inputs and outputs; recursive types link back to the same type page.

Pagination and streaming

No generated paginator for this operation.

No output stream.

Errors

Import from rboto_cognito_identity.exceptions:

ConcurrentModificationError, InternalError, InvalidParameterError, NotAuthorizedError, ResourceConflictError, ResourceNotFoundError, TooManyRequestsError.

Other service failures use the service base error; credential, transport and timeout failures use shared errors.

Service guide · Pinned model