DeleteBucketCors - Amazon Simple Storage Service

DeleteBucketCors

Note

This operation is not supported by directory buckets.

Deletes the cors configuration information set for the bucket.

To use this operation, you must have permission to perform the s3:PutBucketCORS action. The bucket owner has this permission by default and can grant this permission to others.

For information about cors, see Enabling Cross-Origin Resource Sharing in the Amazon S3 User Guide.

Related Resources

Request Syntax

DELETE /?cors HTTP/1.1 Host: Bucket.s3.amazonaws.com x-amz-expected-bucket-owner: ExpectedBucketOwner

URI Request Parameters

The request uses the following URI parameters.

Bucket

Specifies the bucket whose cors configuration is being deleted.

Required: Yes

x-amz-expected-bucket-owner

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 204

Response Elements

If the action is successful, the service sends back an HTTP 204 response with an empty HTTP body.

Examples

Retrieve cors subresource

The following DELETE request deletes the cors subresource from the specified bucket. This action removes cors configuration that is stored in the subresource.

Sample Request

This example illustrates one usage of DeleteBucketCors.

DELETE /?cors HTTP/1.1 Host: examplebucket.s3.<Region>.amazonaws.com Date: Tue, 13 Dec 2011 19:14:42 GMT Authorization: signatureValue

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: