ObjectCopy

Provides a resource for copying an S3 object.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var test = new Aws.S3.ObjectCopy("test", new Aws.S3.ObjectCopyArgs
        {
            Bucket = "destination_bucket",
            Grants = 
            {
                new Aws.S3.Inputs.ObjectCopyGrantArgs
                {
                    Permissions = 
                    {
                        "READ",
                    },
                    Type = "Group",
                    Uri = "http://acs.amazonaws.com/groups/global/AllUsers",
                },
            },
            Key = "destination_key",
            Source = "source_bucket/source_key",
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v4/go/aws/s3"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := s3.NewObjectCopy(ctx, "test", &s3.ObjectCopyArgs{
			Bucket: pulumi.String("destination_bucket"),
			Grants: s3.ObjectCopyGrantArray{
				&s3.ObjectCopyGrantArgs{
					Permissions: pulumi.StringArray{
						pulumi.String("READ"),
					},
					Type: pulumi.String("Group"),
					Uri:  pulumi.String("http://acs.amazonaws.com/groups/global/AllUsers"),
				},
			},
			Key:    pulumi.String("destination_key"),
			Source: pulumi.String("source_bucket/source_key"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_aws as aws

test = aws.s3.ObjectCopy("test",
    bucket="destination_bucket",
    grants=[aws.s3.ObjectCopyGrantArgs(
        permissions=["READ"],
        type="Group",
        uri="http://acs.amazonaws.com/groups/global/AllUsers",
    )],
    key="destination_key",
    source="source_bucket/source_key")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const test = new aws.s3.ObjectCopy("test", {
    bucket: "destination_bucket",
    grants: [{
        permissions: ["READ"],
        type: "Group",
        uri: "http://acs.amazonaws.com/groups/global/AllUsers",
    }],
    key: "destination_key",
    source: "source_bucket/source_key",
});

Create a ObjectCopy Resource

new ObjectCopy(name: string, args: ObjectCopyArgs, opts?: CustomResourceOptions);
@overload
def ObjectCopy(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               acl: Optional[str] = None,
               bucket: Optional[str] = None,
               bucket_key_enabled: Optional[bool] = None,
               cache_control: Optional[str] = None,
               content_disposition: Optional[str] = None,
               content_encoding: Optional[str] = None,
               content_language: Optional[str] = None,
               content_type: Optional[str] = None,
               copy_if_match: Optional[str] = None,
               copy_if_modified_since: Optional[str] = None,
               copy_if_none_match: Optional[str] = None,
               copy_if_unmodified_since: Optional[str] = None,
               customer_algorithm: Optional[str] = None,
               customer_key: Optional[str] = None,
               customer_key_md5: Optional[str] = None,
               expected_bucket_owner: Optional[str] = None,
               expected_source_bucket_owner: Optional[str] = None,
               expires: Optional[str] = None,
               force_destroy: Optional[bool] = None,
               grants: Optional[Sequence[ObjectCopyGrantArgs]] = None,
               key: Optional[str] = None,
               kms_encryption_context: Optional[str] = None,
               kms_key_id: Optional[str] = None,
               metadata: Optional[Mapping[str, str]] = None,
               metadata_directive: Optional[str] = None,
               object_lock_legal_hold_status: Optional[str] = None,
               object_lock_mode: Optional[str] = None,
               object_lock_retain_until_date: Optional[str] = None,
               request_payer: Optional[str] = None,
               server_side_encryption: Optional[str] = None,
               source: Optional[str] = None,
               source_customer_algorithm: Optional[str] = None,
               source_customer_key: Optional[str] = None,
               source_customer_key_md5: Optional[str] = None,
               storage_class: Optional[str] = None,
               tagging_directive: Optional[str] = None,
               tags: Optional[Mapping[str, str]] = None,
               website_redirect: Optional[str] = None)
@overload
def ObjectCopy(resource_name: str,
               args: ObjectCopyArgs,
               opts: Optional[ResourceOptions] = None)
func NewObjectCopy(ctx *Context, name string, args ObjectCopyArgs, opts ...ResourceOption) (*ObjectCopy, error)
public ObjectCopy(string name, ObjectCopyArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args ObjectCopyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args ObjectCopyArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args ObjectCopyArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ObjectCopyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

ObjectCopy Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The ObjectCopy resource accepts the following input properties:

Bucket string
Name of the bucket to put the file in.
Key string
Name of the object once it is in the bucket.
Source string
Specifies the source object for the copy operation. You specify the value in one of two formats. 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, testbucket/test1.json. For objects accessed through access points, specify the Amazon Resource Name (ARN) of the object as accessed through the access point, in the format arn:aws:s3:<Region>:<account-id>:accesspoint/<access-point-name>/object/<key>. For example, arn:aws:s3:us-west-2:9999912999:accesspoint/my-access-point/object/testbucket/test1.json.
Acl string
Canned ACL to apply. Defaults to private. Valid values are private, public-read, public-read-write, authenticated-read, aws-exec-read, bucket-owner-read, and bucket-owner-full-control. Conflicts with grant.
BucketKeyEnabled bool
CacheControl string
Specifies caching behavior along the request/reply chain Read w3c cache_control for further details.
ContentDisposition string
Specifies presentational information for the object. Read w3c content_disposition for further information.
ContentEncoding string
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. Read w3c content encoding for further information.
ContentLanguage string
Language the content is in e.g. en-US or en-GB.
ContentType string
Standard MIME type describing the format of the object data, e.g. application/octet-stream. All Valid MIME Types are valid for this input.
CopyIfMatch string
Copies the object if its entity tag (ETag) matches the specified tag.
CopyIfModifiedSince string
Copies the object if it has been modified since the specified time, in RFC3339 format.
CopyIfNoneMatch string
Copies the object if its entity tag (ETag) is different than the specified ETag.
CopyIfUnmodifiedSince string
Copies the object if it hasn’t been modified since the specified time, in RFC3339 format.
CustomerAlgorithm string
Specifies the algorithm to use to when encrypting the object (for example, AES256).
CustomerKey string
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 x-amz-server-side-encryption-customer-algorithm header.
CustomerKeyMd5 string
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.
ExpectedBucketOwner string
Account id of the expected destination bucket owner. If the destination bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.
ExpectedSourceBucketOwner string
Account id of the expected source bucket owner. If the source bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.
Expires string
Date and time at which the object is no longer cacheable, in RFC3339 format.
ForceDestroy bool
Allow the object to be deleted by removing any legal hold on any object version. Default is false. This value should be set to true only if the bucket has S3 object lock enabled.
Grants List<ObjectCopyGrantArgs>
Configuration block for header grants. Documented below. Conflicts with acl.
KmsEncryptionContext string
Specifies the AWS KMS Encryption Context to use for object encryption. The value is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs.
KmsKeyId string
Specifies the AWS KMS Key ARN to use for object encryption. This value is a fully qualified ARN of the KMS Key. If using aws.kms.Key, use the exported arn attribute: kms_key_id = aws_kms_key.foo.arn
Metadata Dictionary<string, string>
A map of keys/values to provision metadata (will be automatically prefixed by x-amz-meta-, note that only lowercase label are currently supported by the AWS Go API).
MetadataDirective string
Specifies whether the metadata is copied from the source object or replaced with metadata provided in the request. Valid values are COPY and REPLACE.
ObjectLockLegalHoldStatus string
The legal hold status that you want to apply to the specified object. Valid values are ON and OFF.
ObjectLockMode string
The object lock retention mode that you want to apply to this object. Valid values are GOVERNANCE and COMPLIANCE.
ObjectLockRetainUntilDate string
The date and time, in RFC3339 format, when this object’s object lock will expire.
RequestPayer string
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 Downloading Objects in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) in the Amazon S3 Developer Guide. If included, the only valid value is requester.
ServerSideEncryption string
Specifies server-side encryption of the object in S3. Valid values are AES256 and aws:kms.
SourceCustomerAlgorithm string
Specifies the algorithm to use when decrypting the source object (for example, AES256).
SourceCustomerKey string
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.
SourceCustomerKeyMd5 string
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.
StorageClass string
Specifies the desired Storage Class for the object. Can be either STANDARD, REDUCED_REDUNDANCY, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, or STANDARD_IA. Defaults to STANDARD.
TaggingDirective string
Specifies whether the object tag-set are copied from the source object or replaced with tag-set provided in the request. Valid values are COPY and REPLACE.
Tags Dictionary<string, string>
A map of tags to assign to the object.
WebsiteRedirect string
Specifies a target URL for website redirect.
Bucket string
Name of the bucket to put the file in.
Key string
Name of the object once it is in the bucket.
Source string
Specifies the source object for the copy operation. You specify the value in one of two formats. 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, testbucket/test1.json. For objects accessed through access points, specify the Amazon Resource Name (ARN) of the object as accessed through the access point, in the format arn:aws:s3:<Region>:<account-id>:accesspoint/<access-point-name>/object/<key>. For example, arn:aws:s3:us-west-2:9999912999:accesspoint/my-access-point/object/testbucket/test1.json.
Acl string
Canned ACL to apply. Defaults to private. Valid values are private, public-read, public-read-write, authenticated-read, aws-exec-read, bucket-owner-read, and bucket-owner-full-control. Conflicts with grant.
BucketKeyEnabled bool
CacheControl string
Specifies caching behavior along the request/reply chain Read w3c cache_control for further details.
ContentDisposition string
Specifies presentational information for the object. Read w3c content_disposition for further information.
ContentEncoding string
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. Read w3c content encoding for further information.
ContentLanguage string
Language the content is in e.g. en-US or en-GB.
ContentType string
Standard MIME type describing the format of the object data, e.g. application/octet-stream. All Valid MIME Types are valid for this input.
CopyIfMatch string
Copies the object if its entity tag (ETag) matches the specified tag.
CopyIfModifiedSince string
Copies the object if it has been modified since the specified time, in RFC3339 format.
CopyIfNoneMatch string
Copies the object if its entity tag (ETag) is different than the specified ETag.
CopyIfUnmodifiedSince string
Copies the object if it hasn’t been modified since the specified time, in RFC3339 format.
CustomerAlgorithm string
Specifies the algorithm to use to when encrypting the object (for example, AES256).
CustomerKey string
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 x-amz-server-side-encryption-customer-algorithm header.
CustomerKeyMd5 string
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.
ExpectedBucketOwner string
Account id of the expected destination bucket owner. If the destination bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.
ExpectedSourceBucketOwner string
Account id of the expected source bucket owner. If the source bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.
Expires string
Date and time at which the object is no longer cacheable, in RFC3339 format.
ForceDestroy bool
Allow the object to be deleted by removing any legal hold on any object version. Default is false. This value should be set to true only if the bucket has S3 object lock enabled.
Grants []ObjectCopyGrant
Configuration block for header grants. Documented below. Conflicts with acl.
KmsEncryptionContext string
Specifies the AWS KMS Encryption Context to use for object encryption. The value is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs.
KmsKeyId string
Specifies the AWS KMS Key ARN to use for object encryption. This value is a fully qualified ARN of the KMS Key. If using aws.kms.Key, use the exported arn attribute: kms_key_id = aws_kms_key.foo.arn
Metadata map[string]string
A map of keys/values to provision metadata (will be automatically prefixed by x-amz-meta-, note that only lowercase label are currently supported by the AWS Go API).
MetadataDirective string
Specifies whether the metadata is copied from the source object or replaced with metadata provided in the request. Valid values are COPY and REPLACE.
ObjectLockLegalHoldStatus string
The legal hold status that you want to apply to the specified object. Valid values are ON and OFF.
ObjectLockMode string
The object lock retention mode that you want to apply to this object. Valid values are GOVERNANCE and COMPLIANCE.
ObjectLockRetainUntilDate string
The date and time, in RFC3339 format, when this object’s object lock will expire.
RequestPayer string
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 Downloading Objects in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) in the Amazon S3 Developer Guide. If included, the only valid value is requester.
ServerSideEncryption string
Specifies server-side encryption of the object in S3. Valid values are AES256 and aws:kms.
SourceCustomerAlgorithm string
Specifies the algorithm to use when decrypting the source object (for example, AES256).
SourceCustomerKey string
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.
SourceCustomerKeyMd5 string
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.
StorageClass string
Specifies the desired Storage Class for the object. Can be either STANDARD, REDUCED_REDUNDANCY, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, or STANDARD_IA. Defaults to STANDARD.
TaggingDirective string
Specifies whether the object tag-set are copied from the source object or replaced with tag-set provided in the request. Valid values are COPY and REPLACE.
Tags map[string]string
A map of tags to assign to the object.
WebsiteRedirect string
Specifies a target URL for website redirect.
bucket string
Name of the bucket to put the file in.
key string
Name of the object once it is in the bucket.
source string
Specifies the source object for the copy operation. You specify the value in one of two formats. 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, testbucket/test1.json. For objects accessed through access points, specify the Amazon Resource Name (ARN) of the object as accessed through the access point, in the format arn:aws:s3:<Region>:<account-id>:accesspoint/<access-point-name>/object/<key>. For example, arn:aws:s3:us-west-2:9999912999:accesspoint/my-access-point/object/testbucket/test1.json.
acl string
Canned ACL to apply. Defaults to private. Valid values are private, public-read, public-read-write, authenticated-read, aws-exec-read, bucket-owner-read, and bucket-owner-full-control. Conflicts with grant.
bucketKeyEnabled boolean
cacheControl string
Specifies caching behavior along the request/reply chain Read w3c cache_control for further details.
contentDisposition string
Specifies presentational information for the object. Read w3c content_disposition for further information.
contentEncoding string
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. Read w3c content encoding for further information.
contentLanguage string
Language the content is in e.g. en-US or en-GB.
contentType string
Standard MIME type describing the format of the object data, e.g. application/octet-stream. All Valid MIME Types are valid for this input.
copyIfMatch string
Copies the object if its entity tag (ETag) matches the specified tag.
copyIfModifiedSince string
Copies the object if it has been modified since the specified time, in RFC3339 format.
copyIfNoneMatch string
Copies the object if its entity tag (ETag) is different than the specified ETag.
copyIfUnmodifiedSince string
Copies the object if it hasn’t been modified since the specified time, in RFC3339 format.
customerAlgorithm string
Specifies the algorithm to use to when encrypting the object (for example, AES256).
customerKey string
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 x-amz-server-side-encryption-customer-algorithm header.
customerKeyMd5 string
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.
expectedBucketOwner string
Account id of the expected destination bucket owner. If the destination bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.
expectedSourceBucketOwner string
Account id of the expected source bucket owner. If the source bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.
expires string
Date and time at which the object is no longer cacheable, in RFC3339 format.
forceDestroy boolean
Allow the object to be deleted by removing any legal hold on any object version. Default is false. This value should be set to true only if the bucket has S3 object lock enabled.
grants ObjectCopyGrantArgs[]
Configuration block for header grants. Documented below. Conflicts with acl.
kmsEncryptionContext string
Specifies the AWS KMS Encryption Context to use for object encryption. The value is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs.
kmsKeyId string
Specifies the AWS KMS Key ARN to use for object encryption. This value is a fully qualified ARN of the KMS Key. If using aws.kms.Key, use the exported arn attribute: kms_key_id = aws_kms_key.foo.arn
metadata {[key: string]: string}
A map of keys/values to provision metadata (will be automatically prefixed by x-amz-meta-, note that only lowercase label are currently supported by the AWS Go API).
metadataDirective string
Specifies whether the metadata is copied from the source object or replaced with metadata provided in the request. Valid values are COPY and REPLACE.
objectLockLegalHoldStatus string
The legal hold status that you want to apply to the specified object. Valid values are ON and OFF.
objectLockMode string
The object lock retention mode that you want to apply to this object. Valid values are GOVERNANCE and COMPLIANCE.
objectLockRetainUntilDate string
The date and time, in RFC3339 format, when this object’s object lock will expire.
requestPayer string
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 Downloading Objects in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) in the Amazon S3 Developer Guide. If included, the only valid value is requester.
serverSideEncryption string
Specifies server-side encryption of the object in S3. Valid values are AES256 and aws:kms.
sourceCustomerAlgorithm string
Specifies the algorithm to use when decrypting the source object (for example, AES256).
sourceCustomerKey string
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.
sourceCustomerKeyMd5 string
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.
storageClass string
Specifies the desired Storage Class for the object. Can be either STANDARD, REDUCED_REDUNDANCY, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, or STANDARD_IA. Defaults to STANDARD.
taggingDirective string
Specifies whether the object tag-set are copied from the source object or replaced with tag-set provided in the request. Valid values are COPY and REPLACE.
tags {[key: string]: string}
A map of tags to assign to the object.
websiteRedirect string
Specifies a target URL for website redirect.
bucket str
Name of the bucket to put the file in.
key str
Name of the object once it is in the bucket.
source str
Specifies the source object for the copy operation. You specify the value in one of two formats. 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, testbucket/test1.json. For objects accessed through access points, specify the Amazon Resource Name (ARN) of the object as accessed through the access point, in the format arn:aws:s3:<Region>:<account-id>:accesspoint/<access-point-name>/object/<key>. For example, arn:aws:s3:us-west-2:9999912999:accesspoint/my-access-point/object/testbucket/test1.json.
acl str
Canned ACL to apply. Defaults to private. Valid values are private, public-read, public-read-write, authenticated-read, aws-exec-read, bucket-owner-read, and bucket-owner-full-control. Conflicts with grant.
bucket_key_enabled bool
cache_control str
Specifies caching behavior along the request/reply chain Read w3c cache_control for further details.
content_disposition str
Specifies presentational information for the object. Read w3c content_disposition for further information.
content_encoding str
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. Read w3c content encoding for further information.
content_language str
Language the content is in e.g. en-US or en-GB.
content_type str
Standard MIME type describing the format of the object data, e.g. application/octet-stream. All Valid MIME Types are valid for this input.
copy_if_match str
Copies the object if its entity tag (ETag) matches the specified tag.
copy_if_modified_since str
Copies the object if it has been modified since the specified time, in RFC3339 format.
copy_if_none_match str
Copies the object if its entity tag (ETag) is different than the specified ETag.
copy_if_unmodified_since str
Copies the object if it hasn’t been modified since the specified time, in RFC3339 format.
customer_algorithm str
Specifies the algorithm to use to when encrypting the object (for example, AES256).
customer_key str
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 x-amz-server-side-encryption-customer-algorithm header.
customer_key_md5 str
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.
expected_bucket_owner str
Account id of the expected destination bucket owner. If the destination bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.
expected_source_bucket_owner str
Account id of the expected source bucket owner. If the source bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.
expires str
Date and time at which the object is no longer cacheable, in RFC3339 format.
force_destroy bool
Allow the object to be deleted by removing any legal hold on any object version. Default is false. This value should be set to true only if the bucket has S3 object lock enabled.
grants Sequence[ObjectCopyGrantArgs]
Configuration block for header grants. Documented below. Conflicts with acl.
kms_encryption_context str
Specifies the AWS KMS Encryption Context to use for object encryption. The value is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs.
kms_key_id str
Specifies the AWS KMS Key ARN to use for object encryption. This value is a fully qualified ARN of the KMS Key. If using aws.kms.Key, use the exported arn attribute: kms_key_id = aws_kms_key.foo.arn
metadata Mapping[str, str]
A map of keys/values to provision metadata (will be automatically prefixed by x-amz-meta-, note that only lowercase label are currently supported by the AWS Go API).
metadata_directive str
Specifies whether the metadata is copied from the source object or replaced with metadata provided in the request. Valid values are COPY and REPLACE.
object_lock_legal_hold_status str
The legal hold status that you want to apply to the specified object. Valid values are ON and OFF.
object_lock_mode str
The object lock retention mode that you want to apply to this object. Valid values are GOVERNANCE and COMPLIANCE.
object_lock_retain_until_date str
The date and time, in RFC3339 format, when this object’s object lock will expire.
request_payer str
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 Downloading Objects in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) in the Amazon S3 Developer Guide. If included, the only valid value is requester.
server_side_encryption str
Specifies server-side encryption of the object in S3. Valid values are AES256 and aws:kms.
source_customer_algorithm str
Specifies the algorithm to use when decrypting the source object (for example, AES256).
source_customer_key str
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.
source_customer_key_md5 str
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.
storage_class str
Specifies the desired Storage Class for the object. Can be either STANDARD, REDUCED_REDUNDANCY, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, or STANDARD_IA. Defaults to STANDARD.
tagging_directive str
Specifies whether the object tag-set are copied from the source object or replaced with tag-set provided in the request. Valid values are COPY and REPLACE.
tags Mapping[str, str]
A map of tags to assign to the object.
website_redirect str
Specifies a target URL for website redirect.

Outputs

All input properties are implicitly available as output properties. Additionally, the ObjectCopy resource produces the following output properties:

Etag string
The ETag generated for the object (an MD5 sum of the object content). For plaintext objects or objects encrypted with an AWS-managed key, the hash is an MD5 digest of the object data. For objects encrypted with a KMS key or objects created by either the Multipart Upload or Part Copy operation, the hash is not an MD5 digest, regardless of the method of encryption. More information on possible values can be found on Common Response Headers.
Expiration string
If the object expiration is configured, this attribute will be set.
Id string
The provider-assigned unique ID for this managed resource.
LastModified string
Returns the date that the object was last modified, in RFC3339 format.
RequestCharged bool
If present, indicates that the requester was successfully charged for the request.
SourceVersionId string
Version of the copied object in the source bucket.
VersionId string
Version ID of the newly created copy.
Etag string
The ETag generated for the object (an MD5 sum of the object content). For plaintext objects or objects encrypted with an AWS-managed key, the hash is an MD5 digest of the object data. For objects encrypted with a KMS key or objects created by either the Multipart Upload or Part Copy operation, the hash is not an MD5 digest, regardless of the method of encryption. More information on possible values can be found on Common Response Headers.
Expiration string
If the object expiration is configured, this attribute will be set.
Id string
The provider-assigned unique ID for this managed resource.
LastModified string
Returns the date that the object was last modified, in RFC3339 format.
RequestCharged bool
If present, indicates that the requester was successfully charged for the request.
SourceVersionId string
Version of the copied object in the source bucket.
VersionId string
Version ID of the newly created copy.
etag string
The ETag generated for the object (an MD5 sum of the object content). For plaintext objects or objects encrypted with an AWS-managed key, the hash is an MD5 digest of the object data. For objects encrypted with a KMS key or objects created by either the Multipart Upload or Part Copy operation, the hash is not an MD5 digest, regardless of the method of encryption. More information on possible values can be found on Common Response Headers.
expiration string
If the object expiration is configured, this attribute will be set.
id string
The provider-assigned unique ID for this managed resource.
lastModified string
Returns the date that the object was last modified, in RFC3339 format.
requestCharged boolean
If present, indicates that the requester was successfully charged for the request.
sourceVersionId string
Version of the copied object in the source bucket.
versionId string
Version ID of the newly created copy.
etag str
The ETag generated for the object (an MD5 sum of the object content). For plaintext objects or objects encrypted with an AWS-managed key, the hash is an MD5 digest of the object data. For objects encrypted with a KMS key or objects created by either the Multipart Upload or Part Copy operation, the hash is not an MD5 digest, regardless of the method of encryption. More information on possible values can be found on Common Response Headers.
expiration str
If the object expiration is configured, this attribute will be set.
id str
The provider-assigned unique ID for this managed resource.
last_modified str
Returns the date that the object was last modified, in RFC3339 format.
request_charged bool
If present, indicates that the requester was successfully charged for the request.
source_version_id str
Version of the copied object in the source bucket.
version_id str
Version ID of the newly created copy.

Look up an Existing ObjectCopy Resource

Get an existing ObjectCopy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: ObjectCopyState, opts?: CustomResourceOptions): ObjectCopy
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        acl: Optional[str] = None,
        bucket: Optional[str] = None,
        bucket_key_enabled: Optional[bool] = None,
        cache_control: Optional[str] = None,
        content_disposition: Optional[str] = None,
        content_encoding: Optional[str] = None,
        content_language: Optional[str] = None,
        content_type: Optional[str] = None,
        copy_if_match: Optional[str] = None,
        copy_if_modified_since: Optional[str] = None,
        copy_if_none_match: Optional[str] = None,
        copy_if_unmodified_since: Optional[str] = None,
        customer_algorithm: Optional[str] = None,
        customer_key: Optional[str] = None,
        customer_key_md5: Optional[str] = None,
        etag: Optional[str] = None,
        expected_bucket_owner: Optional[str] = None,
        expected_source_bucket_owner: Optional[str] = None,
        expiration: Optional[str] = None,
        expires: Optional[str] = None,
        force_destroy: Optional[bool] = None,
        grants: Optional[Sequence[ObjectCopyGrantArgs]] = None,
        key: Optional[str] = None,
        kms_encryption_context: Optional[str] = None,
        kms_key_id: Optional[str] = None,
        last_modified: Optional[str] = None,
        metadata: Optional[Mapping[str, str]] = None,
        metadata_directive: Optional[str] = None,
        object_lock_legal_hold_status: Optional[str] = None,
        object_lock_mode: Optional[str] = None,
        object_lock_retain_until_date: Optional[str] = None,
        request_charged: Optional[bool] = None,
        request_payer: Optional[str] = None,
        server_side_encryption: Optional[str] = None,
        source: Optional[str] = None,
        source_customer_algorithm: Optional[str] = None,
        source_customer_key: Optional[str] = None,
        source_customer_key_md5: Optional[str] = None,
        source_version_id: Optional[str] = None,
        storage_class: Optional[str] = None,
        tagging_directive: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None,
        version_id: Optional[str] = None,
        website_redirect: Optional[str] = None) -> ObjectCopy
func GetObjectCopy(ctx *Context, name string, id IDInput, state *ObjectCopyState, opts ...ResourceOption) (*ObjectCopy, error)
public static ObjectCopy Get(string name, Input<string> id, ObjectCopyState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

Acl string
Canned ACL to apply. Defaults to private. Valid values are private, public-read, public-read-write, authenticated-read, aws-exec-read, bucket-owner-read, and bucket-owner-full-control. Conflicts with grant.
Bucket string
Name of the bucket to put the file in.
BucketKeyEnabled bool
CacheControl string
Specifies caching behavior along the request/reply chain Read w3c cache_control for further details.
ContentDisposition string
Specifies presentational information for the object. Read w3c content_disposition for further information.
ContentEncoding string
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. Read w3c content encoding for further information.
ContentLanguage string
Language the content is in e.g. en-US or en-GB.
ContentType string
Standard MIME type describing the format of the object data, e.g. application/octet-stream. All Valid MIME Types are valid for this input.
CopyIfMatch string
Copies the object if its entity tag (ETag) matches the specified tag.
CopyIfModifiedSince string
Copies the object if it has been modified since the specified time, in RFC3339 format.
CopyIfNoneMatch string
Copies the object if its entity tag (ETag) is different than the specified ETag.
CopyIfUnmodifiedSince string
Copies the object if it hasn’t been modified since the specified time, in RFC3339 format.
CustomerAlgorithm string
Specifies the algorithm to use to when encrypting the object (for example, AES256).
CustomerKey string
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 x-amz-server-side-encryption-customer-algorithm header.
CustomerKeyMd5 string
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.
Etag string
The ETag generated for the object (an MD5 sum of the object content). For plaintext objects or objects encrypted with an AWS-managed key, the hash is an MD5 digest of the object data. For objects encrypted with a KMS key or objects created by either the Multipart Upload or Part Copy operation, the hash is not an MD5 digest, regardless of the method of encryption. More information on possible values can be found on Common Response Headers.
ExpectedBucketOwner string
Account id of the expected destination bucket owner. If the destination bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.
ExpectedSourceBucketOwner string
Account id of the expected source bucket owner. If the source bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.
Expiration string
If the object expiration is configured, this attribute will be set.
Expires string
Date and time at which the object is no longer cacheable, in RFC3339 format.
ForceDestroy bool
Allow the object to be deleted by removing any legal hold on any object version. Default is false. This value should be set to true only if the bucket has S3 object lock enabled.
Grants List<ObjectCopyGrantArgs>
Configuration block for header grants. Documented below. Conflicts with acl.
Key string
Name of the object once it is in the bucket.
KmsEncryptionContext string
Specifies the AWS KMS Encryption Context to use for object encryption. The value is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs.
KmsKeyId string
Specifies the AWS KMS Key ARN to use for object encryption. This value is a fully qualified ARN of the KMS Key. If using aws.kms.Key, use the exported arn attribute: kms_key_id = aws_kms_key.foo.arn
LastModified string
Returns the date that the object was last modified, in RFC3339 format.
Metadata Dictionary<string, string>
A map of keys/values to provision metadata (will be automatically prefixed by x-amz-meta-, note that only lowercase label are currently supported by the AWS Go API).
MetadataDirective string
Specifies whether the metadata is copied from the source object or replaced with metadata provided in the request. Valid values are COPY and REPLACE.
ObjectLockLegalHoldStatus string
The legal hold status that you want to apply to the specified object. Valid values are ON and OFF.
ObjectLockMode string
The object lock retention mode that you want to apply to this object. Valid values are GOVERNANCE and COMPLIANCE.
ObjectLockRetainUntilDate string
The date and time, in RFC3339 format, when this object’s object lock will expire.
RequestCharged bool
If present, indicates that the requester was successfully charged for the request.
RequestPayer string
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 Downloading Objects in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) in the Amazon S3 Developer Guide. If included, the only valid value is requester.
ServerSideEncryption string
Specifies server-side encryption of the object in S3. Valid values are AES256 and aws:kms.
Source string
Specifies the source object for the copy operation. You specify the value in one of two formats. 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, testbucket/test1.json. For objects accessed through access points, specify the Amazon Resource Name (ARN) of the object as accessed through the access point, in the format arn:aws:s3:<Region>:<account-id>:accesspoint/<access-point-name>/object/<key>. For example, arn:aws:s3:us-west-2:9999912999:accesspoint/my-access-point/object/testbucket/test1.json.
SourceCustomerAlgorithm string
Specifies the algorithm to use when decrypting the source object (for example, AES256).
SourceCustomerKey string
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.
SourceCustomerKeyMd5 string
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.
SourceVersionId string
Version of the copied object in the source bucket.
StorageClass string
Specifies the desired Storage Class for the object. Can be either STANDARD, REDUCED_REDUNDANCY, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, or STANDARD_IA. Defaults to STANDARD.
TaggingDirective string
Specifies whether the object tag-set are copied from the source object or replaced with tag-set provided in the request. Valid values are COPY and REPLACE.
Tags Dictionary<string, string>
A map of tags to assign to the object.
VersionId string
Version ID of the newly created copy.
WebsiteRedirect string
Specifies a target URL for website redirect.
Acl string
Canned ACL to apply. Defaults to private. Valid values are private, public-read, public-read-write, authenticated-read, aws-exec-read, bucket-owner-read, and bucket-owner-full-control. Conflicts with grant.
Bucket string
Name of the bucket to put the file in.
BucketKeyEnabled bool
CacheControl string
Specifies caching behavior along the request/reply chain Read w3c cache_control for further details.
ContentDisposition string
Specifies presentational information for the object. Read w3c content_disposition for further information.
ContentEncoding string
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. Read w3c content encoding for further information.
ContentLanguage string
Language the content is in e.g. en-US or en-GB.
ContentType string
Standard MIME type describing the format of the object data, e.g. application/octet-stream. All Valid MIME Types are valid for this input.
CopyIfMatch string
Copies the object if its entity tag (ETag) matches the specified tag.
CopyIfModifiedSince string
Copies the object if it has been modified since the specified time, in RFC3339 format.
CopyIfNoneMatch string
Copies the object if its entity tag (ETag) is different than the specified ETag.
CopyIfUnmodifiedSince string
Copies the object if it hasn’t been modified since the specified time, in RFC3339 format.
CustomerAlgorithm string
Specifies the algorithm to use to when encrypting the object (for example, AES256).
CustomerKey string
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 x-amz-server-side-encryption-customer-algorithm header.
CustomerKeyMd5 string
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.
Etag string
The ETag generated for the object (an MD5 sum of the object content). For plaintext objects or objects encrypted with an AWS-managed key, the hash is an MD5 digest of the object data. For objects encrypted with a KMS key or objects created by either the Multipart Upload or Part Copy operation, the hash is not an MD5 digest, regardless of the method of encryption. More information on possible values can be found on Common Response Headers.
ExpectedBucketOwner string
Account id of the expected destination bucket owner. If the destination bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.
ExpectedSourceBucketOwner string
Account id of the expected source bucket owner. If the source bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.
Expiration string
If the object expiration is configured, this attribute will be set.
Expires string
Date and time at which the object is no longer cacheable, in RFC3339 format.
ForceDestroy bool
Allow the object to be deleted by removing any legal hold on any object version. Default is false. This value should be set to true only if the bucket has S3 object lock enabled.
Grants []ObjectCopyGrant
Configuration block for header grants. Documented below. Conflicts with acl.
Key string
Name of the object once it is in the bucket.
KmsEncryptionContext string
Specifies the AWS KMS Encryption Context to use for object encryption. The value is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs.
KmsKeyId string
Specifies the AWS KMS Key ARN to use for object encryption. This value is a fully qualified ARN of the KMS Key. If using aws.kms.Key, use the exported arn attribute: kms_key_id = aws_kms_key.foo.arn
LastModified string
Returns the date that the object was last modified, in RFC3339 format.
Metadata map[string]string
A map of keys/values to provision metadata (will be automatically prefixed by x-amz-meta-, note that only lowercase label are currently supported by the AWS Go API).
MetadataDirective string
Specifies whether the metadata is copied from the source object or replaced with metadata provided in the request. Valid values are COPY and REPLACE.
ObjectLockLegalHoldStatus string
The legal hold status that you want to apply to the specified object. Valid values are ON and OFF.
ObjectLockMode string
The object lock retention mode that you want to apply to this object. Valid values are GOVERNANCE and COMPLIANCE.
ObjectLockRetainUntilDate string
The date and time, in RFC3339 format, when this object’s object lock will expire.
RequestCharged bool
If present, indicates that the requester was successfully charged for the request.
RequestPayer string
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 Downloading Objects in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) in the Amazon S3 Developer Guide. If included, the only valid value is requester.
ServerSideEncryption string
Specifies server-side encryption of the object in S3. Valid values are AES256 and aws:kms.
Source string
Specifies the source object for the copy operation. You specify the value in one of two formats. 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, testbucket/test1.json. For objects accessed through access points, specify the Amazon Resource Name (ARN) of the object as accessed through the access point, in the format arn:aws:s3:<Region>:<account-id>:accesspoint/<access-point-name>/object/<key>. For example, arn:aws:s3:us-west-2:9999912999:accesspoint/my-access-point/object/testbucket/test1.json.
SourceCustomerAlgorithm string
Specifies the algorithm to use when decrypting the source object (for example, AES256).
SourceCustomerKey string
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.
SourceCustomerKeyMd5 string
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.
SourceVersionId string
Version of the copied object in the source bucket.
StorageClass string
Specifies the desired Storage Class for the object. Can be either STANDARD, REDUCED_REDUNDANCY, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, or STANDARD_IA. Defaults to STANDARD.
TaggingDirective string
Specifies whether the object tag-set are copied from the source object or replaced with tag-set provided in the request. Valid values are COPY and REPLACE.
Tags map[string]string
A map of tags to assign to the object.
VersionId string
Version ID of the newly created copy.
WebsiteRedirect string
Specifies a target URL for website redirect.
acl string
Canned ACL to apply. Defaults to private. Valid values are private, public-read, public-read-write, authenticated-read, aws-exec-read, bucket-owner-read, and bucket-owner-full-control. Conflicts with grant.
bucket string
Name of the bucket to put the file in.
bucketKeyEnabled boolean
cacheControl string
Specifies caching behavior along the request/reply chain Read w3c cache_control for further details.
contentDisposition string
Specifies presentational information for the object. Read w3c content_disposition for further information.
contentEncoding string
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. Read w3c content encoding for further information.
contentLanguage string
Language the content is in e.g. en-US or en-GB.
contentType string
Standard MIME type describing the format of the object data, e.g. application/octet-stream. All Valid MIME Types are valid for this input.
copyIfMatch string
Copies the object if its entity tag (ETag) matches the specified tag.
copyIfModifiedSince string
Copies the object if it has been modified since the specified time, in RFC3339 format.
copyIfNoneMatch string
Copies the object if its entity tag (ETag) is different than the specified ETag.
copyIfUnmodifiedSince string
Copies the object if it hasn’t been modified since the specified time, in RFC3339 format.
customerAlgorithm string
Specifies the algorithm to use to when encrypting the object (for example, AES256).
customerKey string
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 x-amz-server-side-encryption-customer-algorithm header.
customerKeyMd5 string
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.
etag string
The ETag generated for the object (an MD5 sum of the object content). For plaintext objects or objects encrypted with an AWS-managed key, the hash is an MD5 digest of the object data. For objects encrypted with a KMS key or objects created by either the Multipart Upload or Part Copy operation, the hash is not an MD5 digest, regardless of the method of encryption. More information on possible values can be found on Common Response Headers.
expectedBucketOwner string
Account id of the expected destination bucket owner. If the destination bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.
expectedSourceBucketOwner string
Account id of the expected source bucket owner. If the source bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.
expiration string
If the object expiration is configured, this attribute will be set.
expires string
Date and time at which the object is no longer cacheable, in RFC3339 format.
forceDestroy boolean
Allow the object to be deleted by removing any legal hold on any object version. Default is false. This value should be set to true only if the bucket has S3 object lock enabled.
grants ObjectCopyGrantArgs[]
Configuration block for header grants. Documented below. Conflicts with acl.
key string
Name of the object once it is in the bucket.
kmsEncryptionContext string
Specifies the AWS KMS Encryption Context to use for object encryption. The value is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs.
kmsKeyId string
Specifies the AWS KMS Key ARN to use for object encryption. This value is a fully qualified ARN of the KMS Key. If using aws.kms.Key, use the exported arn attribute: kms_key_id = aws_kms_key.foo.arn
lastModified string
Returns the date that the object was last modified, in RFC3339 format.
metadata {[key: string]: string}
A map of keys/values to provision metadata (will be automatically prefixed by x-amz-meta-, note that only lowercase label are currently supported by the AWS Go API).
metadataDirective string
Specifies whether the metadata is copied from the source object or replaced with metadata provided in the request. Valid values are COPY and REPLACE.
objectLockLegalHoldStatus string
The legal hold status that you want to apply to the specified object. Valid values are ON and OFF.
objectLockMode string
The object lock retention mode that you want to apply to this object. Valid values are GOVERNANCE and COMPLIANCE.
objectLockRetainUntilDate string
The date and time, in RFC3339 format, when this object’s object lock will expire.
requestCharged boolean
If present, indicates that the requester was successfully charged for the request.
requestPayer string
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 Downloading Objects in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) in the Amazon S3 Developer Guide. If included, the only valid value is requester.
serverSideEncryption string
Specifies server-side encryption of the object in S3. Valid values are AES256 and aws:kms.
source string
Specifies the source object for the copy operation. You specify the value in one of two formats. 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, testbucket/test1.json. For objects accessed through access points, specify the Amazon Resource Name (ARN) of the object as accessed through the access point, in the format arn:aws:s3:<Region>:<account-id>:accesspoint/<access-point-name>/object/<key>. For example, arn:aws:s3:us-west-2:9999912999:accesspoint/my-access-point/object/testbucket/test1.json.
sourceCustomerAlgorithm string
Specifies the algorithm to use when decrypting the source object (for example, AES256).
sourceCustomerKey string
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.
sourceCustomerKeyMd5 string
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.
sourceVersionId string
Version of the copied object in the source bucket.
storageClass string
Specifies the desired Storage Class for the object. Can be either STANDARD, REDUCED_REDUNDANCY, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, or STANDARD_IA. Defaults to STANDARD.
taggingDirective string
Specifies whether the object tag-set are copied from the source object or replaced with tag-set provided in the request. Valid values are COPY and REPLACE.
tags {[key: string]: string}
A map of tags to assign to the object.
versionId string
Version ID of the newly created copy.
websiteRedirect string
Specifies a target URL for website redirect.
acl str
Canned ACL to apply. Defaults to private. Valid values are private, public-read, public-read-write, authenticated-read, aws-exec-read, bucket-owner-read, and bucket-owner-full-control. Conflicts with grant.
bucket str
Name of the bucket to put the file in.
bucket_key_enabled bool
cache_control str
Specifies caching behavior along the request/reply chain Read w3c cache_control for further details.
content_disposition str
Specifies presentational information for the object. Read w3c content_disposition for further information.
content_encoding str
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. Read w3c content encoding for further information.
content_language str
Language the content is in e.g. en-US or en-GB.
content_type str
Standard MIME type describing the format of the object data, e.g. application/octet-stream. All Valid MIME Types are valid for this input.
copy_if_match str
Copies the object if its entity tag (ETag) matches the specified tag.
copy_if_modified_since str
Copies the object if it has been modified since the specified time, in RFC3339 format.
copy_if_none_match str
Copies the object if its entity tag (ETag) is different than the specified ETag.
copy_if_unmodified_since str
Copies the object if it hasn’t been modified since the specified time, in RFC3339 format.
customer_algorithm str
Specifies the algorithm to use to when encrypting the object (for example, AES256).
customer_key str
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 x-amz-server-side-encryption-customer-algorithm header.
customer_key_md5 str
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.
etag str
The ETag generated for the object (an MD5 sum of the object content). For plaintext objects or objects encrypted with an AWS-managed key, the hash is an MD5 digest of the object data. For objects encrypted with a KMS key or objects created by either the Multipart Upload or Part Copy operation, the hash is not an MD5 digest, regardless of the method of encryption. More information on possible values can be found on Common Response Headers.
expected_bucket_owner str
Account id of the expected destination bucket owner. If the destination bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.
expected_source_bucket_owner str
Account id of the expected source bucket owner. If the source bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.
expiration str
If the object expiration is configured, this attribute will be set.
expires str
Date and time at which the object is no longer cacheable, in RFC3339 format.
force_destroy bool
Allow the object to be deleted by removing any legal hold on any object version. Default is false. This value should be set to true only if the bucket has S3 object lock enabled.
grants Sequence[ObjectCopyGrantArgs]
Configuration block for header grants. Documented below. Conflicts with acl.
key str
Name of the object once it is in the bucket.
kms_encryption_context str
Specifies the AWS KMS Encryption Context to use for object encryption. The value is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs.
kms_key_id str
Specifies the AWS KMS Key ARN to use for object encryption. This value is a fully qualified ARN of the KMS Key. If using aws.kms.Key, use the exported arn attribute: kms_key_id = aws_kms_key.foo.arn
last_modified str
Returns the date that the object was last modified, in RFC3339 format.
metadata Mapping[str, str]
A map of keys/values to provision metadata (will be automatically prefixed by x-amz-meta-, note that only lowercase label are currently supported by the AWS Go API).
metadata_directive str
Specifies whether the metadata is copied from the source object or replaced with metadata provided in the request. Valid values are COPY and REPLACE.
object_lock_legal_hold_status str
The legal hold status that you want to apply to the specified object. Valid values are ON and OFF.
object_lock_mode str
The object lock retention mode that you want to apply to this object. Valid values are GOVERNANCE and COMPLIANCE.
object_lock_retain_until_date str
The date and time, in RFC3339 format, when this object’s object lock will expire.
request_charged bool
If present, indicates that the requester was successfully charged for the request.
request_payer str
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 Downloading Objects in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) in the Amazon S3 Developer Guide. If included, the only valid value is requester.
server_side_encryption str
Specifies server-side encryption of the object in S3. Valid values are AES256 and aws:kms.
source str
Specifies the source object for the copy operation. You specify the value in one of two formats. 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, testbucket/test1.json. For objects accessed through access points, specify the Amazon Resource Name (ARN) of the object as accessed through the access point, in the format arn:aws:s3:<Region>:<account-id>:accesspoint/<access-point-name>/object/<key>. For example, arn:aws:s3:us-west-2:9999912999:accesspoint/my-access-point/object/testbucket/test1.json.
source_customer_algorithm str
Specifies the algorithm to use when decrypting the source object (for example, AES256).
source_customer_key str
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.
source_customer_key_md5 str
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.
source_version_id str
Version of the copied object in the source bucket.
storage_class str
Specifies the desired Storage Class for the object. Can be either STANDARD, REDUCED_REDUNDANCY, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, or STANDARD_IA. Defaults to STANDARD.
tagging_directive str
Specifies whether the object tag-set are copied from the source object or replaced with tag-set provided in the request. Valid values are COPY and REPLACE.
tags Mapping[str, str]
A map of tags to assign to the object.
version_id str
Version ID of the newly created copy.
website_redirect str
Specifies a target URL for website redirect.

Supporting Types

ObjectCopyGrant

Permissions List<string>
List of permissions to grant to grantee. Valid values are READ, READ_ACP, WRITE_ACP, FULL_CONTROL.
Type string
  • Type of grantee. Valid values are CanonicalUser, Group, and AmazonCustomerByEmail.
Email string
Email address of the grantee. Used only when type is AmazonCustomerByEmail.
Id string
The canonical user ID of the grantee. Used only when type is CanonicalUser.
Uri string
URI of the grantee group. Used only when type is Group.
Permissions []string
List of permissions to grant to grantee. Valid values are READ, READ_ACP, WRITE_ACP, FULL_CONTROL.
Type string
  • Type of grantee. Valid values are CanonicalUser, Group, and AmazonCustomerByEmail.
Email string
Email address of the grantee. Used only when type is AmazonCustomerByEmail.
Id string
The canonical user ID of the grantee. Used only when type is CanonicalUser.
Uri string
URI of the grantee group. Used only when type is Group.
permissions string[]
List of permissions to grant to grantee. Valid values are READ, READ_ACP, WRITE_ACP, FULL_CONTROL.
type string
  • Type of grantee. Valid values are CanonicalUser, Group, and AmazonCustomerByEmail.
email string
Email address of the grantee. Used only when type is AmazonCustomerByEmail.
id string
The canonical user ID of the grantee. Used only when type is CanonicalUser.
uri string
URI of the grantee group. Used only when type is Group.
permissions Sequence[str]
List of permissions to grant to grantee. Valid values are READ, READ_ACP, WRITE_ACP, FULL_CONTROL.
type str
  • Type of grantee. Valid values are CanonicalUser, Group, and AmazonCustomerByEmail.
email str
Email address of the grantee. Used only when type is AmazonCustomerByEmail.
id str
The canonical user ID of the grantee. Used only when type is CanonicalUser.
uri str
URI of the grantee group. Used only when type is Group.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.