Use DeleteBucketCors
with an AWS SDK or CLI
The following code examples show how to use DeleteBucketCors
.
- AWS SDK for .NET
-
Note
There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository
. /// <summary> /// Deletes a CORS configuration from an Amazon S3 bucket. /// </summary> /// <param name="client">The initialized Amazon S3 client object used /// to delete the CORS configuration from the bucket.</param> private static async Task DeleteCORSConfigurationAsync(AmazonS3Client client) { DeleteCORSConfigurationRequest request = new DeleteCORSConfigurationRequest() { BucketName = BucketName, }; await client.DeleteCORSConfigurationAsync(request); }
-
For API details, see DeleteBucketCors in AWS SDK for .NET API Reference.
-
For a complete list of AWS SDK developer guides and code examples, see Developing with Amazon S3 using the AWS SDKs. This topic also includes information about getting started and details about previous SDK versions.