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



22202
22203
22204
// File 'service/s3/api.go', line 22202

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

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

SetBucket sets the Bucket field's value.



22238
22239
22240
22241
// File 'service/s3/api.go', line 22238

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.



22251
22252
22253
22254
// File 'service/s3/api.go', line 22251

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.



22257
22258
22259
22260
// File 'service/s3/api.go', line 22257

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.



22263
22264
22265
22266
// File 'service/s3/api.go', line 22263

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.



22269
22270
22271
22272
// File 'service/s3/api.go', line 22269

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.



22275
22276
22277
22278
// File 'service/s3/api.go', line 22275

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.



22281
22282
22283
22284
// File 'service/s3/api.go', line 22281

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.



22287
22288
22289
22290
// File 'service/s3/api.go', line 22287

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.



22293
22294
22295
22296
// File 'service/s3/api.go', line 22293

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.



22306
22307
22308
22309
// File 'service/s3/api.go', line 22306

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.



22312
22313
22314
22315
// File 'service/s3/api.go', line 22312

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.



22318
22319
22320
22321
// File 'service/s3/api.go', line 22318

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.



22324
22325
22326
22327
// File 'service/s3/api.go', line 22324

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.



22330
22331
22332
22333
// File 'service/s3/api.go', line 22330

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.



22336
22337
22338
22339
// File 'service/s3/api.go', line 22336

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.



22342
22343
22344
22345
// File 'service/s3/api.go', line 22342

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.



22348
22349
22350
22351
// File 'service/s3/api.go', line 22348

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.



22361
22362
22363
22364
// File 'service/s3/api.go', line 22361

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.



22367
22368
22369
22370
// File 'service/s3/api.go', line 22367

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



22193
22194
22195
// File 'service/s3/api.go', line 22193

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.



22207
22208
22209
22210
22211
22212
22213
22214
22215
22216
22217
22218
22219
22220
22221
22222
22223
22224
22225
22226
22227
22228
22229
22230
22231
22232
22233
22234
22235
// File 'service/s3/api.go', line 22207

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 }