Jump to Content

Class DeleteBucketCorsCommandProtected

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:

Example

Use a bare-bones client and the command you need to make an API call.

import { S3Client, DeleteBucketCorsCommand } from "@aws-sdk/client-s3"; // ES Modules import
// const { S3Client, DeleteBucketCorsCommand } = require("@aws-sdk/client-s3"); // CommonJS import
const client = new S3Client(config);
const command = new DeleteBucketCorsCommand(input);
const response = await client.send(command);

Param

DeleteBucketCorsCommandInput

Returns

DeleteBucketCorsCommandOutput

See

Example

To delete cors configuration on a bucket.

// The following example deletes CORS configuration on a bucket.
const input = {
"Bucket": "examplebucket"
};
const command = new DeleteBucketCorsCommand(input);
await client.send(command);
// example id: to-delete-cors-configuration-on-a-bucket-1483042856112

Hierarchy

Constructors

Properties

Methods