检测到您已登录华为云国际站账号,为了您更好的体验,建议您访问国际站服务网站 https://www.huaweicloud.com/intl/zh-cn
不再显示此消息
暂不支持导入API的负载通道。 导入API设计文件 进入API网关控制台页面。 根据实际业务在左侧导航栏上方选择实例。 支持通过以下路径导入API。 在左侧导航栏选择“API管理 > API分组”。单击“创建API分组 > 导入API设计文件”。 在左侧导航栏选择“API管理 > API列表”。单击“导入API”。
APIG的API设计文件扩展定义 x-apigateway-auth-type x-apigateway-request-type x-apigateway-match-mode x-apigateway-cors x-apigateway-is-send-fg-body-base64
xxxxxxxx 表1 参数说明 参数 是否必选 类型 说明 type 是 String 特殊流控策略类型,支持APP、USER。 limit 是 Number API的访问次数。 instance 是 String 特殊APP或USER的对象标识。 父主题: APIG的API设计文件扩展定义
special: - type: USER limit: 100 instance: xxxxxxx 表1 参数说明 参数 是否必选 类型 说明 api-limit 是 Number API访问次数限制。 user-limit 否 Number
paths: '/path': get: x-apigateway-request-type: 'public' 表1 参数说明 参数 是否必选 类型 说明 x-apigateway-request-type 是 String API类型,支持public和private。
name: test in: query required: true 父主题: APIG的API设计文件扩展定义
description: "any response" 表1 参数说明 参数 是否必选 类型 说明 x-apigateway-any-method 否 String API请求方法。 父主题: APIG的API设计文件扩展定义
x-apigateway-ratelimit: 'customRatelimitName' 表1 参数说明 参数 是否必选 类型 说明 x-apigateway-ratelimit 否 String 流控策略。 父主题: APIG的API设计文件扩展定义
special: - type: APP limit: 100 instance: xxxxxxxxx 表1 参数说明 参数 是否必选 类型 说明 customRatelimitName 否 x-apigateway-ratelimits.policy
x-apigateway-plugins: ['Plugin_mock'] 表1 参数说明 参数 是否必选 类型 说明 x-apigateway-plugins 否 Array API所绑定的插件名列表。 父主题: APIG的API设计文件扩展定义
0) 示例: paths: '/path': get: x-apigateway-match-mode: 'SWA' 表1 参数说明 参数 是否必选 类型 说明 x-apigateway-match-mode 是 String API匹配模式,支持SWA和NORMAL。
x-apigateway-orchestrations 含义: API请求参数的编排规则列表。 作用域: Operation Object(2.0)/Operation Object(3.0) 示例: paths: /: get: parameters:
Object(3.0) 示例: paths: '/path': get: x-apigateway-cors: true 表1 参数说明 参数 是否必选 类型 说明 x-apigateway-cors 是 boolean 是否支持开启跨域请求的标识。 true:支持。
name: unused type: apiKey x-apigateway-auth-type: IAM 表1 参数说明 参数 是否必选 类型 说明 x-apigateway-auth-type 是 String API网关认证方式,支持AppSigv1、IAM。
name: unused type: apiKey x-apigateway-auth-type: IAM 表1 参数说明 参数 是否必选 类型 说明 appcode-auth-type 否 String AppCode简易认证类型,默认为disable。
BACKEND:后端 表2 Identity 参数 是否必选 类型 说明 name 是 String 参数名称。 location 是 String 参数位置。 validation 否 String 参数校验表达式,默认为null,不做校验。 父主题: APIG的API设计文件扩展定义
"header" origin: "CONSTANT" description: "调用者" 表1 参数说明 参数 是否必选 类型 说明 name 是 String 参数名称,长度不能超过32个字节,由字母、数字、下划线、连线或点组成,且必须以字母开头。
method: "GET" path: "/users" timeout: 30000 表1 参数说明 参数 是否必选 类型 说明 name 是 Array VPC通道名称。 scheme 是 String 后端请求协议定义,支持http、https。
"public" x-apigateway-backend: type: "backend endpoint type" 表1 参数说明 参数 是否必选 类型 说明 x-apigateway-backend 是 String API后端服务定义。 type 是 String
result-content: "mocked" 表1 参数说明 参数 是否必选 类型 说明 result-content 是 String MOCK返回结果。 父主题: APIG的API设计文件扩展定义