修改网关路由跨域策略。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
mse:UpdateGatewayRouteCORS |
update |
*Gateway
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| Id |
integer |
是 |
关联记录 ID。 |
55 |
| GatewayId |
integer |
否 |
网关 ID。 |
85 |
| CorsJSON |
object |
否 |
跨域信息。 |
|
| Status |
string |
否 |
开启状态。 |
off |
| AllowOrigins |
string |
否 |
允许的域。 |
https://api.aliyun-inc.com/ |
| AllowMethods |
string |
否 |
允许的方法。 |
GET,POST |
| AllowHeaders |
string |
否 |
允许的 Header。 |
content-type |
| ExposeHeaders |
string |
否 |
允许的响应头部。 |
* |
| TimeUnit |
string |
否 |
时间单位。 |
h |
| UnitNum |
integer |
否 |
时间数。 |
24 |
| AllowCredentials |
boolean |
否 |
允许携带凭证。 |
true |
| GatewayUniqueId |
string |
是 |
网关唯一标识 ID。 |
gw-f70a6ddf2f0941a2bb997b2d16028f37 |
| AcceptLanguage |
string |
否 |
参照国际标准 RFC7231 ,后端服务需要按用户语言要求返回结果
|
zh |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
Schema of Response |
||
| RequestId |
string |
Id of the request |
41BE990E-44E4-5ED3-AEEB-A276941B1854 |
| HttpStatusCode |
integer |
HTTP 返回码。 |
200 |
| Message |
string |
报错信息。 |
You are not authorized to perform this operation. |
| Code |
integer |
返回码。 |
200 |
| Success |
boolean |
请求结果,取值如下:
|
true |
| Data |
integer |
数据结构。 |
618 |
示例
正常返回示例
JSON格式
{
"RequestId": "41BE990E-44E4-5ED3-AEEB-A276941B1854",
"HttpStatusCode": 200,
"Message": "You are not authorized to perform this operation. ",
"Code": 200,
"Success": true,
"Data": 618
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | IllegalRequest | Invalid request:%s | 非法请求: %s |
| 400 | InvalidParameter | Parameter error:%s | 请求参数错误:%s |
| 500 | InternalError | Console error. Try again later:%s | 控制台错误.稍后重试:%s |
| 403 | NoPermission | You are not authorized to perform this operation:%s | 没有权限使用此接口:%s |
| 404 | NotFound | Not found:%s | 资源不存在:%s |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。