Skip to content

Commit a692f70

Browse files
author
awstools
committed
feat(client-s3): This release introduces a header representing the minimum object size limit for Lifecycle transitions.
1 parent 5d52b43 commit a692f70

9 files changed

+314
-157
lines changed

clients/client-s3/src/commands/GetBucketLifecycleConfigurationCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ export interface GetBucketLifecycleConfigurationCommandOutput
157157
* // },
158158
* // },
159159
* // ],
160+
* // TransitionDefaultMinimumObjectSize: "varies_by_storage_class" || "all_storage_classes_128K",
160161
* // };
161162
*
162163
* ```

clients/client-s3/src/commands/HeadObjectCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export interface HeadObjectCommandOutput extends HeadObjectOutput, __MetadataBea
5858
* use <code>HEAD</code>, you must have the <code>s3:GetObject</code> permission. You need the relevant read object (or version) permission for this operation.
5959
* For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/list_amazons3.html">Actions, resources, and condition
6060
* keys for Amazon S3</a> in the <i>Amazon S3
61-
* User Guide</i>.</p>
61+
* User Guide</i>. For more information about the permissions to S3 API operations by S3 resource types, see <a href="/AmazonS3/latest/userguide/using-with-s3-policy-actions.html">Required permissions for Amazon S3 API operations</a> in the <i>Amazon S3 User Guide</i>.</p>
6262
* <p>If the object you request doesn't exist, the error that
6363
* Amazon S3 returns depends on whether you also have the <code>s3:ListBucket</code> permission.</p>
6464
* <ul>

clients/client-s3/src/commands/PutBucketLifecycleConfigurationCommand.ts

+15-10
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
// smithy-typescript generated code
22
import { getFlexibleChecksumsPlugin } from "@aws-sdk/middleware-flexible-checksums";
3+
import { getThrow200ExceptionsPlugin } from "@aws-sdk/middleware-sdk-s3";
34
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
45
import { getSerdePlugin } from "@smithy/middleware-serde";
56
import { Command as $Command } from "@smithy/smithy-client";
67
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
78

89
import { commonParams } from "../endpoint/EndpointParameters";
9-
import { PutBucketLifecycleConfigurationRequest } from "../models/models_0";
10+
import { PutBucketLifecycleConfigurationOutput, PutBucketLifecycleConfigurationRequest } from "../models/models_0";
1011
import {
1112
de_PutBucketLifecycleConfigurationCommand,
1213
se_PutBucketLifecycleConfigurationCommand,
@@ -29,7 +30,9 @@ export interface PutBucketLifecycleConfigurationCommandInput extends PutBucketLi
2930
*
3031
* The output of {@link PutBucketLifecycleConfigurationCommand}.
3132
*/
32-
export interface PutBucketLifecycleConfigurationCommandOutput extends __MetadataBearer {}
33+
export interface PutBucketLifecycleConfigurationCommandOutput
34+
extends PutBucketLifecycleConfigurationOutput,
35+
__MetadataBearer {}
3336

3437
/**
3538
* <note>
@@ -40,17 +43,15 @@ export interface PutBucketLifecycleConfigurationCommandOutput extends __Metadata
4043
* so if you want to retain any configuration details, they must be included in the new
4144
* lifecycle configuration. For information about lifecycle configuration, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lifecycle-mgmt.html">Managing
4245
* your storage lifecycle</a>.</p>
43-
* <note>
44-
* <p>Bucket lifecycle configuration now supports specifying a lifecycle rule using an object key name prefix, one or more object tags, object size, or any combination of these. Accordingly, this section describes the latest API. The previous version of the API supported filtering based only on an object key name prefix, which is supported for backward compatibility.
45-
* For the related API description, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html">PutBucketLifecycle</a>.</p>
46-
* </note>
4746
* <dl>
4847
* <dt>Rules</dt>
4948
* <dd>
5049
* <p>You specify the lifecycle configuration in your request body. The lifecycle
5150
* configuration is specified as XML consisting of one or more rules. An Amazon S3
52-
* Lifecycle configuration can have up to 1,000 rules. This limit is not adjustable.
53-
* Each rule consists of the following:</p>
51+
* Lifecycle configuration can have up to 1,000 rules. This limit is not adjustable.</p>
52+
* <p>Bucket lifecycle configuration supports specifying a lifecycle rule using an object key name prefix, one or more object tags, object size, or any combination of these. Accordingly, this section describes the latest API. The previous version of the API supported filtering based only on an object key name prefix, which is supported for backward compatibility.
53+
* For the related API description, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html">PutBucketLifecycle</a>.</p>
54+
* <p>A lifecycle rule consists of the following:</p>
5455
* <ul>
5556
* <li>
5657
* <p>A filter identifying a subset of objects to which the rule applies. The filter can be based on a key name prefix, object tags, object size, or any combination of these.</p>
@@ -189,10 +190,13 @@ export interface PutBucketLifecycleConfigurationCommandOutput extends __Metadata
189190
* ],
190191
* },
191192
* ExpectedBucketOwner: "STRING_VALUE",
193+
* TransitionDefaultMinimumObjectSize: "varies_by_storage_class" || "all_storage_classes_128K",
192194
* };
193195
* const command = new PutBucketLifecycleConfigurationCommand(input);
194196
* const response = await client.send(command);
195-
* // {};
197+
* // { // PutBucketLifecycleConfigurationOutput
198+
* // TransitionDefaultMinimumObjectSize: "varies_by_storage_class" || "all_storage_classes_128K",
199+
* // };
196200
*
197201
* ```
198202
*
@@ -260,6 +264,7 @@ export class PutBucketLifecycleConfigurationCommand extends $Command
260264
requestAlgorithmMember: "ChecksumAlgorithm",
261265
requestChecksumRequired: true,
262266
}),
267+
getThrow200ExceptionsPlugin(config),
263268
];
264269
})
265270
.s("AmazonS3", "PutBucketLifecycleConfiguration", {})
@@ -272,7 +277,7 @@ export class PutBucketLifecycleConfigurationCommand extends $Command
272277
protected declare static __types: {
273278
api: {
274279
input: PutBucketLifecycleConfigurationRequest;
275-
output: {};
280+
output: PutBucketLifecycleConfigurationOutput;
276281
};
277282
sdk: {
278283
input: PutBucketLifecycleConfigurationCommandInput;

clients/client-s3/src/commands/PutBucketNotificationConfigurationCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { Command as $Command } from "@smithy/smithy-client";
55
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
66

77
import { commonParams } from "../endpoint/EndpointParameters";
8-
import { PutBucketNotificationConfigurationRequest } from "../models/models_0";
8+
import { PutBucketNotificationConfigurationRequest } from "../models/models_1";
99
import {
1010
de_PutBucketNotificationConfigurationCommand,
1111
se_PutBucketNotificationConfigurationCommand,

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { Command as $Command } from "@smithy/smithy-client";
66
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
77

88
import { commonParams } from "../endpoint/EndpointParameters";
9-
import { PutBucketOwnershipControlsRequest } from "../models/models_0";
9+
import { PutBucketOwnershipControlsRequest } from "../models/models_1";
1010
import { de_PutBucketOwnershipControlsCommand, se_PutBucketOwnershipControlsCommand } from "../protocols/Aws_restXml";
1111
import { S3ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../S3Client";
1212

0 commit comments

Comments
 (0)