Cognito Identity¶
Client¶
AsyncCognitoIdentityClient
¶
AsyncCognitoIdentityClient(config: AsyncCognitoIdentityConfig | None = None, plugins: list[Plugin] | None = None)
Amazon Cognito Federated Identities is a web service that delivers scoped temporary credentials to mobile devices and other untrusted environments. It uniquely identifies a device and supplies the user with a consistent identity over the lifetime of an application.
Using Amazon Cognito Federated Identities, you can enable authentication with one or more third-party identity providers (Facebook, Google, or Login with Amazon) or an Amazon Cognito user pool, and you can also choose to support unauthenticated access from your app. Cognito delivers a unique identifier for each user and acts as an OpenID token provider trusted by Security Token Service (STS) to access temporary, limited-privilege Amazon Web Services credentials.
For a description of the authentication flow from the Amazon Cognito Developer Guide see Authentication Flow.
For more information see Amazon Cognito Federated Identities.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config
|
AsyncCognitoIdentityConfig | None
|
Optional configuration for the client. Here you can set things like the endpoint for HTTP services or auth credentials. |
None
|
plugins
|
list[Plugin] | None
|
A list of callables applied once to the client's base configuration. Their changes are inherited by every operation invocation. |
None
|
Operations¶
create_identity_pooldelete_identitiesdelete_identity_pooldescribe_identitydescribe_identity_poolget_credentials_for_identityget_idget_identity_pool_rolesget_open_id_tokenget_open_id_token_for_developer_identityget_principal_tag_attribute_maplist_identitieslist_identity_poolslist_tags_for_resourcelookup_developer_identitymerge_developer_identitiesset_identity_pool_rolesset_principal_tag_attribute_maptag_resourceunlink_developer_identityunlink_identityuntag_resourceupdate_identity_pool
Configuration¶
AsyncCognitoIdentityConfig
dataclass
¶
Bases: AsyncAwsConfig
Cognito Identity configuration (async-resolved).
Attributes¶
auth_scheme_resolver
class-attribute
instance-attribute
¶
An auth scheme resolver that determines the auth scheme for each operation.
auth_schemes
class-attribute
instance-attribute
¶
A map of auth scheme ids to auth schemes.
aws_access_key_id
class-attribute
instance-attribute
¶
aws_access_key_id: str | None = None
The identifier for a secret access key.
aws_credentials_identity_resolver
class-attribute
instance-attribute
¶
aws_credentials_identity_resolver: IdentityResolver[AWSCredentialsIdentity, AWSIdentityProperties] | None = None
Resolves AWS Credentials. Required for operations that use Sigv4 Auth.
aws_secret_access_key
class-attribute
instance-attribute
¶
aws_secret_access_key: str | None = None
A secret access key that can be used to sign requests.
aws_session_token
class-attribute
instance-attribute
¶
aws_session_token: str | None = None
The session token used with temporary AWS credentials.
endpoint_resolver
class-attribute
instance-attribute
¶
The endpoint resolver used to resolve the final endpoint per-operation based on the configuration.
interceptors
class-attribute
instance-attribute
¶
The list of interceptors, which are hooks that are called during the execution of a request.
protocol
class-attribute
instance-attribute
¶
The protocol to serialize and deserialize requests with.
region
class-attribute
instance-attribute
¶
region: str | None = None
The AWS region to connect to. The configured region is used to determine the service endpoint.
sdk_ua_app_id
class-attribute
instance-attribute
¶
sdk_ua_app_id: str | None = None
A unique and opaque application ID that is appended to the User-Agent header.
user_agent_extra
class-attribute
instance-attribute
¶
user_agent_extra: str | None = None
Additional suffix to be added to the User-Agent header.
Methods:¶
resolve
async
classmethod
¶
resolve(*, profile: str | None = None, fs: FileSystem | None = None, config_file_path: str | None = None, credentials_file_path: str | None = None, **overrides: Unpack[_AsyncCognitoIdentityConfigOverrides]) -> Self
Resolve config from environment, config files, defaults, and explicit overrides.
Plugin
module-attribute
¶
Plugin: TypeAlias = Callable[[AsyncCognitoIdentityConfig], None]
A callable that customizes a client configuration. Service-level plugins are applied once to the base configuration inherited by every operation. Operation-level plugins apply only to a single operation invocation.
Structures¶
CognitoIdentityProviderCredentialsIdentityDescriptionIdentityPoolShortDescriptionMappingRuleRoleMappingRulesConfigurationTypeUnprocessedIdentityId
Errors¶
ConcurrentModificationExceptionDeveloperUserAlreadyRegisteredExceptionExternalServiceExceptionInternalErrorExceptionInvalidIdentityPoolConfigurationExceptionInvalidParameterExceptionLimitExceededExceptionNotAuthorizedExceptionResourceConflictExceptionResourceNotFoundExceptionServiceErrorTooManyRequestsException