diff --git a/clients/client-s3/README.md b/clients/client-s3/README.md index 122bd33eb1a6..4f123cb31763 100644 --- a/clients/client-s3/README.md +++ b/clients/client-s3/README.md @@ -234,6 +234,14 @@ CreateBucket [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/CreateBucketCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/CreateBucketCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/CreateBucketCommandOutput/) + +
+ +CreateBucketMetadataTableConfiguration + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/CreateBucketMetadataTableConfigurationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/CreateBucketMetadataTableConfigurationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/CreateBucketMetadataTableConfigurationCommandOutput/) +
@@ -306,6 +314,14 @@ DeleteBucketLifecycle [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/DeleteBucketLifecycleCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/DeleteBucketLifecycleCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/DeleteBucketLifecycleCommandOutput/) +
+
+ +DeleteBucketMetadataTableConfiguration + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/DeleteBucketMetadataTableConfigurationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/DeleteBucketMetadataTableConfigurationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/DeleteBucketMetadataTableConfigurationCommandOutput/) +
@@ -466,6 +482,14 @@ GetBucketLogging [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/GetBucketLoggingCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetBucketLoggingCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetBucketLoggingCommandOutput/) +
+
+ +GetBucketMetadataTableConfiguration + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/GetBucketMetadataTableConfigurationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetBucketMetadataTableConfigurationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetBucketMetadataTableConfigurationCommandOutput/) +
diff --git a/clients/client-s3/src/S3.ts b/clients/client-s3/src/S3.ts index 98f46ffe8052..19e1d773bf74 100644 --- a/clients/client-s3/src/S3.ts +++ b/clients/client-s3/src/S3.ts @@ -18,6 +18,11 @@ import { CreateBucketCommandInput, CreateBucketCommandOutput, } from "./commands/CreateBucketCommand"; +import { + CreateBucketMetadataTableConfigurationCommand, + CreateBucketMetadataTableConfigurationCommandInput, + CreateBucketMetadataTableConfigurationCommandOutput, +} from "./commands/CreateBucketMetadataTableConfigurationCommand"; import { CreateMultipartUploadCommand, CreateMultipartUploadCommandInput, @@ -63,6 +68,11 @@ import { DeleteBucketLifecycleCommandInput, DeleteBucketLifecycleCommandOutput, } from "./commands/DeleteBucketLifecycleCommand"; +import { + DeleteBucketMetadataTableConfigurationCommand, + DeleteBucketMetadataTableConfigurationCommandInput, + DeleteBucketMetadataTableConfigurationCommandOutput, +} from "./commands/DeleteBucketMetadataTableConfigurationCommand"; import { DeleteBucketMetricsConfigurationCommand, DeleteBucketMetricsConfigurationCommandInput, @@ -163,6 +173,11 @@ import { GetBucketLoggingCommandInput, GetBucketLoggingCommandOutput, } from "./commands/GetBucketLoggingCommand"; +import { + GetBucketMetadataTableConfigurationCommand, + GetBucketMetadataTableConfigurationCommandInput, + GetBucketMetadataTableConfigurationCommandOutput, +} from "./commands/GetBucketMetadataTableConfigurationCommand"; import { GetBucketMetricsConfigurationCommand, GetBucketMetricsConfigurationCommandInput, @@ -448,6 +463,7 @@ const commands = { CompleteMultipartUploadCommand, CopyObjectCommand, CreateBucketCommand, + CreateBucketMetadataTableConfigurationCommand, CreateMultipartUploadCommand, CreateSessionCommand, DeleteBucketCommand, @@ -457,6 +473,7 @@ const commands = { DeleteBucketIntelligentTieringConfigurationCommand, DeleteBucketInventoryConfigurationCommand, DeleteBucketLifecycleCommand, + DeleteBucketMetadataTableConfigurationCommand, DeleteBucketMetricsConfigurationCommand, DeleteBucketOwnershipControlsCommand, DeleteBucketPolicyCommand, @@ -477,6 +494,7 @@ const commands = { GetBucketLifecycleConfigurationCommand, GetBucketLocationCommand, GetBucketLoggingCommand, + GetBucketMetadataTableConfigurationCommand, GetBucketMetricsConfigurationCommand, GetBucketNotificationConfigurationCommand, GetBucketOwnershipControlsCommand, @@ -598,6 +616,23 @@ export interface S3 { cb: (err: any, data?: CreateBucketCommandOutput) => void ): void; + /** + * @see {@link CreateBucketMetadataTableConfigurationCommand} + */ + createBucketMetadataTableConfiguration( + args: CreateBucketMetadataTableConfigurationCommandInput, + options?: __HttpHandlerOptions + ): Promise; + createBucketMetadataTableConfiguration( + args: CreateBucketMetadataTableConfigurationCommandInput, + cb: (err: any, data?: CreateBucketMetadataTableConfigurationCommandOutput) => void + ): void; + createBucketMetadataTableConfiguration( + args: CreateBucketMetadataTableConfigurationCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateBucketMetadataTableConfigurationCommandOutput) => void + ): void; + /** * @see {@link CreateMultipartUploadCommand} */ @@ -739,6 +774,23 @@ export interface S3 { cb: (err: any, data?: DeleteBucketLifecycleCommandOutput) => void ): void; + /** + * @see {@link DeleteBucketMetadataTableConfigurationCommand} + */ + deleteBucketMetadataTableConfiguration( + args: DeleteBucketMetadataTableConfigurationCommandInput, + options?: __HttpHandlerOptions + ): Promise; + deleteBucketMetadataTableConfiguration( + args: DeleteBucketMetadataTableConfigurationCommandInput, + cb: (err: any, data?: DeleteBucketMetadataTableConfigurationCommandOutput) => void + ): void; + deleteBucketMetadataTableConfiguration( + args: DeleteBucketMetadataTableConfigurationCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteBucketMetadataTableConfigurationCommandOutput) => void + ): void; + /** * @see {@link DeleteBucketMetricsConfigurationCommand} */ @@ -1055,6 +1107,23 @@ export interface S3 { cb: (err: any, data?: GetBucketLoggingCommandOutput) => void ): void; + /** + * @see {@link GetBucketMetadataTableConfigurationCommand} + */ + getBucketMetadataTableConfiguration( + args: GetBucketMetadataTableConfigurationCommandInput, + options?: __HttpHandlerOptions + ): Promise; + getBucketMetadataTableConfiguration( + args: GetBucketMetadataTableConfigurationCommandInput, + cb: (err: any, data?: GetBucketMetadataTableConfigurationCommandOutput) => void + ): void; + getBucketMetadataTableConfiguration( + args: GetBucketMetadataTableConfigurationCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetBucketMetadataTableConfigurationCommandOutput) => void + ): void; + /** * @see {@link GetBucketMetricsConfigurationCommand} */ diff --git a/clients/client-s3/src/S3Client.ts b/clients/client-s3/src/S3Client.ts index f3283b5a3217..48562a08d79a 100644 --- a/clients/client-s3/src/S3Client.ts +++ b/clients/client-s3/src/S3Client.ts @@ -90,6 +90,10 @@ import { } from "./commands/CompleteMultipartUploadCommand"; import { CopyObjectCommandInput, CopyObjectCommandOutput } from "./commands/CopyObjectCommand"; import { CreateBucketCommandInput, CreateBucketCommandOutput } from "./commands/CreateBucketCommand"; +import { + CreateBucketMetadataTableConfigurationCommandInput, + CreateBucketMetadataTableConfigurationCommandOutput, +} from "./commands/CreateBucketMetadataTableConfigurationCommand"; import { CreateMultipartUploadCommandInput, CreateMultipartUploadCommandOutput, @@ -121,6 +125,10 @@ import { DeleteBucketLifecycleCommandInput, DeleteBucketLifecycleCommandOutput, } from "./commands/DeleteBucketLifecycleCommand"; +import { + DeleteBucketMetadataTableConfigurationCommandInput, + DeleteBucketMetadataTableConfigurationCommandOutput, +} from "./commands/DeleteBucketMetadataTableConfigurationCommand"; import { DeleteBucketMetricsConfigurationCommandInput, DeleteBucketMetricsConfigurationCommandOutput, @@ -180,6 +188,10 @@ import { } from "./commands/GetBucketLifecycleConfigurationCommand"; import { GetBucketLocationCommandInput, GetBucketLocationCommandOutput } from "./commands/GetBucketLocationCommand"; import { GetBucketLoggingCommandInput, GetBucketLoggingCommandOutput } from "./commands/GetBucketLoggingCommand"; +import { + GetBucketMetadataTableConfigurationCommandInput, + GetBucketMetadataTableConfigurationCommandOutput, +} from "./commands/GetBucketMetadataTableConfigurationCommand"; import { GetBucketMetricsConfigurationCommandInput, GetBucketMetricsConfigurationCommandOutput, @@ -357,6 +369,7 @@ export type ServiceInputTypes = | CompleteMultipartUploadCommandInput | CopyObjectCommandInput | CreateBucketCommandInput + | CreateBucketMetadataTableConfigurationCommandInput | CreateMultipartUploadCommandInput | CreateSessionCommandInput | DeleteBucketAnalyticsConfigurationCommandInput @@ -366,6 +379,7 @@ export type ServiceInputTypes = | DeleteBucketIntelligentTieringConfigurationCommandInput | DeleteBucketInventoryConfigurationCommandInput | DeleteBucketLifecycleCommandInput + | DeleteBucketMetadataTableConfigurationCommandInput | DeleteBucketMetricsConfigurationCommandInput | DeleteBucketOwnershipControlsCommandInput | DeleteBucketPolicyCommandInput @@ -386,6 +400,7 @@ export type ServiceInputTypes = | GetBucketLifecycleConfigurationCommandInput | GetBucketLocationCommandInput | GetBucketLoggingCommandInput + | GetBucketMetadataTableConfigurationCommandInput | GetBucketMetricsConfigurationCommandInput | GetBucketNotificationConfigurationCommandInput | GetBucketOwnershipControlsCommandInput @@ -457,6 +472,7 @@ export type ServiceOutputTypes = | CompleteMultipartUploadCommandOutput | CopyObjectCommandOutput | CreateBucketCommandOutput + | CreateBucketMetadataTableConfigurationCommandOutput | CreateMultipartUploadCommandOutput | CreateSessionCommandOutput | DeleteBucketAnalyticsConfigurationCommandOutput @@ -466,6 +482,7 @@ export type ServiceOutputTypes = | DeleteBucketIntelligentTieringConfigurationCommandOutput | DeleteBucketInventoryConfigurationCommandOutput | DeleteBucketLifecycleCommandOutput + | DeleteBucketMetadataTableConfigurationCommandOutput | DeleteBucketMetricsConfigurationCommandOutput | DeleteBucketOwnershipControlsCommandOutput | DeleteBucketPolicyCommandOutput @@ -486,6 +503,7 @@ export type ServiceOutputTypes = | GetBucketLifecycleConfigurationCommandOutput | GetBucketLocationCommandOutput | GetBucketLoggingCommandOutput + | GetBucketMetadataTableConfigurationCommandOutput | GetBucketMetricsConfigurationCommandOutput | GetBucketNotificationConfigurationCommandOutput | GetBucketOwnershipControlsCommandOutput diff --git a/clients/client-s3/src/commands/CreateBucketCommand.ts b/clients/client-s3/src/commands/CreateBucketCommand.ts index 4b601d66f5d4..73ad20f67a11 100644 --- a/clients/client-s3/src/commands/CreateBucketCommand.ts +++ b/clients/client-s3/src/commands/CreateBucketCommand.ts @@ -235,39 +235,39 @@ export interface CreateBucketCommandOutput extends CreateBucketOutput, __Metadat *

Base exception class for all service exceptions from S3 service.

* * @public - * @example To create a bucket + * @example To create a bucket in a specific region * ```javascript - * // The following example creates a bucket. + * // The following example creates a bucket. The request specifies an AWS region where to create the bucket. * const input = { - * "Bucket": "examplebucket" + * "Bucket": "examplebucket", + * "CreateBucketConfiguration": { + * "LocationConstraint": "eu-west-1" + * } * }; * const command = new CreateBucketCommand(input); * const response = await client.send(command); * /* response == * { - * "Location": "/examplebucket" + * "Location": "http://examplebucket..s3.amazonaws.com/" * } * *\/ - * // example id: to-create-a-bucket--1472851826060 + * // example id: to-create-a-bucket-in-a-specific-region-1483399072992 * ``` * - * @example To create a bucket in a specific region + * @example To create a bucket * ```javascript - * // The following example creates a bucket. The request specifies an AWS region where to create the bucket. + * // The following example creates a bucket. * const input = { - * "Bucket": "examplebucket", - * "CreateBucketConfiguration": { - * "LocationConstraint": "eu-west-1" - * } + * "Bucket": "examplebucket" * }; * const command = new CreateBucketCommand(input); * const response = await client.send(command); * /* response == * { - * "Location": "http://examplebucket..s3.amazonaws.com/" + * "Location": "/examplebucket" * } * *\/ - * // example id: to-create-a-bucket-in-a-specific-region-1483399072992 + * // example id: to-create-a-bucket--1472851826060 * ``` * */ diff --git a/clients/client-s3/src/commands/CreateBucketMetadataTableConfigurationCommand.ts b/clients/client-s3/src/commands/CreateBucketMetadataTableConfigurationCommand.ts new file mode 100644 index 000000000000..1993ff7a0250 --- /dev/null +++ b/clients/client-s3/src/commands/CreateBucketMetadataTableConfigurationCommand.ts @@ -0,0 +1,169 @@ +// smithy-typescript generated code +import { getFlexibleChecksumsPlugin } from "@aws-sdk/middleware-flexible-checksums"; +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 { CreateBucketMetadataTableConfigurationRequest } from "../models/models_0"; +import { + de_CreateBucketMetadataTableConfigurationCommand, + se_CreateBucketMetadataTableConfigurationCommand, +} from "../protocols/Aws_restXml"; +import { S3ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../S3Client"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link CreateBucketMetadataTableConfigurationCommand}. + */ +export interface CreateBucketMetadataTableConfigurationCommandInput + extends CreateBucketMetadataTableConfigurationRequest {} +/** + * @public + * + * The output of {@link CreateBucketMetadataTableConfigurationCommand}. + */ +export interface CreateBucketMetadataTableConfigurationCommandOutput extends __MetadataBearer {} + +/** + *

Creates a metadata table configuration for a general purpose bucket. For more + * information, see Accelerating data + * discovery with S3 Metadata in the Amazon S3 User Guide.

+ *
+ *
Permissions
+ *
+ *

To use this operation, you must have the following permissions. For more + * information, see Setting up + * permissions for configuring metadata tables in the + * Amazon S3 User Guide.

+ *

If you also want to integrate your table bucket with Amazon Web Services analytics services so that you + * can query your metadata table, you need additional permissions. For more information, see + * + * Integrating Amazon S3 Tables with Amazon Web Services analytics services in the + * Amazon S3 User Guide.

+ *
    + *
  • + *

    + * s3:CreateBucketMetadataTableConfiguration + *

    + *
  • + *
  • + *

    + * s3tables:CreateNamespace + *

    + *
  • + *
  • + *

    + * s3tables:GetTable + *

    + *
  • + *
  • + *

    + * s3tables:CreateTable + *

    + *
  • + *
  • + *

    + * s3tables:PutTablePolicy + *

    + *
  • + *
+ *
+ *
+ *

The following operations are related to CreateBucketMetadataTableConfiguration:

+ * + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { S3Client, CreateBucketMetadataTableConfigurationCommand } from "@aws-sdk/client-s3"; // ES Modules import + * // const { S3Client, CreateBucketMetadataTableConfigurationCommand } = require("@aws-sdk/client-s3"); // CommonJS import + * const client = new S3Client(config); + * const input = { // CreateBucketMetadataTableConfigurationRequest + * Bucket: "STRING_VALUE", // required + * ContentMD5: "STRING_VALUE", + * ChecksumAlgorithm: "CRC32" || "CRC32C" || "SHA1" || "SHA256", + * MetadataTableConfiguration: { // MetadataTableConfiguration + * S3TablesDestination: { // S3TablesDestination + * TableBucketArn: "STRING_VALUE", // required + * TableName: "STRING_VALUE", // required + * }, + * }, + * ExpectedBucketOwner: "STRING_VALUE", + * }; + * const command = new CreateBucketMetadataTableConfigurationCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param CreateBucketMetadataTableConfigurationCommandInput - {@link CreateBucketMetadataTableConfigurationCommandInput} + * @returns {@link CreateBucketMetadataTableConfigurationCommandOutput} + * @see {@link CreateBucketMetadataTableConfigurationCommandInput} for command's `input` shape. + * @see {@link CreateBucketMetadataTableConfigurationCommandOutput} for command's `response` shape. + * @see {@link S3ClientResolvedConfig | config} for S3Client's `config` shape. + * + * @throws {@link S3ServiceException} + *

Base exception class for all service exceptions from S3 service.

+ * + * @public + */ +export class CreateBucketMetadataTableConfigurationCommand extends $Command + .classBuilder< + CreateBucketMetadataTableConfigurationCommandInput, + CreateBucketMetadataTableConfigurationCommandOutput, + S3ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + }) + .m(function (this: any, Command: any, cs: any, config: S3ClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config, { + requestAlgorithmMember: "ChecksumAlgorithm", + requestAlgorithmMemberHttpHeader: "x-amz-sdk-checksum-algorithm", + requestChecksumRequired: true, + }), + ]; + }) + .s("AmazonS3", "CreateBucketMetadataTableConfiguration", {}) + .n("S3Client", "CreateBucketMetadataTableConfigurationCommand") + .f(void 0, void 0) + .ser(se_CreateBucketMetadataTableConfigurationCommand) + .de(de_CreateBucketMetadataTableConfigurationCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: CreateBucketMetadataTableConfigurationRequest; + output: {}; + }; + sdk: { + input: CreateBucketMetadataTableConfigurationCommandInput; + output: CreateBucketMetadataTableConfigurationCommandOutput; + }; + }; +} diff --git a/clients/client-s3/src/commands/DeleteBucketMetadataTableConfigurationCommand.ts b/clients/client-s3/src/commands/DeleteBucketMetadataTableConfigurationCommand.ts new file mode 100644 index 000000000000..780971327317 --- /dev/null +++ b/clients/client-s3/src/commands/DeleteBucketMetadataTableConfigurationCommand.ts @@ -0,0 +1,124 @@ +// smithy-typescript generated code +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 { DeleteBucketMetadataTableConfigurationRequest } from "../models/models_0"; +import { + de_DeleteBucketMetadataTableConfigurationCommand, + se_DeleteBucketMetadataTableConfigurationCommand, +} from "../protocols/Aws_restXml"; +import { S3ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../S3Client"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link DeleteBucketMetadataTableConfigurationCommand}. + */ +export interface DeleteBucketMetadataTableConfigurationCommandInput + extends DeleteBucketMetadataTableConfigurationRequest {} +/** + * @public + * + * The output of {@link DeleteBucketMetadataTableConfigurationCommand}. + */ +export interface DeleteBucketMetadataTableConfigurationCommandOutput extends __MetadataBearer {} + +/** + *

+ * Deletes a metadata table configuration from a general purpose bucket. For more + * information, see Accelerating data + * discovery with S3 Metadata in the Amazon S3 User Guide.

+ *
+ *
Permissions
+ *
+ *

To use this operation, you must have the s3:DeleteBucketMetadataTableConfiguration permission. For more + * information, see Setting up + * permissions for configuring metadata tables in the + * Amazon S3 User Guide.

+ *
+ *
+ *

The following operations are related to DeleteBucketMetadataTableConfiguration:

+ * + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { S3Client, DeleteBucketMetadataTableConfigurationCommand } from "@aws-sdk/client-s3"; // ES Modules import + * // const { S3Client, DeleteBucketMetadataTableConfigurationCommand } = require("@aws-sdk/client-s3"); // CommonJS import + * const client = new S3Client(config); + * const input = { // DeleteBucketMetadataTableConfigurationRequest + * Bucket: "STRING_VALUE", // required + * ExpectedBucketOwner: "STRING_VALUE", + * }; + * const command = new DeleteBucketMetadataTableConfigurationCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param DeleteBucketMetadataTableConfigurationCommandInput - {@link DeleteBucketMetadataTableConfigurationCommandInput} + * @returns {@link DeleteBucketMetadataTableConfigurationCommandOutput} + * @see {@link DeleteBucketMetadataTableConfigurationCommandInput} for command's `input` shape. + * @see {@link DeleteBucketMetadataTableConfigurationCommandOutput} for command's `response` shape. + * @see {@link S3ClientResolvedConfig | config} for S3Client's `config` shape. + * + * @throws {@link S3ServiceException} + *

Base exception class for all service exceptions from S3 service.

+ * + * @public + */ +export class DeleteBucketMetadataTableConfigurationCommand extends $Command + .classBuilder< + DeleteBucketMetadataTableConfigurationCommandInput, + DeleteBucketMetadataTableConfigurationCommandOutput, + S3ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + }) + .m(function (this: any, Command: any, cs: any, config: S3ClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AmazonS3", "DeleteBucketMetadataTableConfiguration", {}) + .n("S3Client", "DeleteBucketMetadataTableConfigurationCommand") + .f(void 0, void 0) + .ser(se_DeleteBucketMetadataTableConfigurationCommand) + .de(de_DeleteBucketMetadataTableConfigurationCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: DeleteBucketMetadataTableConfigurationRequest; + output: {}; + }; + sdk: { + input: DeleteBucketMetadataTableConfigurationCommandInput; + output: DeleteBucketMetadataTableConfigurationCommandOutput; + }; + }; +} diff --git a/clients/client-s3/src/commands/DeleteObjectCommand.ts b/clients/client-s3/src/commands/DeleteObjectCommand.ts index 4e4038153139..5f3027f8cff0 100644 --- a/clients/client-s3/src/commands/DeleteObjectCommand.ts +++ b/clients/client-s3/src/commands/DeleteObjectCommand.ts @@ -167,28 +167,28 @@ export interface DeleteObjectCommandOutput extends DeleteObjectOutput, __Metadat *

Base exception class for all service exceptions from S3 service.

* * @public - * @example To delete an object (from a non-versioned bucket) + * @example To delete an object * ```javascript - * // The following example deletes an object from a non-versioned bucket. + * // The following example deletes an object from an S3 bucket. * const input = { - * "Bucket": "ExampleBucket", - * "Key": "HappyFace.jpg" + * "Bucket": "examplebucket", + * "Key": "objectkey.jpg" * }; * const command = new DeleteObjectCommand(input); * await client.send(command); - * // example id: to-delete-an-object-from-a-non-versioned-bucket-1481588533089 + * // example id: to-delete-an-object-1472850136595 * ``` * - * @example To delete an object + * @example To delete an object (from a non-versioned bucket) * ```javascript - * // The following example deletes an object from an S3 bucket. + * // The following example deletes an object from a non-versioned bucket. * const input = { - * "Bucket": "examplebucket", - * "Key": "objectkey.jpg" + * "Bucket": "ExampleBucket", + * "Key": "HappyFace.jpg" * }; * const command = new DeleteObjectCommand(input); * await client.send(command); - * // example id: to-delete-an-object-1472850136595 + * // example id: to-delete-an-object-from-a-non-versioned-bucket-1481588533089 * ``` * */ diff --git a/clients/client-s3/src/commands/DeleteObjectsCommand.ts b/clients/client-s3/src/commands/DeleteObjectsCommand.ts index b7c001e3eba0..5f7a9c1c9492 100644 --- a/clients/client-s3/src/commands/DeleteObjectsCommand.ts +++ b/clients/client-s3/src/commands/DeleteObjectsCommand.ts @@ -228,20 +228,18 @@ export interface DeleteObjectsCommandOutput extends DeleteObjectsOutput, __Metad *

Base exception class for all service exceptions from S3 service.

* * @public - * @example To delete multiple object versions from a versioned bucket + * @example To delete multiple objects from a versioned bucket * ```javascript - * // 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. + * // 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. * const input = { * "Bucket": "examplebucket", * "Delete": { * "Objects": [ * { - * "Key": "HappyFace.jpg", - * "VersionId": "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b" + * "Key": "objectkey1" * }, * { - * "Key": "HappyFace.jpg", - * "VersionId": "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd" + * "Key": "objectkey2" * } * ], * "Quiet": false @@ -253,31 +251,35 @@ export interface DeleteObjectsCommandOutput extends DeleteObjectsOutput, __Metad * { * "Deleted": [ * { - * "Key": "HappyFace.jpg", - * "VersionId": "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd" + * "DeleteMarker": "true", + * "DeleteMarkerVersionId": "A._w1z6EFiCF5uhtQMDal9JDkID9tQ7F", + * "Key": "objectkey1" * }, * { - * "Key": "HappyFace.jpg", - * "VersionId": "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b" + * "DeleteMarker": "true", + * "DeleteMarkerVersionId": "iOd_ORxhkKe_e8G8_oSGxt2PjsCZKlkt", + * "Key": "objectkey2" * } * ] * } * *\/ - * // example id: to-delete-multiple-object-versions-from-a-versioned-bucket-1483147087737 + * // example id: to-delete-multiple-objects-from-a-versioned-bucket-1483146248805 * ``` * - * @example To delete multiple objects from a versioned bucket + * @example To delete multiple object versions from a versioned bucket * ```javascript - * // 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. + * // 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. * const input = { * "Bucket": "examplebucket", * "Delete": { * "Objects": [ * { - * "Key": "objectkey1" + * "Key": "HappyFace.jpg", + * "VersionId": "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b" * }, * { - * "Key": "objectkey2" + * "Key": "HappyFace.jpg", + * "VersionId": "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd" * } * ], * "Quiet": false @@ -289,19 +291,17 @@ export interface DeleteObjectsCommandOutput extends DeleteObjectsOutput, __Metad * { * "Deleted": [ * { - * "DeleteMarker": "true", - * "DeleteMarkerVersionId": "A._w1z6EFiCF5uhtQMDal9JDkID9tQ7F", - * "Key": "objectkey1" + * "Key": "HappyFace.jpg", + * "VersionId": "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd" * }, * { - * "DeleteMarker": "true", - * "DeleteMarkerVersionId": "iOd_ORxhkKe_e8G8_oSGxt2PjsCZKlkt", - * "Key": "objectkey2" + * "Key": "HappyFace.jpg", + * "VersionId": "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b" * } * ] * } * *\/ - * // example id: to-delete-multiple-objects-from-a-versioned-bucket-1483146248805 + * // example id: to-delete-multiple-object-versions-from-a-versioned-bucket-1483147087737 * ``` * */ diff --git a/clients/client-s3/src/commands/GetBucketMetadataTableConfigurationCommand.ts b/clients/client-s3/src/commands/GetBucketMetadataTableConfigurationCommand.ts new file mode 100644 index 000000000000..7c9a9d396661 --- /dev/null +++ b/clients/client-s3/src/commands/GetBucketMetadataTableConfigurationCommand.ts @@ -0,0 +1,146 @@ +// smithy-typescript generated code +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 { + GetBucketMetadataTableConfigurationOutput, + GetBucketMetadataTableConfigurationRequest, +} from "../models/models_0"; +import { + de_GetBucketMetadataTableConfigurationCommand, + se_GetBucketMetadataTableConfigurationCommand, +} from "../protocols/Aws_restXml"; +import { S3ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../S3Client"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link GetBucketMetadataTableConfigurationCommand}. + */ +export interface GetBucketMetadataTableConfigurationCommandInput extends GetBucketMetadataTableConfigurationRequest {} +/** + * @public + * + * The output of {@link GetBucketMetadataTableConfigurationCommand}. + */ +export interface GetBucketMetadataTableConfigurationCommandOutput + extends GetBucketMetadataTableConfigurationOutput, + __MetadataBearer {} + +/** + *

+ * Retrieves the metadata table configuration for a general purpose bucket. For more + * information, see Accelerating data + * discovery with S3 Metadata in the Amazon S3 User Guide.

+ *
+ *
Permissions
+ *
+ *

To use this operation, you must have the s3:GetBucketMetadataTableConfiguration permission. For more + * information, see Setting up + * permissions for configuring metadata tables in the + * Amazon S3 User Guide.

+ *
+ *
+ *

The following operations are related to GetBucketMetadataTableConfiguration:

+ * + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { S3Client, GetBucketMetadataTableConfigurationCommand } from "@aws-sdk/client-s3"; // ES Modules import + * // const { S3Client, GetBucketMetadataTableConfigurationCommand } = require("@aws-sdk/client-s3"); // CommonJS import + * const client = new S3Client(config); + * const input = { // GetBucketMetadataTableConfigurationRequest + * Bucket: "STRING_VALUE", // required + * ExpectedBucketOwner: "STRING_VALUE", + * }; + * const command = new GetBucketMetadataTableConfigurationCommand(input); + * const response = await client.send(command); + * // { // GetBucketMetadataTableConfigurationOutput + * // GetBucketMetadataTableConfigurationResult: { // GetBucketMetadataTableConfigurationResult + * // MetadataTableConfigurationResult: { // MetadataTableConfigurationResult + * // S3TablesDestinationResult: { // S3TablesDestinationResult + * // TableBucketArn: "STRING_VALUE", // required + * // TableName: "STRING_VALUE", // required + * // TableArn: "STRING_VALUE", // required + * // TableNamespace: "STRING_VALUE", // required + * // }, + * // }, + * // Status: "STRING_VALUE", // required + * // Error: { // ErrorDetails + * // ErrorCode: "STRING_VALUE", + * // ErrorMessage: "STRING_VALUE", + * // }, + * // }, + * // }; + * + * ``` + * + * @param GetBucketMetadataTableConfigurationCommandInput - {@link GetBucketMetadataTableConfigurationCommandInput} + * @returns {@link GetBucketMetadataTableConfigurationCommandOutput} + * @see {@link GetBucketMetadataTableConfigurationCommandInput} for command's `input` shape. + * @see {@link GetBucketMetadataTableConfigurationCommandOutput} for command's `response` shape. + * @see {@link S3ClientResolvedConfig | config} for S3Client's `config` shape. + * + * @throws {@link S3ServiceException} + *

Base exception class for all service exceptions from S3 service.

+ * + * @public + */ +export class GetBucketMetadataTableConfigurationCommand extends $Command + .classBuilder< + GetBucketMetadataTableConfigurationCommandInput, + GetBucketMetadataTableConfigurationCommandOutput, + S3ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + }) + .m(function (this: any, Command: any, cs: any, config: S3ClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config), + ]; + }) + .s("AmazonS3", "GetBucketMetadataTableConfiguration", {}) + .n("S3Client", "GetBucketMetadataTableConfigurationCommand") + .f(void 0, void 0) + .ser(se_GetBucketMetadataTableConfigurationCommand) + .de(de_GetBucketMetadataTableConfigurationCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: GetBucketMetadataTableConfigurationRequest; + output: GetBucketMetadataTableConfigurationOutput; + }; + sdk: { + input: GetBucketMetadataTableConfigurationCommandInput; + output: GetBucketMetadataTableConfigurationCommandOutput; + }; + }; +} diff --git a/clients/client-s3/src/commands/GetObjectCommand.ts b/clients/client-s3/src/commands/GetObjectCommand.ts index 1cbbaa91bc4f..91b1633950d7 100644 --- a/clients/client-s3/src/commands/GetObjectCommand.ts +++ b/clients/client-s3/src/commands/GetObjectCommand.ts @@ -312,53 +312,53 @@ export interface GetObjectCommandOutput extends Omit, _ *

Base exception class for all service exceptions from S3 service.

* * @public - * @example To retrieve an object + * @example To retrieve a byte range of an object * ```javascript - * // The following example retrieves an object for an S3 bucket. + * // The following example retrieves an object for an S3 bucket. The request specifies the range header to retrieve a specific byte range. * const input = { * "Bucket": "examplebucket", - * "Key": "HappyFace.jpg" + * "Key": "SampleFile.txt", + * "Range": "bytes=0-9" * }; * const command = new GetObjectCommand(input); * const response = await client.send(command); * /* response == * { * "AcceptRanges": "bytes", - * "ContentLength": "3191", - * "ContentType": "image/jpeg", - * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", - * "LastModified": "2016-12-15T01:19:41.000Z", + * "ContentLength": "10", + * "ContentRange": "bytes 0-9/43", + * "ContentType": "text/plain", + * "ETag": "\"0d94420ffd0bc68cd3d152506b97a9cc\"", + * "LastModified": "2014-10-09T22:57:28.000Z", * "Metadata": {}, - * "TagCount": 2, * "VersionId": "null" * } * *\/ - * // example id: to-retrieve-an-object-1481827837012 + * // example id: to-retrieve-a-byte-range-of-an-object--1481832674603 * ``` * - * @example To retrieve a byte range of an object + * @example To retrieve an object * ```javascript - * // The following example retrieves an object for an S3 bucket. The request specifies the range header to retrieve a specific byte range. + * // The following example retrieves an object for an S3 bucket. * const input = { * "Bucket": "examplebucket", - * "Key": "SampleFile.txt", - * "Range": "bytes=0-9" + * "Key": "HappyFace.jpg" * }; * const command = new GetObjectCommand(input); * const response = await client.send(command); * /* response == * { * "AcceptRanges": "bytes", - * "ContentLength": "10", - * "ContentRange": "bytes 0-9/43", - * "ContentType": "text/plain", - * "ETag": "\"0d94420ffd0bc68cd3d152506b97a9cc\"", - * "LastModified": "2014-10-09T22:57:28.000Z", + * "ContentLength": "3191", + * "ContentType": "image/jpeg", + * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", + * "LastModified": "2016-12-15T01:19:41.000Z", * "Metadata": {}, + * "TagCount": 2, * "VersionId": "null" * } * *\/ - * // example id: to-retrieve-a-byte-range-of-an-object--1481832674603 + * // example id: to-retrieve-an-object-1481827837012 * ``` * */ diff --git a/clients/client-s3/src/commands/GetObjectTaggingCommand.ts b/clients/client-s3/src/commands/GetObjectTaggingCommand.ts index 5a3472b83c6a..fc4903da3e36 100644 --- a/clients/client-s3/src/commands/GetObjectTaggingCommand.ts +++ b/clients/client-s3/src/commands/GetObjectTaggingCommand.ts @@ -98,13 +98,12 @@ export interface GetObjectTaggingCommandOutput extends GetObjectTaggingOutput, _ *

Base exception class for all service exceptions from S3 service.

* * @public - * @example To retrieve tag set of a specific object version + * @example To retrieve tag set of an object * ```javascript - * // The following example retrieves tag set of an object. The request specifies object version. + * // The following example retrieves tag set of an object. * const input = { * "Bucket": "examplebucket", - * "Key": "exampleobject", - * "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI" + * "Key": "HappyFace.jpg" * }; * const command = new GetObjectTaggingCommand(input); * const response = await client.send(command); @@ -112,22 +111,27 @@ export interface GetObjectTaggingCommandOutput extends GetObjectTaggingOutput, _ * { * "TagSet": [ * { - * "Key": "Key1", - * "Value": "Value1" + * "Key": "Key4", + * "Value": "Value4" + * }, + * { + * "Key": "Key3", + * "Value": "Value3" * } * ], - * "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI" + * "VersionId": "null" * } * *\/ - * // example id: to-retrieve-tag-set-of-a-specific-object-version-1483400283663 + * // example id: to-retrieve-tag-set-of-an-object-1481833847896 * ``` * - * @example To retrieve tag set of an object + * @example To retrieve tag set of a specific object version * ```javascript - * // The following example retrieves tag set of an object. + * // The following example retrieves tag set of an object. The request specifies object version. * const input = { * "Bucket": "examplebucket", - * "Key": "HappyFace.jpg" + * "Key": "exampleobject", + * "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI" * }; * const command = new GetObjectTaggingCommand(input); * const response = await client.send(command); @@ -135,18 +139,14 @@ export interface GetObjectTaggingCommandOutput extends GetObjectTaggingOutput, _ * { * "TagSet": [ * { - * "Key": "Key4", - * "Value": "Value4" - * }, - * { - * "Key": "Key3", - * "Value": "Value3" + * "Key": "Key1", + * "Value": "Value1" * } * ], - * "VersionId": "null" + * "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI" * } * *\/ - * // example id: to-retrieve-tag-set-of-an-object-1481833847896 + * // example id: to-retrieve-tag-set-of-a-specific-object-version-1483400283663 * ``` * */ diff --git a/clients/client-s3/src/commands/PutBucketCorsCommand.ts b/clients/client-s3/src/commands/PutBucketCorsCommand.ts index 0b20c8f6a0d8..32d7a3cbf238 100644 --- a/clients/client-s3/src/commands/PutBucketCorsCommand.ts +++ b/clients/client-s3/src/commands/PutBucketCorsCommand.ts @@ -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 { PutBucketCorsRequest } from "../models/models_0"; +import { PutBucketCorsRequest } from "../models/models_1"; import { de_PutBucketCorsCommand, se_PutBucketCorsCommand } from "../protocols/Aws_restXml"; import { S3ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../S3Client"; diff --git a/clients/client-s3/src/commands/PutBucketEncryptionCommand.ts b/clients/client-s3/src/commands/PutBucketEncryptionCommand.ts index dc601dc3f792..fd57c71d1a37 100644 --- a/clients/client-s3/src/commands/PutBucketEncryptionCommand.ts +++ b/clients/client-s3/src/commands/PutBucketEncryptionCommand.ts @@ -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 { PutBucketEncryptionRequest, PutBucketEncryptionRequestFilterSensitiveLog } from "../models/models_0"; +import { PutBucketEncryptionRequest, PutBucketEncryptionRequestFilterSensitiveLog } from "../models/models_1"; import { de_PutBucketEncryptionCommand, se_PutBucketEncryptionCommand } from "../protocols/Aws_restXml"; import { S3ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../S3Client"; diff --git a/clients/client-s3/src/commands/PutBucketIntelligentTieringConfigurationCommand.ts b/clients/client-s3/src/commands/PutBucketIntelligentTieringConfigurationCommand.ts index 7974bfe5c7b3..529fca93a2d9 100644 --- a/clients/client-s3/src/commands/PutBucketIntelligentTieringConfigurationCommand.ts +++ b/clients/client-s3/src/commands/PutBucketIntelligentTieringConfigurationCommand.ts @@ -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 { PutBucketIntelligentTieringConfigurationRequest } from "../models/models_0"; +import { PutBucketIntelligentTieringConfigurationRequest } from "../models/models_1"; import { de_PutBucketIntelligentTieringConfigurationCommand, se_PutBucketIntelligentTieringConfigurationCommand, diff --git a/clients/client-s3/src/commands/PutBucketInventoryConfigurationCommand.ts b/clients/client-s3/src/commands/PutBucketInventoryConfigurationCommand.ts index 977786c499a7..b1a8c04100f5 100644 --- a/clients/client-s3/src/commands/PutBucketInventoryConfigurationCommand.ts +++ b/clients/client-s3/src/commands/PutBucketInventoryConfigurationCommand.ts @@ -8,7 +8,7 @@ import { commonParams } from "../endpoint/EndpointParameters"; import { PutBucketInventoryConfigurationRequest, PutBucketInventoryConfigurationRequestFilterSensitiveLog, -} from "../models/models_0"; +} from "../models/models_1"; import { de_PutBucketInventoryConfigurationCommand, se_PutBucketInventoryConfigurationCommand, diff --git a/clients/client-s3/src/commands/PutBucketLifecycleConfigurationCommand.ts b/clients/client-s3/src/commands/PutBucketLifecycleConfigurationCommand.ts index 9965750f5595..784d751d7bc2 100644 --- a/clients/client-s3/src/commands/PutBucketLifecycleConfigurationCommand.ts +++ b/clients/client-s3/src/commands/PutBucketLifecycleConfigurationCommand.ts @@ -7,7 +7,7 @@ import { Command as $Command } from "@smithy/smithy-client"; import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { commonParams } from "../endpoint/EndpointParameters"; -import { PutBucketLifecycleConfigurationOutput, PutBucketLifecycleConfigurationRequest } from "../models/models_0"; +import { PutBucketLifecycleConfigurationOutput, PutBucketLifecycleConfigurationRequest } from "../models/models_1"; import { de_PutBucketLifecycleConfigurationCommand, se_PutBucketLifecycleConfigurationCommand, diff --git a/clients/client-s3/src/commands/PutBucketLoggingCommand.ts b/clients/client-s3/src/commands/PutBucketLoggingCommand.ts index 51a7fe44f0a1..147483e2fe0a 100644 --- a/clients/client-s3/src/commands/PutBucketLoggingCommand.ts +++ b/clients/client-s3/src/commands/PutBucketLoggingCommand.ts @@ -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 { PutBucketLoggingRequest } from "../models/models_0"; +import { PutBucketLoggingRequest } from "../models/models_1"; import { de_PutBucketLoggingCommand, se_PutBucketLoggingCommand } from "../protocols/Aws_restXml"; import { S3ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../S3Client"; diff --git a/clients/client-s3/src/commands/PutBucketMetricsConfigurationCommand.ts b/clients/client-s3/src/commands/PutBucketMetricsConfigurationCommand.ts index 95a70d2f579a..e04d61e471f4 100644 --- a/clients/client-s3/src/commands/PutBucketMetricsConfigurationCommand.ts +++ b/clients/client-s3/src/commands/PutBucketMetricsConfigurationCommand.ts @@ -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 { PutBucketMetricsConfigurationRequest } from "../models/models_0"; +import { PutBucketMetricsConfigurationRequest } from "../models/models_1"; import { de_PutBucketMetricsConfigurationCommand, se_PutBucketMetricsConfigurationCommand, diff --git a/clients/client-s3/src/commands/PutObjectCommand.ts b/clients/client-s3/src/commands/PutObjectCommand.ts index 718f04769e79..6190ec8e71c1 100644 --- a/clients/client-s3/src/commands/PutObjectCommand.ts +++ b/clients/client-s3/src/commands/PutObjectCommand.ts @@ -299,45 +299,27 @@ export interface PutObjectCommandOutput extends PutObjectOutput, __MetadataBeare *

Base exception class for all service exceptions from S3 service.

* * @public - * @example To upload an object and specify server-side encryption and object tags + * @example To upload object and specify user-defined metadata * ```javascript - * // The following example uploads an object. The request specifies the optional server-side encryption option. The request also specifies optional object tags. If the bucket is versioning enabled, S3 returns version ID in response. + * // The following example creates an object. The request also specifies optional metadata. If the bucket is versioning enabled, S3 returns version ID in response. * const input = { * "Body": "filetoupload", * "Bucket": "examplebucket", * "Key": "exampleobject", - * "ServerSideEncryption": "AES256", - * "Tagging": "key1=value1&key2=value2" - * }; - * const command = new PutObjectCommand(input); - * const response = await client.send(command); - * /* response == - * { - * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", - * "ServerSideEncryption": "AES256", - * "VersionId": "Ri.vC6qVlA4dEnjgRV4ZHsHoFIjqEMNt" - * } - * *\/ - * // example id: to-upload-an-object-and-specify-server-side-encryption-and-object-tags-1483398331831 - * ``` - * - * @example To upload an object - * ```javascript - * // The following example uploads an object to a versioning-enabled bucket. The source file is specified using Windows file syntax. S3 returns VersionId of the newly created object. - * const input = { - * "Body": "HappyFace.jpg", - * "Bucket": "examplebucket", - * "Key": "HappyFace.jpg" + * "Metadata": { + * "metadata1": "value1", + * "metadata2": "value2" + * } * }; * const command = new PutObjectCommand(input); * const response = await client.send(command); * /* response == * { * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", - * "VersionId": "tpf3zF08nBplQK1XLOefGskR7mGDwcDk" + * "VersionId": "pSKidl4pHBiNwukdbcPXAIs.sshFFOc0" * } * *\/ - * // example id: to-upload-an-object-1481760101010 + * // example id: to-upload-object-and-specify-user-defined-metadata-1483396974757 * ``` * * @example To upload an object and specify optional tags @@ -360,27 +342,26 @@ export interface PutObjectCommandOutput extends PutObjectOutput, __MetadataBeare * // example id: to-upload-an-object-and-specify-optional-tags-1481762310955 * ``` * - * @example To upload object and specify user-defined metadata + * @example To upload an object (specify optional headers) * ```javascript - * // The following example creates an object. The request also specifies optional metadata. If the bucket is versioning enabled, S3 returns version ID in response. + * // The following example uploads an object. The request specifies optional request headers to directs S3 to use specific storage class and use server-side encryption. * const input = { - * "Body": "filetoupload", + * "Body": "HappyFace.jpg", * "Bucket": "examplebucket", - * "Key": "exampleobject", - * "Metadata": { - * "metadata1": "value1", - * "metadata2": "value2" - * } + * "Key": "HappyFace.jpg", + * "ServerSideEncryption": "AES256", + * "StorageClass": "STANDARD_IA" * }; * const command = new PutObjectCommand(input); * const response = await client.send(command); * /* response == * { * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", - * "VersionId": "pSKidl4pHBiNwukdbcPXAIs.sshFFOc0" + * "ServerSideEncryption": "AES256", + * "VersionId": "CG612hodqujkf8FaaNfp8U..FIhLROcp" * } * *\/ - * // example id: to-upload-object-and-specify-user-defined-metadata-1483396974757 + * // example id: to-upload-an-object-(specify-optional-headers) * ``` * * @example To upload an object and specify canned ACL. @@ -403,15 +384,34 @@ export interface PutObjectCommandOutput extends PutObjectOutput, __MetadataBeare * // example id: to-upload-an-object-and-specify-canned-acl-1483397779571 * ``` * - * @example To upload an object (specify optional headers) + * @example To upload an object * ```javascript - * // The following example uploads an object. The request specifies optional request headers to directs S3 to use specific storage class and use server-side encryption. + * // The following example uploads an object to a versioning-enabled bucket. The source file is specified using Windows file syntax. S3 returns VersionId of the newly created object. * const input = { * "Body": "HappyFace.jpg", * "Bucket": "examplebucket", - * "Key": "HappyFace.jpg", + * "Key": "HappyFace.jpg" + * }; + * const command = new PutObjectCommand(input); + * const response = await client.send(command); + * /* response == + * { + * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", + * "VersionId": "tpf3zF08nBplQK1XLOefGskR7mGDwcDk" + * } + * *\/ + * // example id: to-upload-an-object-1481760101010 + * ``` + * + * @example To upload an object and specify server-side encryption and object tags + * ```javascript + * // The following example uploads an object. The request specifies the optional server-side encryption option. The request also specifies optional object tags. If the bucket is versioning enabled, S3 returns version ID in response. + * const input = { + * "Body": "filetoupload", + * "Bucket": "examplebucket", + * "Key": "exampleobject", * "ServerSideEncryption": "AES256", - * "StorageClass": "STANDARD_IA" + * "Tagging": "key1=value1&key2=value2" * }; * const command = new PutObjectCommand(input); * const response = await client.send(command); @@ -419,10 +419,10 @@ export interface PutObjectCommandOutput extends PutObjectOutput, __MetadataBeare * { * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", * "ServerSideEncryption": "AES256", - * "VersionId": "CG612hodqujkf8FaaNfp8U..FIhLROcp" + * "VersionId": "Ri.vC6qVlA4dEnjgRV4ZHsHoFIjqEMNt" * } * *\/ - * // example id: to-upload-an-object-(specify-optional-headers) + * // example id: to-upload-an-object-and-specify-server-side-encryption-and-object-tags-1483398331831 * ``` * * @example To create an object. diff --git a/clients/client-s3/src/commands/index.ts b/clients/client-s3/src/commands/index.ts index 23e15c917e9e..a4e9f4354298 100644 --- a/clients/client-s3/src/commands/index.ts +++ b/clients/client-s3/src/commands/index.ts @@ -3,6 +3,7 @@ export * from "./AbortMultipartUploadCommand"; export * from "./CompleteMultipartUploadCommand"; export * from "./CopyObjectCommand"; export * from "./CreateBucketCommand"; +export * from "./CreateBucketMetadataTableConfigurationCommand"; export * from "./CreateMultipartUploadCommand"; export * from "./CreateSessionCommand"; export * from "./DeleteBucketAnalyticsConfigurationCommand"; @@ -12,6 +13,7 @@ export * from "./DeleteBucketEncryptionCommand"; export * from "./DeleteBucketIntelligentTieringConfigurationCommand"; export * from "./DeleteBucketInventoryConfigurationCommand"; export * from "./DeleteBucketLifecycleCommand"; +export * from "./DeleteBucketMetadataTableConfigurationCommand"; export * from "./DeleteBucketMetricsConfigurationCommand"; export * from "./DeleteBucketOwnershipControlsCommand"; export * from "./DeleteBucketPolicyCommand"; @@ -32,6 +34,7 @@ export * from "./GetBucketInventoryConfigurationCommand"; export * from "./GetBucketLifecycleConfigurationCommand"; export * from "./GetBucketLocationCommand"; export * from "./GetBucketLoggingCommand"; +export * from "./GetBucketMetadataTableConfigurationCommand"; export * from "./GetBucketMetricsConfigurationCommand"; export * from "./GetBucketNotificationConfigurationCommand"; export * from "./GetBucketOwnershipControlsCommand"; diff --git a/clients/client-s3/src/models/models_0.ts b/clients/client-s3/src/models/models_0.ts index ea3ebbe3c0ea..866224ca210e 100644 --- a/clients/client-s3/src/models/models_0.ts +++ b/clients/client-s3/src/models/models_0.ts @@ -2205,6 +2205,103 @@ export interface CreateBucketRequest { ObjectOwnership?: ObjectOwnership | undefined; } +/** + *

+ * The destination information for the metadata table configuration. The destination table bucket + * must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata + * table name must be unique within the aws_s3_metadata namespace in the destination + * table bucket. + *

+ * @public + */ +export interface S3TablesDestination { + /** + *

+ * The Amazon Resource Name (ARN) for the table bucket that's specified as the + * destination in the metadata table configuration. The destination table bucket + * must be in the same Region and Amazon Web Services account as the general purpose bucket. + *

+ * @public + */ + TableBucketArn: string | undefined; + + /** + *

+ * The name for the metadata table in your metadata table configuration. The specified metadata + * table name must be unique within the aws_s3_metadata namespace in the destination + * table bucket. + *

+ * @public + */ + TableName: string | undefined; +} + +/** + *

+ * The metadata table configuration for a general purpose bucket. + *

+ * @public + */ +export interface MetadataTableConfiguration { + /** + *

+ * The destination information for the metadata table configuration. The destination table bucket + * must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata + * table name must be unique within the aws_s3_metadata namespace in the destination + * table bucket. + *

+ * @public + */ + S3TablesDestination: S3TablesDestination | undefined; +} + +/** + * @public + */ +export interface CreateBucketMetadataTableConfigurationRequest { + /** + *

+ * The general purpose bucket that you want to create the metadata table configuration in. + *

+ *

Note: To supply the Multi-region Access Point (MRAP) to Bucket, you need to install the "@aws-sdk/signature-v4-crt" package to your project dependencies. + * For more information, please go to https://github.com/aws/aws-sdk-js-v3#known-issues

+ * @public + */ + Bucket: string | undefined; + + /** + *

+ * The Content-MD5 header for the metadata table configuration. + *

+ * @public + */ + ContentMD5?: string | undefined; + + /** + *

+ * The checksum algorithm to use with your metadata table configuration. + *

+ * @public + */ + ChecksumAlgorithm?: ChecksumAlgorithm | undefined; + + /** + *

+ * The contents of your metadata table configuration. + *

+ * @public + */ + MetadataTableConfiguration: MetadataTableConfiguration | undefined; + + /** + *

+ * The expected owner of the general purpose bucket that contains your metadata table configuration. + *

+ * @public + */ + ExpectedBucketOwner?: string | undefined; +} + /** * @public */ @@ -3290,6 +3387,30 @@ export interface DeleteBucketLifecycleRequest { ExpectedBucketOwner?: string | undefined; } +/** + * @public + */ +export interface DeleteBucketMetadataTableConfigurationRequest { + /** + *

+ * The general purpose bucket that you want to remove the metadata table configuration from. + *

+ *

Note: To supply the Multi-region Access Point (MRAP) to Bucket, you need to install the "@aws-sdk/signature-v4-crt" package to your project dependencies. + * For more information, please go to https://github.com/aws/aws-sdk-js-v3#known-issues

+ * @public + */ + Bucket: string | undefined; + + /** + *

+ * The expected bucket owner of the general purpose bucket that you want to remove the + * metadata table configuration from. + *

+ * @public + */ + ExpectedBucketOwner?: string | undefined; +} + /** * @public */ @@ -7624,6 +7745,284 @@ export interface GetBucketLoggingRequest { ExpectedBucketOwner?: string | undefined; } +/** + *

+ * If the CreateBucketMetadataTableConfiguration request succeeds, but S3 Metadata was + * unable to create the table, this structure contains the error code and error message. + *

+ * @public + */ +export interface ErrorDetails { + /** + *

+ * If the CreateBucketMetadataTableConfiguration request succeeds, but S3 Metadata was + * unable to create the table, this structure contains the error code. The possible error codes and + * error messages are as follows: + *

+ *
    + *
  • + *

    + * AccessDeniedCreatingResources - You don't have sufficient permissions to + * create the required resources. Make sure that you have s3tables:CreateNamespace, + * s3tables:CreateTable, s3tables:GetTable and + * s3tables:PutTablePolicy permissions, and then try again. To create a new metadata + * table, you must delete the metadata configuration for this bucket, and then create a new + * metadata configuration. + *

    + *
  • + *
  • + *

    + * AccessDeniedWritingToTable - Unable to write to the metadata table because of + * missing resource permissions. To fix the resource policy, Amazon S3 needs to create a new + * metadata table. To create a new metadata table, you must delete the metadata configuration for + * this bucket, and then create a new metadata configuration.

    + *
  • + *
  • + *

    + * DestinationTableNotFound - The destination table doesn't exist. To create a + * new metadata table, you must delete the metadata configuration for this bucket, and then + * create a new metadata configuration.

    + *
  • + *
  • + *

    + * ServerInternalError - An internal error has occurred. To create a new metadata + * table, you must delete the metadata configuration for this bucket, and then create a new + * metadata configuration.

    + *
  • + *
  • + *

    + * TableAlreadyExists - The table that you specified already exists in the table + * bucket's namespace. Specify a different table name. To create a new metadata table, you must + * delete the metadata configuration for this bucket, and then create a new metadata + * configuration.

    + *
  • + *
  • + *

    + * TableBucketNotFound - The table bucket that you specified doesn't exist in + * this Amazon Web Services Region and account. Create or choose a different table bucket. To create a new + * metadata table, you must delete the metadata configuration for this bucket, and then create + * a new metadata configuration.

    + *
  • + *
+ * @public + */ + ErrorCode?: string | undefined; + + /** + *

+ * If the CreateBucketMetadataTableConfiguration request succeeds, but S3 Metadata was + * unable to create the table, this structure contains the error message. The possible error codes and + * error messages are as follows: + *

+ *
    + *
  • + *

    + * AccessDeniedCreatingResources - You don't have sufficient permissions to + * create the required resources. Make sure that you have s3tables:CreateNamespace, + * s3tables:CreateTable, s3tables:GetTable and + * s3tables:PutTablePolicy permissions, and then try again. To create a new metadata + * table, you must delete the metadata configuration for this bucket, and then create a new + * metadata configuration. + *

    + *
  • + *
  • + *

    + * AccessDeniedWritingToTable - Unable to write to the metadata table because of + * missing resource permissions. To fix the resource policy, Amazon S3 needs to create a new + * metadata table. To create a new metadata table, you must delete the metadata configuration for + * this bucket, and then create a new metadata configuration.

    + *
  • + *
  • + *

    + * DestinationTableNotFound - The destination table doesn't exist. To create a + * new metadata table, you must delete the metadata configuration for this bucket, and then + * create a new metadata configuration.

    + *
  • + *
  • + *

    + * ServerInternalError - An internal error has occurred. To create a new metadata + * table, you must delete the metadata configuration for this bucket, and then create a new + * metadata configuration.

    + *
  • + *
  • + *

    + * TableAlreadyExists - The table that you specified already exists in the table + * bucket's namespace. Specify a different table name. To create a new metadata table, you must + * delete the metadata configuration for this bucket, and then create a new metadata + * configuration.

    + *
  • + *
  • + *

    + * TableBucketNotFound - The table bucket that you specified doesn't exist in + * this Amazon Web Services Region and account. Create or choose a different table bucket. To create a new + * metadata table, you must delete the metadata configuration for this bucket, and then create + * a new metadata configuration.

    + *
  • + *
+ * @public + */ + ErrorMessage?: string | undefined; +} + +/** + *

+ * The destination information for the metadata table configuration. The destination table bucket + * must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata + * table name must be unique within the aws_s3_metadata namespace in the destination + * table bucket. + *

+ * @public + */ +export interface S3TablesDestinationResult { + /** + *

+ * The Amazon Resource Name (ARN) for the table bucket that's specified as the + * destination in the metadata table configuration. The destination table bucket + * must be in the same Region and Amazon Web Services account as the general purpose bucket. + *

+ * @public + */ + TableBucketArn: string | undefined; + + /** + *

+ * The name for the metadata table in your metadata table configuration. The specified metadata + * table name must be unique within the aws_s3_metadata namespace in the destination + * table bucket. + *

+ * @public + */ + TableName: string | undefined; + + /** + *

+ * The Amazon Resource Name (ARN) for the metadata table in the metadata table configuration. The + * specified metadata table name must be unique within the aws_s3_metadata namespace + * in the destination table bucket. + *

+ * @public + */ + TableArn: string | undefined; + + /** + *

+ * The table bucket namespace for the metadata table in your metadata table configuration. This value + * is always aws_s3_metadata. + *

+ * @public + */ + TableNamespace: string | undefined; +} + +/** + *

+ * The metadata table configuration for a general purpose bucket. The destination table bucket + * must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata + * table name must be unique within the aws_s3_metadata namespace in the destination + * table bucket. + *

+ * @public + */ +export interface MetadataTableConfigurationResult { + /** + *

+ * The destination information for the metadata table configuration. The destination table bucket + * must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata + * table name must be unique within the aws_s3_metadata namespace in the destination + * table bucket. + *

+ * @public + */ + S3TablesDestinationResult: S3TablesDestinationResult | undefined; +} + +/** + *

+ * The metadata table configuration for a general purpose bucket. + *

+ * @public + */ +export interface GetBucketMetadataTableConfigurationResult { + /** + *

+ * The metadata table configuration for a general purpose bucket. + *

+ * @public + */ + MetadataTableConfigurationResult: MetadataTableConfigurationResult | undefined; + + /** + *

+ * The status of the metadata table. The status values are: + *

+ *
    + *
  • + *

    + * CREATING - The metadata table is in the process of being created in the + * specified table bucket.

    + *
  • + *
  • + *

    + * ACTIVE - The metadata table has been created successfully and records + * are being delivered to the table. + *

    + *
  • + *
  • + *

    + * FAILED - Amazon S3 is unable to create the metadata table, or Amazon S3 is unable to deliver + * records. See ErrorDetails for details.

    + *
  • + *
+ * @public + */ + Status: string | undefined; + + /** + *

+ * If the CreateBucketMetadataTableConfiguration request succeeds, but S3 Metadata was + * unable to create the table, this structure contains the error code and error message. + *

+ * @public + */ + Error?: ErrorDetails | undefined; +} + +/** + * @public + */ +export interface GetBucketMetadataTableConfigurationOutput { + /** + *

+ * The metadata table configuration for the general purpose bucket. + *

+ * @public + */ + GetBucketMetadataTableConfigurationResult?: GetBucketMetadataTableConfigurationResult | undefined; +} + +/** + * @public + */ +export interface GetBucketMetadataTableConfigurationRequest { + /** + *

+ * The general purpose bucket that contains the metadata table configuration that you want to retrieve. + *

+ *

Note: To supply the Multi-region Access Point (MRAP) to Bucket, you need to install the "@aws-sdk/signature-v4-crt" package to your project dependencies. + * For more information, please go to https://github.com/aws/aws-sdk-js-v3#known-issues

+ * @public + */ + Bucket: string | undefined; + + /** + *

+ * The expected owner of the general purpose bucket that you want to retrieve the metadata table configuration from. + *

+ * @public + */ + ExpectedBucketOwner?: string | undefined; +} + /** *

A conjunction (logical AND) of predicates, which is used in evaluating a metrics filter. * The operator must have at least two predicates, and an object must match all of the @@ -13908,384 +14307,7 @@ export interface CORSConfiguration { } /** - * @public - */ -export interface PutBucketCorsRequest { - /** - *

Specifies the bucket impacted by the corsconfiguration.

- *

Note: To supply the Multi-region Access Point (MRAP) to Bucket, you need to install the "@aws-sdk/signature-v4-crt" package to your project dependencies. - * For more information, please go to https://github.com/aws/aws-sdk-js-v3#known-issues

- * @public - */ - Bucket: string | undefined; - - /** - *

Describes the cross-origin access configuration for objects in an Amazon S3 bucket. For more - * information, see Enabling - * Cross-Origin Resource Sharing in the - * Amazon S3 User Guide.

- * @public - */ - CORSConfiguration: CORSConfiguration | undefined; - - /** - *

The base64-encoded 128-bit MD5 digest of the data. This header must be used as a message - * integrity check to verify that the request body was not corrupted in transit. For more - * information, go to RFC - * 1864. - *

- *

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

- * @public - */ - ContentMD5?: string | undefined; - - /** - *

Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any - * additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or - * x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more - * information, see Checking object integrity in - * the Amazon S3 User Guide.

- *

If you provide an individual checksum, Amazon S3 ignores any provided - * ChecksumAlgorithm parameter.

- * @public - */ - ChecksumAlgorithm?: ChecksumAlgorithm | undefined; - - /** - *

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

- * @public - */ - ExpectedBucketOwner?: string | undefined; -} - -/** - * @public - */ -export interface PutBucketEncryptionRequest { - /** - *

Specifies default encryption for a bucket using server-side encryption with different - * key options.

- *

- * Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name - * . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format - * bucket-base-name--zone-id--x-s3 (for example, - * DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide - *

- *

Note: To supply the Multi-region Access Point (MRAP) to Bucket, you need to install the "@aws-sdk/signature-v4-crt" package to your project dependencies. - * For more information, please go to https://github.com/aws/aws-sdk-js-v3#known-issues

- * @public - */ - Bucket: string | undefined; - - /** - *

The base64-encoded 128-bit MD5 digest of the server-side encryption - * configuration.

- *

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

- * - *

This functionality is not supported for directory buckets.

- *
- * @public - */ - ContentMD5?: string | undefined; - - /** - *

Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any - * additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or - * x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more - * information, see Checking object integrity in - * the Amazon S3 User Guide.

- *

If you provide an individual checksum, Amazon S3 ignores any provided - * ChecksumAlgorithm parameter.

- * - *

For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's used for performance.

- *
- * @public - */ - ChecksumAlgorithm?: ChecksumAlgorithm | undefined; - - /** - *

Specifies the default server-side-encryption configuration.

- * @public - */ - ServerSideEncryptionConfiguration: ServerSideEncryptionConfiguration | undefined; - - /** - *

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

- * - *

For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code - * 501 Not Implemented.

- *
- * @public - */ - ExpectedBucketOwner?: string | undefined; -} - -/** - * @public - */ -export interface PutBucketIntelligentTieringConfigurationRequest { - /** - *

The name of the Amazon S3 bucket whose configuration you want to modify or retrieve.

- *

Note: To supply the Multi-region Access Point (MRAP) to Bucket, you need to install the "@aws-sdk/signature-v4-crt" package to your project dependencies. - * For more information, please go to https://github.com/aws/aws-sdk-js-v3#known-issues

- * @public - */ - Bucket: string | undefined; - - /** - *

The ID used to identify the S3 Intelligent-Tiering configuration.

- * @public - */ - Id: string | undefined; - - /** - *

Container for S3 Intelligent-Tiering configuration.

- * @public - */ - IntelligentTieringConfiguration: IntelligentTieringConfiguration | undefined; -} - -/** - * @public - */ -export interface PutBucketInventoryConfigurationRequest { - /** - *

The name of the bucket where the inventory configuration will be stored.

- *

Note: To supply the Multi-region Access Point (MRAP) to Bucket, you need to install the "@aws-sdk/signature-v4-crt" package to your project dependencies. - * For more information, please go to https://github.com/aws/aws-sdk-js-v3#known-issues

- * @public - */ - Bucket: string | undefined; - - /** - *

The ID used to identify the inventory configuration.

- * @public - */ - Id: string | undefined; - - /** - *

Specifies the inventory configuration.

- * @public - */ - InventoryConfiguration: InventoryConfiguration | undefined; - - /** - *

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

- * @public - */ - ExpectedBucketOwner?: string | undefined; -} - -/** - * @public - */ -export interface PutBucketLifecycleConfigurationOutput { - /** - *

Indicates which default minimum object size behavior is applied to the lifecycle - * configuration.

- * - *

This parameter applies to general purpose buckets only. It is not supported for - * directory bucket lifecycle configurations.

- *
- *
    - *
  • - *

    - * all_storage_classes_128K - Objects smaller than 128 KB will not - * transition to any storage class by default.

    - *
  • - *
  • - *

    - * varies_by_storage_class - Objects smaller than 128 KB will - * transition to Glacier Flexible Retrieval or Glacier Deep Archive storage classes. By - * default, all other storage classes will prevent transitions smaller than 128 KB. - *

    - *
  • - *
- *

To customize the minimum object size for any transition you can add a filter that - * specifies a custom ObjectSizeGreaterThan or ObjectSizeLessThan in - * the body of your transition rule. Custom filters always take precedence over the default - * transition behavior.

- * @public - */ - TransitionDefaultMinimumObjectSize?: TransitionDefaultMinimumObjectSize | undefined; -} - -/** - *

Specifies the lifecycle configuration for objects in an Amazon S3 bucket. For more - * information, see Object Lifecycle Management - * in the Amazon S3 User Guide.

- * @public - */ -export interface BucketLifecycleConfiguration { - /** - *

A lifecycle rule for individual objects in an Amazon S3 bucket.

- * @public - */ - Rules: LifecycleRule[] | undefined; -} - -/** - * @public - */ -export interface PutBucketLifecycleConfigurationRequest { - /** - *

The name of the bucket for which to set the configuration.

- *

Note: To supply the Multi-region Access Point (MRAP) to Bucket, you need to install the "@aws-sdk/signature-v4-crt" package to your project dependencies. - * For more information, please go to https://github.com/aws/aws-sdk-js-v3#known-issues

- * @public - */ - Bucket: string | undefined; - - /** - *

Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any - * additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or - * x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more - * information, see Checking object integrity in - * the Amazon S3 User Guide.

- *

If you provide an individual checksum, Amazon S3 ignores any provided - * ChecksumAlgorithm parameter.

- * @public - */ - ChecksumAlgorithm?: ChecksumAlgorithm | undefined; - - /** - *

Container for lifecycle rules. You can add as many as 1,000 rules.

- * @public - */ - LifecycleConfiguration?: BucketLifecycleConfiguration | undefined; - - /** - *

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

- * - *

This parameter applies to general purpose buckets only. It is not supported for - * directory bucket lifecycle configurations.

- *
- * @public - */ - ExpectedBucketOwner?: string | undefined; - - /** - *

Indicates which default minimum object size behavior is applied to the lifecycle - * configuration.

- * - *

This parameter applies to general purpose buckets only. It is not supported for - * directory bucket lifecycle configurations.

- *
- *
    - *
  • - *

    - * all_storage_classes_128K - Objects smaller than 128 KB will not - * transition to any storage class by default.

    - *
  • - *
  • - *

    - * varies_by_storage_class - Objects smaller than 128 KB will - * transition to Glacier Flexible Retrieval or Glacier Deep Archive storage classes. By - * default, all other storage classes will prevent transitions smaller than 128 KB. - *

    - *
  • - *
- *

To customize the minimum object size for any transition you can add a filter that - * specifies a custom ObjectSizeGreaterThan or ObjectSizeLessThan in - * the body of your transition rule. Custom filters always take precedence over the default - * transition behavior.

- * @public - */ - TransitionDefaultMinimumObjectSize?: TransitionDefaultMinimumObjectSize | undefined; -} - -/** - *

Container for logging status information.

- * @public - */ -export interface BucketLoggingStatus { - /** - *

Describes where logs are stored and the prefix that Amazon S3 assigns to all log object keys - * for a bucket. For more information, see PUT Bucket logging in the - * Amazon S3 API Reference.

- * @public - */ - LoggingEnabled?: LoggingEnabled | undefined; -} - -/** - * @public - */ -export interface PutBucketLoggingRequest { - /** - *

The name of the bucket for which to set the logging parameters.

- *

Note: To supply the Multi-region Access Point (MRAP) to Bucket, you need to install the "@aws-sdk/signature-v4-crt" package to your project dependencies. - * For more information, please go to https://github.com/aws/aws-sdk-js-v3#known-issues

- * @public - */ - Bucket: string | undefined; - - /** - *

Container for logging status information.

- * @public - */ - BucketLoggingStatus: BucketLoggingStatus | undefined; - - /** - *

The MD5 hash of the PutBucketLogging request body.

- *

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

- * @public - */ - ContentMD5?: string | undefined; - - /** - *

Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any - * additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or - * x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more - * information, see Checking object integrity in - * the Amazon S3 User Guide.

- *

If you provide an individual checksum, Amazon S3 ignores any provided - * ChecksumAlgorithm parameter.

- * @public - */ - ChecksumAlgorithm?: ChecksumAlgorithm | undefined; - - /** - *

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

- * @public - */ - ExpectedBucketOwner?: string | undefined; -} - -/** - * @public - */ -export interface PutBucketMetricsConfigurationRequest { - /** - *

The name of the bucket for which the metrics configuration is set.

- *

Note: To supply the Multi-region Access Point (MRAP) to Bucket, you need to install the "@aws-sdk/signature-v4-crt" package to your project dependencies. - * For more information, please go to https://github.com/aws/aws-sdk-js-v3#known-issues

- * @public - */ - Bucket: string | undefined; - - /** - *

The ID used to identify the metrics configuration. The ID has a 64 character limit and - * can only contain letters, numbers, periods, dashes, and underscores.

- * @public - */ - Id: string | undefined; - - /** - *

Specifies the metrics configuration.

- * @public - */ - MetricsConfiguration: MetricsConfiguration | undefined; - - /** - *

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

- * @public - */ - ExpectedBucketOwner?: string | undefined; -} - -/** - * @internal + * @internal */ export const CompleteMultipartUploadOutputFilterSensitiveLog = (obj: CompleteMultipartUploadOutput): any => ({ ...obj, @@ -14529,27 +14551,3 @@ export const ListPartsRequestFilterSensitiveLog = (obj: ListPartsRequest): any = ...obj, ...(obj.SSECustomerKey && { SSECustomerKey: SENSITIVE_STRING }), }); - -/** - * @internal - */ -export const PutBucketEncryptionRequestFilterSensitiveLog = (obj: PutBucketEncryptionRequest): any => ({ - ...obj, - ...(obj.ServerSideEncryptionConfiguration && { - ServerSideEncryptionConfiguration: ServerSideEncryptionConfigurationFilterSensitiveLog( - obj.ServerSideEncryptionConfiguration - ), - }), -}); - -/** - * @internal - */ -export const PutBucketInventoryConfigurationRequestFilterSensitiveLog = ( - obj: PutBucketInventoryConfigurationRequest -): any => ({ - ...obj, - ...(obj.InventoryConfiguration && { - InventoryConfiguration: InventoryConfigurationFilterSensitiveLog(obj.InventoryConfiguration), - }), -}); diff --git a/clients/client-s3/src/models/models_1.ts b/clients/client-s3/src/models/models_1.ts index 7180badd9329..8401d87df86c 100644 --- a/clients/client-s3/src/models/models_1.ts +++ b/clients/client-s3/src/models/models_1.ts @@ -7,9 +7,16 @@ import { AccessControlPolicy, BucketVersioningStatus, ChecksumAlgorithm, + CORSConfiguration, ErrorDocument, Grant, IndexDocument, + IntelligentTieringConfiguration, + InventoryConfiguration, + InventoryConfigurationFilterSensitiveLog, + LifecycleRule, + LoggingEnabled, + MetricsConfiguration, NotificationConfiguration, ObjectCannedACL, ObjectLockConfiguration, @@ -27,12 +34,392 @@ import { RequestPayer, RoutingRule, ServerSideEncryption, + ServerSideEncryptionConfiguration, + ServerSideEncryptionConfigurationFilterSensitiveLog, StorageClass, Tag, + TransitionDefaultMinimumObjectSize, } from "./models_0"; import { S3ServiceException as __BaseException } from "./S3ServiceException"; +/** + * @public + */ +export interface PutBucketCorsRequest { + /** + *

Specifies the bucket impacted by the corsconfiguration.

+ *

Note: To supply the Multi-region Access Point (MRAP) to Bucket, you need to install the "@aws-sdk/signature-v4-crt" package to your project dependencies. + * For more information, please go to https://github.com/aws/aws-sdk-js-v3#known-issues

+ * @public + */ + Bucket: string | undefined; + + /** + *

Describes the cross-origin access configuration for objects in an Amazon S3 bucket. For more + * information, see Enabling + * Cross-Origin Resource Sharing in the + * Amazon S3 User Guide.

+ * @public + */ + CORSConfiguration: CORSConfiguration | undefined; + + /** + *

The base64-encoded 128-bit MD5 digest of the data. This header must be used as a message + * integrity check to verify that the request body was not corrupted in transit. For more + * information, go to RFC + * 1864. + *

+ *

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

+ * @public + */ + ContentMD5?: string | undefined; + + /** + *

Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any + * additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or + * x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more + * information, see Checking object integrity in + * the Amazon S3 User Guide.

+ *

If you provide an individual checksum, Amazon S3 ignores any provided + * ChecksumAlgorithm parameter.

+ * @public + */ + ChecksumAlgorithm?: ChecksumAlgorithm | undefined; + + /** + *

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+ * @public + */ + ExpectedBucketOwner?: string | undefined; +} + +/** + * @public + */ +export interface PutBucketEncryptionRequest { + /** + *

Specifies default encryption for a bucket using server-side encryption with different + * key options.

+ *

+ * Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name + * . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format + * bucket-base-name--zone-id--x-s3 (for example, + * DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide + *

+ *

Note: To supply the Multi-region Access Point (MRAP) to Bucket, you need to install the "@aws-sdk/signature-v4-crt" package to your project dependencies. + * For more information, please go to https://github.com/aws/aws-sdk-js-v3#known-issues

+ * @public + */ + Bucket: string | undefined; + + /** + *

The base64-encoded 128-bit MD5 digest of the server-side encryption + * configuration.

+ *

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

+ * + *

This functionality is not supported for directory buckets.

+ *
+ * @public + */ + ContentMD5?: string | undefined; + + /** + *

Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any + * additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or + * x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more + * information, see Checking object integrity in + * the Amazon S3 User Guide.

+ *

If you provide an individual checksum, Amazon S3 ignores any provided + * ChecksumAlgorithm parameter.

+ * + *

For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's used for performance.

+ *
+ * @public + */ + ChecksumAlgorithm?: ChecksumAlgorithm | undefined; + + /** + *

Specifies the default server-side-encryption configuration.

+ * @public + */ + ServerSideEncryptionConfiguration: ServerSideEncryptionConfiguration | undefined; + + /** + *

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+ * + *

For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code + * 501 Not Implemented.

+ *
+ * @public + */ + ExpectedBucketOwner?: string | undefined; +} + +/** + * @public + */ +export interface PutBucketIntelligentTieringConfigurationRequest { + /** + *

The name of the Amazon S3 bucket whose configuration you want to modify or retrieve.

+ *

Note: To supply the Multi-region Access Point (MRAP) to Bucket, you need to install the "@aws-sdk/signature-v4-crt" package to your project dependencies. + * For more information, please go to https://github.com/aws/aws-sdk-js-v3#known-issues

+ * @public + */ + Bucket: string | undefined; + + /** + *

The ID used to identify the S3 Intelligent-Tiering configuration.

+ * @public + */ + Id: string | undefined; + + /** + *

Container for S3 Intelligent-Tiering configuration.

+ * @public + */ + IntelligentTieringConfiguration: IntelligentTieringConfiguration | undefined; +} + +/** + * @public + */ +export interface PutBucketInventoryConfigurationRequest { + /** + *

The name of the bucket where the inventory configuration will be stored.

+ *

Note: To supply the Multi-region Access Point (MRAP) to Bucket, you need to install the "@aws-sdk/signature-v4-crt" package to your project dependencies. + * For more information, please go to https://github.com/aws/aws-sdk-js-v3#known-issues

+ * @public + */ + Bucket: string | undefined; + + /** + *

The ID used to identify the inventory configuration.

+ * @public + */ + Id: string | undefined; + + /** + *

Specifies the inventory configuration.

+ * @public + */ + InventoryConfiguration: InventoryConfiguration | undefined; + + /** + *

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+ * @public + */ + ExpectedBucketOwner?: string | undefined; +} + +/** + * @public + */ +export interface PutBucketLifecycleConfigurationOutput { + /** + *

Indicates which default minimum object size behavior is applied to the lifecycle + * configuration.

+ * + *

This parameter applies to general purpose buckets only. It is not supported for + * directory bucket lifecycle configurations.

+ *
+ *
    + *
  • + *

    + * all_storage_classes_128K - Objects smaller than 128 KB will not + * transition to any storage class by default.

    + *
  • + *
  • + *

    + * varies_by_storage_class - Objects smaller than 128 KB will + * transition to Glacier Flexible Retrieval or Glacier Deep Archive storage classes. By + * default, all other storage classes will prevent transitions smaller than 128 KB. + *

    + *
  • + *
+ *

To customize the minimum object size for any transition you can add a filter that + * specifies a custom ObjectSizeGreaterThan or ObjectSizeLessThan in + * the body of your transition rule. Custom filters always take precedence over the default + * transition behavior.

+ * @public + */ + TransitionDefaultMinimumObjectSize?: TransitionDefaultMinimumObjectSize | undefined; +} + +/** + *

Specifies the lifecycle configuration for objects in an Amazon S3 bucket. For more + * information, see Object Lifecycle Management + * in the Amazon S3 User Guide.

+ * @public + */ +export interface BucketLifecycleConfiguration { + /** + *

A lifecycle rule for individual objects in an Amazon S3 bucket.

+ * @public + */ + Rules: LifecycleRule[] | undefined; +} + +/** + * @public + */ +export interface PutBucketLifecycleConfigurationRequest { + /** + *

The name of the bucket for which to set the configuration.

+ *

Note: To supply the Multi-region Access Point (MRAP) to Bucket, you need to install the "@aws-sdk/signature-v4-crt" package to your project dependencies. + * For more information, please go to https://github.com/aws/aws-sdk-js-v3#known-issues

+ * @public + */ + Bucket: string | undefined; + + /** + *

Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any + * additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or + * x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more + * information, see Checking object integrity in + * the Amazon S3 User Guide.

+ *

If you provide an individual checksum, Amazon S3 ignores any provided + * ChecksumAlgorithm parameter.

+ * @public + */ + ChecksumAlgorithm?: ChecksumAlgorithm | undefined; + + /** + *

Container for lifecycle rules. You can add as many as 1,000 rules.

+ * @public + */ + LifecycleConfiguration?: BucketLifecycleConfiguration | undefined; + + /** + *

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+ * + *

This parameter applies to general purpose buckets only. It is not supported for + * directory bucket lifecycle configurations.

+ *
+ * @public + */ + ExpectedBucketOwner?: string | undefined; + + /** + *

Indicates which default minimum object size behavior is applied to the lifecycle + * configuration.

+ * + *

This parameter applies to general purpose buckets only. It is not supported for + * directory bucket lifecycle configurations.

+ *
+ *
    + *
  • + *

    + * all_storage_classes_128K - Objects smaller than 128 KB will not + * transition to any storage class by default.

    + *
  • + *
  • + *

    + * varies_by_storage_class - Objects smaller than 128 KB will + * transition to Glacier Flexible Retrieval or Glacier Deep Archive storage classes. By + * default, all other storage classes will prevent transitions smaller than 128 KB. + *

    + *
  • + *
+ *

To customize the minimum object size for any transition you can add a filter that + * specifies a custom ObjectSizeGreaterThan or ObjectSizeLessThan in + * the body of your transition rule. Custom filters always take precedence over the default + * transition behavior.

+ * @public + */ + TransitionDefaultMinimumObjectSize?: TransitionDefaultMinimumObjectSize | undefined; +} + +/** + *

Container for logging status information.

+ * @public + */ +export interface BucketLoggingStatus { + /** + *

Describes where logs are stored and the prefix that Amazon S3 assigns to all log object keys + * for a bucket. For more information, see PUT Bucket logging in the + * Amazon S3 API Reference.

+ * @public + */ + LoggingEnabled?: LoggingEnabled | undefined; +} + +/** + * @public + */ +export interface PutBucketLoggingRequest { + /** + *

The name of the bucket for which to set the logging parameters.

+ *

Note: To supply the Multi-region Access Point (MRAP) to Bucket, you need to install the "@aws-sdk/signature-v4-crt" package to your project dependencies. + * For more information, please go to https://github.com/aws/aws-sdk-js-v3#known-issues

+ * @public + */ + Bucket: string | undefined; + + /** + *

Container for logging status information.

+ * @public + */ + BucketLoggingStatus: BucketLoggingStatus | undefined; + + /** + *

The MD5 hash of the PutBucketLogging request body.

+ *

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

+ * @public + */ + ContentMD5?: string | undefined; + + /** + *

Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any + * additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or + * x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more + * information, see Checking object integrity in + * the Amazon S3 User Guide.

+ *

If you provide an individual checksum, Amazon S3 ignores any provided + * ChecksumAlgorithm parameter.

+ * @public + */ + ChecksumAlgorithm?: ChecksumAlgorithm | undefined; + + /** + *

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+ * @public + */ + ExpectedBucketOwner?: string | undefined; +} + +/** + * @public + */ +export interface PutBucketMetricsConfigurationRequest { + /** + *

The name of the bucket for which the metrics configuration is set.

+ *

Note: To supply the Multi-region Access Point (MRAP) to Bucket, you need to install the "@aws-sdk/signature-v4-crt" package to your project dependencies. + * For more information, please go to https://github.com/aws/aws-sdk-js-v3#known-issues

+ * @public + */ + Bucket: string | undefined; + + /** + *

The ID used to identify the metrics configuration. The ID has a 64 character limit and + * can only contain letters, numbers, periods, dashes, and underscores.

+ * @public + */ + Id: string | undefined; + + /** + *

Specifies the metrics configuration.

+ * @public + */ + MetricsConfiguration: MetricsConfiguration | undefined; + + /** + *

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+ * @public + */ + ExpectedBucketOwner?: string | undefined; +} + /** * @public */ @@ -3985,6 +4372,30 @@ export interface WriteGetObjectResponseRequest { BucketKeyEnabled?: boolean | undefined; } +/** + * @internal + */ +export const PutBucketEncryptionRequestFilterSensitiveLog = (obj: PutBucketEncryptionRequest): any => ({ + ...obj, + ...(obj.ServerSideEncryptionConfiguration && { + ServerSideEncryptionConfiguration: ServerSideEncryptionConfigurationFilterSensitiveLog( + obj.ServerSideEncryptionConfiguration + ), + }), +}); + +/** + * @internal + */ +export const PutBucketInventoryConfigurationRequestFilterSensitiveLog = ( + obj: PutBucketInventoryConfigurationRequest +): any => ({ + ...obj, + ...(obj.InventoryConfiguration && { + InventoryConfiguration: InventoryConfigurationFilterSensitiveLog(obj.InventoryConfiguration), + }), +}); + /** * @internal */ diff --git a/clients/client-s3/src/protocols/Aws_restXml.ts b/clients/client-s3/src/protocols/Aws_restXml.ts index d0b345cd5991..d0578f52cd33 100644 --- a/clients/client-s3/src/protocols/Aws_restXml.ts +++ b/clients/client-s3/src/protocols/Aws_restXml.ts @@ -47,6 +47,10 @@ import { } from "../commands/CompleteMultipartUploadCommand"; import { CopyObjectCommandInput, CopyObjectCommandOutput } from "../commands/CopyObjectCommand"; import { CreateBucketCommandInput, CreateBucketCommandOutput } from "../commands/CreateBucketCommand"; +import { + CreateBucketMetadataTableConfigurationCommandInput, + CreateBucketMetadataTableConfigurationCommandOutput, +} from "../commands/CreateBucketMetadataTableConfigurationCommand"; import { CreateMultipartUploadCommandInput, CreateMultipartUploadCommandOutput, @@ -74,6 +78,10 @@ import { DeleteBucketLifecycleCommandInput, DeleteBucketLifecycleCommandOutput, } from "../commands/DeleteBucketLifecycleCommand"; +import { + DeleteBucketMetadataTableConfigurationCommandInput, + DeleteBucketMetadataTableConfigurationCommandOutput, +} from "../commands/DeleteBucketMetadataTableConfigurationCommand"; import { DeleteBucketMetricsConfigurationCommandInput, DeleteBucketMetricsConfigurationCommandOutput, @@ -133,6 +141,10 @@ import { } from "../commands/GetBucketLifecycleConfigurationCommand"; import { GetBucketLocationCommandInput, GetBucketLocationCommandOutput } from "../commands/GetBucketLocationCommand"; import { GetBucketLoggingCommandInput, GetBucketLoggingCommandOutput } from "../commands/GetBucketLoggingCommand"; +import { + GetBucketMetadataTableConfigurationCommandInput, + GetBucketMetadataTableConfigurationCommandOutput, +} from "../commands/GetBucketMetadataTableConfigurationCommand"; import { GetBucketMetricsConfigurationCommandInput, GetBucketMetricsConfigurationCommandOutput, @@ -307,8 +319,6 @@ import { BucketAlreadyExists, BucketAlreadyOwnedByYou, BucketInfo, - BucketLifecycleConfiguration, - BucketLoggingStatus, Checksum, ChecksumAlgorithm, CommonPrefix, @@ -326,11 +336,13 @@ import { DeleteMarkerReplication, Destination, EncryptionConfiguration, + ErrorDetails, ErrorDocument, Event, EventBridgeConfiguration, ExistingObjectReplication, FilterRule, + GetBucketMetadataTableConfigurationResult, GetObjectAttributesParts, Grant, Grantee, @@ -354,6 +366,8 @@ import { LifecycleRuleFilter, LocationInfo, LoggingEnabled, + MetadataTableConfiguration, + MetadataTableConfigurationResult, Metrics, MetricsAndOperator, MetricsConfiguration, @@ -395,6 +409,8 @@ import { RestoreStatus, RoutingRule, S3KeyFilter, + S3TablesDestination, + S3TablesDestinationResult, ServerSideEncryptionByDefault, ServerSideEncryptionConfiguration, ServerSideEncryptionRule, @@ -414,6 +430,8 @@ import { Transition, } from "../models/models_0"; import { + BucketLifecycleConfiguration, + BucketLoggingStatus, ContinuationEvent, CopyPartResult, CSVInput, @@ -614,6 +632,37 @@ export const se_CreateBucketCommand = async ( return b.build(); }; +/** + * serializeAws_restXmlCreateBucketMetadataTableConfigurationCommand + */ +export const se_CreateBucketMetadataTableConfigurationCommand = async ( + input: CreateBucketMetadataTableConfigurationCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = map({}, isSerializableHeaderValue, { + "content-type": "application/xml", + [_cm]: input[_CMD]!, + [_xasca]: input[_CA]!, + [_xaebo]: input[_EBO]!, + }); + b.bp("/"); + b.p("Bucket", () => input.Bucket!, "{Bucket}", false); + const query: any = map({ + [_mT]: [, ""], + }); + let body: any; + let contents: any; + if (input.MetadataTableConfiguration !== undefined) { + contents = se_MetadataTableConfiguration(input.MetadataTableConfiguration, context); + body = _ve; + contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); + body += contents.toString(); + } + b.m("POST").h(headers).q(query).b(body); + return b.build(); +}; + /** * serializeAws_restXmlCreateMultipartUploadCommand */ @@ -837,6 +886,27 @@ export const se_DeleteBucketLifecycleCommand = async ( return b.build(); }; +/** + * serializeAws_restXmlDeleteBucketMetadataTableConfigurationCommand + */ +export const se_DeleteBucketMetadataTableConfigurationCommand = async ( + input: DeleteBucketMetadataTableConfigurationCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = map({}, isSerializableHeaderValue, { + [_xaebo]: input[_EBO]!, + }); + b.bp("/"); + b.p("Bucket", () => input.Bucket!, "{Bucket}", false); + const query: any = map({ + [_mT]: [, ""], + }); + let body: any; + b.m("DELETE").h(headers).q(query).b(body); + return b.build(); +}; + /** * serializeAws_restXmlDeleteBucketMetricsConfigurationCommand */ @@ -1285,6 +1355,27 @@ export const se_GetBucketLoggingCommand = async ( return b.build(); }; +/** + * serializeAws_restXmlGetBucketMetadataTableConfigurationCommand + */ +export const se_GetBucketMetadataTableConfigurationCommand = async ( + input: GetBucketMetadataTableConfigurationCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = map({}, isSerializableHeaderValue, { + [_xaebo]: input[_EBO]!, + }); + b.bp("/"); + b.p("Bucket", () => input.Bucket!, "{Bucket}", false); + const query: any = map({ + [_mT]: [, ""], + }); + let body: any; + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}; + /** * serializeAws_restXmlGetBucketMetricsConfigurationCommand */ @@ -3243,6 +3334,23 @@ export const de_CreateBucketCommand = async ( return contents; }; +/** + * deserializeAws_restXmlCreateBucketMetadataTableConfigurationCommand + */ +export const de_CreateBucketMetadataTableConfigurationCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + /** * deserializeAws_restXmlCreateMultipartUploadCommand */ @@ -3425,6 +3533,23 @@ export const de_DeleteBucketLifecycleCommand = async ( return contents; }; +/** + * deserializeAws_restXmlDeleteBucketMetadataTableConfigurationCommand + */ +export const de_DeleteBucketMetadataTableConfigurationCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 204 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + /** * deserializeAws_restXmlDeleteBucketMetricsConfigurationCommand */ @@ -3813,6 +3938,24 @@ export const de_GetBucketLoggingCommand = async ( return contents; }; +/** + * deserializeAws_restXmlGetBucketMetadataTableConfigurationCommand + */ +export const de_GetBucketMetadataTableConfigurationCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record | undefined = __expectObject(await parseBody(output.body, context)); + contents.GetBucketMetadataTableConfigurationResult = de_GetBucketMetadataTableConfigurationResult(data, context); + return contents; +}; + /** * deserializeAws_restXmlGetBucketMetricsConfigurationCommand */ @@ -6608,6 +6751,17 @@ const se_MetadataEntry = (input: MetadataEntry, context: __SerdeContext): any => return bn; }; +/** + * serializeAws_restXmlMetadataTableConfiguration + */ +const se_MetadataTableConfiguration = (input: MetadataTableConfiguration, context: __SerdeContext): any => { + const bn = new __XmlNode(_MTC); + if (input[_STD] != null) { + bn.c(se_S3TablesDestination(input[_STD], context).n(_STD)); + } + return bn; +}; + /** * serializeAws_restXmlMetrics */ @@ -7207,6 +7361,20 @@ const se_S3Location = (input: S3Location, context: __SerdeContext): any => { return bn; }; +/** + * serializeAws_restXmlS3TablesDestination + */ +const se_S3TablesDestination = (input: S3TablesDestination, context: __SerdeContext): any => { + const bn = new __XmlNode(_STD); + if (input[_TBA] != null) { + bn.c(__XmlNode.of(_STBA, input[_TBA]).n(_TBA)); + } + if (input[_TN] != null) { + bn.c(__XmlNode.of(_STN, input[_TN]).n(_TN)); + } + return bn; +}; + /** * serializeAws_restXmlScanRange */ @@ -8085,6 +8253,20 @@ const de__Error = (output: any, context: __SerdeContext): _Error => { return contents; }; +/** + * deserializeAws_restXmlErrorDetails + */ +const de_ErrorDetails = (output: any, context: __SerdeContext): ErrorDetails => { + const contents: any = {}; + if (output[_EC] != null) { + contents[_EC] = __expectString(output[_EC]); + } + if (output[_EM] != null) { + contents[_EM] = __expectString(output[_EM]); + } + return contents; +}; + /** * deserializeAws_restXmlErrorDocument */ @@ -8173,6 +8355,26 @@ const de_FilterRuleList = (output: any, context: __SerdeContext): FilterRule[] = }); }; +/** + * deserializeAws_restXmlGetBucketMetadataTableConfigurationResult + */ +const de_GetBucketMetadataTableConfigurationResult = ( + output: any, + context: __SerdeContext +): GetBucketMetadataTableConfigurationResult => { + const contents: any = {}; + if (output[_MTCR] != null) { + contents[_MTCR] = de_MetadataTableConfigurationResult(output[_MTCR], context); + } + if (output[_S] != null) { + contents[_S] = __expectString(output[_S]); + } + if (output[_Er] != null) { + contents[_Er] = de_ErrorDetails(output[_Er], context); + } + return contents; +}; + /** * deserializeAws_restXmlGetObjectAttributesParts */ @@ -8633,6 +8835,20 @@ const de_LoggingEnabled = (output: any, context: __SerdeContext): LoggingEnabled return contents; }; +/** + * deserializeAws_restXmlMetadataTableConfigurationResult + */ +const de_MetadataTableConfigurationResult = ( + output: any, + context: __SerdeContext +): MetadataTableConfigurationResult => { + const contents: any = {}; + if (output[_STDR] != null) { + contents[_STDR] = de_S3TablesDestinationResult(output[_STDR], context); + } + return contents; +}; + /** * deserializeAws_restXmlMetrics */ @@ -9400,6 +9616,26 @@ const de_S3KeyFilter = (output: any, context: __SerdeContext): S3KeyFilter => { return contents; }; +/** + * deserializeAws_restXmlS3TablesDestinationResult + */ +const de_S3TablesDestinationResult = (output: any, context: __SerdeContext): S3TablesDestinationResult => { + const contents: any = {}; + if (output[_TBA] != null) { + contents[_TBA] = __expectString(output[_TBA]); + } + if (output[_TN] != null) { + contents[_TN] = __expectString(output[_TN]); + } + if (output[_TAa] != null) { + contents[_TAa] = __expectString(output[_TAa]); + } + if (output[_TNa] != null) { + contents[_TNa] = __expectString(output[_TNa]); + } + return contents; +}; + /** * deserializeAws_restXmlServerSideEncryptionByDefault */ @@ -9991,6 +10227,8 @@ const _MKe = "MetadataKey"; const _MM = "MissingMeta"; const _MP = "MaxParts"; const _MS = "MetricsStatus"; +const _MTC = "MetadataTableConfiguration"; +const _MTCR = "MetadataTableConfigurationResult"; const _MU = "MaxUploads"; const _MV = "MetadataValue"; const _Me = "Metrics"; @@ -10146,6 +10384,10 @@ const _SSEKMSKI = "SSEKMSKeyId"; const _SSER = "ServerSideEncryptionRule"; const _SSES = "SSES3"; const _ST = "SessionToken"; +const _STBA = "S3TablesBucketArn"; +const _STD = "S3TablesDestination"; +const _STDR = "S3TablesDestinationResult"; +const _STN = "S3TablesName"; const _S_ = "S3"; const _Sc = "Schedule"; const _Se = "Setting"; @@ -10154,7 +10396,9 @@ const _St = "Start"; const _Su = "Suffix"; const _T = "Tagging"; const _TA = "TopicArn"; +const _TAa = "TableArn"; const _TB = "TargetBucket"; +const _TBA = "TableBucketArn"; const _TC = "TagCount"; const _TCo = "TopicConfiguration"; const _TCop = "TopicConfigurations"; @@ -10162,6 +10406,8 @@ const _TD = "TaggingDirective"; const _TDMOS = "TransitionDefaultMinimumObjectSize"; const _TG = "TargetGrants"; const _TGa = "TargetGrant"; +const _TN = "TableName"; +const _TNa = "TableNamespace"; const _TOKF = "TargetObjectKeyFormat"; const _TP = "TargetPrefix"; const _TPC = "TotalPartsCount"; @@ -10234,6 +10480,7 @@ const _lo = "location"; const _log = "logging"; const _lt = "list-type"; const _m = "metrics"; +const _mT = "metadataTable"; const _ma = "marker"; const _mb = "max-buckets"; const _mdb = "max-directory-buckets"; diff --git a/codegen/sdk-codegen/aws-models/s3.json b/codegen/sdk-codegen/aws-models/s3.json index dc23e03cb00e..fef59bf7d2fd 100644 --- a/codegen/sdk-codegen/aws-models/s3.json +++ b/codegen/sdk-codegen/aws-models/s3.json @@ -266,6 +266,9 @@ { "target": "com.amazonaws.s3#CreateBucket" }, + { + "target": "com.amazonaws.s3#CreateBucketMetadataTableConfiguration" + }, { "target": "com.amazonaws.s3#CreateMultipartUpload" }, @@ -293,6 +296,9 @@ { "target": "com.amazonaws.s3#DeleteBucketLifecycle" }, + { + "target": "com.amazonaws.s3#DeleteBucketMetadataTableConfiguration" + }, { "target": "com.amazonaws.s3#DeleteBucketMetricsConfiguration" }, @@ -353,6 +359,9 @@ { "target": "com.amazonaws.s3#GetBucketLogging" }, + { + "target": "com.amazonaws.s3#GetBucketMetadataTableConfiguration" + }, { "target": "com.amazonaws.s3#GetBucketMetricsConfiguration" }, @@ -20270,6 +20279,81 @@ "smithy.api#documentation": "

The configuration information for the bucket.

" } }, + "com.amazonaws.s3#CreateBucketMetadataTableConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#CreateBucketMetadataTableConfigurationRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm", + "requestChecksumRequired": true + }, + "smithy.api#documentation": "

Creates a metadata table configuration for a general purpose bucket. For more\n information, see Accelerating data\n discovery with S3 Metadata in the Amazon S3 User Guide.

\n
\n
Permissions
\n
\n

To use this operation, you must have the following permissions. For more\n information, see Setting up\n permissions for configuring metadata tables in the\n Amazon S3 User Guide.

\n

If you also want to integrate your table bucket with Amazon Web Services analytics services so that you \n can query your metadata table, you need additional permissions. For more information, see \n \n Integrating Amazon S3 Tables with Amazon Web Services analytics services in the \n Amazon S3 User Guide.

\n
    \n
  • \n

    \n s3:CreateBucketMetadataTableConfiguration\n

    \n
  • \n
  • \n

    \n s3tables:CreateNamespace\n

    \n
  • \n
  • \n

    \n s3tables:GetTable\n

    \n
  • \n
  • \n

    \n s3tables:CreateTable\n

    \n
  • \n
  • \n

    \n s3tables:PutTablePolicy\n

    \n
  • \n
\n
\n
\n

The following operations are related to CreateBucketMetadataTableConfiguration:

\n ", + "smithy.api#http": { + "method": "POST", + "uri": "/{Bucket}?metadataTable", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#CreateBucketMetadataTableConfigurationRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

\n The general purpose bucket that you want to create the metadata table configuration in.\n

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ContentMD5": { + "target": "com.amazonaws.s3#ContentMD5", + "traits": { + "smithy.api#documentation": "

\n The Content-MD5 header for the metadata table configuration.\n

", + "smithy.api#httpHeader": "Content-MD5" + } + }, + "ChecksumAlgorithm": { + "target": "com.amazonaws.s3#ChecksumAlgorithm", + "traits": { + "smithy.api#documentation": "

\n The checksum algorithm to use with your metadata table configuration. \n

", + "smithy.api#httpHeader": "x-amz-sdk-checksum-algorithm" + } + }, + "MetadataTableConfiguration": { + "target": "com.amazonaws.s3#MetadataTableConfiguration", + "traits": { + "smithy.api#documentation": "

\n The contents of your metadata table configuration. \n

", + "smithy.api#httpPayload": {}, + "smithy.api#required": {}, + "smithy.api#xmlName": "MetadataTableConfiguration" + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

\n The expected owner of the general purpose bucket that contains your metadata table configuration.\n

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, "com.amazonaws.s3#CreateBucketOutput": { "type": "structure", "members": { @@ -21282,6 +21366,54 @@ "smithy.api#input": {} } }, + "com.amazonaws.s3#DeleteBucketMetadataTableConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#DeleteBucketMetadataTableConfigurationRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "

\n Deletes a metadata table configuration from a general purpose bucket. For more\n information, see Accelerating data\n discovery with S3 Metadata in the Amazon S3 User Guide.

\n
\n
Permissions
\n
\n

To use this operation, you must have the s3:DeleteBucketMetadataTableConfiguration permission. For more\n information, see Setting up\n permissions for configuring metadata tables in the\n Amazon S3 User Guide.

\n
\n
\n

The following operations are related to DeleteBucketMetadataTableConfiguration:

\n ", + "smithy.api#http": { + "method": "DELETE", + "uri": "/{Bucket}?metadataTable", + "code": 204 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#DeleteBucketMetadataTableConfigurationRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

\n The general purpose bucket that you want to remove the metadata table configuration from.\n

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

\n The expected bucket owner of the general purpose bucket that you want to remove the \n metadata table configuration from.\n

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, "com.amazonaws.s3#DeleteBucketMetricsConfiguration": { "type": "operation", "input": { @@ -22420,6 +22552,26 @@ "com.amazonaws.s3#ErrorCode": { "type": "string" }, + "com.amazonaws.s3#ErrorDetails": { + "type": "structure", + "members": { + "ErrorCode": { + "target": "com.amazonaws.s3#ErrorCode", + "traits": { + "smithy.api#documentation": "

\n If the CreateBucketMetadataTableConfiguration request succeeds, but S3 Metadata was \n unable to create the table, this structure contains the error code. The possible error codes and \n error messages are as follows:\n

\n
    \n
  • \n

    \n AccessDeniedCreatingResources - You don't have sufficient permissions to \n create the required resources. Make sure that you have s3tables:CreateNamespace, \n s3tables:CreateTable, s3tables:GetTable and \n s3tables:PutTablePolicy permissions, and then try again. To create a new metadata \n table, you must delete the metadata configuration for this bucket, and then create a new \n metadata configuration.\n

    \n
  • \n
  • \n

    \n AccessDeniedWritingToTable - Unable to write to the metadata table because of \n missing resource permissions. To fix the resource policy, Amazon S3 needs to create a new \n metadata table. To create a new metadata table, you must delete the metadata configuration for \n this bucket, and then create a new metadata configuration.

    \n
  • \n
  • \n

    \n DestinationTableNotFound - The destination table doesn't exist. To create a \n new metadata table, you must delete the metadata configuration for this bucket, and then \n create a new metadata configuration.

    \n
  • \n
  • \n

    \n ServerInternalError - An internal error has occurred. To create a new metadata \n table, you must delete the metadata configuration for this bucket, and then create a new \n metadata configuration.

    \n
  • \n
  • \n

    \n TableAlreadyExists - The table that you specified already exists in the table \n bucket's namespace. Specify a different table name. To create a new metadata table, you must \n delete the metadata configuration for this bucket, and then create a new metadata \n configuration.

    \n
  • \n
  • \n

    \n TableBucketNotFound - The table bucket that you specified doesn't exist in \n this Amazon Web Services Region and account. Create or choose a different table bucket. To create a new \n metadata table, you must delete the metadata configuration for this bucket, and then create \n a new metadata configuration.

    \n
  • \n
" + } + }, + "ErrorMessage": { + "target": "com.amazonaws.s3#ErrorMessage", + "traits": { + "smithy.api#documentation": "

\n If the CreateBucketMetadataTableConfiguration request succeeds, but S3 Metadata was \n unable to create the table, this structure contains the error message. The possible error codes and \n error messages are as follows:\n

\n
    \n
  • \n

    \n AccessDeniedCreatingResources - You don't have sufficient permissions to \n create the required resources. Make sure that you have s3tables:CreateNamespace, \n s3tables:CreateTable, s3tables:GetTable and \n s3tables:PutTablePolicy permissions, and then try again. To create a new metadata \n table, you must delete the metadata configuration for this bucket, and then create a new \n metadata configuration.\n

    \n
  • \n
  • \n

    \n AccessDeniedWritingToTable - Unable to write to the metadata table because of \n missing resource permissions. To fix the resource policy, Amazon S3 needs to create a new \n metadata table. To create a new metadata table, you must delete the metadata configuration for \n this bucket, and then create a new metadata configuration.

    \n
  • \n
  • \n

    \n DestinationTableNotFound - The destination table doesn't exist. To create a \n new metadata table, you must delete the metadata configuration for this bucket, and then \n create a new metadata configuration.

    \n
  • \n
  • \n

    \n ServerInternalError - An internal error has occurred. To create a new metadata \n table, you must delete the metadata configuration for this bucket, and then create a new \n metadata configuration.

    \n
  • \n
  • \n

    \n TableAlreadyExists - The table that you specified already exists in the table \n bucket's namespace. Specify a different table name. To create a new metadata table, you must \n delete the metadata configuration for this bucket, and then create a new metadata \n configuration.

    \n
  • \n
  • \n

    \n TableBucketNotFound - The table bucket that you specified doesn't exist in \n this Amazon Web Services Region and account. Create or choose a different table bucket. To create a new \n metadata table, you must delete the metadata configuration for this bucket, and then create \n a new metadata configuration.

    \n
  • \n
" + } + } + }, + "traits": { + "smithy.api#documentation": "

\n If the CreateBucketMetadataTableConfiguration request succeeds, but S3 Metadata was \n unable to create the table, this structure contains the error code and error message.\n

" + } + }, "com.amazonaws.s3#ErrorDocument": { "type": "structure", "members": { @@ -23515,6 +23667,97 @@ "smithy.api#input": {} } }, + "com.amazonaws.s3#GetBucketMetadataTableConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetBucketMetadataTableConfigurationRequest" + }, + "output": { + "target": "com.amazonaws.s3#GetBucketMetadataTableConfigurationOutput" + }, + "traits": { + "smithy.api#documentation": "

\n Retrieves the metadata table configuration for a general purpose bucket. For more\n information, see Accelerating data\n discovery with S3 Metadata in the Amazon S3 User Guide.

\n
\n
Permissions
\n
\n

To use this operation, you must have the s3:GetBucketMetadataTableConfiguration permission. For more\n information, see Setting up\n permissions for configuring metadata tables in the\n Amazon S3 User Guide.

\n
\n
\n

The following operations are related to GetBucketMetadataTableConfiguration:

\n ", + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?metadataTable", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#GetBucketMetadataTableConfigurationOutput": { + "type": "structure", + "members": { + "GetBucketMetadataTableConfigurationResult": { + "target": "com.amazonaws.s3#GetBucketMetadataTableConfigurationResult", + "traits": { + "smithy.api#documentation": "

\n The metadata table configuration for the general purpose bucket.\n

", + "smithy.api#httpPayload": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#GetBucketMetadataTableConfigurationRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

\n The general purpose bucket that contains the metadata table configuration that you want to retrieve.\n

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

\n The expected owner of the general purpose bucket that you want to retrieve the metadata table configuration from.\n

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GetBucketMetadataTableConfigurationResult": { + "type": "structure", + "members": { + "MetadataTableConfigurationResult": { + "target": "com.amazonaws.s3#MetadataTableConfigurationResult", + "traits": { + "smithy.api#documentation": "

\n The metadata table configuration for a general purpose bucket.\n

", + "smithy.api#required": {} + } + }, + "Status": { + "target": "com.amazonaws.s3#MetadataTableStatus", + "traits": { + "smithy.api#documentation": "

\n The status of the metadata table. The status values are:\n

\n
    \n
  • \n

    \n CREATING - The metadata table is in the process of being created in the \n specified table bucket.

    \n
  • \n
  • \n

    \n ACTIVE - The metadata table has been created successfully and records \n are being delivered to the table.\n

    \n
  • \n
  • \n

    \n FAILED - Amazon S3 is unable to create the metadata table, or Amazon S3 is unable to deliver \n records. See ErrorDetails for details.

    \n
  • \n
", + "smithy.api#required": {} + } + }, + "Error": { + "target": "com.amazonaws.s3#ErrorDetails", + "traits": { + "smithy.api#documentation": "

\n If the CreateBucketMetadataTableConfiguration request succeeds, but S3 Metadata was \n unable to create the table, this structure contains the error code and error message. \n

" + } + } + }, + "traits": { + "smithy.api#documentation": "

\n The metadata table configuration for a general purpose bucket.\n

" + } + }, "com.amazonaws.s3#GetBucketMetricsConfiguration": { "type": "operation", "input": { @@ -29173,6 +29416,39 @@ "com.amazonaws.s3#MetadataKey": { "type": "string" }, + "com.amazonaws.s3#MetadataTableConfiguration": { + "type": "structure", + "members": { + "S3TablesDestination": { + "target": "com.amazonaws.s3#S3TablesDestination", + "traits": { + "smithy.api#documentation": "

\n The destination information for the metadata table configuration. The destination table bucket\n must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata\n table name must be unique within the aws_s3_metadata namespace in the destination \n table bucket.\n

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

\n The metadata table configuration for a general purpose bucket.\n

" + } + }, + "com.amazonaws.s3#MetadataTableConfigurationResult": { + "type": "structure", + "members": { + "S3TablesDestinationResult": { + "target": "com.amazonaws.s3#S3TablesDestinationResult", + "traits": { + "smithy.api#documentation": "

\n The destination information for the metadata table configuration. The destination table bucket\n must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata\n table name must be unique within the aws_s3_metadata namespace in the destination \n table bucket.\n

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

\n The metadata table configuration for a general purpose bucket. The destination table bucket\n must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata\n table name must be unique within the aws_s3_metadata namespace in the destination \n table bucket. \n

" + } + }, + "com.amazonaws.s3#MetadataTableStatus": { + "type": "string" + }, "com.amazonaws.s3#MetadataValue": { "type": "string" }, @@ -34163,6 +34439,76 @@ "smithy.api#documentation": "

Describes an Amazon S3 location that will receive the results of the restore request.

" } }, + "com.amazonaws.s3#S3TablesArn": { + "type": "string" + }, + "com.amazonaws.s3#S3TablesBucketArn": { + "type": "string" + }, + "com.amazonaws.s3#S3TablesDestination": { + "type": "structure", + "members": { + "TableBucketArn": { + "target": "com.amazonaws.s3#S3TablesBucketArn", + "traits": { + "smithy.api#documentation": "

\n The Amazon Resource Name (ARN) for the table bucket that's specified as the \n destination in the metadata table configuration. The destination table bucket\n must be in the same Region and Amazon Web Services account as the general purpose bucket.\n

", + "smithy.api#required": {} + } + }, + "TableName": { + "target": "com.amazonaws.s3#S3TablesName", + "traits": { + "smithy.api#documentation": "

\n The name for the metadata table in your metadata table configuration. The specified metadata\n table name must be unique within the aws_s3_metadata namespace in the destination \n table bucket.\n

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

\n The destination information for the metadata table configuration. The destination table bucket\n must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata\n table name must be unique within the aws_s3_metadata namespace in the destination \n table bucket. \n

" + } + }, + "com.amazonaws.s3#S3TablesDestinationResult": { + "type": "structure", + "members": { + "TableBucketArn": { + "target": "com.amazonaws.s3#S3TablesBucketArn", + "traits": { + "smithy.api#documentation": "

\n The Amazon Resource Name (ARN) for the table bucket that's specified as the \n destination in the metadata table configuration. The destination table bucket\n must be in the same Region and Amazon Web Services account as the general purpose bucket.\n

", + "smithy.api#required": {} + } + }, + "TableName": { + "target": "com.amazonaws.s3#S3TablesName", + "traits": { + "smithy.api#documentation": "

\n The name for the metadata table in your metadata table configuration. The specified metadata\n table name must be unique within the aws_s3_metadata namespace in the destination \n table bucket.\n

", + "smithy.api#required": {} + } + }, + "TableArn": { + "target": "com.amazonaws.s3#S3TablesArn", + "traits": { + "smithy.api#documentation": "

\n The Amazon Resource Name (ARN) for the metadata table in the metadata table configuration. The \n specified metadata table name must be unique within the aws_s3_metadata namespace \n in the destination table bucket.\n

", + "smithy.api#required": {} + } + }, + "TableNamespace": { + "target": "com.amazonaws.s3#S3TablesNamespace", + "traits": { + "smithy.api#documentation": "

\n The table bucket namespace for the metadata table in your metadata table configuration. This value \n is always aws_s3_metadata.\n

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

\n The destination information for the metadata table configuration. The destination table bucket\n must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata\n table name must be unique within the aws_s3_metadata namespace in the destination \n table bucket.\n

" + } + }, + "com.amazonaws.s3#S3TablesName": { + "type": "string" + }, + "com.amazonaws.s3#S3TablesNamespace": { + "type": "string" + }, "com.amazonaws.s3#SSECustomerAlgorithm": { "type": "string" },