Class DeleteObjectsRequest
Container for the parameters to the DeleteObjects operation.
This operation enables you to delete multiple objects from a bucket using a single HTTP request. You may specify up to 1000 keys.
public class DeleteObjectsRequest : AmazonWebServiceRequest
- Inheritance
-
DeleteObjectsRequest
Constructors
DeleteObjectsRequest()
public DeleteObjectsRequest()
Properties
BucketName
The bucket name containing the objects to delete.
When using this API 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 operation using an access point through the AWS SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using Access Points in the Amazon Simple Storage Service Developer Guide.
When using this API 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 using this operation using S3 on Outposts through the AWS SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using S3 on Outposts in the Amazon Simple Storage Service Developer Guide.
public string BucketName { get; set; }
Property Value
BypassGovernanceRetention
Gets and sets the property BypassGovernanceRetention.
Specifies whether you want to delete this object even if it has a Governance-type Object Lock in place. You must have sufficient permissions to perform this operation.
public bool BypassGovernanceRetention { get; set; }
Property Value
ExpectedBucketOwner
The account id of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.
public string ExpectedBucketOwner { get; set; }
Property Value
MfaCodes
The MfaCodes Tuple associates the Serial Number and the current Token/Code displayed on the Multi-Factor Authentication device associated with your AWS Account.
public MfaCodes MfaCodes { get; set; }
Property Value
Remarks
This is a required property for this request if:
- EnableMfaDelete was configured on the bucket
containing this object's version.
- You are deleting an object's version
Objects
List of object keys to delete.
public List<KeyVersion> Objects { get; set; }
Property Value
Quiet
Toggles between Quiet and Verbose mode for the operation. If set to true (Quiet mode), the response includes only those keys for objects on which the delete operation failed.
public bool Quiet { get; set; }
Property Value
Remarks
By default this property is false and keys for both successful deletes and failures are returned in the response.
RequestPayer
Confirms that the requester knows that she or he will be charged for the list objects request. Bucket owners need not specify this parameter in their requests.
public RequestPayer RequestPayer { get; set; }
Property Value
Methods
AddKey(string)
Add a key to the set of keys of objects to be deleted.
public void AddKey(string key)
Parameters
key
stringObject key
AddKey(string, string)
Add a key and a version to be deleted.
public void AddKey(string key, string version)