:doc:`CognitoSync <../../cognito-sync>` / Client / describe_identity_usage

***********************
describe_identity_usage
***********************



.. py:method:: CognitoSync.Client.describe_identity_usage(**kwargs)

  

  Gets usage information for an identity, including number of datasets and data usage.

   

  This API can be called with temporary user credentials provided by Cognito Identity or with developer credentials.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/DescribeIdentityUsage>`_  


  **Request Syntax**
  ::

    response = client.describe_identity_usage(
        IdentityPoolId='string',
        IdentityId='string'
    )
    
  :type IdentityPoolId: string
  :param IdentityPoolId: **[REQUIRED]** A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.

  
  :type IdentityId: string
  :param IdentityId: **[REQUIRED]** A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'IdentityUsage': {
              'IdentityId': 'string',
              'IdentityPoolId': 'string',
              'LastModifiedDate': datetime(2015, 1, 1),
              'DatasetCount': 123,
              'DataStorage': 123
          }
      }
      
    **Response Structure**

    

    - *(dict) --* The response to a successful DescribeIdentityUsage request.
      

      - **IdentityUsage** *(dict) --* Usage information for the identity.
        

        - **IdentityId** *(string) --* A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.
        

        - **IdentityPoolId** *(string) --* A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.
        

        - **LastModifiedDate** *(datetime) --* Date on which the identity was last modified.
        

        - **DatasetCount** *(integer) --* Number of datasets for the identity.
        

        - **DataStorage** *(integer) --* Total data storage for this identity.
    
  
  **Exceptions**
  
  *   :py:class:`CognitoSync.Client.exceptions.NotAuthorizedException`

  
  *   :py:class:`CognitoSync.Client.exceptions.InvalidParameterException`

  
  *   :py:class:`CognitoSync.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`CognitoSync.Client.exceptions.InternalErrorException`

  
  *   :py:class:`CognitoSync.Client.exceptions.TooManyRequestsException`

  