Yaron Levi
Yaron Levi

Reputation: 13079

Amazon S3 .net SDK - Delete multiple objects in one request

According to the official guide in amazon's website I should be able to do something like that:

DeleteObjectsRequest multiObjectDeleteRequest = new DeleteObjectsRequest();
multiObjectDeleteRequest.BucketName = bucketName;

multiObjectDeleteRequest.AddKey("<object Key>", null); // version ID is null.
multiObjectDeleteRequest.AddKey("<object Key>", null);
multiObjectDeleteRequest.AddKey("<object Key>", null);

But in my code multiObjectDeleteRequest dose not have the AddKey() method. It only has the a single Key property.

I am using the latest SDK.

Where is the AddKey() method gone ?

Upvotes: 2

Views: 1299

Answers (1)

Yaron Levi
Yaron Levi

Reputation: 13079

My bad... I was using DeleteObjectRequest instead of DeleteObjectsRequest.

Upvotes: 1

Related Questions