Skip to content

/AWS1/IF_SUP=>GETATTACHMENTUPLOADLINKS()

Returns one or more presigned upload URLs for uploading a large file attachment to a support case by using a multipart upload workflow. The maximum file size that you can upload with this workflow is 150 MB, and parts can be up to 100 MB each. Initiate a new upload by providing fileName and fileSizeBytes; the response returns a unique uploadId, the part size, the total number of parts, and a list of presigned upload URLs for the requested range of parts. A maximum of 10 upload URLs are returned per call. To retrieve more upload URLs for an upload that's already in progress, call GetAttachmentUploadLinks again with the existing uploadId and a new uploadRange.

Upload each part to its presigned URL by using HTTP PUT and capture the ETag from the response. After you upload all parts, call CompleteAttachmentUpload with the uploadId and the list of part indexes and ETags to finalize the upload. You can then attach the upload to a case by passing the uploadId in the uploadIds parameter of CreateCase or AddCommunicationToCase. To monitor progress before completion, call DescribeAttachmentUploadStatus.

  • 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.

Method Signature

METHODS /AWS1/IF_SUP~GETATTACHMENTUPLOADLINKS
  IMPORTING
    !IV_FILENAME TYPE /AWS1/SUPFILENAME OPTIONAL
    !IV_FILESIZEBYTES TYPE /AWS1/SUPFILESIZE OPTIONAL
    !IV_UPLOADID TYPE /AWS1/SUPUPLOADID OPTIONAL
    !IO_UPLOADRANGE TYPE REF TO /AWS1/CL_SUPUPLOADRANGE OPTIONAL
    !IV_DRYRUN TYPE /AWS1/SUPNULLABLEBOOLEANTYPE OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_supgetatmtuplinksrsp
  RAISING
    /AWS1/CX_SUPDRYRUNOPEXCEPTION
    /AWS1/CX_SUPINTERNALSERVERERR
    /AWS1/CX_SUPUPLOADIDNOTFOUND
    /AWS1/CX_SUPCLIENTEXC
    /AWS1/CX_SUPSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_filename TYPE /AWS1/SUPFILENAME /AWS1/SUPFILENAME

The name of the file to upload, including the file extension. This value is required when you initiate a new upload.

Optional arguments:

iv_filesizebytes TYPE /AWS1/SUPFILESIZE /AWS1/SUPFILESIZE

The total size of the file in bytes. The service uses this value to calculate the total number of parts and the size of each part. Required when you initiate a new upload (when uploadId isn't provided). Valid range: 1 to 157,286,400 bytes (approximately 150 MB).

iv_uploadid TYPE /AWS1/SUPUPLOADID /AWS1/SUPUPLOADID

The unique identifier of an in-progress multipart upload, returned by a previous call to GetAttachmentUploadLinks. Specify uploadId to retrieve additional presigned upload URLs for an upload that has already been initiated. Required when fileSizeBytes isn't provided. Length: 1 to 2,048 characters.

io_uploadrange TYPE REF TO /AWS1/CL_SUPUPLOADRANGE /AWS1/CL_SUPUPLOADRANGE

The range of part indexes for which to return presigned upload URLs. Use this parameter to page through the upload URLs for a large file across multiple calls. If you omit this parameter, the service determines the range to return.

iv_dryrun TYPE /AWS1/SUPNULLABLEBOOLEANTYPE /AWS1/SUPNULLABLEBOOLEANTYPE

Specifies whether to validate the request without actually generating upload URLs. When set to true, the request is validated but no URLs 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_supgetatmtuplinksrsp /AWS1/CL_SUPGETATMTUPLINKSRSP

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->getattachmentuploadlinks(
  io_uploadrange = new /aws1/cl_supuploadrange(
    iv_endindex = 123
    iv_startindex = 123
  )
  iv_dryrun = ABAP_TRUE
  iv_filename = |string|
  iv_filesizebytes = 123
  iv_uploadid = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_uploadid = lo_result->get_uploadid( ).
  lv_partsizebytes = lo_result->get_partsizebytes( ).
  lv_integer = lo_result->get_totalparts( ).
  lv_integer = lo_result->get_nextindex( ).
  LOOP AT lo_result->get_uploadurls( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_httpsurl = lo_row_1->get_url( ).
      lv_integer = lo_row_1->get_partindex( ).
      lv_validateddatetime = lo_row_1->get_expirydate( ).
    ENDIF.
  ENDLOOP.
ENDIF.