@aws-sdk/client-s3 3.325.0 → 3.327.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 (96) hide show
  1. package/dist-types/commands/AbortMultipartUploadCommand.d.ts +8 -2
  2. package/dist-types/commands/CompleteMultipartUploadCommand.d.ts +41 -14
  3. package/dist-types/commands/CopyObjectCommand.d.ts +194 -144
  4. package/dist-types/commands/CreateBucketCommand.d.ts +134 -118
  5. package/dist-types/commands/CreateMultipartUploadCommand.d.ts +91 -48
  6. package/dist-types/commands/DeleteBucketAnalyticsConfigurationCommand.d.ts +6 -2
  7. package/dist-types/commands/DeleteBucketCommand.d.ts +5 -3
  8. package/dist-types/commands/DeleteBucketCorsCommand.d.ts +7 -5
  9. package/dist-types/commands/DeleteBucketEncryptionCommand.d.ts +12 -8
  10. package/dist-types/commands/DeleteBucketIntelligentTieringConfigurationCommand.d.ts +5 -2
  11. package/dist-types/commands/DeleteBucketInventoryConfigurationCommand.d.ts +6 -2
  12. package/dist-types/commands/DeleteBucketLifecycleCommand.d.ts +5 -2
  13. package/dist-types/commands/DeleteBucketMetricsConfigurationCommand.d.ts +9 -5
  14. package/dist-types/commands/DeleteBucketOwnershipControlsCommand.d.ts +6 -2
  15. package/dist-types/commands/DeleteBucketPolicyCommand.d.ts +10 -3
  16. package/dist-types/commands/DeleteBucketReplicationCommand.d.ts +8 -3
  17. package/dist-types/commands/DeleteBucketTaggingCommand.d.ts +4 -0
  18. package/dist-types/commands/DeleteBucketWebsiteCommand.d.ts +4 -0
  19. package/dist-types/commands/DeleteObjectCommand.d.ts +19 -11
  20. package/dist-types/commands/DeleteObjectTaggingCommand.d.ts +8 -4
  21. package/dist-types/commands/DeleteObjectsCommand.d.ts +57 -36
  22. package/dist-types/commands/DeletePublicAccessBlockCommand.d.ts +6 -2
  23. package/dist-types/commands/GetBucketAccelerateConfigurationCommand.d.ts +12 -7
  24. package/dist-types/commands/GetBucketAclCommand.d.ts +35 -10
  25. package/dist-types/commands/GetBucketAnalyticsConfigurationCommand.d.ts +43 -7
  26. package/dist-types/commands/GetBucketCorsCommand.d.ts +28 -0
  27. package/dist-types/commands/GetBucketEncryptionCommand.d.ts +23 -7
  28. package/dist-types/commands/GetBucketIntelligentTieringConfigurationCommand.d.ts +32 -2
  29. package/dist-types/commands/GetBucketInventoryConfigurationCommand.d.ts +35 -2
  30. package/dist-types/commands/GetBucketLifecycleConfigurationCommand.d.ts +62 -4
  31. package/dist-types/commands/GetBucketLocationCommand.d.ts +16 -2
  32. package/dist-types/commands/GetBucketLoggingCommand.d.ts +22 -1
  33. package/dist-types/commands/GetBucketMetricsConfigurationCommand.d.ts +31 -6
  34. package/dist-types/commands/GetBucketNotificationConfigurationCommand.d.ts +70 -2
  35. package/dist-types/commands/GetBucketOwnershipControlsCommand.d.ts +16 -3
  36. package/dist-types/commands/GetBucketPolicyCommand.d.ts +17 -3
  37. package/dist-types/commands/GetBucketPolicyStatusCommand.d.ts +9 -1
  38. package/dist-types/commands/GetBucketReplicationCommand.d.ts +69 -0
  39. package/dist-types/commands/GetBucketRequestPaymentCommand.d.ts +8 -1
  40. package/dist-types/commands/GetBucketTaggingCommand.d.ts +11 -0
  41. package/dist-types/commands/GetBucketVersioningCommand.d.ts +7 -0
  42. package/dist-types/commands/GetBucketWebsiteCommand.d.ts +32 -3
  43. package/dist-types/commands/GetObjectAclCommand.d.ts +27 -7
  44. package/dist-types/commands/GetObjectAttributesCommand.d.ts +77 -45
  45. package/dist-types/commands/GetObjectCommand.d.ts +159 -112
  46. package/dist-types/commands/GetObjectLegalHoldCommand.d.ts +8 -0
  47. package/dist-types/commands/GetObjectLockConfigurationCommand.d.ts +16 -2
  48. package/dist-types/commands/GetObjectRetentionCommand.d.ts +11 -1
  49. package/dist-types/commands/GetObjectTaggingCommand.d.ts +17 -5
  50. package/dist-types/commands/GetObjectTorrentCommand.d.ts +8 -1
  51. package/dist-types/commands/GetPublicAccessBlockCommand.d.ts +12 -1
  52. package/dist-types/commands/HeadBucketCommand.d.ts +23 -9
  53. package/dist-types/commands/HeadObjectCommand.d.ts +77 -33
  54. package/dist-types/commands/ListBucketAnalyticsConfigurationsCommand.d.ts +46 -4
  55. package/dist-types/commands/ListBucketIntelligentTieringConfigurationsCommand.d.ts +37 -2
  56. package/dist-types/commands/ListBucketInventoryConfigurationsCommand.d.ts +43 -5
  57. package/dist-types/commands/ListBucketMetricsConfigurationsCommand.d.ts +37 -7
  58. package/dist-types/commands/ListBucketsCommand.d.ts +18 -32
  59. package/dist-types/commands/ListMultipartUploadsCommand.d.ts +39 -2
  60. package/dist-types/commands/ListObjectVersionsCommand.d.ts +53 -6
  61. package/dist-types/commands/ListObjectsCommand.d.ts +34 -0
  62. package/dist-types/commands/ListObjectsV2Command.d.ts +47 -12
  63. package/dist-types/commands/ListPartsCommand.d.ts +40 -4
  64. package/dist-types/commands/PutBucketAccelerateConfigurationCommand.d.ts +8 -3
  65. package/dist-types/commands/PutBucketAclCommand.d.ts +118 -111
  66. package/dist-types/commands/PutBucketAnalyticsConfigurationCommand.d.ts +11 -10
  67. package/dist-types/commands/PutBucketCorsCommand.d.ts +7 -5
  68. package/dist-types/commands/PutBucketEncryptionCommand.d.ts +21 -17
  69. package/dist-types/commands/PutBucketIntelligentTieringConfigurationCommand.d.ts +35 -59
  70. package/dist-types/commands/PutBucketInventoryConfigurationCommand.d.ts +54 -65
  71. package/dist-types/commands/PutBucketLifecycleConfigurationCommand.d.ts +68 -62
  72. package/dist-types/commands/PutBucketLoggingCommand.d.ts +49 -39
  73. package/dist-types/commands/PutBucketMetricsConfigurationCommand.d.ts +8 -4
  74. package/dist-types/commands/PutBucketNotificationConfigurationCommand.d.ts +13 -12
  75. package/dist-types/commands/PutBucketOwnershipControlsCommand.d.ts +8 -2
  76. package/dist-types/commands/PutBucketPolicyCommand.d.ts +12 -4
  77. package/dist-types/commands/PutBucketReplicationCommand.d.ts +35 -28
  78. package/dist-types/commands/PutBucketRequestPaymentCommand.d.ts +5 -1
  79. package/dist-types/commands/PutBucketTaggingCommand.d.ts +16 -12
  80. package/dist-types/commands/PutBucketVersioningCommand.d.ts +11 -9
  81. package/dist-types/commands/PutBucketWebsiteCommand.d.ts +4 -0
  82. package/dist-types/commands/PutObjectAclCommand.d.ts +129 -119
  83. package/dist-types/commands/PutObjectCommand.d.ts +94 -84
  84. package/dist-types/commands/PutObjectLegalHoldCommand.d.ts +6 -0
  85. package/dist-types/commands/PutObjectLockConfigurationCommand.d.ts +13 -8
  86. package/dist-types/commands/PutObjectRetentionCommand.d.ts +9 -4
  87. package/dist-types/commands/PutObjectTaggingCommand.d.ts +13 -9
  88. package/dist-types/commands/PutPublicAccessBlockCommand.d.ts +6 -4
  89. package/dist-types/commands/RestoreObjectCommand.d.ts +182 -199
  90. package/dist-types/commands/SelectObjectContentCommand.d.ts +109 -90
  91. package/dist-types/commands/UploadPartCommand.d.ts +42 -22
  92. package/dist-types/commands/UploadPartCopyCommand.d.ts +85 -63
  93. package/dist-types/commands/WriteGetObjectResponseCommand.d.ts +36 -21
  94. package/dist-types/models/models_0.d.ts +468 -382
  95. package/dist-types/models/models_1.d.ts +82 -80
  96. package/package.json +9 -9
@@ -28,8 +28,8 @@ export interface AbortMultipartUploadCommandOutput extends AbortMultipartUploadO
28
28
  * <p>To verify that all parts have been removed, so you don't get charged for the part
29
29
  * storage, you should call the <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html">ListParts</a> action and ensure that
30
30
  * the parts list is empty.</p>
31
- * <p>For information about permissions required to use the multipart upload, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html">Multipart Upload and
32
- * Permissions</a>.</p>
31
+ * <p>For information about permissions required to use the multipart upload, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html">Multipart Upload
32
+ * and Permissions</a>.</p>
33
33
  * <p>The following operations are related to <code>AbortMultipartUpload</code>:</p>
34
34
  * <ul>
35
35
  * <li>
@@ -73,6 +73,10 @@ export interface AbortMultipartUploadCommandOutput extends AbortMultipartUploadO
73
73
  * };
74
74
  * const command = new AbortMultipartUploadCommand(input);
75
75
  * const response = await client.send(command);
76
+ * // { // AbortMultipartUploadOutput
77
+ * // RequestCharged: "requester",
78
+ * // };
79
+ *
76
80
  * ```
77
81
  *
78
82
  * @param AbortMultipartUploadCommandInput - {@link AbortMultipartUploadCommandInput}
@@ -84,6 +88,8 @@ export interface AbortMultipartUploadCommandOutput extends AbortMultipartUploadO
84
88
  * @throws {@link NoSuchUpload} (client fault)
85
89
  * <p>The specified multipart upload does not exist.</p>
86
90
  *
91
+ * @throws {@link S3ServiceException}
92
+ * <p>Base exception class for all service exceptions from S3 service.</p>
87
93
  *
88
94
  * @example To abort a multipart upload
89
95
  * ```javascript
@@ -22,28 +22,36 @@ export interface CompleteMultipartUploadCommandOutput extends CompleteMultipartU
22
22
  * <p>Completes a multipart upload by assembling previously uploaded parts.</p>
23
23
  * <p>You first initiate the multipart upload and then upload all parts using the <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html">UploadPart</a>
24
24
  * operation. After successfully uploading all relevant parts of an upload, you call this
25
- * action to complete the upload. Upon receiving this request, Amazon S3 concatenates all
26
- * the parts in ascending order by part number to create a new object. In the Complete
27
- * Multipart Upload request, you must provide the parts list. You must ensure that the parts
28
- * list is complete. This action concatenates the parts that you provide in the list. For
29
- * each part in the list, you must provide the part number and the <code>ETag</code> value,
30
- * returned after that part was uploaded.</p>
25
+ * action to complete the upload. Upon receiving this request, Amazon S3 concatenates all the
26
+ * parts in ascending order by part number to create a new object. In the Complete Multipart
27
+ * Upload request, you must provide the parts list. You must ensure that the parts list is
28
+ * complete. This action concatenates the parts that you provide in the list. For each part in
29
+ * the list, you must provide the part number and the <code>ETag</code> value, returned after
30
+ * that part was uploaded.</p>
31
31
  * <p>Processing of a Complete Multipart Upload request could take several minutes to
32
32
  * complete. After Amazon S3 begins processing the request, it sends an HTTP response header that
33
33
  * specifies a 200 OK response. While processing is in progress, Amazon S3 periodically sends white
34
- * space characters to keep the connection from timing out. Because a request could fail after
35
- * the initial 200 OK response has been sent, it is important that you check the response body
36
- * to determine whether the request succeeded.</p>
34
+ * space characters to keep the connection from timing out. A request could fail after the
35
+ * initial 200 OK response has been sent. This means that a <code>200 OK</code> response can
36
+ * contain either a success or an error. If you call the S3 API directly, make sure to design
37
+ * your application to parse the contents of the response and handle it appropriately. If you
38
+ * use Amazon Web Services SDKs, SDKs handle this condition. The SDKs detect the embedded error and apply
39
+ * error handling per your configuration settings (including automatically retrying the
40
+ * request as appropriate). If the condition persists, the SDKs throws an exception (or, for
41
+ * the SDKs that don't use exceptions, they return the error). </p>
37
42
  * <p>Note that if <code>CompleteMultipartUpload</code> fails, applications should be prepared
38
- * to retry the failed requests. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ErrorBestPractices.html">Amazon S3 Error Best Practices</a>.</p>
43
+ * to retry the failed requests. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ErrorBestPractices.html">Amazon S3 Error Best
44
+ * Practices</a>.</p>
39
45
  * <important>
40
- * <p>You cannot use <code>Content-Type: application/x-www-form-urlencoded</code> with Complete
41
- * Multipart Upload requests. Also, if you do not provide a <code>Content-Type</code> header, <code>CompleteMultipartUpload</code> returns a 200 OK response.</p>
46
+ * <p>You cannot use <code>Content-Type: application/x-www-form-urlencoded</code> with
47
+ * Complete Multipart Upload requests. Also, if you do not provide a
48
+ * <code>Content-Type</code> header, <code>CompleteMultipartUpload</code> returns a 200
49
+ * OK response.</p>
42
50
  * </important>
43
51
  * <p>For more information about multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html">Uploading Objects Using Multipart
44
52
  * Upload</a>.</p>
45
- * <p>For information about permissions required to use the multipart upload API, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html">Multipart Upload and
46
- * Permissions</a>.</p>
53
+ * <p>For information about permissions required to use the multipart upload API, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html">Multipart Upload
54
+ * and Permissions</a>.</p>
47
55
  * <p>
48
56
  * <code>CompleteMultipartUpload</code> has the following special errors:</p>
49
57
  * <ul>
@@ -164,6 +172,23 @@ export interface CompleteMultipartUploadCommandOutput extends CompleteMultipartU
164
172
  * };
165
173
  * const command = new CompleteMultipartUploadCommand(input);
166
174
  * const response = await client.send(command);
175
+ * // { // CompleteMultipartUploadOutput
176
+ * // Location: "STRING_VALUE",
177
+ * // Bucket: "STRING_VALUE",
178
+ * // Key: "STRING_VALUE",
179
+ * // Expiration: "STRING_VALUE",
180
+ * // ETag: "STRING_VALUE",
181
+ * // ChecksumCRC32: "STRING_VALUE",
182
+ * // ChecksumCRC32C: "STRING_VALUE",
183
+ * // ChecksumSHA1: "STRING_VALUE",
184
+ * // ChecksumSHA256: "STRING_VALUE",
185
+ * // ServerSideEncryption: "AES256" || "aws:kms",
186
+ * // VersionId: "STRING_VALUE",
187
+ * // SSEKMSKeyId: "STRING_VALUE",
188
+ * // BucketKeyEnabled: true || false,
189
+ * // RequestCharged: "requester",
190
+ * // };
191
+ *
167
192
  * ```
168
193
  *
169
194
  * @param CompleteMultipartUploadCommandInput - {@link CompleteMultipartUploadCommandInput}
@@ -172,6 +197,8 @@ export interface CompleteMultipartUploadCommandOutput extends CompleteMultipartU
172
197
  * @see {@link CompleteMultipartUploadCommandOutput} for command's `response` shape.
173
198
  * @see {@link S3ClientResolvedConfig | config} for S3Client's `config` shape.
174
199
  *
200
+ * @throws {@link S3ServiceException}
201
+ * <p>Base exception class for all service exceptions from S3 service.</p>
175
202
  *
176
203
  * @example To complete multipart upload
177
204
  * ```javascript
@@ -29,15 +29,20 @@ export interface CopyObjectCommandOutput extends CopyObjectOutput, __MetadataBea
29
29
  * </note>
30
30
  * <p>All copy requests must be authenticated. Additionally, you must have
31
31
  * <i>read</i> access to the source object and <i>write</i>
32
- * access to the destination bucket. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html">REST Authentication</a>. Both the Region
33
- * that you want to copy the object from and the Region that you want to copy the object to
34
- * must be enabled for your account.</p>
32
+ * access to the destination bucket. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html">REST Authentication</a>. Both the
33
+ * Region that you want to copy the object from and the Region that you want to copy the
34
+ * object to must be enabled for your account.</p>
35
35
  * <p>A copy request might return an error when Amazon S3 receives the copy request or while Amazon S3
36
36
  * is copying the files. If the error occurs before the copy action starts, you receive a
37
37
  * standard Amazon S3 error. If the error occurs during the copy operation, the error response is
38
38
  * embedded in the <code>200 OK</code> response. This means that a <code>200 OK</code>
39
- * response can contain either a success or an error. Design your application to parse the
40
- * contents of the response and handle it appropriately.</p>
39
+ * response can contain either a success or an error. If you call the S3 API directly, make
40
+ * sure to design your application to parse the contents of the response and handle it
41
+ * appropriately. If you use Amazon Web Services SDKs, SDKs handle this condition. The SDKs detect the
42
+ * embedded error and apply error handling per your configuration settings (including
43
+ * automatically retrying the request as appropriate). If the condition persists, the SDKs
44
+ * throws an exception (or, for the SDKs that don't use exceptions, they return the
45
+ * error).</p>
41
46
  * <p>If the copy is successful, you receive a response with information about the copied
42
47
  * object.</p>
43
48
  * <note>
@@ -50,144 +55,168 @@ export interface CopyObjectCommandOutput extends CopyObjectOutput, __MetadataBea
50
55
  * <important>
51
56
  * <p>Amazon S3 transfer acceleration does not support cross-Region copies. If you request a
52
57
  * cross-Region copy using a transfer acceleration endpoint, you get a 400 <code>Bad
53
- * Request</code> error. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html">Transfer Acceleration</a>.</p>
58
+ * Request</code> error. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html">Transfer
59
+ * Acceleration</a>.</p>
54
60
  * </important>
55
- * <p>
56
- * <b>Metadata</b>
57
- * </p>
58
- * <p>When copying an object, you can preserve all metadata (default) or specify new metadata.
59
- * However, the ACL is not preserved and is set to private for the user making the request. To
60
- * override the default ACL setting, specify a new ACL when generating a copy request. For
61
- * more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html">Using ACLs</a>. </p>
62
- * <p>To specify whether you want the object metadata copied from the source object or
63
- * replaced with metadata provided in the request, you can optionally add the
64
- * <code>x-amz-metadata-directive</code> header. When you grant permissions, you can use
65
- * the <code>s3:x-amz-metadata-directive</code> condition key to enforce certain metadata
66
- * behavior when objects are uploaded. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/amazon-s3-policy-keys.html">Specifying Conditions in a
67
- * Policy</a> in the <i>Amazon S3 User Guide</i>. For a complete list of
68
- * Amazon S3-specific condition keys, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/list_amazons3.html">Actions, Resources, and Condition Keys for
69
- * Amazon S3</a>.</p>
70
- * <p>
71
- * <b>x-amz-copy-source-if Headers</b>
72
- * </p>
73
- * <p>To only copy an object under certain conditions, such as whether the <code>Etag</code>
74
- * matches or whether the object was modified before or after a specified date, use the
75
- * following request parameters:</p>
76
- * <ul>
77
- * <li>
78
- * <p>
79
- * <code>x-amz-copy-source-if-match</code>
80
- * </p>
81
- * </li>
82
- * <li>
83
- * <p>
84
- * <code>x-amz-copy-source-if-none-match</code>
85
- * </p>
86
- * </li>
87
- * <li>
88
- * <p>
89
- * <code>x-amz-copy-source-if-unmodified-since</code>
90
- * </p>
91
- * </li>
92
- * <li>
93
- * <p>
94
- * <code>x-amz-copy-source-if-modified-since</code>
95
- * </p>
96
- * </li>
97
- * </ul>
98
- * <p> If both the <code>x-amz-copy-source-if-match</code> and
99
- * <code>x-amz-copy-source-if-unmodified-since</code> headers are present in the request
100
- * and evaluate as follows, Amazon S3 returns <code>200 OK</code> and copies the data:</p>
101
- * <ul>
102
- * <li>
103
- * <p>
104
- * <code>x-amz-copy-source-if-match</code> condition evaluates to true</p>
105
- * </li>
106
- * <li>
107
- * <p>
108
- * <code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to
109
- * false</p>
110
- * </li>
111
- * </ul>
112
- * <p>If both the <code>x-amz-copy-source-if-none-match</code> and
113
- * <code>x-amz-copy-source-if-modified-since</code> headers are present in the request and
114
- * evaluate as follows, Amazon S3 returns the <code>412 Precondition Failed</code> response
115
- * code:</p>
116
- * <ul>
117
- * <li>
118
- * <p>
119
- * <code>x-amz-copy-source-if-none-match</code> condition evaluates to false</p>
120
- * </li>
121
- * <li>
122
- * <p>
123
- * <code>x-amz-copy-source-if-modified-since</code> condition evaluates to
124
- * true</p>
125
- * </li>
126
- * </ul>
127
- * <note>
128
- * <p>All headers with the <code>x-amz-</code> prefix, including
129
- * <code>x-amz-copy-source</code>, must be signed.</p>
130
- * </note>
131
- * <p>
132
- * <b>Server-side encryption</b>
133
- * </p>
134
- * <p>When you perform a CopyObject operation, you can optionally use the appropriate encryption-related
135
- * headers to encrypt the object using server-side encryption with Amazon Web Services managed encryption keys
136
- * (SSE-S3 or SSE-KMS) or a customer-provided encryption key. With server-side encryption, Amazon S3
137
- * encrypts your data as it writes it to disks in its data centers and decrypts the data when
138
- * you access it. For more information about server-side encryption, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html">Using
139
- * Server-Side Encryption</a>.</p>
140
- * <p>If a target object uses SSE-KMS, you can enable an S3 Bucket Key for the object. For more
141
- * information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html">Amazon S3 Bucket Keys</a> in the <i>Amazon S3 User Guide</i>.</p>
142
- * <p>
143
- * <b>Access Control List (ACL)-Specific Request
144
- * Headers</b>
145
- * </p>
146
- * <p>When copying an object, you can optionally use headers to grant ACL-based permissions.
147
- * By default, all objects are private. Only the owner has full access control. When adding a
148
- * new object, you can grant permissions to individual Amazon Web Services accounts or to predefined groups
149
- * defined by Amazon S3. These permissions are then added to the ACL on the object. For more
150
- * 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
151
- * API</a>. </p>
152
- * <p>If the bucket that you're copying objects to uses the bucket owner enforced setting for
153
- * S3 Object Ownership, ACLs are disabled and no longer affect permissions. Buckets that
154
- * use this setting only accept PUT requests that don't specify an ACL or PUT requests that
155
- * specify bucket owner full control ACLs, such as the <code>bucket-owner-full-control</code> canned
156
- * ACL or an equivalent form of this ACL expressed in the XML format.</p>
157
- * <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html"> Controlling ownership of
158
- * objects and disabling ACLs</a> in the <i>Amazon S3 User Guide</i>.</p>
159
- * <note>
160
- * <p>If your bucket uses the bucket owner enforced setting for Object Ownership,
161
- * all objects written to the bucket by any account will be owned by the bucket owner.</p>
162
- * </note>
163
- * <p>
164
- * <b>Checksums</b>
165
- * </p>
166
- * <p>When copying an object, if it has a checksum, that checksum will be copied to the new object
167
- * by default. When you copy the object over, you may optionally specify a different checksum
168
- * algorithm to use with the <code>x-amz-checksum-algorithm</code> header.</p>
169
- * <p>
170
- * <b>Storage Class Options</b>
171
- * </p>
172
- * <p>You can use the <code>CopyObject</code> action to change the storage class of an
173
- * object that is already stored in Amazon S3 using the <code>StorageClass</code> parameter. For
174
- * more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html">Storage
175
- * Classes</a> in the <i>Amazon S3 User Guide</i>.</p>
176
- * <p>
177
- * <b>Versioning</b>
178
- * </p>
179
- * <p>By default, <code>x-amz-copy-source</code> identifies the current version of an object
180
- * to copy. If the current version is a delete marker, Amazon S3 behaves as if the object was
181
- * deleted. To copy a different version, use the <code>versionId</code> subresource.</p>
182
- * <p>If you enable versioning on the target bucket, Amazon S3 generates a unique version ID for
183
- * the object being copied. This version ID is different from the version ID of the source
184
- * object. Amazon S3 returns the version ID of the copied object in the
185
- * <code>x-amz-version-id</code> response header in the response.</p>
186
- * <p>If you do not enable versioning or suspend it on the target bucket, the version ID that
187
- * Amazon S3 generates is always null.</p>
188
- * <p>If the source object's storage class is GLACIER, you must restore a copy of this object
189
- * before you can use it as a source object for the copy operation. For more information, see
190
- * <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html">RestoreObject</a>.</p>
61
+ * <dl>
62
+ * <dt>Metadata</dt>
63
+ * <dd>
64
+ * <p>When copying an object, you can preserve all metadata (default) or specify new metadata.
65
+ * However, the ACL is not preserved and is set to private for the user making the request. To
66
+ * override the default ACL setting, specify a new ACL when generating a copy request. For
67
+ * more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html">Using ACLs</a>. </p>
68
+ * <p>To specify whether you want the object metadata copied from the source object or
69
+ * replaced with metadata provided in the request, you can optionally add the
70
+ * <code>x-amz-metadata-directive</code> header. When you grant permissions, you can use
71
+ * the <code>s3:x-amz-metadata-directive</code> condition key to enforce certain metadata
72
+ * behavior when objects are uploaded. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/amazon-s3-policy-keys.html">Specifying Conditions in a
73
+ * Policy</a> in the <i>Amazon S3 User Guide</i>. For a complete list of
74
+ * Amazon S3-specific condition keys, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/list_amazons3.html">Actions, Resources, and Condition Keys for
75
+ * Amazon S3</a>.</p>
76
+ * <note>
77
+ * <p>
78
+ * <code>x-amz-website-redirect-location</code> is unique to each object and must be
79
+ * specified in the request headers to copy the value.</p>
80
+ * </note>
81
+ * </dd>
82
+ * <dt>x-amz-copy-source-if Headers</dt>
83
+ * <dd>
84
+ * <p>To only copy an object under certain conditions, such as whether the <code>Etag</code>
85
+ * matches or whether the object was modified before or after a specified date, use the
86
+ * following request parameters:</p>
87
+ * <ul>
88
+ * <li>
89
+ * <p>
90
+ * <code>x-amz-copy-source-if-match</code>
91
+ * </p>
92
+ * </li>
93
+ * <li>
94
+ * <p>
95
+ * <code>x-amz-copy-source-if-none-match</code>
96
+ * </p>
97
+ * </li>
98
+ * <li>
99
+ * <p>
100
+ * <code>x-amz-copy-source-if-unmodified-since</code>
101
+ * </p>
102
+ * </li>
103
+ * <li>
104
+ * <p>
105
+ * <code>x-amz-copy-source-if-modified-since</code>
106
+ * </p>
107
+ * </li>
108
+ * </ul>
109
+ * <p> If both the <code>x-amz-copy-source-if-match</code> and
110
+ * <code>x-amz-copy-source-if-unmodified-since</code> headers are present in the request
111
+ * and evaluate as follows, Amazon S3 returns <code>200 OK</code> and copies the data:</p>
112
+ * <ul>
113
+ * <li>
114
+ * <p>
115
+ * <code>x-amz-copy-source-if-match</code> condition evaluates to true</p>
116
+ * </li>
117
+ * <li>
118
+ * <p>
119
+ * <code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to
120
+ * false</p>
121
+ * </li>
122
+ * </ul>
123
+ * <p>If both the <code>x-amz-copy-source-if-none-match</code> and
124
+ * <code>x-amz-copy-source-if-modified-since</code> headers are present in the request and
125
+ * evaluate as follows, Amazon S3 returns the <code>412 Precondition Failed</code> response
126
+ * code:</p>
127
+ * <ul>
128
+ * <li>
129
+ * <p>
130
+ * <code>x-amz-copy-source-if-none-match</code> condition evaluates to false</p>
131
+ * </li>
132
+ * <li>
133
+ * <p>
134
+ * <code>x-amz-copy-source-if-modified-since</code> condition evaluates to
135
+ * true</p>
136
+ * </li>
137
+ * </ul>
138
+ * <note>
139
+ * <p>All headers with the <code>x-amz-</code> prefix, including
140
+ * <code>x-amz-copy-source</code>, must be signed.</p>
141
+ * </note>
142
+ * </dd>
143
+ * <dt>Server-side encryption</dt>
144
+ * <dd>
145
+ * <p>Amazon S3 automatically encrypts all new objects that are copied to an S3 bucket. When
146
+ * copying an object, if you don't specify encryption information in your copy request, the
147
+ * encryption setting of the target object is set to the default encryption configuration of
148
+ * the destination bucket. By default, all buckets have a base level of encryption
149
+ * configuration that uses server-side encryption with Amazon S3 managed keys (SSE-S3). If the
150
+ * destination bucket has a default encryption configuration that uses server-side encryption
151
+ * with an Key Management Service (KMS) key (SSE-KMS), or a customer-provided encryption key (SSE-C),
152
+ * Amazon S3 uses the corresponding KMS key, or a customer-provided key to encrypt the target
153
+ * object copy.</p>
154
+ * <p>When you perform a CopyObject operation, if you want to use a different type
155
+ * of encryption setting for the target object, you can use other appropriate
156
+ * encryption-related headers to encrypt the target object with a KMS key, an Amazon S3 managed
157
+ * key, or a customer-provided key. With server-side encryption, Amazon S3 encrypts your data as it
158
+ * writes it to disks in its data centers and decrypts the data when you access it. If the
159
+ * encryption setting in your request is different from the default encryption configuration
160
+ * of the destination bucket, the encryption setting in your request takes precedence. If the
161
+ * source object for the copy is stored in Amazon S3 using SSE-C, you must provide the necessary
162
+ * encryption information in your request so that Amazon S3 can decrypt the object for copying. For
163
+ * more information about server-side encryption, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html">Using Server-Side
164
+ * Encryption</a>.</p>
165
+ * <p>If a target object uses SSE-KMS, you can enable an S3 Bucket Key for the object. For
166
+ * more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html">Amazon S3 Bucket Keys</a> in the <i>Amazon S3 User Guide</i>.</p>
167
+ * </dd>
168
+ * <dt>Access Control List (ACL)-Specific Request
169
+ * Headers</dt>
170
+ * <dd>
171
+ * <p>When copying an object, you can optionally use headers to grant ACL-based permissions.
172
+ * By default, all objects are private. Only the owner has full access control. When adding a
173
+ * new object, you can grant permissions to individual Amazon Web Services accounts or to predefined groups
174
+ * defined by Amazon S3. These permissions are then added to the ACL on the object. For more
175
+ * 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
176
+ * API</a>. </p>
177
+ * <p>If the bucket that you're copying objects to uses the bucket owner enforced setting for
178
+ * S3 Object Ownership, ACLs are disabled and no longer affect permissions. Buckets that use
179
+ * this setting only accept PUT requests that don't specify an ACL or PUT requests that
180
+ * specify bucket owner full control ACLs, such as the <code>bucket-owner-full-control</code>
181
+ * canned ACL or an equivalent form of this ACL expressed in the XML format.</p>
182
+ * <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html"> Controlling ownership of
183
+ * objects and disabling ACLs</a> in the <i>Amazon S3 User Guide</i>.</p>
184
+ * <note>
185
+ * <p>If your bucket uses the bucket owner enforced setting for Object Ownership, all
186
+ * objects written to the bucket by any account will be owned by the bucket owner.</p>
187
+ * </note>
188
+ * </dd>
189
+ * <dt>Checksums</dt>
190
+ * <dd>
191
+ * <p>When copying an object, if it has a checksum, that checksum will be copied to the new
192
+ * object by default. When you copy the object over, you may optionally specify a different
193
+ * checksum algorithm to use with the <code>x-amz-checksum-algorithm</code> header.</p>
194
+ * </dd>
195
+ * <dt>Storage Class Options</dt>
196
+ * <dd>
197
+ * <p>You can use the <code>CopyObject</code> action to change the storage class of an object
198
+ * that is already stored in Amazon S3 using the <code>StorageClass</code> parameter. For more
199
+ * information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html">Storage Classes</a> in the
200
+ * <i>Amazon S3 User Guide</i>.</p>
201
+ * <p>If the source object's storage class is GLACIER, you must restore a copy of
202
+ * this object before you can use it as a source object for the copy operation. For
203
+ * more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html">RestoreObject</a>. For
204
+ * more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjectsExamples.html">Copying
205
+ * Objects</a>.</p>
206
+ * </dd>
207
+ * <dt>Versioning</dt>
208
+ * <dd>
209
+ * <p>By default, <code>x-amz-copy-source</code> identifies the current version of an object
210
+ * to copy. If the current version is a delete marker, Amazon S3 behaves as if the object was
211
+ * deleted. To copy a different version, use the <code>versionId</code> subresource.</p>
212
+ * <p>If you enable versioning on the target bucket, Amazon S3 generates a unique version ID for
213
+ * the object being copied. This version ID is different from the version ID of the source
214
+ * object. Amazon S3 returns the version ID of the copied object in the
215
+ * <code>x-amz-version-id</code> response header in the response.</p>
216
+ * <p>If you do not enable versioning or suspend it on the target bucket, the version ID that
217
+ * Amazon S3 generates is always null.</p>
218
+ * </dd>
219
+ * </dl>
191
220
  * <p>The following operations are related to <code>CopyObject</code>:</p>
192
221
  * <ul>
193
222
  * <li>
@@ -201,8 +230,6 @@ export interface CopyObjectCommandOutput extends CopyObjectOutput, __MetadataBea
201
230
  * </p>
202
231
  * </li>
203
232
  * </ul>
204
- * <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjectsExamples.html">Copying
205
- * Objects</a>.</p>
206
233
  * @example
207
234
  * Use a bare-bones client and the command you need to make an API call.
208
235
  * ```javascript
@@ -256,6 +283,27 @@ export interface CopyObjectCommandOutput extends CopyObjectOutput, __MetadataBea
256
283
  * };
257
284
  * const command = new CopyObjectCommand(input);
258
285
  * const response = await client.send(command);
286
+ * // { // CopyObjectOutput
287
+ * // CopyObjectResult: { // CopyObjectResult
288
+ * // ETag: "STRING_VALUE",
289
+ * // LastModified: new Date("TIMESTAMP"),
290
+ * // ChecksumCRC32: "STRING_VALUE",
291
+ * // ChecksumCRC32C: "STRING_VALUE",
292
+ * // ChecksumSHA1: "STRING_VALUE",
293
+ * // ChecksumSHA256: "STRING_VALUE",
294
+ * // },
295
+ * // Expiration: "STRING_VALUE",
296
+ * // CopySourceVersionId: "STRING_VALUE",
297
+ * // VersionId: "STRING_VALUE",
298
+ * // ServerSideEncryption: "AES256" || "aws:kms",
299
+ * // SSECustomerAlgorithm: "STRING_VALUE",
300
+ * // SSECustomerKeyMD5: "STRING_VALUE",
301
+ * // SSEKMSKeyId: "STRING_VALUE",
302
+ * // SSEKMSEncryptionContext: "STRING_VALUE",
303
+ * // BucketKeyEnabled: true || false,
304
+ * // RequestCharged: "requester",
305
+ * // };
306
+ *
259
307
  * ```
260
308
  *
261
309
  * @param CopyObjectCommandInput - {@link CopyObjectCommandInput}
@@ -268,6 +316,8 @@ export interface CopyObjectCommandOutput extends CopyObjectOutput, __MetadataBea
268
316
  * <p>The source object of the COPY action is not in the active tier and is only stored in
269
317
  * Amazon S3 Glacier.</p>
270
318
  *
319
+ * @throws {@link S3ServiceException}
320
+ * <p>Base exception class for all service exceptions from S3 service.</p>
271
321
  *
272
322
  * @example To copy an object
273
323
  * ```javascript