Jump to Content

New API Documentation - Developer Preview Available

We are excited to announce the developer preview of our new API documentation for AWS SDK for JavaScript v3. Please follow instructions on the landing page to leave us your feedback.

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.

The following operations are related to DeleteBucketCors:

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 input = { // DeleteBucketCorsRequest
Bucket: "STRING_VALUE", // required
ExpectedBucketOwner: "STRING_VALUE",
};
const command = new DeleteBucketCorsCommand(input);
const response = await client.send(command);
// {};

Param

DeleteBucketCorsCommandInput

Returns

DeleteBucketCorsCommandOutput

See

Throws

S3ServiceException

Base exception class for all service exceptions from S3 service.

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