@aws-sdk/client-s3
Version:
AWS SDK for JavaScript S3 Client for Node.js, Browser and React Native
959 lines • 209 kB
TypeScript
import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-client";
import { StreamingBlobTypes } from "@smithy/types";
import { AccessControlPolicy, BucketVersioningStatus, ChecksumAlgorithm, ChecksumType, CORSRule, ErrorDocument, Grant, IndexDocument, IntelligentTieringConfiguration, InventoryConfiguration, LifecycleRule, LoggingEnabled, MetricsConfiguration, NotificationConfiguration, ObjectCannedACL, ObjectLockConfiguration, ObjectLockLegalHold, ObjectLockLegalHoldStatus, ObjectLockMode, ObjectLockRetention, OwnershipControls, Payer, PublicAccessBlockConfiguration, RedirectAllRequestsTo, ReplicationConfiguration, ReplicationStatus, RequestCharged, RequestPayer, RoutingRule, ServerSideEncryption, ServerSideEncryptionConfiguration, StorageClass, Tag, TransitionDefaultMinimumObjectSize } from "./models_0";
import { S3ServiceException as __BaseException } from "./S3ServiceException";
/**
* <p>Describes the cross-origin access configuration for objects in an Amazon S3 bucket. For more
* information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html">Enabling
* Cross-Origin Resource Sharing</a> in the
* <i>Amazon S3 User Guide</i>.</p>
* @public
*/
export interface CORSConfiguration {
/**
* <p>A set of origins and methods (cross-origin access that you want to allow). You can add
* up to 100 rules to the configuration.</p>
* @public
*/
CORSRules: CORSRule[] | undefined;
}
/**
* @public
*/
export interface PutBucketCorsRequest {
/**
* <p>Specifies the bucket impacted by the <code>cors</code>configuration.</p>
* <p>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</p>
* @public
*/
Bucket: string | undefined;
/**
* <p>Describes the cross-origin access configuration for objects in an Amazon S3 bucket. For more
* information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html">Enabling
* Cross-Origin Resource Sharing</a> in the
* <i>Amazon S3 User Guide</i>.</p>
* @public
*/
CORSConfiguration: CORSConfiguration | undefined;
/**
* <p>The Base64 encoded 128-bit <code>MD5</code> 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 <a href="http://www.ietf.org/rfc/rfc1864.txt">RFC
* 1864.</a>
* </p>
* <p>For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.</p>
* @public
*/
ContentMD5?: string | undefined;
/**
* <p>Indicates the algorithm used to create the checksum for the request 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 <code>x-amz-checksum</code> or
* <code>x-amz-trailer</code> header sent. Otherwise, Amazon S3 fails the request with the HTTP status code <code>400 Bad Request</code>. For more
* information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in
* the <i>Amazon S3 User Guide</i>.</p>
* <p>If you provide an individual checksum, Amazon S3 ignores any provided
* <code>ChecksumAlgorithm</code> parameter.</p>
* @public
*/
ChecksumAlgorithm?: ChecksumAlgorithm | undefined;
/**
* <p>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 <code>403 Forbidden</code> (access denied).</p>
* @public
*/
ExpectedBucketOwner?: string | undefined;
}
/**
* @public
*/
export interface PutBucketEncryptionRequest {
/**
* <p>Specifies default encryption for a bucket using server-side encryption with different
* key options.</p>
* <p>
* <b>Directory buckets </b> - When you use this operation with a directory bucket, you must use path-style requests in the format <code>https://s3express-control.<i>region-code</i>.amazonaws.com/<i>bucket-name</i>
* </code>. 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 <code>
* <i>bucket-base-name</i>--<i>zone-id</i>--x-s3</code> (for example, <code>
* <i>DOC-EXAMPLE-BUCKET</i>--<i>usw2-az1</i>--x-s3</code>). For information about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html">Directory bucket naming rules</a> in the <i>Amazon S3 User Guide</i>
* </p>
* <p>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</p>
* @public
*/
Bucket: string | undefined;
/**
* <p>The Base64 encoded 128-bit <code>MD5</code> digest of the server-side encryption
* configuration.</p>
* <p>For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.</p>
* <note>
* <p>This functionality is not supported for directory buckets.</p>
* </note>
* @public
*/
ContentMD5?: string | undefined;
/**
* <p>Indicates the algorithm used to create the checksum for the request 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 <code>x-amz-checksum</code> or
* <code>x-amz-trailer</code> header sent. Otherwise, Amazon S3 fails the request with the HTTP status code <code>400 Bad Request</code>. For more
* information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in
* the <i>Amazon S3 User Guide</i>.</p>
* <p>If you provide an individual checksum, Amazon S3 ignores any provided
* <code>ChecksumAlgorithm</code> parameter.</p>
* <note>
* <p>For directory buckets, when you use Amazon Web Services SDKs, <code>CRC32</code> is the default checksum algorithm that's used for performance.</p>
* </note>
* @public
*/
ChecksumAlgorithm?: ChecksumAlgorithm | undefined;
/**
* <p>Specifies the default server-side-encryption configuration.</p>
* @public
*/
ServerSideEncryptionConfiguration: ServerSideEncryptionConfiguration | undefined;
/**
* <p>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 <code>403 Forbidden</code> (access denied).</p>
* <note>
* <p>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
* <code>501 Not Implemented</code>.</p>
* </note>
* @public
*/
ExpectedBucketOwner?: string | undefined;
}
/**
* @public
*/
export interface PutBucketIntelligentTieringConfigurationRequest {
/**
* <p>The name of the Amazon S3 bucket whose configuration you want to modify or retrieve.</p>
* <p>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</p>
* @public
*/
Bucket: string | undefined;
/**
* <p>The ID used to identify the S3 Intelligent-Tiering configuration.</p>
* @public
*/
Id: string | undefined;
/**
* <p>Container for S3 Intelligent-Tiering configuration.</p>
* @public
*/
IntelligentTieringConfiguration: IntelligentTieringConfiguration | undefined;
}
/**
* @public
*/
export interface PutBucketInventoryConfigurationRequest {
/**
* <p>The name of the bucket where the inventory configuration will be stored.</p>
* <p>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</p>
* @public
*/
Bucket: string | undefined;
/**
* <p>The ID used to identify the inventory configuration.</p>
* @public
*/
Id: string | undefined;
/**
* <p>Specifies the inventory configuration.</p>
* @public
*/
InventoryConfiguration: InventoryConfiguration | undefined;
/**
* <p>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 <code>403 Forbidden</code> (access denied).</p>
* @public
*/
ExpectedBucketOwner?: string | undefined;
}
/**
* @public
*/
export interface PutBucketLifecycleConfigurationOutput {
/**
* <p>Indicates which default minimum object size behavior is applied to the lifecycle
* configuration.</p>
* <note>
* <p>This parameter applies to general purpose buckets only. It is not supported for
* directory bucket lifecycle configurations.</p>
* </note>
* <ul>
* <li>
* <p>
* <code>all_storage_classes_128K</code> - Objects smaller than 128 KB will not
* transition to any storage class by default. </p>
* </li>
* <li>
* <p>
* <code>varies_by_storage_class</code> - 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.
* </p>
* </li>
* </ul>
* <p>To customize the minimum object size for any transition you can add a filter that
* specifies a custom <code>ObjectSizeGreaterThan</code> or <code>ObjectSizeLessThan</code> in
* the body of your transition rule. Custom filters always take precedence over the default
* transition behavior.</p>
* @public
*/
TransitionDefaultMinimumObjectSize?: TransitionDefaultMinimumObjectSize | undefined;
}
/**
* <p>Specifies the lifecycle configuration for objects in an Amazon S3 bucket. For more
* information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html">Object Lifecycle Management</a>
* in the <i>Amazon S3 User Guide</i>.</p>
* @public
*/
export interface BucketLifecycleConfiguration {
/**
* <p>A lifecycle rule for individual objects in an Amazon S3 bucket.</p>
* @public
*/
Rules: LifecycleRule[] | undefined;
}
/**
* @public
*/
export interface PutBucketLifecycleConfigurationRequest {
/**
* <p>The name of the bucket for which to set the configuration.</p>
* <p>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</p>
* @public
*/
Bucket: string | undefined;
/**
* <p>Indicates the algorithm used to create the checksum for the request 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 <code>x-amz-checksum</code> or
* <code>x-amz-trailer</code> header sent. Otherwise, Amazon S3 fails the request with the HTTP status code <code>400 Bad Request</code>. For more
* information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in
* the <i>Amazon S3 User Guide</i>.</p>
* <p>If you provide an individual checksum, Amazon S3 ignores any provided
* <code>ChecksumAlgorithm</code> parameter.</p>
* @public
*/
ChecksumAlgorithm?: ChecksumAlgorithm | undefined;
/**
* <p>Container for lifecycle rules. You can add as many as 1,000 rules.</p>
* @public
*/
LifecycleConfiguration?: BucketLifecycleConfiguration | undefined;
/**
* <p>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 <code>403 Forbidden</code> (access denied).</p>
* <note>
* <p>This parameter applies to general purpose buckets only. It is not supported for
* directory bucket lifecycle configurations.</p>
* </note>
* @public
*/
ExpectedBucketOwner?: string | undefined;
/**
* <p>Indicates which default minimum object size behavior is applied to the lifecycle
* configuration.</p>
* <note>
* <p>This parameter applies to general purpose buckets only. It is not supported for
* directory bucket lifecycle configurations.</p>
* </note>
* <ul>
* <li>
* <p>
* <code>all_storage_classes_128K</code> - Objects smaller than 128 KB will not
* transition to any storage class by default. </p>
* </li>
* <li>
* <p>
* <code>varies_by_storage_class</code> - 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.
* </p>
* </li>
* </ul>
* <p>To customize the minimum object size for any transition you can add a filter that
* specifies a custom <code>ObjectSizeGreaterThan</code> or <code>ObjectSizeLessThan</code> in
* the body of your transition rule. Custom filters always take precedence over the default
* transition behavior.</p>
* @public
*/
TransitionDefaultMinimumObjectSize?: TransitionDefaultMinimumObjectSize | undefined;
}
/**
* <p>Container for logging status information.</p>
* @public
*/
export interface BucketLoggingStatus {
/**
* <p>Describes where logs are stored and the prefix that Amazon S3 assigns to all log object keys
* for a bucket. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTlogging.html">PUT Bucket logging</a> in the
* <i>Amazon S3 API Reference</i>.</p>
* @public
*/
LoggingEnabled?: LoggingEnabled | undefined;
}
/**
* @public
*/
export interface PutBucketLoggingRequest {
/**
* <p>The name of the bucket for which to set the logging parameters.</p>
* <p>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</p>
* @public
*/
Bucket: string | undefined;
/**
* <p>Container for logging status information.</p>
* @public
*/
BucketLoggingStatus: BucketLoggingStatus | undefined;
/**
* <p>The MD5 hash of the <code>PutBucketLogging</code> request body.</p>
* <p>For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.</p>
* @public
*/
ContentMD5?: string | undefined;
/**
* <p>Indicates the algorithm used to create the checksum for the request 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 <code>x-amz-checksum</code> or
* <code>x-amz-trailer</code> header sent. Otherwise, Amazon S3 fails the request with the HTTP status code <code>400 Bad Request</code>. For more
* information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in
* the <i>Amazon S3 User Guide</i>.</p>
* <p>If you provide an individual checksum, Amazon S3 ignores any provided
* <code>ChecksumAlgorithm</code> parameter.</p>
* @public
*/
ChecksumAlgorithm?: ChecksumAlgorithm | undefined;
/**
* <p>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 <code>403 Forbidden</code> (access denied).</p>
* @public
*/
ExpectedBucketOwner?: string | undefined;
}
/**
* @public
*/
export interface PutBucketMetricsConfigurationRequest {
/**
* <p>The name of the bucket for which the metrics configuration is set.</p>
* <p>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</p>
* @public
*/
Bucket: string | undefined;
/**
* <p>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.</p>
* @public
*/
Id: string | undefined;
/**
* <p>Specifies the metrics configuration.</p>
* @public
*/
MetricsConfiguration: MetricsConfiguration | undefined;
/**
* <p>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 <code>403 Forbidden</code> (access denied).</p>
* @public
*/
ExpectedBucketOwner?: string | undefined;
}
/**
* @public
*/
export interface PutBucketNotificationConfigurationRequest {
/**
* <p>The name of the bucket.</p>
* <p>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</p>
* @public
*/
Bucket: string | undefined;
/**
* <p>A container for specifying the notification configuration of the bucket. If this element
* is empty, notifications are turned off for the bucket.</p>
* @public
*/
NotificationConfiguration: NotificationConfiguration | undefined;
/**
* <p>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 <code>403 Forbidden</code> (access denied).</p>
* @public
*/
ExpectedBucketOwner?: string | undefined;
/**
* <p>Skips validation of Amazon SQS, Amazon SNS, and Lambda
* destinations. True or false value.</p>
* @public
*/
SkipDestinationValidation?: boolean | undefined;
}
/**
* @public
*/
export interface PutBucketOwnershipControlsRequest {
/**
* <p>The name of the Amazon S3 bucket whose <code>OwnershipControls</code> you want to set.</p>
* <p>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</p>
* @public
*/
Bucket: string | undefined;
/**
* <p>The MD5 hash of the <code>OwnershipControls</code> request body. </p>
* <p>For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.</p>
* @public
*/
ContentMD5?: string | undefined;
/**
* <p>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 <code>403 Forbidden</code> (access denied).</p>
* @public
*/
ExpectedBucketOwner?: string | undefined;
/**
* <p>The <code>OwnershipControls</code> (BucketOwnerEnforced, BucketOwnerPreferred, or
* ObjectWriter) that you want to apply to this Amazon S3 bucket.</p>
* @public
*/
OwnershipControls: OwnershipControls | undefined;
/**
* <p> 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
* <code>x-amz-checksum-<i>algorithm</i>
* </code> header sent. Otherwise, Amazon S3 fails the request with the HTTP
* status code <code>400 Bad Request</code>. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object
* integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
* <p>If you provide an individual checksum, Amazon S3 ignores any provided <code>ChecksumAlgorithm</code> parameter. </p>
* @public
*/
ChecksumAlgorithm?: ChecksumAlgorithm | undefined;
}
/**
* @public
*/
export interface PutBucketPolicyRequest {
/**
* <p>The name of the bucket.</p>
* <p>
* <b>Directory buckets </b> - When you use this operation with a directory bucket, you must use path-style requests in the format <code>https://s3express-control.<i>region-code</i>.amazonaws.com/<i>bucket-name</i>
* </code>. 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 <code>
* <i>bucket-base-name</i>--<i>zone-id</i>--x-s3</code> (for example, <code>
* <i>DOC-EXAMPLE-BUCKET</i>--<i>usw2-az1</i>--x-s3</code>). For information about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html">Directory bucket naming rules</a> in the <i>Amazon S3 User Guide</i>
* </p>
* <p>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</p>
* @public
*/
Bucket: string | undefined;
/**
* <p>The MD5 hash of the request body.</p>
* <p>For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.</p>
* <note>
* <p>This functionality is not supported for directory buckets.</p>
* </note>
* @public
*/
ContentMD5?: string | undefined;
/**
* <p>Indicates the algorithm used to create the checksum for the request 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 <code>x-amz-checksum-<i>algorithm</i>
* </code> or
* <code>x-amz-trailer</code> header sent. Otherwise, Amazon S3 fails the request with the HTTP status code <code>400 Bad Request</code>.</p>
* <p>For the <code>x-amz-checksum-<i>algorithm</i>
* </code> header, replace <code>
* <i>algorithm</i>
* </code> with the supported algorithm from the following list: </p>
* <ul>
* <li>
* <p>
* <code>CRC32</code>
* </p>
* </li>
* <li>
* <p>
* <code>CRC32C</code>
* </p>
* </li>
* <li>
* <p>
* <code>CRC64NVME</code>
* </p>
* </li>
* <li>
* <p>
* <code>SHA1</code>
* </p>
* </li>
* <li>
* <p>
* <code>SHA256</code>
* </p>
* </li>
* </ul>
* <p>For more
* information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in
* the <i>Amazon S3 User Guide</i>.</p>
* <p>If the individual checksum value you provide through <code>x-amz-checksum-<i>algorithm</i>
* </code> doesn't match the checksum algorithm you set through <code>x-amz-sdk-checksum-algorithm</code>, Amazon S3 fails the request with a <code>BadDigest</code> error.</p>
* <note>
* <p>For directory buckets, when you use Amazon Web Services SDKs, <code>CRC32</code> is the default checksum algorithm that's used for performance.</p>
* </note>
* @public
*/
ChecksumAlgorithm?: ChecksumAlgorithm | undefined;
/**
* <p>Set this parameter to true to confirm that you want to remove your permissions to change
* this bucket policy in the future.</p>
* <note>
* <p>This functionality is not supported for directory buckets.</p>
* </note>
* @public
*/
ConfirmRemoveSelfBucketAccess?: boolean | undefined;
/**
* <p>The bucket policy as a JSON document.</p>
* <p>For directory buckets, the only IAM action supported in the bucket policy is
* <code>s3express:CreateSession</code>.</p>
* @public
*/
Policy: string | undefined;
/**
* <p>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 <code>403 Forbidden</code> (access denied).</p>
* <note>
* <p>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
* <code>501 Not Implemented</code>.</p>
* </note>
* @public
*/
ExpectedBucketOwner?: string | undefined;
}
/**
* @public
*/
export interface PutBucketReplicationRequest {
/**
* <p>The name of the bucket</p>
* <p>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</p>
* @public
*/
Bucket: string | undefined;
/**
* <p>The Base64 encoded 128-bit <code>MD5</code> digest of the data. You must use this header as a message
* integrity check to verify that the request body was not corrupted in transit. For more
* information, see <a href="http://www.ietf.org/rfc/rfc1864.txt">RFC 1864</a>.</p>
* <p>For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.</p>
* @public
*/
ContentMD5?: string | undefined;
/**
* <p>Indicates the algorithm used to create the checksum for the request 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 <code>x-amz-checksum</code> or
* <code>x-amz-trailer</code> header sent. Otherwise, Amazon S3 fails the request with the HTTP status code <code>400 Bad Request</code>. For more
* information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in
* the <i>Amazon S3 User Guide</i>.</p>
* <p>If you provide an individual checksum, Amazon S3 ignores any provided
* <code>ChecksumAlgorithm</code> parameter.</p>
* @public
*/
ChecksumAlgorithm?: ChecksumAlgorithm | undefined;
/**
* <p>A container for replication rules. You can add up to 1,000 rules. The maximum size of a
* replication configuration is 2 MB.</p>
* @public
*/
ReplicationConfiguration: ReplicationConfiguration | undefined;
/**
* <p>A token to allow Object Lock to be enabled for an existing bucket.</p>
* @public
*/
Token?: string | undefined;
/**
* <p>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 <code>403 Forbidden</code> (access denied).</p>
* @public
*/
ExpectedBucketOwner?: string | undefined;
}
/**
* <p>Container for Payer.</p>
* @public
*/
export interface RequestPaymentConfiguration {
/**
* <p>Specifies who pays for the download and request fees.</p>
* @public
*/
Payer: Payer | undefined;
}
/**
* @public
*/
export interface PutBucketRequestPaymentRequest {
/**
* <p>The bucket name.</p>
* <p>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</p>
* @public
*/
Bucket: string | undefined;
/**
* <p>The Base64 encoded 128-bit <code>MD5</code> digest of the data. You must use this header as a message
* integrity check to verify that the request body was not corrupted in transit. For more
* information, see <a href="http://www.ietf.org/rfc/rfc1864.txt">RFC 1864</a>.</p>
* <p>For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.</p>
* @public
*/
ContentMD5?: string | undefined;
/**
* <p>Indicates the algorithm used to create the checksum for the request 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 <code>x-amz-checksum</code> or
* <code>x-amz-trailer</code> header sent. Otherwise, Amazon S3 fails the request with the HTTP status code <code>400 Bad Request</code>. For more
* information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in
* the <i>Amazon S3 User Guide</i>.</p>
* <p>If you provide an individual checksum, Amazon S3 ignores any provided
* <code>ChecksumAlgorithm</code> parameter.</p>
* @public
*/
ChecksumAlgorithm?: ChecksumAlgorithm | undefined;
/**
* <p>Container for Payer.</p>
* @public
*/
RequestPaymentConfiguration: RequestPaymentConfiguration | undefined;
/**
* <p>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 <code>403 Forbidden</code> (access denied).</p>
* @public
*/
ExpectedBucketOwner?: string | undefined;
}
/**
* <p>Container for <code>TagSet</code> elements.</p>
* @public
*/
export interface Tagging {
/**
* <p>A collection for a set of tags</p>
* @public
*/
TagSet: Tag[] | undefined;
}
/**
* @public
*/
export interface PutBucketTaggingRequest {
/**
* <p>The bucket name.</p>
* <p>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</p>
* @public
*/
Bucket: string | undefined;
/**
* <p>The Base64 encoded 128-bit <code>MD5</code> digest of the data. You must use this header as a message
* integrity check to verify that the request body was not corrupted in transit. For more
* information, see <a href="http://www.ietf.org/rfc/rfc1864.txt">RFC 1864</a>.</p>
* <p>For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.</p>
* @public
*/
ContentMD5?: string | undefined;
/**
* <p>Indicates the algorithm used to create the checksum for the request 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 <code>x-amz-checksum</code> or
* <code>x-amz-trailer</code> header sent. Otherwise, Amazon S3 fails the request with the HTTP status code <code>400 Bad Request</code>. For more
* information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in
* the <i>Amazon S3 User Guide</i>.</p>
* <p>If you provide an individual checksum, Amazon S3 ignores any provided
* <code>ChecksumAlgorithm</code> parameter.</p>
* @public
*/
ChecksumAlgorithm?: ChecksumAlgorithm | undefined;
/**
* <p>Container for the <code>TagSet</code> and <code>Tag</code> elements.</p>
* @public
*/
Tagging: Tagging | undefined;
/**
* <p>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 <code>403 Forbidden</code> (access denied).</p>
* @public
*/
ExpectedBucketOwner?: string | undefined;
}
/**
* @public
* @enum
*/
export declare const MFADelete: {
readonly Disabled: "Disabled";
readonly Enabled: "Enabled";
};
/**
* @public
*/
export type MFADelete = (typeof MFADelete)[keyof typeof MFADelete];
/**
* <p>Describes the versioning state of an Amazon S3 bucket. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTVersioningStatus.html">PUT
* Bucket versioning</a> in the <i>Amazon S3 API Reference</i>.</p>
* @public
*/
export interface VersioningConfiguration {
/**
* <p>Specifies whether MFA delete is enabled in the bucket versioning configuration. This
* element is only returned if the bucket has been configured with MFA delete. If the bucket
* has never been so configured, this element is not returned.</p>
* @public
*/
MFADelete?: MFADelete | undefined;
/**
* <p>The versioning state of the bucket.</p>
* @public
*/
Status?: BucketVersioningStatus | undefined;
}
/**
* @public
*/
export interface PutBucketVersioningRequest {
/**
* <p>The bucket name.</p>
* <p>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</p>
* @public
*/
Bucket: string | undefined;
/**
* <p>>The Base64 encoded 128-bit <code>MD5</code> digest of the data. You must use this header as a
* message integrity check to verify that the request body was not corrupted in transit. For
* more information, see <a href="http://www.ietf.org/rfc/rfc1864.txt">RFC
* 1864</a>.</p>
* <p>For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.</p>
* @public
*/
ContentMD5?: string | undefined;
/**
* <p>Indicates the algorithm used to create the checksum for the request 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 <code>x-amz-checksum</code> or
* <code>x-amz-trailer</code> header sent. Otherwise, Amazon S3 fails the request with the HTTP status code <code>400 Bad Request</code>. For more
* information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in
* the <i>Amazon S3 User Guide</i>.</p>
* <p>If you provide an individual checksum, Amazon S3 ignores any provided
* <code>ChecksumAlgorithm</code> parameter.</p>
* @public
*/
ChecksumAlgorithm?: ChecksumAlgorithm | undefined;
/**
* <p>The concatenation of the authentication device's serial number, a space, and the value
* that is displayed on your authentication device.</p>
* @public
*/
MFA?: string | undefined;
/**
* <p>Container for setting the versioning state.</p>
* @public
*/
VersioningConfiguration: VersioningConfiguration | undefined;
/**
* <p>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 <code>403 Forbidden</code> (access denied).</p>
* @public
*/
ExpectedBucketOwner?: string | undefined;
}
/**
* <p>Specifies website configuration parameters for an Amazon S3 bucket.</p>
* @public
*/
export interface WebsiteConfiguration {
/**
* <p>The name of the error document for the website.</p>
* @public
*/
ErrorDocument?: ErrorDocument | undefined;
/**
* <p>The name of the index document for the website.</p>
* @public
*/
IndexDocument?: IndexDocument | undefined;
/**
* <p>The redirect behavior for every request to this bucket's website endpoint.</p>
* <important>
* <p>If you specify this property, you can't specify any other property.</p>
* </important>
* @public
*/
RedirectAllRequestsTo?: RedirectAllRequestsTo | undefined;
/**
* <p>Rules that define when a redirect is applied and the redirect behavior.</p>
* @public
*/
RoutingRules?: RoutingRule[] | undefined;
}
/**
* @public
*/
export interface PutBucketWebsiteRequest {
/**
* <p>The bucket name.</p>
* <p>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</p>
* @public
*/
Bucket: string | undefined;
/**
* <p>The Base64 encoded 128-bit <code>MD5</code> digest of the data. You must use this header as a message
* integrity check to verify that the request body was not corrupted in transit. For more
* information, see <a href="http://www.ietf.org/rfc/rfc1864.txt">RFC 1864</a>.</p>
* <p>For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.</p>
* @public
*/
ContentMD5?: string | undefined;
/**
* <p>Indicates the algorithm used to create the checksum for the request 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 <code>x-amz-checksum</code> or
* <code>x-amz-trailer</code> header sent. Otherwise, Amazon S3 fails the request with the HTTP status code <code>400 Bad Request</code>. For more
* information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in
* the <i>Amazon S3 User Guide</i>.</p>
* <p>If you provide an individual checksum, Amazon S3 ignores any provided
* <code>ChecksumAlgorithm</code> parameter.</p>
* @public
*/
ChecksumAlgorithm?: ChecksumAlgorithm | undefined;
/**
* <p>Container for the request.</p>
* @public
*/
WebsiteConfiguration: WebsiteConfiguration | undefined;
/**
* <p>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 <code>403 Forbidden</code> (access denied).</p>
* @public
*/
ExpectedBucketOwner?: string | undefined;
}
/**
* <p>
* The existing object was created with a different encryption type.
* Subsequent write requests must include the appropriate encryption
* parameters in the request or while creating the session.
* </p>
* @public
*/
export declare class EncryptionTypeMismatch extends __BaseException {
readonly name: "EncryptionTypeMismatch";
readonly $fault: "client";
/**
* @internal
*/
constructor(opts: __ExceptionOptionType<EncryptionTypeMismatch, __BaseException>);
}
/**
* <p>You may receive this error in multiple cases. Depending on the reason for the error, you may receive one of the messages below:</p>
* <ul>
* <li>
* <p>Cannot specify both a write offset value and user-defined object metadata for existing objects.</p>
* </li>
* <li>
* <p>Checksum Type mismatch occurred, expected checksum Type: sha1, actual checksum Type: crc32c.</p>
* </li>
* <li>
* <p>Request body cannot be empty when 'write offset' is specified.</p>
* </li>
* </ul>
* @public
*/
export declare class InvalidRequest extends __BaseException {
readonly name: "InvalidRequest";
readonly $fault: "client";
/**
* @internal
*/
constructor(opts: __ExceptionOptionType<InvalidRequest, __BaseException>);
}
/**
* <p>
* The write offset value that you specified does not match the current object size.
* </p>
* @public
*/
export declare class InvalidWriteOffset extends __BaseException {
readonly name: "InvalidWriteOffset";
readonly $fault: "client";
/**
* @internal
*/
constructor(opts: __ExceptionOptionType<InvalidWriteOffset, __BaseException>);
}
/**
* @public
*/
export interface PutObjectOutput {
/**
* <p>If the expiration is configured for the object (see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html">PutBucketLifecycleConfiguration</a>) in the <i>Amazon S3 User Guide</i>,
* the response includes this header. It includes the <code>expiry-date</code> and
* <code>rule-id</code> key-value pairs that provide information about object expiration.
* The value of the <code>rule-id</code> is URL-encoded.</p>
* <note>
* <p>Object expiration information is not returned in directory buckets and this header returns the value "<code>NotImplemented</code>" in all responses for directory buckets.</p>
* </note>
* @public
*/
Expiration?: string | undefined;
/**
* <p>Entity tag for the uploaded object.</p>
* <p>
* <b>General purpose buckets </b> - To ensure that data is not
* corrupted traversing the network, for objects where the ETag is the MD5 digest of the
* object, you can calculate the MD5 while putting an object to Amazon S3 and compare the returned
* ETag to the calculated MD5 value.</p>
* <p>
* <b>Directory buckets </b> - The ETag for the object in
* a directory bucket isn't the MD5 digest of the object.</p>
* @public
*/
ETag?: string | undefined;
/**
* <p>The Base64 encoded, 32-bit <code>CRC32 checksum</code> of the object. This checksum is only be present if the checksum was uploaded
* with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated
* with multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums">
* Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
* @public
*/
ChecksumCRC32?: string | undefined;
/**
* <p>The Base64 encoded, 32-bit <code>CRC32C</code> checksum of the object. This checksum is only present if the checksum was uploaded
* with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated
* with multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums">
* Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
* @public
*/
ChecksumCRC32C?: string | undefined;
/**
* <p>The Base64 encoded, 64-bit <code>CRC64NVME</code> checksum of the object. This header
* is present if the object was uploaded with the <code>CRC64NVME</code> checksum algorithm, or if it
* was uploaded without a checksum (and Amazon S3 added the default checksum,
* <code>CRC64NVME</code>, to the uploaded object). For more information about how
* checksums are calculated with multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity
* in the Amazon S3 User Guide</a>.</p>
* @public
*/
ChecksumCRC64NVME?: string | undefined;
/**
* <p>The Base64 encoded, 160-bit <code>SHA1</code> digest of the object. This will only be present if the object was uploaded
* with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated
* with multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums">
* Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
* @public
*/
ChecksumSHA1?: string | undefined;
/**
* <p>The Base64 encoded, 256-bit <code>SHA256</code> digest of the object. This will only be present if the object was uploaded
* with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated
* with multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums">
* Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
* @public
*/
ChecksumSHA256?: string | undefined;
/**
* <p>This header specifies the checksum type of the object, which determines how part-level
* checksums are combined to create an object-level checksum for multipart objects. For
* <code>PutObject</code> uploads, the checksum type is always <code>FULL_OBJECT</code>. You can use this header as a
* data integrity check to verify that the checksum type that is receive