/// <summary> /// Aborts the multipart uploads that were initiated before the specified date. /// </summary> /// <param name="bucketName"> /// The name of the bucket containing multipart uploads. /// </param> /// <param name="initiatedDate"> /// The date before which the multipart uploads were initiated. /// </param> public void AbortMultipartUploads(string bucketName, DateTime initiatedDate) { BaseCommand command = new AbortMultipartUploadsCommand(this._s3Client, bucketName, initiatedDate); command.Execute(); }
/// <summary> /// Initiates the asynchronous execution of the AbortMultipartUploads operation. /// <seealso cref="M:Amazon.S3.Transfer.TransferUtility.AbortMultipartUploads"/> /// </summary> /// <param name="bucketName"> /// The name of the bucket containing multipart uploads. /// </param> /// <param name="initiatedDate"> /// The date before which the multipart uploads were initiated. /// </param> /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param> /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback procedure using the AsyncState property.</param> /// <exception cref="T:System.ArgumentNullException"></exception> /// <exception cref="T:System.Net.WebException"></exception> /// <exception cref="T:Amazon.S3.AmazonS3Exception"></exception> /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; /// this value is also needed when invoking EndAbortMultipartUploads.</returns> public IAsyncResult BeginAbortMultipartUploads(string bucketName, DateTime initiatedDate, AsyncCallback callback, object state) { BaseCommand command = new AbortMultipartUploadsCommand(this._s3Client, bucketName, initiatedDate); return beginOperation(command, callback, state); }
/// <summary> /// Aborts the multipart uploads that were initiated before the specified date. /// </summary> /// <param name="bucketName"> /// The name of the bucket containing multipart uploads. /// </param> /// <param name="initiatedDate"> /// The date before which the multipart uploads were initiated. /// </param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// <returns>The task object representing the asynchronous operation.</returns> public Task AbortMultipartUploadsAsync(string bucketName, DateTime initiatedDate, CancellationToken cancellationToken = default(CancellationToken)) { var command = new AbortMultipartUploadsCommand(this._s3Client, bucketName, initiatedDate, this._config); return command.ExecuteAsync(cancellationToken); }