Skip to content

S3CopyObjectOperation

Source code in docs_src/capo_s3_control/types/s3_copy_object_operation.py
class S3CopyObjectOperation(TypedDict, closed=True):
    target_resource: NotRequired[
        "capo_s3_control.types.s3_regional_or_s3_express_bucket_arn_string.S3RegionalOrS3ExpressBucketArnString"
    ]
    """<p>Specifies the destination bucket Amazon Resource Name (ARN) for the batch copy operation.</p> <ul> <li> <p> <b>General purpose buckets</b> - For example, to copy objects to a general purpose bucket named <code>destinationBucket</code>, set the <code>TargetResource</code> property to <code>arn:aws:s3:::destinationBucket</code>.</p> </li> <li> <p> <b>Directory buckets</b> - For example, to copy objects to a directory bucket named <code>destinationBucket</code> in the Availability Zone identified by the AZ ID <code>usw2-az1</code>, set the <code>TargetResource</code> property to <code>arn:aws:s3express:<i>region</i>:<i>account_id</i>:/bucket/<i>destination_bucket_base_name</i>--<i>usw2-az1</i>--x-s3</code>. A directory bucket as a destination bucket can be in Availability Zone or Local Zone. </p> <note> <p>Copying objects across different Amazon Web Services Regions isn't supported when the source or destination bucket is in Amazon Web Services Local Zones. The source and destination buckets must have the same parent Amazon Web Services Region. Otherwise, you get an HTTP <code>400 Bad Request</code> error with the error code <code>InvalidRequest</code>.</p> </note> </li> </ul>"""
    canned_access_control_list: NotRequired[
        "capo_s3_control.types.s3_canned_access_control_list.S3CannedAccessControlList"
    ]
    """<p></p> <note> <p>This functionality is not supported by directory buckets.</p> </note>"""
    access_control_grants: NotRequired[
        "capo_s3_control.types.s3_grant_list.S3GrantList"
    ]
    """<p></p> <note> <p>This functionality is not supported by directory buckets.</p> </note>"""
    metadata_directive: NotRequired[
        "capo_s3_control.types.s3_metadata_directive.S3MetadataDirective"
    ]
    """<p></p>"""
    annotation_directive: NotRequired[
        "capo_s3_control.types.s3_annotation_directive.S3AnnotationDirective"
    ]
    """<p>Specifies whether the Batch Operations copy job copies object annotations from the source object or skips them. If this property isn't specified, <code>COPY</code> is the default behavior.</p> <p>Valid Values: <code>COPY | EXCLUDE</code> </p> <note> <p>This functionality is not supported by directory buckets.</p> </note>"""
    modified_since_constraint: NotRequired["capo_s3_control.types.time_stamp.TimeStamp"]
    """<p></p>"""
    new_object_metadata: NotRequired[
        "capo_s3_control.types.s3_object_metadata.S3ObjectMetadata"
    ]
    """<p>If you don't provide this parameter, Amazon S3 copies all the metadata from the original objects. If you specify an empty set, the new objects will have no tags. Otherwise, Amazon S3 assigns the supplied tags to the new objects.</p>"""
    new_object_tagging: NotRequired["capo_s3_control.types.s3_tag_set.S3TagSet"]
    """<p>Specifies a list of tags to add to the destination objects after they are copied. If <code>NewObjectTagging</code> is not specified, the tags of the source objects are copied to destination objects by default.</p> <note> <p> <b>Directory buckets</b> - Tags aren't supported by directory buckets. If your source objects have tags and your destination bucket is a directory bucket, specify an empty tag set in the <code>NewObjectTagging</code> field to prevent copying the source object tags to the directory bucket.</p> </note>"""
    redirect_location: NotRequired[
        "capo_s3_control.types.non_empty_max_length2048_string.NonEmptyMaxLength2048String"
    ]
    """<p>If the destination bucket is configured as a website, specifies an optional metadata property for website redirects, <code>x-amz-website-redirect-location</code>. Allows webpage redirects if the object copy is accessed through a website endpoint.</p> <note> <p>This functionality is not supported by directory buckets.</p> </note>"""
    requester_pays: "capo_s3_control.types.boolean.Boolean"
    """<p></p> <note> <p>This functionality is not supported by directory buckets.</p> </note>"""
    storage_class: NotRequired["capo_s3_control.types.s3_storage_class.S3StorageClass"]
    """<p>Specify the storage class for the destination objects in a <code>Copy</code> operation.</p> <note> <p> <b>Directory buckets </b> - This functionality is not supported by directory buckets. </p> </note>"""
    un_modified_since_constraint: NotRequired[
        "capo_s3_control.types.time_stamp.TimeStamp"
    ]
    """<p></p>"""
    sse_aws_kms_key_id: NotRequired[
        "capo_s3_control.types.kms_key_arn_string.KmsKeyArnString"
    ]
    """<p>Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. If the KMS key doesn't exist in the same account that's issuing the command, you must use the full Key ARN not the Key ID.</p> <note> <p> <b>Directory buckets</b> - If you specify <code>SSEAlgorithm</code> with <code>KMS</code>, you must specify the <code> SSEAwsKmsKeyId</code> parameter with the ID (Key ID or Key ARN) of the KMS symmetric encryption customer managed key to use. Otherwise, you get an HTTP <code>400 Bad Request</code> error. The key alias format of the KMS key isn't supported. To encrypt new object copies in a directory bucket with SSE-KMS, you must specify SSE-KMS as the directory bucket's default encryption configuration with a KMS key (specifically, a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk">customer managed key</a>). The <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk">Amazon Web Services managed key</a> (<code>aws/s3</code>) isn't supported. Your SSE-KMS configuration can only support 1 <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk">customer managed key</a> per directory bucket for the lifetime of the bucket. After you specify a customer managed key for SSE-KMS as the bucket default encryption, you can't override the customer managed key for the bucket's SSE-KMS configuration. Then, when you specify server-side encryption settings for new object copies with SSE-KMS, you must make sure the encryption key is the same customer managed key that you specified for the directory bucket's default encryption configuration. </p> </note>"""
    target_key_prefix: NotRequired[
        "capo_s3_control.types.non_empty_max_length1024_string.NonEmptyMaxLength1024String"
    ]
    """<p>Specifies the folder prefix that you want the objects to be copied into. For example, to copy objects into a folder named <code>Folder1</code> in the destination bucket, set the <code>TargetKeyPrefix</code> property to <code>Folder1</code>.</p>"""
    object_lock_legal_hold_status: NotRequired[
        "capo_s3_control.types.s3_object_lock_legal_hold_status.S3ObjectLockLegalHoldStatus"
    ]
    """<p>The legal hold status to be applied to all objects in the Batch Operations job.</p> <note> <p>This functionality is not supported by directory buckets.</p> </note>"""
    object_lock_mode: NotRequired[
        "capo_s3_control.types.s3_object_lock_mode.S3ObjectLockMode"
    ]
    """<p>The retention mode to be applied to all objects in the Batch Operations job.</p> <note> <p>This functionality is not supported by directory buckets.</p> </note>"""
    object_lock_retain_until_date: NotRequired[
        "capo_s3_control.types.time_stamp.TimeStamp"
    ]
    """<p>The date when the applied object retention configuration expires on all objects in the Batch Operations job.</p> <note> <p>This functionality is not supported by directory buckets.</p> </note>"""
    bucket_key_enabled: "capo_s3_control.types.boolean.Boolean"
    """<p>Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with server-side encryption using Amazon Web Services 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 an <i>Copy</i> action doesn’t affect <i>bucket-level</i> settings for S3 Bucket Key.</p> <note> <p> <b>Directory buckets</b> - S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-objects-Batch-Ops">the Copy operation in Batch Operations</a>. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.</p> </note>"""
    checksum_algorithm: NotRequired[
        "capo_s3_control.types.s3_checksum_algorithm.S3ChecksumAlgorithm"
    ]
    """<p>Indicates the algorithm that you want Amazon S3 to use to create the checksum. 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>"""
    object_lock_event_hold: NotRequired[
        "capo_s3_control.types.s3_object_lock_event_hold.S3ObjectLockEventHold"
    ]
    """<p>The event hold status to be applied to all objects in the Batch Operations copy job. Set to <code>ON</code> to enable an event hold or <code>OFF</code> to disable it.</p> <note> <p>This functionality is not supported by directory buckets.</p> </note>"""
    object_lock_event_hold_duration: NotRequired[
        "capo_s3_control.types.s3_object_lock_event_hold_duration.S3ObjectLockEventHoldDuration"
    ]
    """<p>The event hold duration to be applied to all objects in the Batch Operations copy job. The duration specifies how long the object remains protected after the event hold is released.</p> <note> <p>This functionality is not supported by directory buckets.</p> </note>"""

access_control_grants instance-attribute

access_control_grants: NotRequired[S3GrantList]

This functionality is not supported by directory buckets.

annotation_directive instance-attribute

annotation_directive: NotRequired[S3AnnotationDirective]

Specifies whether the Batch Operations copy job copies object annotations from the source object or skips them. If this property isn't specified, COPY is the default behavior.

Valid Values: COPY | EXCLUDE

This functionality is not supported by directory buckets.

bucket_key_enabled instance-attribute

bucket_key_enabled: Boolean

Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with server-side encryption using Amazon Web Services KMS (SSE-KMS). Setting this header to true causes Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS.

Specifying this header with an Copy action doesn’t affect bucket-level settings for S3 Bucket Key.

Directory buckets - S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through the Copy operation in Batch Operations. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

canned_access_control_list instance-attribute

canned_access_control_list: NotRequired[S3CannedAccessControlList]

This functionality is not supported by directory buckets.

checksum_algorithm instance-attribute

checksum_algorithm: NotRequired[S3ChecksumAlgorithm]

Indicates the algorithm that you want Amazon S3 to use to create the checksum. For more information, see Checking object integrity in the Amazon S3 User Guide.

metadata_directive instance-attribute

metadata_directive: NotRequired[S3MetadataDirective]

modified_since_constraint instance-attribute

modified_since_constraint: NotRequired[TimeStamp]

new_object_metadata instance-attribute

new_object_metadata: NotRequired[S3ObjectMetadata]

If you don't provide this parameter, Amazon S3 copies all the metadata from the original objects. If you specify an empty set, the new objects will have no tags. Otherwise, Amazon S3 assigns the supplied tags to the new objects.

new_object_tagging instance-attribute

new_object_tagging: NotRequired[S3TagSet]

Specifies a list of tags to add to the destination objects after they are copied. If NewObjectTagging is not specified, the tags of the source objects are copied to destination objects by default.

Directory buckets - Tags aren't supported by directory buckets. If your source objects have tags and your destination bucket is a directory bucket, specify an empty tag set in the NewObjectTagging field to prevent copying the source object tags to the directory bucket.

object_lock_event_hold instance-attribute

object_lock_event_hold: NotRequired[S3ObjectLockEventHold]

The event hold status to be applied to all objects in the Batch Operations copy job. Set to ON to enable an event hold or OFF to disable it.

This functionality is not supported by directory buckets.

object_lock_event_hold_duration instance-attribute

object_lock_event_hold_duration: NotRequired[S3ObjectLockEventHoldDuration]

The event hold duration to be applied to all objects in the Batch Operations copy job. The duration specifies how long the object remains protected after the event hold is released.

This functionality is not supported by directory buckets.

object_lock_legal_hold_status: NotRequired[S3ObjectLockLegalHoldStatus]

The legal hold status to be applied to all objects in the Batch Operations job.

This functionality is not supported by directory buckets.

object_lock_mode instance-attribute

object_lock_mode: NotRequired[S3ObjectLockMode]

The retention mode to be applied to all objects in the Batch Operations job.

This functionality is not supported by directory buckets.

object_lock_retain_until_date instance-attribute

object_lock_retain_until_date: NotRequired[TimeStamp]

The date when the applied object retention configuration expires on all objects in the Batch Operations job.

This functionality is not supported by directory buckets.

redirect_location instance-attribute

redirect_location: NotRequired[NonEmptyMaxLength2048String]

If the destination bucket is configured as a website, specifies an optional metadata property for website redirects, x-amz-website-redirect-location. Allows webpage redirects if the object copy is accessed through a website endpoint.

This functionality is not supported by directory buckets.

requester_pays instance-attribute

requester_pays: Boolean

This functionality is not supported by directory buckets.

sse_aws_kms_key_id instance-attribute

sse_aws_kms_key_id: NotRequired[KmsKeyArnString]

Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. If the KMS key doesn't exist in the same account that's issuing the command, you must use the full Key ARN not the Key ID.

Directory buckets - If you specify SSEAlgorithm with KMS, you must specify the SSEAwsKmsKeyId parameter with the ID (Key ID or Key ARN) of the KMS symmetric encryption customer managed key to use. Otherwise, you get an HTTP 400 Bad Request error. The key alias format of the KMS key isn't supported. To encrypt new object copies in a directory bucket with SSE-KMS, you must specify SSE-KMS as the directory bucket's default encryption configuration with a KMS key (specifically, a customer managed key). The Amazon Web Services managed key (aws/s3) isn't supported. Your SSE-KMS configuration can only support 1 customer managed key per directory bucket for the lifetime of the bucket. After you specify a customer managed key for SSE-KMS as the bucket default encryption, you can't override the customer managed key for the bucket's SSE-KMS configuration. Then, when you specify server-side encryption settings for new object copies with SSE-KMS, you must make sure the encryption key is the same customer managed key that you specified for the directory bucket's default encryption configuration.

storage_class instance-attribute

storage_class: NotRequired[S3StorageClass]

Specify the storage class for the destination objects in a Copy operation.

Directory buckets - This functionality is not supported by directory buckets.

target_key_prefix instance-attribute

target_key_prefix: NotRequired[NonEmptyMaxLength1024String]

Specifies the folder prefix that you want the objects to be copied into. For example, to copy objects into a folder named Folder1 in the destination bucket, set the TargetKeyPrefix property to Folder1.

target_resource instance-attribute

target_resource: NotRequired[S3RegionalOrS3ExpressBucketArnString]

Specifies the destination bucket Amazon Resource Name (ARN) for the batch copy operation.

  • General purpose buckets - For example, to copy objects to a general purpose bucket named destinationBucket, set the TargetResource property to arn:aws:s3:::destinationBucket.

  • Directory buckets - For example, to copy objects to a directory bucket named destinationBucket in the Availability Zone identified by the AZ ID usw2-az1, set the TargetResource property to arn:aws:s3express:region:account_id:/bucket/destination_bucket_base_name--usw2-az1--x-s3. A directory bucket as a destination bucket can be in Availability Zone or Local Zone.

    Copying objects across different Amazon Web Services Regions isn't supported when the source or destination bucket is in Amazon Web Services Local Zones. The source and destination buckets must have the same parent Amazon Web Services Region. Otherwise, you get an HTTP 400 Bad Request error with the error code InvalidRequest.

un_modified_since_constraint instance-attribute

un_modified_since_constraint: NotRequired[TimeStamp]