@aws-sdk/client-s3 3.352.0 → 3.354.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/protocols/Aws_restXml.js +8 -0
- package/dist-es/protocols/Aws_restXml.js +8 -0
- package/dist-types/commands/CopyObjectCommand.d.ts +26 -23
- package/dist-types/commands/CreateBucketCommand.d.ts +45 -116
- package/dist-types/commands/DeleteBucketCorsCommand.d.ts +3 -1
- package/dist-types/commands/DeleteObjectTaggingCommand.d.ts +11 -11
- package/dist-types/commands/DeleteObjectsCommand.d.ts +22 -22
- package/dist-types/commands/GetBucketAccelerateConfigurationCommand.d.ts +2 -0
- package/dist-types/commands/GetBucketEncryptionCommand.d.ts +3 -3
- package/dist-types/commands/GetObjectCommand.d.ts +48 -47
- package/dist-types/commands/HeadObjectCommand.d.ts +19 -12
- package/dist-types/commands/ListMultipartUploadsCommand.d.ts +2 -0
- package/dist-types/commands/ListObjectVersionsCommand.d.ts +2 -0
- package/dist-types/commands/ListObjectsCommand.d.ts +1 -0
- package/dist-types/commands/ListObjectsV2Command.d.ts +1 -0
- package/dist-types/commands/PutBucketAclCommand.d.ts +1 -1
- package/dist-types/commands/PutBucketEncryptionCommand.d.ts +11 -10
- package/dist-types/commands/PutBucketLifecycleConfigurationCommand.d.ts +3 -3
- package/dist-types/commands/PutBucketLoggingCommand.d.ts +7 -6
- package/dist-types/commands/PutBucketMetricsConfigurationCommand.d.ts +1 -1
- package/dist-types/commands/PutBucketNotificationConfigurationCommand.d.ts +1 -1
- package/dist-types/commands/PutObjectCommand.d.ts +51 -50
- package/dist-types/commands/RestoreObjectCommand.d.ts +5 -5
- package/dist-types/commands/SelectObjectContentCommand.d.ts +9 -4
- package/dist-types/commands/UploadPartCopyCommand.d.ts +13 -13
- package/dist-types/models/models_0.d.ts +107 -56
- package/dist-types/models/models_1.d.ts +9 -9
- package/dist-types/ts3.4/models/models_0.d.ts +8 -0
- package/package.json +15 -15
|
@@ -684,6 +684,7 @@ const se_GetBucketAccelerateConfigurationCommand = async (input, context) => {
|
|
|
684
684
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
685
685
|
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
|
|
686
686
|
"x-amz-expected-bucket-owner": input.ExpectedBucketOwner,
|
|
687
|
+
"x-amz-request-payer": input.RequestPayer,
|
|
687
688
|
});
|
|
688
689
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/";
|
|
689
690
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false);
|
|
@@ -1588,6 +1589,7 @@ const se_ListMultipartUploadsCommand = async (input, context) => {
|
|
|
1588
1589
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1589
1590
|
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
|
|
1590
1591
|
"x-amz-expected-bucket-owner": input.ExpectedBucketOwner,
|
|
1592
|
+
"x-amz-request-payer": input.RequestPayer,
|
|
1591
1593
|
});
|
|
1592
1594
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/";
|
|
1593
1595
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false);
|
|
@@ -1676,6 +1678,7 @@ const se_ListObjectVersionsCommand = async (input, context) => {
|
|
|
1676
1678
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1677
1679
|
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
|
|
1678
1680
|
"x-amz-expected-bucket-owner": input.ExpectedBucketOwner,
|
|
1681
|
+
"x-amz-request-payer": input.RequestPayer,
|
|
1679
1682
|
});
|
|
1680
1683
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/";
|
|
1681
1684
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false);
|
|
@@ -3649,6 +3652,7 @@ const de_GetBucketAccelerateConfigurationCommand = async (output, context) => {
|
|
|
3649
3652
|
}
|
|
3650
3653
|
const contents = (0, smithy_client_1.map)({
|
|
3651
3654
|
$metadata: deserializeMetadata(output),
|
|
3655
|
+
RequestCharged: [, output.headers["x-amz-request-charged"]],
|
|
3652
3656
|
});
|
|
3653
3657
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
3654
3658
|
if (data["Status"] !== undefined) {
|
|
@@ -4892,6 +4896,7 @@ const de_ListMultipartUploadsCommand = async (output, context) => {
|
|
|
4892
4896
|
}
|
|
4893
4897
|
const contents = (0, smithy_client_1.map)({
|
|
4894
4898
|
$metadata: deserializeMetadata(output),
|
|
4899
|
+
RequestCharged: [, output.headers["x-amz-request-charged"]],
|
|
4895
4900
|
});
|
|
4896
4901
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
4897
4902
|
if (data["Bucket"] !== undefined) {
|
|
@@ -4958,6 +4963,7 @@ const de_ListObjectsCommand = async (output, context) => {
|
|
|
4958
4963
|
}
|
|
4959
4964
|
const contents = (0, smithy_client_1.map)({
|
|
4960
4965
|
$metadata: deserializeMetadata(output),
|
|
4966
|
+
RequestCharged: [, output.headers["x-amz-request-charged"]],
|
|
4961
4967
|
});
|
|
4962
4968
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
4963
4969
|
if (data.CommonPrefixes === "") {
|
|
@@ -5024,6 +5030,7 @@ const de_ListObjectsV2Command = async (output, context) => {
|
|
|
5024
5030
|
}
|
|
5025
5031
|
const contents = (0, smithy_client_1.map)({
|
|
5026
5032
|
$metadata: deserializeMetadata(output),
|
|
5033
|
+
RequestCharged: [, output.headers["x-amz-request-charged"]],
|
|
5027
5034
|
});
|
|
5028
5035
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
5029
5036
|
if (data.CommonPrefixes === "") {
|
|
@@ -5096,6 +5103,7 @@ const de_ListObjectVersionsCommand = async (output, context) => {
|
|
|
5096
5103
|
}
|
|
5097
5104
|
const contents = (0, smithy_client_1.map)({
|
|
5098
5105
|
$metadata: deserializeMetadata(output),
|
|
5106
|
+
RequestCharged: [, output.headers["x-amz-request-charged"]],
|
|
5099
5107
|
});
|
|
5100
5108
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
5101
5109
|
if (data.CommonPrefixes === "") {
|
|
@@ -656,6 +656,7 @@ export const se_GetBucketAccelerateConfigurationCommand = async (input, context)
|
|
|
656
656
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
657
657
|
const headers = map({}, isSerializableHeaderValue, {
|
|
658
658
|
"x-amz-expected-bucket-owner": input.ExpectedBucketOwner,
|
|
659
|
+
"x-amz-request-payer": input.RequestPayer,
|
|
659
660
|
});
|
|
660
661
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/";
|
|
661
662
|
resolvedPath = __resolvedPath(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false);
|
|
@@ -1524,6 +1525,7 @@ export const se_ListMultipartUploadsCommand = async (input, context) => {
|
|
|
1524
1525
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1525
1526
|
const headers = map({}, isSerializableHeaderValue, {
|
|
1526
1527
|
"x-amz-expected-bucket-owner": input.ExpectedBucketOwner,
|
|
1528
|
+
"x-amz-request-payer": input.RequestPayer,
|
|
1527
1529
|
});
|
|
1528
1530
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/";
|
|
1529
1531
|
resolvedPath = __resolvedPath(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false);
|
|
@@ -1609,6 +1611,7 @@ export const se_ListObjectVersionsCommand = async (input, context) => {
|
|
|
1609
1611
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1610
1612
|
const headers = map({}, isSerializableHeaderValue, {
|
|
1611
1613
|
"x-amz-expected-bucket-owner": input.ExpectedBucketOwner,
|
|
1614
|
+
"x-amz-request-payer": input.RequestPayer,
|
|
1612
1615
|
});
|
|
1613
1616
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/";
|
|
1614
1617
|
resolvedPath = __resolvedPath(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false);
|
|
@@ -3528,6 +3531,7 @@ export const de_GetBucketAccelerateConfigurationCommand = async (output, context
|
|
|
3528
3531
|
}
|
|
3529
3532
|
const contents = map({
|
|
3530
3533
|
$metadata: deserializeMetadata(output),
|
|
3534
|
+
RequestCharged: [, output.headers["x-amz-request-charged"]],
|
|
3531
3535
|
});
|
|
3532
3536
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
3533
3537
|
if (data["Status"] !== undefined) {
|
|
@@ -4735,6 +4739,7 @@ export const de_ListMultipartUploadsCommand = async (output, context) => {
|
|
|
4735
4739
|
}
|
|
4736
4740
|
const contents = map({
|
|
4737
4741
|
$metadata: deserializeMetadata(output),
|
|
4742
|
+
RequestCharged: [, output.headers["x-amz-request-charged"]],
|
|
4738
4743
|
});
|
|
4739
4744
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
4740
4745
|
if (data["Bucket"] !== undefined) {
|
|
@@ -4800,6 +4805,7 @@ export const de_ListObjectsCommand = async (output, context) => {
|
|
|
4800
4805
|
}
|
|
4801
4806
|
const contents = map({
|
|
4802
4807
|
$metadata: deserializeMetadata(output),
|
|
4808
|
+
RequestCharged: [, output.headers["x-amz-request-charged"]],
|
|
4803
4809
|
});
|
|
4804
4810
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
4805
4811
|
if (data.CommonPrefixes === "") {
|
|
@@ -4865,6 +4871,7 @@ export const de_ListObjectsV2Command = async (output, context) => {
|
|
|
4865
4871
|
}
|
|
4866
4872
|
const contents = map({
|
|
4867
4873
|
$metadata: deserializeMetadata(output),
|
|
4874
|
+
RequestCharged: [, output.headers["x-amz-request-charged"]],
|
|
4868
4875
|
});
|
|
4869
4876
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
4870
4877
|
if (data.CommonPrefixes === "") {
|
|
@@ -4936,6 +4943,7 @@ export const de_ListObjectVersionsCommand = async (output, context) => {
|
|
|
4936
4943
|
}
|
|
4937
4944
|
const contents = map({
|
|
4938
4945
|
$metadata: deserializeMetadata(output),
|
|
4946
|
+
RequestCharged: [, output.headers["x-amz-request-charged"]],
|
|
4939
4947
|
});
|
|
4940
4948
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
4941
4949
|
if (data.CommonPrefixes === "") {
|
|
@@ -65,8 +65,8 @@ export interface CopyObjectCommandOutput extends CopyObjectOutput, __MetadataBea
|
|
|
65
65
|
* <dl>
|
|
66
66
|
* <dt>Metadata</dt>
|
|
67
67
|
* <dd>
|
|
68
|
-
* <p>When copying an object, you can preserve all metadata (default) or specify new metadata.
|
|
69
|
-
* However, the ACL is not preserved and is set to private for the user making the request. To
|
|
68
|
+
* <p>When copying an object, you can preserve all metadata (the default) or specify new metadata.
|
|
69
|
+
* However, the access control list (ACL) is not preserved and is set to private for the user making the request. To
|
|
70
70
|
* override the default ACL setting, specify a new ACL when generating a copy request. For
|
|
71
71
|
* more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html">Using ACLs</a>. </p>
|
|
72
72
|
* <p>To specify whether you want the object metadata copied from the source object or
|
|
@@ -147,40 +147,43 @@ export interface CopyObjectCommandOutput extends CopyObjectOutput, __MetadataBea
|
|
|
147
147
|
* <dt>Server-side encryption</dt>
|
|
148
148
|
* <dd>
|
|
149
149
|
* <p>Amazon S3 automatically encrypts all new objects that are copied to an S3 bucket. When
|
|
150
|
-
* copying an object, if you don't specify encryption information in your copy
|
|
151
|
-
* encryption setting of the target object is set to the default
|
|
152
|
-
* the destination bucket. By default, all buckets have a
|
|
153
|
-
* configuration that uses server-side encryption with Amazon S3
|
|
154
|
-
* destination bucket has a default encryption
|
|
155
|
-
* with
|
|
156
|
-
*
|
|
150
|
+
* copying an object, if you don't specify encryption information in your copy
|
|
151
|
+
* request, the encryption setting of the target object is set to the default
|
|
152
|
+
* encryption configuration of the destination bucket. By default, all buckets have a
|
|
153
|
+
* base level of encryption configuration that uses server-side encryption with Amazon S3
|
|
154
|
+
* managed keys (SSE-S3). If the destination bucket has a default encryption
|
|
155
|
+
* configuration that uses server-side encryption with Key Management Service (KMS) keys
|
|
156
|
+
* (SSE-KMS), dual-layer server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), or
|
|
157
|
+
* server-side encryption with customer-provided encryption keys (SSE-C), Amazon S3 uses
|
|
158
|
+
* the corresponding KMS key, or a customer-provided key to encrypt the target
|
|
157
159
|
* object copy.</p>
|
|
158
|
-
* <p>When you perform a CopyObject operation, if you want to use a different type
|
|
160
|
+
* <p>When you perform a <code>CopyObject</code> operation, if you want to use a different type
|
|
159
161
|
* of encryption setting for the target object, you can use other appropriate
|
|
160
162
|
* encryption-related headers to encrypt the target object with a KMS key, an Amazon S3 managed
|
|
161
163
|
* key, or a customer-provided key. With server-side encryption, Amazon S3 encrypts your data as it
|
|
162
|
-
* writes
|
|
164
|
+
* writes your data to disks in its data centers and decrypts the data when you access it. If the
|
|
163
165
|
* encryption setting in your request is different from the default encryption configuration
|
|
164
166
|
* of the destination bucket, the encryption setting in your request takes precedence. If the
|
|
165
167
|
* source object for the copy is stored in Amazon S3 using SSE-C, you must provide the necessary
|
|
166
168
|
* encryption information in your request so that Amazon S3 can decrypt the object for copying. For
|
|
167
169
|
* more information about server-side encryption, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html">Using Server-Side
|
|
168
170
|
* Encryption</a>.</p>
|
|
169
|
-
* <p>If a target object uses SSE-KMS, you can enable an S3 Bucket Key for the
|
|
170
|
-
* more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html">Amazon S3 Bucket Keys</a> in the
|
|
171
|
+
* <p>If a target object uses SSE-KMS, you can enable an S3 Bucket Key for the
|
|
172
|
+
* object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html">Amazon S3 Bucket Keys</a> in the
|
|
173
|
+
* <i>Amazon S3 User Guide</i>.</p>
|
|
171
174
|
* </dd>
|
|
172
175
|
* <dt>Access Control List (ACL)-Specific Request
|
|
173
|
-
*
|
|
176
|
+
* Headers</dt>
|
|
174
177
|
* <dd>
|
|
175
178
|
* <p>When copying an object, you can optionally use headers to grant ACL-based permissions.
|
|
176
179
|
* By default, all objects are private. Only the owner has full access control. When adding a
|
|
177
180
|
* new object, you can grant permissions to individual Amazon Web Services accounts or to predefined groups
|
|
178
|
-
* defined by Amazon S3. These permissions are then added to the ACL on the object. For more
|
|
181
|
+
* that are defined by Amazon S3. These permissions are then added to the ACL on the object. For more
|
|
179
182
|
* information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-using-rest-api.html">Managing ACLs Using the REST
|
|
180
183
|
* API</a>. </p>
|
|
181
184
|
* <p>If the bucket that you're copying objects to uses the bucket owner enforced setting for
|
|
182
185
|
* S3 Object Ownership, ACLs are disabled and no longer affect permissions. Buckets that use
|
|
183
|
-
* this setting only accept PUT requests that don't specify an ACL or PUT requests that
|
|
186
|
+
* this setting only accept <code>PUT</code> requests that don't specify an ACL or <code>PUT</code> requests that
|
|
184
187
|
* specify bucket owner full control ACLs, such as the <code>bucket-owner-full-control</code>
|
|
185
188
|
* canned ACL or an equivalent form of this ACL expressed in the XML format.</p>
|
|
186
189
|
* <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html"> Controlling ownership of
|
|
@@ -193,24 +196,24 @@ export interface CopyObjectCommandOutput extends CopyObjectOutput, __MetadataBea
|
|
|
193
196
|
* <dt>Checksums</dt>
|
|
194
197
|
* <dd>
|
|
195
198
|
* <p>When copying an object, if it has a checksum, that checksum will be copied to the new
|
|
196
|
-
* object by default. When you copy the object over, you
|
|
199
|
+
* object by default. When you copy the object over, you can optionally specify a different
|
|
197
200
|
* checksum algorithm to use with the <code>x-amz-checksum-algorithm</code> header.</p>
|
|
198
201
|
* </dd>
|
|
199
202
|
* <dt>Storage Class Options</dt>
|
|
200
203
|
* <dd>
|
|
201
204
|
* <p>You can use the <code>CopyObject</code> action to change the storage class of an object
|
|
202
|
-
* that is already stored in Amazon S3 using the <code>StorageClass</code> parameter. For more
|
|
205
|
+
* that is already stored in Amazon S3 by using the <code>StorageClass</code> parameter. For more
|
|
203
206
|
* information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html">Storage Classes</a> in the
|
|
204
207
|
* <i>Amazon S3 User Guide</i>.</p>
|
|
205
208
|
* <p>If the source object's storage class is GLACIER, you must restore a copy of
|
|
206
|
-
*
|
|
207
|
-
*
|
|
208
|
-
*
|
|
209
|
-
*
|
|
209
|
+
* this object before you can use it as a source object for the copy operation. For
|
|
210
|
+
* more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html">RestoreObject</a>. For
|
|
211
|
+
* more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjectsExamples.html">Copying
|
|
212
|
+
* Objects</a>.</p>
|
|
210
213
|
* </dd>
|
|
211
214
|
* <dt>Versioning</dt>
|
|
212
215
|
* <dd>
|
|
213
|
-
* <p>By default, <code>x-amz-copy-source</code> identifies the current version of an object
|
|
216
|
+
* <p>By default, <code>x-amz-copy-source</code> header identifies the current version of an object
|
|
214
217
|
* to copy. If the current version is a delete marker, Amazon S3 behaves as if the object was
|
|
215
218
|
* deleted. To copy a different version, use the <code>versionId</code> subresource.</p>
|
|
216
219
|
* <p>If you enable versioning on the target bucket, Amazon S3 generates a unique version ID for
|
|
@@ -38,134 +38,63 @@ export interface CreateBucketCommandOutput extends CreateBucketOutput, __Metadat
|
|
|
38
38
|
* bucket</a>.</p>
|
|
39
39
|
* <note>
|
|
40
40
|
* <p>If you send your create bucket request to the <code>s3.amazonaws.com</code> endpoint,
|
|
41
|
-
* the request goes to the us-east-1 Region. Accordingly, the signature calculations in
|
|
42
|
-
* Signature Version 4 must use us-east-1 as the Region, even if the location constraint in
|
|
41
|
+
* the request goes to the <code>us-east-1</code> Region. Accordingly, the signature calculations in
|
|
42
|
+
* Signature Version 4 must use <code>us-east-1</code> as the Region, even if the location constraint in
|
|
43
43
|
* the request specifies another Region where the bucket is to be created. If you create a
|
|
44
44
|
* bucket in a Region other than US East (N. Virginia), your application must be able to
|
|
45
45
|
* handle 307 redirect. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html">Virtual hosting of
|
|
46
46
|
* buckets</a>.</p>
|
|
47
47
|
* </note>
|
|
48
48
|
* <dl>
|
|
49
|
-
* <dt>Access control lists (ACLs)</dt>
|
|
50
|
-
* <dd>
|
|
51
|
-
* <p>When creating a bucket using this operation, you can optionally configure the bucket ACL
|
|
52
|
-
* to specify the accounts or groups that should be granted specific permissions on the
|
|
53
|
-
* bucket.</p>
|
|
54
|
-
* <important>
|
|
55
|
-
* <p>If your CreateBucket request sets bucket owner enforced for S3 Object Ownership and
|
|
56
|
-
* specifies a bucket ACL that provides access to an external Amazon Web Services account, your request
|
|
57
|
-
* fails with a <code>400</code> error and returns the
|
|
58
|
-
* <code>InvalidBucketAclWithObjectOwnership</code> error code. For more information,
|
|
59
|
-
* see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html">Controlling object
|
|
60
|
-
* ownership</a> in the <i>Amazon S3 User Guide</i>.</p>
|
|
61
|
-
* </important>
|
|
62
|
-
* <p>There are two ways to grant the appropriate permissions using the request
|
|
63
|
-
* headers.</p>
|
|
64
|
-
* <ul>
|
|
65
|
-
* <li>
|
|
66
|
-
* <p>Specify a canned ACL using the <code>x-amz-acl</code> request header. Amazon S3
|
|
67
|
-
* supports a set of predefined ACLs, known as <i>canned ACLs</i>. Each
|
|
68
|
-
* canned ACL has a predefined set of grantees and permissions. For more information,
|
|
69
|
-
* see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL">Canned ACL</a>.</p>
|
|
70
|
-
* </li>
|
|
71
|
-
* <li>
|
|
72
|
-
* <p>Specify access permissions explicitly using the <code>x-amz-grant-read</code>,
|
|
73
|
-
* <code>x-amz-grant-write</code>, <code>x-amz-grant-read-acp</code>,
|
|
74
|
-
* <code>x-amz-grant-write-acp</code>, and <code>x-amz-grant-full-control</code>
|
|
75
|
-
* headers. These headers map to the set of permissions Amazon S3 supports in an ACL. For
|
|
76
|
-
* more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html">Access control list (ACL)
|
|
77
|
-
* overview</a>.</p>
|
|
78
|
-
* <p>You specify each grantee as a type=value pair, where the type is one of the
|
|
79
|
-
* following:</p>
|
|
80
|
-
* <ul>
|
|
81
|
-
* <li>
|
|
82
|
-
* <p>
|
|
83
|
-
* <code>id</code> – if the value specified is the canonical user ID of an
|
|
84
|
-
* Amazon Web Services account</p>
|
|
85
|
-
* </li>
|
|
86
|
-
* <li>
|
|
87
|
-
* <p>
|
|
88
|
-
* <code>uri</code> – if you are granting permissions to a predefined
|
|
89
|
-
* group</p>
|
|
90
|
-
* </li>
|
|
91
|
-
* <li>
|
|
92
|
-
* <p>
|
|
93
|
-
* <code>emailAddress</code> – if the value specified is the email address of
|
|
94
|
-
* an Amazon Web Services account</p>
|
|
95
|
-
* <note>
|
|
96
|
-
* <p>Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions: </p>
|
|
97
|
-
* <ul>
|
|
98
|
-
* <li>
|
|
99
|
-
* <p>US East (N. Virginia)</p>
|
|
100
|
-
* </li>
|
|
101
|
-
* <li>
|
|
102
|
-
* <p>US West (N. California)</p>
|
|
103
|
-
* </li>
|
|
104
|
-
* <li>
|
|
105
|
-
* <p> US West (Oregon)</p>
|
|
106
|
-
* </li>
|
|
107
|
-
* <li>
|
|
108
|
-
* <p> Asia Pacific (Singapore)</p>
|
|
109
|
-
* </li>
|
|
110
|
-
* <li>
|
|
111
|
-
* <p>Asia Pacific (Sydney)</p>
|
|
112
|
-
* </li>
|
|
113
|
-
* <li>
|
|
114
|
-
* <p>Asia Pacific (Tokyo)</p>
|
|
115
|
-
* </li>
|
|
116
|
-
* <li>
|
|
117
|
-
* <p>Europe (Ireland)</p>
|
|
118
|
-
* </li>
|
|
119
|
-
* <li>
|
|
120
|
-
* <p>South America (São Paulo)</p>
|
|
121
|
-
* </li>
|
|
122
|
-
* </ul>
|
|
123
|
-
* <p>For a list of all the Amazon S3 supported Regions and endpoints, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region">Regions and Endpoints</a> in the Amazon Web Services General Reference.</p>
|
|
124
|
-
* </note>
|
|
125
|
-
* </li>
|
|
126
|
-
* </ul>
|
|
127
|
-
* <p>For example, the following <code>x-amz-grant-read</code> header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:</p>
|
|
128
|
-
* <p>
|
|
129
|
-
* <code>x-amz-grant-read: id="11112222333", id="444455556666" </code>
|
|
130
|
-
* </p>
|
|
131
|
-
* </li>
|
|
132
|
-
* </ul>
|
|
133
|
-
* <note>
|
|
134
|
-
* <p>You can use either a canned ACL or specify access permissions explicitly. You cannot
|
|
135
|
-
* do both.</p>
|
|
136
|
-
* </note>
|
|
137
|
-
* </dd>
|
|
138
49
|
* <dt>Permissions</dt>
|
|
139
50
|
* <dd>
|
|
140
51
|
* <p>In addition to <code>s3:CreateBucket</code>, the following permissions are required when
|
|
141
|
-
* your CreateBucket includes specific headers:</p>
|
|
52
|
+
* your <code>CreateBucket</code> request includes specific headers:</p>
|
|
142
53
|
* <ul>
|
|
143
54
|
* <li>
|
|
144
55
|
* <p>
|
|
145
|
-
* <b>ACLs</b> - If your <code>CreateBucket</code> request
|
|
146
|
-
* specifies ACL permissions and the ACL is public-read, public-read-write,
|
|
56
|
+
* <b>Access control lists (ACLs)</b> - If your <code>CreateBucket</code> request
|
|
57
|
+
* specifies access control list (ACL) permissions and the ACL is public-read, public-read-write,
|
|
147
58
|
* authenticated-read, or if you specify access permissions explicitly through any other
|
|
148
59
|
* ACL, both <code>s3:CreateBucket</code> and <code>s3:PutBucketAcl</code> permissions
|
|
149
|
-
* are needed. If the ACL the <code>CreateBucket</code> request is private or doesn't
|
|
60
|
+
* are needed. If the ACL for the <code>CreateBucket</code> request is private or if the request doesn't
|
|
150
61
|
* specify any ACLs, only <code>s3:CreateBucket</code> permission is needed. </p>
|
|
151
62
|
* </li>
|
|
152
63
|
* <li>
|
|
153
64
|
* <p>
|
|
154
|
-
* <b>Object Lock</b> - If
|
|
155
|
-
*
|
|
156
|
-
*
|
|
157
|
-
*
|
|
158
|
-
* <code>s3:PutBucketVersioning</code> permissions are required.</p>
|
|
65
|
+
* <b>Object Lock</b> - If <code>ObjectLockEnabledForBucket</code> is set to true in your
|
|
66
|
+
* <code>CreateBucket</code> request,
|
|
67
|
+
* <code>s3:PutBucketObjectLockConfiguration</code> and
|
|
68
|
+
* <code>s3:PutBucketVersioning</code> permissions are required.</p>
|
|
159
69
|
* </li>
|
|
160
70
|
* <li>
|
|
161
71
|
* <p>
|
|
162
|
-
* <b>S3 Object Ownership</b> - If your CreateBucket
|
|
163
|
-
*
|
|
164
|
-
*
|
|
72
|
+
* <b>S3 Object Ownership</b> - If your <code>CreateBucket</code> request includes the <code>x-amz-object-ownership</code> header, then the
|
|
73
|
+
* <code>s3:PutBucketOwnershipControls</code> permission is required. By default, <code>ObjectOwnership</code> is set to <code>BucketOWnerEnforced</code> and ACLs are disabled. We recommend keeping
|
|
74
|
+
* ACLs disabled, except in uncommon use cases where you must control access for each object individually. If you want to change the <code>ObjectOwnership</code> setting, you can use the
|
|
75
|
+
* <code>x-amz-object-ownership</code> header in your <code>CreateBucket</code> request to set the <code>ObjectOwnership</code> setting of your choice.
|
|
76
|
+
* For more information about S3 Object Ownership, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html">Controlling object
|
|
77
|
+
* ownership </a> in the <i>Amazon S3 User Guide</i>.</p>
|
|
78
|
+
* </li>
|
|
79
|
+
* <li>
|
|
80
|
+
* <p>
|
|
81
|
+
* <b>S3 Block Public Access</b> - If your specific use case requires granting public access to your S3 resources, you can disable Block Public Access. You can create a new bucket with Block Public Access enabled, then separately call the <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeletePublicAccessBlock.html">
|
|
82
|
+
* <code>DeletePublicAccessBlock</code>
|
|
83
|
+
* </a> API. To use this operation, you must have the
|
|
84
|
+
* <code>s3:PutBucketPublicAccessBlock</code> permission. By default, all Block
|
|
85
|
+
* Public Access settings are enabled for new buckets. To avoid inadvertent exposure of
|
|
86
|
+
* your resources, we recommend keeping the S3 Block Public Access settings enabled. For more information about S3 Block Public Access, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html">Blocking public
|
|
87
|
+
* access to your Amazon S3 storage </a> in the <i>Amazon S3 User Guide</i>. </p>
|
|
165
88
|
* </li>
|
|
166
89
|
* </ul>
|
|
167
90
|
* </dd>
|
|
168
91
|
* </dl>
|
|
92
|
+
* <important>
|
|
93
|
+
* <p> If your <code>CreateBucket</code> request sets <code>BucketOwnerEnforced</code> for Amazon S3 Object Ownership
|
|
94
|
+
* and specifies a bucket ACL that provides access to an external Amazon Web Services account, your request fails with a <code>400</code> error and returns the <code>InvalidBucketAcLWithObjectOwnership</code> error code. For more information,
|
|
95
|
+
* see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-ownership-existing-bucket.html">Setting Object
|
|
96
|
+
* Ownership on an existing bucket </a> in the <i>Amazon S3 User Guide</i>. </p>
|
|
97
|
+
* </important>
|
|
169
98
|
* <p>The following operations are related to <code>CreateBucket</code>:</p>
|
|
170
99
|
* <ul>
|
|
171
100
|
* <li>
|
|
@@ -226,39 +155,39 @@ export interface CreateBucketCommandOutput extends CreateBucketOutput, __Metadat
|
|
|
226
155
|
* @throws {@link S3ServiceException}
|
|
227
156
|
* <p>Base exception class for all service exceptions from S3 service.</p>
|
|
228
157
|
*
|
|
229
|
-
* @example To create a bucket
|
|
158
|
+
* @example To create a bucket in a specific region
|
|
230
159
|
* ```javascript
|
|
231
|
-
* // The following example creates a bucket.
|
|
160
|
+
* // The following example creates a bucket. The request specifies an AWS region where to create the bucket.
|
|
232
161
|
* const input = {
|
|
233
|
-
* "Bucket": "examplebucket"
|
|
162
|
+
* "Bucket": "examplebucket",
|
|
163
|
+
* "CreateBucketConfiguration": {
|
|
164
|
+
* "LocationConstraint": "eu-west-1"
|
|
165
|
+
* }
|
|
234
166
|
* };
|
|
235
167
|
* const command = new CreateBucketCommand(input);
|
|
236
168
|
* const response = await client.send(command);
|
|
237
169
|
* /* response ==
|
|
238
170
|
* {
|
|
239
|
-
* "Location": "/
|
|
171
|
+
* "Location": "http://examplebucket.<Region>.s3.amazonaws.com/"
|
|
240
172
|
* }
|
|
241
173
|
* *\/
|
|
242
|
-
* // example id: to-create-a-bucket
|
|
174
|
+
* // example id: to-create-a-bucket-in-a-specific-region-1483399072992
|
|
243
175
|
* ```
|
|
244
176
|
*
|
|
245
|
-
* @example To create a bucket
|
|
177
|
+
* @example To create a bucket
|
|
246
178
|
* ```javascript
|
|
247
|
-
* // The following example creates a bucket.
|
|
179
|
+
* // The following example creates a bucket.
|
|
248
180
|
* const input = {
|
|
249
|
-
* "Bucket": "examplebucket"
|
|
250
|
-
* "CreateBucketConfiguration": {
|
|
251
|
-
* "LocationConstraint": "eu-west-1"
|
|
252
|
-
* }
|
|
181
|
+
* "Bucket": "examplebucket"
|
|
253
182
|
* };
|
|
254
183
|
* const command = new CreateBucketCommand(input);
|
|
255
184
|
* const response = await client.send(command);
|
|
256
185
|
* /* response ==
|
|
257
186
|
* {
|
|
258
|
-
* "Location": "
|
|
187
|
+
* "Location": "/examplebucket"
|
|
259
188
|
* }
|
|
260
189
|
* *\/
|
|
261
|
-
* // example id: to-create-a-bucket
|
|
190
|
+
* // example id: to-create-a-bucket--1472851826060
|
|
262
191
|
* ```
|
|
263
192
|
*
|
|
264
193
|
*/
|
|
@@ -29,7 +29,9 @@ export interface DeleteBucketCorsCommandOutput extends __MetadataBearer {
|
|
|
29
29
|
* and can grant this permission to others. </p>
|
|
30
30
|
* <p>For information about <code>cors</code>, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html">Enabling Cross-Origin Resource Sharing</a> in
|
|
31
31
|
* the <i>Amazon S3 User Guide</i>.</p>
|
|
32
|
-
* <p
|
|
32
|
+
* <p class="title">
|
|
33
|
+
* <b>Related Resources</b>
|
|
34
|
+
* </p>
|
|
33
35
|
* <ul>
|
|
34
36
|
* <li>
|
|
35
37
|
* <p>
|
|
@@ -72,39 +72,39 @@ export interface DeleteObjectTaggingCommandOutput extends DeleteObjectTaggingOut
|
|
|
72
72
|
* @throws {@link S3ServiceException}
|
|
73
73
|
* <p>Base exception class for all service exceptions from S3 service.</p>
|
|
74
74
|
*
|
|
75
|
-
* @example To remove tag set from an object
|
|
75
|
+
* @example To remove tag set from an object
|
|
76
76
|
* ```javascript
|
|
77
|
-
* // The following example removes tag set associated with the specified object
|
|
77
|
+
* // The following example removes tag set associated with the specified object. If the bucket is versioning enabled, the operation removes tag set from the latest object version.
|
|
78
78
|
* const input = {
|
|
79
79
|
* "Bucket": "examplebucket",
|
|
80
|
-
* "Key": "HappyFace.jpg"
|
|
81
|
-
* "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI"
|
|
80
|
+
* "Key": "HappyFace.jpg"
|
|
82
81
|
* };
|
|
83
82
|
* const command = new DeleteObjectTaggingCommand(input);
|
|
84
83
|
* const response = await client.send(command);
|
|
85
84
|
* /* response ==
|
|
86
85
|
* {
|
|
87
|
-
* "VersionId": "
|
|
86
|
+
* "VersionId": "null"
|
|
88
87
|
* }
|
|
89
88
|
* *\/
|
|
90
|
-
* // example id: to-remove-tag-set-from-an-object-
|
|
89
|
+
* // example id: to-remove-tag-set-from-an-object-1483145342862
|
|
91
90
|
* ```
|
|
92
91
|
*
|
|
93
|
-
* @example To remove tag set from an object
|
|
92
|
+
* @example To remove tag set from an object version
|
|
94
93
|
* ```javascript
|
|
95
|
-
* // The following example removes tag set associated with the specified object.
|
|
94
|
+
* // The following example removes tag set associated with the specified object version. The request specifies both the object key and object version.
|
|
96
95
|
* const input = {
|
|
97
96
|
* "Bucket": "examplebucket",
|
|
98
|
-
* "Key": "HappyFace.jpg"
|
|
97
|
+
* "Key": "HappyFace.jpg",
|
|
98
|
+
* "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI"
|
|
99
99
|
* };
|
|
100
100
|
* const command = new DeleteObjectTaggingCommand(input);
|
|
101
101
|
* const response = await client.send(command);
|
|
102
102
|
* /* response ==
|
|
103
103
|
* {
|
|
104
|
-
* "VersionId": "
|
|
104
|
+
* "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI"
|
|
105
105
|
* }
|
|
106
106
|
* *\/
|
|
107
|
-
* // example id: to-remove-tag-set-from-an-object-
|
|
107
|
+
* // example id: to-remove-tag-set-from-an-object-version-1483145285913
|
|
108
108
|
* ```
|
|
109
109
|
*
|
|
110
110
|
*/
|
|
@@ -130,20 +130,18 @@ export interface DeleteObjectsCommandOutput extends DeleteObjectsOutput, __Metad
|
|
|
130
130
|
* @throws {@link S3ServiceException}
|
|
131
131
|
* <p>Base exception class for all service exceptions from S3 service.</p>
|
|
132
132
|
*
|
|
133
|
-
* @example To delete multiple
|
|
133
|
+
* @example To delete multiple objects from a versioned bucket
|
|
134
134
|
* ```javascript
|
|
135
|
-
* // The following example deletes objects from a bucket. The request
|
|
135
|
+
* // The following example deletes objects from a bucket. The bucket is versioned, and the request does not specify the object version to delete. In this case, all versions remain in the bucket and S3 adds a delete marker.
|
|
136
136
|
* const input = {
|
|
137
137
|
* "Bucket": "examplebucket",
|
|
138
138
|
* "Delete": {
|
|
139
139
|
* "Objects": [
|
|
140
140
|
* {
|
|
141
|
-
* "Key": "
|
|
142
|
-
* "VersionId": "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b"
|
|
141
|
+
* "Key": "objectkey1"
|
|
143
142
|
* },
|
|
144
143
|
* {
|
|
145
|
-
* "Key": "
|
|
146
|
-
* "VersionId": "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd"
|
|
144
|
+
* "Key": "objectkey2"
|
|
147
145
|
* }
|
|
148
146
|
* ],
|
|
149
147
|
* "Quiet": false
|
|
@@ -155,31 +153,35 @@ export interface DeleteObjectsCommandOutput extends DeleteObjectsOutput, __Metad
|
|
|
155
153
|
* {
|
|
156
154
|
* "Deleted": [
|
|
157
155
|
* {
|
|
158
|
-
* "
|
|
159
|
-
* "
|
|
156
|
+
* "DeleteMarker": "true",
|
|
157
|
+
* "DeleteMarkerVersionId": "A._w1z6EFiCF5uhtQMDal9JDkID9tQ7F",
|
|
158
|
+
* "Key": "objectkey1"
|
|
160
159
|
* },
|
|
161
160
|
* {
|
|
162
|
-
* "
|
|
163
|
-
* "
|
|
161
|
+
* "DeleteMarker": "true",
|
|
162
|
+
* "DeleteMarkerVersionId": "iOd_ORxhkKe_e8G8_oSGxt2PjsCZKlkt",
|
|
163
|
+
* "Key": "objectkey2"
|
|
164
164
|
* }
|
|
165
165
|
* ]
|
|
166
166
|
* }
|
|
167
167
|
* *\/
|
|
168
|
-
* // example id: to-delete-multiple-
|
|
168
|
+
* // example id: to-delete-multiple-objects-from-a-versioned-bucket-1483146248805
|
|
169
169
|
* ```
|
|
170
170
|
*
|
|
171
|
-
* @example To delete multiple
|
|
171
|
+
* @example To delete multiple object versions from a versioned bucket
|
|
172
172
|
* ```javascript
|
|
173
|
-
* // The following example deletes objects from a bucket. The
|
|
173
|
+
* // The following example deletes objects from a bucket. The request specifies object versions. S3 deletes specific object versions and returns the key and versions of deleted objects in the response.
|
|
174
174
|
* const input = {
|
|
175
175
|
* "Bucket": "examplebucket",
|
|
176
176
|
* "Delete": {
|
|
177
177
|
* "Objects": [
|
|
178
178
|
* {
|
|
179
|
-
* "Key": "
|
|
179
|
+
* "Key": "HappyFace.jpg",
|
|
180
|
+
* "VersionId": "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b"
|
|
180
181
|
* },
|
|
181
182
|
* {
|
|
182
|
-
* "Key": "
|
|
183
|
+
* "Key": "HappyFace.jpg",
|
|
184
|
+
* "VersionId": "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd"
|
|
183
185
|
* }
|
|
184
186
|
* ],
|
|
185
187
|
* "Quiet": false
|
|
@@ -191,19 +193,17 @@ export interface DeleteObjectsCommandOutput extends DeleteObjectsOutput, __Metad
|
|
|
191
193
|
* {
|
|
192
194
|
* "Deleted": [
|
|
193
195
|
* {
|
|
194
|
-
* "
|
|
195
|
-
* "
|
|
196
|
-
* "Key": "objectkey1"
|
|
196
|
+
* "Key": "HappyFace.jpg",
|
|
197
|
+
* "VersionId": "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd"
|
|
197
198
|
* },
|
|
198
199
|
* {
|
|
199
|
-
* "
|
|
200
|
-
* "
|
|
201
|
-
* "Key": "objectkey2"
|
|
200
|
+
* "Key": "HappyFace.jpg",
|
|
201
|
+
* "VersionId": "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b"
|
|
202
202
|
* }
|
|
203
203
|
* ]
|
|
204
204
|
* }
|
|
205
205
|
* *\/
|
|
206
|
-
* // example id: to-delete-multiple-
|
|
206
|
+
* // example id: to-delete-multiple-object-versions-from-a-versioned-bucket-1483147087737
|
|
207
207
|
* ```
|
|
208
208
|
*
|
|
209
209
|
*/
|
|
@@ -57,11 +57,13 @@ export interface GetBucketAccelerateConfigurationCommandOutput extends GetBucket
|
|
|
57
57
|
* const input = { // GetBucketAccelerateConfigurationRequest
|
|
58
58
|
* Bucket: "STRING_VALUE", // required
|
|
59
59
|
* ExpectedBucketOwner: "STRING_VALUE",
|
|
60
|
+
* RequestPayer: "requester",
|
|
60
61
|
* };
|
|
61
62
|
* const command = new GetBucketAccelerateConfigurationCommand(input);
|
|
62
63
|
* const response = await client.send(command);
|
|
63
64
|
* // { // GetBucketAccelerateConfigurationOutput
|
|
64
65
|
* // Status: "Enabled" || "Suspended",
|
|
66
|
+
* // RequestCharged: "requester",
|
|
65
67
|
* // };
|
|
66
68
|
*
|
|
67
69
|
* ```
|