public DeleteObjectAsync ( |
||
request | Container for the necessary parameters to execute the DeleteObject operation. | |
cancellationToken | System | /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// |
return | Task |
public Task<DeleteObjectResponse> DeleteObjectAsync(DeleteObjectRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var marshaller = new DeleteObjectRequestMarshaller();
var unmarshaller = DeleteObjectResponseUnmarshaller.Instance;
return InvokeAsync<DeleteObjectRequest,DeleteObjectResponse>(request, marshaller,
unmarshaller, cancellationToken);
}
AmazonS3Client::DeleteObjectAsync ( string bucketName, string key, System cancellationToken = default(CancellationToken) ) : Task |
|
AmazonS3Client::DeleteObjectAsync ( string bucketName, string key, string versionId, System cancellationToken = default(CancellationToken) ) : Task |
|
AmazonS3Client::DeleteObjectAsync ( |
|
AmazonS3Client::DeleteObjectAsync ( string bucketName, string key, DeleteObjectResponse>.AmazonServiceCallback |
|
AmazonS3Client::DeleteObjectAsync ( string bucketName, string key, string versionId, DeleteObjectResponse>.AmazonServiceCallback |
public static async System.Threading.Tasks.Task <bool> Delete(this string fileNameGuid, string _awsAccessKey, string _awsSecretKey, string _bucketName) { IAmazonS3 client; var s3Client = RegionEndpoint.USEast1; try { using (client = new Amazon.S3.AmazonS3Client(_awsAccessKey, _awsSecretKey, s3Client)) { DeleteObjectRequest request = new DeleteObjectRequest() { BucketName = _bucketName, Key = fileNameGuid, }; await client.DeleteObjectAsync(request); client.Dispose(); } } catch (Exception exception) { Logging.Log("Upload Documents failure", "S3 File upload Extension Method", exception); return(false); } return(true); }