Skip to content

Commit

Permalink
feat(client-s3): This release introduces a header representing the mi…
Browse files Browse the repository at this point in the history
…nimum object size limit for Lifecycle transitions.
  • Loading branch information
awstools committed Oct 2, 2024
1 parent 5d52b43 commit a692f70
Show file tree
Hide file tree
Showing 9 changed files with 314 additions and 157 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ export interface GetBucketLifecycleConfigurationCommandOutput
* // },
* // },
* // ],
* // TransitionDefaultMinimumObjectSize: "varies_by_storage_class" || "all_storage_classes_128K",
* // };
*
* ```
Expand Down
2 changes: 1 addition & 1 deletion clients/client-s3/src/commands/HeadObjectCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export interface HeadObjectCommandOutput extends HeadObjectOutput, __MetadataBea
* 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.
* For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/list_amazons3.html">Actions, resources, and condition
* keys for Amazon S3</a> in the <i>Amazon S3
* User Guide</i>.</p>
* 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>
* <p>If the object you request doesn't exist, the error that
* Amazon S3 returns depends on whether you also have the <code>s3:ListBucket</code> permission.</p>
* <ul>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
// smithy-typescript generated code
import { getFlexibleChecksumsPlugin } from "@aws-sdk/middleware-flexible-checksums";
import { getThrow200ExceptionsPlugin } from "@aws-sdk/middleware-sdk-s3";
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
import { getSerdePlugin } from "@smithy/middleware-serde";
import { Command as $Command } from "@smithy/smithy-client";
import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { commonParams } from "../endpoint/EndpointParameters";
import { PutBucketLifecycleConfigurationRequest } from "../models/models_0";
import { PutBucketLifecycleConfigurationOutput, PutBucketLifecycleConfigurationRequest } from "../models/models_0";
import {
de_PutBucketLifecycleConfigurationCommand,
se_PutBucketLifecycleConfigurationCommand,
Expand All @@ -29,7 +30,9 @@ export interface PutBucketLifecycleConfigurationCommandInput extends PutBucketLi
*
* The output of {@link PutBucketLifecycleConfigurationCommand}.
*/
export interface PutBucketLifecycleConfigurationCommandOutput extends __MetadataBearer {}
export interface PutBucketLifecycleConfigurationCommandOutput
extends PutBucketLifecycleConfigurationOutput,
__MetadataBearer {}

/**
* <note>
Expand All @@ -40,17 +43,15 @@ export interface PutBucketLifecycleConfigurationCommandOutput extends __Metadata
* so if you want to retain any configuration details, they must be included in the new
* lifecycle configuration. For information about lifecycle configuration, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lifecycle-mgmt.html">Managing
* your storage lifecycle</a>.</p>
* <note>
* <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.
* For the related API description, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html">PutBucketLifecycle</a>.</p>
* </note>
* <dl>
* <dt>Rules</dt>
* <dd>
* <p>You specify the lifecycle configuration in your request body. The lifecycle
* configuration is specified as XML consisting of one or more rules. An Amazon S3
* Lifecycle configuration can have up to 1,000 rules. This limit is not adjustable.
* Each rule consists of the following:</p>
* Lifecycle configuration can have up to 1,000 rules. This limit is not adjustable.</p>
* <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.
* For the related API description, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html">PutBucketLifecycle</a>.</p>
* <p>A lifecycle rule consists of the following:</p>
* <ul>
* <li>
* <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>
Expand Down Expand Up @@ -189,10 +190,13 @@ export interface PutBucketLifecycleConfigurationCommandOutput extends __Metadata
* ],
* },
* ExpectedBucketOwner: "STRING_VALUE",
* TransitionDefaultMinimumObjectSize: "varies_by_storage_class" || "all_storage_classes_128K",
* };
* const command = new PutBucketLifecycleConfigurationCommand(input);
* const response = await client.send(command);
* // {};
* // { // PutBucketLifecycleConfigurationOutput
* // TransitionDefaultMinimumObjectSize: "varies_by_storage_class" || "all_storage_classes_128K",
* // };
*
* ```
*
Expand Down Expand Up @@ -260,6 +264,7 @@ export class PutBucketLifecycleConfigurationCommand extends $Command
requestAlgorithmMember: "ChecksumAlgorithm",
requestChecksumRequired: true,
}),
getThrow200ExceptionsPlugin(config),
];
})
.s("AmazonS3", "PutBucketLifecycleConfiguration", {})
Expand All @@ -272,7 +277,7 @@ export class PutBucketLifecycleConfigurationCommand extends $Command
protected declare static __types: {
api: {
input: PutBucketLifecycleConfigurationRequest;
output: {};
output: PutBucketLifecycleConfigurationOutput;
};
sdk: {
input: PutBucketLifecycleConfigurationCommandInput;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Command as $Command } from "@smithy/smithy-client";
import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { commonParams } from "../endpoint/EndpointParameters";
import { PutBucketNotificationConfigurationRequest } from "../models/models_0";
import { PutBucketNotificationConfigurationRequest } from "../models/models_1";
import {
de_PutBucketNotificationConfigurationCommand,
se_PutBucketNotificationConfigurationCommand,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Command as $Command } from "@smithy/smithy-client";
import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { commonParams } from "../endpoint/EndpointParameters";
import { PutBucketOwnershipControlsRequest } from "../models/models_0";
import { PutBucketOwnershipControlsRequest } from "../models/models_1";
import { de_PutBucketOwnershipControlsCommand, se_PutBucketOwnershipControlsCommand } from "../protocols/Aws_restXml";
import { S3ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../S3Client";

Expand Down
Loading

0 comments on commit a692f70

Please sign in to comment.