public DeleteObjectsResponse DeleteObjects(DeleteObjectsRequest request) { var marshaller = new DeleteObjectsRequestMarshaller(); var unmarshaller = DeleteObjectsResponseUnmarshaller.Instance; return Invoke<DeleteObjectsRequest,DeleteObjectsResponse>(request, marshaller, unmarshaller); }
/// <summary>AWS S3 여러 객체 삭제</summary> public DeleteObjectsResponse DeleteObjectList(List<string> pKeyList) { try { using (AmazonS3Client client = new AmazonS3Client()) { DeleteObjectsRequest multiObjectDeleteRequest = new DeleteObjectsRequest(); multiObjectDeleteRequest.BucketName = strAwsBucketName; foreach (string key in pKeyList) { multiObjectDeleteRequest.AddKey(key); } DeleteObjectsResponse response = client.DeleteObjects(multiObjectDeleteRequest); //response.DeleteErrors.Count = 실패한 삭제 객체 //response.DeletedObjects.Count = 성공한 삭제 객체 //.Key, .Code, .Message로 정보 확인 가능. return response; } } catch (AmazonS3Exception amazonS3Exception) { throw amazonS3Exception; } }