get_device

get_device(**kwargs)

Gets the device.

See also: AWS API Documentation

Request Syntax

response = client.get_device(
    DeviceKey='string',
    AccessToken='string'
)
Parameters
  • DeviceKey (string) --

    [REQUIRED]

    The device key.

  • AccessToken (string) -- A valid access token that Amazon Cognito issued to the user whose device information you want to request.
Return type

dict

Returns

Response Syntax

{
    'Device': {
        'DeviceKey': 'string',
        'DeviceAttributes': [
            {
                'Name': 'string',
                'Value': 'string'
            },
        ],
        'DeviceCreateDate': datetime(2015, 1, 1),
        'DeviceLastModifiedDate': datetime(2015, 1, 1),
        'DeviceLastAuthenticatedDate': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    Gets the device response.

    • Device (dict) --

      The device.

      • DeviceKey (string) --

        The device key.

      • DeviceAttributes (list) --

        The device attributes.

        • (dict) --

          Specifies whether the attribute is standard or custom.

          • Name (string) --

            The name of the attribute.

          • Value (string) --

            The value of the attribute.

      • DeviceCreateDate (datetime) --

        The creation date of the device.

      • DeviceLastModifiedDate (datetime) --

        The last modified date of the device.

      • DeviceLastAuthenticatedDate (datetime) --

        The date when the device was last authenticated.

Exceptions

  • CognitoIdentityProvider.Client.exceptions.ResourceNotFoundException
  • CognitoIdentityProvider.Client.exceptions.InvalidParameterException
  • CognitoIdentityProvider.Client.exceptions.InvalidUserPoolConfigurationException
  • CognitoIdentityProvider.Client.exceptions.NotAuthorizedException
  • CognitoIdentityProvider.Client.exceptions.TooManyRequestsException
  • CognitoIdentityProvider.Client.exceptions.PasswordResetRequiredException
  • CognitoIdentityProvider.Client.exceptions.UserNotFoundException
  • CognitoIdentityProvider.Client.exceptions.UserNotConfirmedException
  • CognitoIdentityProvider.Client.exceptions.InternalErrorException
  • CognitoIdentityProvider.Client.exceptions.ForbiddenException