:doc:`IAM <../../iam>` / Client / get_credential_report

*********************
get_credential_report
*********************



.. py:method:: IAM.Client.get_credential_report()

  

  Retrieves a credential report for the Amazon Web Services account. For more information about the credential report, see `Getting credential reports <https://docs.aws.amazon.com/IAM/latest/UserGuide/credential-reports.html>`__ in the *IAM User Guide*.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetCredentialReport>`_  


  **Request Syntax**

  ::

    response = client.get_credential_report()
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'Content': b'bytes',
          'ReportFormat': 'text/csv',
          'GeneratedTime': datetime(2015, 1, 1)
      }
      
    **Response Structure**

    

    - *(dict) --* 

      Contains the response to a successful `GetCredentialReport <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetCredentialReport.html>`__ request.

      
      

      - **Content** *(bytes) --* 

        Contains the credential report. The report is Base64-encoded.

        
      

      - **ReportFormat** *(string) --* 

        The format (MIME type) of the credential report.

        
      

      - **GeneratedTime** *(datetime) --* 

        The date and time when the credential report was created, in `ISO 8601 date-time format <http://www.iso.org/iso/iso8601>`__.

        
  
  **Exceptions**
  
  *   :py:class:`IAM.Client.exceptions.CredentialReportNotPresentException`

  
  *   :py:class:`IAM.Client.exceptions.CredentialReportExpiredException`

  
  *   :py:class:`IAM.Client.exceptions.CredentialReportNotReadyException`

  
  *   :py:class:`IAM.Client.exceptions.ServiceFailureException`

  