All Products
Search
Document Center

Object Storage Service:Query CORS rules

Last Updated:Jul 31, 2024

Queries the cross-origin resource sharing (CORS) rules of a bucket.

Syntax

ossutil api get-bucket-cors --bucket value [flags]

Parameter

Type

Description

--bucket

string

The name of the bucket whose CORS rules you want to query.

Note

For more information, see Command-line options.

Examples

  • Query the CORS configurations of a bucket named examplebucket:

    ossutil api get-bucket-cors --bucket examplebucket
  • Query the CORS configurations of a bucket named examplebucket and display the response in the JSON format:

    ossutil api get-bucket-cors --bucket examplebucket --output-format json