UNPKG

@aws-sdk/client-s3

Version:

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

970 lines 479 kB
/// <reference types="node" /> import { ExceptionOptionType as __ExceptionOptionType } from "@aws-sdk/smithy-client"; import { Readable } from "stream"; import { S3ServiceException as __BaseException } from "./S3ServiceException"; /** * <p>Specifies the days since the initiation of an incomplete multipart upload that Amazon S3 will * wait before permanently removing all parts of the upload. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html#mpu-abort-incomplete-mpu-lifecycle-config"> * Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle Policy</a> in the * <i>Amazon S3 User Guide</i>.</p> */ export interface AbortIncompleteMultipartUpload { /** * <p>Specifies the number of days after which Amazon S3 aborts an incomplete multipart * upload.</p> */ DaysAfterInitiation?: number; } export declare enum RequestCharged { requester = "requester" } export interface AbortMultipartUploadOutput { /** * <p>If present, indicates that the requester was successfully charged for the * request.</p> */ RequestCharged?: RequestCharged | string; } export declare enum RequestPayer { requester = "requester" } export interface AbortMultipartUploadRequest { /** * <p>The bucket name to which the upload was taking place. </p> * <p>When using this action with an access point, 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> * <p>When using 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 using this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket 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">Using Amazon 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> */ Bucket: string | undefined; /** * <p>Key of the object for which the multipart upload was initiated.</p> */ Key: string | undefined; /** * <p>Upload ID that identifies the multipart upload.</p> */ UploadId: string | undefined; /** * <p>Confirms that the requester knows that they will be charged for the request. Bucket * owners need not specify this parameter in their requests. For information about downloading * objects from Requester Pays buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html">Downloading Objects in * Requester Pays Buckets</a> in the <i>Amazon S3 User Guide</i>.</p> */ RequestPayer?: RequestPayer | string; /** * <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p> */ ExpectedBucketOwner?: string; } /** * <p>The specified multipart upload does not exist.</p> */ export declare class NoSuchUpload extends __BaseException { readonly name: "NoSuchUpload"; readonly $fault: "client"; /** * @internal */ constructor(opts: __ExceptionOptionType<NoSuchUpload, __BaseException>); } export declare enum BucketAccelerateStatus { Enabled = "Enabled", Suspended = "Suspended" } /** * <p>Configures the transfer acceleration state for an Amazon S3 bucket. For more information, see * <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html">Amazon S3 * Transfer Acceleration</a> in the <i>Amazon S3 User Guide</i>.</p> */ export interface AccelerateConfiguration { /** * <p>Specifies the transfer acceleration status of the bucket.</p> */ Status?: BucketAccelerateStatus | string; } export declare enum Type { AmazonCustomerByEmail = "AmazonCustomerByEmail", CanonicalUser = "CanonicalUser", Group = "Group" } /** * <p>Container for the person being granted permissions.</p> */ export interface Grantee { /** * <p>Screen name of the grantee.</p> */ DisplayName?: string; /** * <p>Email address of the grantee.</p> * <note> * <p>Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions: </p> * <ul> * <li> * <p>US East (N. Virginia)</p> * </li> * <li> * <p>US West (N. California)</p> * </li> * <li> * <p> US West (Oregon)</p> * </li> * <li> * <p> Asia Pacific (Singapore)</p> * </li> * <li> * <p>Asia Pacific (Sydney)</p> * </li> * <li> * <p>Asia Pacific (Tokyo)</p> * </li> * <li> * <p>Europe (Ireland)</p> * </li> * <li> * <p>South America (São Paulo)</p> * </li> * </ul> * <p>For a list of all the Amazon S3 supported Regions and endpoints, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region">Regions and Endpoints</a> in the Amazon Web Services General Reference.</p> * </note> */ EmailAddress?: string; /** * <p>The canonical user ID of the grantee.</p> */ ID?: string; /** * <p>URI of the grantee group.</p> */ URI?: string; /** * <p>Type of grantee</p> */ Type: Type | string | undefined; } export declare enum Permission { FULL_CONTROL = "FULL_CONTROL", READ = "READ", READ_ACP = "READ_ACP", WRITE = "WRITE", WRITE_ACP = "WRITE_ACP" } /** * <p>Container for grant information.</p> */ export interface Grant { /** * <p>The person being granted permissions.</p> */ Grantee?: Grantee; /** * <p>Specifies the permission given to the grantee.</p> */ Permission?: Permission | string; } /** * <p>Container for the owner's display name and ID.</p> */ export interface Owner { /** * <p>Container for the display name of the owner.</p> */ DisplayName?: string; /** * <p>Container for the ID of the owner.</p> */ ID?: string; } /** * <p>Contains the elements that set the ACL permissions for an object per grantee.</p> */ export interface AccessControlPolicy { /** * <p>A list of grants.</p> */ Grants?: Grant[]; /** * <p>Container for the bucket owner's display name and ID.</p> */ Owner?: Owner; } export declare enum OwnerOverride { Destination = "Destination" } /** * <p>A container for information about access control for replicas.</p> */ export interface AccessControlTranslation { /** * <p>Specifies the replica ownership. For default and valid values, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTreplication.html">PUT bucket * replication</a> in the <i>Amazon S3 API Reference</i>.</p> */ Owner: OwnerOverride | string | undefined; } export declare enum ServerSideEncryption { AES256 = "AES256", aws_kms = "aws:kms" } export interface CompleteMultipartUploadOutput { /** * <p>The URI that identifies the newly created object.</p> */ Location?: string; /** * <p>The name of the bucket that contains the newly created object. Does not return the access point ARN or access point alias if used.</p> * <p>When using this action with an access point, 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> * <p>When using 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 using this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket 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">Using Amazon S3 on Outposts</a> in the <i>Amazon S3 User Guide</i>.</p> */ Bucket?: string; /** * <p>The object key of the newly created object.</p> */ Key?: string; /** * <p>If the object expiration is configured, this will contain the expiration date * (<code>expiry-date</code>) and rule ID (<code>rule-id</code>). The value of * <code>rule-id</code> is URL-encoded.</p> */ Expiration?: string; /** * <p>Entity tag that identifies the newly created object's data. Objects with different * object data will have different entity tags. The entity tag is an opaque string. The entity * tag may or may not be an MD5 digest of the object data. If the entity tag is not an MD5 * digest of the object data, it will contain one or more nonhexadecimal characters and/or * will consist of less than 32 or more than 32 hexadecimal digits. For more information about * how the entity tag is calculated, 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> */ ETag?: string; /** * <p>The base64-encoded, 32-bit CRC32 checksum of the object. This will only be present if it was uploaded * with the object. With multipart uploads, this may not be a checksum value of the 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#large-object-checksums"> * Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p> */ ChecksumCRC32?: string; /** * <p>The base64-encoded, 32-bit CRC32C checksum of the object. This will only be present if it was uploaded * with the object. With multipart uploads, this may not be a checksum value of the 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#large-object-checksums"> * Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p> */ 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. With multipart uploads, this may not be a checksum value of the 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#large-object-checksums"> * Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p> */ 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. With multipart uploads, this may not be a checksum value of the 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#large-object-checksums"> * Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p> */ ChecksumSHA256?: string; /** * <p>If you specified server-side encryption either with an Amazon S3-managed encryption key or an * Amazon Web Services KMS key in your initiate multipart upload request, the response * includes this header. It confirms the encryption algorithm that Amazon S3 used to encrypt the * object.</p> */ ServerSideEncryption?: ServerSideEncryption | string; /** * <p>Version ID of the newly created object, in case the bucket has versioning turned * on.</p> */ VersionId?: string; /** * <p>If present, specifies the ID of the Amazon Web Services Key Management Service (Amazon Web Services KMS) symmetric * customer managed key that was used for the object.</p> */ SSEKMSKeyId?: string; /** * <p>Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption with Amazon Web Services KMS (SSE-KMS).</p> */ BucketKeyEnabled?: boolean; /** * <p>If present, indicates that the requester was successfully charged for the * request.</p> */ RequestCharged?: RequestCharged | string; } /** * <p>Details of the parts that were uploaded.</p> */ export interface CompletedPart { /** * <p>Entity tag returned when the part was uploaded.</p> */ ETag?: string; /** * <p>The base64-encoded, 32-bit CRC32 checksum of the object. This will only be present if it was uploaded * with the object. With multipart uploads, this may not be a checksum value of the 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#large-object-checksums"> * Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p> */ ChecksumCRC32?: string; /** * <p>The base64-encoded, 32-bit CRC32C checksum of the object. This will only be present if it was uploaded * with the object. With multipart uploads, this may not be a checksum value of the 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#large-object-checksums"> * Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p> */ 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. With multipart uploads, this may not be a checksum value of the 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#large-object-checksums"> * Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p> */ 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. With multipart uploads, this may not be a checksum value of the 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#large-object-checksums"> * Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p> */ ChecksumSHA256?: string; /** * <p>Part number that identifies the part. This is a positive integer between 1 and * 10,000.</p> */ PartNumber?: number; } /** * <p>The container for the completed multipart upload details.</p> */ export interface CompletedMultipartUpload { /** * <p>Array of CompletedPart data types.</p> * <p>If you do not supply a valid <code>Part</code> with your request, the service sends back an HTTP * 400 response.</p> */ Parts?: CompletedPart[]; } export interface CompleteMultipartUploadRequest { /** * <p>Name of the bucket to which the multipart upload was initiated.</p> * <p>When using this action with an access point, 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> * <p>When using 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 using this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket 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">Using Amazon 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> */ Bucket: string | undefined; /** * <p>Object key for which the multipart upload was initiated.</p> */ Key: string | undefined; /** * <p>The container for the multipart upload request information.</p> */ MultipartUpload?: CompletedMultipartUpload; /** * <p>ID for the initiated multipart upload.</p> */ UploadId: string | undefined; /** * <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 CRC32 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> */ 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 CRC32C 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> */ 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> */ 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> */ ChecksumSHA256?: string; /** * <p>Confirms that the requester knows that they will be charged for the request. Bucket * owners need not specify this parameter in their requests. For information about downloading * objects from Requester Pays buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html">Downloading Objects in * Requester Pays Buckets</a> in the <i>Amazon S3 User Guide</i>.</p> */ RequestPayer?: RequestPayer | string; /** * <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p> */ ExpectedBucketOwner?: string; /** * <p>The server-side encryption (SSE) algorithm used to encrypt the object. This parameter is needed only when the object was created * using a checksum algorithm. For more information, * see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Protecting data using SSE-C keys</a> in the * <i>Amazon S3 User Guide</i>.</p> */ SSECustomerAlgorithm?: string; /** * <p>The server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. * For more information, see * <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Protecting data using SSE-C keys</a> in the * <i>Amazon S3 User Guide</i>.</p> */ SSECustomerKey?: string; /** * <p>The MD5 server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum * algorithm. For more information, * see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Protecting data using SSE-C keys</a> in the * <i>Amazon S3 User Guide</i>.</p> */ SSECustomerKeyMD5?: string; } /** * <p>Container for all response elements.</p> */ export interface CopyObjectResult { /** * <p>Returns the ETag of the new object. The ETag reflects only changes to the contents of an object, not its metadata.</p> */ ETag?: string; /** * <p>Creation date of the object.</p> */ LastModified?: Date; /** * <p>The base64-encoded, 32-bit CRC32 checksum of the object. This will only be present if it was uploaded * with the object. With multipart uploads, this may not be a checksum value of the 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#large-object-checksums"> * Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p> */ ChecksumCRC32?: string; /** * <p>The base64-encoded, 32-bit CRC32C checksum of the object. This will only be present if it was uploaded * with the object. With multipart uploads, this may not be a checksum value of the 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#large-object-checksums"> * Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p> */ 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. With multipart uploads, this may not be a checksum value of the 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#large-object-checksums"> * Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p> */ 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. With multipart uploads, this may not be a checksum value of the 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#large-object-checksums"> * Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p> */ ChecksumSHA256?: string; } export interface CopyObjectOutput { /** * <p>Container for all response elements.</p> */ CopyObjectResult?: CopyObjectResult; /** * <p>If the object expiration is configured, the response includes this header.</p> */ Expiration?: string; /** * <p>Version of the copied object in the destination bucket.</p> */ CopySourceVersionId?: string; /** * <p>Version ID of the newly created copy.</p> */ VersionId?: string; /** * <p>The server-side encryption algorithm used when storing this object in Amazon S3 (for example, * AES256, aws:kms).</p> */ ServerSideEncryption?: ServerSideEncryption | string; /** * <p>If server-side encryption with a customer-provided encryption key was requested, the * response will include this header confirming the encryption algorithm used.</p> */ SSECustomerAlgorithm?: string; /** * <p>If server-side encryption with a customer-provided encryption key was requested, the * response will include this header to provide round-trip message integrity verification of * the customer-provided encryption key.</p> */ SSECustomerKeyMD5?: string; /** * <p>If present, specifies the ID of the Amazon Web Services Key Management Service (Amazon Web Services KMS) symmetric * customer managed key that was used for the object.</p> */ SSEKMSKeyId?: string; /** * <p>If present, specifies the Amazon Web Services KMS Encryption Context to use for object encryption. The * value of this header is a base64-encoded UTF-8 string holding JSON with the encryption * context key-value pairs.</p> */ SSEKMSEncryptionContext?: string; /** * <p>Indicates whether the copied object uses an S3 Bucket Key for server-side encryption with Amazon Web Services KMS (SSE-KMS).</p> */ BucketKeyEnabled?: boolean; /** * <p>If present, indicates that the requester was successfully charged for the * request.</p> */ RequestCharged?: RequestCharged | string; } export declare enum ObjectCannedACL { authenticated_read = "authenticated-read", aws_exec_read = "aws-exec-read", bucket_owner_full_control = "bucket-owner-full-control", bucket_owner_read = "bucket-owner-read", private = "private", public_read = "public-read", public_read_write = "public-read-write" } export declare enum ChecksumAlgorithm { CRC32 = "CRC32", CRC32C = "CRC32C", SHA1 = "SHA1", SHA256 = "SHA256" } export declare enum MetadataDirective { COPY = "COPY", REPLACE = "REPLACE" } export declare enum ObjectLockLegalHoldStatus { OFF = "OFF", ON = "ON" } export declare enum ObjectLockMode { COMPLIANCE = "COMPLIANCE", GOVERNANCE = "GOVERNANCE" } export declare enum StorageClass { DEEP_ARCHIVE = "DEEP_ARCHIVE", GLACIER = "GLACIER", GLACIER_IR = "GLACIER_IR", INTELLIGENT_TIERING = "INTELLIGENT_TIERING", ONEZONE_IA = "ONEZONE_IA", OUTPOSTS = "OUTPOSTS", REDUCED_REDUNDANCY = "REDUCED_REDUNDANCY", STANDARD = "STANDARD", STANDARD_IA = "STANDARD_IA" } export declare enum TaggingDirective { COPY = "COPY", REPLACE = "REPLACE" } export interface CopyObjectRequest { /** * <p>The canned ACL to apply to the object.</p> * <p>This action is not supported by Amazon S3 on Outposts.</p> */ ACL?: ObjectCannedACL | string; /** * <p>The name of the destination bucket.</p> * <p>When using this action with an access point, 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> * <p>When using 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 using this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket 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">Using Amazon 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> */ Bucket: string | undefined; /** * <p>Specifies caching behavior along the request/reply chain.</p> */ CacheControl?: string; /** * <p>Indicates the algorithm you want Amazon S3 to use to create the checksum for 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> */ ChecksumAlgorithm?: ChecksumAlgorithm | string; /** * <p>Specifies presentational information for the object.</p> */ 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.</p> */ ContentEncoding?: string; /** * <p>The language the content is in.</p> */ ContentLanguage?: string; /** * <p>A standard MIME type describing the format of the object data.</p> */ ContentType?: string; /** * <p>Specifies the source object for the copy operation. You specify the value in one of two * formats, depending on whether you want to access the source object through an <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html">access point</a>:</p> * <ul> * <li> * <p>For objects not accessed through an access point, specify the name of the source bucket * and the key of the source object, separated by a slash (/). For example, to copy the * object <code>reports/january.pdf</code> from the bucket * <code>awsexamplebucket</code>, use <code>awsexamplebucket/reports/january.pdf</code>. * The value must be URL-encoded.</p> * </li> * <li> * <p>For objects accessed through access points, specify the Amazon Resource Name (ARN) of the object as accessed through the access point, in the format <code>arn:aws:s3:<Region>:<account-id>:accesspoint/<access-point-name>/object/<key></code>. For example, to copy the object <code>reports/january.pdf</code> through access point <code>my-access-point</code> owned by account <code>123456789012</code> in Region <code>us-west-2</code>, use the URL encoding of <code>arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf</code>. The value must be URL encoded.</p> * <note> * <p>Amazon S3 supports copy operations using access points only when the source and destination buckets are in the same Amazon Web Services Region.</p> * </note> * <p>Alternatively, for objects accessed through Amazon S3 on Outposts, specify the ARN of the object as accessed in the format <code>arn:aws:s3-outposts:<Region>:<account-id>:outpost/<outpost-id>/object/<key></code>. For example, to copy the object <code>reports/january.pdf</code> through outpost <code>my-outpost</code> owned by account <code>123456789012</code> in Region <code>us-west-2</code>, use the URL encoding of <code>arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf</code>. The value must be URL-encoded. </p> * </li> * </ul> * <p>To copy a specific version of an object, append <code>?versionId=<version-id></code> * to the value (for example, * <code>awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893</code>). * If you don't specify a version ID, Amazon S3 copies the latest version of the source * object.</p> */ CopySource: string | undefined; /** * <p>Copies the object if its entity tag (ETag) matches the specified tag.</p> */ CopySourceIfMatch?: string; /** * <p>Copies the object if it has been modified since the specified time.</p> */ CopySourceIfModifiedSince?: Date; /** * <p>Copies the object if its entity tag (ETag) is different than the specified ETag.</p> */ CopySourceIfNoneMatch?: string; /** * <p>Copies the object if it hasn't been modified since the specified time.</p> */ CopySourceIfUnmodifiedSince?: Date; /** * <p>The date and time at which the object is no longer cacheable.</p> */ Expires?: Date; /** * <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the * object.</p> * <p>This action is not supported by Amazon S3 on Outposts.</p> */ GrantFullControl?: string; /** * <p>Allows grantee to read the object data and its * metadata.</p> * <p>This action is not supported by Amazon S3 on Outposts.</p> */ GrantRead?: string; /** * <p>Allows grantee to read the object ACL.</p> * <p>This action is not supported by Amazon S3 on Outposts.</p> */ GrantReadACP?: string; /** * <p>Allows grantee to write the ACL for the applicable * object.</p> * <p>This action is not supported by Amazon S3 on Outposts.</p> */ GrantWriteACP?: string; /** * <p>The key of the destination object.</p> */ Key: string | undefined; /** * <p>A map of metadata to store with the object in S3.</p> */ Metadata?: Record<string, string>; /** * <p>Specifies whether the metadata is copied from the source object or replaced with * metadata provided in the request.</p> */ MetadataDirective?: MetadataDirective | string; /** * <p>Specifies whether the object tag-set are copied from the source object or replaced with * tag-set provided in the request.</p> */ TaggingDirective?: TaggingDirective | string; /** * <p>The server-side encryption algorithm used when storing this object in Amazon S3 (for example, * AES256, aws:kms).</p> */ ServerSideEncryption?: ServerSideEncryption | string; /** * <p>By default, Amazon S3 uses the STANDARD Storage Class to store newly created objects. The * STANDARD storage class provides high durability and high availability. Depending on * performance needs, you can specify a different Storage Class. Amazon S3 on Outposts only uses * the OUTPOSTS Storage Class. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html">Storage Classes</a> in the * <i>Amazon S3 User Guide</i>.</p> */ StorageClass?: StorageClass | string; /** * <p>If the bucket is configured as a website, redirects requests for this object to another * object in the same bucket or to an external URL. Amazon S3 stores the value of this header in * the object metadata.</p> */ WebsiteRedirectLocation?: string; /** * <p>Specifies the algorithm to use to when encrypting the object (for example, * AES256).</p> */ SSECustomerAlgorithm?: string; /** * <p>Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This * value is used to store the object and then it is discarded; Amazon S3 does not store the * encryption key. The key must be appropriate for use with the algorithm specified in the * <code>x-amz-server-side-encryption-customer-algorithm</code> header.</p> */ SSECustomerKey?: string; /** * <p>Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses * this header for a message integrity check to ensure that the encryption key was transmitted * without error.</p> */ SSECustomerKeyMD5?: string; /** * <p>Specifies the Amazon Web Services KMS key ID to use for object encryption. All GET and PUT requests for * an object protected by Amazon Web Services KMS will fail if not made via SSL or using SigV4. For * information about configuring using any of the officially supported Amazon Web Services SDKs and Amazon Web Services CLI, * see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version">Specifying the * Signature Version in Request Authentication</a> in the <i>Amazon S3 User Guide</i>.</p> */ SSEKMSKeyId?: string; /** * <p>Specifies the Amazon Web Services KMS Encryption Context to use for object encryption. The value of this * header is a base64-encoded UTF-8 string holding JSON with the encryption context key-value * pairs.</p> */ SSEKMSEncryptionContext?: string; /** * <p>Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with server-side encryption using AWS KMS (SSE-KMS). Setting this header to <code>true</code> causes Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS. </p> * <p>Specifying this header with a COPY action doesn’t affect bucket-level settings for S3 Bucket Key.</p> */ BucketKeyEnabled?: boolean; /** * <p>Specifies the algorithm to use when decrypting the source object (for example, * AES256).</p> */ CopySourceSSECustomerAlgorithm?: string; /** * <p>Specifies the customer-provided encryption key for Amazon S3 to use to decrypt the source * object. The encryption key provided in this header must be one that was used when the * source object was created.</p> */ CopySourceSSECustomerKey?: string; /** * <p>Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses * this header for a message integrity check to ensure that the encryption key was transmitted * without error.</p> */ CopySourceSSECustomerKeyMD5?: string; /** * <p>Confirms that the requester knows that they will be charged for the request. Bucket * owners need not specify this parameter in their requests. For information about downloading * objects from Requester Pays buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html">Downloading Objects in * Requester Pays Buckets</a> in the <i>Amazon S3 User Guide</i>.</p> */ RequestPayer?: RequestPayer | string; /** * <p>The tag-set for the object destination object this value must be used in conjunction * with the <code>TaggingDirective</code>. The tag-set must be encoded as URL Query * parameters.</p> */ Tagging?: string; /** * <p>The Object Lock mode that you want to apply to the copied object.</p> */ ObjectLockMode?: ObjectLockMode | string; /** * <p>The date and time when you want the copied object's Object Lock to expire.</p> */ ObjectLockRetainUntilDate?: Date; /** * <p>Specifies whether you want to apply a legal hold to the copied object.</p> */ ObjectLockLegalHoldStatus?: ObjectLockLegalHoldStatus | string; /** * <p>The account ID of the expected destination bucket owner. If the destination bucket is owned by a different account, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p> */ ExpectedBucketOwner?: string; /** * <p>The account ID of the expected source bucket owner. If the source bucket is owned by a different account, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p> */ ExpectedSourceBucketOwner?: string; } /** * <p>The source object of the COPY action is not in the active tier and is only stored in * Amazon S3 Glacier.</p> */ export declare class ObjectNotInActiveTierError extends __BaseException { readonly name: "ObjectNotInActiveTierError"; readonly $fault: "client"; /** * @internal */ constructor(opts: __ExceptionOptionType<ObjectNotInActiveTierError, __BaseException>); } /** * <p>The requested bucket name is not available. The bucket namespace is shared by all users * of the system. Select a different name and try again.</p> */ export declare class BucketAlreadyExists extends __BaseException { readonly name: "BucketAlreadyExists"; readonly $fault: "client"; /** * @internal */ constructor(opts: __ExceptionOptionType<BucketAlreadyExists, __BaseException>); } /** * <p>The bucket you tried to create already exists, and you own it. Amazon S3 returns this error * in all Amazon Web Services Regions except in the North Virginia Region. For legacy compatibility, if you * re-create an existing bucket that you already own in the North Virginia Region, Amazon S3 * returns 200 OK and resets the bucket access control lists (ACLs).</p> */ export declare class BucketAlreadyOwnedByYou extends __BaseException { readonly name: "BucketAlreadyOwnedByYou"; readonly $fault: "client"; /** * @internal */ constructor(opts: __ExceptionOptionType<BucketAlreadyOwnedByYou, __BaseException>); } export interface CreateBucketOutput { /** * <p>A forward slash followed by the name of the bucket.</p> */ Location?: string; } export declare enum BucketCannedACL { authenticated_read = "authenticated-read", private = "private", public_read = "public-read", public_read_write = "public-read-write" } export declare enum BucketLocationConstraint { EU = "EU", af_south_1 = "af-south-1", ap_east_1 = "ap-east-1", ap_northeast_1 = "ap-northeast-1", ap_northeast_2 = "ap-northeast-2", ap_northeast_3 = "ap-northeast-3", ap_south_1 = "ap-south-1", ap_southeast_1 = "ap-southeast-1", ap_southeast_2 = "ap-southeast-2", ap_southeast_3 = "ap-southeast-3", ca_central_1 = "ca-central-1", cn_north_1 = "cn-north-1", cn_northwest_1 = "cn-northwest-1", eu_central_1 = "eu-central-1", eu_north_1 = "eu-north-1", eu_south_1 = "eu-south-1", eu_west_1 = "eu-west-1", eu_west_2 = "eu-west-2", eu_west_3 = "eu-west-3", me_south_1 = "me-south-1", sa_east_1 = "sa-east-1", us_east_2 = "us-east-2", us_gov_east_1 = "us-gov-east-1", us_gov_west_1 = "us-gov-west-1", us_west_1 = "us-west-1", us_west_2 = "us-west-2" } /** * <p>The configuration information for the bucket.</p> */ export interface CreateBucketConfiguration { /** * <p>Specifies the Region where the bucket will be created. If you don't specify a Region, * the bucket is created in the US East (N. Virginia) Region (us-east-1).</p> */ LocationConstraint?: BucketLocationConstraint | string; } export declare enum ObjectOwnership { BucketOwnerEnforced = "BucketOwnerEnforced", BucketOwnerPreferred = "BucketOwnerPreferred", ObjectWriter = "ObjectWriter" } export interface CreateBucketRequest { /** * <p>The canned ACL to apply to the bucket.</p> */ ACL?: BucketCannedACL | string; /** * <p>The name of the bucket to create.</p> */ Bucket: string | undefined; /** * <p>The configuration information for the bucket.</p> */ CreateBucketConfiguration?: CreateBucketConfiguration; /** * <p>Allows grantee the read, write, read ACP, and write ACP permissions on the * bucket.</p> */ GrantFullControl?: string; /** * <p>Allows grantee to list the objects in the bucket.</p> */ GrantRead?: string; /** * <p>Allows grantee to read the bucket ACL.</p> */ GrantReadACP?: string; /** * <p>Allows grantee to create new objects in the bucket.</p> * <p>For the bucket and object owners of existing objects, also allows deletions and overwrites of those objects.</p> */ GrantWrite?: string; /** * <p>Allows grantee to write the ACL for the applicable bucket.</p> */ GrantWriteACP?: string; /** * <p>Specifies whether you want S3 Object Lock to be enabled for the new bucket.</p> */ ObjectLockEnabledForBucket?: boolean; /** * <p>The container element for object ownership for a bucket's ownership controls.</p> * <p>BucketOwnerPreferred - Objects uploaded to the bucket change ownership to the bucket * owner if the objects are uploaded with the <code>bucket-owner-full-control</code> canned * ACL.</p> * <p>ObjectWriter - The uploading account will own the object if the object is uploaded with * the <code>bucket-owner-full-control</code> canned ACL.</p> * <p>BucketOwnerEnforced - Access control lists (ACLs) are disabled and no longer affect permissions. * The bucket owner automatically owns and has full control over every object in the bucket. The bucket only * accepts PUT requests that don't specify an ACL or 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.</p> */ ObjectOwnership?: ObjectOwnership | string; } export interface CreateMultipartUploadOutput { /** * <p>If the bucket has a lifecycle rule configured with an action to abort incomplete * multipart uploads and the prefix in the lifecycle rule matches the object name in the * request, the response includes this header. The header indicates when the initiated * multipart upload becomes eligible for an abort operation. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html#mpu-abort-incomplete-mpu-lifecycle-config"> * Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle Policy</a>.</p> * * <p>The response also includes the <code>x-amz-abort-rule-id</code> header that provides the * ID of the lifecycle configuration rule that defines this action.</p> */ AbortDate?: Date; /** * <p>This header is returned along with the <code>x-amz-abort-date</code> header. It * identifies the applicable lifecycle configuration rule that defines the action to abort * incomplete multipart uploads.<