CognitoIdentityProvider / Client / admin_get_device

admin_get_device#

CognitoIdentityProvider.Client.admin_get_device(**kwargs)#

Gets the device, as an administrator.

Note

Amazon Cognito evaluates Identity and Access Management (IAM) policies in requests for this API operation. For this operation, you must use IAM credentials to authorize requests, and you must grant yourself the corresponding IAM permission in a policy.

Learn more

See also: AWS API Documentation

Request Syntax

response = client.admin_get_device(
    DeviceKey='string',
    UserPoolId='string',
    Username='string'
)
Parameters:
  • DeviceKey (string) –

    [REQUIRED]

    The device key.

  • UserPoolId (string) –

    [REQUIRED]

    The user pool ID.

  • Username (string) –

    [REQUIRED]

    The username of the user that you want to query or modify. The value of this parameter is typically your user’s username, but it can be any of their alias attributes. If username isn’t an alias attribute in your user pool, this value must be the sub of a local user or the username of a user from a third-party IdP.

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, as an administrator.

    • 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 date and time when the item was modified. Amazon Cognito returns this timestamp in UNIX epoch time format. Your SDK might render the output in a human-readable format like ISO 8601 or a Java Date object.

      • DeviceLastAuthenticatedDate (datetime) –

        The date when the device was last authenticated.

Exceptions