华为云用户手册

  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。通过调用 IAM 服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 表3 请求Body参数 参数 是否必选 参数类型 描述 group_info 是 MicroserviceGroup object 导入微服务的API分组信息 service_type 是 String 微服务中心类型。 CS E:CSE微服务注册中心 CCE: CCE云容器引擎(工作负载) CCE_SERVICE: CCE云容器引擎(Service) NACOS: Nacos注册中心,nacos_info必填。 protocol 否 String API网关访问微服务的请求协议 HTTP HTTPS 缺省值:HTTPS apis 是 Array of MicroserviceApiCreate objects 导入的api列表 数组长度:1 - 50 backend_timeout 否 Integer APIG请求后端服务的超时时间。最大超时时间可通过实例特性backend_timeout配置修改,可修改的上限为600000,默认5000 单位:毫秒。 最小值:1 缺省值:5000 auth_type 否 String API的认证方式,默认无认证。 NONE:无认证 APP:APP认证 IAM:IAM认证 缺省值:NONE cors 否 Boolean 是否支持跨域,默认不支持 true:支持 false:不支持 缺省值:false cse_info 否 MicroServiceInfoCSECreate object CSE微服务详细信息,service_type为CSE时必填 cce_info 否 MicroServiceInfoCCECreate object CCE云容器引擎工作负载信息,service_type为CCE时必填 cce_service_info 否 MicroServiceInfoC CES erviceCreate object CCE云容器引擎Service信息,service_type为CCE_SERVICE时必填 nacos_info 否 MicroServiceInfoNacosBase object nacos基础信息。 表4 MicroserviceGroup 参数 是否必选 参数类型 描述 group_id 否 String 指定已有的分组,为空时创建新的分组 最小长度:0 最大长度:64 group_name 否 String API分组的名称,group_id为空时必填。 支持汉字、英文、数字、中划线、下划线、点、斜杠、中英文格式下的小括号和冒号、中文格式下的顿号,且只能以英文、汉字和数字开头,3-255个字符。 说明: 中文字符必须为UTF-8或者unicode编码。 最小长度:3 最大长度:255 app_id 否 String group_id为空时必填,指定新分组所属的集成应用 最小长度:0 最大长度:64 表5 MicroserviceApiCreate 参数 是否必选 参数类型 描述 name 否 String API名称。 支持汉字、英文、数字、中划线、下划线、点、斜杠、中英文格式下的小括号和冒号、中文格式下的顿号,且只能以英文、汉字和数字开头。 说明: 中文字符必须为UTF-8或者unicode编码。 最小长度:3 最大长度:255 req_method 否 String API的请求方式 缺省值:ANY req_uri 是 String 请求地址。可以包含请求参数,用{}标识,比如/getUserInfo/{userId},支持 * / %- _ . 等特殊字符,总长度不超过512,且满足URI规范。 /apic/health_check为APIG预置的健康检查路径,当req_method=GET时不支持req_uri=/apic/health_check。 说明: 需要服从URI规范。 最小长度:1 最大长度:512 match_mode 否 String API的匹配方式 SWA:前缀匹配 NORMAL:正常匹配(绝对匹配) 默认:NORMAL 缺省值:SWA 表6 MicroServiceInfoCSECreate 参数 是否必选 参数类型 描述 engine_id 是 String 微服务引擎编号 最大长度:64 service_id 是 String 微服务编号 最大长度:64 version 是 String 微服务版本 最大长度:64 表7 MicroServiceInfoCCECreate 参数 是否必选 参数类型 描述 cluster_id 是 String 云容器引擎集群编号 最大长度:64 namespace 是 String 命名空间 最大长度:64 workload_type 是 String 工作负载类型 deployment:无状态负载 statefulset:有状态负载 daemonset:守护进程集 app_name 否 String APP名称。支持汉字,英文,数字,点,中划线,下划线,且只能以英文和汉字开头,1-64字符。 说明: 中文字符必须为UTF-8或者unicode编码。 最小长度:1 最大长度:64 label_key 否 String 服务标识名。支持汉字、英文、数字、中划线、下划线、点、斜杠、中英文格式下的小括号和冒号,且只能以英文、汉字和数字开头,1-64个字符。 说明: 中文字符必须为UTF-8或者unicode编码。 最小长度:1 最大长度:64 label_value 否 String 服务标识值。支持汉字,英文,数字,点,中划线,下划线,且只能以英文和汉字开头,1-64字符。 说明: 中文字符必须为UTF-8或者unicode编码。 最小长度:1 最大长度:64 version 否 String 工作负载的版本 最大长度:64 port 是 Integer 工作负载的监听端口号 最小值:1 最大值:65535 labels 否 Array of MicroserviceLabel objects 工作负载的标签列表。 表8 MicroserviceLabel 参数 是否必选 参数类型 描述 label_name 是 String 标签名称。 以字母或者数字开头和结尾,由字母、数字、连接符('-')、下划线('_')、点号('.')组成且63个字符之内。 最小长度:1 最大长度:63 label_value 是 String 标签值。 以字母或者数字开头和结尾,由字母、数字、连接符('-')、下划线('_')、点号('.')组成且63个字符之内。 最小长度:1 最大长度:63 表9 MicroServiceInfoCCEServiceCreate 参数 是否必选 参数类型 描述 cluster_id 是 String 云容器引擎集群编号 最大长度:64 namespace 是 String 命名空间。1-63字符。只能包含小写字母、数字,以及 '-',必须以字母开头,必须以字母数字结尾。 最小长度:1 最大长度:63 service_name 是 String Service名称。支持汉字,英文,数字,点,中划线,下划线,且只能以英文和汉字开头,1-64字符。 说明: 中文字符必须为UTF-8或者unicode编码。 最小长度:1 最大长度:64 port 否 Integer Service的监听端口号。如果是多端口Service,用户需填写一个端口。 最小值:1 最大值:65535 表10 MicroServiceInfoNacosBase 参数 是否必选 参数类型 描述 namespace 否 String 命名空间ID,当选择默认命名空间public时,此项为空。由字母、数字、连接符('-')、下划线('_')组成且64个字符之内。 最小长度:0 最大长度:64 cluster_name 否 String 集群名称,默认为DEFAULT。由字母、数字、连接符('-')、下划线('_')组成且64个字符之内。 最小长度:0 最大长度:64 group_name 否 String 分组名称,默认为DEFAULT_GROUP。由字母、数字、连接符('-')、下划线('_')、点号('.')、冒号(':')组成且128个字符之内。 最小长度:0 最大长度:128 service_name 是 String 微服务名称。不包含中文和@@,不得以@开头,512个字符以内。 最小长度:1 最大长度:512 server_config 是 Array of NacosServerConfig objects nacos服务端配置信息。 数组长度:1 - 9 user_info 是 NacosUserInfo object nacos用户信息。 表11 NacosServerConfig 参数 是否必选 参数类型 描述 ip_address 是 String nacos服务端IP地址。不包含中文字符。 最小长度:7 最大长度:128 port 是 Integer nacos服务端端口号。取值范围1 ~ 65535。 最小值:1 最大值:65535 grpc_port 否 Integer nacos服务端gRPC端口号,默认为port+1000。取值范围1 ~ 65535。 最小值:1 最大值:65535 表12 NacosUserInfo 参数 是否必选 参数类型 描述 user_name 是 String nacos用户名。 最小长度:1 最大长度:64 password 是 String nacos密码。 最小长度:1 最大长度:64
  • 响应示例 状态码:200 OK { "tags" : [ { "key" : "test-key", "values" : [ "test-value1", "test-value2" ] } ] } 状态码:401 Unauthorized { "error_code" : "APIC.7102", "error_msg" : "Incorrect token or token resolution failed" } 状态码:403 Forbidden { "error_code" : "APIC.7106", "error_msg" : "No permissions to request for the method" } 状态码:500 Internal Server Error { "error_code" : "APIC.9000", "error_msg" : "Failed to request internal service" }
  • 响应参数 状态码:200 表3 响应Body参数 参数 参数类型 描述 tags Array of TmsKeyValues objects 项目下所有实例绑定的标签列表 表4 TmsKeyValues 参数 参数类型 描述 key String 键。 支持可用 UTF-8 格式表示的字母(包含中文)、数字和空格,以及以下字符: _ . : = + - @; _sys_开头属于系统标签,租户不能输入 最小长度:1 最大长度:128 values Array of strings 值。 支持可用 UTF-8 格式表示的字母(包含中文)、数字和空格,以及以下字符: _ . : / = + - @ 状态码:401 表5 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码:403 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码:500 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述
  • 响应示例 状态码:201 OK { "applies" : [ { "app_id" : "98df09fb-d459-4cbf-83a7-2b55ca6f3d5d", "app_quota_id" : "c900c5612dbe451bb43cbcc49cfaf2f3", "bound_time" : "2020-09-19T07:43:11.948178051Z" } ] } 状态码:400 Bad Request { "error_code" : "APIG.2012", "error_msg" : "Invalid parameter value,parameterName:instance_id. Please refer to the support documentation" } 状态码:401 Unauthorized { "error_code" : "APIG.1002", "error_msg" : "Incorrect token or token resolution failed" } 状态码:403 Forbidden { "error_code" : "APIG.1005", "error_msg" : "No permissions to request this method" } 状态码:404 Not Found { "error_code" : "APIG.3093", "error_msg" : "The App quota c900c5612dbe451bb43cbcc49cfaf2f3 does not exist" } 状态码:500 Internal Server Error { "error_code" : "APIG.9999", "error_msg" : "System error" }
  • 响应参数 状态码:201 表4 响应Body参数 参数 参数类型 描述 applies Array of AppQuotaAppBinding objects 凭据与凭据配额绑定列表 表5 AppQuotaAppBinding 参数 参数类型 描述 app_quota_id String 凭据配额编号 app_id String 凭据编号 bound_time String 绑定时间 状态码:400 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码:401 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码:403 表8 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码:404 表9 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码:500 表10 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述
  • URI POST /v2/{project_id}/apigw/instances/{instance_id}/app-quotas/{app_quota_id}/binding-apps 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目ID,获取方式请参见获取项目ID。 instance_id 是 String 实例ID,在API网关控制台的“实例信息”中获取。 app_quota_id 是 String 凭据配额编号
  • 响应参数 状态码:200 表3 响应Body参数 参数 参数类型 描述 app_call_limits Integer APP流量限制是指一个API在时长之内被每个APP访问的次数上限,该数值不超过用户流量限制值。输入的值不超过2147483647。正整数。 name String 流控策略名称。支持汉字,英文,数字,下划线,且只能以英文和汉字开头,3 ~ 64字符。 说明: 中文字符必须为UTF-8或者unicode编码。 time_unit String 流控的时间单位 remark String 流控策略描述字符长度不超过255。 说明: 中文字符必须为UTF-8或者unicode编码。 api_call_limits Integer API流量限制是指时长内一个API能够被访问的次数上限。该值不超过系统默认配额限制,系统默认配额为200tps,用户可根据实际情况修改该系统默认配额。输入的值不超过2147483647。正整数。 type Integer 流控策略的类型 1:基础,表示绑定到流控策略的单个API流控时间内能够被调用多少次。 2:共享,表示绑定到流控策略的所有API流控时间内能够被调用多少次。 enable_adaptive_control String 是否开启动态流控: TRUE FALSE 暂不支持 user_call_limits Integer 用户流量限制是指一个API在时长之内每一个用户能访问的次数上限,该数值不超过API流量限制值。输入的值不超过2147483647。正整数。 time_interval Integer 流量控制的时长单位。与“流量限制次数”配合使用,表示单位时间内的API请求次数上限。输入的值不超过2147483647。正整数。 ip_call_limits Integer 源IP流量限制是指一个API在时长之内被每个IP访问的次数上限,该数值不超过API流量限制值。输入的值不超过2147483647。正整数。 id String 流控策略的ID bind_num Integer 流控绑定的API数量 is_inclu_special_throttle Integer 是否包含特殊流控配置 1:包含 2:不包含 create_time String 创建时间 状态码:401 表4 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码:403 表5 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码:404 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码:500 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述
  • URI GET /v2/{project_id}/apigw/instances/{instance_id}/throttles/{throttle_id} 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目ID,获取方式请参见获取项目ID。 instance_id 是 String 实例ID,在API网关控制台的“实例信息”中获取。 throttle_id 是 String 流控策略的编号
  • 响应示例 状态码:200 OK { "name" : "throttle_demo", "create_time" : "2020-07-31T08:44:02.205366118Z", "remark" : "Total: 800 calls/second; user: 500 calls/second; app: 300 calls/second; IP address: 600 calls/second", "type" : 1, "time_interval" : 1, "ip_call_limits" : 600, "app_call_limits" : 300, "time_unit" : "SECOND", "api_call_limits" : 800, "id" : "3437448ad06f4e0c91a224183116e965", "user_call_limits" : 500, "enable_adaptive_control" : "FALSE", "bind_num" : 0, "is_inclu_special_throttle" : 2 } 状态码:401 Unauthorized { "error_code" : "APIG.1002", "error_msg" : "Incorrect token or token resolution failed" } 状态码:403 Forbidden { "error_code" : "APIG.1005", "error_msg" : "No permissions to request this method" } 状态码:404 Not Found { "error_code" : "APIG.3005", "error_msg" : "Request throttling policy 3437448ad06f4e0c91a224183116e965 does not exist" } 状态码:500 Internal Server Error { "error_code" : "APIG.9999", "error_msg" : "System error" }
  • 响应参数 状态码:201 表4 响应Body参数 参数 参数类型 描述 id String 特殊配置的编号 call_limits Integer 特殊对象在流控时间内能够访问API的最大次数限制 apply_time String 设置时间 app_name String 作用的APP名称 app_id String 作用的APP编号 object_id String 特殊对象的身份标识 object_type String 特殊对象类型:APP、USER object_name String 作用的APP或租户的名称 throttle_id String 流控策略编号 状态码:400 表5 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码:401 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码:403 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码:404 表8 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码:500 表9 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 表3 请求Body参数 参数 是否必选 参数类型 描述 call_limits 是 Integer 流控时间内特殊对象能够访问API的最大次数限制 object_id 是 String 特殊APP的编号或特殊租户的账号ID object_type 是 String 特殊对象类型
  • 响应示例 状态码:201 Created { "call_limits" : 150, "app_name" : "app_demo", "object_name" : "app_demo", "object_id" : "356de8eb7a8742168586e5daf5339965", "throttle_id" : "3437448ad06f4e0c91a224183116e965", "apply_time" : "2020-08-04T02:40:56.717710961Z", "id" : "a3e9ff8db55544ed9db91d8b048770c0", "app_id" : "356de8eb7a8742168586e5daf5339965", "object_type" : "APP" } 状态码:400 Bad Request { "error_code" : "APIG.2003", "error_msg" : "The parameter value is too large,parameterName:call_limits. Please refer to the support documentation" } 状态码:401 Unauthorized { "error_code" : "APIG.1002", "error_msg" : "Incorrect token or token resolution failed" } 状态码:403 Forbidden { "error_code" : "APIG.1005", "error_msg" : "No permissions to request this method" } 状态码:404 Not Found { "error_code" : "APIG.3004", "error_msg" : "App 356de8eb7a8742168586e5daf5339965 does not exist" } 状态码:500 Internal Server Error { "error_code" : "APIG.9999", "error_msg" : "System error" }
  • URI POST /v2/{project_id}/apigw/instances/{instance_id}/throttles/{throttle_id}/throttle-specials 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目ID,获取方式请参见获取项目ID。 instance_id 是 String 实例ID,在API网关控制台的“实例信息”中获取。 throttle_id 是 String 流控策略的编号
  • 响应示例 状态码:200 OK { "total" : 2, "size" : 2, "responses" : [ { "create_time" : "2020-08-12T06:52:02Z", "default" : false, "id" : "e839b367e10f4ab19d1c5008e476b83a", "name" : "response_demo", "update_time" : "2020-08-12T06:52:02Z" }, { "create_time" : "2020-07-31T11:39:23Z", "default" : true, "id" : "ed8e8c52ab0e4a1c9c809268e5002e64", "name" : "default", "update_time" : "2020-07-31T11:39:23Z" } ] } 状态码:400 Bad Request { "error_code" : "APIG.2012", "error_msg" : "Invalid parameter value,parameterName:group_id. Please refer to the support documentation" } 状态码:401 Unauthorized { "error_code" : "APIG.1002", "error_msg" : "Incorrect token or token resolution failed" } 状态码:403 Forbidden { "error_code" : "APIG.1005", "error_msg" : "No permissions to request this method" } 状态码:404 Not Found { "error_code" : "APIG.3001", "error_msg" : "API group c77f5e81d9cb4424bf704ef2b0ac7600 does not exist" } 状态码:500 Internal Server Error { "error_code" : "APIG.9999", "error_msg" : "System error" }
  • URI GET /v2/{project_id}/apigw/instances/{instance_id}/api-groups/{group_id}/gateway-responses 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目ID,获取方式请参见获取项目ID。 instance_id 是 String 实例ID,在API网关控制台的“实例信息”中获取。 group_id 是 String 分组的编号 表2 Query参数 参数 是否必选 参数类型 描述 offset 否 Long 偏移量,表示从此偏移量开始查询,偏移量小于0时,自动转换为0 缺省值:0 limit 否 Integer 每页显示的条目数量,条目数量小于等于0时,自动转换为20,条目数量大于500时,自动转换为500 最小值:1 最大值:500 缺省值:20
  • 响应参数 状态码:201 表4 响应Body参数 参数 参数类型 描述 acl_bindings Array of AclApiBindingInfo objects API与ACL的绑定关系列表 表5 AclApiBindingInfo 参数 参数类型 描述 id String 绑定关系编号 api_id String API编号 env_id String 环境编号 acl_id String ACL策略编号 create_time String 绑定时间 状态码:400 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码:401 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码:403 表8 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码:404 表9 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码:500 表10 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 表3 请求Body参数 参数 是否必选 参数类型 描述 acl_id 否 String ACL策略编号 publish_ids 否 Array of strings API发布记录编号
  • 响应示例 状态码:201 Created { "acl_bindings" : [ { "id" : "332c5db1458a477b89b2ea741fec94a3", "api_id" : "5f918d104dc84480a75166ba99efff21", "env_id" : "DEFAULT_ENVIRONMENT_RELEASE_ID", "acl_id" : "7eb619ecf2a24943b099833cd24a01ba", "create_time" : "2020-08-04T08:58:03.001228747Z" } ] } 状态码:400 Bad Request { "error_code" : "APIG.2011", "error_msg" : "Invalid parameter value,parameterName:acl_id. Please refer to the support documentation" } 状态码:401 Unauthorized { "error_code" : "APIG.1002", "error_msg" : "Incorrect token or token resolution failed" } 状态码:403 Forbidden { "error_code" : "APIG.1005", "error_msg" : "No permissions to request this method" } 状态码:404 Not Found { "error_code" : "APIG.3006", "error_msg" : "Access control policy 7eb619ecf2a24943b099833cd24a01ba does not exist" } 状态码:500 Internal Server Error { "error_code" : "APIG.9999", "error_msg" : "System error" }
  • URI POST /v2/{project_id}/apigw/instances/{instance_id}/api-groups/{group_id}/domains/{domain_id}/certificates/detach 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目ID,获取方式请参见获取项目ID。 instance_id 是 String 实例ID,在API网关控制台的“实例信息”中获取。 group_id 是 String 分组的编号 domain_id 是 String 域名 的编号
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 表3 请求Body参数 参数 是否必选 参数类型 描述 certificate_ids 是 Array of strings 证书的id集合 verified_client_certificate_enabled 否 Boolean 是否开启客户端证书校验。当绑定证书存在trusted_root_ca时,默认开启;当绑定证书不存在trusted_root_ca时,默认关闭。
  • 响应参数 状态码:204 OK 状态码:400 表4 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码:401 表5 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码:403 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码:404 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码:500 表8 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述
  • 响应示例 状态码:400 Bad Request { "error_code" : "APIG.2012", "error_msg" : "Invalid parameter value,parameterName:domain_id. Please refer to the support documentation" } 状态码:401 Unauthorized { "error_code" : "APIG.1002", "error_msg" : "Incorrect token or token resolution failed" } 状态码:403 Forbidden { "error_code" : "APIG.1005", "error_msg" : "No permissions to request this method" } 状态码:404 Not Found { "error_code" : "APIG.3020", "error_msg" : "The URL domain does not exist" } 状态码:500 Internal Server Error { "error_code" : "APIG.9999", "error_msg" : "System error" }
  • 响应参数 状态码:200 表3 响应Body参数 参数 参数类型 描述 authed_nums Integer 已进行API访问授权的APP个数 unauthed_nums Integer 未进行API访问授权的APP个数 状态码:400 表4 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码:401 表5 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码:403 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码:404 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码:500 表8 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述
  • 响应示例 状态码:200 OK { "authed_nums" : 7, "unauthed_nums" : 5 } 状态码:400 Bad Request { "error_code" : "APIG.2012", "error_msg" : "Invalid parameter value,parameterName:instance_id. Please refer to the support documentation" } 状态码:401 Unauthorized { "error_code" : "APIG.1002", "error_msg" : "Incorrect token or token resolution failed" } 状态码:403 Forbidden { "error_code" : "APIG.1005", "error_msg" : "No permissions to request this method" } 状态码:404 Bad Request { "error_code" : "APIG.3030", "error_msg" : "The instance does not exist;id:eddc4d25480b4cd6b512f270a1b8b341" } 状态码:500 Internal Server Error { "error_code" : "APIG.9999", "error_msg" : "System error" }
  • 响应参数 状态码:200 表3 响应Body参数 参数 参数类型 描述 variable_value String 变量值支持英文字母、数字、英文格式的下划线、中划线,斜线(/)、点、冒号,1 ~ 255个字符。 env_id String 环境编号 最小长度:1 最大长度:65 group_id String API分组编号 最小长度:1 最大长度:65 variable_name String 变量名,支持英文字母、数字、英文格式的下划线、中划线,必须以英文字母开头,3~32个字符。在API定义中等于#Name的值#部分(区分大小写),发布到环境里的API被变量值替换。 说明: 中文字符必须为UTF-8或者unicode编码。 id String 环境变量编号 状态码:401 表4 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码:403 表5 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码:404 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码:500 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述
  • 响应示例 状态码:200 OK { "variable_value" : "192.168.1.5", "env_id" : "7a1ad0c350844ee69479b47df9a881cb", "group_id" : "c77f5e81d9cb4424bf704ef2b0ac7600", "id" : "25054838a624400bbf2267cf5b3a3f70", "variable_name" : "address" } 状态码:401 Unauthorized { "error_code" : "APIG.1002", "error_msg" : "Incorrect token or token resolution failed" } 状态码:403 Forbidden { "error_code" : "APIG.1005", "error_msg" : "No permissions to request this method" } 状态码:404 Not Found { "error_code" : "APIG.3011", "error_msg" : "The environment variable does not exist, id: 25054838a624400bbf2267cf5b3a3f70" } 状态码:500 Internal Server Error { "error_code" : "APIG.9999", "error_msg" : "System error" }
  • URI GET /v2/{project_id}/apigw/instances/{instance_id}/env-variables/{env_variable_id} 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目ID,获取方式请参见获取项目ID。 instance_id 是 String 实例ID,在API网关控制台的“实例信息”中获取。 env_variable_id 是 String 环境变量的编号
  • 响应示例 状态码:202 Accepted { "instance_id" : "6a7d71827fd54572b1f31aa9548fcc81", "message" : "JOB_ASSIGNED_FOR_PROVISIONING_0003I:The job JOB-bdb370eb6f4c4c73b61b95a9da38beb5 has been assigned to the instance 6a7d71827fd54572b1f31aa9548fcc81 for running provisioning.", "job_id" : "JOB-edbac2355fb7433e98f173ea2e452e2d" } 状态码:400 Bad Request { "error_code" : "APIC.7211", "error_msg" : "Parameter value does not match the rules, parameter name[maintainBegin]" } 状态码:401 Unauthorized { "error_code" : "APIC.7102", "error_msg" : "Incorrect token or token resolution failed" } 状态码:403 Forbidden { "error_code" : "APIC.7106", "error_msg" : "No permissions to request for the method" } 状态码:404 Not Found { "error_code" : "APIC.7301", "error_msg" : "Instance spec not found" } 状态码:500 Internal Server Error { "error_code" : "APIC.9000", "error_msg" : "Failed to request internal service" }
  • 请求示例 创建一个实例,配置网络、安全组等信息 { "available_zone_ids" : [ "xx-xxx-7b", "xx-xxx-7a" ], "bandwidth_size" : 5, "description" : "test create instance", "eip_id" : "41f961ab-2bdd-4ca7-9b59-cfc4fcef10c9", "enterprise_project_id" : "0", "instance_name" : "apig-demo", "maintain_begin" : "22:00:00", "maintain_end" : "02:00:00", "security_group_id" : "36d0ec18-bd10-4da7-86f3-ad7a5ddc55d7", "spec_id" : "PROFESSIONAL", "subnet_id" : "a938121c-11c4-4c91-b983-bc9acd347bb5", "vpc_id" : "0957108c-257c-4ce0-9e93-527d279ce763" }
  • 响应参数 状态码:202 表5 响应Body参数 参数 参数类型 描述 instance_id String 实例ID message String 创建实例任务信息 job_id String 任务编号 状态码:400 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码:401 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码:403 表8 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码:404 表9 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码:500 表10 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述
共100000条
提示

您即将访问非华为云网站,请注意账号财产安全