@aws-sdk/client-s3 3.287.0 → 3.289.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.
Files changed (54) hide show
  1. package/dist-types/commands/AbortMultipartUploadCommand.d.ts +13 -0
  2. package/dist-types/commands/CompleteMultipartUploadCommand.d.ts +33 -0
  3. package/dist-types/commands/CopyObjectCommand.d.ts +21 -0
  4. package/dist-types/commands/CreateBucketCommand.d.ts +35 -0
  5. package/dist-types/commands/CreateMultipartUploadCommand.d.ts +19 -0
  6. package/dist-types/commands/DeleteBucketCommand.d.ts +11 -0
  7. package/dist-types/commands/DeleteBucketCorsCommand.d.ts +11 -0
  8. package/dist-types/commands/DeleteBucketLifecycleCommand.d.ts +11 -0
  9. package/dist-types/commands/DeleteBucketPolicyCommand.d.ts +11 -0
  10. package/dist-types/commands/DeleteBucketReplicationCommand.d.ts +11 -0
  11. package/dist-types/commands/DeleteBucketTaggingCommand.d.ts +11 -0
  12. package/dist-types/commands/DeleteBucketWebsiteCommand.d.ts +11 -0
  13. package/dist-types/commands/DeleteObjectCommand.d.ts +24 -0
  14. package/dist-types/commands/DeleteObjectTaggingCommand.d.ts +35 -0
  15. package/dist-types/commands/DeleteObjectsCommand.d.ts +76 -0
  16. package/dist-types/commands/GetBucketCorsCommand.d.ts +29 -0
  17. package/dist-types/commands/GetBucketLifecycleConfigurationCommand.d.ts +28 -0
  18. package/dist-types/commands/GetBucketLocationCommand.d.ts +16 -0
  19. package/dist-types/commands/GetBucketPolicyCommand.d.ts +16 -0
  20. package/dist-types/commands/GetBucketReplicationCommand.d.ts +28 -0
  21. package/dist-types/commands/GetBucketRequestPaymentCommand.d.ts +16 -0
  22. package/dist-types/commands/GetBucketTaggingCommand.d.ts +25 -0
  23. package/dist-types/commands/GetBucketVersioningCommand.d.ts +17 -0
  24. package/dist-types/commands/GetBucketWebsiteCommand.d.ts +21 -0
  25. package/dist-types/commands/GetObjectAclCommand.d.ts +54 -0
  26. package/dist-types/commands/GetObjectCommand.d.ts +49 -0
  27. package/dist-types/commands/GetObjectTaggingCommand.d.ts +51 -0
  28. package/dist-types/commands/GetObjectTorrentCommand.d.ts +12 -0
  29. package/dist-types/commands/HeadBucketCommand.d.ts +11 -0
  30. package/dist-types/commands/HeadObjectCommand.d.ts +23 -0
  31. package/dist-types/commands/ListBucketsCommand.d.ts +31 -0
  32. package/dist-types/commands/ListMultipartUploadsCommand.d.ts +100 -0
  33. package/dist-types/commands/ListObjectVersionsCommand.d.ts +44 -0
  34. package/dist-types/commands/ListObjectsCommand.d.ts +41 -0
  35. package/dist-types/commands/ListObjectsV2Command.d.ts +38 -0
  36. package/dist-types/commands/ListPartsCommand.d.ts +40 -0
  37. package/dist-types/commands/PutBucketAclCommand.d.ts +13 -0
  38. package/dist-types/commands/PutBucketCorsCommand.d.ts +45 -0
  39. package/dist-types/commands/PutBucketLifecycleConfigurationCommand.d.ts +31 -0
  40. package/dist-types/commands/PutBucketLoggingCommand.d.ts +26 -0
  41. package/dist-types/commands/PutBucketNotificationConfigurationCommand.d.ts +21 -0
  42. package/dist-types/commands/PutBucketPolicyCommand.d.ts +12 -0
  43. package/dist-types/commands/PutBucketReplicationCommand.d.ts +24 -0
  44. package/dist-types/commands/PutBucketRequestPaymentCommand.d.ts +14 -0
  45. package/dist-types/commands/PutBucketTaggingCommand.d.ts +23 -0
  46. package/dist-types/commands/PutBucketVersioningCommand.d.ts +15 -0
  47. package/dist-types/commands/PutBucketWebsiteCommand.d.ts +20 -0
  48. package/dist-types/commands/PutObjectAclCommand.d.ts +15 -0
  49. package/dist-types/commands/PutObjectCommand.d.ts +145 -0
  50. package/dist-types/commands/PutObjectTaggingCommand.d.ts +29 -0
  51. package/dist-types/commands/RestoreObjectCommand.d.ts +18 -0
  52. package/dist-types/commands/UploadPartCommand.d.ts +20 -0
  53. package/dist-types/commands/UploadPartCopyCommand.d.ts +47 -0
  54. package/package.json +45 -45
@@ -67,6 +67,19 @@ export interface AbortMultipartUploadCommandOutput extends AbortMultipartUploadO
67
67
  * @see {@link AbortMultipartUploadCommandOutput} for command's `response` shape.
68
68
  * @see {@link S3ClientResolvedConfig | config} for S3Client's `config` shape.
69
69
  *
70
+ * @example To abort a multipart upload
71
+ * ```javascript
72
+ * // The following example aborts a multipart upload.
73
+ * const input = {
74
+ * "Bucket": "examplebucket",
75
+ * "Key": "bigobject",
76
+ * "UploadId": "xadcOB_7YPBOJuoFiQ9cz4P3Pe6FIZwO4f7wN93uHsNBEw97pl5eNwzExg0LAT2dUN91cOmrEQHDsP3WA60CEg--"
77
+ * };
78
+ * const command = new AbortMultipartUploadCommand(input);
79
+ * await client.send(command);
80
+ * // example id: to-abort-a-multipart-upload-1481853354987
81
+ * ```
82
+ *
70
83
  */
71
84
  export declare class AbortMultipartUploadCommand extends $Command<AbortMultipartUploadCommandInput, AbortMultipartUploadCommandOutput, S3ClientResolvedConfig> {
72
85
  readonly input: AbortMultipartUploadCommandInput;
@@ -139,6 +139,39 @@ export interface CompleteMultipartUploadCommandOutput extends CompleteMultipartU
139
139
  * @see {@link CompleteMultipartUploadCommandOutput} for command's `response` shape.
140
140
  * @see {@link S3ClientResolvedConfig | config} for S3Client's `config` shape.
141
141
  *
142
+ * @example To complete multipart upload
143
+ * ```javascript
144
+ * // The following example completes a multipart upload.
145
+ * const input = {
146
+ * "Bucket": "examplebucket",
147
+ * "Key": "bigobject",
148
+ * "MultipartUpload": {
149
+ * "Parts": [
150
+ * {
151
+ * "ETag": "\"d8c2eafd90c266e19ab9dcacc479f8af\"",
152
+ * "PartNumber": "1"
153
+ * },
154
+ * {
155
+ * "ETag": "\"d8c2eafd90c266e19ab9dcacc479f8af\"",
156
+ * "PartNumber": "2"
157
+ * }
158
+ * ]
159
+ * },
160
+ * "UploadId": "7YPBOJuoFiQ9cz4P3Pe6FIZwO4f7wN93uHsNBEw97pl5eNwzExg0LAT2dUN91cOmrEQHDsP3WA60CEg--"
161
+ * };
162
+ * const command = new CompleteMultipartUploadCommand(input);
163
+ * const response = await client.send(command);
164
+ * /* response ==
165
+ * {
166
+ * "Bucket": "acexamplebucket",
167
+ * "ETag": "\"4d9031c7644d8081c2829f4ea23c55f7-2\"",
168
+ * "Key": "bigobject",
169
+ * "Location": "https://examplebucket.s3.<Region>.amazonaws.com/bigobject"
170
+ * }
171
+ * *\/
172
+ * // example id: to-complete-multipart-upload-1481851590483
173
+ * ```
174
+ *
142
175
  */
143
176
  export declare class CompleteMultipartUploadCommand extends $Command<CompleteMultipartUploadCommandInput, CompleteMultipartUploadCommandOutput, S3ClientResolvedConfig> {
144
177
  readonly input: CompleteMultipartUploadCommandInput;
@@ -212,6 +212,27 @@ export interface CopyObjectCommandOutput extends CopyObjectOutput, __MetadataBea
212
212
  * @see {@link CopyObjectCommandOutput} for command's `response` shape.
213
213
  * @see {@link S3ClientResolvedConfig | config} for S3Client's `config` shape.
214
214
  *
215
+ * @example To copy an object
216
+ * ```javascript
217
+ * // The following example copies an object from one bucket to another.
218
+ * const input = {
219
+ * "Bucket": "destinationbucket",
220
+ * "CopySource": "/sourcebucket/HappyFacejpg",
221
+ * "Key": "HappyFaceCopyjpg"
222
+ * };
223
+ * const command = new CopyObjectCommand(input);
224
+ * const response = await client.send(command);
225
+ * /* response ==
226
+ * {
227
+ * "CopyObjectResult": {
228
+ * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"",
229
+ * "LastModified": "2016-12-15T17:38:53.000Z"
230
+ * }
231
+ * }
232
+ * *\/
233
+ * // example id: to-copy-an-object-1481823186878
234
+ * ```
235
+ *
215
236
  */
216
237
  export declare class CopyObjectCommand extends $Command<CopyObjectCommandInput, CopyObjectCommandOutput, S3ClientResolvedConfig> {
217
238
  readonly input: CopyObjectCommandInput;
@@ -174,6 +174,41 @@ export interface CreateBucketCommandOutput extends CreateBucketOutput, __Metadat
174
174
  * @see {@link CreateBucketCommandOutput} for command's `response` shape.
175
175
  * @see {@link S3ClientResolvedConfig | config} for S3Client's `config` shape.
176
176
  *
177
+ * @example To create a bucket in a specific region
178
+ * ```javascript
179
+ * // The following example creates a bucket. The request specifies an AWS region where to create the bucket.
180
+ * const input = {
181
+ * "Bucket": "examplebucket",
182
+ * "CreateBucketConfiguration": {
183
+ * "LocationConstraint": "eu-west-1"
184
+ * }
185
+ * };
186
+ * const command = new CreateBucketCommand(input);
187
+ * const response = await client.send(command);
188
+ * /* response ==
189
+ * {
190
+ * "Location": "http://examplebucket.<Region>.s3.amazonaws.com/"
191
+ * }
192
+ * *\/
193
+ * // example id: to-create-a-bucket-in-a-specific-region-1483399072992
194
+ * ```
195
+ *
196
+ * @example To create a bucket
197
+ * ```javascript
198
+ * // The following example creates a bucket.
199
+ * const input = {
200
+ * "Bucket": "examplebucket"
201
+ * };
202
+ * const command = new CreateBucketCommand(input);
203
+ * const response = await client.send(command);
204
+ * /* response ==
205
+ * {
206
+ * "Location": "/examplebucket"
207
+ * }
208
+ * *\/
209
+ * // example id: to-create-a-bucket--1472851826060
210
+ * ```
211
+ *
177
212
  */
178
213
  export declare class CreateBucketCommand extends $Command<CreateBucketCommandInput, CreateBucketCommandOutput, S3ClientResolvedConfig> {
179
214
  readonly input: CreateBucketCommandInput;
@@ -296,6 +296,25 @@ export interface CreateMultipartUploadCommandOutput extends CreateMultipartUploa
296
296
  * @see {@link CreateMultipartUploadCommandOutput} for command's `response` shape.
297
297
  * @see {@link S3ClientResolvedConfig | config} for S3Client's `config` shape.
298
298
  *
299
+ * @example To initiate a multipart upload
300
+ * ```javascript
301
+ * // The following example initiates a multipart upload.
302
+ * const input = {
303
+ * "Bucket": "examplebucket",
304
+ * "Key": "largeobject"
305
+ * };
306
+ * const command = new CreateMultipartUploadCommand(input);
307
+ * const response = await client.send(command);
308
+ * /* response ==
309
+ * {
310
+ * "Bucket": "examplebucket",
311
+ * "Key": "largeobject",
312
+ * "UploadId": "ibZBv_75gd9r8lH_gqXatLdxMVpAlj6ZQjEs.OwyF3953YdwbcQnMA2BLGn8Lx12fQNICtMw5KyteFeHw.Sjng--"
313
+ * }
314
+ * *\/
315
+ * // example id: to-initiate-a-multipart-upload-1481836794513
316
+ * ```
317
+ *
299
318
  */
300
319
  export declare class CreateMultipartUploadCommand extends $Command<CreateMultipartUploadCommandInput, CreateMultipartUploadCommandOutput, S3ClientResolvedConfig> {
301
320
  readonly input: CreateMultipartUploadCommandInput;
@@ -45,6 +45,17 @@ export interface DeleteBucketCommandOutput extends __MetadataBearer {
45
45
  * @see {@link DeleteBucketCommandOutput} for command's `response` shape.
46
46
  * @see {@link S3ClientResolvedConfig | config} for S3Client's `config` shape.
47
47
  *
48
+ * @example To delete a bucket
49
+ * ```javascript
50
+ * // The following example deletes the specified bucket.
51
+ * const input = {
52
+ * "Bucket": "forrandall2"
53
+ * };
54
+ * const command = new DeleteBucketCommand(input);
55
+ * await client.send(command);
56
+ * // example id: to-delete-a-bucket-1473108514262
57
+ * ```
58
+ *
48
59
  */
49
60
  export declare class DeleteBucketCommand extends $Command<DeleteBucketCommandInput, DeleteBucketCommandOutput, S3ClientResolvedConfig> {
50
61
  readonly input: DeleteBucketCommandInput;
@@ -49,6 +49,17 @@ export interface DeleteBucketCorsCommandOutput extends __MetadataBearer {
49
49
  * @see {@link DeleteBucketCorsCommandOutput} for command's `response` shape.
50
50
  * @see {@link S3ClientResolvedConfig | config} for S3Client's `config` shape.
51
51
  *
52
+ * @example To delete cors configuration on a bucket.
53
+ * ```javascript
54
+ * // The following example deletes CORS configuration on a bucket.
55
+ * const input = {
56
+ * "Bucket": "examplebucket"
57
+ * };
58
+ * const command = new DeleteBucketCorsCommand(input);
59
+ * await client.send(command);
60
+ * // example id: to-delete-cors-configuration-on-a-bucket-1483042856112
61
+ * ```
62
+ *
52
63
  */
53
64
  export declare class DeleteBucketCorsCommand extends $Command<DeleteBucketCorsCommandInput, DeleteBucketCorsCommandOutput, S3ClientResolvedConfig> {
54
65
  readonly input: DeleteBucketCorsCommandInput;
@@ -52,6 +52,17 @@ export interface DeleteBucketLifecycleCommandOutput extends __MetadataBearer {
52
52
  * @see {@link DeleteBucketLifecycleCommandOutput} for command's `response` shape.
53
53
  * @see {@link S3ClientResolvedConfig | config} for S3Client's `config` shape.
54
54
  *
55
+ * @example To delete lifecycle configuration on a bucket.
56
+ * ```javascript
57
+ * // The following example deletes lifecycle configuration on a bucket.
58
+ * const input = {
59
+ * "Bucket": "examplebucket"
60
+ * };
61
+ * const command = new DeleteBucketLifecycleCommand(input);
62
+ * await client.send(command);
63
+ * // example id: to-delete-lifecycle-configuration-on-a-bucket-1483043310583
64
+ * ```
65
+ *
55
66
  */
56
67
  export declare class DeleteBucketLifecycleCommand extends $Command<DeleteBucketLifecycleCommandInput, DeleteBucketLifecycleCommandOutput, S3ClientResolvedConfig> {
57
68
  readonly input: DeleteBucketLifecycleCommandInput;
@@ -58,6 +58,17 @@ export interface DeleteBucketPolicyCommandOutput extends __MetadataBearer {
58
58
  * @see {@link DeleteBucketPolicyCommandOutput} for command's `response` shape.
59
59
  * @see {@link S3ClientResolvedConfig | config} for S3Client's `config` shape.
60
60
  *
61
+ * @example To delete bucket policy
62
+ * ```javascript
63
+ * // The following example deletes bucket policy on the specified bucket.
64
+ * const input = {
65
+ * "Bucket": "examplebucket"
66
+ * };
67
+ * const command = new DeleteBucketPolicyCommand(input);
68
+ * await client.send(command);
69
+ * // example id: to-delete-bucket-policy-1483043406577
70
+ * ```
71
+ *
61
72
  */
62
73
  export declare class DeleteBucketPolicyCommand extends $Command<DeleteBucketPolicyCommandInput, DeleteBucketPolicyCommandOutput, S3ClientResolvedConfig> {
63
74
  readonly input: DeleteBucketPolicyCommandInput;
@@ -52,6 +52,17 @@ export interface DeleteBucketReplicationCommandOutput extends __MetadataBearer {
52
52
  * @see {@link DeleteBucketReplicationCommandOutput} for command's `response` shape.
53
53
  * @see {@link S3ClientResolvedConfig | config} for S3Client's `config` shape.
54
54
  *
55
+ * @example To delete bucket replication configuration
56
+ * ```javascript
57
+ * // The following example deletes replication configuration set on bucket.
58
+ * const input = {
59
+ * "Bucket": "example"
60
+ * };
61
+ * const command = new DeleteBucketReplicationCommand(input);
62
+ * await client.send(command);
63
+ * // example id: to-delete-bucket-replication-configuration-1483043684668
64
+ * ```
65
+ *
55
66
  */
56
67
  export declare class DeleteBucketReplicationCommand extends $Command<DeleteBucketReplicationCommandInput, DeleteBucketReplicationCommandOutput, S3ClientResolvedConfig> {
57
68
  readonly input: DeleteBucketReplicationCommandInput;
@@ -45,6 +45,17 @@ export interface DeleteBucketTaggingCommandOutput extends __MetadataBearer {
45
45
  * @see {@link DeleteBucketTaggingCommandOutput} for command's `response` shape.
46
46
  * @see {@link S3ClientResolvedConfig | config} for S3Client's `config` shape.
47
47
  *
48
+ * @example To delete bucket tags
49
+ * ```javascript
50
+ * // The following example deletes bucket tags.
51
+ * const input = {
52
+ * "Bucket": "examplebucket"
53
+ * };
54
+ * const command = new DeleteBucketTaggingCommand(input);
55
+ * await client.send(command);
56
+ * // example id: to-delete-bucket-tags-1483043846509
57
+ * ```
58
+ *
48
59
  */
49
60
  export declare class DeleteBucketTaggingCommand extends $Command<DeleteBucketTaggingCommandInput, DeleteBucketTaggingCommandOutput, S3ClientResolvedConfig> {
50
61
  readonly input: DeleteBucketTaggingCommandInput;
@@ -52,6 +52,17 @@ export interface DeleteBucketWebsiteCommandOutput extends __MetadataBearer {
52
52
  * @see {@link DeleteBucketWebsiteCommandOutput} for command's `response` shape.
53
53
  * @see {@link S3ClientResolvedConfig | config} for S3Client's `config` shape.
54
54
  *
55
+ * @example To delete bucket website configuration
56
+ * ```javascript
57
+ * // The following example deletes bucket website configuration.
58
+ * const input = {
59
+ * "Bucket": "examplebucket"
60
+ * };
61
+ * const command = new DeleteBucketWebsiteCommand(input);
62
+ * await client.send(command);
63
+ * // example id: to-delete-bucket-website-configuration-1483043937825
64
+ * ```
65
+ *
55
66
  */
56
67
  export declare class DeleteBucketWebsiteCommand extends $Command<DeleteBucketWebsiteCommandInput, DeleteBucketWebsiteCommandOutput, S3ClientResolvedConfig> {
57
68
  readonly input: DeleteBucketWebsiteCommandInput;
@@ -54,6 +54,30 @@ export interface DeleteObjectCommandOutput extends DeleteObjectOutput, __Metadat
54
54
  * @see {@link DeleteObjectCommandOutput} for command's `response` shape.
55
55
  * @see {@link S3ClientResolvedConfig | config} for S3Client's `config` shape.
56
56
  *
57
+ * @example To delete an object (from a non-versioned bucket)
58
+ * ```javascript
59
+ * // The following example deletes an object from a non-versioned bucket.
60
+ * const input = {
61
+ * "Bucket": "ExampleBucket",
62
+ * "Key": "HappyFace.jpg"
63
+ * };
64
+ * const command = new DeleteObjectCommand(input);
65
+ * await client.send(command);
66
+ * // example id: to-delete-an-object-from-a-non-versioned-bucket-1481588533089
67
+ * ```
68
+ *
69
+ * @example To delete an object
70
+ * ```javascript
71
+ * // The following example deletes an object from an S3 bucket.
72
+ * const input = {
73
+ * "Bucket": "examplebucket",
74
+ * "Key": "objectkey.jpg"
75
+ * };
76
+ * const command = new DeleteObjectCommand(input);
77
+ * await client.send(command);
78
+ * // example id: to-delete-an-object-1472850136595
79
+ * ```
80
+ *
57
81
  */
58
82
  export declare class DeleteObjectCommand extends $Command<DeleteObjectCommandInput, DeleteObjectCommandOutput, S3ClientResolvedConfig> {
59
83
  readonly input: DeleteObjectCommandInput;
@@ -50,6 +50,41 @@ export interface DeleteObjectTaggingCommandOutput extends DeleteObjectTaggingOut
50
50
  * @see {@link DeleteObjectTaggingCommandOutput} for command's `response` shape.
51
51
  * @see {@link S3ClientResolvedConfig | config} for S3Client's `config` shape.
52
52
  *
53
+ * @example To remove tag set from an object
54
+ * ```javascript
55
+ * // 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.
56
+ * const input = {
57
+ * "Bucket": "examplebucket",
58
+ * "Key": "HappyFace.jpg"
59
+ * };
60
+ * const command = new DeleteObjectTaggingCommand(input);
61
+ * const response = await client.send(command);
62
+ * /* response ==
63
+ * {
64
+ * "VersionId": "null"
65
+ * }
66
+ * *\/
67
+ * // example id: to-remove-tag-set-from-an-object-1483145342862
68
+ * ```
69
+ *
70
+ * @example To remove tag set from an object version
71
+ * ```javascript
72
+ * // The following example removes tag set associated with the specified object version. The request specifies both the object key and object version.
73
+ * const input = {
74
+ * "Bucket": "examplebucket",
75
+ * "Key": "HappyFace.jpg",
76
+ * "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI"
77
+ * };
78
+ * const command = new DeleteObjectTaggingCommand(input);
79
+ * const response = await client.send(command);
80
+ * /* response ==
81
+ * {
82
+ * "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI"
83
+ * }
84
+ * *\/
85
+ * // example id: to-remove-tag-set-from-an-object-version-1483145285913
86
+ * ```
87
+ *
53
88
  */
54
89
  export declare class DeleteObjectTaggingCommand extends $Command<DeleteObjectTaggingCommandInput, DeleteObjectTaggingCommandOutput, S3ClientResolvedConfig> {
55
90
  readonly input: DeleteObjectTaggingCommandInput;
@@ -80,6 +80,82 @@ export interface DeleteObjectsCommandOutput extends DeleteObjectsOutput, __Metad
80
80
  * @see {@link DeleteObjectsCommandOutput} for command's `response` shape.
81
81
  * @see {@link S3ClientResolvedConfig | config} for S3Client's `config` shape.
82
82
  *
83
+ * @example To delete multiple objects from a versioned bucket
84
+ * ```javascript
85
+ * // 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.
86
+ * const input = {
87
+ * "Bucket": "examplebucket",
88
+ * "Delete": {
89
+ * "Objects": [
90
+ * {
91
+ * "Key": "objectkey1"
92
+ * },
93
+ * {
94
+ * "Key": "objectkey2"
95
+ * }
96
+ * ],
97
+ * "Quiet": false
98
+ * }
99
+ * };
100
+ * const command = new DeleteObjectsCommand(input);
101
+ * const response = await client.send(command);
102
+ * /* response ==
103
+ * {
104
+ * "Deleted": [
105
+ * {
106
+ * "DeleteMarker": "true",
107
+ * "DeleteMarkerVersionId": "A._w1z6EFiCF5uhtQMDal9JDkID9tQ7F",
108
+ * "Key": "objectkey1"
109
+ * },
110
+ * {
111
+ * "DeleteMarker": "true",
112
+ * "DeleteMarkerVersionId": "iOd_ORxhkKe_e8G8_oSGxt2PjsCZKlkt",
113
+ * "Key": "objectkey2"
114
+ * }
115
+ * ]
116
+ * }
117
+ * *\/
118
+ * // example id: to-delete-multiple-objects-from-a-versioned-bucket-1483146248805
119
+ * ```
120
+ *
121
+ * @example To delete multiple object versions from a versioned bucket
122
+ * ```javascript
123
+ * // 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.
124
+ * const input = {
125
+ * "Bucket": "examplebucket",
126
+ * "Delete": {
127
+ * "Objects": [
128
+ * {
129
+ * "Key": "HappyFace.jpg",
130
+ * "VersionId": "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b"
131
+ * },
132
+ * {
133
+ * "Key": "HappyFace.jpg",
134
+ * "VersionId": "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd"
135
+ * }
136
+ * ],
137
+ * "Quiet": false
138
+ * }
139
+ * };
140
+ * const command = new DeleteObjectsCommand(input);
141
+ * const response = await client.send(command);
142
+ * /* response ==
143
+ * {
144
+ * "Deleted": [
145
+ * {
146
+ * "Key": "HappyFace.jpg",
147
+ * "VersionId": "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd"
148
+ * },
149
+ * {
150
+ * "Key": "HappyFace.jpg",
151
+ * "VersionId": "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b"
152
+ * }
153
+ * ]
154
+ * }
155
+ * *\/
156
+ * // example id: to-delete-multiple-object-versions-from-a-versioned-bucket-1483147087737
157
+ * ```
158
+ *
83
159
  */
84
160
  export declare class DeleteObjectsCommand extends $Command<DeleteObjectsCommandInput, DeleteObjectsCommandOutput, S3ClientResolvedConfig> {
85
161
  readonly input: DeleteObjectsCommandInput;
@@ -48,6 +48,35 @@ export interface GetBucketCorsCommandOutput extends GetBucketCorsOutput, __Metad
48
48
  * @see {@link GetBucketCorsCommandOutput} for command's `response` shape.
49
49
  * @see {@link S3ClientResolvedConfig | config} for S3Client's `config` shape.
50
50
  *
51
+ * @example To get cors configuration set on a bucket
52
+ * ```javascript
53
+ * // The following example returns cross-origin resource sharing (CORS) configuration set on a bucket.
54
+ * const input = {
55
+ * "Bucket": "examplebucket"
56
+ * };
57
+ * const command = new GetBucketCorsCommand(input);
58
+ * const response = await client.send(command);
59
+ * /* response ==
60
+ * {
61
+ * "CORSRules": [
62
+ * {
63
+ * "AllowedHeaders": [
64
+ * "Authorization"
65
+ * ],
66
+ * "AllowedMethods": [
67
+ * "GET"
68
+ * ],
69
+ * "AllowedOrigins": [
70
+ * "*"
71
+ * ],
72
+ * "MaxAgeSeconds": 3000
73
+ * }
74
+ * ]
75
+ * }
76
+ * *\/
77
+ * // example id: to-get-cors-configuration-set-on-a-bucket-1481596855475
78
+ * ```
79
+ *
51
80
  */
52
81
  export declare class GetBucketCorsCommand extends $Command<GetBucketCorsCommandInput, GetBucketCorsCommandOutput, S3ClientResolvedConfig> {
53
82
  readonly input: GetBucketCorsCommandInput;
@@ -82,6 +82,34 @@ export interface GetBucketLifecycleConfigurationCommandOutput extends GetBucketL
82
82
  * @see {@link GetBucketLifecycleConfigurationCommandOutput} for command's `response` shape.
83
83
  * @see {@link S3ClientResolvedConfig | config} for S3Client's `config` shape.
84
84
  *
85
+ * @example To get lifecycle configuration on a bucket
86
+ * ```javascript
87
+ * // The following example retrieves lifecycle configuration on set on a bucket.
88
+ * const input = {
89
+ * "Bucket": "examplebucket"
90
+ * };
91
+ * const command = new GetBucketLifecycleConfigurationCommand(input);
92
+ * const response = await client.send(command);
93
+ * /* response ==
94
+ * {
95
+ * "Rules": [
96
+ * {
97
+ * "ID": "Rule for TaxDocs/",
98
+ * "Prefix": "TaxDocs",
99
+ * "Status": "Enabled",
100
+ * "Transitions": [
101
+ * {
102
+ * "Days": 365,
103
+ * "StorageClass": "STANDARD_IA"
104
+ * }
105
+ * ]
106
+ * }
107
+ * ]
108
+ * }
109
+ * *\/
110
+ * // example id: to-get-lifecycle-configuration-on-a-bucket-1481666063200
111
+ * ```
112
+ *
85
113
  */
86
114
  export declare class GetBucketLifecycleConfigurationCommand extends $Command<GetBucketLifecycleConfigurationCommandInput, GetBucketLifecycleConfigurationCommandOutput, S3ClientResolvedConfig> {
87
115
  readonly input: GetBucketLifecycleConfigurationCommandInput;
@@ -46,6 +46,22 @@ export interface GetBucketLocationCommandOutput extends GetBucketLocationOutput,
46
46
  * @see {@link GetBucketLocationCommandOutput} for command's `response` shape.
47
47
  * @see {@link S3ClientResolvedConfig | config} for S3Client's `config` shape.
48
48
  *
49
+ * @example To get bucket location
50
+ * ```javascript
51
+ * // The following example returns bucket location.
52
+ * const input = {
53
+ * "Bucket": "examplebucket"
54
+ * };
55
+ * const command = new GetBucketLocationCommand(input);
56
+ * const response = await client.send(command);
57
+ * /* response ==
58
+ * {
59
+ * "LocationConstraint": "us-west-2"
60
+ * }
61
+ * *\/
62
+ * // example id: to-get-bucket-location-1481594573609
63
+ * ```
64
+ *
49
65
  */
50
66
  export declare class GetBucketLocationCommand extends $Command<GetBucketLocationCommandInput, GetBucketLocationCommandOutput, S3ClientResolvedConfig> {
51
67
  readonly input: GetBucketLocationCommandInput;
@@ -51,6 +51,22 @@ export interface GetBucketPolicyCommandOutput extends GetBucketPolicyOutput, __M
51
51
  * @see {@link GetBucketPolicyCommandOutput} for command's `response` shape.
52
52
  * @see {@link S3ClientResolvedConfig | config} for S3Client's `config` shape.
53
53
  *
54
+ * @example To get bucket policy
55
+ * ```javascript
56
+ * // The following example returns bucket policy associated with a bucket.
57
+ * const input = {
58
+ * "Bucket": "examplebucket"
59
+ * };
60
+ * const command = new GetBucketPolicyCommand(input);
61
+ * const response = await client.send(command);
62
+ * /* response ==
63
+ * {
64
+ * "Policy": "{\"Version\":\"2008-10-17\",\"Id\":\"LogPolicy\",\"Statement\":[{\"Sid\":\"Enables the log delivery group to publish logs to your bucket \",\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"111122223333\"},\"Action\":[\"s3:GetBucketAcl\",\"s3:GetObjectAcl\",\"s3:PutObject\"],\"Resource\":[\"arn:aws:s3:::policytest1/*\",\"arn:aws:s3:::policytest1\"]}]}"
65
+ * }
66
+ * *\/
67
+ * // example id: to-get-bucket-policy-1481595098424
68
+ * ```
69
+ *
54
70
  */
55
71
  export declare class GetBucketPolicyCommand extends $Command<GetBucketPolicyCommandInput, GetBucketPolicyCommandOutput, S3ClientResolvedConfig> {
56
72
  readonly input: GetBucketPolicyCommandInput;
@@ -58,6 +58,34 @@ export interface GetBucketReplicationCommandOutput extends GetBucketReplicationO
58
58
  * @see {@link GetBucketReplicationCommandOutput} for command's `response` shape.
59
59
  * @see {@link S3ClientResolvedConfig | config} for S3Client's `config` shape.
60
60
  *
61
+ * @example To get replication configuration set on a bucket
62
+ * ```javascript
63
+ * // The following example returns replication configuration set on a bucket.
64
+ * const input = {
65
+ * "Bucket": "examplebucket"
66
+ * };
67
+ * const command = new GetBucketReplicationCommand(input);
68
+ * const response = await client.send(command);
69
+ * /* response ==
70
+ * {
71
+ * "ReplicationConfiguration": {
72
+ * "Role": "arn:aws:iam::acct-id:role/example-role",
73
+ * "Rules": [
74
+ * {
75
+ * "Destination": {
76
+ * "Bucket": "arn:aws:s3:::destination-bucket"
77
+ * },
78
+ * "ID": "MWIwNTkwZmItMTE3MS00ZTc3LWJkZDEtNzRmODQwYzc1OTQy",
79
+ * "Prefix": "Tax",
80
+ * "Status": "Enabled"
81
+ * }
82
+ * ]
83
+ * }
84
+ * }
85
+ * *\/
86
+ * // example id: to-get-replication-configuration-set-on-a-bucket-1481593597175
87
+ * ```
88
+ *
61
89
  */
62
90
  export declare class GetBucketReplicationCommand extends $Command<GetBucketReplicationCommandInput, GetBucketReplicationCommandOutput, S3ClientResolvedConfig> {
63
91
  readonly input: GetBucketReplicationCommandInput;
@@ -38,6 +38,22 @@ export interface GetBucketRequestPaymentCommandOutput extends GetBucketRequestPa
38
38
  * @see {@link GetBucketRequestPaymentCommandOutput} for command's `response` shape.
39
39
  * @see {@link S3ClientResolvedConfig | config} for S3Client's `config` shape.
40
40
  *
41
+ * @example To get bucket versioning configuration
42
+ * ```javascript
43
+ * // The following example retrieves bucket versioning configuration.
44
+ * const input = {
45
+ * "Bucket": "examplebucket"
46
+ * };
47
+ * const command = new GetBucketRequestPaymentCommand(input);
48
+ * const response = await client.send(command);
49
+ * /* response ==
50
+ * {
51
+ * "Payer": "BucketOwner"
52
+ * }
53
+ * *\/
54
+ * // example id: to-get-bucket-versioning-configuration-1483037183929
55
+ * ```
56
+ *
41
57
  */
42
58
  export declare class GetBucketRequestPaymentCommand extends $Command<GetBucketRequestPaymentCommandInput, GetBucketRequestPaymentCommandOutput, S3ClientResolvedConfig> {
43
59
  readonly input: GetBucketRequestPaymentCommandInput;
@@ -58,6 +58,31 @@ export interface GetBucketTaggingCommandOutput extends GetBucketTaggingOutput, _
58
58
  * @see {@link GetBucketTaggingCommandOutput} for command's `response` shape.
59
59
  * @see {@link S3ClientResolvedConfig | config} for S3Client's `config` shape.
60
60
  *
61
+ * @example To get tag set associated with a bucket
62
+ * ```javascript
63
+ * // The following example returns tag set associated with a bucket
64
+ * const input = {
65
+ * "Bucket": "examplebucket"
66
+ * };
67
+ * const command = new GetBucketTaggingCommand(input);
68
+ * const response = await client.send(command);
69
+ * /* response ==
70
+ * {
71
+ * "TagSet": [
72
+ * {
73
+ * "Key": "key1",
74
+ * "Value": "value1"
75
+ * },
76
+ * {
77
+ * "Key": "key2",
78
+ * "Value": "value2"
79
+ * }
80
+ * ]
81
+ * }
82
+ * *\/
83
+ * // example id: to-get-tag-set-associated-with-a-bucket-1481593232107
84
+ * ```
85
+ *
61
86
  */
62
87
  export declare class GetBucketTaggingCommand extends $Command<GetBucketTaggingCommandInput, GetBucketTaggingCommandOutput, S3ClientResolvedConfig> {
63
88
  readonly input: GetBucketTaggingCommandInput;