Skip to content

/AWS1/IF_SUP=>DESCRIBECASES()

About DescribeCases

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 24 months after creation. If a case was created more than 24 months ago, a request might return an error.

  • You must have an Amazon Web Services Business Support+, Amazon Web Services Enterprise Support, or Amazon Web Services Unified Operations plan to use the Amazon Web Services Support API. If you're in an Amazon Web Services Region that doesn't offer one of these Amazon Web Services Support plans, or if you haven't transitioned to one of these plans, you can use the Amazon Web Services Support API with a Business, Enterprise On-Ramp, or Enterprise Support plan.

  • If you call the Amazon Web Services Support API from an account that doesn't have an Amazon Web Services Business Support+, Amazon Web Services Enterprise Support, or Amazon Web Services Unified Operations plan, the SubscriptionRequiredException error message appears. For information about changing your support plan, see Amazon Web Services Support.

Each Communication returned by this operation includes attachment information in two fields:

  • attachmentSet: returns only attachments that are 5 MB or smaller. Attachments larger than 5 MB are not included in this field.

  • attachments: returns all attachments regardless of size.

Amazon Web Services recommends that you use the attachments field and download each attachment with GetAttachmentDownloadLink, which supports attachments of any size. The attachmentSet field and DescribeAttachment return only attachments that are 5 MB or smaller.

Method Signature

METHODS /AWS1/IF_SUP~DESCRIBECASES
  IMPORTING
    !IT_CASEIDLIST TYPE /AWS1/CL_SUPCASEIDLIST_W=>TT_CASEIDLIST OPTIONAL
    !IV_DISPLAYID TYPE /AWS1/SUPDISPLAYID OPTIONAL
    !IV_AFTERTIME TYPE /AWS1/SUPAFTERTIME OPTIONAL
    !IV_BEFORETIME TYPE /AWS1/SUPBEFORETIME OPTIONAL
    !IV_INCLUDERESOLVEDCASES TYPE /AWS1/SUPINCLUDERESOLVEDCASES OPTIONAL
    !IV_NEXTTOKEN TYPE /AWS1/SUPNEXTTOKEN OPTIONAL
    !IV_MAXRESULTS TYPE /AWS1/SUPMAXRESULTS OPTIONAL
    !IV_LANGUAGE TYPE /AWS1/SUPLANGUAGE OPTIONAL
    !IV_INCLUDECOMMUNICATIONS TYPE /AWS1/SUPINCLUDECOMMUNICATIONS OPTIONAL
    !IV_DRYRUN TYPE /AWS1/SUPNULLABLEBOOLEANTYPE OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_supdescrcasesresponse
  RAISING
    /AWS1/CX_SUPCASEIDNOTFOUND
    /AWS1/CX_SUPDRYRUNOPEXCEPTION
    /AWS1/CX_SUPINTERNALSERVERERR
    /AWS1/CX_SUPCLIENTEXC
    /AWS1/CX_SUPSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Optional arguments:

it_caseidlist TYPE /AWS1/CL_SUPCASEIDLIST_W=>TT_CASEIDLIST TT_CASEIDLIST

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

iv_displayid TYPE /AWS1/SUPDISPLAYID /AWS1/SUPDISPLAYID

The ID displayed for a case in the Amazon Web Services Support Center user interface.

iv_aftertime TYPE /AWS1/SUPAFTERTIME /AWS1/SUPAFTERTIME

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

iv_beforetime TYPE /AWS1/SUPBEFORETIME /AWS1/SUPBEFORETIME

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

iv_includeresolvedcases TYPE /AWS1/SUPINCLUDERESOLVEDCASES /AWS1/SUPINCLUDERESOLVEDCASES

Specifies whether to include resolved support cases in the DescribeCases response. By default, resolved cases aren't included.

iv_nexttoken TYPE /AWS1/SUPNEXTTOKEN /AWS1/SUPNEXTTOKEN

A resumption point for pagination.

iv_maxresults TYPE /AWS1/SUPMAXRESULTS /AWS1/SUPMAXRESULTS

The maximum number of results to return before paginating.

iv_language TYPE /AWS1/SUPLANGUAGE /AWS1/SUPLANGUAGE

The language in which Amazon Web Services Support handles the case. Amazon Web Services Support currently supports Chinese (“zh”), English ("en"), Japanese ("ja") , Chinese ("zh"), Spanish ("es"), Portuguese ("pt"), French ("fr"), Korean (“ko”), and Turkish ("tr"). You must specify the ISO 639-1 code for the language parameter if you want support in that language.

iv_includecommunications TYPE /AWS1/SUPINCLUDECOMMUNICATIONS /AWS1/SUPINCLUDECOMMUNICATIONS

Specifies whether to include communications in the DescribeCases response. By default, communications are included.

iv_dryrun TYPE /AWS1/SUPNULLABLEBOOLEANTYPE /AWS1/SUPNULLABLEBOOLEANTYPE

Specifies whether to validate the request without actually returning case data. When set to true, the request is validated but no cases are returned, and the operation returns a DryRunOperationException. When omitted or set to false, the request runs normally.

RETURNING

oo_output TYPE REF TO /aws1/cl_supdescrcasesresponse /AWS1/CL_SUPDESCRCASESRESPONSE

Examples

Syntax Example

This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.

DATA(lo_result) = lo_client->describecases(
  it_caseidlist = VALUE /aws1/cl_supcaseidlist_w=>tt_caseidlist(
    ( new /aws1/cl_supcaseidlist_w( |string| ) )
  )
  iv_aftertime = |string|
  iv_beforetime = |string|
  iv_displayid = |string|
  iv_dryrun = ABAP_TRUE
  iv_includecommunications = ABAP_TRUE
  iv_includeresolvedcases = ABAP_TRUE
  iv_language = |string|
  iv_maxresults = 123
  iv_nexttoken = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  LOOP AT lo_result->get_cases( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_caseid = lo_row_1->get_caseid( ).
      lv_displayid = lo_row_1->get_displayid( ).
      lv_subject = lo_row_1->get_subject( ).
      lv_status = lo_row_1->get_status( ).
      lv_servicecode = lo_row_1->get_servicecode( ).
      lv_categorycode = lo_row_1->get_categorycode( ).
      lv_severitycode = lo_row_1->get_severitycode( ).
      lv_submittedby = lo_row_1->get_submittedby( ).
      lv_timecreated = lo_row_1->get_timecreated( ).
      lo_recentcasecommunication = lo_row_1->get_recentcommunications( ).
      IF lo_recentcasecommunication IS NOT INITIAL.
        LOOP AT lo_recentcasecommunication->get_communications( ) into lo_row_2.
          lo_row_3 = lo_row_2.
          IF lo_row_3 IS NOT INITIAL.
            lv_caseid = lo_row_3->get_caseid( ).
            lv_validatedcommunicationb = lo_row_3->get_body( ).
            lv_submittedby = lo_row_3->get_submittedby( ).
            lv_timecreated = lo_row_3->get_timecreated( ).
            LOOP AT lo_row_3->get_attachments( ) into lo_row_4.
              lo_row_5 = lo_row_4.
              IF lo_row_5 IS NOT INITIAL.
                lv_attachmentid = lo_row_5->get_attachmentid( ).
                lv_filename = lo_row_5->get_filename( ).
              ENDIF.
            ENDLOOP.
            LOOP AT lo_row_3->get_attachmentset( ) into lo_row_4.
              lo_row_5 = lo_row_4.
              IF lo_row_5 IS NOT INITIAL.
                lv_attachmentid = lo_row_5->get_attachmentid( ).
                lv_filename = lo_row_5->get_filename( ).
              ENDIF.
            ENDLOOP.
          ENDIF.
        ENDLOOP.
        lv_nexttoken = lo_recentcasecommunication->get_nexttoken( ).
      ENDIF.
      LOOP AT lo_row_1->get_ccemailaddresses( ) into lo_row_6.
        lo_row_7 = lo_row_6.
        IF lo_row_7 IS NOT INITIAL.
          lv_ccemailaddress = lo_row_7->get_value( ).
        ENDIF.
      ENDLOOP.
      lv_language = lo_row_1->get_language( ).
    ENDIF.
  ENDLOOP.
  lv_nexttoken = lo_result->get_nexttoken( ).
ENDIF.