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



22439
22440
22441
// File 'service/s3/api.go', line 22439

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

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

SetBucket sets the Bucket field's value.



22475
22476
22477
22478
// File 'service/s3/api.go', line 22475

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.



22488
22489
22490
22491
// File 'service/s3/api.go', line 22488

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.



22494
22495
22496
22497
// File 'service/s3/api.go', line 22494

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.



22500
22501
22502
22503
// File 'service/s3/api.go', line 22500

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.



22506
22507
22508
22509
// File 'service/s3/api.go', line 22506

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.



22512
22513
22514
22515
// File 'service/s3/api.go', line 22512

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.



22518
22519
22520
22521
// File 'service/s3/api.go', line 22518

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.



22524
22525
22526
22527
// File 'service/s3/api.go', line 22524

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.



22530
22531
22532
22533
// File 'service/s3/api.go', line 22530

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.



22543
22544
22545
22546
// File 'service/s3/api.go', line 22543

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.



22549
22550
22551
22552
// File 'service/s3/api.go', line 22549

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.



22555
22556
22557
22558
// File 'service/s3/api.go', line 22555

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.



22561
22562
22563
22564
// File 'service/s3/api.go', line 22561

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.



22567
22568
22569
22570
// File 'service/s3/api.go', line 22567

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.



22573
22574
22575
22576
// File 'service/s3/api.go', line 22573

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.



22579
22580
22581
22582
// File 'service/s3/api.go', line 22579

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.



22585
22586
22587
22588
// File 'service/s3/api.go', line 22585

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.



22598
22599
22600
22601
// File 'service/s3/api.go', line 22598

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.



22604
22605
22606
22607
// File 'service/s3/api.go', line 22604

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



22430
22431
22432
// File 'service/s3/api.go', line 22430

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.



22444
22445
22446
22447
22448
22449
22450
22451
22452
22453
22454
22455
22456
22457
22458
22459
22460
22461
22462
22463
22464
22465
22466
22467
22468
22469
22470
22471
22472
// File 'service/s3/api.go', line 22444

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 }