CognitoIdentityClient
Index > CognitoIdentity > CognitoIdentityClient
Auto-generated documentation for CognitoIdentity type annotations stubs module mypy-boto3-cognito-identity.
CognitoIdentityClient
Type annotations and code completion for boto3.client("cognito-identity")
.
boto3 documentation
from boto3.session import Session
from mypy_boto3_cognito_identity.client import CognitoIdentityClient
def get_cognito-identity_client() -> CognitoIdentityClient:
return Session().client("cognito-identity")
Exceptions
boto3
client exceptions are generated in runtime.
This class provides code completion for boto3.client("cognito-identity").exceptions
structure.
client = boto3.client("cognito-identity")
try:
do_something(client)
except (
client.ClientError,
client.ConcurrentModificationException,
client.DeveloperUserAlreadyRegisteredException,
client.ExternalServiceException,
client.InternalErrorException,
client.InvalidIdentityPoolConfigurationException,
client.InvalidParameterException,
client.LimitExceededException,
client.NotAuthorizedException,
client.ResourceConflictException,
client.ResourceNotFoundException,
client.TooManyRequestsException,
) as e:
print(e)
from mypy_boto3_cognito_identity.client import Exceptions
def handle_error(exc: Exceptions.ClientError) -> None:
...
Methods
can_paginate
Check if an operation can be paginated.
Type annotations and code completion for boto3.client("cognito-identity").can_paginate
method.
boto3 documentation
close
Closes underlying endpoint connections.
Type annotations and code completion for boto3.client("cognito-identity").close
method.
boto3 documentation
create_identity_pool
Creates a new identity pool.
Type annotations and code completion for boto3.client("cognito-identity").create_identity_pool
method.
boto3 documentation
def create_identity_pool(
self,
*,
IdentityPoolName: str,
AllowUnauthenticatedIdentities: bool,
AllowClassicFlow: bool = ...,
SupportedLoginProviders: Mapping[str, str] = ...,
DeveloperProviderName: str = ...,
OpenIdConnectProviderARNs: Sequence[str] = ...,
CognitoIdentityProviders: Sequence[CognitoIdentityProviderTypeDef] = ..., # (1)
SamlProviderARNs: Sequence[str] = ...,
IdentityPoolTags: Mapping[str, str] = ...,
) -> IdentityPoolTypeDef: # (2)
...
kwargs: CreateIdentityPoolInputRequestTypeDef = { # (1)
"IdentityPoolName": ...,
"AllowUnauthenticatedIdentities": ...,
}
parent.create_identity_pool(**kwargs)
delete_identities
Deletes identities from an identity pool.
Type annotations and code completion for boto3.client("cognito-identity").delete_identities
method.
boto3 documentation
def delete_identities(
self,
*,
IdentityIdsToDelete: Sequence[str],
) -> DeleteIdentitiesResponseTypeDef: # (1)
...
kwargs: DeleteIdentitiesInputRequestTypeDef = { # (1)
"IdentityIdsToDelete": ...,
}
parent.delete_identities(**kwargs)
delete_identity_pool
Deletes an identity pool.
Type annotations and code completion for boto3.client("cognito-identity").delete_identity_pool
method.
boto3 documentation
def delete_identity_pool(
self,
*,
IdentityPoolId: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
kwargs: DeleteIdentityPoolInputRequestTypeDef = { # (1)
"IdentityPoolId": ...,
}
parent.delete_identity_pool(**kwargs)
describe_identity
Returns metadata related to the given identity, including when the identity was created and any associated linked logins.
Type annotations and code completion for boto3.client("cognito-identity").describe_identity
method.
boto3 documentation
def describe_identity(
self,
*,
IdentityId: str,
) -> IdentityDescriptionResponseMetadataTypeDef: # (1)
...
kwargs: DescribeIdentityInputRequestTypeDef = { # (1)
"IdentityId": ...,
}
parent.describe_identity(**kwargs)
describe_identity_pool
Gets details about a particular identity pool, including the pool name, ID description, creation date, and current number of users.
Type annotations and code completion for boto3.client("cognito-identity").describe_identity_pool
method.
boto3 documentation
def describe_identity_pool(
self,
*,
IdentityPoolId: str,
) -> IdentityPoolTypeDef: # (1)
...
kwargs: DescribeIdentityPoolInputRequestTypeDef = { # (1)
"IdentityPoolId": ...,
}
parent.describe_identity_pool(**kwargs)
generate_presigned_url
Generate a presigned url given a client, its method, and arguments.
Type annotations and code completion for boto3.client("cognito-identity").generate_presigned_url
method.
boto3 documentation
def generate_presigned_url(
self,
ClientMethod: str,
Params: Mapping[str, Any] = ...,
ExpiresIn: int = 3600,
HttpMethod: str = ...,
) -> str:
...
get_credentials_for_identity
Returns credentials for the provided identity ID.
Type annotations and code completion for boto3.client("cognito-identity").get_credentials_for_identity
method.
boto3 documentation
def get_credentials_for_identity(
self,
*,
IdentityId: str,
Logins: Mapping[str, str] = ...,
CustomRoleArn: str = ...,
) -> GetCredentialsForIdentityResponseTypeDef: # (1)
...
kwargs: GetCredentialsForIdentityInputRequestTypeDef = { # (1)
"IdentityId": ...,
}
parent.get_credentials_for_identity(**kwargs)
get_id
Generates (or retrieves) a Cognito ID.
Type annotations and code completion for boto3.client("cognito-identity").get_id
method.
boto3 documentation
def get_id(
self,
*,
IdentityPoolId: str,
AccountId: str = ...,
Logins: Mapping[str, str] = ...,
) -> GetIdResponseTypeDef: # (1)
...
kwargs: GetIdInputRequestTypeDef = { # (1)
"IdentityPoolId": ...,
}
parent.get_id(**kwargs)
get_identity_pool_roles
Gets the roles for an identity pool.
Type annotations and code completion for boto3.client("cognito-identity").get_identity_pool_roles
method.
boto3 documentation
def get_identity_pool_roles(
self,
*,
IdentityPoolId: str,
) -> GetIdentityPoolRolesResponseTypeDef: # (1)
...
kwargs: GetIdentityPoolRolesInputRequestTypeDef = { # (1)
"IdentityPoolId": ...,
}
parent.get_identity_pool_roles(**kwargs)
get_open_id_token
Gets an OpenID token, using a known Cognito ID.
Type annotations and code completion for boto3.client("cognito-identity").get_open_id_token
method.
boto3 documentation
def get_open_id_token(
self,
*,
IdentityId: str,
Logins: Mapping[str, str] = ...,
) -> GetOpenIdTokenResponseTypeDef: # (1)
...
kwargs: GetOpenIdTokenInputRequestTypeDef = { # (1)
"IdentityId": ...,
}
parent.get_open_id_token(**kwargs)
get_open_id_token_for_developer_identity
Registers (or retrieves) a Cognito IdentityId
and an OpenID Connect token for
a user authenticated by your backend authentication process.
Type annotations and code completion for boto3.client("cognito-identity").get_open_id_token_for_developer_identity
method.
boto3 documentation
def get_open_id_token_for_developer_identity(
self,
*,
IdentityPoolId: str,
Logins: Mapping[str, str],
IdentityId: str = ...,
PrincipalTags: Mapping[str, str] = ...,
TokenDuration: int = ...,
) -> GetOpenIdTokenForDeveloperIdentityResponseTypeDef: # (1)
...
kwargs: GetOpenIdTokenForDeveloperIdentityInputRequestTypeDef = { # (1)
"IdentityPoolId": ...,
"Logins": ...,
}
parent.get_open_id_token_for_developer_identity(**kwargs)
get_principal_tag_attribute_map
Use GetPrincipalTagAttributeMap
to list all mappings between PrincipalTags
and user attributes.
Type annotations and code completion for boto3.client("cognito-identity").get_principal_tag_attribute_map
method.
boto3 documentation
def get_principal_tag_attribute_map(
self,
*,
IdentityPoolId: str,
IdentityProviderName: str,
) -> GetPrincipalTagAttributeMapResponseTypeDef: # (1)
...
kwargs: GetPrincipalTagAttributeMapInputRequestTypeDef = { # (1)
"IdentityPoolId": ...,
"IdentityProviderName": ...,
}
parent.get_principal_tag_attribute_map(**kwargs)
list_identities
Lists the identities in an identity pool.
Type annotations and code completion for boto3.client("cognito-identity").list_identities
method.
boto3 documentation
def list_identities(
self,
*,
IdentityPoolId: str,
MaxResults: int,
NextToken: str = ...,
HideDisabled: bool = ...,
) -> ListIdentitiesResponseTypeDef: # (1)
...
kwargs: ListIdentitiesInputRequestTypeDef = { # (1)
"IdentityPoolId": ...,
"MaxResults": ...,
}
parent.list_identities(**kwargs)
list_identity_pools
Lists all of the Cognito identity pools registered for your account.
Type annotations and code completion for boto3.client("cognito-identity").list_identity_pools
method.
boto3 documentation
def list_identity_pools(
self,
*,
MaxResults: int,
NextToken: str = ...,
) -> ListIdentityPoolsResponseTypeDef: # (1)
...
kwargs: ListIdentityPoolsInputRequestTypeDef = { # (1)
"MaxResults": ...,
}
parent.list_identity_pools(**kwargs)
list_tags_for_resource
Lists the tags that are assigned to an Amazon Cognito identity pool.
Type annotations and code completion for boto3.client("cognito-identity").list_tags_for_resource
method.
boto3 documentation
def list_tags_for_resource(
self,
*,
ResourceArn: str,
) -> ListTagsForResourceResponseTypeDef: # (1)
...
kwargs: ListTagsForResourceInputRequestTypeDef = { # (1)
"ResourceArn": ...,
}
parent.list_tags_for_resource(**kwargs)
lookup_developer_identity
Retrieves the IdentityID
associated with a DeveloperUserIdentifier
or the
list of DeveloperUserIdentifier
values associated with an IdentityId
for an
existing identity.
Type annotations and code completion for boto3.client("cognito-identity").lookup_developer_identity
method.
boto3 documentation
def lookup_developer_identity(
self,
*,
IdentityPoolId: str,
IdentityId: str = ...,
DeveloperUserIdentifier: str = ...,
MaxResults: int = ...,
NextToken: str = ...,
) -> LookupDeveloperIdentityResponseTypeDef: # (1)
...
kwargs: LookupDeveloperIdentityInputRequestTypeDef = { # (1)
"IdentityPoolId": ...,
}
parent.lookup_developer_identity(**kwargs)
merge_developer_identities
Merges two users having different IdentityId
s, existing in the same identity
pool, and identified by the same developer provider.
Type annotations and code completion for boto3.client("cognito-identity").merge_developer_identities
method.
boto3 documentation
def merge_developer_identities(
self,
*,
SourceUserIdentifier: str,
DestinationUserIdentifier: str,
DeveloperProviderName: str,
IdentityPoolId: str,
) -> MergeDeveloperIdentitiesResponseTypeDef: # (1)
...
kwargs: MergeDeveloperIdentitiesInputRequestTypeDef = { # (1)
"SourceUserIdentifier": ...,
"DestinationUserIdentifier": ...,
"DeveloperProviderName": ...,
"IdentityPoolId": ...,
}
parent.merge_developer_identities(**kwargs)
set_identity_pool_roles
Sets the roles for an identity pool.
Type annotations and code completion for boto3.client("cognito-identity").set_identity_pool_roles
method.
boto3 documentation
def set_identity_pool_roles(
self,
*,
IdentityPoolId: str,
Roles: Mapping[str, str],
RoleMappings: Mapping[str, RoleMappingTypeDef] = ..., # (1)
) -> EmptyResponseMetadataTypeDef: # (2)
...
kwargs: SetIdentityPoolRolesInputRequestTypeDef = { # (1)
"IdentityPoolId": ...,
"Roles": ...,
}
parent.set_identity_pool_roles(**kwargs)
set_principal_tag_attribute_map
You can use this operation to use default (username and clientID) attribute or custom attribute mappings.
Type annotations and code completion for boto3.client("cognito-identity").set_principal_tag_attribute_map
method.
boto3 documentation
def set_principal_tag_attribute_map(
self,
*,
IdentityPoolId: str,
IdentityProviderName: str,
UseDefaults: bool = ...,
PrincipalTags: Mapping[str, str] = ...,
) -> SetPrincipalTagAttributeMapResponseTypeDef: # (1)
...
kwargs: SetPrincipalTagAttributeMapInputRequestTypeDef = { # (1)
"IdentityPoolId": ...,
"IdentityProviderName": ...,
}
parent.set_principal_tag_attribute_map(**kwargs)
tag_resource
Assigns a set of tags to the specified Amazon Cognito identity pool.
Type annotations and code completion for boto3.client("cognito-identity").tag_resource
method.
boto3 documentation
def tag_resource(
self,
*,
ResourceArn: str,
Tags: Mapping[str, str],
) -> Dict[str, Any]:
...
kwargs: TagResourceInputRequestTypeDef = { # (1)
"ResourceArn": ...,
"Tags": ...,
}
parent.tag_resource(**kwargs)
unlink_developer_identity
Unlinks a DeveloperUserIdentifier
from an existing identity.
Type annotations and code completion for boto3.client("cognito-identity").unlink_developer_identity
method.
boto3 documentation
def unlink_developer_identity(
self,
*,
IdentityId: str,
IdentityPoolId: str,
DeveloperProviderName: str,
DeveloperUserIdentifier: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
kwargs: UnlinkDeveloperIdentityInputRequestTypeDef = { # (1)
"IdentityId": ...,
"IdentityPoolId": ...,
"DeveloperProviderName": ...,
"DeveloperUserIdentifier": ...,
}
parent.unlink_developer_identity(**kwargs)
unlink_identity
Unlinks a federated identity from an existing account.
Type annotations and code completion for boto3.client("cognito-identity").unlink_identity
method.
boto3 documentation
def unlink_identity(
self,
*,
IdentityId: str,
Logins: Mapping[str, str],
LoginsToRemove: Sequence[str],
) -> EmptyResponseMetadataTypeDef: # (1)
...
kwargs: UnlinkIdentityInputRequestTypeDef = { # (1)
"IdentityId": ...,
"Logins": ...,
"LoginsToRemove": ...,
}
parent.unlink_identity(**kwargs)
untag_resource
Removes the specified tags from the specified Amazon Cognito identity pool.
Type annotations and code completion for boto3.client("cognito-identity").untag_resource
method.
boto3 documentation
def untag_resource(
self,
*,
ResourceArn: str,
TagKeys: Sequence[str],
) -> Dict[str, Any]:
...
kwargs: UntagResourceInputRequestTypeDef = { # (1)
"ResourceArn": ...,
"TagKeys": ...,
}
parent.untag_resource(**kwargs)
update_identity_pool
Updates an identity pool.
Type annotations and code completion for boto3.client("cognito-identity").update_identity_pool
method.
boto3 documentation
def update_identity_pool(
self,
*,
IdentityPoolId: str,
IdentityPoolName: str,
AllowUnauthenticatedIdentities: bool,
AllowClassicFlow: bool = ...,
SupportedLoginProviders: Mapping[str, str] = ...,
DeveloperProviderName: str = ...,
OpenIdConnectProviderARNs: Sequence[str] = ...,
CognitoIdentityProviders: Sequence[CognitoIdentityProviderTypeDef] = ..., # (1)
SamlProviderARNs: Sequence[str] = ...,
IdentityPoolTags: Mapping[str, str] = ...,
) -> IdentityPoolTypeDef: # (2)
...
kwargs: IdentityPoolRequestTypeDef = { # (1)
"IdentityPoolId": ...,
"IdentityPoolName": ...,
"AllowUnauthenticatedIdentities": ...,
}
parent.update_identity_pool(**kwargs)
get_paginator
Type annotations and code completion for boto3.client("cognito-identity").get_paginator
method with overloads.
client.get_paginator("list_identity_pools")
-> ListIdentityPoolsPaginator