UNPKG

@aws-sdk/client-s3

Version:

AWS SDK for JavaScript S3 Client for Node.js, Browser and React Native

889 lines 172 kB
import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-client"; import { StreamingBlobTypes } from "@smithy/types"; import { AccessControlPolicy, BucketVersioningStatus, ChecksumAlgorithm, ErrorDocument, Grant, IndexDocument, NotificationConfiguration, ObjectCannedACL, ObjectLockConfiguration, ObjectLockLegalHold, ObjectLockLegalHoldStatus, ObjectLockMode, ObjectLockRetention, OwnershipControls, Payer, PublicAccessBlockConfiguration, RedirectAllRequestsTo, ReplicationConfiguration, ReplicationStatus, RequestCharged, RequestPayer, RoutingRule, ServerSideEncryption, StorageClass, Tag } from "./models_0"; import { S3ServiceException as __BaseException } from "./S3ServiceException"; /** * @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; /** * <p>Skips validation of Amazon SQS, Amazon SNS, and Lambda * destinations. True or false value.</p> * @public */ SkipDestinationValidation?: boolean; } /** * @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; /** * <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; /** * <p>The <code>OwnershipControls</code> (BucketOwnerEnforced, BucketOwnerPreferred, or * ObjectWriter) that you want to apply to this Amazon S3 bucket.</p> * @public */ OwnershipControls: OwnershipControls | 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 Availability Zone. Bucket names must also follow the format <code> * <i>bucket_base_name</i>--<i>az_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; /** * <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> 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>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 ignores any provided * <code>ChecksumAlgorithm</code> parameter and uses the checksum algorithm that matches the provided value in <code>x-amz-checksum-<i>algorithm</i> * </code>.</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; /** * <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; /** * <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; } /** * @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 MD5 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; /** * <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</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; /** * <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; /** * <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; } /** * <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 MD5 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; /** * <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</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; /** * <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; } /** * <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 MD5 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; /** * <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</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; /** * <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; } /** * @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; /** * <p>The versioning state of the bucket.</p> * @public */ Status?: BucketVersioningStatus; } /** * @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 MD5 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; /** * <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</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; /** * <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; /** * <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; } /** * <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; /** * <p>The name of the index document for the website.</p> * @public */ IndexDocument?: IndexDocument; /** * <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; /** * <p>Rules that define when a redirect is applied and the redirect behavior.</p> * @public */ RoutingRules?: RoutingRule[]; } /** * @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 MD5 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; /** * <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</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; /** * <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; } /** * @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>This functionality is not supported for directory buckets.</p> * </note> * @public */ Expiration?: string; /** * <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; /** * <p>The base64-encoded, 32-bit CRC-32 checksum of the object. This will only be present if it 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; /** * <p>The base64-encoded, 32-bit CRC-32C checksum of the object. This will only be present if it 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; /** * <p>The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it 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; /** * <p>The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it 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; /** * <p>The server-side encryption algorithm used when you store this object in Amazon S3.</p> * @public */ ServerSideEncryption?: ServerSideEncryption; /** * <p>Version ID of the object.</p> * <p>If you enable versioning for a bucket, Amazon S3 automatically generates a unique version ID * for the object being stored. Amazon S3 returns this ID in the response. When you enable * versioning for a bucket, if Amazon S3 receives multiple write requests for the same object * simultaneously, it stores all of the objects. For more information about versioning, see * <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/AddingObjectstoVersioningEnabledBuckets.html">Adding Objects to * Versioning-Enabled Buckets</a> in the <i>Amazon S3 * User Guide</i>. For information about returning the versioning state * of a bucket, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketVersioning.html">GetBucketVersioning</a>. </p> * <note> * <p>This functionality is not supported for directory buckets.</p> * </note> * @public */ VersionId?: string; /** * <p>If server-side encryption with a customer-provided encryption key was requested, the * response will include this header to confirm the encryption algorithm that's used.</p> * <note> * <p>This functionality is not supported for directory buckets.</p> * </note> * @public */ SSECustomerAlgorithm?: string; /** * <p>If server-side encryption with a customer-provided encryption key was requested, the * response will include this header to provide the round-trip message integrity verification of * the customer-provided encryption key.</p> * <note> * <p>This functionality is not supported for directory buckets.</p> * </note> * @public */ SSECustomerKeyMD5?: string; /** * <p>If present, indicates the ID of the KMS key that was used for object encryption.</p> * @public */ SSEKMSKeyId?: string; /** * <p>If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of * this header is a Base64-encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. * This value is stored as object metadata and automatically gets * passed on to Amazon Web Services KMS for future <code>GetObject</code> * operations on this object.</p> * @public */ SSEKMSEncryptionContext?: string; /** * <p>Indicates whether the uploaded object uses an S3 Bucket Key for server-side encryption * with Key Management Service (KMS) keys (SSE-KMS).</p> * @public */ BucketKeyEnabled?: boolean; /** * <p>If present, indicates that the requester was successfully charged for the * request.</p> * <note> * <p>This functionality is not supported for directory buckets.</p> * </note> * @public */ RequestCharged?: RequestCharged; } /** * @public */ export interface PutObjectRequest { /** * <p>The canned ACL to apply to the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL">Canned * ACL</a> in the <i>Amazon S3 User Guide</i>.</p> * <p>When adding a new object, you can use headers to grant ACL-based permissions to * individual Amazon Web Services accounts or to predefined groups defined by Amazon S3. These permissions are * then added to the ACL on the object. By default, all objects are private. Only the owner * has full access control. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a> * and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-using-rest-api.html">Managing * ACLs Using the REST API</a> in the <i>Amazon S3 User Guide</i>.</p> * <p>If the bucket that you're uploading objects to uses the bucket owner enforced setting * for S3 Object Ownership, ACLs are disabled and no longer affect permissions. Buckets that * use this setting only accept PUT requests that don't specify an ACL or PUT requests that * specify bucket owner full control ACLs, such as the <code>bucket-owner-full-control</code> * canned ACL or an equivalent form of this ACL expressed in the XML format. PUT requests that * contain other ACLs (for example, custom grants to certain Amazon Web Services accounts) fail and return a * <code>400</code> error with the error code <code>AccessControlListNotSupported</code>. * For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html"> Controlling ownership of * objects and disabling ACLs</a> in the <i>Amazon S3 User Guide</i>.</p> * <note> * <ul> * <li> * <p>This functionality is not supported for directory buckets.</p> * </li> * <li> * <p>This functionality is not supported for Amazon S3 on Outposts.</p> * </li> * </ul> * </note> * @public */ ACL?: ObjectCannedACL; /** * <p>Object data.</p> * @public */ Body?: StreamingBlobTypes; /** * <p>The bucket name to which the PUT action was initiated. </p> * <p> * <b>Directory buckets</b> - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format <code> * <i>Bucket_name</i>.s3express-<i>az_id</i>.<i>region</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must follow the format <code> * <i>bucket_base_name</i>--<i>az-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> * <b>Access points</b> - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p> * <note> * <p>Access points and Object Lambda access points are not supported by directory buckets.</p> * </note> * <p> * <b>S3 on Outposts</b> - When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <code> * <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com</code>. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">What is S3 on Outposts?</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>Can be used to specify caching behavior along the request/reply chain. For more * information, see <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9">http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9</a>.</p> * @public */ CacheControl?: string; /** * <p>Specifies presentational information for the object. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc6266#section-4">https://www.rfc-editor.org/rfc/rfc6266#section-4</a>.</p> * @public */ ContentDisposition?: string; /** * <p>Specifies what content encodings have been applied to the object and thus what decoding * mechanisms must be applied to obtain the media-type referenced by the Content-Type header * field. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding">https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding</a>.</p> * @public */ ContentEncoding?: string; /** * <p>The language the content is in.</p> * @public */ ContentLanguage?: string; /** * <p>Size of the body in bytes. This parameter is useful when the size of the body cannot be * determined automatically. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length">https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length</a>.</p> * @public */ ContentLength?: number; /** * <p>The base64-encoded 128-bit MD5 digest of the message (without the headers) according to * RFC 1864. This header can be used as a message integrity check to verify that the data is * the same data that was originally sent. Although it is optional, we recommend using the * Content-MD5 mechanism as an end-to-end integrity check. For more information about REST * request authentication, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html">REST Authentication</a>.</p> * <note> * <p>The <code>Content-MD5</code> or <code>x-amz-sdk-checksum-algorithm</code> header is required for any request to upload an * object with a retention period configured using Amazon S3 Object Lock. For more * information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object">Uploading objects to an Object Lock enabled bucket * </a> in the <i>Amazon S3 User Guide</i>.</p> * </note> * <note> * <p>This functionality is not supported for directory buckets.</p> * </note> * @public */ ContentMD5?: string; /** * <p>A standard MIME type describing the format of the contents. For more information, see * <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type">https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type</a>.</p> * @public */ ContentType?: string; /** * <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> 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>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 ignores any provided * <code>ChecksumAlgorithm</code> parameter and uses the checksum algorithm that matches the provided value in <code>x-amz-checksum-<i>algorithm</i> * </code>.</p> * <note> * <p>The <code>Content-MD5</code> or <code>x-amz-sdk-checksum-algorithm</code> header is required for any request to upload an * object with a retention period configured using Amazon S3 Object Lock. For more * information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object">Uploading objects to an Object Lock enabled bucket * </a> in the <i>Amazon S3 User Guide</i>.</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> * @public */ ChecksumAlgorithm?: ChecksumAlgorithm; /** * <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. * This header specifies the base64-encoded, 32-bit CRC-32 checksum of the object. 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> * @public */ ChecksumCRC32?: string; /** * <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. * This header specifies the base64-encoded, 32-bit CRC-32C checksum of the object. 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> * @public */ ChecksumCRC32C?: string; /** * <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. * This header specifies the base64-encoded, 160-bit SHA-1 digest of the object. 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> * @public */ ChecksumSHA1?: string; /** * <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. * This header specifies the base64-encoded, 256-bit SHA-256 digest of the object. 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> * @public */ ChecksumSHA256?: string; /** * <p>The date and time at which the object is no longer cacheable. For more information, see * <a href="https://www.rfc-editor.org/rfc/rfc7234#section-5.3">https://www.rfc-editor.org/rfc/rfc7234#section-5.3</a>.</p> * @public */ Expires?: Date; /** * <p>Uploads the object only if the object key name does not already exist in the bucket specified. Otherwise, Amazon S3 returns a <code>412 Precondition Failed</code> error.</p> * <p>If a conflicting operation occurs during the upload S3 returns a <code>409 ConditionalRequestConflict</code> response. On a 409 failure you should retry the upload.</p> * <p>Expects the '*' (asterisk) character.</p> * <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>, or <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html">Conditional requests</a> in the <i>Amazon S3 User Guide</i>.</p> * @public */ IfNoneMatch?: string; /** * <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p> * <note> * <ul> * <li> * <p>This functionality is not supported for directory buckets.</p> * </li> * <li> * <p>This functionality is not supported for Amazon S3 on Outposts.</p> * </li> * </ul> * </note> * @public */ GrantFullControl?: string; /** * <p>Allows grantee to read the object data and its metadata.</p> * <note> * <ul> * <li> * <p>This functionality is not supported for directory buckets.</p> * </li> * <li> * <p>This functionality is not supported for Amazon S3 on Outposts.</p> * </li> * </ul> * </note> * @public */ GrantRead?: string; /** * <p>Allows grantee to read the object ACL.</p> * <note> * <ul> * <li> * <p>This functionality is not supported for directory buckets.</p> * </li> * <li> * <p>This functionality is not supported for Amazon S3 on Outposts.</p> * </li> * </ul> * </note> * @public */ GrantReadACP?: string; /** * <p>Allows grantee to write the ACL for the applicable object.</p> * <note> * <ul> * <li> * <p>This functionality is not supported for directory buckets.</p> * </li> * <li> * <p>This functionality is not supported for Amazon S3 on Outposts.</p> * </li> * </ul> * </note> * @public */ GrantWriteACP?: string; /** * <p>Object key for which the PUT action was initiated.</p> * @public */ Key: string | undefined; /** * <p>A map of metadata to store with the object in S3.</p> * @public */ Metadata?: Record<string, string>; /** * <p>The server-side encryption algorithm that was used when you store this object in Amazon S3 (for example, * <code>AES256</code>, <code>aws:kms</code>, <code>aws:kms:dsse</code>).</p> * <ul> * <li> * <p> * <b>General purpose buckets </b> - You have four mutually exclusive options to protect data using server-side encryption in * Amazon S3, depending on how you choose to manage the encryption keys. Specifically, the * encryption key options are Amazon S3 managed keys (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or * DSSE-KMS), and customer-provided keys (SSE-C). Amazon S3 encrypts data with server-side * encryption by using Amazon S3 managed keys (SSE-S3) by default. You can optionally tell Amazon S3 to * encrypt data at rest by using server-side encryption with other key options. For more * information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html">Using Server-Side * Encryption</a> in the <i>Amazon S3 User Guide</i>.</p> * </li> * <li> * <p> * <b>Directory buckets </b> - For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (<code>AES256</code>) and server-side encryption with KMS keys (SSE-KMS) (<code>aws:kms</code>). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your * <code>CreateSession</code> requests or <code>PUT</code> object requests. Then, new objects * are automatically encrypted with the desired encryption settings. For more * information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html">Protecting data with server-side encryption</a> in the <i>Amazon S3 User Guide</i>. For more information about the encryption overriding behaviors in directory buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html">Specifying server-side encryption with KMS for new object uploads</a>. * </p> * <p>In the Zonal endpoint API calls (except <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html">CopyObject</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html">UploadPartCopy</a>) using the REST API, the encryption request headers must match the encryption settings that are specified in the <code>CreateSession</code> request. * You can't override the values of the encryption settings (<code>x-amz-server-side-encryption</code>, <code>x-amz-server-sid