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.
s3:ListAllMyBuckets
Use a bare-bones client and the command you need to make an API call.
import { S3Client, ListBucketsCommand } from "@aws-sdk/client-s3"; // ES Modules import // const { S3Client, ListBucketsCommand } = require("@aws-sdk/client-s3"); // CommonJS import const client = new S3Client(config); const command = new ListBucketsCommand(input); const response = await client.send(command);
ListBucketsCommandInput for command's input shape.
input
ListBucketsCommandOutput for command's response shape.
response
config for S3Client's config shape.
config
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.Use a bare-bones client and the command you need to make an API call.
import { S3Client, ListBucketsCommand } from "@aws-sdk/client-s3"; // ES Modules import // const { S3Client, ListBucketsCommand } = require("@aws-sdk/client-s3"); // CommonJS import const client = new S3Client(config); const command = new ListBucketsCommand(input); const response = await client.send(command);
ListBucketsCommandInput for command's
input
shape.ListBucketsCommandOutput for command's
response
shape.config for S3Client's
config
shape.