List Bucket Contents operation


The List Bucket Contents operation returns information about items in a specified bucket.

The following figure shows the <items> XML element for the List Bucket Contents operation:

<items>
 <item>
   <parameters>
     <bucket>TestBucket</bucket>
     <prefix>l</prefix>
     <delimiter>/</delimiter>
     <max-keys>10</max-keys>
     <marker>Happy</marker>
   </parameters>
 </item>
</items>

The following figure shows a sample adapter request for the List Bucket Contents operation:

<amazon-s3-request>
 <secret-access-key />
    <operation-name>list-bucket-contents</operation-name>
    <parameters>
      <bucket>TestBucket</bucket>
      <prefix>l</prefix>
      <delimiter>/</delimiter>
      <max-keys>10</max-keys>
      <marker>Happy</marker>
    </parameters>
</amazon-s3-request>

The following table describes the elements for the adapter request:

Element

Description

Required

<wsdl-location>

Specifies the target WSDL URL for Amazon S3
Example: http://s3.amazonaws.com/doc/2006-03-01/AmazonS3.wsdl

Conditional; required if not specified in the configuration

<endpoint-address>

Specifies the web service endpoint to use for performing operations on Amazon S3 buckets across different regions

Default: https://s3.amazonaws.com/soap: Endpoint in the US Standard region

Values for regions:

No

<aws-access-key-id>

Specifies the 20-character public access key ID that is included in an Amazon Web Service (AWS) service request to identify the user

Conditional; required if not specified in the configuration

<secret-access-key>

Specifies the 40-character private identifier that is associated with the access key ID

Conditional; required if not specified in the configuration

<operation-name>

Contains the name of the operation:list-bucket-contents

Yes

<bucket>

Specifies the name of the bucket whose contents you want to list

Yes

<prefix>

Retrieves only those objects with key names that begin with the prefix string
You can use prefixes to separate objects in a bucket into different sets of keys.

No

<delimiter>

Retrieves only those objects with key names that contain the delimiter string

No

<max-keys>

Specifies the maximum number of keys returned in the response body
The server might return fewer than the specified number of keys, but not more.

No

<marker>

Indicates where in the bucket to begin listing
The list includes only those keys that occur lexically after the marker. This is convenient for pagination; for example, to get the next page of results, use the last key of the current page as the marker.

No

The following figure shows a sample adapter response for the List Bucket Contents operation:

<amazon-s3-response>
 <metadata>
   <status>success</status>
 </metadata>
 <ListBucketContentsResponse>
   <Name>TestBucket</Name>
   <Prefix>l</Prefix>
   <Marker>Happy</Marker>
   <MaxKeys>10</MaxKeys>
   <Delimiter>/</Delimiter>
   <IsTruncated>false</IsTruncated>
   <Contents>
     <Key>lg.txt</Key>
     <LastModified>2011-04-08T05:39:20.000Z</LastModified>
     <ETag>"8688c820caeaf6dfeb395755591d8f5e"</ETag>
     <Size>102</Size>
     <Owner>
       <ID>f7fd1a1bae4c700bf452ad628f5bc4787a52cca4d33bf2509b3364237143892d</ID>
       <DisplayName>invincible99</DisplayName>
     </Owner>
     <StorageClass>STANDARD</StorageClass>
   </Contents>
   <Contents>
     <Key>look.txt</Key>
     <LastModified>2011-04-13T07:04:47.000Z</LastModified>
     <ETag>"1c3d1d4f6d7b8d36c1bd7c3956ca3e9b"</ETag>
     <Size>756</Size>
     <Owner>
       <ID>f7fd1a1bae4c700bf452ad628f5bc4787a52cca4d33bf2509b3364237143892d</ID>
       <DisplayName>invincible99</DisplayName>
     </Owner>
     <StorageClass>STANDARD</StorageClass>
   </Contents>
 </ListBucketContentsResponse>
</amazon-s3-response>

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

TrueSight Orchestration Content 20.19.02