コード例 #1
0
 /// <summary>
 /// This method removes the Lifecycle configuration from the named
 /// S3 bucket.
 /// </summary>
 /// <param name="client">The S3 client object used to call
 /// the RemoveLifecycleConfigAsync method.</param>
 /// <param name="bucketName">A string representing the name of the
 /// S3 bucket from which the configuration will be removed.</param>
 public static async Task RemoveLifecycleConfigAsync(IAmazonS3 client, string bucketName)
 {
     var request = new DeleteLifecycleConfigurationRequest()
     {
         BucketName = bucketName,
     };
     await client.DeleteLifecycleConfigurationAsync(request);
 }
コード例 #2
0
 static async Task RemoveLifecycleConfigAsync(IAmazonS3 client)
 {
     DeleteLifecycleConfigurationRequest request = new DeleteLifecycleConfigurationRequest
     {
         BucketName = bucketName
     };
     await client.DeleteLifecycleConfigurationAsync(request);
 }
 private Amazon.S3.Model.DeleteLifecycleConfigurationResponse CallAWSServiceOperation(IAmazonS3 client, Amazon.S3.Model.DeleteLifecycleConfigurationRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Simple Storage Service (S3)", "DeleteLifecycleConfiguration");
     try
     {
         #if DESKTOP
         return(client.DeleteLifecycleConfiguration(request));
         #elif CORECLR
         return(client.DeleteLifecycleConfigurationAsync(request).GetAwaiter().GetResult());
         #else
                 #error "Unknown build edition"
         #endif
     }
     catch (AmazonServiceException exc)
     {
         var webException = exc.InnerException as System.Net.WebException;
         if (webException != null)
         {
             throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException);
         }
         throw;
     }
 }