Skip to content

Commit 542663c

Browse files
author
awstools
committed
feat(client-s3): Adding checksum support for S3 PutBucketOwnershipControls API.
1 parent 092c952 commit 542663c

File tree

6 files changed

+84
-52
lines changed

6 files changed

+84
-52
lines changed

‎clients/client-s3/src/commands/GetObjectAttributesCommand.ts

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ export interface GetObjectAttributesCommandInput extends GetObjectAttributesRequ
3434
export interface GetObjectAttributesCommandOutput extends GetObjectAttributesOutput, __MetadataBearer {}
3535

3636
/**
37-
* <p>Retrieves all the metadata from an object without returning the object itself. This
37+
* <p>Retrieves all of the metadata from an object without returning the object itself. This
3838
* operation is useful if you're interested only in an object's metadata. </p>
3939
* <p>
4040
* <code>GetObjectAttributes</code> combines the functionality of <code>HeadObject</code>
41-
* and <code>ListParts</code>. All of the data returned with each of those individual calls
41+
* and <code>ListParts</code>. All of the data returned with both of those individual calls
4242
* can be returned with a single call to <code>GetObjectAttributes</code>.</p>
4343
* <note>
4444
* <p>
@@ -55,16 +55,24 @@ export interface GetObjectAttributesCommandOutput extends GetObjectAttributesOut
5555
* <li>
5656
* <p>
5757
* <b>General purpose bucket permissions</b> - To
58-
* use <code>GetObjectAttributes</code>, you must have READ access to the
59-
* object. The permissions that you need to use this operation depend on
60-
* whether the bucket is versioned. If the bucket is versioned, you need both
61-
* the <code>s3:GetObjectVersion</code> and
62-
* <code>s3:GetObjectVersionAttributes</code> permissions for this
63-
* operation. If the bucket is not versioned, you need the
58+
* use <code>GetObjectAttributes</code>, you must have READ access to the object.</p>
59+
* <p>The other permissions that you need to use this operation depend on
60+
* whether the bucket is versioned and if a version ID is passed in the <code>GetObjectAttributes</code> request. </p>
61+
* <ul>
62+
* <li>
63+
* <p>If you pass a version ID in your request, you need both the <code>s3:GetObjectVersion</code> and
64+
* <code>s3:GetObjectVersionAttributes</code> permissions.</p>
65+
* </li>
66+
* <li>
67+
* <p>If you do not pass a version ID in your request, you need the
6468
* <code>s3:GetObject</code> and <code>s3:GetObjectAttributes</code>
65-
* permissions. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html">Specifying
69+
* permissions. </p>
70+
* </li>
71+
* </ul>
72+
* <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html">Specifying
6673
* Permissions in a Policy</a> in the
67-
* <i>Amazon S3 User Guide</i>. If the object that you request does
74+
* <i>Amazon S3 User Guide</i>.</p>
75+
* <p>If the object that you request does
6876
* not exist, the error Amazon S3 returns depends on whether you also have the
6977
* <code>s3:ListBucket</code> permission.</p>
7078
* <ul>
@@ -112,10 +120,10 @@ export interface GetObjectAttributesCommandOutput extends GetObjectAttributesOut
112120
* error. It's because the encryption method can't be changed when you retrieve
113121
* the object.</p>
114122
* </note>
115-
* <p>If you encrypt an object by using server-side encryption with customer-provided
116-
* encryption keys (SSE-C) when you store the object in Amazon S3, then when you retrieve
117-
* the metadata from the object, you must use the following headers to provide the
118-
* encryption key for the server to be able to retrieve the object's metadata. The
123+
* <p>If you encrypted an object when you stored the object in Amazon S3 by using server-side encryption with customer-provided
124+
* encryption keys (SSE-C), then when you retrieve
125+
* the metadata from the object, you must use the following headers. These headers provide the
126+
* server with the encryption key required to retrieve the object's metadata. The
119127
* headers are: </p>
120128
* <ul>
121129
* <li>

‎clients/client-s3/src/commands/PutBucketOwnershipControlsCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ export interface PutBucketOwnershipControlsCommandOutput extends __MetadataBeare
6868
* },
6969
* ],
7070
* },
71+
* ChecksumAlgorithm: "CRC32" || "CRC32C" || "SHA1" || "SHA256" || "CRC64NVME",
7172
* };
7273
* const command = new PutBucketOwnershipControlsCommand(input);
7374
* const response = await client.send(command);
@@ -105,6 +106,7 @@ export class PutBucketOwnershipControlsCommand extends $Command
105106
getSerdePlugin(config, this.serialize, this.deserialize),
106107
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
107108
getFlexibleChecksumsPlugin(config, {
109+
requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" },
108110
requestChecksumRequired: true,
109111
}),
110112
];

‎clients/client-s3/src/models/models_0.ts

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export type RequestCharged = (typeof RequestCharged)[keyof typeof RequestCharged
4040
export interface AbortMultipartUploadOutput {
4141
/**
4242
* <p>If present, indicates that the requester was successfully charged for the
43-
* request.</p>
43+
* request. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/RequesterPaysBuckets.html">Using Requester Pays buckets for storage transfers and usage</a> in the <i>Amazon Simple Storage Service user guide</i>.</p>
4444
* <note>
4545
* <p>This functionality is not supported for directory buckets.</p>
4646
* </note>
@@ -559,7 +559,7 @@ export interface CompleteMultipartUploadOutput {
559559

560560
/**
561561
* <p>If present, indicates that the requester was successfully charged for the
562-
* request.</p>
562+
* request. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/RequesterPaysBuckets.html">Using Requester Pays buckets for storage transfers and usage</a> in the <i>Amazon Simple Storage Service user guide</i>.</p>
563563
* <note>
564564
* <p>This functionality is not supported for directory buckets.</p>
565565
* </note>
@@ -1006,7 +1006,7 @@ export interface CopyObjectOutput {
10061006

10071007
/**
10081008
* <p>If present, indicates that the requester was successfully charged for the
1009-
* request.</p>
1009+
* request. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/RequesterPaysBuckets.html">Using Requester Pays buckets for storage transfers and usage</a> in the <i>Amazon Simple Storage Service user guide</i>.</p>
10101010
* <note>
10111011
* <p>This functionality is not supported for directory buckets.</p>
10121012
* </note>
@@ -2140,8 +2140,8 @@ export interface CreateBucketConfiguration {
21402140
* <p>Specifies the location where the bucket will be created.</p>
21412141
* <p>
21422142
* <b>Directory buckets </b> - The location type is Availability Zone or Local Zone.
2143-
* To use the Local Zone location type, your account must be enabled for Dedicated Local Zones. Otherwise, you get an HTTP <code>403 Forbidden</code> error with the
2144-
* error code <code>AccessDenied</code>. To learn more, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/opt-in-directory-bucket-lz.html">Enable accounts for Dedicated Local Zones</a> in the <i>Amazon S3 User Guide</i>.
2143+
* To use the Local Zone location type, your account must be enabled for Local Zones. Otherwise, you get an HTTP <code>403 Forbidden</code> error with the
2144+
* error code <code>AccessDenied</code>. To learn more, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/opt-in-directory-bucket-lz.html">Enable accounts for Local Zones</a> in the <i>Amazon S3 User Guide</i>.
21452145
* </p>
21462146
* <note>
21472147
* <p>This functionality is only supported by directory buckets.</p>
@@ -2497,7 +2497,7 @@ export interface CreateMultipartUploadOutput {
24972497

24982498
/**
24992499
* <p>If present, indicates that the requester was successfully charged for the
2500-
* request.</p>
2500+
* request. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/RequesterPaysBuckets.html">Using Requester Pays buckets for storage transfers and usage</a> in the <i>Amazon Simple Storage Service user guide</i>.</p>
25012501
* <note>
25022502
* <p>This functionality is not supported for directory buckets.</p>
25032503
* </note>
@@ -3677,7 +3677,7 @@ export interface DeleteObjectOutput {
36773677

36783678
/**
36793679
* <p>If present, indicates that the requester was successfully charged for the
3680-
* request.</p>
3680+
* request. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/RequesterPaysBuckets.html">Using Requester Pays buckets for storage transfers and usage</a> in the <i>Amazon Simple Storage Service user guide</i>.</p>
36813681
* <note>
36823682
* <p>This functionality is not supported for directory buckets.</p>
36833683
* </note>
@@ -5769,7 +5769,7 @@ export interface DeleteObjectsOutput {
57695769

57705770
/**
57715771
* <p>If present, indicates that the requester was successfully charged for the
5772-
* request.</p>
5772+
* request. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/RequesterPaysBuckets.html">Using Requester Pays buckets for storage transfers and usage</a> in the <i>Amazon Simple Storage Service user guide</i>.</p>
57735773
* <note>
57745774
* <p>This functionality is not supported for directory buckets.</p>
57755775
* </note>
@@ -6078,7 +6078,7 @@ export interface GetBucketAccelerateConfigurationOutput {
60786078

60796079
/**
60806080
* <p>If present, indicates that the requester was successfully charged for the
6081-
* request.</p>
6081+
* request. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/RequesterPaysBuckets.html">Using Requester Pays buckets for storage transfers and usage</a> in the <i>Amazon Simple Storage Service user guide</i>.</p>
60826082
* <note>
60836083
* <p>This functionality is not supported for directory buckets.</p>
60846084
* </note>
@@ -7509,8 +7509,8 @@ export interface LifecycleRule {
75097509

75107510
/**
75117511
* <p>The <code>Filter</code> is used to identify objects that a Lifecycle Rule applies to. A
7512-
* <code>Filter</code> must have exactly one of <code>Prefix</code>, <code>Tag</code>, or
7513-
* <code>And</code> specified. <code>Filter</code> is required if the
7512+
* <code>Filter</code> must have exactly one of <code>Prefix</code>, <code>Tag</code>,
7513+
* <code>ObjectSizeGreaterThan</code>, <code>ObjectSizeLessThan</code>, or <code>And</code> specified. <code>Filter</code> is required if the
75147514
* <code>LifecycleRule</code> does not contain a <code>Prefix</code> element.</p>
75157515
* <note>
75167516
* <p>
@@ -10040,7 +10040,7 @@ export interface GetObjectOutput {
1004010040

1004110041
/**
1004210042
* <p>If present, indicates that the requester was successfully charged for the
10043-
* request.</p>
10043+
* request. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/RequesterPaysBuckets.html">Using Requester Pays buckets for storage transfers and usage</a> in the <i>Amazon Simple Storage Service user guide</i>.</p>
1004410044
* <note>
1004510045
* <p>This functionality is not supported for directory buckets.</p>
1004610046
* </note>
@@ -10492,7 +10492,7 @@ export interface GetObjectAclOutput {
1049210492

1049310493
/**
1049410494
* <p>If present, indicates that the requester was successfully charged for the
10495-
* request.</p>
10495+
* request. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/RequesterPaysBuckets.html">Using Requester Pays buckets for storage transfers and usage</a> in the <i>Amazon Simple Storage Service user guide</i>.</p>
1049610496
* <note>
1049710497
* <p>This functionality is not supported for directory buckets.</p>
1049810498
* </note>
@@ -10762,7 +10762,7 @@ export interface GetObjectAttributesOutput {
1076210762

1076310763
/**
1076410764
* <p>If present, indicates that the requester was successfully charged for the
10765-
* request.</p>
10765+
* request. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/RequesterPaysBuckets.html">Using Requester Pays buckets for storage transfers and usage</a> in the <i>Amazon Simple Storage Service user guide</i>.</p>
1076610766
* <note>
1076710767
* <p>This functionality is not supported for directory buckets.</p>
1076810768
* </note>
@@ -10872,14 +10872,14 @@ export interface GetObjectAttributesRequest {
1087210872
VersionId?: string | undefined;
1087310873

1087410874
/**
10875-
* <p>Sets the maximum number of parts to return.</p>
10875+
* <p>Sets the maximum number of parts to return. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpuoverview.html">Uploading and copying objects using multipart upload in Amazon S3 </a> in the <i>Amazon Simple Storage Service user guide</i>.</p>
1087610876
* @public
1087710877
*/
1087810878
MaxParts?: number | undefined;
1087910879

1088010880
/**
1088110881
* <p>Specifies the part after which listing should begin. Only parts with higher part numbers
10882-
* will be listed.</p>
10882+
* will be listed. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpuoverview.html">Uploading and copying objects using multipart upload in Amazon S3 </a> in the <i>Amazon Simple Storage Service user guide</i>.</p>
1088310883
* @public
1088410884
*/
1088510885
PartNumberMarker?: string | undefined;
@@ -11309,7 +11309,7 @@ export interface GetObjectTorrentOutput {
1130911309

1131011310
/**
1131111311
* <p>If present, indicates that the requester was successfully charged for the
11312-
* request.</p>
11312+
* request. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/RequesterPaysBuckets.html">Using Requester Pays buckets for storage transfers and usage</a> in the <i>Amazon Simple Storage Service user guide</i>.</p>
1131311313
* <note>
1131411314
* <p>This functionality is not supported for directory buckets.</p>
1131511315
* </note>
@@ -11845,7 +11845,7 @@ export interface HeadObjectOutput {
1184511845

1184611846
/**
1184711847
* <p>If present, indicates that the requester was successfully charged for the
11848-
* request.</p>
11848+
* request. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/RequesterPaysBuckets.html">Using Requester Pays buckets for storage transfers and usage</a> in the <i>Amazon Simple Storage Service user guide</i>.</p>
1184911849
* <note>
1185011850
* <p>This functionality is not supported for directory buckets.</p>
1185111851
* </note>
@@ -12826,7 +12826,7 @@ export interface ListMultipartUploadsOutput {
1282612826

1282712827
/**
1282812828
* <p>If present, indicates that the requester was successfully charged for the
12829-
* request.</p>
12829+
* request. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/RequesterPaysBuckets.html">Using Requester Pays buckets for storage transfers and usage</a> in the <i>Amazon Simple Storage Service user guide</i>.</p>
1283012830
* <note>
1283112831
* <p>This functionality is not supported for directory buckets.</p>
1283212832
* </note>
@@ -13265,7 +13265,7 @@ export interface ListObjectsOutput {
1326513265

1326613266
/**
1326713267
* <p>If present, indicates that the requester was successfully charged for the
13268-
* request.</p>
13268+
* request. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/RequesterPaysBuckets.html">Using Requester Pays buckets for storage transfers and usage</a> in the <i>Amazon Simple Storage Service user guide</i>.</p>
1326913269
* <note>
1327013270
* <p>This functionality is not supported for directory buckets.</p>
1327113271
* </note>
@@ -13527,7 +13527,7 @@ export interface ListObjectsV2Output {
1352713527

1352813528
/**
1352913529
* <p>If present, indicates that the requester was successfully charged for the
13530-
* request.</p>
13530+
* request. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/RequesterPaysBuckets.html">Using Requester Pays buckets for storage transfers and usage</a> in the <i>Amazon Simple Storage Service user guide</i>.</p>
1353113531
* <note>
1353213532
* <p>This functionality is not supported for directory buckets.</p>
1353313533
* </note>
@@ -13915,7 +13915,7 @@ export interface ListObjectVersionsOutput {
1391513915

1391613916
/**
1391713917
* <p>If present, indicates that the requester was successfully charged for the
13918-
* request.</p>
13918+
* request. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/RequesterPaysBuckets.html">Using Requester Pays buckets for storage transfers and usage</a> in the <i>Amazon Simple Storage Service user guide</i>.</p>
1391913919
* <note>
1392013920
* <p>This functionality is not supported for directory buckets.</p>
1392113921
* </note>
@@ -14212,7 +14212,7 @@ export interface ListPartsOutput {
1421214212

1421314213
/**
1421414214
* <p>If present, indicates that the requester was successfully charged for the
14215-
* request.</p>
14215+
* request. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/RequesterPaysBuckets.html">Using Requester Pays buckets for storage transfers and usage</a> in the <i>Amazon Simple Storage Service user guide</i>.</p>
1421614216
* <note>
1421714217
* <p>This functionality is not supported for directory buckets.</p>
1421814218
* </note>

0 commit comments

Comments
 (0)