コード例 #1
0
ファイル: CORSTest.cs プロジェクト: sivajiitla/aws_code
 static async Task DeleteCORSConfigurationAsync()
 {
     DeleteCORSConfigurationRequest request = new DeleteCORSConfigurationRequest
     {
         BucketName = bucketName
     };
     await s3Client.DeleteCORSConfigurationAsync(request);
 }
コード例 #2
0
 private Amazon.S3.Model.DeleteCORSConfigurationResponse CallAWSServiceOperation(IAmazonS3 client, Amazon.S3.Model.DeleteCORSConfigurationRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Simple Storage Service (S3)", "DeleteCORSConfiguration");
     try
     {
         #if DESKTOP
         return(client.DeleteCORSConfiguration(request));
         #elif CORECLR
         return(client.DeleteCORSConfigurationAsync(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;
     }
 }