Struct: s3.CompleteMultipartUploadInput

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"`

Name of the bucket to which the multipart upload was initiated.

Bucket is a required field

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

Ignored by COS.

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

MultipartUpload *CompletedMultipartUpload `locationName:"CompleteMultipartUpload" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`

The container for the multipart upload request information.

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.

RetentionExpirationDate *time.Time `location:"header" locationName:"Retention-Expiration-Date" type:"timestamp"`

Date on which it will be legal to delete or modify the object. This field can only be specified if Retention-Directive is REPLACE. You can only specify this or the Retention-Period header. If both are specified a 400 error will be returned. If neither is specified the bucket’s DefaultRetention period will be used.

RetentionLegalHoldId *string `location:"header" locationName:"Retention-Legal-Hold-ID" type:"string"`

A single legal hold to apply to the object. This field can only be specified if Retention-Directive is REPLACE. A legal hold is a character long string of max length 64. The object cannot be overwritten or deleted until all legal holds associated with the object are removed.

RetentionPeriod *int64 `location:"header" locationName:"Retention-Period" type:"integer"`

Retention period to store on the object in seconds. If this field and Retention-Expiration-Date are specified a 400 error is returned. If neither is specified the bucket’s DefaultRetention period will be used. 0 is a legal value assuming the bucket’s minimum retention period is also 0.

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

ID for the initiated multipart upload.

UploadId is a required field

_ struct{} `locationName:"CompleteMultipartUploadRequest" type:"structure" payload:"MultipartUpload"`

Method Details

func (s CompleteMultipartUploadInput) 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”.



8103
8104
8105
// File 'service/s3/api.go', line 8103

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

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

SetBucket sets the Bucket field’s value.



8133
8134
8135
8136
// File 'service/s3/api.go', line 8133

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

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

SetExpectedBucketOwner sets the ExpectedBucketOwner field’s value.



8146
8147
8148
8149
// File 'service/s3/api.go', line 8146

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

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

SetKey sets the Key field’s value.



8152
8153
8154
8155
// File 'service/s3/api.go', line 8152

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

func (s *CompleteMultipartUploadInput) SetMultipartUpload(v *CompletedMultipartUpload) *CompleteMultipartUploadInput

SetMultipartUpload sets the MultipartUpload field’s value.



8158
8159
8160
8161
// File 'service/s3/api.go', line 8158

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

SetRequestPayer sets the RequestPayer field’s value.



8164
8165
8166
8167
// File 'service/s3/api.go', line 8164

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

func (s *CompleteMultipartUploadInput) SetRetentionExpirationDate(v time.Time) *CompleteMultipartUploadInput

SetRetentionExpirationDate sets the RetentionExpirationDate field’s value.



8170
8171
8172
8173
// File 'service/s3/api.go', line 8170

func (s *CompleteMultipartUploadInput) SetRetentionExpirationDate(v time.Time) *CompleteMultipartUploadInput { s.RetentionExpirationDate = &v return s }

func (s *CompleteMultipartUploadInput) SetRetentionLegalHoldId(v string) *CompleteMultipartUploadInput

SetRetentionLegalHoldId sets the RetentionLegalHoldId field’s value.



8176
8177
8178
8179
// File 'service/s3/api.go', line 8176

func (s *CompleteMultipartUploadInput) SetRetentionLegalHoldId(v string) *CompleteMultipartUploadInput { s.RetentionLegalHoldId = &v return s }

func (s *CompleteMultipartUploadInput) SetRetentionPeriod(v int64) *CompleteMultipartUploadInput

SetRetentionPeriod sets the RetentionPeriod field’s value.



8182
8183
8184
8185
// File 'service/s3/api.go', line 8182

func (s *CompleteMultipartUploadInput) SetRetentionPeriod(v int64) *CompleteMultipartUploadInput { s.RetentionPeriod = &v return s }

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

SetUploadId sets the UploadId field’s value.



8188
8189
8190
8191
// File 'service/s3/api.go', line 8188

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

func (s CompleteMultipartUploadInput) 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”.



8094
8095
8096
// File 'service/s3/api.go', line 8094

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

func (s *CompleteMultipartUploadInput) Validate() error

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



8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
// File 'service/s3/api.go', line 8108

func (s *CompleteMultipartUploadInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CompleteMultipartUploadInput"} 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.Key == nil { invalidParams.Add(request.NewErrParamRequired("Key")) } if s.Key != nil && len(*s.Key) < 1 { invalidParams.Add(request.NewErrParamMinLen("Key", 1)) } if s.UploadId == nil { invalidParams.Add(request.NewErrParamRequired("UploadId")) } if invalidParams.Len() > 0 { return invalidParams } return nil }