class Aws::S3::Types::CopyObjectRequest


@see docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyObjectRequest AWS API Documentation
@return [String]
an HTTP ‘403 (Access Denied)` error.
bucket is owned by a different account, the request will fail with
The account ID of the expected source bucket owner. If the source
@!attribute [rw] expected_source_bucket_owner
@return [String]
fail with an HTTP `403 (Access Denied)` error.
destination bucket is owned by a different account, the request will
The account ID of the expected destination bucket owner. If the
@!attribute [rw] expected_bucket_owner
@return [String]
object.
Specifies whether you want to apply a Legal Hold to the copied
@!attribute [rw] object_lock_legal_hold_status
@return [Time]
expire.
The date and time when you want the copied object’s Object Lock to
@!attribute [rw] object_lock_retain_until_date
@return [String]
The Object Lock mode that you want to apply to the copied object.
@!attribute [rw] object_lock_mode
@return [String]
encoded as URL Query parameters.
used in conjunction with the ‘TaggingDirective`. The tag-set must be
The tag-set for the object destination object this value must be
@!attribute [rw] tagging
@return [String]<br>: docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html<br><br><br><br>in the *Amazon S3 User Guide*.
pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
requests. For information about downloading objects from requester
request. Bucket owners need not specify this parameter in their
Confirms that the requester knows that they will be charged for the
@!attribute [rw] request_payer
@return [String]
to ensure that the encryption key was transmitted without error.
RFC 1321. Amazon S3 uses this header for a message integrity check
Specifies the 128-bit MD5 digest of the encryption key according to
@!attribute [rw] copy_source_sse_customer_key_md5
@return [String]
header must be one that was used when the source object was created.
to decrypt the source object. The encryption key provided in this
Specifies the customer-provided encryption key for Amazon S3 to use
@!attribute [rw] copy_source_sse_customer_key
@return [String]
(for example, AES256).
Specifies the algorithm to use when decrypting the source object
@!attribute [rw] copy_source_sse_customer_algorithm
@return [Boolean]
bucket-level settings for S3 Bucket Key.
Specifying this header with a COPY action doesn’t affect
Key for object encryption with SSE-KMS.
Setting this header to `true` causes Amazon S3 to use an S3 Bucket
encryption with server-side encryption using AWS KMS (SSE-KMS).
Specifies whether Amazon S3 should use an S3 Bucket Key for object
@!attribute [rw] bucket_key_enabled
@return [String]
string holding JSON with the encryption context key-value pairs.
encryption. The value of this header is a base64-encoded UTF-8
Specifies the AWS KMS Encryption Context to use for object
@!attribute [rw] ssekms_encryption_context
@return [String]<br>: docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version<br><br><br><br>the *Amazon S3 User Guide*.
[Specifying the Signature Version in Request Authentication] in
any of the officially supported AWS SDKs and AWS CLI, see
made via SSL or using SigV4. For information about configuring using
and PUT requests for an object protected by AWS KMS will fail if not
Specifies the AWS KMS key ID to use for object encryption. All GET
@!attribute [rw] ssekms_key_id
@return [String]
to ensure that the encryption key was transmitted without error.
RFC 1321. Amazon S3 uses this header for a message integrity check
Specifies the 128-bit MD5 digest of the encryption key according to
@!attribute [rw] sse_customer_key_md5
@return [String]
`x-amz-server-side-encryption-customer-algorithm` header.
key must be appropriate for use with the algorithm specified in the
it is discarded; Amazon S3 does not store the encryption key. The
in encrypting data. This value is used to store the object and then
Specifies the customer-provided encryption key for Amazon S3 to use
@!attribute [rw] sse_customer_key
@return [String]
example, AES256).
Specifies the algorithm to use to when encrypting the object (for
@!attribute [rw] sse_customer_algorithm
@return [String]
metadata.
URL. Amazon S3 stores the value of this header in the object
this object to another object in the same bucket or to an external
If the bucket is configured as a website, redirects requests for
@!attribute [rw] website_redirect_location
@return [String]<br>: docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html<br><br><br><br>Classes][1] in the *Amazon S3 User Guide*.
the OUTPOSTS Storage Class. For more information, see [Storage
specify a different Storage Class. Amazon S3 on Outposts only uses
and high availability. Depending on performance needs, you can
created objects. The STANDARD storage class provides high durability
By default, Amazon S3 uses the STANDARD Storage Class to store newly
@!attribute [rw] storage_class
@return [String]
in Amazon S3 (for example, AES256, aws:kms).
The server-side encryption algorithm used when storing this object
@!attribute [rw] server_side_encryption
@return [String]
object or replaced with tag-set provided in the request.
Specifies whether the object tag-set are copied from the source
@!attribute [rw] tagging_directive
@return [String]
replaced with metadata provided in the request.
Specifies whether the metadata is copied from the source object or
@!attribute [rw] metadata_directive
@return [Hash<String,String>]
A map of metadata to store with the object in S3.
@!attribute [rw] metadata
@return [String]
The key of the destination object.
@!attribute [rw] key
@return [String]
This action is not supported by Amazon S3 on Outposts.
Allows grantee to write the ACL for the applicable object.
@!attribute [rw] grant_write_acp
@return [String]
This action is not supported by Amazon S3 on Outposts.
Allows grantee to read the object ACL.
@!attribute [rw] grant_read_acp
@return [String]
This action is not supported by Amazon S3 on Outposts.
Allows grantee to read the object data and its metadata.
@!attribute [rw] grant_read
@return [String]
This action is not supported by Amazon S3 on Outposts.
object.
Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the
@!attribute [rw] grant_full_control
@return [Time]
The date and time at which the object is no longer cacheable.
@!attribute [rw] expires
@return [Time]
time.
Copies the object if it hasn’t been modified since the specified
@!attribute [rw] copy_source_if_unmodified_since
@return [String]
specified ETag.
Copies the object if its entity tag (ETag) is different than the
@!attribute [rw] copy_source_if_none_match
@return [Time]
Copies the object if it has been modified since the specified time.
@!attribute [rw] copy_source_if_modified_since
@return [String]
tag.
Copies the object if its entity tag (ETag) matches the specified
@!attribute [rw] copy_source_if_match
@return [String]<br>: docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html<br><br><br><br>version of the source object.
If you don’t specify a version ID, Amazon S3 copies the latest
`awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893`).
‘?versionId=<version-id>` to the value (for example,
To copy a specific version of an object, append
The value must be URL encoded.
`arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf`.
`us-west-2`, use the URL encoding of
outpost `my-outpost` owned by account `123456789012` in Region
For example, to copy the object `reports/january.pdf` through
`arn:aws:s3-outposts:<Region>:<account-id>:outpost/<outpost-id>/object/<key>`.
specify the ARN of the object as accessed in the format
Alternatively, for objects accessed through Amazon S3 on Outposts,
</note>
the source and destination buckets are in the same AWS Region.
<note markdown=“1”> Amazon S3 supports copy operations using access points only when
The value must be URL encoded.
`arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf`.
Region `us-west-2`, use the URL encoding of
access point `my-access-point` owned by account `123456789012` in
For example, to copy the object `reports/january.pdf` through
`arn:aws:s3:<Region>:<account-id>:accesspoint/<access-point-name>/object/<key>`.
point, in the format
Resource Name (ARN) of the object as accessed through the access
* For objects accessed through access points, specify the Amazon
encoded.
`awsexamplebucket/reports/january.pdf`. The value must be URL
`reports/january.pdf` from the bucket `awsexamplebucket`, use
by a slash (/). For example, to copy the object
of the source bucket and the key of the source object, separated
* For objects not accessed through an access point, specify the name
the source object through an [access point]:
value in one of two formats, depending on whether you want to access
Specifies the source object for the copy operation. You specify the
@!attribute [rw] copy_source
@return [String]
A standard MIME type describing the format of the object data.
@!attribute [rw] content_type
@return [String]
The language the content is in.
@!attribute [rw] content_language
@return [String]
media-type referenced by the Content-Type header field.
thus what decoding mechanisms must be applied to obtain the
Specifies what content encodings have been applied to the object and
@!attribute [rw] content_encoding
@return [String]
Specifies presentational information for the object.
@!attribute [rw] content_disposition
@return [String]
Specifies caching behavior along the request/reply chain.
@!attribute [rw] cache_control
@return [String]<br>: docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html<br>[1]: docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html<br><br><br><br>Outposts][2] in the *Amazon S3 User Guide*.
more information about S3 on Outposts ARNs, see [Using S3 on
you provide the Outposts bucket ARN in place of the bucket name. For
When using this action using S3 on Outposts through the AWS SDKs,
AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com.
takes the form
requests to the S3 on Outposts hostname. The S3 on Outposts hostname
When using this action with Amazon S3 on Outposts, you must direct<br><br>points] in the *Amazon S3 User Guide*.
more information about access point ARNs, see [Using access
you provide the access point ARN in place of the bucket name. For
When using this action with an access point through the AWS SDKs,
AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
takes the form
requests to the access point hostname. The access point hostname
When using this action with an access point, you must direct
The name of the destination bucket.
@!attribute [rw] bucket
@return [String]
This action is not supported by Amazon S3 on Outposts.
The canned ACL to apply to the object.
@!attribute [rw] acl
}
expected_source_bucket_owner: “AccountId”,
expected_bucket_owner: “AccountId”,
object_lock_legal_hold_status: “ON”, # accepts ON, OFF
object_lock_retain_until_date: Time.now,
object_lock_mode: “GOVERNANCE”, # accepts GOVERNANCE, COMPLIANCE
tagging: “TaggingHeader”,
request_payer: “requester”, # accepts requester
copy_source_sse_customer_key_md5: “CopySourceSSECustomerKeyMD5”,
copy_source_sse_customer_key: “CopySourceSSECustomerKey”,
copy_source_sse_customer_algorithm: “CopySourceSSECustomerAlgorithm”,
bucket_key_enabled: false,
ssekms_encryption_context: “SSEKMSEncryptionContext”,
ssekms_key_id: “SSEKMSKeyId”,
sse_customer_key_md5: “SSECustomerKeyMD5”,
sse_customer_key: “SSECustomerKey”,
sse_customer_algorithm: “SSECustomerAlgorithm”,
website_redirect_location: “WebsiteRedirectLocation”,
storage_class: “STANDARD”, # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS
server_side_encryption: “AES256”, # accepts AES256, aws:kms
tagging_directive: “COPY”, # accepts COPY, REPLACE
metadata_directive: “COPY”, # accepts COPY, REPLACE
},
“MetadataKey” => “MetadataValue”,
metadata: {
key: “ObjectKey”, # required
grant_write_acp: “GrantWriteACP”,
grant_read_acp: “GrantReadACP”,
grant_read: “GrantRead”,
grant_full_control: “GrantFullControl”,
expires: Time.now,
copy_source_if_unmodified_since: Time.now,
copy_source_if_none_match: “CopySourceIfNoneMatch”,
copy_source_if_modified_since: Time.now,
copy_source_if_match: “CopySourceIfMatch”,
copy_source: “CopySource”, # required
content_type: “ContentType”,
content_language: “ContentLanguage”,
content_encoding: “ContentEncoding”,
content_disposition: “ContentDisposition”,
cache_control: “CacheControl”,
bucket: “BucketName”, # required
acl: “private”, # accepts private, public-read, public-read-write, authenticated-read, aws-exec-read, bucket-owner-read, bucket-owner-full-control
{
data as a hash:
@note When making an API call, you may pass CopyObjectRequest