ListObjectsV2 #

Overview #

Returns some or all (up to 1,000) of the objects in a bucket.

AWS API Reference:

Method #


Import Parameters #

The request uses the following import parameters.

  • i_bucket_name (bucket in AWS) (Required)

    Name of the bucket to create.

  • i_region (Required)

    AWS Region of the Amazon S3 Bucket.

  • i_continuationtoken (continuation-token in AWS)

    ContinuationToken indicates Amazon S3 that the list is being continued on this bucket with a token.

  • i_delimiter (delimiter in AWS)

    A delimiter is a character you use to group keys.

  • i_encodingtype (encoding-type in AWS)

    Encoding type used by Amazon S3 to encode object keys in the response.

  • i_fetchowner (fetch-owner in AWS)

    The owner field is not present in listV2 by default, if you want to return owner field with each key in the result then set the fetch owner field to true.

  • i_maxkeys (max-keys in AWS)

    Sets the maximum number of keys returned in the response.

  • i_prefix (prefix in AWS)

    Limits the response to keys that begin with the specified prefix.

  • i_statafter (start-after in AWS)

    StartAfter is where you want Amazon S3 to start listing from.

  • i_x_amz_request_payer (x-amz-request-payer in AWS)

    Confirms that the requester knows that she or he will be charged for the list objects request in V2 style.

  • i_x_amz_expected_b_owner (x-amz-expected-bucket-owner in AWS)

    The account id of the expected bucket owner.

Export Parameters #

This method use the following export parameters:

  • e_istruncated (IsTruncated in AWS)

    Indicates whether the returned list of analytics configurations is complete.

  • e_nextcontinuationtoken (NextContinuationToken in AWS)

    NextContinuationToken is sent when isTruncated is true, which indicates that there are more analytics configurations to list.

  • e_http_status

    HTTP Status code.

  • e_response_headers

    Returns information about the request in format Name/Value pair values.

  • e_response_content

    Response content in string format.

Example #

DATA: lo_s3               TYPE REF TO /lnkc/cl_sdk_aws_s3,
      lv_http_status      TYPE i,
      lt_response_headers TYPE tihttpnvp,
      lv_response_content TYPE string.

      CREATE OBJECT lo_s3
          i_user_name         = 'user_awsconnector'
          i_access_key        = 'acces_key_value'
          i_secret_access_key = 'secret_acceskey_value'.

      CALL METHOD lo_s3->listobjectsv2
          i_continuationtoken     = 'i_continuationtoken'
          i_delimiter             = lv_delimi
          i_encodingtype          = lv_encodt
          i_fetchowner            = lv_fetcho
          i_maxkeys               = lv_maxkey
          i_prefix                = lv_prefix
          i_startafter            = lv_starta
*         i_xamzrequestpayer      =
          i_bucket_name           = lv_bucket_name
          i_region                = lv_region
          e_istruncated           = lv_istruncated
          e_nextcontinuationtoken = lv_nextcontinuationtoken
          e_http_status           = lv_http_status
          e_response_headers      = lt_response_headers
          e_response_content      = lv_response_content.
      CATCH /lnkc/cx_sdk_aws .
        " Error Message