Returns metadata related to the given identity, including when the identity was created and any associated linked logins.
You must use Amazon Web Services developer credentials to call this operation.
Parameters:
-
identity_id
(IdentityId)
–
A unique identifier in the format REGION:GUID.
Raises:
Source code in docs_src/capo_cognito_identity/_services/cognito_identity.py
| def describe_identity(
self,
identity_id: "capo_cognito_identity.types.identity_id.IdentityId",
*,
config_overrides: Optional[CognitoIdentityClientConfig] = None,
) -> "capo_cognito_identity.types.identity_description.IdentityDescription":
"""<p>Returns metadata related to the given identity, including when the identity was created and any associated linked logins.</p> <p>You must use Amazon Web Services developer credentials to call this operation.</p>
Args:
identity_id: <p>A unique identifier in the format REGION:GUID.</p>
Raises:
capo_cognito_identity.errors.internal_error_exception.InternalErrorException: <p>Thrown when the service encounters an error during processing the request.</p>
capo_cognito_identity.errors.invalid_parameter_exception.InvalidParameterException: <p>Thrown for missing or bad input parameter(s).</p>
capo_cognito_identity.errors.not_authorized_exception.NotAuthorizedException: <p>Thrown when a user is not authorized to access the requested resource.</p>
capo_cognito_identity.errors.resource_not_found_exception.ResourceNotFoundException: <p>Thrown when the requested resource (for example, a dataset or record) does not exist.</p>
capo_cognito_identity.errors.too_many_requests_exception.TooManyRequestsException: <p>Thrown when a request is throttled.</p>
capo_cognito_identity.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_cognito_identity.types.describe_identity_input.DescribeIdentityInput]",
) -> OperationResponse[
"capo_cognito_identity.types.identity_description.IdentityDescription"
]:
import capo_cognito_identity._operations.aws_cognito_identity_service.describe_identity
output, http_response = (
capo_cognito_identity._operations.aws_cognito_identity_service.describe_identity.describe_identity(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DescribeIdentity")
)
input_: capo_cognito_identity.types.describe_identity_input.DescribeIdentityInput = {
"identity_id": identity_id
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|