Skip to content

Commit e7f10a2

Browse files
author
awstools
committed
feat(client-s3): Add support for the new optional bucket-region and prefix query parameters in the ListBuckets API. For ListBuckets requests that express pagination, Amazon S3 will now return both the bucket names and associated AWS regions in the response.
1 parent 7e7e222 commit e7f10a2

11 files changed

+181
-129
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export interface CreateSessionCommandOutput extends CreateSessionOutput, __Metad
103103
* To encrypt new objects in a directory bucket with SSE-KMS, you must specify SSE-KMS as the directory bucket's default encryption configuration with a KMS key (specifically, a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk">customer managed key</a>). Then, when a session is created for Zonal endpoint API operations, new objects are automatically encrypted and decrypted with SSE-KMS and S3 Bucket Keys during the session.</p>
104104
* <note>
105105
* <p>
106-
* Only 1 <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk">customer managed key</a> is supported per directory bucket for the lifetime of the bucket. <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk">Amazon Web Services managed key</a> (<code>aws/s3</code>) isn't supported.
106+
* Only 1 <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk">customer managed key</a> is supported per directory bucket for the lifetime of the bucket. The <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk">Amazon Web Services managed key</a> (<code>aws/s3</code>) isn't supported.
107107
* After you specify SSE-KMS as your bucket's default encryption configuration with a customer managed key, you can't change the customer managed key for the bucket's SSE-KMS configuration.
108108
* </p>
109109
* </note>

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

+41-50
Original file line numberDiff line numberDiff line change
@@ -29,87 +29,78 @@ export interface DeleteObjectCommandInput extends DeleteObjectRequest {}
2929
export interface DeleteObjectCommandOutput extends DeleteObjectOutput, __MetadataBearer {}
3030

3131
/**
32-
* <p>Removes an object from a bucket. The behavior depends on the bucket's versioning state: </p>
33-
* <ul>
34-
* <li>
35-
* <p>If bucket versioning is not enabled, the operation permanently deletes the object.</p>
36-
* </li>
37-
* <li>
38-
* <p>If bucket versioning is enabled, the operation inserts a delete marker, which becomes the current version of the object. To permanently delete an object in a versioned bucket, you must include the object’s <code>versionId</code> in the request. For more information about versioning-enabled buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/DeletingObjectVersions.html">Deleting object versions from a versioning-enabled bucket</a>.</p>
39-
* </li>
40-
* <li>
41-
* <p>If bucket versioning is suspended, the operation removes the object that has a null <code>versionId</code>, if there is one, and inserts a delete marker that becomes the current version of the object. If there isn't an object with a null <code>versionId</code>, and all versions of the object have a <code>versionId</code>, Amazon S3 does not remove the object and only inserts a delete marker. To permanently delete an object that has a <code>versionId</code>, you must include the object’s <code>versionId</code> in the request. For more information about versioning-suspended buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/DeletingObjectsfromVersioningSuspendedBuckets.html">Deleting objects from versioning-suspended buckets</a>.</p>
42-
* </li>
43-
* </ul>
32+
* <p>Removes an object from a bucket. The behavior depends on the bucket's versioning state.
33+
* For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/DeletingObjects.html#DeletingObjects-best-practices">Best
34+
* practices to consider before deleting an object</a>.</p>
35+
* <p>To remove a specific version, you must use the <code>versionId</code> query parameter.
36+
* Using this query parameter permanently deletes the version. If the object deleted is a
37+
* delete marker, Amazon S3 sets the response header <code>x-amz-delete-marker</code> to true. If
38+
* the object you want to delete is in a bucket where the bucket versioning configuration is
39+
* MFA delete enabled, you must include the <code>x-amz-mfa</code> request header in the
40+
* DELETE <code>versionId</code> request. Requests that include <code>x-amz-mfa</code> must
41+
* use HTTPS. For more information about MFA delete and to see example requests, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMFADelete.html">Using MFA
42+
* delete</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectDELETE.html#ExampleVersionObjectDelete">Sample
43+
* request</a> in the <i>Amazon S3 User Guide</i>.</p>
4444
* <note>
4545
* <ul>
4646
* <li>
47-
* <p>
48-
* <b>Directory buckets</b> - S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the <code>null</code> value of the version ID is supported by directory buckets. You can only specify <code>null</code>
49-
* to the <code>versionId</code> query parameter in the request.</p>
47+
* <p>S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the <code>null</code> value of the version ID is supported by directory buckets. You can only specify <code>null</code> to the
48+
* <code>versionId</code> query parameter in the request.</p>
5049
* </li>
5150
* <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>
51+
* <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>
5452
* </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
5553
* <i>Amazon S3 User Guide</i>.</p>
5654
* </li>
55+
* <li>
56+
* <p>MFA delete is not supported by directory buckets.</p>
57+
* </li>
5758
* </ul>
5859
* </note>
59-
* <p>To remove a specific version, you must use the <code>versionId</code> query parameter. Using this
60-
* query parameter permanently deletes the version. If the object deleted is a delete marker, Amazon S3
61-
* sets the response header <code>x-amz-delete-marker</code> to true. </p>
62-
* <p>If the object you want to delete is in a bucket where the bucket versioning
63-
* configuration is MFA Delete enabled, you must include the <code>x-amz-mfa</code> request
64-
* header in the DELETE <code>versionId</code> request. Requests that include
65-
* <code>x-amz-mfa</code> must use HTTPS. For more information about MFA Delete, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMFADelete.html">Using MFA Delete</a> in the <i>Amazon S3
66-
* User Guide</i>. To see sample
67-
* requests that use versioning, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectDELETE.html#ExampleVersionObjectDelete">Sample
68-
* Request</a>. </p>
69-
* <note>
70-
* <p>
71-
* <b>Directory buckets</b> - MFA delete is not supported by directory buckets.</p>
72-
* </note>
73-
* <p>You can delete objects by explicitly calling DELETE Object or calling
74-
* (<a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html">PutBucketLifecycle</a>) to enable Amazon S3 to remove them for you. If you want to block
75-
* users or accounts from removing or deleting objects from your bucket, you must deny them
76-
* the <code>s3:DeleteObject</code>, <code>s3:DeleteObjectVersion</code>, and
77-
* <code>s3:PutLifeCycleConfiguration</code> actions. </p>
78-
* <note>
79-
* <p>
80-
* <b>Directory buckets</b> - S3 Lifecycle is not supported by directory buckets.</p>
81-
* </note>
8260
* <dl>
8361
* <dt>Permissions</dt>
8462
* <dd>
8563
* <ul>
8664
* <li>
8765
* <p>
88-
* <b>General purpose bucket permissions</b> - The following permissions are required in your policies when your
89-
* <code>DeleteObjects</code> request includes specific headers.</p>
66+
* <b>General purpose bucket permissions</b> - The
67+
* following permissions are required in your policies when your
68+
* <code>DeleteObjects</code> request includes specific headers.</p>
9069
* <ul>
9170
* <li>
9271
* <p>
9372
* <b>
9473
* <code>s3:DeleteObject</code>
95-
* </b> - To delete an object from a bucket, you must always have the <code>s3:DeleteObject</code> permission.</p>
74+
* </b>
75+
* - To delete an object from a bucket, you must always have the
76+
* <code>s3:DeleteObject</code> permission.</p>
77+
* <note>
78+
* <p>You can also use <a>PutBucketLifecycle</a> to delete
79+
* objects in Amazon S3.</p>
80+
* </note>
9681
* </li>
9782
* <li>
9883
* <p>
9984
* <b>
10085
* <code>s3:DeleteObjectVersion</code>
101-
* </b> - To delete a specific version of an object from a versioning-enabled bucket, you must have the <code>s3:DeleteObjectVersion</code> permission.</p>
86+
* </b> - To delete a specific version of an object from a
87+
* versioning-enabled bucket, you must have the
88+
* <code>s3:DeleteObjectVersion</code> permission.</p>
89+
* </li>
90+
* <li>
91+
* <p>If you want to block users or accounts from removing or deleting
92+
* objects from your bucket, you must deny them the
93+
* <code>s3:DeleteObject</code>, <code>s3:DeleteObjectVersion</code>,
94+
* and <code>s3:PutLifeCycleConfiguration</code> permissions.</p>
10295
* </li>
10396
* </ul>
10497
* </li>
10598
* <li>
10699
* <p>
107-
* <b>Directory bucket permissions</b> - To grant access to this API operation on a directory bucket, we recommend that you use the <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html">
108-
* <code>CreateSession</code>
109-
* </a> API operation for session-based authorization. Specifically, you grant the <code>s3express:CreateSession</code> permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the <code>CreateSession</code> API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another <code>CreateSession</code> API call to generate a new session token for use.
110-
* Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html">
111-
* <code>CreateSession</code>
112-
* </a>.</p>
100+
* <b>Directory buckets permissions</b> -
101+
* To grant access to this API operation on a directory bucket, we recommend
102+
* that you use the <a>CreateSession</a> API operation for
103+
* session-based authorization.</p>
113104
* </li>
114105
* </ul>
115106
* </dd>

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

+4
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ export interface ListBucketsCommandOutput extends ListBucketsOutput, __MetadataB
4545
* const input = { // ListBucketsRequest
4646
* MaxBuckets: Number("int"),
4747
* ContinuationToken: "STRING_VALUE",
48+
* Prefix: "STRING_VALUE",
49+
* BucketRegion: "STRING_VALUE",
4850
* };
4951
* const command = new ListBucketsCommand(input);
5052
* const response = await client.send(command);
@@ -53,13 +55,15 @@ export interface ListBucketsCommandOutput extends ListBucketsOutput, __MetadataB
5355
* // { // Bucket
5456
* // Name: "STRING_VALUE",
5557
* // CreationDate: new Date("TIMESTAMP"),
58+
* // BucketRegion: "STRING_VALUE",
5659
* // },
5760
* // ],
5861
* // Owner: { // Owner
5962
* // DisplayName: "STRING_VALUE",
6063
* // ID: "STRING_VALUE",
6164
* // },
6265
* // ContinuationToken: "STRING_VALUE",
66+
* // Prefix: "STRING_VALUE",
6367
* // };
6468
*
6569
* ```

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

+1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ export interface ListDirectoryBucketsCommandOutput extends ListDirectoryBucketsO
6565
* // { // Bucket
6666
* // Name: "STRING_VALUE",
6767
* // CreationDate: new Date("TIMESTAMP"),
68+
* // BucketRegion: "STRING_VALUE",
6869
* // },
6970
* // ],
7071
* // ContinuationToken: "STRING_VALUE",

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export interface PutBucketEncryptionCommandOutput extends __MetadataBearer {}
7575
* </li>
7676
* <li>
7777
* <p>Your SSE-KMS configuration can only support 1 <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk">customer managed key</a> per directory bucket for the lifetime of the bucket.
78-
* <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk">Amazon Web Services managed key</a> (<code>aws/s3</code>) isn't supported.
78+
* The <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk">Amazon Web Services managed key</a> (<code>aws/s3</code>) isn't supported.
7979
* </p>
8080
* </li>
8181
* <li>

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

-4
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@ export interface RestoreObjectCommandOutput extends RestoreObjectOutput, __Metad
3333
* <note>
3434
* <p>This operation is not supported by directory buckets.</p>
3535
* </note>
36-
* <important>
37-
* <p>The <code>SELECT</code> job type for the RestoreObject operation is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. <a href="http://aws.amazon.com/blogs/storage/how-to-optimize-querying-your-data-in-amazon-s3/">Learn more</a>
38-
* </p>
39-
* </important>
4036
* <p>Restores an archived copy of an object back into Amazon S3</p>
4137
* <p>This functionality is not supported for Amazon S3 on Outposts.</p>
4238
* <p>This action performs the following types of requests: </p>

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

-4
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,6 @@ export interface SelectObjectContentCommandOutput extends SelectObjectContentOut
3838
* <note>
3939
* <p>This operation is not supported by directory buckets.</p>
4040
* </note>
41-
* <important>
42-
* <p>The SelectObjectContent operation is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the operation as usual. <a href="http://aws.amazon.com/blogs/storage/how-to-optimize-querying-your-data-in-amazon-s3/">Learn more</a>
43-
* </p>
44-
* </important>
4541
* <p>This action filters the contents of an Amazon S3 object based on a simple structured query
4642
* language (SQL) statement. In the request, along with the SQL expression, you must also
4743
* specify a data serialization format (JSON, CSV, or Apache Parquet) of the object. Amazon S3 uses

0 commit comments

Comments
 (0)