@aws-sdk/client-s3 3.353.0 → 3.357.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 +57 -55
- package/dist-cjs/runtimeConfig.browser.js +0 -3
- package/dist-cjs/runtimeConfig.js +0 -3
- package/dist-cjs/runtimeConfig.shared.js +3 -0
- package/dist-es/protocols/Aws_restXml.js +9 -7
- package/dist-es/runtimeConfig.browser.js +0 -3
- package/dist-es/runtimeConfig.js +0 -3
- package/dist-es/runtimeConfig.shared.js +3 -0
- package/dist-types/S3Client.d.ts +1 -1
- package/dist-types/commands/CopyObjectCommand.d.ts +26 -23
- package/dist-types/commands/CreateBucketCommand.d.ts +32 -103
- package/dist-types/commands/DeleteBucketCorsCommand.d.ts +3 -1
- package/dist-types/commands/DeleteObjectCommand.d.ts +10 -10
- 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/GetObjectTaggingCommand.d.ts +19 -19
- package/dist-types/commands/HeadObjectCommand.d.ts +19 -12
- package/dist-types/commands/ListMultipartUploadsCommand.d.ts +34 -32
- 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 +39 -41
- package/dist-types/commands/RestoreObjectCommand.d.ts +5 -5
- package/dist-types/commands/SelectObjectContentCommand.d.ts +9 -4
- package/dist-types/commands/UploadPartCommand.d.ts +3 -6
- package/dist-types/commands/UploadPartCopyCommand.d.ts +13 -13
- package/dist-types/commands/WriteGetObjectResponseCommand.d.ts +3 -6
- package/dist-types/models/models_0.d.ts +107 -56
- package/dist-types/models/models_1.d.ts +9 -9
- package/dist-types/runtimeConfig.browser.d.ts +2 -2
- package/dist-types/runtimeConfig.d.ts +2 -2
- package/dist-types/runtimeConfig.native.d.ts +1 -1
- package/dist-types/runtimeConfig.shared.d.ts +3 -0
- package/dist-types/ts3.4/models/models_0.d.ts +8 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +6 -4
- package/dist-types/ts3.4/runtimeConfig.d.ts +6 -6
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +3 -1
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +6 -0
- package/package.json +43 -44
package/dist-es/runtimeConfig.js
CHANGED
|
@@ -11,7 +11,6 @@ import { loadConfig as loadNodeConfig } from "@aws-sdk/node-config-provider";
|
|
|
11
11
|
import { NodeHttpHandler as RequestHandler, streamCollector } from "@aws-sdk/node-http-handler";
|
|
12
12
|
import { calculateBodyLength } from "@aws-sdk/util-body-length-node";
|
|
13
13
|
import { DEFAULT_RETRY_MODE } from "@aws-sdk/util-retry";
|
|
14
|
-
import { getAwsChunkedEncodingStream, sdkStreamMixin } from "@aws-sdk/util-stream-node";
|
|
15
14
|
import { defaultUserAgent } from "@aws-sdk/util-user-agent-node";
|
|
16
15
|
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
17
16
|
import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
|
|
@@ -32,7 +31,6 @@ export const getRuntimeConfig = (config) => {
|
|
|
32
31
|
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
|
33
32
|
defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
34
33
|
eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventStreamSerdeProvider,
|
|
35
|
-
getAwsChunkedEncodingStream: config?.getAwsChunkedEncodingStream ?? getAwsChunkedEncodingStream,
|
|
36
34
|
maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
|
|
37
35
|
md5: config?.md5 ?? Hash.bind(null, "md5"),
|
|
38
36
|
region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS),
|
|
@@ -42,7 +40,6 @@ export const getRuntimeConfig = (config) => {
|
|
|
42
40
|
...NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
43
41
|
default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
|
|
44
42
|
}),
|
|
45
|
-
sdkStreamMixin: config?.sdkStreamMixin ?? sdkStreamMixin,
|
|
46
43
|
sha1: config?.sha1 ?? Hash.bind(null, "sha1"),
|
|
47
44
|
sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
|
|
48
45
|
streamCollector: config?.streamCollector ?? streamCollector,
|
|
@@ -2,6 +2,7 @@ import { SignatureV4MultiRegion } from "@aws-sdk/signature-v4-multi-region";
|
|
|
2
2
|
import { NoOpLogger } from "@aws-sdk/smithy-client";
|
|
3
3
|
import { parseUrl } from "@aws-sdk/url-parser";
|
|
4
4
|
import { fromBase64, toBase64 } from "@aws-sdk/util-base64";
|
|
5
|
+
import { getAwsChunkedEncodingStream, sdkStreamMixin } from "@aws-sdk/util-stream";
|
|
5
6
|
import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8";
|
|
6
7
|
import { defaultEndpointResolver } from "./endpoint/endpointResolver";
|
|
7
8
|
export const getRuntimeConfig = (config) => ({
|
|
@@ -10,7 +11,9 @@ export const getRuntimeConfig = (config) => ({
|
|
|
10
11
|
base64Encoder: config?.base64Encoder ?? toBase64,
|
|
11
12
|
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
12
13
|
endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
|
|
14
|
+
getAwsChunkedEncodingStream: config?.getAwsChunkedEncodingStream ?? getAwsChunkedEncodingStream,
|
|
13
15
|
logger: config?.logger ?? new NoOpLogger(),
|
|
16
|
+
sdkStreamMixin: config?.sdkStreamMixin ?? sdkStreamMixin,
|
|
14
17
|
serviceId: config?.serviceId ?? "S3",
|
|
15
18
|
signerConstructor: config?.signerConstructor ?? SignatureV4MultiRegion,
|
|
16
19
|
signingEscapePath: config?.signingEscapePath ?? false,
|
package/dist-types/S3Client.d.ts
CHANGED
|
@@ -170,7 +170,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
|
|
|
170
170
|
*/
|
|
171
171
|
runtime?: string;
|
|
172
172
|
/**
|
|
173
|
-
* Disable
|
|
173
|
+
* Disable dynamically changing the endpoint of the client based on the hostPrefix
|
|
174
174
|
* trait of an operation.
|
|
175
175
|
*/
|
|
176
176
|
disableHostPrefix?: boolean;
|
|
@@ -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
|
-
*
|
|
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>
|
|
69
|
+
* </li>
|
|
70
|
+
* <li>
|
|
71
|
+
* <p>
|
|
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>
|
|
159
78
|
* </li>
|
|
160
79
|
* <li>
|
|
161
80
|
* <p>
|
|
162
|
-
* <b>S3
|
|
163
|
-
*
|
|
164
|
-
*
|
|
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>
|
|
@@ -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>
|
|
@@ -83,28 +83,28 @@ export interface DeleteObjectCommandOutput extends DeleteObjectOutput, __Metadat
|
|
|
83
83
|
* @throws {@link S3ServiceException}
|
|
84
84
|
* <p>Base exception class for all service exceptions from S3 service.</p>
|
|
85
85
|
*
|
|
86
|
-
* @example To delete an object
|
|
86
|
+
* @example To delete an object
|
|
87
87
|
* ```javascript
|
|
88
|
-
* // The following example deletes an object from
|
|
88
|
+
* // The following example deletes an object from an S3 bucket.
|
|
89
89
|
* const input = {
|
|
90
|
-
* "Bucket": "
|
|
91
|
-
* "Key": "
|
|
90
|
+
* "Bucket": "examplebucket",
|
|
91
|
+
* "Key": "objectkey.jpg"
|
|
92
92
|
* };
|
|
93
93
|
* const command = new DeleteObjectCommand(input);
|
|
94
94
|
* await client.send(command);
|
|
95
|
-
* // example id: to-delete-an-object-
|
|
95
|
+
* // example id: to-delete-an-object-1472850136595
|
|
96
96
|
* ```
|
|
97
97
|
*
|
|
98
|
-
* @example To delete an object
|
|
98
|
+
* @example To delete an object (from a non-versioned bucket)
|
|
99
99
|
* ```javascript
|
|
100
|
-
* // The following example deletes an object from
|
|
100
|
+
* // The following example deletes an object from a non-versioned bucket.
|
|
101
101
|
* const input = {
|
|
102
|
-
* "Bucket": "
|
|
103
|
-
* "Key": "
|
|
102
|
+
* "Bucket": "ExampleBucket",
|
|
103
|
+
* "Key": "HappyFace.jpg"
|
|
104
104
|
* };
|
|
105
105
|
* const command = new DeleteObjectCommand(input);
|
|
106
106
|
* await client.send(command);
|
|
107
|
-
* // example id: to-delete-an-object-
|
|
107
|
+
* // example id: to-delete-an-object-from-a-non-versioned-bucket-1481588533089
|
|
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
|
* ```
|
|
@@ -23,9 +23,9 @@ export interface GetBucketEncryptionCommandOutput extends GetBucketEncryptionOut
|
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
25
|
* @public
|
|
26
|
-
* <p>Returns the default encryption configuration for an Amazon S3 bucket. By default, all buckets
|
|
27
|
-
* uses server-side encryption with Amazon S3 managed
|
|
28
|
-
* about the bucket default encryption feature, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html">Amazon S3 Bucket
|
|
26
|
+
* <p>Returns the default encryption configuration for an Amazon S3 bucket. By default, all buckets
|
|
27
|
+
* have a default encryption configuration that uses server-side encryption with Amazon S3 managed
|
|
28
|
+
* keys (SSE-S3). For information about the bucket default encryption feature, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html">Amazon S3 Bucket
|
|
29
29
|
* Default Encryption</a> in the <i>Amazon S3 User Guide</i>.</p>
|
|
30
30
|
* <p>To use this operation, you must have permission to perform the
|
|
31
31
|
* <code>s3:GetEncryptionConfiguration</code> action. The bucket owner has this permission
|