Returns a list of all buckets owned by the authenticated sender of the request. To use
this operation, you must have the s3:ListAllMyBuckets permission.
Example
Use a bare-bones client and the command you need to make an API call.
// The following example return versions of an object with specific key name prefix. The request limits the number of items returned to two. If there are are more than two object version, S3 returns NextToken in the response. You can specify this token value in your next request to fetch next set of object versions. constinput = undefined; constcommand = newListBucketsCommand(input); constresponse = awaitclient.send(command); /* response == { "Buckets": [ { "CreationDate": "2012-02-15T21: 03: 02.000Z", "Name": "examplebucket" }, { "CreationDate": "2011-07-24T19: 33: 50.000Z", "Name": "examplebucket2" }, { "CreationDate": "2010-12-17T00: 56: 49.000Z", "Name": "examplebucket3" } ], "Owner": { "DisplayName": "own-display-name", "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31" } } */ // example id: to-list-object-versions-1481910996058
Returns a list of all buckets owned by the authenticated sender of the request. To use this operation, you must have the
s3:ListAllMyBuckets
permission.Example
Use a bare-bones client and the command you need to make an API call.
See
input
shape.response
shape.config
shape.Example
To list object versions