Skip to content

Commit f31c6ea

Browse files
author
awstools
committed
feat(client-s3): Amazon Simple Storage Service / Features : Adds support for pagination in the S3 ListBuckets API.
1 parent 62c6973 commit f31c6ea

16 files changed

+404
-175
lines changed

clients/client-s3/src/commands/AbortMultipartUploadCommand.ts

+17-3
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,24 @@ export interface AbortMultipartUploadCommandOutput extends AbortMultipartUploadO
3939
* storage, you should call the <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html">ListParts</a> API operation and ensure that
4040
* the parts list is empty.</p>
4141
* <note>
42-
* <p>
43-
* <b>Directory buckets</b> - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format <code>https://<i>bucket_name</i>.s3express-<i>az_id</i>.<i>region</i>.amazonaws.com/<i>key-name</i>
44-
* </code>. Path-style requests are not supported. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html">Regional and Zonal endpoints</a> in the
42+
* <ul>
43+
* <li>
44+
* <p>
45+
* <b>Directory buckets</b> -
46+
* If multipart uploads in a directory bucket are in progress, you can't delete the bucket until all the in-progress multipart uploads are aborted or completed.
47+
* To delete these in-progress multipart uploads, use the
48+
* <code>ListMultipartUploads</code> operation to list the in-progress multipart
49+
* uploads in the bucket and use the <code>AbortMultupartUpload</code> operation to
50+
* abort all the in-progress multipart uploads.
51+
* </p>
52+
* </li>
53+
* <li>
54+
* <p>
55+
* <b>Directory buckets</b> - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format <code>https://<i>bucket_name</i>.s3express-<i>az_id</i>.<i>region</i>.amazonaws.com/<i>key-name</i>
56+
* </code>. Path-style requests are not supported. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html">Regional and Zonal endpoints</a> in the
4557
* <i>Amazon S3 User Guide</i>.</p>
58+
* </li>
59+
* </ul>
4660
* </note>
4761
* <dl>
4862
* <dt>Permissions</dt>

clients/client-s3/src/commands/CopyObjectCommand.ts

+13-3
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,20 @@ export interface CopyObjectCommandOutput extends CopyObjectOutput, __MetadataBea
4646
* <p>You can copy individual objects between general purpose buckets, between directory buckets, and
4747
* between general purpose buckets and directory buckets.</p>
4848
* <note>
49-
* <p>
50-
* <b>Directory buckets </b> - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format <code>https://<i>bucket_name</i>.s3express-<i>az_id</i>.<i>region</i>.amazonaws.com/<i>key-name</i>
51-
* </code>. Path-style requests are not supported. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html">Regional and Zonal endpoints</a> in the
49+
* <ul>
50+
* <li>
51+
* <p>Amazon S3 supports copy operations using Multi-Region Access Points only as a destination when using the Multi-Region Access Point ARN. </p>
52+
* </li>
53+
* <li>
54+
* <p>
55+
* <b>Directory buckets </b> - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format <code>https://<i>bucket_name</i>.s3express-<i>az_id</i>.<i>region</i>.amazonaws.com/<i>key-name</i>
56+
* </code>. Path-style requests are not supported. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html">Regional and Zonal endpoints</a> in the
5257
* <i>Amazon S3 User Guide</i>.</p>
58+
* </li>
59+
* <li>
60+
* <p>VPC endpoints don't support cross-Region requests (including copies). If you're using VPC endpoints, your source and destination buckets should be in the same Amazon Web Services Region as your VPC endpoint.</p>
61+
* </li>
62+
* </ul>
5363
* </note>
5464
* <p>Both the
5565
* Region that you want to copy the object from and the Region that you want to copy the

clients/client-s3/src/commands/HeadBucketCommand.ts

+9-7
Original file line numberDiff line numberDiff line change
@@ -31,22 +31,20 @@ export interface HeadBucketCommandOutput extends HeadBucketOutput, __MetadataBea
3131
/**
3232
* <p>You can use this operation to determine if a bucket exists and if you have permission to access it. The action returns a <code>200 OK</code> if the bucket exists and you have permission
3333
* to access it.</p>
34-
* <p>If the bucket does not exist or you do not have permission to access it, the
34+
* <note>
35+
* <p>If the bucket does not exist or you do not have permission to access it, the
3536
* <code>HEAD</code> request returns a generic <code>400 Bad Request</code>, <code>403
3637
* Forbidden</code> or <code>404 Not Found</code> code. A message body is not included, so
3738
* you cannot determine the exception beyond these HTTP response codes.</p>
38-
* <note>
39-
* <p>
40-
* <b>Directory buckets </b> - You must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format <code>https://<i>bucket_name</i>.s3express-<i>az_id</i>.<i>region</i>.amazonaws.com</code>. Path-style requests are not supported. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html">Regional and Zonal endpoints</a> in the
41-
* <i>Amazon S3 User Guide</i>.</p>
4239
* </note>
4340
* <dl>
4441
* <dt>Authentication and authorization</dt>
4542
* <dd>
46-
* <p>All <code>HeadBucket</code> requests must be authenticated and signed by using IAM credentials (access key ID and secret access key for the IAM identities). All headers with the <code>x-amz-</code> prefix, including
43+
* <p>
44+
* <b>General purpose buckets</b> - Request to public buckets that grant the s3:ListBucket permission publicly do not need to be signed. All other <code>HeadBucket</code> requests must be authenticated and signed by using IAM credentials (access key ID and secret access key for the IAM identities). All headers with the <code>x-amz-</code> prefix, including
4745
* <code>x-amz-copy-source</code>, must be signed. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html">REST Authentication</a>.</p>
4846
* <p>
49-
* <b>Directory bucket</b> - You must use IAM credentials to authenticate and authorize your access to the <code>HeadBucket</code> API operation, instead of using the
47+
* <b>Directory buckets</b> - You must use IAM credentials to authenticate and authorize your access to the <code>HeadBucket</code> API operation, instead of using the
5048
* temporary security credentials through the <code>CreateSession</code> API operation.</p>
5149
* <p>Amazon Web Services CLI or SDKs handles authentication and authorization on your behalf.</p>
5250
* </dd>
@@ -77,6 +75,10 @@ export interface HeadBucketCommandOutput extends HeadBucketOutput, __MetadataBea
7775
* <p>
7876
* <b>Directory buckets </b> - The HTTP Host header syntax is <code>
7977
* <i>Bucket_name</i>.s3express-<i>az_id</i>.<i>region</i>.amazonaws.com</code>.</p>
78+
* <note>
79+
* <p>You must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format <code>https://<i>bucket_name</i>.s3express-<i>az_id</i>.<i>region</i>.amazonaws.com</code>. Path-style requests are not supported. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html">Regional and Zonal endpoints</a> in the
80+
* <i>Amazon S3 User Guide</i>.</p>
81+
* </note>
8082
* </dd>
8183
* </dl>
8284
* @example

clients/client-s3/src/commands/HeadObjectCommand.ts

+8-7
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,16 @@ export interface HeadObjectCommandOutput extends HeadObjectOutput, __MetadataBea
3737
/**
3838
* <p>The <code>HEAD</code> operation retrieves metadata from an object without returning the
3939
* object itself. This operation is useful if you're interested only in an object's metadata.</p>
40-
* <p>A <code>HEAD</code> request has the same options as a <code>GET</code> operation on an
40+
* <note>
41+
* <p>A <code>HEAD</code> request has the same options as a <code>GET</code> operation on an
4142
* object. The response is identical to the <code>GET</code> response except that there is no
4243
* response body. Because of this, if the <code>HEAD</code> request generates an error, it
4344
* returns a generic code, such as <code>400 Bad Request</code>, <code>403 Forbidden</code>, <code>404 Not
4445
* Found</code>, <code>405 Method Not Allowed</code>, <code>412 Precondition Failed</code>, or <code>304 Not Modified</code>.
4546
* It's not possible to retrieve the exact exception of these error codes.</p>
47+
* </note>
4648
* <p>Request headers are limited to 8 KB in size. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/RESTCommonRequestHeaders.html">Common
4749
* Request Headers</a>.</p>
48-
* <note>
49-
* <p>
50-
* <b>Directory buckets</b> - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format <code>https://<i>bucket_name</i>.s3express-<i>az_id</i>.<i>region</i>.amazonaws.com/<i>key-name</i>
51-
* </code>. Path-style requests are not supported. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html">Regional and Zonal endpoints</a> in the
52-
* <i>Amazon S3 User Guide</i>.</p>
53-
* </note>
5450
* <dl>
5551
* <dt>Permissions</dt>
5652
* <dd>
@@ -155,6 +151,11 @@ export interface HeadObjectCommandOutput extends HeadObjectOutput, __MetadataBea
155151
* <p>
156152
* <b>Directory buckets </b> - The HTTP Host header syntax is <code>
157153
* <i>Bucket_name</i>.s3express-<i>az_id</i>.<i>region</i>.amazonaws.com</code>.</p>
154+
* <note>
155+
* <p>For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format <code>https://<i>bucket_name</i>.s3express-<i>az_id</i>.<i>region</i>.amazonaws.com/<i>key-name</i>
156+
* </code>. Path-style requests are not supported. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html">Regional and Zonal endpoints</a> in the
157+
* <i>Amazon S3 User Guide</i>.</p>
158+
* </note>
158159
* </dd>
159160
* </dl>
160161
* <p>The following actions are related to <code>HeadObject</code>:</p>

clients/client-s3/src/commands/ListBucketsCommand.ts

+7-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { Command as $Command } from "@smithy/smithy-client";
66
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
77

88
import { commonParams } from "../endpoint/EndpointParameters";
9-
import { ListBucketsOutput } from "../models/models_0";
9+
import { ListBucketsOutput, ListBucketsRequest } from "../models/models_0";
1010
import { de_ListBucketsCommand, se_ListBucketsCommand } from "../protocols/Aws_restXml";
1111
import { S3ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../S3Client";
1212

@@ -20,7 +20,7 @@ export { $Command };
2020
*
2121
* The input for {@link ListBucketsCommand}.
2222
*/
23-
export interface ListBucketsCommandInput {}
23+
export interface ListBucketsCommandInput extends ListBucketsRequest {}
2424
/**
2525
* @public
2626
*
@@ -42,7 +42,10 @@ export interface ListBucketsCommandOutput extends ListBucketsOutput, __MetadataB
4242
* import { S3Client, ListBucketsCommand } from "@aws-sdk/client-s3"; // ES Modules import
4343
* // const { S3Client, ListBucketsCommand } = require("@aws-sdk/client-s3"); // CommonJS import
4444
* const client = new S3Client(config);
45-
* const input = {};
45+
* const input = { // ListBucketsRequest
46+
* MaxBuckets: Number("int"),
47+
* ContinuationToken: "STRING_VALUE",
48+
* };
4649
* const command = new ListBucketsCommand(input);
4750
* const response = await client.send(command);
4851
* // { // ListBucketsOutput
@@ -56,6 +59,7 @@ export interface ListBucketsCommandOutput extends ListBucketsOutput, __MetadataB
5659
* // DisplayName: "STRING_VALUE",
5760
* // ID: "STRING_VALUE",
5861
* // },
62+
* // ContinuationToken: "STRING_VALUE",
5963
* // };
6064
*
6165
* ```

clients/client-s3/src/commands/ListMultipartUploadsCommand.ts

+2
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ export interface ListMultipartUploadsCommandOutput extends ListMultipartUploadsO
3636
* <p>
3737
* <b>Directory buckets</b> -
3838
* If multipart uploads in a directory bucket are in progress, you can't delete the bucket until all the in-progress multipart uploads are aborted or completed.
39+
* To delete these in-progress multipart uploads, use the <code>ListMultipartUploads</code> operation to list the in-progress multipart
40+
* uploads in the bucket and use the <code>AbortMultupartUpload</code> operation to abort all the in-progress multipart uploads.
3941
* </p>
4042
* </note>
4143
* <p>The <code>ListMultipartUploads</code> operation returns a maximum of 1,000 multipart uploads in the response. The limit of 1,000 multipart

clients/client-s3/src/commands/ListObjectsV2Command.ts

+17-3
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,24 @@ export interface ListObjectsV2CommandOutput extends ListObjectsV2Output, __Metad
3737
* For more information about listing objects, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/ListingKeysUsingAPIs.html">Listing object keys
3838
* programmatically</a> in the <i>Amazon S3 User Guide</i>. To get a list of your buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html">ListBuckets</a>.</p>
3939
* <note>
40-
* <p>
41-
* <b>Directory buckets</b> - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format <code>https://<i>bucket_name</i>.s3express-<i>az_id</i>.<i>region</i>.amazonaws.com/<i>key-name</i>
42-
* </code>. Path-style requests are not supported. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html">Regional and Zonal endpoints</a> in the
40+
* <ul>
41+
* <li>
42+
* <p>
43+
* <b>General purpose bucket</b> - For general purpose buckets, <code>ListObjectsV2</code> doesn't return prefixes that are related only to in-progress multipart uploads.</p>
44+
* </li>
45+
* <li>
46+
* <p>
47+
* <b>Directory buckets</b> -
48+
* For directory buckets, <code>ListObjectsV2</code> response includes the prefixes that are related only to in-progress multipart uploads.
49+
* </p>
50+
* </li>
51+
* <li>
52+
* <p>
53+
* <b>Directory buckets</b> - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format <code>https://<i>bucket_name</i>.s3express-<i>az_id</i>.<i>region</i>.amazonaws.com/<i>key-name</i>
54+
* </code>. Path-style requests are not supported. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html">Regional and Zonal endpoints</a> in the
4355
* <i>Amazon S3 User Guide</i>.</p>
56+
* </li>
57+
* </ul>
4458
* </note>
4559
* <dl>
4660
* <dt>Permissions</dt>

clients/client-s3/src/commands/PutBucketEncryptionCommand.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,11 @@ export interface PutBucketEncryptionCommandOutput extends __MetadataBearer {}
4141
* SSE-KMS, you can also configure <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html">Amazon S3 Bucket
4242
* Keys</a>. If you use PutBucketEncryption to set your <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html">default bucket encryption</a> to SSE-KMS, you should verify that your KMS key ID is correct. Amazon S3 does not validate the KMS key ID provided in PutBucketEncryption requests.</p>
4343
* <important>
44-
* <p>This action requires Amazon Web Services Signature Version 4. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html">
44+
* <p>If you're specifying a customer managed KMS key, we recommend using a fully qualified
45+
* KMS key ARN. If you use a KMS key alias instead, then KMS resolves the key within the
46+
* requester’s account. This behavior can result in data that's encrypted with a KMS key
47+
* that belongs to the requester, and not the bucket owner.</p>
48+
* <p>Also, this action requires Amazon Web Services Signature Version 4. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html">
4549
* Authenticating Requests (Amazon Web Services Signature Version 4)</a>. </p>
4650
* </important>
4751
* <p>To use this operation, you must have permission to perform the

clients/client-s3/src/commands/PutBucketPolicyCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { Command as $Command } from "@smithy/smithy-client";
66
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
77

88
import { commonParams } from "../endpoint/EndpointParameters";
9-
import { PutBucketPolicyRequest } from "../models/models_0";
9+
import { PutBucketPolicyRequest } from "../models/models_1";
1010
import { de_PutBucketPolicyCommand, se_PutBucketPolicyCommand } from "../protocols/Aws_restXml";
1111
import { S3ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../S3Client";
1212

clients/client-s3/src/commands/PutBucketVersioningCommand.ts

+9
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,15 @@ export interface PutBucketVersioningCommandOutput extends __MetadataBearer {}
3232
* <note>
3333
* <p>This operation is not supported by directory buckets.</p>
3434
* </note>
35+
* <note>
36+
* <p>When you enable versioning on a bucket for the first time, it might take a short
37+
* amount of time for the change to be fully propagated. We recommend that you wait for 15
38+
* minutes after enabling versioning before issuing write operations
39+
* (<code>PUT</code>
40+
* or
41+
* <code>DELETE</code>)
42+
* on objects in the bucket. </p>
43+
* </note>
3544
* <p>Sets the versioning state of an existing bucket.</p>
3645
* <p>You can set the versioning state with one of the following values:</p>
3746
* <p>

0 commit comments

Comments
 (0)