Struct: s3.DeleteObjectInput

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 of the bucket containing the object.

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

BypassGovernanceRetention *bool `location:"header" locationName:"x-amz-bypass-governance-retention" type:"boolean"`

Indicates whether S3 Object Lock should bypass Governance-mode restrictions to process this operation.

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

Key name of the object to delete.

Key is a required field

MFA *string `location:"header" locationName:"x-amz-mfa" type:"string"`

The concatenation of the authentication device's serial number, a space, and the value that is displayed on your authentication device. Required to permanently delete a versioned object if versioning is configured with MFA delete enabled.

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.

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

VersionId used to reference a specific version of the object.

_ struct{} `locationName:"DeleteObjectRequest" type:"structure"`

Method Details

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



10668
10669
10670
// File 'service/s3/api.go', line 10668

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

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

SetBucket sets the Bucket field's value.



10695
10696
10697
10698
// File 'service/s3/api.go', line 10695

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

func (s *DeleteObjectInput) SetBypassGovernanceRetention(v bool) *DeleteObjectInput

SetBypassGovernanceRetention sets the BypassGovernanceRetention field's value.



10708
10709
10710
10711
// File 'service/s3/api.go', line 10708

func (s *DeleteObjectInput) SetBypassGovernanceRetention(v bool) *DeleteObjectInput { s.BypassGovernanceRetention = &v return s }

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

SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.



10714
10715
10716
10717
// File 'service/s3/api.go', line 10714

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

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

SetKey sets the Key field's value.



10720
10721
10722
10723
// File 'service/s3/api.go', line 10720

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

func (s *DeleteObjectInput) SetMFA(v string) *DeleteObjectInput

SetMFA sets the MFA field's value.



10726
10727
10728
10729
// File 'service/s3/api.go', line 10726

func (s *DeleteObjectInput) SetMFA(v string) *DeleteObjectInput { s.MFA = &v return s }

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

SetRequestPayer sets the RequestPayer field's value.



10732
10733
10734
10735
// File 'service/s3/api.go', line 10732

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

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

SetVersionId sets the VersionId field's value.



10738
10739
10740
10741
// File 'service/s3/api.go', line 10738

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

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



10659
10660
10661
// File 'service/s3/api.go', line 10659

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

func (s *DeleteObjectInput) Validate() error

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



10673
10674
10675
10676
10677
10678
10679
10680
10681
10682
10683
10684
10685
10686
10687
10688
10689
10690
10691
10692
// File 'service/s3/api.go', line 10673

func (s *DeleteObjectInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DeleteObjectInput"} 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 invalidParams.Len() > 0 { return invalidParams } return nil }