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
Name | Location | Type | Required | Sample value | Description |
---|---|---|---|---|---|
CORSConfiguration | BODY | container | No | No sample value for this parameter. | CORS rule container for bucket. |
AllowedMethod | BODY | enumeration string | No | No sample value for this parameter. | allowed cross-domain request method. optional values: GET, PUT, DELETE, POST, HEAD |
MaxAgeSeconds | BODY | integer | No | No 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. |
regionId | BODY | string | Yes | No sample value for this parameter. | region id |
CORSRule | BODY | container | No | No sample value for this parameter. | container for CORS rules. Each bucket allows up to 10 rules. |
ExposeHeader | BODY | string | No | No sample value for this parameter. | response header (such as a Javascript XMLHttpRequest object) that allows users to access from the application. |
AllowedOrigin | BODY | string | No | No sample value for this parameter. | Allowed sources of cross-domain requests. An asterisk (*) indicates that cross-domain requests from all sources are allowed. |
AllowedHeader | BODY | string | No | No 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. |
version | BODY | string | No | 2016-01-01 | version of api |
Return data
Name | Type | Sample value | Description |
---|---|---|---|
RequestID | string | 1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DC | Request id |
Example
Successful Response example
{
"RequestID":"1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DC"
}
Failed Response example
{
"errorSample":
{
"resultCode":-1,
"resultMsg":"system error",
"result":null
}
}