Struct: s3.UploadPartCopyInput

import "../ibm-cos-sdk-go/service/s3"

Implemented Interfaces

s3crypto.Cipher, s3manager.ReadSeekerWriteTo, request.Validator, s3manager.WriterReadFrom

Structure Field Summary collapse

Service Operations collapse

Structure Field Details

Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`

The bucket name.

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points (docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) in the Amazon S3 User Guide.

When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts? (docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in the Amazon S3 User Guide.

Bucket is a required field

CopySource *string `location:"header" locationName:"x-amz-copy-source" type:"string" required:"true"`

Specifies the source object for the copy operation. You specify the value in one of two formats, depending on whether you want to access the source object through an access point (docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html):

  • For objects not accessed through an access point, specify the name of the source bucket and key of the source object, separated by a slash (/). For example, to copy the object reports/january.pdf from the bucket awsexamplebucket, use awsexamplebucket/reports/january.pdf. The value must be URL encoded.

  • 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, to copy the object reports/january.pdf through access point my-access-point owned by account 123456789012 in Region us-west-2, use the URL encoding of arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf. The value must be URL encoded. Amazon S3 supports copy operations using access points only when the source and destination buckets are in the same AWS Region. Alternatively, for objects accessed through Amazon S3 on Outposts, specify the ARN of the object as accessed in the format arn:aws:s3-outposts:<Region>:<account-id>:outpost/<outpost-id>/object/<key>. For example, to copy the object reports/january.pdf through outpost my-outpost owned by account 123456789012 in Region us-west-2, use the URL encoding of arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf. The value must be URL encoded.

To copy a specific version of an object, append ?versionId=<version-id> to the value (for example, awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893). If you don’t specify a version ID, Amazon S3 copies the latest version of the source object.

CopySource is a required field

CopySourceIfMatch *string `location:"header" locationName:"x-amz-copy-source-if-match" type:"string"`

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

CopySourceIfModifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-modified-since" type:"timestamp"`

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

CopySourceIfNoneMatch *string `location:"header" locationName:"x-amz-copy-source-if-none-match" type:"string"`

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

CopySourceIfUnmodifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-unmodified-since" type:"timestamp"`

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

CopySourceRange *string `location:"header" locationName:"x-amz-copy-source-range" type:"string"`

The range of bytes to copy from the source object. The range value must use the form bytes=first-last, where the first and last are the zero-based byte offsets to copy. For example, bytes=0-9 indicates that you want to copy the first 10 bytes of the source. You can copy a range only if the source object is greater than 5 MB.

CopySourceSSECustomerAlgorithm *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-algorithm" type:"string"`

Specifies the algorithm to use when decrypting the source object (for example, AES256).

CopySourceSSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key" type:"string" sensitive:"true"`

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.

CopySourceSSECustomerKey is a sensitive parameter and its value will be replaced with “sensitive” in string returned by UploadPartCopyInput’s String and GoString methods.

CopySourceSSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key-MD5" type:"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 `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`

Ignored by COS.

ExpectedSourceBucketOwner *string `location:"header" locationName:"x-amz-source-expected-bucket-owner" type:"string"`

The 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.

Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`

Object key for which the multipart upload was initiated.

Key is a required field

PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer" required:"true"`

Part number of part being copied. This is a positive integer between 1 and 10,000.

PartNumber is a required field

RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`

Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. If either the source or destination Amazon S3 bucket has Requester Pays enabled, the requester will pay for corresponding charges to copy the object. For information about downloading objects from Requester Pays buckets, see Downloading Objects in Requester Pays Buckets (docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) in the Amazon S3 User Guide.

SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`

Specifies the algorithm to use to when encrypting the object (for example, AES256).

SSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`

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. This must be the same encryption key specified in the initiate multipart upload request.

SSECustomerKey is a sensitive parameter and its value will be replaced with “sensitive” in string returned by UploadPartCopyInput’s String and GoString methods.

SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"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.

UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`

Upload ID identifying the multipart upload whose part is being copied.

UploadId is a required field

_ struct{} `locationName:"UploadPartCopyRequest" type:"structure"`

Method Details

func (s UploadPartCopyInput) GoString() string

GoString returns the string representation.

API parameter values that are decorated as “sensitive” in the API will not be included in the string output. The member name will be present, but the value will be replaced with “sensitive”.



22967
22968
22969
// File 'service/s3/api.go', line 22967

func (s UploadPartCopyInput) GoString() string { return s.String() }

func (s *UploadPartCopyInput) SetBucket(v string) *UploadPartCopyInput

SetBucket sets the Bucket field’s value.



23003
23004
23005
23006
// File 'service/s3/api.go', line 23003

func (s *UploadPartCopyInput) SetBucket(v string) *UploadPartCopyInput { s.Bucket = &v return s }

func (s *UploadPartCopyInput) SetCopySource(v string) *UploadPartCopyInput

SetCopySource sets the CopySource field’s value.



23016
23017
23018
23019
// File 'service/s3/api.go', line 23016

func (s *UploadPartCopyInput) SetCopySource(v string) *UploadPartCopyInput { s.CopySource = &v return s }

func (s *UploadPartCopyInput) SetCopySourceIfMatch(v string) *UploadPartCopyInput

SetCopySourceIfMatch sets the CopySourceIfMatch field’s value.



23022
23023
23024
23025
// File 'service/s3/api.go', line 23022

func (s *UploadPartCopyInput) SetCopySourceIfMatch(v string) *UploadPartCopyInput { s.CopySourceIfMatch = &v return s }

func (s *UploadPartCopyInput) SetCopySourceIfModifiedSince(v time.Time) *UploadPartCopyInput

SetCopySourceIfModifiedSince sets the CopySourceIfModifiedSince field’s value.



23028
23029
23030
23031
// File 'service/s3/api.go', line 23028

func (s *UploadPartCopyInput) SetCopySourceIfModifiedSince(v time.Time) *UploadPartCopyInput { s.CopySourceIfModifiedSince = &v return s }

func (s *UploadPartCopyInput) SetCopySourceIfNoneMatch(v string) *UploadPartCopyInput

SetCopySourceIfNoneMatch sets the CopySourceIfNoneMatch field’s value.



23034
23035
23036
23037
// File 'service/s3/api.go', line 23034

func (s *UploadPartCopyInput) SetCopySourceIfNoneMatch(v string) *UploadPartCopyInput { s.CopySourceIfNoneMatch = &v return s }

func (s *UploadPartCopyInput) SetCopySourceIfUnmodifiedSince(v time.Time) *UploadPartCopyInput

SetCopySourceIfUnmodifiedSince sets the CopySourceIfUnmodifiedSince field’s value.



23040
23041
23042
23043
// File 'service/s3/api.go', line 23040

func (s *UploadPartCopyInput) SetCopySourceIfUnmodifiedSince(v time.Time) *UploadPartCopyInput { s.CopySourceIfUnmodifiedSince = &v return s }

func (s *UploadPartCopyInput) SetCopySourceRange(v string) *UploadPartCopyInput

SetCopySourceRange sets the CopySourceRange field’s value.



23046
23047
23048
23049
// File 'service/s3/api.go', line 23046

func (s *UploadPartCopyInput) SetCopySourceRange(v string) *UploadPartCopyInput { s.CopySourceRange = &v return s }

func (s *UploadPartCopyInput) SetCopySourceSSECustomerAlgorithm(v string) *UploadPartCopyInput

SetCopySourceSSECustomerAlgorithm sets the CopySourceSSECustomerAlgorithm field’s value.



23052
23053
23054
23055
// File 'service/s3/api.go', line 23052

func (s *UploadPartCopyInput) SetCopySourceSSECustomerAlgorithm(v string) *UploadPartCopyInput { s.CopySourceSSECustomerAlgorithm = &v return s }

func (s *UploadPartCopyInput) SetCopySourceSSECustomerKey(v string) *UploadPartCopyInput

SetCopySourceSSECustomerKey sets the CopySourceSSECustomerKey field’s value.



23058
23059
23060
23061
// File 'service/s3/api.go', line 23058

func (s *UploadPartCopyInput) SetCopySourceSSECustomerKey(v string) *UploadPartCopyInput { s.CopySourceSSECustomerKey = &v return s }

func (s *UploadPartCopyInput) SetCopySourceSSECustomerKeyMD5(v string) *UploadPartCopyInput

SetCopySourceSSECustomerKeyMD5 sets the CopySourceSSECustomerKeyMD5 field’s value.



23071
23072
23073
23074
// File 'service/s3/api.go', line 23071

func (s *UploadPartCopyInput) SetCopySourceSSECustomerKeyMD5(v string) *UploadPartCopyInput { s.CopySourceSSECustomerKeyMD5 = &v return s }

func (s *UploadPartCopyInput) SetExpectedBucketOwner(v string) *UploadPartCopyInput

SetExpectedBucketOwner sets the ExpectedBucketOwner field’s value.



23077
23078
23079
23080
// File 'service/s3/api.go', line 23077

func (s *UploadPartCopyInput) SetExpectedBucketOwner(v string) *UploadPartCopyInput { s.ExpectedBucketOwner = &v return s }

func (s *UploadPartCopyInput) SetExpectedSourceBucketOwner(v string) *UploadPartCopyInput

SetExpectedSourceBucketOwner sets the ExpectedSourceBucketOwner field’s value.



23083
23084
23085
23086
// File 'service/s3/api.go', line 23083

func (s *UploadPartCopyInput) SetExpectedSourceBucketOwner(v string) *UploadPartCopyInput { s.ExpectedSourceBucketOwner = &v return s }

func (s *UploadPartCopyInput) SetKey(v string) *UploadPartCopyInput

SetKey sets the Key field’s value.



23089
23090
23091
23092
// File 'service/s3/api.go', line 23089

func (s *UploadPartCopyInput) SetKey(v string) *UploadPartCopyInput { s.Key = &v return s }

func (s *UploadPartCopyInput) SetPartNumber(v int64) *UploadPartCopyInput

SetPartNumber sets the PartNumber field’s value.



23095
23096
23097
23098
// File 'service/s3/api.go', line 23095

func (s *UploadPartCopyInput) SetPartNumber(v int64) *UploadPartCopyInput { s.PartNumber = &v return s }

func (s *UploadPartCopyInput) SetRequestPayer(v string) *UploadPartCopyInput

SetRequestPayer sets the RequestPayer field’s value.



23101
23102
23103
23104
// File 'service/s3/api.go', line 23101

func (s *UploadPartCopyInput) SetRequestPayer(v string) *UploadPartCopyInput { s.RequestPayer = &v return s }

func (s *UploadPartCopyInput) SetSSECustomerAlgorithm(v string) *UploadPartCopyInput

SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field’s value.



23107
23108
23109
23110
// File 'service/s3/api.go', line 23107

func (s *UploadPartCopyInput) SetSSECustomerAlgorithm(v string) *UploadPartCopyInput { s.SSECustomerAlgorithm = &v return s }

func (s *UploadPartCopyInput) SetSSECustomerKey(v string) *UploadPartCopyInput

SetSSECustomerKey sets the SSECustomerKey field’s value.



23113
23114
23115
23116
// File 'service/s3/api.go', line 23113

func (s *UploadPartCopyInput) SetSSECustomerKey(v string) *UploadPartCopyInput { s.SSECustomerKey = &v return s }

func (s *UploadPartCopyInput) SetSSECustomerKeyMD5(v string) *UploadPartCopyInput

SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field’s value.



23126
23127
23128
23129
// File 'service/s3/api.go', line 23126

func (s *UploadPartCopyInput) SetSSECustomerKeyMD5(v string) *UploadPartCopyInput { s.SSECustomerKeyMD5 = &v return s }

func (s *UploadPartCopyInput) SetUploadId(v string) *UploadPartCopyInput

SetUploadId sets the UploadId field’s value.



23132
23133
23134
23135
// File 'service/s3/api.go', line 23132

func (s *UploadPartCopyInput) SetUploadId(v string) *UploadPartCopyInput { s.UploadId = &v return s }

func (s UploadPartCopyInput) String() string

String returns the string representation.

API parameter values that are decorated as “sensitive” in the API will not be included in the string output. The member name will be present, but the value will be replaced with “sensitive”.



22958
22959
22960
// File 'service/s3/api.go', line 22958

func (s UploadPartCopyInput) String() string { return awsutil.Prettify(s) }

func (s *UploadPartCopyInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.



22972
22973
22974
22975
22976
22977
22978
22979
22980
22981
22982
22983
22984
22985
22986
22987
22988
22989
22990
22991
22992
22993
22994
22995
22996
22997
22998
22999
23000
// File 'service/s3/api.go', line 22972

func (s *UploadPartCopyInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "UploadPartCopyInput"} if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } if s.Bucket != nil && len(*s.Bucket) < 1 { invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) } if s.CopySource == nil { invalidParams.Add(request.NewErrParamRequired("CopySource")) } if s.Key == nil { invalidParams.Add(request.NewErrParamRequired("Key")) } if s.Key != nil && len(*s.Key) < 1 { invalidParams.Add(request.NewErrParamMinLen("Key", 1)) } if s.PartNumber == nil { invalidParams.Add(request.NewErrParamRequired("PartNumber")) } if s.UploadId == nil { invalidParams.Add(request.NewErrParamRequired("UploadId")) } if invalidParams.Len() > 0 { return invalidParams } return nil }