Skip to main content

GetBucketcors

Description

GetBucketcors operation is used to obtain the current CORS rule of the specified Bucket.

Request Method

POST

Request Path

/apsara/route/OneRouter/GetBucketcors

Request Parameters Common Parameters

NameLocationTypeRequiredSample valueDescription
CORSConfigurationBODYcontainerNoNo sample value for this parameter.CORS rule container for bucket.
AllowedMethodBODYenumeration stringNoNo sample value for this parameter.allowed cross-domain request method. optional values: GET, PUT, DELETE, POST, HEAD
MaxAgeSecondsBODYintegerNoNo sample value for this parameter.the cache time when the browser returns the result of a prefetch (OPTIONS) request for a specific resource. At most one MaxAgeSeconds is allowed in a CORS rule.
regionIdBODYstringYesNo sample value for this parameter.region id
CORSRuleBODYcontainerNoNo sample value for this parameter.container for CORS rules. Each bucket allows up to 10 rules.
ExposeHeaderBODYstringNoNo sample value for this parameter.response header (such as a Javascript XMLHttpRequest object) that allows users to access from the application.
AllowedOriginBODYstringNoNo sample value for this parameter.Allowed sources of cross-domain requests. An asterisk (*) indicates that cross-domain requests from all sources are allowed.
AllowedHeaderBODYstringNoNo sample value for this parameter.controls whether Access-Control-Request-Headers specified header is allowed in OPTIONS prefetch instruction. Each header specified in the Access-Control-Request-Headers has a corresponding item in the AllowedHeader.
versionBODYstringNo2016-01-01version of api

Return data

NameTypeSample valueDescription
RequestIDstring1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DCRequest id

Example

Successful Response example

{
"RequestID":"1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DC"
}

Failed Response example

{
"errorSample":
{
"resultCode":-1,
"resultMsg":"system error",
"result":null
}

}