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



22971
22972
22973
// File 'service/s3/api.go', line 22971

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

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

SetBucket sets the Bucket field’s value.



23007
23008
23009
23010
// File 'service/s3/api.go', line 23007

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.



23020
23021
23022
23023
// File 'service/s3/api.go', line 23020

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.



23026
23027
23028
23029
// File 'service/s3/api.go', line 23026

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.



23032
23033
23034
23035
// File 'service/s3/api.go', line 23032

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.



23038
23039
23040
23041
// File 'service/s3/api.go', line 23038

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.



23044
23045
23046
23047
// File 'service/s3/api.go', line 23044

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.



23050
23051
23052
23053
// File 'service/s3/api.go', line 23050

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.



23056
23057
23058
23059
// File 'service/s3/api.go', line 23056

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.



23062
23063
23064
23065
// File 'service/s3/api.go', line 23062

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.



23075
23076
23077
23078
// File 'service/s3/api.go', line 23075

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.



23081
23082
23083
23084
// File 'service/s3/api.go', line 23081

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.



23087
23088
23089
23090
// File 'service/s3/api.go', line 23087

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.



23093
23094
23095
23096
// File 'service/s3/api.go', line 23093

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.



23099
23100
23101
23102
// File 'service/s3/api.go', line 23099

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.



23105
23106
23107
23108
// File 'service/s3/api.go', line 23105

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.



23111
23112
23113
23114
// File 'service/s3/api.go', line 23111

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.



23117
23118
23119
23120
// File 'service/s3/api.go', line 23117

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.



23130
23131
23132
23133
// File 'service/s3/api.go', line 23130

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.



23136
23137
23138
23139
// File 'service/s3/api.go', line 23136

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



22962
22963
22964
// File 'service/s3/api.go', line 22962

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.



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
23001
23002
23003
23004
// File 'service/s3/api.go', line 22976

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 }