paws.storage (version 0.1.0)

s3_copy_object: Creates a copy of an object that is already stored in Amazon S3

Description

Creates a copy of an object that is already stored in Amazon S3.

Usage

s3_copy_object(ACL, Bucket, CacheControl, ContentDisposition,
  ContentEncoding, ContentLanguage, ContentType, CopySource,
  CopySourceIfMatch, CopySourceIfModifiedSince, CopySourceIfNoneMatch,
  CopySourceIfUnmodifiedSince, Expires, GrantFullControl, GrantRead,
  GrantReadACP, GrantWriteACP, Key, Metadata, MetadataDirective,
  TaggingDirective, ServerSideEncryption, StorageClass,
  WebsiteRedirectLocation, SSECustomerAlgorithm, SSECustomerKey,
  SSECustomerKeyMD5, SSEKMSKeyId, CopySourceSSECustomerAlgorithm,
  CopySourceSSECustomerKey, CopySourceSSECustomerKeyMD5, RequestPayer,
  Tagging, ObjectLockMode, ObjectLockRetainUntilDate,
  ObjectLockLegalHoldStatus)

Arguments

ACL

The canned ACL to apply to the object.

Bucket

[required]

CacheControl

Specifies caching behavior along the request/reply chain.

ContentDisposition

Specifies presentational information for the object.

ContentEncoding

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.

ContentLanguage

The language the content is in.

ContentType

A standard MIME type describing the format of the object data.

CopySource

[required] The name of the source bucket and key name of the source object, separated by a slash (/). Must be URL-encoded.

CopySourceIfMatch

Copies the object if its entity tag (ETag) matches the specified tag.

CopySourceIfModifiedSince

Copies the object if it has been modified since the specified time.

CopySourceIfNoneMatch

Copies the object if its entity tag (ETag) is different than the specified ETag.

CopySourceIfUnmodifiedSince

Copies the object if it hasn't been modified since the specified time.

Expires

The date and time at which the object is no longer cacheable.

GrantFullControl

Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the object.

GrantRead

Allows grantee to read the object data and its metadata.

GrantReadACP

Allows grantee to read the object ACL.

GrantWriteACP

Allows grantee to write the ACL for the applicable object.

Key

[required]

Metadata

A map of metadata to store with the object in S3.

MetadataDirective

Specifies whether the metadata is copied from the source object or replaced with metadata provided in the request.

TaggingDirective

Specifies whether the object tag-set are copied from the source object or replaced with tag-set provided in the request.

ServerSideEncryption

The Server-side encryption algorithm used when storing this object in S3 (e.g., AES256, aws:kms).

StorageClass

The type of storage to use for the object. Defaults to 'STANDARD'.

WebsiteRedirectLocation

If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata.

SSECustomerAlgorithm

Specifies the algorithm to use to when encrypting the object (e.g., AES256).

SSECustomerKey

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 does not store the encryption key. The key must be appropriate for use with the algorithm specified in the x-amz-server-side<U+00E2><U+20AC><U+2039>-encryption<U+00E2><U+20AC><U+2039>-customer-algorithm header.

SSECustomerKeyMD5

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 the encryption key was transmitted without error.

SSEKMSKeyId

Specifies the AWS KMS key ID to use for object encryption. All GET and PUT requests for an object protected by AWS KMS will fail if not made via SSL or using SigV4. Documentation on configuring any of the officially supported AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html\#specify-signature-version

CopySourceSSECustomerAlgorithm

Specifies the algorithm to use when decrypting the source object (e.g., AES256).

CopySourceSSECustomerKey

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.

CopySourceSSECustomerKeyMD5

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 the encryption key was transmitted without error.

RequestPayer
Tagging

The tag-set for the object destination object this value must be used in conjunction with the TaggingDirective. The tag-set must be encoded as URL Query parameters

ObjectLockMode

The Object Lock mode that you want to apply to the copied object.

ObjectLockRetainUntilDate

The date and time when you want the copied object's Object Lock to expire.

ObjectLockLegalHoldStatus

Specifies whether you want to apply a Legal Hold to the copied object.

Request syntax

svc$copy_object(
  ACL = "private"|"public-read"|"public-read-write"|"authenticated-read"|"aws-exec-read"|"bucket-owner-read"|"bucket-owner-full-control",
  Bucket = "string",
  CacheControl = "string",
  ContentDisposition = "string",
  ContentEncoding = "string",
  ContentLanguage = "string",
  ContentType = "string",
  CopySource = "string",
  CopySourceIfMatch = "string",
  CopySourceIfModifiedSince = as.POSIXct(
    "2015-01-01"
  ),
  CopySourceIfNoneMatch = "string",
  CopySourceIfUnmodifiedSince = as.POSIXct(
    "2015-01-01"
  ),
  Expires = as.POSIXct(
    "2015-01-01"
  ),
  GrantFullControl = "string",
  GrantRead = "string",
  GrantReadACP = "string",
  GrantWriteACP = "string",
  Key = "string",
  Metadata = list(
    "string"
  ),
  MetadataDirective = "COPY"|"REPLACE",
  TaggingDirective = "COPY"|"REPLACE",
  ServerSideEncryption = "AES256"|"aws:kms",
  StorageClass = "STANDARD"|"REDUCED_REDUNDANCY"|"STANDARD_IA"|"ONEZONE_IA"|"INTELLIGENT_TIERING"|"GLACIER"|"DEEP_ARCHIVE",
  WebsiteRedirectLocation = "string",
  SSECustomerAlgorithm = "string",
  SSECustomerKey = raw,
  SSECustomerKeyMD5 = "string",
  SSEKMSKeyId = "string",
  CopySourceSSECustomerAlgorithm = "string",
  CopySourceSSECustomerKey = raw,
  CopySourceSSECustomerKeyMD5 = "string",
  RequestPayer = "requester",
  Tagging = "string",
  ObjectLockMode = "GOVERNANCE"|"COMPLIANCE",
  ObjectLockRetainUntilDate = as.POSIXct(
    "2015-01-01"
  ),
  ObjectLockLegalHoldStatus = "ON"|"OFF"
)

Examples

Run this code
# NOT RUN {
# The following example copies an object from one bucket to another.
# }
# NOT RUN {
svc$copy_object(
  Bucket = "destinationbucket",
  CopySource = "/sourcebucket/HappyFacejpg",
  Key = "HappyFaceCopyjpg"
)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab