:doc:`Support <../../support>` / Client / describe_communications

***********************
describe_communications
***********************



.. py:method:: Support.Client.describe_communications(**kwargs)

  

  Returns communications and attachments for one or more support cases. Use the ``afterTime`` and ``beforeTime`` parameters to filter by date. You can use the ``caseId`` parameter to restrict the results to a specific case.

   

  Case data is available for 12 months after creation. If a case was created more than 12 months ago, a request for data might cause an error.

   

  You can use the ``maxResults`` and ``nextToken`` parameters to control the pagination of the results. Set ``maxResults`` to the number of cases that you want to display on each page, and use ``nextToken`` to specify the resumption of pagination.

   

  .. note::

    

    
    * You must have a Business, Enterprise On-Ramp, or Enterprise Support plan to use the Amazon Web Services Support API.
     
    * If you call the Amazon Web Services Support API from an account that doesn't have a Business, Enterprise On-Ramp, or Enterprise Support plan, the ``SubscriptionRequiredException`` error message appears. For information about changing your support plan, see `Amazon Web Services Support <http://aws.amazon.com/premiumsupport/>`__.
    

    

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/support-2013-04-15/DescribeCommunications>`_  


  **Request Syntax**
  ::

    response = client.describe_communications(
        caseId='string',
        beforeTime='string',
        afterTime='string',
        nextToken='string',
        maxResults=123
    )
    
  :type caseId: string
  :param caseId: **[REQUIRED]** 

    The support case ID requested or returned in the call. The case ID is an alphanumeric string formatted as shown in this example: case-*12345678910-2013-c4c1d2bf33c5cf47*

    

  
  :type beforeTime: string
  :param beforeTime: 

    The end date for a filtered date search on support case communications. Case communications are available for 12 months after creation.

    

  
  :type afterTime: string
  :param afterTime: 

    The start date for a filtered date search on support case communications. Case communications are available for 12 months after creation.

    

  
  :type nextToken: string
  :param nextToken: 

    A resumption point for pagination.

    

  
  :type maxResults: integer
  :param maxResults: 

    The maximum number of results to return before paginating.

    

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

    
    ::

      {
          'communications': [
              {
                  'caseId': 'string',
                  'body': 'string',
                  'submittedBy': 'string',
                  'timeCreated': 'string',
                  'attachmentSet': [
                      {
                          'attachmentId': 'string',
                          'fileName': 'string'
                      },
                  ]
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 

      The communications returned by the  DescribeCommunications operation.

      
      

      - **communications** *(list) --* 

        The communications for the case.

        
        

        - *(dict) --* 

          A communication associated with a support case. The communication consists of the case ID, the message body, attachment information, the submitter of the communication, and the date and time of the communication.

          
          

          - **caseId** *(string) --* 

            The support case ID requested or returned in the call. The case ID is an alphanumeric string formatted as shown in this example: case-*12345678910-2013-c4c1d2bf33c5cf47*

            
          

          - **body** *(string) --* 

            The text of the communication between the customer and Amazon Web Services Support.

            
          

          - **submittedBy** *(string) --* 

            The identity of the account that submitted, or responded to, the support case. Customer entries include the IAM role as well as the email address (for example, "AdminRole (Role) <janedoe@example.com>). Entries from the Amazon Web Services Support team display "Amazon Web Services," and don't show an email address.

            
          

          - **timeCreated** *(string) --* 

            The time the communication was created.

            
          

          - **attachmentSet** *(list) --* 

            Information about the attachments to the case communication.

            
            

            - *(dict) --* 

              The file name and ID of an attachment to a case communication. You can use the ID to retrieve the attachment with the  DescribeAttachment operation.

              
              

              - **attachmentId** *(string) --* 

                The ID of the attachment.

                
              

              - **fileName** *(string) --* 

                The file name of the attachment.

                
          
        
      
    
      

      - **nextToken** *(string) --* 

        A resumption point for pagination.

        
  
  **Exceptions**
  
  *   :py:class:`Support.Client.exceptions.InternalServerError`

  
  *   :py:class:`Support.Client.exceptions.CaseIdNotFound`

  