describe_cases

describe_cases(**kwargs)

Returns a list of cases that you specify by passing one or more case IDs. You can use the afterTime and beforeTime parameters to filter the cases by date. You can set values for the includeResolvedCases and includeCommunications parameters to specify how much information to return.

The response returns the following in JSON format:

  • One or more CaseDetails data types.
  • One or more nextToken values, which specify where to paginate the returned records represented by the CaseDetails objects.

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

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.

See also: AWS API Documentation

Request Syntax

response = client.describe_cases(
    caseIdList=[
        'string',
    ],
    displayId='string',
    afterTime='string',
    beforeTime='string',
    includeResolvedCases=True|False,
    nextToken='string',
    maxResults=123,
    language='string',
    includeCommunications=True|False
)
Parameters
  • caseIdList (list) --

    A list of ID numbers of the support cases you want returned. The maximum number of cases is 100.

    • (string) --
  • displayId (string) -- The ID displayed for a case in the Amazon Web Services Support Center user interface.
  • afterTime (string) -- The start date for a filtered date search on support case communications. Case communications are available for 12 months after creation.
  • beforeTime (string) -- The end date for a filtered date search on support case communications. Case communications are available for 12 months after creation.
  • includeResolvedCases (boolean) -- Specifies whether to include resolved support cases in the DescribeCases response. By default, resolved cases aren't included.
  • nextToken (string) -- A resumption point for pagination.
  • maxResults (integer) -- The maximum number of results to return before paginating.
  • language (string) -- The language in which Amazon Web Services Support handles the case. Amazon Web Services Support currently supports English ("en") and Japanese ("ja"). You must specify the ISO 639-1 code for the language parameter if you want support in that language.
  • includeCommunications (boolean) -- Specifies whether to include communications in the DescribeCases response. By default, communications are included.
Return type

dict

Returns

Response Syntax

{
    'cases': [
        {
            'caseId': 'string',
            'displayId': 'string',
            'subject': 'string',
            'status': 'string',
            'serviceCode': 'string',
            'categoryCode': 'string',
            'severityCode': 'string',
            'submittedBy': 'string',
            'timeCreated': 'string',
            'recentCommunications': {
                'communications': [
                    {
                        'caseId': 'string',
                        'body': 'string',
                        'submittedBy': 'string',
                        'timeCreated': 'string',
                        'attachmentSet': [
                            {
                                'attachmentId': 'string',
                                'fileName': 'string'
                            },
                        ]
                    },
                ],
                'nextToken': 'string'
            },
            'ccEmailAddresses': [
                'string',
            ],
            'language': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    Returns an array of CaseDetails objects and a nextToken that defines a point for pagination in the result set.

    • cases (list) --

      The details for the cases that match the request.

      • (dict) --

        A JSON-formatted object that contains the metadata for a support case. It is contained in the response from a DescribeCases request. CaseDetails contains the following fields:

        • caseId - 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 .
        • categoryCode - The category of problem for the support case. Corresponds to the CategoryCode values returned by a call to DescribeServices.
        • displayId - The identifier for the case on pages in the Amazon Web Services Support Center.
        • language - The language in which Amazon Web Services Support handles the case. Amazon Web Services Support currently supports English ("en") and Japanese ("ja"). You must specify the ISO 639-1 code for the language parameter if you want support in that language.
        • nextToken - A resumption point for pagination.
        • recentCommunications - One or more Communication objects. Fields of these objects are attachments , body , caseId , submittedBy , and timeCreated .
        • serviceCode - The identifier for the Amazon Web Services service that corresponds to the service code defined in the call to DescribeServices.
        • severityCode - The severity code assigned to the case. Contains one of the values returned by the call to DescribeSeverityLevels. The possible values are: low , normal , high , urgent , and critical .
        • status - The status of the case in the Amazon Web Services Support Center. Valid values:
          • opened
          • pending-customer-action
          • reopened
          • resolved
          • unassigned
          • work-in-progress
        • subject - The subject line of the case.
        • submittedBy - The email address of the account that submitted the case.
        • timeCreated - The time the case was created, in ISO-8601 format.
        • 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

        • displayId (string) --

          The ID displayed for the case in the Amazon Web Services Support Center. This is a numeric string.

        • subject (string) --

          The subject line for the case in the Amazon Web Services Support Center.

        • status (string) --

          The status of the case.

          Valid values:

          • opened
          • pending-customer-action
          • reopened
          • resolved
          • unassigned
          • work-in-progress
        • serviceCode (string) --

          The code for the Amazon Web Services service. You can get a list of codes and the corresponding service names by calling DescribeServices.

        • categoryCode (string) --

          The category of problem for the support case.

        • severityCode (string) --

          The code for the severity level returned by the call to DescribeSeverityLevels.

        • submittedBy (string) --

          The email address of the account that submitted the case.

        • timeCreated (string) --

          The time that the case was created in the Amazon Web Services Support Center.

        • recentCommunications (dict) --

          The five most recent communications between you and Amazon Web Services Support Center, including the IDs of any attachments to the communications. Also includes a nextToken that you can use to retrieve earlier communications.

          • communications (list) --

            The five most recent communications associated with 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 role or IAM user 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.

        • ccEmailAddresses (list) --

          The email addresses that receive copies of communication about the case.

          • (string) --
        • language (string) --

          The language in which Amazon Web Services Support handles the case. Amazon Web Services Support currently supports English ("en") and Japanese ("ja"). You must specify the ISO 639-1 code for the language parameter if you want support in that language.

    • nextToken (string) --

      A resumption point for pagination.

Exceptions

  • Support.Client.exceptions.InternalServerError
  • Support.Client.exceptions.CaseIdNotFound