Struct: s3.RestoreObjectInput

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

Implemented Interfaces

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

Structure Field Summary collapse

Service Operations collapse

Request Methods

SetRestoreRequest

Structure Field Details

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

The bucket name containing the object to restore.

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

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 action was initiated.

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

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

Container for restore job parameters.

VersionId *string `location:"querystring" locationName:"versionId" type:"string"`

VersionId used to reference a specific version of the object.

_ struct{} `locationName:"RestoreObjectRequest" type:"structure" payload:"RestoreRequest"`

Method Details

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



21819
21820
21821
// File 'service/s3/api.go', line 21819

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

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

SetBucket sets the Bucket field's value.



21851
21852
21853
21854
// File 'service/s3/api.go', line 21851

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

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

SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.



21864
21865
21866
21867
// File 'service/s3/api.go', line 21864

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

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

SetKey sets the Key field's value.



21870
21871
21872
21873
// File 'service/s3/api.go', line 21870

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

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

SetRequestPayer sets the RequestPayer field's value.



21876
21877
21878
21879
// File 'service/s3/api.go', line 21876

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

func (s *RestoreObjectInput) SetRestoreRequest(v *RestoreRequest) *RestoreObjectInput

Note:

You must call the Send() method on the returned request object in order to execute the request.

SetRestoreRequest generates a request.Request object representing the client request for the SetRestore() operation. The output return value can be used to capture response data after Request.Send() is called.

Creating a request object using this method should be used when you want to inject custom logic into the request lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the service operation method directly instead.

Examples:

Sending a request using the SetRestoreRequest() method

req, resp := client.SetRestoreRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }


21882
21883
21884
21885
// File 'service/s3/api.go', line 21882

func (s *RestoreObjectInput) SetRestoreRequest(v *RestoreRequest) *RestoreObjectInput { s.RestoreRequest = v return s }

func (s *RestoreObjectInput) SetVersionId(v string) *RestoreObjectInput

SetVersionId sets the VersionId field's value.



21888
21889
21890
21891
// File 'service/s3/api.go', line 21888

func (s *RestoreObjectInput) SetVersionId(v string) *RestoreObjectInput { s.VersionId = &v return s }

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



21810
21811
21812
// File 'service/s3/api.go', line 21810

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

func (s *RestoreObjectInput) Validate() error

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



21824
21825
21826
21827
21828
21829
21830
21831
21832
21833
21834
21835
21836
21837
21838
21839
21840
21841
21842
21843
21844
21845
21846
21847
21848
// File 'service/s3/api.go', line 21824

func (s *RestoreObjectInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "RestoreObjectInput"} 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.RestoreRequest != nil { if err := s.RestoreRequest.Validate(); err != nil { invalidParams.AddNested("RestoreRequest", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil }