@aws-sdk/client-s3 3.369.0 → 3.373.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.
@@ -143,6 +143,7 @@ exports.BucketLocationConstraint = {
143
143
  ap_northeast_2: "ap-northeast-2",
144
144
  ap_northeast_3: "ap-northeast-3",
145
145
  ap_south_1: "ap-south-1",
146
+ ap_south_2: "ap-south-2",
146
147
  ap_southeast_1: "ap-southeast-1",
147
148
  ap_southeast_2: "ap-southeast-2",
148
149
  ap_southeast_3: "ap-southeast-3",
@@ -152,6 +153,7 @@ exports.BucketLocationConstraint = {
152
153
  eu_central_1: "eu-central-1",
153
154
  eu_north_1: "eu-north-1",
154
155
  eu_south_1: "eu-south-1",
156
+ eu_south_2: "eu-south-2",
155
157
  eu_west_1: "eu-west-1",
156
158
  eu_west_2: "eu-west-2",
157
159
  eu_west_3: "eu-west-3",
@@ -211,9 +213,11 @@ exports.InventoryOptionalField = {
211
213
  IntelligentTieringAccessTier: "IntelligentTieringAccessTier",
212
214
  IsMultipartUploaded: "IsMultipartUploaded",
213
215
  LastModifiedDate: "LastModifiedDate",
216
+ ObjectAccessControlList: "ObjectAccessControlList",
214
217
  ObjectLockLegalHoldStatus: "ObjectLockLegalHoldStatus",
215
218
  ObjectLockMode: "ObjectLockMode",
216
219
  ObjectLockRetainUntilDate: "ObjectLockRetainUntilDate",
220
+ ObjectOwner: "ObjectOwner",
217
221
  ReplicationStatus: "ReplicationStatus",
218
222
  Size: "Size",
219
223
  StorageClass: "StorageClass",
@@ -5,13 +5,13 @@ const tslib_1 = require("tslib");
5
5
  const package_json_1 = tslib_1.__importDefault(require("../package.json"));
6
6
  const sha1_browser_1 = require("@aws-crypto/sha1-browser");
7
7
  const sha256_browser_1 = require("@aws-crypto/sha256-browser");
8
- const hash_blob_browser_1 = require("@aws-sdk/hash-blob-browser");
9
- const md5_js_1 = require("@aws-sdk/md5-js");
10
8
  const util_user_agent_browser_1 = require("@aws-sdk/util-user-agent-browser");
11
9
  const config_resolver_1 = require("@smithy/config-resolver");
12
10
  const eventstream_serde_browser_1 = require("@smithy/eventstream-serde-browser");
13
11
  const fetch_http_handler_1 = require("@smithy/fetch-http-handler");
12
+ const hash_blob_browser_1 = require("@smithy/hash-blob-browser");
14
13
  const invalid_dependency_1 = require("@smithy/invalid-dependency");
14
+ const md5_js_1 = require("@smithy/md5-js");
15
15
  const util_body_length_browser_1 = require("@smithy/util-body-length-browser");
16
16
  const util_retry_1 = require("@smithy/util-retry");
17
17
  const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
@@ -135,6 +135,7 @@ export const BucketLocationConstraint = {
135
135
  ap_northeast_2: "ap-northeast-2",
136
136
  ap_northeast_3: "ap-northeast-3",
137
137
  ap_south_1: "ap-south-1",
138
+ ap_south_2: "ap-south-2",
138
139
  ap_southeast_1: "ap-southeast-1",
139
140
  ap_southeast_2: "ap-southeast-2",
140
141
  ap_southeast_3: "ap-southeast-3",
@@ -144,6 +145,7 @@ export const BucketLocationConstraint = {
144
145
  eu_central_1: "eu-central-1",
145
146
  eu_north_1: "eu-north-1",
146
147
  eu_south_1: "eu-south-1",
148
+ eu_south_2: "eu-south-2",
147
149
  eu_west_1: "eu-west-1",
148
150
  eu_west_2: "eu-west-2",
149
151
  eu_west_3: "eu-west-3",
@@ -203,9 +205,11 @@ export const InventoryOptionalField = {
203
205
  IntelligentTieringAccessTier: "IntelligentTieringAccessTier",
204
206
  IsMultipartUploaded: "IsMultipartUploaded",
205
207
  LastModifiedDate: "LastModifiedDate",
208
+ ObjectAccessControlList: "ObjectAccessControlList",
206
209
  ObjectLockLegalHoldStatus: "ObjectLockLegalHoldStatus",
207
210
  ObjectLockMode: "ObjectLockMode",
208
211
  ObjectLockRetainUntilDate: "ObjectLockRetainUntilDate",
212
+ ObjectOwner: "ObjectOwner",
209
213
  ReplicationStatus: "ReplicationStatus",
210
214
  Size: "Size",
211
215
  StorageClass: "StorageClass",
@@ -1,13 +1,13 @@
1
1
  import packageInfo from "../package.json";
2
2
  import { Sha1 } from "@aws-crypto/sha1-browser";
3
3
  import { Sha256 } from "@aws-crypto/sha256-browser";
4
- import { blobHasher as streamHasher } from "@aws-sdk/hash-blob-browser";
5
- import { Md5 } from "@aws-sdk/md5-js";
6
4
  import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser";
7
5
  import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@smithy/config-resolver";
8
6
  import { eventStreamSerdeProvider } from "@smithy/eventstream-serde-browser";
9
7
  import { FetchHttpHandler as RequestHandler, streamCollector } from "@smithy/fetch-http-handler";
8
+ import { blobHasher as streamHasher } from "@smithy/hash-blob-browser";
10
9
  import { invalidProvider } from "@smithy/invalid-dependency";
10
+ import { Md5 } from "@smithy/md5-js";
11
11
  import { calculateBodyLength } from "@smithy/util-body-length-browser";
12
12
  import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@smithy/util-retry";
13
13
  import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
@@ -55,7 +55,9 @@ export interface CopyObjectCommandOutput extends CopyObjectOutput, __MetadataBea
55
55
  * body.</p>
56
56
  * </note>
57
57
  * <p>The copy request charge is based on the storage class and Region that you specify for
58
- * the destination object. For pricing information, see <a href="http://aws.amazon.com/s3/pricing/">Amazon S3 pricing</a>.</p>
58
+ * the destination object. The request can also result in a data retrieval charge for the
59
+ * source if the source storage class bills for data retrieval. For pricing information, see
60
+ * <a href="http://aws.amazon.com/s3/pricing/">Amazon S3 pricing</a>.</p>
59
61
  * <important>
60
62
  * <p>Amazon S3 transfer acceleration does not support cross-Region copies. If you request a
61
63
  * cross-Region copy using a transfer acceleration endpoint, you get a 400 <code>Bad
@@ -118,7 +118,7 @@ export interface CreateBucketCommandOutput extends CreateBucketOutput, __Metadat
118
118
  * ACL: "private" || "public-read" || "public-read-write" || "authenticated-read",
119
119
  * Bucket: "STRING_VALUE", // required
120
120
  * CreateBucketConfiguration: { // CreateBucketConfiguration
121
- * LocationConstraint: "af-south-1" || "ap-east-1" || "ap-northeast-1" || "ap-northeast-2" || "ap-northeast-3" || "ap-south-1" || "ap-southeast-1" || "ap-southeast-2" || "ap-southeast-3" || "ca-central-1" || "cn-north-1" || "cn-northwest-1" || "EU" || "eu-central-1" || "eu-north-1" || "eu-south-1" || "eu-west-1" || "eu-west-2" || "eu-west-3" || "me-south-1" || "sa-east-1" || "us-east-2" || "us-gov-east-1" || "us-gov-west-1" || "us-west-1" || "us-west-2",
121
+ * LocationConstraint: "af-south-1" || "ap-east-1" || "ap-northeast-1" || "ap-northeast-2" || "ap-northeast-3" || "ap-south-1" || "ap-southeast-1" || "ap-southeast-2" || "ap-southeast-3" || "ca-central-1" || "cn-north-1" || "cn-northwest-1" || "EU" || "eu-central-1" || "eu-north-1" || "eu-south-1" || "eu-west-1" || "eu-west-2" || "eu-west-3" || "me-south-1" || "sa-east-1" || "us-east-2" || "us-gov-east-1" || "us-gov-west-1" || "us-west-1" || "us-west-2" || "ap-south-2" || "eu-south-2",
122
122
  * },
123
123
  * GrantFullControl: "STRING_VALUE",
124
124
  * GrantRead: "STRING_VALUE",
@@ -155,39 +155,39 @@ export interface CreateBucketCommandOutput extends CreateBucketOutput, __Metadat
155
155
  * @throws {@link S3ServiceException}
156
156
  * <p>Base exception class for all service exceptions from S3 service.</p>
157
157
  *
158
- * @example To create a bucket
158
+ * @example To create a bucket in a specific region
159
159
  * ```javascript
160
- * // The following example creates a bucket.
160
+ * // The following example creates a bucket. The request specifies an AWS region where to create the bucket.
161
161
  * const input = {
162
- * "Bucket": "examplebucket"
162
+ * "Bucket": "examplebucket",
163
+ * "CreateBucketConfiguration": {
164
+ * "LocationConstraint": "eu-west-1"
165
+ * }
163
166
  * };
164
167
  * const command = new CreateBucketCommand(input);
165
168
  * const response = await client.send(command);
166
169
  * /* response ==
167
170
  * {
168
- * "Location": "/examplebucket"
171
+ * "Location": "http://examplebucket.<Region>.s3.amazonaws.com/"
169
172
  * }
170
173
  * *\/
171
- * // example id: to-create-a-bucket--1472851826060
174
+ * // example id: to-create-a-bucket-in-a-specific-region-1483399072992
172
175
  * ```
173
176
  *
174
- * @example To create a bucket in a specific region
177
+ * @example To create a bucket
175
178
  * ```javascript
176
- * // The following example creates a bucket. The request specifies an AWS region where to create the bucket.
179
+ * // The following example creates a bucket.
177
180
  * const input = {
178
- * "Bucket": "examplebucket",
179
- * "CreateBucketConfiguration": {
180
- * "LocationConstraint": "eu-west-1"
181
- * }
181
+ * "Bucket": "examplebucket"
182
182
  * };
183
183
  * const command = new CreateBucketCommand(input);
184
184
  * const response = await client.send(command);
185
185
  * /* response ==
186
186
  * {
187
- * "Location": "http://examplebucket.<Region>.s3.amazonaws.com/"
187
+ * "Location": "/examplebucket"
188
188
  * }
189
189
  * *\/
190
- * // example id: to-create-a-bucket-in-a-specific-region-1483399072992
190
+ * // example id: to-create-a-bucket--1472851826060
191
191
  * ```
192
192
  *
193
193
  */
@@ -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 (from a non-versioned bucket)
87
87
  * ```javascript
88
- * // The following example deletes an object from an S3 bucket.
88
+ * // The following example deletes an object from a non-versioned bucket.
89
89
  * const input = {
90
- * "Bucket": "examplebucket",
91
- * "Key": "objectkey.jpg"
90
+ * "Bucket": "ExampleBucket",
91
+ * "Key": "HappyFace.jpg"
92
92
  * };
93
93
  * const command = new DeleteObjectCommand(input);
94
94
  * await client.send(command);
95
- * // example id: to-delete-an-object-1472850136595
95
+ * // example id: to-delete-an-object-from-a-non-versioned-bucket-1481588533089
96
96
  * ```
97
97
  *
98
- * @example To delete an object (from a non-versioned bucket)
98
+ * @example To delete an object
99
99
  * ```javascript
100
- * // The following example deletes an object from a non-versioned bucket.
100
+ * // The following example deletes an object from an S3 bucket.
101
101
  * const input = {
102
- * "Bucket": "ExampleBucket",
103
- * "Key": "HappyFace.jpg"
102
+ * "Bucket": "examplebucket",
103
+ * "Key": "objectkey.jpg"
104
104
  * };
105
105
  * const command = new DeleteObjectCommand(input);
106
106
  * await client.send(command);
107
- * // example id: to-delete-an-object-from-a-non-versioned-bucket-1481588533089
107
+ * // example id: to-delete-an-object-1472850136595
108
108
  * ```
109
109
  *
110
110
  */
@@ -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 version
75
+ * @example To remove tag set from an object
76
76
  * ```javascript
77
- * // The following example removes tag set associated with the specified object version. The request specifies both the object key and object version.
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": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI"
86
+ * "VersionId": "null"
88
87
  * }
89
88
  * *\/
90
- * // example id: to-remove-tag-set-from-an-object-version-1483145285913
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. If the bucket is versioning enabled, the operation removes tag set from the latest object version.
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": "null"
104
+ * "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI"
105
105
  * }
106
106
  * *\/
107
- * // example id: to-remove-tag-set-from-an-object-1483145342862
107
+ * // example id: to-remove-tag-set-from-an-object-version-1483145285913
108
108
  * ```
109
109
  *
110
110
  */
@@ -86,7 +86,7 @@ export interface GetBucketInventoryConfigurationCommandOutput extends GetBucketI
86
86
  * // Id: "STRING_VALUE", // required
87
87
  * // IncludedObjectVersions: "All" || "Current", // required
88
88
  * // OptionalFields: [ // InventoryOptionalFields
89
- * // "Size" || "LastModifiedDate" || "StorageClass" || "ETag" || "IsMultipartUploaded" || "ReplicationStatus" || "EncryptionStatus" || "ObjectLockRetainUntilDate" || "ObjectLockMode" || "ObjectLockLegalHoldStatus" || "IntelligentTieringAccessTier" || "BucketKeyStatus" || "ChecksumAlgorithm",
89
+ * // "Size" || "LastModifiedDate" || "StorageClass" || "ETag" || "IsMultipartUploaded" || "ReplicationStatus" || "EncryptionStatus" || "ObjectLockRetainUntilDate" || "ObjectLockMode" || "ObjectLockLegalHoldStatus" || "IntelligentTieringAccessTier" || "BucketKeyStatus" || "ChecksumAlgorithm" || "ObjectAccessControlList" || "ObjectOwner",
90
90
  * // ],
91
91
  * // Schedule: { // InventorySchedule
92
92
  * // Frequency: "Daily" || "Weekly", // required
@@ -62,7 +62,7 @@ export interface GetBucketLocationCommandOutput extends GetBucketLocationOutput,
62
62
  * const command = new GetBucketLocationCommand(input);
63
63
  * const response = await client.send(command);
64
64
  * // { // GetBucketLocationOutput
65
- * // LocationConstraint: "af-south-1" || "ap-east-1" || "ap-northeast-1" || "ap-northeast-2" || "ap-northeast-3" || "ap-south-1" || "ap-southeast-1" || "ap-southeast-2" || "ap-southeast-3" || "ca-central-1" || "cn-north-1" || "cn-northwest-1" || "EU" || "eu-central-1" || "eu-north-1" || "eu-south-1" || "eu-west-1" || "eu-west-2" || "eu-west-3" || "me-south-1" || "sa-east-1" || "us-east-2" || "us-gov-east-1" || "us-gov-west-1" || "us-west-1" || "us-west-2",
65
+ * // LocationConstraint: "af-south-1" || "ap-east-1" || "ap-northeast-1" || "ap-northeast-2" || "ap-northeast-3" || "ap-south-1" || "ap-southeast-1" || "ap-southeast-2" || "ap-southeast-3" || "ca-central-1" || "cn-north-1" || "cn-northwest-1" || "EU" || "eu-central-1" || "eu-north-1" || "eu-south-1" || "eu-west-1" || "eu-west-2" || "eu-west-3" || "me-south-1" || "sa-east-1" || "us-east-2" || "us-gov-east-1" || "us-gov-west-1" || "us-west-1" || "us-west-2" || "ap-south-2" || "eu-south-2",
66
66
  * // };
67
67
  *
68
68
  * ```
@@ -96,7 +96,7 @@ export interface ListBucketInventoryConfigurationsCommandOutput extends ListBuck
96
96
  * // Id: "STRING_VALUE", // required
97
97
  * // IncludedObjectVersions: "All" || "Current", // required
98
98
  * // OptionalFields: [ // InventoryOptionalFields
99
- * // "Size" || "LastModifiedDate" || "StorageClass" || "ETag" || "IsMultipartUploaded" || "ReplicationStatus" || "EncryptionStatus" || "ObjectLockRetainUntilDate" || "ObjectLockMode" || "ObjectLockLegalHoldStatus" || "IntelligentTieringAccessTier" || "BucketKeyStatus" || "ChecksumAlgorithm",
99
+ * // "Size" || "LastModifiedDate" || "StorageClass" || "ETag" || "IsMultipartUploaded" || "ReplicationStatus" || "EncryptionStatus" || "ObjectLockRetainUntilDate" || "ObjectLockMode" || "ObjectLockLegalHoldStatus" || "IntelligentTieringAccessTier" || "BucketKeyStatus" || "ChecksumAlgorithm" || "ObjectAccessControlList" || "ObjectOwner",
100
100
  * // ],
101
101
  * // Schedule: { // InventorySchedule
102
102
  * // Frequency: "Daily" || "Weekly", // required
@@ -138,7 +138,7 @@ export interface PutBucketInventoryConfigurationCommandOutput extends __Metadata
138
138
  * Id: "STRING_VALUE", // required
139
139
  * IncludedObjectVersions: "All" || "Current", // required
140
140
  * OptionalFields: [ // InventoryOptionalFields
141
- * "Size" || "LastModifiedDate" || "StorageClass" || "ETag" || "IsMultipartUploaded" || "ReplicationStatus" || "EncryptionStatus" || "ObjectLockRetainUntilDate" || "ObjectLockMode" || "ObjectLockLegalHoldStatus" || "IntelligentTieringAccessTier" || "BucketKeyStatus" || "ChecksumAlgorithm",
141
+ * "Size" || "LastModifiedDate" || "StorageClass" || "ETag" || "IsMultipartUploaded" || "ReplicationStatus" || "EncryptionStatus" || "ObjectLockRetainUntilDate" || "ObjectLockMode" || "ObjectLockLegalHoldStatus" || "IntelligentTieringAccessTier" || "BucketKeyStatus" || "ChecksumAlgorithm" || "ObjectAccessControlList" || "ObjectOwner",
142
142
  * ],
143
143
  * Schedule: { // InventorySchedule
144
144
  * Frequency: "Daily" || "Weekly", // required
@@ -198,68 +198,65 @@ export interface PutObjectCommandOutput extends PutObjectOutput, __MetadataBeare
198
198
  * @throws {@link S3ServiceException}
199
199
  * <p>Base exception class for all service exceptions from S3 service.</p>
200
200
  *
201
- * @example To upload object and specify user-defined metadata
201
+ * @example To create an object.
202
202
  * ```javascript
203
- * // The following example creates an object. The request also specifies optional metadata. If the bucket is versioning enabled, S3 returns version ID in response.
203
+ * // The following example creates an object. If the bucket is versioning enabled, S3 returns version ID in response.
204
204
  * const input = {
205
205
  * "Body": "filetoupload",
206
206
  * "Bucket": "examplebucket",
207
- * "Key": "exampleobject",
208
- * "Metadata": {
209
- * "metadata1": "value1",
210
- * "metadata2": "value2"
211
- * }
207
+ * "Key": "objectkey"
212
208
  * };
213
209
  * const command = new PutObjectCommand(input);
214
210
  * const response = await client.send(command);
215
211
  * /* response ==
216
212
  * {
217
213
  * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"",
218
- * "VersionId": "pSKidl4pHBiNwukdbcPXAIs.sshFFOc0"
214
+ * "VersionId": "Bvq0EDKxOcXLJXNo_Lkz37eM3R4pfzyQ"
219
215
  * }
220
216
  * *\/
221
- * // example id: to-upload-object-and-specify-user-defined-metadata-1483396974757
217
+ * // example id: to-create-an-object-1483147613675
222
218
  * ```
223
219
  *
224
- * @example To upload an object (specify optional headers)
220
+ * @example To upload object and specify user-defined metadata
225
221
  * ```javascript
226
- * // The following example uploads an object. The request specifies optional request headers to directs S3 to use specific storage class and use server-side encryption.
222
+ * // The following example creates an object. The request also specifies optional metadata. If the bucket is versioning enabled, S3 returns version ID in response.
227
223
  * const input = {
228
- * "Body": "HappyFace.jpg",
224
+ * "Body": "filetoupload",
229
225
  * "Bucket": "examplebucket",
230
- * "Key": "HappyFace.jpg",
231
- * "ServerSideEncryption": "AES256",
232
- * "StorageClass": "STANDARD_IA"
226
+ * "Key": "exampleobject",
227
+ * "Metadata": {
228
+ * "metadata1": "value1",
229
+ * "metadata2": "value2"
230
+ * }
233
231
  * };
234
232
  * const command = new PutObjectCommand(input);
235
233
  * const response = await client.send(command);
236
234
  * /* response ==
237
235
  * {
238
236
  * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"",
239
- * "ServerSideEncryption": "AES256",
240
- * "VersionId": "CG612hodqujkf8FaaNfp8U..FIhLROcp"
237
+ * "VersionId": "pSKidl4pHBiNwukdbcPXAIs.sshFFOc0"
241
238
  * }
242
239
  * *\/
243
- * // example id: to-upload-an-object-(specify-optional-headers)
240
+ * // example id: to-upload-object-and-specify-user-defined-metadata-1483396974757
244
241
  * ```
245
242
  *
246
- * @example To create an object.
243
+ * @example To upload an object
247
244
  * ```javascript
248
- * // The following example creates an object. If the bucket is versioning enabled, S3 returns version ID in response.
245
+ * // The following example uploads an object to a versioning-enabled bucket. The source file is specified using Windows file syntax. S3 returns VersionId of the newly created object.
249
246
  * const input = {
250
- * "Body": "filetoupload",
247
+ * "Body": "HappyFace.jpg",
251
248
  * "Bucket": "examplebucket",
252
- * "Key": "objectkey"
249
+ * "Key": "HappyFace.jpg"
253
250
  * };
254
251
  * const command = new PutObjectCommand(input);
255
252
  * const response = await client.send(command);
256
253
  * /* response ==
257
254
  * {
258
255
  * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"",
259
- * "VersionId": "Bvq0EDKxOcXLJXNo_Lkz37eM3R4pfzyQ"
256
+ * "VersionId": "tpf3zF08nBplQK1XLOefGskR7mGDwcDk"
260
257
  * }
261
258
  * *\/
262
- * // example id: to-create-an-object-1483147613675
259
+ * // example id: to-upload-an-object-1481760101010
263
260
  * ```
264
261
  *
265
262
  * @example To upload an object and specify canned ACL.
@@ -282,33 +279,35 @@ export interface PutObjectCommandOutput extends PutObjectOutput, __MetadataBeare
282
279
  * // example id: to-upload-an-object-and-specify-canned-acl-1483397779571
283
280
  * ```
284
281
  *
285
- * @example To upload an object
282
+ * @example To upload an object (specify optional headers)
286
283
  * ```javascript
287
- * // The following example uploads an object to a versioning-enabled bucket. The source file is specified using Windows file syntax. S3 returns VersionId of the newly created object.
284
+ * // The following example uploads an object. The request specifies optional request headers to directs S3 to use specific storage class and use server-side encryption.
288
285
  * const input = {
289
286
  * "Body": "HappyFace.jpg",
290
287
  * "Bucket": "examplebucket",
291
- * "Key": "HappyFace.jpg"
288
+ * "Key": "HappyFace.jpg",
289
+ * "ServerSideEncryption": "AES256",
290
+ * "StorageClass": "STANDARD_IA"
292
291
  * };
293
292
  * const command = new PutObjectCommand(input);
294
293
  * const response = await client.send(command);
295
294
  * /* response ==
296
295
  * {
297
296
  * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"",
298
- * "VersionId": "tpf3zF08nBplQK1XLOefGskR7mGDwcDk"
297
+ * "ServerSideEncryption": "AES256",
298
+ * "VersionId": "CG612hodqujkf8FaaNfp8U..FIhLROcp"
299
299
  * }
300
300
  * *\/
301
- * // example id: to-upload-an-object-1481760101010
301
+ * // example id: to-upload-an-object-(specify-optional-headers)
302
302
  * ```
303
303
  *
304
- * @example To upload an object and specify server-side encryption and object tags
304
+ * @example To upload an object and specify optional tags
305
305
  * ```javascript
306
- * // The following example uploads an object. The request specifies the optional server-side encryption option. The request also specifies optional object tags. If the bucket is versioning enabled, S3 returns version ID in response.
306
+ * // The following example uploads an object. The request specifies optional object tags. The bucket is versioned, therefore S3 returns version ID of the newly created object.
307
307
  * const input = {
308
- * "Body": "filetoupload",
308
+ * "Body": "c:\\HappyFace.jpg",
309
309
  * "Bucket": "examplebucket",
310
- * "Key": "exampleobject",
311
- * "ServerSideEncryption": "AES256",
310
+ * "Key": "HappyFace.jpg",
312
311
  * "Tagging": "key1=value1&key2=value2"
313
312
  * };
314
313
  * const command = new PutObjectCommand(input);
@@ -316,20 +315,20 @@ export interface PutObjectCommandOutput extends PutObjectOutput, __MetadataBeare
316
315
  * /* response ==
317
316
  * {
318
317
  * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"",
319
- * "ServerSideEncryption": "AES256",
320
- * "VersionId": "Ri.vC6qVlA4dEnjgRV4ZHsHoFIjqEMNt"
318
+ * "VersionId": "psM2sYY4.o1501dSx8wMvnkOzSBB.V4a"
321
319
  * }
322
320
  * *\/
323
- * // example id: to-upload-an-object-and-specify-server-side-encryption-and-object-tags-1483398331831
321
+ * // example id: to-upload-an-object-and-specify-optional-tags-1481762310955
324
322
  * ```
325
323
  *
326
- * @example To upload an object and specify optional tags
324
+ * @example To upload an object and specify server-side encryption and object tags
327
325
  * ```javascript
328
- * // The following example uploads an object. The request specifies optional object tags. The bucket is versioned, therefore S3 returns version ID of the newly created object.
326
+ * // The following example uploads an object. The request specifies the optional server-side encryption option. The request also specifies optional object tags. If the bucket is versioning enabled, S3 returns version ID in response.
329
327
  * const input = {
330
- * "Body": "c:\\HappyFace.jpg",
328
+ * "Body": "filetoupload",
331
329
  * "Bucket": "examplebucket",
332
- * "Key": "HappyFace.jpg",
330
+ * "Key": "exampleobject",
331
+ * "ServerSideEncryption": "AES256",
333
332
  * "Tagging": "key1=value1&key2=value2"
334
333
  * };
335
334
  * const command = new PutObjectCommand(input);
@@ -337,10 +336,11 @@ export interface PutObjectCommandOutput extends PutObjectOutput, __MetadataBeare
337
336
  * /* response ==
338
337
  * {
339
338
  * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"",
340
- * "VersionId": "psM2sYY4.o1501dSx8wMvnkOzSBB.V4a"
339
+ * "ServerSideEncryption": "AES256",
340
+ * "VersionId": "Ri.vC6qVlA4dEnjgRV4ZHsHoFIjqEMNt"
341
341
  * }
342
342
  * *\/
343
- * // example id: to-upload-an-object-and-specify-optional-tags-1481762310955
343
+ * // example id: to-upload-an-object-and-specify-server-side-encryption-and-object-tags-1483398331831
344
344
  * ```
345
345
  *
346
346
  */
@@ -250,14 +250,15 @@ export interface UploadPartCopyCommandOutput extends UploadPartCopyOutput, __Met
250
250
  * @throws {@link S3ServiceException}
251
251
  * <p>Base exception class for all service exceptions from S3 service.</p>
252
252
  *
253
- * @example To upload a part by copying data from an existing object as data source
253
+ * @example To upload a part by copying byte range from an existing object as data source
254
254
  * ```javascript
255
- * // The following example uploads a part of a multipart upload by copying data from an existing object as data source.
255
+ * // The following example uploads a part of a multipart upload by copying a specified byte range from an existing object as data source.
256
256
  * const input = {
257
257
  * "Bucket": "examplebucket",
258
258
  * "CopySource": "/bucketname/sourceobjectkey",
259
+ * "CopySourceRange": "bytes=1-100000",
259
260
  * "Key": "examplelargeobject",
260
- * "PartNumber": "1",
261
+ * "PartNumber": "2",
261
262
  * "UploadId": "exampleuoh_10OhKhT7YukE9bjzTPRiuaCotmZM_pFngJFir9OZNrSr5cWa3cq3LZSUsfjI4FI7PkP91We7Nrw--"
262
263
  * };
263
264
  * const command = new UploadPartCopyCommand(input);
@@ -265,23 +266,22 @@ export interface UploadPartCopyCommandOutput extends UploadPartCopyOutput, __Met
265
266
  * /* response ==
266
267
  * {
267
268
  * "CopyPartResult": {
268
- * "ETag": "\"b0c6f0e7e054ab8fa2536a2677f8734d\"",
269
- * "LastModified": "2016-12-29T21:24:43.000Z"
269
+ * "ETag": "\"65d16d19e65a7508a51f043180edcc36\"",
270
+ * "LastModified": "2016-12-29T21:44:28.000Z"
270
271
  * }
271
272
  * }
272
273
  * *\/
273
- * // example id: to-upload-a-part-by-copying-data-from-an-existing-object-as-data-source-1483046746348
274
+ * // example id: to-upload-a-part-by-copying-byte-range-from-an-existing-object-as-data-source-1483048068594
274
275
  * ```
275
276
  *
276
- * @example To upload a part by copying byte range from an existing object as data source
277
+ * @example To upload a part by copying data from an existing object as data source
277
278
  * ```javascript
278
- * // The following example uploads a part of a multipart upload by copying a specified byte range from an existing object as data source.
279
+ * // The following example uploads a part of a multipart upload by copying data from an existing object as data source.
279
280
  * const input = {
280
281
  * "Bucket": "examplebucket",
281
282
  * "CopySource": "/bucketname/sourceobjectkey",
282
- * "CopySourceRange": "bytes=1-100000",
283
283
  * "Key": "examplelargeobject",
284
- * "PartNumber": "2",
284
+ * "PartNumber": "1",
285
285
  * "UploadId": "exampleuoh_10OhKhT7YukE9bjzTPRiuaCotmZM_pFngJFir9OZNrSr5cWa3cq3LZSUsfjI4FI7PkP91We7Nrw--"
286
286
  * };
287
287
  * const command = new UploadPartCopyCommand(input);
@@ -289,12 +289,12 @@ export interface UploadPartCopyCommandOutput extends UploadPartCopyOutput, __Met
289
289
  * /* response ==
290
290
  * {
291
291
  * "CopyPartResult": {
292
- * "ETag": "\"65d16d19e65a7508a51f043180edcc36\"",
293
- * "LastModified": "2016-12-29T21:44:28.000Z"
292
+ * "ETag": "\"b0c6f0e7e054ab8fa2536a2677f8734d\"",
293
+ * "LastModified": "2016-12-29T21:24:43.000Z"
294
294
  * }
295
295
  * }
296
296
  * *\/
297
- * // example id: to-upload-a-part-by-copying-byte-range-from-an-existing-object-as-data-source-1483048068594
297
+ * // example id: to-upload-a-part-by-copying-data-from-an-existing-object-as-data-source-1483046746348
298
298
  * ```
299
299
  *
300
300
  */
@@ -1056,6 +1056,7 @@ export declare const BucketLocationConstraint: {
1056
1056
  readonly ap_northeast_2: "ap-northeast-2";
1057
1057
  readonly ap_northeast_3: "ap-northeast-3";
1058
1058
  readonly ap_south_1: "ap-south-1";
1059
+ readonly ap_south_2: "ap-south-2";
1059
1060
  readonly ap_southeast_1: "ap-southeast-1";
1060
1061
  readonly ap_southeast_2: "ap-southeast-2";
1061
1062
  readonly ap_southeast_3: "ap-southeast-3";
@@ -1065,6 +1066,7 @@ export declare const BucketLocationConstraint: {
1065
1066
  readonly eu_central_1: "eu-central-1";
1066
1067
  readonly eu_north_1: "eu-north-1";
1067
1068
  readonly eu_south_1: "eu-south-1";
1069
+ readonly eu_south_2: "eu-south-2";
1068
1070
  readonly eu_west_1: "eu-west-1";
1069
1071
  readonly eu_west_2: "eu-west-2";
1070
1072
  readonly eu_west_3: "eu-west-3";
@@ -4470,9 +4472,11 @@ export declare const InventoryOptionalField: {
4470
4472
  readonly IntelligentTieringAccessTier: "IntelligentTieringAccessTier";
4471
4473
  readonly IsMultipartUploaded: "IsMultipartUploaded";
4472
4474
  readonly LastModifiedDate: "LastModifiedDate";
4475
+ readonly ObjectAccessControlList: "ObjectAccessControlList";
4473
4476
  readonly ObjectLockLegalHoldStatus: "ObjectLockLegalHoldStatus";
4474
4477
  readonly ObjectLockMode: "ObjectLockMode";
4475
4478
  readonly ObjectLockRetainUntilDate: "ObjectLockRetainUntilDate";
4479
+ readonly ObjectOwner: "ObjectOwner";
4476
4480
  readonly ReplicationStatus: "ReplicationStatus";
4477
4481
  readonly Size: "Size";
4478
4482
  readonly StorageClass: "StorageClass";
@@ -286,6 +286,7 @@ export declare const BucketLocationConstraint: {
286
286
  readonly ap_northeast_2: "ap-northeast-2";
287
287
  readonly ap_northeast_3: "ap-northeast-3";
288
288
  readonly ap_south_1: "ap-south-1";
289
+ readonly ap_south_2: "ap-south-2";
289
290
  readonly ap_southeast_1: "ap-southeast-1";
290
291
  readonly ap_southeast_2: "ap-southeast-2";
291
292
  readonly ap_southeast_3: "ap-southeast-3";
@@ -295,6 +296,7 @@ export declare const BucketLocationConstraint: {
295
296
  readonly eu_central_1: "eu-central-1";
296
297
  readonly eu_north_1: "eu-north-1";
297
298
  readonly eu_south_1: "eu-south-1";
299
+ readonly eu_south_2: "eu-south-2";
298
300
  readonly eu_west_1: "eu-west-1";
299
301
  readonly eu_west_2: "eu-west-2";
300
302
  readonly eu_west_3: "eu-west-3";
@@ -708,9 +710,11 @@ export declare const InventoryOptionalField: {
708
710
  readonly IntelligentTieringAccessTier: "IntelligentTieringAccessTier";
709
711
  readonly IsMultipartUploaded: "IsMultipartUploaded";
710
712
  readonly LastModifiedDate: "LastModifiedDate";
713
+ readonly ObjectAccessControlList: "ObjectAccessControlList";
711
714
  readonly ObjectLockLegalHoldStatus: "ObjectLockLegalHoldStatus";
712
715
  readonly ObjectLockMode: "ObjectLockMode";
713
716
  readonly ObjectLockRetainUntilDate: "ObjectLockRetainUntilDate";
717
+ readonly ObjectOwner: "ObjectOwner";
714
718
  readonly ReplicationStatus: "ReplicationStatus";
715
719
  readonly Size: "Size";
716
720
  readonly StorageClass: "StorageClass";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-s3",
3
3
  "description": "AWS SDK for JavaScript S3 Client for Node.js, Browser and React Native",
4
- "version": "3.369.0",
4
+ "version": "3.373.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -25,43 +25,43 @@
25
25
  "@aws-crypto/sha1-browser": "3.0.0",
26
26
  "@aws-crypto/sha256-browser": "3.0.0",
27
27
  "@aws-crypto/sha256-js": "3.0.0",
28
- "@aws-sdk/client-sts": "3.369.0",
29
- "@aws-sdk/credential-provider-node": "3.369.0",
30
- "@aws-sdk/hash-blob-browser": "3.369.0",
31
- "@aws-sdk/hash-stream-node": "3.369.0",
32
- "@aws-sdk/md5-js": "3.369.0",
33
- "@aws-sdk/middleware-bucket-endpoint": "3.369.0",
34
- "@aws-sdk/middleware-expect-continue": "3.369.0",
35
- "@aws-sdk/middleware-flexible-checksums": "3.369.0",
36
- "@aws-sdk/middleware-host-header": "3.369.0",
37
- "@aws-sdk/middleware-location-constraint": "3.369.0",
38
- "@aws-sdk/middleware-logger": "3.369.0",
39
- "@aws-sdk/middleware-recursion-detection": "3.369.0",
40
- "@aws-sdk/middleware-sdk-s3": "3.369.0",
41
- "@aws-sdk/middleware-signing": "3.369.0",
42
- "@aws-sdk/middleware-ssec": "3.369.0",
43
- "@aws-sdk/middleware-user-agent": "3.369.0",
44
- "@aws-sdk/signature-v4-multi-region": "3.369.0",
45
- "@aws-sdk/types": "3.369.0",
46
- "@aws-sdk/util-endpoints": "3.369.0",
47
- "@aws-sdk/util-user-agent-browser": "3.369.0",
48
- "@aws-sdk/util-user-agent-node": "3.369.0",
28
+ "@aws-sdk/client-sts": "3.370.0",
29
+ "@aws-sdk/credential-provider-node": "3.370.0",
30
+ "@aws-sdk/hash-stream-node": "3.370.0",
31
+ "@aws-sdk/middleware-bucket-endpoint": "3.370.0",
32
+ "@aws-sdk/middleware-expect-continue": "3.370.0",
33
+ "@aws-sdk/middleware-flexible-checksums": "3.370.0",
34
+ "@aws-sdk/middleware-host-header": "3.370.0",
35
+ "@aws-sdk/middleware-location-constraint": "3.370.0",
36
+ "@aws-sdk/middleware-logger": "3.370.0",
37
+ "@aws-sdk/middleware-recursion-detection": "3.370.0",
38
+ "@aws-sdk/middleware-sdk-s3": "3.370.0",
39
+ "@aws-sdk/middleware-signing": "3.370.0",
40
+ "@aws-sdk/middleware-ssec": "3.370.0",
41
+ "@aws-sdk/middleware-user-agent": "3.370.0",
42
+ "@aws-sdk/signature-v4-multi-region": "3.370.0",
43
+ "@aws-sdk/types": "3.370.0",
44
+ "@aws-sdk/util-endpoints": "3.370.0",
45
+ "@aws-sdk/util-user-agent-browser": "3.370.0",
46
+ "@aws-sdk/util-user-agent-node": "3.370.0",
49
47
  "@aws-sdk/xml-builder": "3.310.0",
50
48
  "@smithy/config-resolver": "^1.0.1",
51
49
  "@smithy/eventstream-serde-browser": "^1.0.1",
52
50
  "@smithy/eventstream-serde-config-resolver": "^1.0.1",
53
51
  "@smithy/eventstream-serde-node": "^1.0.1",
54
52
  "@smithy/fetch-http-handler": "^1.0.1",
53
+ "@smithy/hash-blob-browser": "^1.0.1",
55
54
  "@smithy/hash-node": "^1.0.1",
56
55
  "@smithy/invalid-dependency": "^1.0.1",
56
+ "@smithy/md5-js": "^1.0.1",
57
57
  "@smithy/middleware-content-length": "^1.0.1",
58
- "@smithy/middleware-endpoint": "^1.0.1",
59
- "@smithy/middleware-retry": "^1.0.2",
58
+ "@smithy/middleware-endpoint": "^1.0.2",
59
+ "@smithy/middleware-retry": "^1.0.3",
60
60
  "@smithy/middleware-serde": "^1.0.1",
61
61
  "@smithy/middleware-stack": "^1.0.1",
62
62
  "@smithy/node-config-provider": "^1.0.1",
63
63
  "@smithy/node-http-handler": "^1.0.2",
64
- "@smithy/protocol-http": "^1.0.1",
64
+ "@smithy/protocol-http": "^1.1.0",
65
65
  "@smithy/smithy-client": "^1.0.3",
66
66
  "@smithy/types": "^1.1.0",
67
67
  "@smithy/url-parser": "^1.0.1",
@@ -70,7 +70,7 @@
70
70
  "@smithy/util-body-length-node": "^1.0.1",
71
71
  "@smithy/util-defaults-mode-browser": "^1.0.1",
72
72
  "@smithy/util-defaults-mode-node": "^1.0.1",
73
- "@smithy/util-retry": "^1.0.2",
73
+ "@smithy/util-retry": "^1.0.3",
74
74
  "@smithy/util-stream": "^1.0.1",
75
75
  "@smithy/util-utf8": "^1.0.1",
76
76
  "@smithy/util-waiter": "^1.0.1",
@@ -78,7 +78,6 @@
78
78
  "tslib": "^2.5.0"
79
79
  },
80
80
  "devDependencies": {
81
- "@aws-sdk/service-client-documentation-generator": "3.310.0",
82
81
  "@smithy/service-client-documentation-generator": "^1.0.1",
83
82
  "@tsconfig/node14": "1.0.3",
84
83
  "@types/chai": "^4.2.11",