华为云用户手册

  • URI HTTP/HTTPS请求方法以及URI如下表所示。 表1 HTTP/HTTPS请求方法以及URI 请求方法 URI GET /v1/{project_id}/apigw/instances/{instance_id}/vpc-channels[?page_size, page_no, id, name, vpc_type] o 可以在URI后面用‘?’和‘&’添加不同的查询条件组合。 查询条件可为以下字段以及对应的值:id、name、vpc_type、page_size、page_no。
  • 响应消息 表3 参数说明 名称 类型 说明 total Integer 符合条件的VPC通道总数。 size Integer 本次查询返回的列表长度。 vpcs 字典数据类型 本次查询到的VPC通道列表。 表4 VPC参数说明 名称 类型 说明 id String VPC通道的编号。 name String VPC通道的名称。 type Integer VPC通道的类型。 2:API网关内置支持负载均衡功能的快速通道类型 member_type String VPC通道的成员类型。 ip(暂不支持) instance status Integer VPC通道的状态。 1:正常 2:异常 port Integer VPC通道中主机的端口号。 balance_strategy Integer 分发算法。 1:加权轮询(wrr) 2:加权最少连接(wleastconn) 3:源地址哈希(source) 4:URI哈希(uri) create_time Timestamp VPC通道的创建时间。 响应消息样例: { "total": 2, "size": 2, "vpcs": [ { "name": "通道1", "type": 1, "member_type": "instance", "port": 8080, "balance_strategy": 1, "id": "39c62689302a48fe9f4bd7cf5c052064", "create_time": "2018-04-24T12:07:58Z", "status": 1 }, { "name": "通道2", "type": 2, "member_type": "instance", "port": 8088, "balance_strategy": 1, "id": "e6831cbcbe2b45bbbc6318c2892f060b", "create_time": "2018-04-24T11:57:03Z", "status": 1 } ]}
  • 响应消息 表3 参数说明 名称 类型 说明 id String VPC通道的编号。 name String VPC通道的名称。 type Integer VPC通道的类型。 2:API网关内置支持负载均衡功能的快速通道类型 member_type String VPC通道的成员类型。 ip(暂不支持) instance status Integer VPC通道的状态。 1:正常 2:异常 port Integer VPC通道中主机的端口号。 balance_strategy Integer 分发算法。 1:加权轮询(wrr) 2:加权最少连接(wleastconn) 3:源地址哈希(source) 4:URI哈希(uri) create_time Timestamp VPC通道的创建时间。 vpc_health_config 字典数据类型 健康检查详情。 vpc_instances 字典数据类型 后端实例列表。 表4 健康检查详情 名称 类型 说明 id String 健康检查的编号。 vpc_id String VPC通道的编号。 protocol String 使用以下协议,对VPC中主机执行健康检查。 TCP HTTP path String 健康检查时的目标路径。 说明: 需要服从URI规范。 port Integer 健康检查的目标端口,缺省时为VPC中主机的端口号。 取值范围1 ~ 65535。 threshold_normal Integer 正常阈值。 判定VPC通道中主机正常的依据为:连续检查x成功,x为您设置的正常阈值。 取值范围2 ~ 10 threshold_abnormal Integer 异常阈值。 判定VPC通道中主机异常的依据为:连续检查x失败,x为您设置的异常阈值。 取值范围2 ~ 10。 time_out Integer 超时时间:检查期间,无响应的时间,单位为秒。必须小于time_interval字段取值。 取值范围2 ~ 30。 time_interval Integer 间隔时间:连续两次检查的间隔时间,单位为秒。必须大于time_out字段取值。 取值范围5 ~ 300。 http_code String 检查目标HTTP响应时,判断成功使用的HTTP响应码。 取值范围为100到599之前的任意整数值,支持如下三种格式: 多个值,如:200,201,202 一系列值,如:200-299 组合值,如:201,202,210-299 create_time Timestamp VPC通道的创建时间。 表5 后端实例详情 名称 类型 说明 id String 后端实例对象的编号。 vpc_id String VPC通道的编号。 status Integer 后端实例对象的状态。 instance_name String 后端实例的名称。 instance_id String 后端实例的ID。 host String 后端实例的主机地址 weight Integer 权重值。 权重值越大,转发到该后端实例的请求数量越多。 取值范围1 ~ 100。 create_time Timestamp 后端实例增加到VPC通道的时间。 响应消息样例: { "name": "vpc_001", "type": 2, "member_type": "instance", "port": 15565, "balance_strategy": 1, "id": "c3e6a7d85d9e47be89dfcc3cd37405d7", "create_time": "2018-07-27T12:30:48Z", "status": 1, "vpc_health_config": { "protocol": "http", "path": "/hc", "port": 15563, "threshold_normal": 5, "threshold_abnormal": 5, "time_out": 30, "time_interval": 200, "http_code": "205", "id": "f26c1b158f2e40f2b531cf5c1b5e05e5", "vpc_id": "c3e6a7d85d9e47be89dfcc3cd37405d7", "create_time": "2018-07-27T12:30:48Z" }, "vpc_instances": [ { "instance_id": "instance01", "instance_name": "instance_name01", "host": "127.0.0.1", "weight": 10, "id": "c3bc73605a8b400793363c87574fbad7", "vpc_id": "c3e6a7d85d9e47be89dfcc3cd37405d7", "status": 1, "create_time": "2018-07-27T12:30:48Z" } ]}
  • URI HTTP/HTTPS请求方法以及URI如下表所示。 表1 HTTP/HTTPS请求方法以及URI 请求方法 URI GET /v1/{project_id}/apigw/instances/{instance_id}/vpc-channels/{id} URI中的参数说明如下表所示。 表2 参数说明 名称 是否必选 类型 说明 project_id 是 String 项目ID。可从控制台“我的凭证”中获取region下项目ID,管理员权限可查询。 instance_id 是 String 实例ID,可从API网关控制台的专享版实例信息中获取。 id 是 String VPC通道的编号。
  • 对象模型 本节介绍自定义 域名 及证书的对象模型。 “操作类型”用于描述字段的属性,表示对应字段的值可进行的操作: C:创建;U:更新;R:读取。 “是否必选”列表示对于“操作类型”为“C”的创建操作,对应字段是否为必选字段。 表1 域名对象模型 参数 类型 说明 操作类型 是否必选 id String 域名的编号 R - url_domain String 自定义域名 CR 是 cname_status Integer cname解析状态 1 未解析 2 解析中 3 解析成功 4 解析失败 R 否 ssl_id String 证书的编号 R 否 group_id String API分组的编号 CR 是 表2 证书对象模型 参数 类型 说明 操作类型 是否必选 id String 证书的编号 R - name String 证书的名称 CRU 是 context String 证书的内容 CRU 是 private_key String 证书的私钥 CRU 是 父主题: 域名管理(待下线)
  • 响应消息 表3 参数说明 名称 类型 说明 id String 编号 name String 自定义认证的名称 type String 自定义认证类型: FRONTEND:前端 BACKEND:后端 authorizer_type String 只能为:FUNC authorizer_uri String 函数urn identities Array 认证来源 ttl Integer 缓存时间 user_data String 用户数据 create_time Time 创建时间
  • URI HTTP/HTTPS请求方法以及URI如下表所示。 表1 HTTP/HTTPS请求方法以及URI 请求方法 URI PUT /v1/{project_id}/apigw/instances/{instance_id}/acl-bindings[?action] URI中的参数说明如下表所示。 表2 参数说明 名称 是否必选 类型 说明 project_id 是 String 项目ID。可从控制台“我的凭证”中获取region下项目ID,管理员权限可查询。 instance_id 是 String 实例ID,可从API网关控制台的专享版实例信息中获取。 action 是 String 必须为delete
  • 响应消息 表4 参数说明 名称 类型 说明 success_count Number 成功解除绑定的ACL策略数量 failure Array 解除绑定失败的ACL策略及错误信息 表5 failure参数说明 名称 类型 说明 bind_id String 解除绑定失败的ACL策略ID error_code String 解除绑定失败的错误码 error_msg String 解除绑定失败的错误信息 api_id String 解除绑定失败的API的ID api_name String 解除绑定失败的API的名称 响应消息样例: {"failure": [{"bind_id": "81efcfd94b8747a0b21e8c04144a4e8c","error_code": "APIG.3010","error_msg": "Access control policy binding record not found", "api_id": "81efcfd94b8747a0b21e8c04144a4e8c","api_name": "api01"}],"success_count": 3}
  • 错误码 当您调用API时,如果遇到“APIGW”开头的错误码,请参见API网关错误码进行处理。 更多服务错误码请参见API错误中心。 状态码 错误码 错误信息 描述 处理措施 204 APIG.0000 Successful 请求成功 无 400 APIC.7211 Parameter value does not match the rules 参数与规则不匹配 修改参数与规则匹配 400 APIC.7230 The maintenance time window must be 4 hours. 运维时间必须等于4小时 修改运维起始时间和结束时间的间隔为4小时 400 APIC.7235 The maintenance time window must start or end with 2, 6, 10, 14, 18, or 22. 运维的起始或结束时间必须以 2,6,10,14,18,22开头 修改运维的起始或结束时间以 2,6,10,14,18,22开头 400 APIC.7238 An AZ must be specified. 可用区参数不能为空 创建实例时填写可用区参数 400 APIC.7239 Invalid IP address. ip地址格式不正确 使用正确的ip地址格式 400 APIC.7241 An enterprise project ID must be specified if you are an enterprise user. 企业用户必须填写企业项目编号 填写企业项目编号 400 APIC.7242 Load balancing is not supported by this edition. 该规格不支持负载均衡 调整实例规格 400 APIC.7243 Scale-up is not supported by this edition. 该规格不支持扩容 调整实例规格 400 APIC.7244 The bandwidth cannot be updated. 不支持更新带宽 不允许操作 400 APIC.7254 IPv6 access not supported. 暂不支持IPv6 暂不支持IPv6,请联系技术支持 400 APIC.7255 IPv6 not supported for the subnet used when creating the gateway or enabling IPv6 access. 创建IPv6实例或开启IPv6时,子网不支持IPv6 请尝试更换支持IPv6的子网 400 APIC.7257 The custom inbound port is bound to a custom domain name. 自定义入方向端口存在绑定的自定义域名 请将绑定了该自定义入方向端口的域名进行删除或者修改 400 APIC.7258 Port already defined. 端口重复定义 该端口已定义,请使用其他端口号 400 APIC.7312 The AZ does not support IPv6. 不存在支持IPv6功能的可用区 更换其他支持IPv6功能的可用区 400 APIC.7313 The bandwidth for IPv6 cannot be less than 5 MB. IPv6对应的带宽大小不能小于5M 增加传入的带宽大小 400 APIC.7500 The gateway name already exists. 实例名称已存在 请使用其他实例名称 400 APIC.7503 Parameters az and azList cannot be used at the same time. az和azList参数只能存在一个 去掉az或azList参数 400 APIC.7505 The gateway ID already exists. 实例id已存在 请更换实例id 400 APIC.9206 Failed to create the gateway. 创建实例失败 根据不同的原因处理,如果资源不足,则扩充资源,如果网络异常则检查对应服务的网络,恢复网络连通性 400 APIC.9208 Failed to disable public outbound access. 关闭出公网功能失败 请联系技术支持工程师排查日志 400 APIC.9210 create cloud nat eip failed 开启出公网功能失败 请联系技术支持工程师查看后台日志 400 APIC.9211 update bandwidth size failed 开启出公网功能或更新出公网带宽失败 请联系技术支持工程师协助解决 400 APIC.9215 Failed to scale up the gateway. 扩容实例失败 请联系技术支持工程师查看后台日志 400 APIC.9216 Failed to enable public inbound access. 开启公网入口功能失败 请联系技术支持工程师查看后台日志 400 APIC.9217 Failed to accept VPC peering connection or create route 接受对等连接和创建路由失败 请联系技术支持工程师查看后台日志 400 APIC.9218 Create instance failed due to insufficient quota. 因配额不够创建实例失败 修改配额后重试 400 APIC.9219 Create instance failed due to insufficient resources. 因资源不够创建实例失败 资源扩容后重试 400 APIC.9222 Lock gateway operation failed. 对实例操作进行加锁失败 请联系技术人员处理 400 APIC.9223 Delete custom inbound port failed. 删除自定义入方向端口失败 请稍后重试或联系技术支持工程师协助解决 400 APIC.9224 Add custom inbound port failed. 新增自定义入方向端口失败 请稍后重试或联系技术支持工程师协助解决 400 APIG.1119 No permissions to perform this operation. 细粒度授权失败,无权限执行此操作 获取对应细粒度权限后使用 400 APIG.1120 No permissions to create ELB channels. 没有权限创建私网ELB通道 所操作的ELB通道应在自己账号下,子账号应获取授权后访问 400 APIG.1201 The resources belong to different tenants. 操作的资源不属于同一租户 操作的对象应该属于同一个租户 400 APIG.2000 Parameter error. 请求参数错误 根据接口返回的具体原因修改请求参数 400 APIG.2001 The request parameters must be specified. 请求参数为空 填写请求参数 400 APIG.2002 The parameter value is too small. 参数值小于最小值 修改请求参数 400 APIG.2003 The parameter value is too large. 参数值大于最大值 修改请求参数 400 APIG.2004 The parameter value is outside the allowable range. 参数值不在可选范围内 修改请求参数 400 APIG.2005 The parameter is too short. 参数长度太短 修改请求参数 400 APIG.2006 The parameter is too long. 参数长度太长 修改请求参数 400 APIG.2007 Invalid length. 参数长度非法 修改请求参数 400 APIG.2008 Only letters are allowed. 参数只能是字母 修改请求参数 400 APIG.2009 Only digits are allowed. 参数只能是数字 修改请求参数 400 APIG.2010 Only letters and digits are allowed. 参数只能是字母或数字 修改请求参数 400 APIG.2011 Invalid parameter value. 参数规则不匹配 修改请求参数 400 APIG.2012 Invalid parameter value. 参数匹配到不期望匹配的规则 修改请求参数 400 APIG.2013 Only letters, digits, hyphens (-), and underscores (_) are allowed. 参数只能是字母、数字、下划线或中划线 修改请求参数 400 APIG.2014 Invalid email address. 无效的邮件地址 修改请求参数 400 APIG.2015 Invalid IP address. 无效的IP地址 修改请求参数 400 APIG.2016 The characters are not encoded using Base 64. 不是base 64编码的字符 修改请求参数为正确的base 64编码字符串 400 APIG.2017 Invalid mobile number. 无效的手机号码 修改请求参数 400 APIG.2018 Invalid telephone number. 无效的固话号码 修改请求参数 400 APIG.2019 Invalid telephone or mobile number. 无效的电话号码 修改请求参数 400 APIG.2020 Invalid postal code. 无效的邮政编码 修改请求参数 400 APIG.2021 The URL domain is not included in the IP address whitelist. 域名不在允许的白名单内 修改请求参数 400 APIG.2022 The URL domain is included in the IP address blacklist. 域名处于禁止的黑名单内 修改请求参数 400 APIG.2023 URL domain CNAME resolution failed. 域名cname失败 先注册域名的cname解析记录 400 APIG.2024 Invalid URL domain. 域名非法 使用正确的域名 400 APIG.2025 Invalid port number. 无效的端口号 使用正确的端口号 400 APIG.2026 The request path parameters are not defined. 请求的路径参数未在请求路径中定义 将请求路径包含的参数添加到请求参数中 400 APIG.2027 The backend path parameters are not defined. 后端的路径参数未在后端路径中定义 将后端请求路径包含的参数添加到后端参数中 400 APIG.2028 The request parameters mapped to the backend parameters are not defined. 后端参数映射的请求参数未定义 后端参数中的参数来源,改为正确的请求参数 400 APIG.2029 The default certificate already exists. 默认证书已存在 请联系技术支持工程师协助解决 400 APIG.2030 Bad request for debugging the API. 调试API请求消息不合法 使用正确的API调试参数 400 APIG.2034 The domain name has not been filed. File it first. 域名未备案,请进入备案系统进行备案 先进行备案 400 APIG.2035 The ICP Filing System is busy. Please try again later. 备案系统繁忙,请稍后重试 请联系技术支持工程师协助解决 400 APIG.2036 Only APIs that use custom authentication can have authorizer parameters. 只有使用了自定义认证的API可以有自定义认证参数 删除多余的参数 400 APIG.2041 Invalid microservice. 微服务无效 Invalid microservice. 修改请求参数service_id为有效的微服务ID 400 APIG.2042 Invalid engine. 微服务引擎无效 修改请求参数engine_id为有效的微服务引擎ID 400 APIG.2044 Invalid title of info Info.title不合法 Info.title字段书写必须符合文档规范 400 APIG.2045 Parse Servers error. The Servers must meet the documents Servers字段解析错误。Servers字段书写必须符合文档规范 Servers字段书写必须符合文档规范 400 APIG.2046 Incorrect custom authentication timeout. 自定义认证的超时时间填写错误 修改自定义认证超时时间的值,其值必须小于或等于函数执行的超时时间以及V2接口超时时间600s 400 APIG.2047 Incorrect number of retries for custom authentication. 自定义认证的重试次数填写错误 修改自定义认证重试次数的值,其值应该在0到10的范围内 400 APIG.2048 Incorrect Nacos configurations. nacos配置填写错误 请使用正确的nacos配置 400 APIG.2049 The port is not in the defined custom inbound ports. 该端口未在自定义入方向端口中定义 请使用HTTP(s)协议默认端口访问,或者通过实例自定义入方向端口定义后再使用 400 APIG.2050 The combination of this domain name and port already exists. 该域名及端口组合已存在 请指定其他域名或端口 400 APIG.2051 A domain name cannot be bound with different certificates. 相同域名无法绑定不同证书 请绑定相同的证书 400 APIG.2101 The certificate and private key do not match. 证书与私钥不匹配 使用匹配的证书与私钥 400 APIG.2102 The certificate has expired. 证书过期 使用没有过期的证书 400 APIG.2103 The certificate domain name and the custom domain name do not match. 证书内域名与自定义域名不匹配 证书内的域名应与自定义域名相同 400 APIG.2104 The certificate chain is not matched. 证书链不匹配 包含了多个证书的证书链,需要将服务器证书放在第一个,后面依次放证书链证书 400 APIG.2105 Encrypted private keys are not supported. 不支持加密的私钥 使用没有加密的私钥 400 APIG.2106 Invalid certificate or private key. 无效的证书或私钥 使用正确的证书和私钥 400 APIG.2108 Microservice unavailable. 微服务不可用 修改请求参数service_id为可用的微服务ID 400 APIG.2109 Invalid certificate. SAN missing. 无效的证书,证书缺乏SAN 无效的证书,证书缺乏SAN,请重新生成带有SAN的证书 400 APIG.3073 The IP address or IP address/CIDR mask does not exist. 自定义GEOIP地址解析的ip或ip/cidr_mask不存在。 请检查相关字段 400 APIG.3148 Invalid certificate. Add one that expires before January 19, 2038 03:14:07 UTC. 证书到期日期不能超过 2038 年 1 月 19 日 03:14:07 UTC 之后的时间 请添加一个在 2038 年 1 月 19 日 03:14:07 UTC 之前到期的证书 400 APIG.3153 The number of custom GeoIPs exceeds the limit. 自定义GEOIP地址解析数量超过限制。 自定义GEOIP地址解析数量超过限制,请清理非必要的配置。 400 APIG.3201 The API group name already exists. 指定的API分组名称已存在 使用其他名称 400 APIG.3202 The API name already exists. 指定的API名称已存在 使用其他名称 400 APIG.3203 The app name already exists. 指定的应用名称已存在 使用其他名称 400 APIG.3204 The request throttling policy name already exists. 指定的流控策略名称已存在 使用其他名称 400 APIG.3205 The environment name already exists. 指定的环境名称已存在 使用其他名称 400 APIG.3206 The access control policy name already exists. 指定的ACL策略名称已存在 使用其他名称 400 APIG.3207 The signature key name already exists. 指定的签名密钥名称已存在 使用其他名称 400 APIG.3208 The VPC channel name already exists. VPC通道名称已存在 使用其他名称 400 APIG.3209 The parameter name already exists. 参数名称已存在 使用其他名称 400 APIG.3210 The backend policy name already exists. 策略后端名称已存在 使用其他名称 400 APIG.3211 The authorizer name already exists. 指定的自定义认证名称已存在 使用其他名称 400 APIG.3212 The identity source name already exists. 指定的自定义认证身份来源已存在 使用其他名称 400 APIG.3213 The tag name already exists. 指定的标签名称已存在 使用其他名称 400 APIG.3216 The response name already exists. 指定的网关响应名称已存在 使用其他名称 400 APIG.3301 The API already exists. API已存在 修改API的方法和url,避免与其他API冲突 400 APIG.3302 The excluded configuration already exists. 特殊配置已存在 使用其他名称 400 APIG.3303 The environment variable already exists. 环境变量已存在 使用其他名称 400 APIG.3304 The purchasing order already exists. 订单已存在 请联系技术支持工程师协助解决 400 APIG.3305 The URL domain name already exists. 域名已存在 请联系技术支持工程师协助解决 400 APIG.3306 The IP address already exists. IP地址已存在 请联系技术支持工程师协助解决 400 APIG.3308 The excluded request throttling configuration already exists. 特殊流控策略已经存在 请联系技术支持工程师协助解决 400 APIG.3309 The operation has already been performed. 操作已经执行 请联系技术支持工程师协助解决 400 APIG.3310 The AppKey already exists. app key已存在 使用其他APP key 400 APIG.3316 The API authorization record already exists. API授权关系已经存在 使用其他API或APP授权 400 APIG.3330 VPC already bound to a microservice. VPC已经绑定了微服务 修改请求参数vpc_channel_id为未绑定微服务的 400 APIG.3331 The orchestration rule name already exists. 参数编排规则的名称已经存在 请修改参数编排的名称,使其与现有的参数编排规则的名称不重复 400 APIG.3332 The IP address or IP address/CIDR mask already exists. 自定义GEOIP地址解析配置的ip或ip/cidr_mask重复。 请检查相关字段,确保不重复 400 APIG.3600 JSON or YAML format error. Json或Yaml格式错误 请确认导入文件是否为yaml或者json,且格式正确 注:导入EXCEL文件也是这个报错 400 APIG.3601 The Swagger file version must be 2.0. swagger版本不是2.0 swagger版本必须为2.0 400 APIG.3602 Syntax error in the Swagger file. swagger语法错误 检查swagger语法错误 400 APIG.3603 The Swagger file content is too long. swagger内容超过限制 缩小swagger大小 400 APIG.3608 The API Designer does not support API modification. 不能在api设计器中修改api 请联系技术支持工程师协助解决 400 APIG.3609 The input file is empty. 输入文件为空 使用非空文件 400 APIG.3710 The VPC channel is being used by another third_auth plugin 指定的负载通道被第三方认证插件使用,不能删除 先解除第三方插件与负载通道的绑定,再删除负载通道 400 APIG.3715 A domain name can only be bound with CA certificates of the same algorithm type. 一个域名不能绑定不同算法类型的ca证书 请解绑域名原有的ca证书后再绑定 400 APIG.3717 Two-way TLS authentication not supported for HTTP or GRPC backend requests. API的后端请求协议为http或grpc时不支持开启TLS双向认证 请关闭TLS双向认证 401 APIC.7100 Token missing. Log in again or try again later. 未识别到用户认证信息,请重新登录或稍后重试 携带token访问 401 APIC.7101 Token expired. Try again later. 认证信息过期,请稍后重试 重新获取token访问 401 APIC.7102 Incorrect token or token resolution failure 认证信息无法识别 请联系技术支持工程师检查是否token加解密配置异常 401 APIC.7103 Token contains no project information. 认证信息不包含project信息 获取token时携带project信息 401 APIC.7105 Token contains no user information. 认证信息不包含用户信息 获取token时使用用户信息 401 APIC.7107 Token contains no role information. 认证信息不包含角色信息 获取token时使用角色信息 401 APIG.1000 Token missing. Log in again or try again later. 未识别到用户认证信息,请重新登录或稍后重试 携带token访问 401 APIG.1001 Session expired. Please try again later. 会话过期,请稍后重试 重新获取token访问 401 APIG.1002 Incorrect token or token resolution failed. 认证信息无法识别 使用正确的token访问 401 APIG.1003 Token contains no project information. 认证不包含project信息 使用包含project信息的token访问 401 APIG.1005 No permissions to request this method 租户操作受限,请前往账号中心核实 使用包含所需权限的token访问 401 APIG.1007 Token contains no domain information. 认证不包含Domain信息 请联系技术支持工程师协助解决 401 APIG.1008 Invalid domain. 无法识别用户Domain信息 请联系技术支持工程师协助解决 401 APIG.1009 Token contains no user information. 认证不包含用户信息 使用包含用户信息的token访问 401 APIG.1010 PDP server connection failed. 连接细粒度授权服务器失败 请联系技术支持工程师协助解决 401 APIG.1011 You can request resources only after you complete real-name authentication. 您的账号未实名认证,暂时无法进行其他操作 实名认证后使用 401 APIG.1012 Your account balance is insufficient. Top up your account. 您的账户余额不足,请前往费用中心解决 充值后使用 401 APIG.1013 Your account has been frozen. Some functions become unavailable. To unfreeze your account, contact customer service. 您的账户已被冻结,部分功能会受到影响,请联系技术支持解除 解除账号受限后使用 403 APIC.7106 Operation restricted. Check at My Account. 租户操作受限,请前往账号中心核实 使用包含所需权限的token访问 403 APIC.7108 Access denied because your account is frozen. 账号冻结,没有权限访问 解除账号冻结状态后访问 403 APIC.7109 Access denied because your account is suspended. 账号受限,没有权限访问 解除账号受限状态后访问 403 APIC.7110 Your account only has read permissions and can only send GET requests. 只读账户,没有权限发送除GET之外的任何请求 联系账号管理员配置管理员或细粒度权限 403 APIC.7111 The requested resource does not belong to your account. 访问的资源不属于该账号 使用正确的token访问 403 APIC.7118 User domain does not match. User profile的domain不匹配 请检查domain信息是否正确 403 APIC.7130 No permissions to access gateways in other projects. 没有权限操作其他项目下的实例 使用正确的项目编号 403 APIC.7134 No permissions to access this enterprise project. 没有权限操作该企业项目 使用用户有权限操作的企业项目 403 APIC.7300 You do not have permission to perform action {x} on resource {x}. 没有权限对资源执行指定操作 请检查权限是否配置正确 403 APIC.7400 Maximum number of gateways reached. 实例个数超过最大配额 请联系技术支持工程师扩大实例配额 403 APIC.7402 The number of tags exceeds the maximum allowed limit. 标签个数达到限额 请删除无用的标签 403 APIC.7403 The number of custom inbound ports has reached the maximum. 自定义入方向端口的数量超过了允许的最大值 请申请自定义入方向端口的配额 403 APIG.1020 Insufficient permissions. 当前用户权限不足 授予该用户读写权限 403 APIG.1101 No permissions to perform operations on this API group. 没有权限操作该API分组 所操作的分组应在自己账号下,子账号应获取授权后访问 403 APIG.1102 No permissions to perform operations on this API. 没有权限操作该API 所操作的API应在自己账号下,子账号应获取授权后访问 403 APIG.1103 No permissions to perform operations on this environment. 没有权限操作该环境 所操作的环境应在自己账号下,子账号应获取授权后访问 403 APIG.1104 No permissions to perform operations on this app. 没有权限操作该应用 所操作的应用应在自己账号下,子账号应获取授权后访问 403 APIG.1105 No permissions to perform operations on this request throttling policy. 没有权限操作该流控策略 所操作的流控策略应在自己账号下,子账号应获取授权后访问 403 APIG.1106 No permissions to perform operations on this access control policy. 没有权限操作该ACL策略 所操作的ACL策略应在自己账号下,子账号应获取授权后访问 403 APIG.1107 No permissions to perform operations on this configuration. 没有权限操作该配置信息 请联系技术支持工程师协助解决 403 APIG.1108 No permissions to perform operations on this excluded configuration. 没有权限操作该特殊配置信息 请联系技术支持工程师协助解决 403 APIG.1109 No permissions to perform operations on this app authorization record. 没有权限操作该APP授权信息 所操作的APP授权应在自己账号下,子账号应获取授权后访问 403 APIG.1110 No permissions to perform operations on this environment variable. 没有权限操作该环境变量 所操作的环境变量应在自己账号下,子账号应获取授权后访问 403 APIG.1111 No permissions to perform operations on this subscription record. 没有权限操作该订购信息 所操作的订购关系应在自己账号下,子账号应获取授权后访问 403 APIG.1112 No permissions to perform operations on this signature key. 没有权限操作该签名密钥 所操作的签名密钥应在自己账号下,子账号应获取授权后访问 403 APIG.1113 No permissions to perform operations on this VPC channel. 没有权限操作该VPC通道 所操作的复制通道应在自己账号下,子账号应获取授权后访问 403 APIG.1115 No permissions to perform operations on this certificate. 没有权限操作该证书 所操作的证书应在自己账号下,子账号应获取授权后访问 403 APIG.1116 No permissions to perform operations on this on-sale API. 没有权限操作该上架中的API 所操作的API应在自己账号下,子账号应获取授权后访问 403 APIG.1136 No permissions to perform operations on this instance. 没有权限操作实例 请联系技术支持工程师协助解决 403 APIG.1137 No permissions to perform operations on this authorizer. 没有权限操作该自定义认证 所操作的自定义认证应在自己账号下,子账号应获取授权后访问 403 APIG.1140 No permissions to perform operations on this feature. 没有权限操作该特性 所操作的特性应在自己账号下,子账号应获取授权后访问 403 APIG.1200 No permissions to perform operations on this API Swagger file. 没有权限创建操作该swagger文档 所操作的API文档应在自己账号下,子账号应获取授权后访问 403 APIG.1301 No permissions to perform operations on this domain 没有权限操作此域名 所操作的域名应在自己账号下 403 APIG.3100 The number of resources exceeds the maximum allowed limit. 请求的资源数量超过限额 请联系技术支持工程师增大配额 403 APIG.3101 The number of API groups exceeds the maximum allowed limit. API分组数量超过限额 请联系技术支持工程师增大配额 403 APIG.3102 The number of APIs exceeds the maximum allowed limit. API数量超过限额 请联系技术支持工程师增大配额 403 APIG.3103 The number of apps exceeds the maximum allowed limit. 应用数量超过限额 请联系技术支持工程师增大配额 403 APIG.3104 The number of environments exceeds the maximum allowed limit. 环境数量超过限额 请联系技术支持工程师增大配额 403 APIG.3105 The number of signature keys exceeds the maximum allowed limit. 签名密钥数量超过限额 请联系技术支持工程师增大配额 403 APIG.3106 The number of variables exceeds the maximum allowed limit. 变量个数超过限额 请联系技术支持工程师增大配额 403 APIG.3107 The number of request throttling policies exceeds the maximum allowed limit. 流控策略个数超过限额 请联系技术支持工程师增大配额 403 APIG.3108 The number of domain names exceeds the maximum allowed limit. 分组自定义域名个数超过限额 请联系技术支持工程师增大配额 403 APIG.3109 The number of VPC channels exceeds the maximum allowed limit. VPC通道数量超过限额 请联系技术支持工程师增大配额 403 APIG.3110 The number of cloud servers in the VPC channel exceeds the maximum allowed limit. VPC通道中的云主机数量超过限额 请联系技术支持工程师增大配额 403 APIG.3111 The number of parameters in req_params exceeds the maximum allowed limit. API参数个数超过限额 请联系技术支持工程师增大配额 403 APIG.3112 The number of access control policies exceeds the maximum allowed limit. ACL策略个数超过限额 请联系技术支持工程师增大配额 403 APIG.3113 The number of API backend policies exceeds the maximum allowed limit. API的策略后端个数超过限额 请联系技术支持工程师增大配额 403 APIG.3114 The number of policy conditions exceeds the maximum allowed limit. 策略后端的策略条件个数超过限额 请联系技术支持工程师增大配额 403 APIG.3116 The number of authorizers exceeds the maximum allowed limit. 自定义认证个数超过限额 请联系技术支持工程师增大配额 403 APIG.3117 The number of identity sources exceeds the maximum allowed limit. 自定义认证身份来源个数超过限额 请联系技术支持工程师增大配额 403 APIG.3125 The number of APIs in the API group exceeds the maximum allowed limit. 分组内的API数量达到上限 请联系技术支持工程师增大配额 403 APIG.3127 The number of APIs has reached the upper limit. A maximum of xxx APIs can be imported at a time. 导入API数量超过限制,每次最多导入数量为:xxx 减少导入的api数量 403 APIG.3131 The number of AppCodes exceeds the maximum allowed limit. APP code数量超过限额 请联系技术支持工程师增大配额 403 APIG.3132 The number of Swagger APIs in the API group exceeds the maximum allowed limit. 分组下API swagger数量超过限额 请联系技术支持工程师增大配额 403 APIG.3133 The number of API tags exceeds the maximum allowed limit. API tag数量超过限额 请联系技术支持工程师增大配额 403 APIG.3136 The number of responses exceeds the maximum allowed limit. 网关响应数量超过限额 请联系技术支持工程师增大配额 403 APIG.3150 The number of orchestration rules exceeds the maximum. 实例参数编排规则的数量超过了实例所允许的最大值 请联系技术支持工程师扩大实例参数编排规则的配额 403 APIG.3151 The number of orchestration rules bound to the API exceeds the maximum. API绑定参数编排规则的数量超过了API所允许绑定的最大值 请联系技术支持工程师扩大API允许绑定参数编排规则的配额 403 APIG.3411 The APIs belong to different tenants. 指定的API不属于同一个租户,无法授权 不允许操作 403 APIG.3412 The API provider has been frozen. 该API提供者已经被冻结 请联系技术支持工程师协助解决 403 APIG.3414 The VPC channel is already being used by another API. 指定的VPC通道已经被API占用 删除负载通道绑定的API后再删除负载通道 403 APIG.3415 The API group cannot be deleted because it contains APIs. 指定的API分组下存在API 删除分组下的API后再删除分组 403 APIG.3416 The API cannot be deleted because it has been published. 指定的API已经发布 将API下线后再删除API 403 APIG.3418 The environment contains published APIs. 指定的环境下存在已发布的API 不允许操作 403 APIG.3420 The API group is no longer available on the marketplace. 指定的API分组已经退市 确认API分组是否上架 403 APIG.3447 The access control policy cannot be deleted because it has been bound to APIs. 指定的ACL策略绑定了API,无法删除 删除访问控制策略绑定的API后再删除访问控制策略 403 APIG.3451 The request throttling policy cannot be deleted because it has been bound to APIs. 指定的流控策略绑定了API,无法删除 删除流控策略绑定的API后再删除访问流控策略 403 APIG.3471 The operation cannot be performed on this type of VPC channel. 不能对该类型的VPC通道执行此操作 不允许操作 403 APIG.3472 The load balancer is already being used by another VPC channel. 后端实例已经被其它通道使用 解绑其他通道与后端实例的绑定关系 403 APIG.3473 The load balancer has already been bound to another endpoint service. 后端实例已经绑定了其它endpoint service 不允许操作 403 APIG.3474 The API group ID in the URL does not match the API group to which the URL domain has been bound. url中的分组id和url中的域名绑定的分组id不匹配 URL中的分组与域名绑定的分组修改为一致 404 APIC.7301 Instance spec not found 实例规格不存在 使用存在的实例规格 404 APIC.7302 Instance not found 实例不存在 检查实例是否存在,使用正确的实例ID 404 APIC.7307 The security group does not exist in the VPC. 安全组在VPC不存在 使用存在的安全组 404 APIC.7310 The region does not have any AZs. 该region中不存在可用区 使用其他region 404 APIC.7311 The NAT EIP does not exist in the VPC. vpc服务不存在该nat eip 使用vpc服务存在的nat eip 404 APIC.7314 The VPC Endpoint of the gateway does not exist. 实例对应的vpcep不存在 请联系技术支持工程师检查vpcep 404 APIG.3001 The API group does not exist 指定的API分组不存在 检查分组是否存在 404 APIG.3002 The API does not exist. 指定的API不存在 检查API是否存在 404 APIG.3003 The environment does not exist. 指定的环境不存在 检查环境是否存在 404 APIG.3004 The app does not exist. 指定的应用不存在 检查应用是否存在 404 APIG.3005 The request throttling policy does not exist. 指定的流控策略不存在 检查流控策略是否存在 404 APIG.3006 The access control policy does not exist. 指定的ACL策略不存在 检查ACL策略是否存在 404 APIG.3007 The configuration does not exist. 指定的配置不存在 检查配置是否存在 404 APIG.3008 The excluded configuration does not exist. 指定的特殊配置不存在 检查特殊配置是否存在 404 APIG.3009 The app authorization record does not exist. 指定的APP授权信息不存在 检查APP授权是否存在 404 APIG.3010 The access control policy binding record does not exist. 指定的ACL策略绑定记录不存在 检查ACL策略绑定记录是否存在 404 APIG.3011 The environment variable does not exist. 指定的环境变量不存在 检查环境变量是否存在 404 APIG.3012 The request throttling policy binding record does not exist. 指定的流控策略绑定记录不存在 检查流控策略绑定记录是否存在 404 APIG.3013 The excluded request throttling configuration does not exist. 指定的流控策略特殊配置不存在 检查流控策略特殊配置是否存在 404 APIG.3014 The pre-subscription record does not exist. 指定的订购信息不存在 检查订购信息是否存在 404 APIG.3015 The API publication record does not exist. 指定的API发布记录不存在 检查API发布记录是否存在 404 APIG.3016 The API group listing information does not exist. 指定的API分组上架信息不存在 检查API分组是否上架 404 APIG.3017 The signature key does not exist. 指定的签名密钥不存在 检查签名密钥是否存在 404 APIG.3018 The signature key binding record does not exist. 指定的签名密钥绑定记录不存在 检查签名密钥绑定记录是否存在 404 APIG.3019 The function URN does not exist. 指定的函数URN不存在 检查函数URN是否存在 404 APIG.3020 The URL domain does not exist. 指定的域名不存在 检查分组域名是否存在 404 APIG.3021 The SSL certificate does not exist. 指定的证书不存在 检查SSL证书是否存在 404 APIG.3022 The API version does not exist. 指定的API历史版本不存在 检查API版本是否存在 404 APIG.3023 The VPC channel does not exist. 指定的VPC通道不存在 检查负载通道是否存在 404 APIG.3024 The cloud server does not exist. 指定的云主机不存在 检查负载通道中是否存在该实例 404 APIG.3025 The certificate does not exist. 指定的证书不存在 检查证书是否存在 404 APIG.3030 The instance does not exist. 实例不存在 检查实例是否存在 404 APIG.3072 The specified task does not exist 指定的任务不存在 检查任务是否存在 404 APIG.3081 The authorizer does not exist. 自定义认证不存在 检查自定义认证是否存在 404 APIG.3082 The AppCode does not exist. APP code不存在 检查APP code是否存在 404 APIG.3087 The feature configuration does not exist. 实例特性配置不存在 检查特性是否存在 404 APIG.3090 The API Swagger file does not exist. Api swagger文档不存在 检查swagger文档是否存在 404 APIG.3092 The E CS does not exist. 弹性云服务器不存在 弹性云服务器被删除或者传入的ID错误 404 APIG.3094 Instance task does not exist. 实例异步任务不存在 实例异步任务被删除或者传入的ID错误 404 APIG.3095 The orchestrations does not exist 不存在该参数编排 请检查是否存在请求参数中所传的orchestration_id所对应的参数编排规则 404 APIG.3097 The binding record of this SSL certificate and domain name does not exist. 指定SSL证书和域名的绑定记录不存在 检查SSL证书和域名的绑定记录是否存在 409 APIC.7701 Instance status conflict. 实例状态冲突 等待实例升级完成后再操作 409 APIC.7707 Scaling up to the same specifications is not allowed. 不允许扩容到同一规格 扩容到其他规格 409 APIC.7709 Public network access is enabled for the gateway. 已开启实例公网出口 关闭实例公网出口后再操作 409 APIC.7710 ELB is available only when the instance is in the Available state. 当实例不是运行状态时,无法操作ELB 联系技术支持工程师修复实例状态为运行后操作 409 APIC.7711 Public inbound access is enabled for the instance 已开启实例公网入口 请关闭实例公网入口后再操作 409 APIC.7712 The gateway operation has already been locked. 实例操作已经被锁 请处理待支付订单 409 APIG.1149 No permission for this instance task. 没有权限操作此实例异步任务 使用正确项目下的租户token访问 409 APIG.3491 The default response cannot be deleted. 默认网关响应不可被删除 不允许操作 409 APIG.3492 The default response name cannot be modified. 默认网关响应名称不可修改 不允许操作 409 APIG.3707 Only published APIs can be bound with plug-ins. 未发布的API不允许绑定插件 将API发布后再绑定到插件 409 APIG.3708 The key usage of the certificate does not match 证书使用类型不匹配 使用匹配的类型 409 APIG.3709 The signature algorithm of the certificate does not match 证书的算法类型与实际不匹配 更换证书算法类型 409 APIG.3711 A configuration parameter can be modified only once per minute. 实例配置参数修改间隔小于1分钟 请一分钟后再操作 409 APIG.3712 User domain does not match. User profile的domain不匹配 请检查domain信息是否正确 409 APIG.3716 The orchestration rule is currently in use by another API. 该编排正在被另一个API使用 请先解除编排规则和api的绑定 409 APIG.3718 An instance task is currently being processed. 实例任务正在进行中,无法再次开启新任务 请任务结束后再开启新任务 409 APIG.3719 The load balance channel is referenced by another load balance channel and cannot be deleted. 此负载通道被其他负载通道引用,不允许删除 请先删除引用类型负载通道,再删除此负载通道 412 APIG.3458 The feature is not supported by the current instance. 当前实例不支持该特性 请联系技术支持工程师协助解决 412 APIG.3713 orchestration_mapped_param cannot be modified. orchestration_mapped_param里面的信息不能被修改 不修改orchestration_mapped_param里面的信息 412 APIG.3714 The backend request protocol does not support SM cryptographic algorithms. 后端请求协议不支持开启SM系列商密通道 请修改后端请求协议为HTTPS 500 APIC.7253 Internal configuration error. 内部配置错误 检查内部配置 500 APIC.9000 Failed to request internal service 访问内部服务异常 请联系技术支持工程师查看后台日志 500 APIC.9005 Order creation failed. 创建订单失败 请联系技术支持工程师排查后台与CBC相关的日志 500 APIC.9007 Failed to access VPCEP 访问VPCEP服务失败 请联系技术支持工程师排查VPCEP服务相关日志 500 APIC.9100 Failed to access the database. 操作数据库异常 请联系技术支持工程师排查后台数据库相关日志 500 APIC.9200 Failed to query AZ information. 查询可用区信息失败 请联系技术支持工程师查看后台日志 500 APIC.9204 Failed to bind the EIP. 绑定EIP失败 请联系技术支持工程师查看后台日志 500 APIC.9209 Failed to access EPS. 访问EPS服务异常 请联系技术支持工程师排查EPS服务相关后台日志 500 APIC.9999 System error. Contact technical support. 系统错误,请联系技术支持工程师 请联系技术支持工程师查看管理面后台日志定位具体错误 500 APIG.1029 PDP5 cannot be connected. PDP5服务连接失败 请检查PDP5服务连接是否正常 500 APIG.3500 Failed to synchronize data to etcd. 同步路由至ETCD异常 请联系技术支持工程师协助解决 500 APIG.9002 Invalid function URN. 函数URN校验失败 使用正确的函数URN 500 APIG.9003 Statistics Center request failed. 请求统计中心失败 请联系技术支持工程师协助解决 500 APIG.9004 IAM request failed. 请求IAM认证鉴权失败 请联系技术支持工程师协助解决 500 APIG.9005 VPC request failed. 请求VPC服务失败 请联系技术支持工程师协助解决 500 APIG.9006 DNS request failed. 请求dns服务失败 请联系技术支持工程师协助解决 500 APIG.9007 ELB request failed. 请求ELB服务失败 请联系技术支持工程师协助解决 500 APIG.9008 Too many requests. Try again later. 请求过于频繁,请稍后重试 稍后重试 500 APIG.9013 Synchronize CCMS data failed 同步CCMS数据失败 请联系技术支持工程师协助解决 500 APIG.9999 Internal Server Error 系统错误,请联系技术支持工程师 请联系技术支持工程师协助解决 父主题: 附录
  • 请求消息 表3 参数说明 参数 是否必选 类型 说明 name 是 String APP的名称 支持汉字,英文,数字,下划线,且只能以英文和汉字开头,3 ~ 64个字符。 说明: 中文字符必须为UTF-8或者unicode编码。 remark 否 String APP描述 字符长度不能大于255 说明: 中文字符必须为UTF-8或者unicode编码。 app_key 否 String APP的key 支持英文,数字,“_”,“-”,且只能以英文或数字开头,8 ~ 64个字符。 说明: 只支持部分region自定义。 app_secret 否 String 密钥 支持英文,数字,“_”,“-”,“_”,“!”,“@”,“#”,“$”,“%”,且只能以英文或数字开头,8 ~ 64个字符。 说明: 只支持部分region自定义。 请求消息样例: {"name": "app_001","remark": "第一个APP", "app_key": "app_key_sample", "app_secret": "app_secret_sample"}
  • 响应消息 表4 参数说明 参数 类型 说明 id String 编号 name String 名称 status Integer 状态 app_key String APP的key app_secret String 密钥 creator String APP的创建者,取值如下: USER:用户自行创建 MARKET:云商店分配 register_time Timestamp 创建时间 remark String 描述 update_time Timestamp 更新时间 app_type String APP类型,默认为apig 响应消息样例: {"id": "14b39****4537e9","name": "app_001","status": 1,"app_key": "d49b1****376eb","app_secret": "******","creator": "USER","remark": "第一个APP","register_time": "2017-12-28T12:26:54Z","update_time": "2017-12-28T12:28:07.2966182Z", "app_type": "apig"}
  • URI HTTP/HTTPS请求方法以及URI如下表所示。 表1 HTTP/HTTPS请求方法以及URI 请求方法 URI PUT /v1/{project_id}/apigw/instances/{instance_id}/apps/{id} URI中的参数说明如下表所示。 表2 参数说明 名称 是否必选 类型 说明 project_id 是 String 项目ID。可从控制台“我的凭证”中获取region下项目ID,管理员权限可查询。 instance_id 是 String 实例ID,可从API网关控制台的专享版实例信息中获取。 id 是 String APP的编号,可通过查询APP列表获取。
  • 响应消息 表3 参数说明 名称 类型 说明 variables 字典数据类型 本次返回的环境变量列表 total Integer 满足条件的环境变量总数 size Integer 本次返回的列表长度 表4 variables参数说明 参数 类型 说明 id String 环境变量编号 env_id String 环境编号 group_id String API分组编号 variable_name String 变量名 variable_value String 变量值 响应消息样例: {"total": 2,"size": 2,"variables": [{"id": "09ab8135-7224-40b9-bf5d-107f2a09d409","env_id": "cca3616a-f368-4b32-9064-b2a631cb3eeb","group_id": "73c58022-f20d-495a-a188-85d718647f09","variable_name": "port","variable_value": "8080"},{"id": "104185e5-3e8f-4c63-a7e5-ef4117bf870c","env_id": "cca3616a-f368-4b32-9064-b2a631cb3eeb","group_id": "73c58022-f20d-495a-a188-85d718647f09","variable_name": "address","variable_value": "192.168.1.5"}]}
  • URI HTTP/HTTPS请求方法以及URI如下表所示。 表1 HTTP/HTTPS请求方法以及URI 请求方法 URI GET /v1/{project_id}/apigw/instances/{instance_id}/env-variables[?page_size, page_no, env_id, group_id, variable_name] 可以在URI后面用‘?’和‘&’添加不同的查询条件组合。 查询条件可为以下字段以及对应的值:env_id、group_id、variable_name、page_size、page_no 表2 参数说明 名称 是否必选 类型 说明 project_id 是 String 项目ID。可从控制台“我的凭证”中获取region下项目ID,管理员权限可查询。 instance_id 是 String 实例ID,可从API网关控制台的专享版实例信息中获取。 env_id 否 String 环境编号 group_id 是 String API分组编号 variable_name 否 String 变量名 page_size 否 Integer 每页显示的条数,默认值:20 page_no 否 Integer 页码,默认值:1 precise_search 否 String 指定需要精确匹配查找的参数名称,目前仅支持name
  • URI HTTP/HTTPS请求方法以及URI如下表所示。 表1 HTTP/HTTPS请求方法以及URI 请求方法 URI PUT /v1/{project_id}/apigw/instances/{instance_id}/throttle-specials/{id} URI中的参数说明如下表所示。 表2 参数说明 名称 是否必选 类型 说明 project_id 是 String 项目ID。可从控制台“我的凭证”中获取region下项目ID,管理员权限可查询。 instance_id 是 String 实例ID,可从API网关控制台的专享版实例信息中获取。 id 是 String 特殊配置的编号
  • 响应消息 表4 参数说明 参数 类型 说明 id String 特殊配置的编号 strategy_id String 流控策略编号 instance_id Integer 特殊对象的身份标识 instance_name String 作用的APP或租户的名称 instance_type Integer 特殊对象的类型 call_limits Integer 特殊对象在流控时间内能够访问API的最大次数限制 apply_time Timestamp 设置时间 app_id String 作用的APP编号 app_name String 作用的APP名称 响应消息样例: {"id": "778879b8-df10-495b-a087-874859fdea6d","strategy_id": "a3106cfe-801f-4919-b0d7-d785dc5b47f9","instance_id": "98efd77d-10b5-4eca-8170-ed30a4a286a4","instance_name": "app_002","instance_type": "APP","call_limits": 180,"apply_time": "2017-12-29T03:11:18Z","app_id": "98efd77d-10b5-4eca-8170-ed30a4a286a4","app_name": "app_002"}
  • URI HTTPS请求方法以及URI如下表所示。 表1 HTTPS请求方法以及URI 请求方法 URI POST /v1/{project_id}/apigw/instances/{instance_id}/acl-bindings URI中的参数说明如下表所示。 表2 参数说明 名称 是否必选 类型 说明 project_id 是 String 项目ID。可从控制台“我的凭证”中获取region下项目ID,管理员权限可查询。 instance_id 是 String 实例ID,可从API网关控制台的专享版实例信息中获取。
  • 响应消息 表4 参数说明 参数 类型 说明 id String 绑定关系编号 api_id String API编号 env_id String 环境编号 acl_id String ACL策略编号 create_time Timestamp 绑定时间 响应消息样例: [ { "id": "4ffc0da71ddd4c22add8ff801e19846c", "api_id": "aebacac6095942b4b2dd2b209bb7b9bc", "env_id": "DEFAULT_ENVIRONMENT_RELEASE_ID", "acl_id": "206bb985d8a04ec09f13c3e51ef77095", "create_time": "2018-07-27T11:27:10.7470224Z" }]
  • URI HTTP/HTTPS请求方法以及URI如下表所示。 表1 HTTP/HTTPS请求方法以及URI 请求方法 URI DELETE /v1.0/apigw/vpc-channels/{id}/members/{inst_id} URI中的参数说明如下表所示。 表2 参数说明 名称 是否必选 类型 说明 id 是 String VPC通道的编号。 inst_id 是 String 后端实例对象的编号。
  • 响应消息 表3 参数说明 参数 类型 说明 操作类型 code String 响应码 R msg String 返回消息 R start_time Long 开始时间的UTC时间戳 R end_time Long 截止时间的UTC时间戳 R list 结构体数据类型 统计指标的数据结构结构体 R 表4 参数说明 参数 类型 说明 操作类型 group_id String 分组的id R current_minute Long utc的timestamp R provider String API拥有者 R req_count Integer 请求总次数 R max_latency Integer 最大延时(ms) R avg_latency Double 平均耗时(ms) R output_throughput Integer 下行吞吐量(byte) R input_throughput Integer 上行吞吐量(byte) R req_count4xx Integer 4xx响应码总次数 R req_count5xx Integer 5xx响应码总次数 R req_count2xx Integer 2xx响应码总次数 R req_count_error Integer 错误次数 R register_time String 记录时间(格式为:yyyy-MM-dd HH:mm:ss) R req_time String 请求时间(格式为:yyyy-MM-dd HH:mm:ss) R 响应消息样例: {"code": "000000","msg": "","list": [{"group_id": "d7b52683-341b-4234-8261-66b4cfbfbda5","current_minute": 1516849440,"provider": "205fa874817a4dcfae9222a3be4725e8","req_count": 1981,"max_latency": 199,"avg_latency": 98.17,"output_throughput": 694483,"input_throughput": 694483,"req_count4xx": 669,"req_count5xx": 312,"req_count2xx": 327,"req_count_error": 981,"register_time": "2018-01-25 11:04:09","req_time": "2018-01-25 11:04:00"}],"start_time": 1516845900,"end_time": 1516849440}
  • 请求消息 表3 参数说明 参数 是否必选 类型 说明 name 是 String VPC通道的名称。 长度为3 ~ 64位的字符串,字符串由中文、英文字母、数字、“-”、“_”组成,且只能以英文或中文开头。 说明: 中文字符必须为UTF-8或者unicode编码。 type 是 Integer VPC通道的类型。 2:API网关内置支持负载均衡功能的快速通道类型 member_type type = 2时必选 String VPC通道的成员类型。 ip(暂不支持) instance 仅VPC通道类型为2时有效,缺省为instance。 port type = 2时必选 Integer VPC通道中主机的端口号。 取值范围1 ~ 65535,仅VPC通道类型为2时有效。 balance_strategy type = 2时必选 Integer 分发算法。 1:加权轮询(wrr) 2:加权最少连接(wleastconn) 3:源地址哈希(source) 4:URI哈希(uri) 仅VPC通道类型为2时有效,缺省为1。 vpc_health_config type = 2时必选 字典数据类型 健康检查详情,仅VPC通道类型为2时有效。 vpc_instances 是 字典数据类型 后端实例列表,VPC通道类型为1时,有且仅有1个后端实例。 表4 健康检查详情 参数 是否必选 类型 说明 protocol 是 String 使用以下协议,对VPC中主机执行健康检查。 TCP HTTP HTTPS path protocol = http时必选 String 健康检查时的目标路径。 说明: 需要服从URI规范。 port 否 Integer 健康检查的目标端口,缺省时为VPC中主机的端口号。 取值范围1 ~ 65535。 threshold_normal 是 Integer 正常阈值。 判定VPC通道中主机正常的依据为:连续检查x成功,x为您设置的正常阈值。 取值范围2 ~ 10 threshold_abnormal 是 Integer 异常阈值。 判定VPC通道中主机异常的依据为:连续检查x失败,x为您设置的异常阈值。 取值范围2 ~ 10。 time_out 是 Integer 超时时间:检查期间,无响应的时间,单位为秒。必须小于time_interval字段取值。 取值范围2 ~ 30。 time_interval 是 Integer 间隔时间:连续两次检查的间隔时间,单位为秒。必须大于time_out字段取值。 取值范围5 ~ 300。 http_code protocol = http时必选 String 检查目标HTTP响应时,判断成功使用的HTTP响应码。 取值范围为100到599之前的任意整数值,支持如下三种格式: 多个值,如:200,201,202 一系列值,如:200-299 组合值,如:201,202,210-299 表5 后端实例列表 参数 是否必选 类型 说明 instance_name 是 String 后端实例的名称。 支持汉字,英文,数字,“-”,“_”,“.”,1 ~ 64字符。 说明: 中文字符必须为UTF-8或者unicode编码。 instance_id 是 String 后端实例的编号。 支持英文,数字,“-”,“_”,1 ~ 64字符。 weight type = 2时必选 Integer 权重值。 权重值越大,转发到该后端实例的请求数量越多。 取值范围1 ~ 100,仅VPC通道类型为2时有效。 请求消息样例: { "balance_strategy": 1, "name": "vpc_001", "port": 15565, "type": 2, "member_type": "instance", "vpc_health_config": { "http_code": "205", "path": "/hc", "port": 15563, "protocol": "http", "threshold_abnormal": 5, "threshold_normal": 5, "time_interval": 200, "time_out": 30 }, "vpc_instances": [ { "instance_id": "instance01", "instance_name": "instance_name01", "weight": 10 } ]}
  • 响应消息 表6 参数说明 名称 类型 说明 id String VPC通道的编号。 name String VPC通道的名称。 type Integer VPC通道的类型。 2:API网关内置支持负载均衡功能的快速通道类型 member_type String VPC通道的成员类型。 ip(暂不支持) instance 仅VPC通道类型为2时有效。 status Integer VPC通道的状态。 1:正常 2:异常 port Integer VPC通道中主机的端口号。 balance_strategy Integer 分发算法。 1:加权轮询(wrr) 2:加权最少连接(wleastconn) 3:源地址哈希(source) 4:URI哈希(uri) create_time Timestamp VPC通道的创建时间。 响应消息样例: { "name": "vpc_001", "type": 2, "member_type": "instance", "port": 15565, "balance_strategy": 1, "id": "c3e6a7d85d9e47be89dfcc3cd37405d7", "create_time": "2018-07-27T12:30:48.027484Z", "status": 1}
  • 响应消息 表3 参数说明 名称 类型 说明 total Integer 满足条件的自定义认证总数 size Integer 本次返回的列表长度 authorizer_list Array 自定义认证列表 表4 authorizer_list参数说明 名称 类型 说明 id String 编号 name String 自定义认证的名称 type String 自定义认证类型: FRONTEND:前端 BACKEND:后端 authorizer_type String 只能为:FUNC authorizer_uri String 函数urn identities Array 认证来源 ttl Integer 缓存时间 user_data String 用户数据 create_time Time 创建时间
  • URI HTTP/HTTPS请求方法以及URI如下表所示。 表1 HTTP/HTTPS请求方法以及URI 请求方法 URI GET /v1.0/apigw/apps/{app_id}/app-codes[?page_size, page_no] 可以在URI后面用‘?’和‘&’添加不同的查询条件组合。 查询条件可为以下字段以及对应的值:page_size、page_no。 URI中的参数说明如下表所示。 表2 参数说明 名称 是否必选 类型 说明 app_id 是 String APP的编号
  • 响应消息 表3 参数说明 名称 类型 说明 total Integer 符合条件的APP总数 size Integer 本次查询返回的列表长度 app_codes 字典数据类型 App Code列表 表4 app_codes参数说明 参数 类型 说明 id String 编号 app_code String App Code值 app_id String APP的ID create_time Timestamp 创建时间 响应消息样例: { "total": 4, "size": 4, "app_codes": [ { "app_code": "7049bc6b5b4140b4a93340f2555641bbc4cc7179e7734baeb85a773041cbfb1a", "id": "5434c97d872f41a88b039a8a973e0652", "app_id": "db246f3f2ecd45f29ecb0f305e821fdc", "create_time": "2019-06-05T08:54:25Z" }, { "app_code": "asdssdadasdsssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss", "id": "787860297c3d4e51b76fff8abd089a94", "app_id": "db246f3f2ecd45f29ecb0f305e821fdc", "create_time": "2019-06-05T04:56:51Z" }, { "app_code": "MeOAgeemgeatouS7peiwg+ivleaooeW8j+aJp+ihjHNoZWxs6ISa5pysICAgLS0tLS0tLS3lronoo4XljIXmrovnlZnvvIzkuIvkuKrniYjmnKzlop7liqDpg6jnvbLlronoo4XljIXliKDpmaQ22222221234124", "id": "c7a87cdfa50b4a4eaa644901c4dddb98", "app_id": "db246f3f2ecd45f29ecb0f305e821fdc", "create_time": "2019-05-10T03:14:02Z" }, { "app_code": "MeOAgeemgeatouS7peiwg+ivleaooeW8j+aJp+ihjHNoZWxs6ISa5pysICAgLS0tLS0tLS3lronoo4XljIXmrovnlZnvvIzkuIvkuKrniYjmnKzlop7liqDpg6jnvbLlronoo4XljIXliKDpmaQ", "id": "7be28fde162b4186a9a07543ca48a28e", "app_id": "db246f3f2ecd45f29ecb0f305e821fdc", "create_time": "2019-05-10T03:13:27Z" } ]}
  • 响应消息 表4 参数说明 参数 类型 说明 id String 流控策略的编号 name String 流控策略的名称 api_call_limits Integer 单个API流控时间内能够被访问的次数限制 user_call_limits Integer 单个用户流控时间内能够访问API的次数限制 app_call_limits Integer 单个APP流控时间内能够访问API的次数限制 ip_call_limits Integer 单个IP流控时间内能够访问API的次数限制 time_interval Integer 流控的时长 time_unit String 流控的时间单位 remark String 描述 create_time Timestamp 创建时间 is_include_special_throttle Integer 是否包含特殊流控配置: 1:包含 2:不包含 type Integer 流控策略的类型,取值如下: 1:独享 2:共享 bind_num Integer 流控绑定的API数量 enable_adaptive_control String 是否开启动态流控: TRUE FALSE 暂不支持 响应消息样例: {"id": "0325b671-2d50-4614-9868-22102262695d","name": "每秒800次","api_call_limits": 800,"user_call_limits": 500,"app_call_limits": 300, "ip_call_limits": 600,"time_interval": 1,"time_unit": "SECOND","create_time": "2017-12-29T01:55:59.9904225Z","remark": "API每秒800次,用户500次,APP300次,IP600次","is_inclu_special_throttle": 2, "type":1,"bind_num": 0, "enable_adaptive_control": "FALSE"}
  • URI HTTP/HTTPS请求方法以及URI如下表所示。 表1 HTTP/HTTPS请求方法以及URI 请求方法 URI POST /v1/{project_id}/apigw/instances/{instance_id}/throttles URI中的参数说明如下表所示。 表2 参数说明 名称 是否必选 类型 说明 project_id 是 String 项目ID。可从控制台“我的凭证”中获取region下项目ID,管理员权限可查询。 instance_id 是 String 实例ID,可从API网关控制台的专享版实例信息中获取。
  • 请求消息 表3 参数说明 参数 是否必选 类型 说明 name 是 String 流控策略名称。 支持汉字,英文,数字,下划线,且只能以英文和汉字开头,3 ~ 64字符。 说明: 中文字符必须为UTF-8或者unicode编码。 api_call_limits 是 Integer API流量限制是指时长内一个API能够被访问的次数上限。该值不超过系统默认配额限制,系统默认配额为200tps,用户可根据实际情况修改该系统默认配额。输入的值不超过2147483647。正整数。 user_call_limits 否 Integer 用户流量限制是指一个API在时长之内每一个用户能访问的次数上限,该数值不超过API流量限制值。输入的值不超过2147483647。正整数。 app_call_limits 否 Integer APP流量限制是指一个API在时长之内被每个APP访问的次数上限,该数值不超过用户流量限制值。输入的值不超过2147483647。正整数。 ip_call_limits 否 Integer 源IP流量限制是指一个API在时长之内被每个IP访问的次数上限,该数值不超过API流量限制值。输入的值不超过2147483647。正整数。 time_interval 是 Integer 流量控制的时长单位。与“流量限制次数”配合使用,表示单位时间内的API请求次数上限。输入的值不超过2147483647。正整数。 time_unit 是 String 流控的时间单位: SECOND MINUTE HOUR DAY remark 否 String 流控策略描述 字符长度不超过255。 说明: 中文字符必须为UTF-8或者unicode编码。 type 否 Integer 流控策略的类型,取值如下: 1:独享,表示绑定到流控策略的单个API流控时间内能够被调用多少次。 2:共享,表示绑定到流控策略的所有API流控时间内能够被调用多少次。 enable_adaptive_control 否 String 是否开启动态流控: TRUE FALSE 暂不支持 请求消息样例: {"api_call_limits": 800,"user_call_limits": 500,"app_call_limits": 300, "ip_call_limits": 600,"name": "每秒800次","remark": "API每秒800次,用户500次,APP300次,IP600次","time_interval": 1,"time_unit": "SECOND"}
  • 请求消息 表3 参数说明 参数 是否必选 类型 说明 name 是 String 流控策略名称。 支持汉字,英文,数字,下划线,且只能以英文和汉字开头,3 ~ 64字符。 说明: 中文字符必须为UTF-8或者unicode编码。 api_call_limits 是 Integer API流量限制是指时长内一个API能够被访问的次数上限。该值不超过系统默认配额限制,系统默认配额为200tps,用户可根据实际情况修改该系统默认配额。输入的值不超过2147483647。正整数。 user_call_limits 否 Integer 用户流量限制是指一个API在时长之内每一个用户能访问的次数上限,该数值不超过API流量限制值。输入的值不超过2147483647。正整数。 app_call_limits 否 Integer APP流量限制是指一个API在时长之内被每个APP访问的次数上限,该数值不超过用户流量限制值。输入的值不超过2147483647。正整数。 ip_call_limits 否 Integer 源IP流量限制是指一个API在时长之内被每个IP访问的次数上限,该数值不超过API流量限制值。输入的值不超过2147483647。正整数。 time_interval 是 Integer 流量控制的时长单位。与“流量限制次数”配合使用,表示单位时间内的API请求次数上限。输入的值不超过2147483647。正整数。 time_unit 是 String 流控的时间单位: SECOND MINUTE HOUR DAY remark 否 String 流控策略描述 字符长度不超过255。 说明: 中文字符必须为UTF-8或者unicode编码。 type 否 Integer 流控策略的类型,取值如下: 1:独享,表示绑定到流控策略的单个API流控时间内能够被调用多少次 2:共享,表示绑定到流控策略的所有API流控时间内能够被调用多少次 enable_adaptive_control 否 String 是否开启动态流控: TRUE FALSE 暂不支持 请求消息样例: {"api_call_limits": 1000, "user_call_limits": 500,"app_call_limits": 300, "ip_call_limits": 600,"name": "每秒1000次","remark": "API每秒1000次,用户500次,APP300次,IP600次","time_interval": 1,"time_unit": "SECOND"}
  • 响应消息 表4 参数说明 参数 类型 说明 id String 流控策略的ID name String 流控策略的名称 api_call_limits Integer 单个API流控时间内能够被访问的次数限制 user_call_limits Integer 单个用户流控时间内能够访问API的次数限制 app_call_limits Integer 单个APP流控时间内能够访问API的次数限制 ip_call_limits Integer 单个IP流控时间内能够访问API的次数限制 time_interval Integer 流控的时长 time_unit String 流控的时间单位 remark String 描述 create_time Timestamp 创建时间 is_include_special_throttle Integer 是否包含特殊流控配置: 1:包含 2:不包含 type Integer 流控策略的类型,取值如下: 1 独享 2 共享 bind_num Integer 流控绑定的API数量 enable_adaptive_control String 是否开启动态流控: TRUE FALSE 暂不支持 响应消息样例: {"id": "0325b671-2d50-4614-9868-22102262695d","name": "每秒1000次","api_call_limits": 1000,"user_call_limits": 500,"app_call_limits": 300, "ip_call_limits": 600,"time_interval": 1,"time_unit": "SECOND","create_time": "2017-12-29T01:55:59Z","remark": "API每秒1000次,用户500次,APP300次,IP600次","is_inclu_special_throttle": 2, "type":1,"bind_num": 0, "enable_adaptive_control": "FALSE"}
共100000条