华为云用户手册

  • 响应示例 状态码: 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" }
  • 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 凭据配额编号
  • 响应示例 状态码: 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" }
  • 响应参数 状态码: 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 错误描述
  • 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 流控策略的编号
  • 请求参数 表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 特殊对象类型 枚举值: APP USER
  • 响应示例 状态码: 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" }
  • 响应参数 状态码: 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 错误描述
  • 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时,默认关闭。
  • 响应参数 状态码: 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 OK { "variable_value" : "192.168.1.5", "env_id" : "7a1ad0c350844ee69479b47df9a881cb", "group_id" : "c77f5e81d9cb4424bf704ef2b0ac7600", "id" : "25054838a624400bbf2267cf5b3a3f70", "variable_name" : "address" } 状态码: 400 Bad Request { "error_code" : "APIG.2012", "error_msg" : "Invalid parameter value,parameterName:variable_name" } 状态码: 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.3003", "error_msg" : "Environment 7a1ad0c350844ee69479b47df9a881cb does not exist" } 状态码: 500 Internal Server Error { "error_code" : "APIG.9999", "error_msg" : "System error" }
  • URI PUT /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 环境变量的编号
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 表3 请求Body参数 参数 是否必选 参数类型 描述 variable_value 是 String 变量值支持英文字母、数字、英文格式的下划线、中划线,斜线(/)、点、冒号,1 ~ 255个字符。
  • 响应参数 状态码: 200 表4 响应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 环境变量编号 状态码: 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 错误描述
  • 响应示例 状态码: 200 OK { "protocol" : "http", "path" : "/vpc/demo", "method" : "GET", "port" : 22, "threshold_abnormal" : 5, "threshold_normal" : 2, "time_interval" : 10, "http_code" : "200", "enable_client_ssl" : false, "status" : 1, "timeout" : 5, "id" : "3b3d02026c5f402d85e8645ea95b0816", "vpc_channel_id" : "d38c55c926ca44c2bfb37886d93b9a0d", "create_time" : "2020-07-23T07:11:57Z" } 状态码: 400 Bad Request { "error_code" : "APIG.2001", "error_msg" : "The request parameters must be specified, parameter name:members" } 状态码: 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.3023", "error_msg" : "The VPC channel does not exist,id:56a7d7358e1b42459c9d730d65b14e59" } 状态码: 500 Internal Server Error { "error_code" : "APIG.9999", "error_msg" : "System error" }
  • 请求示例 修改VPC通道的健康检查 { "http_code" : "200", "path" : "/vpc/demo", "port" : 22, "protocol" : "http", "threshold_abnormal" : 5, "threshold_normal" : 2, "time_interval" : 10, "timeout" : 5, "enable_client_ssl" : false }
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 表3 请求Body参数 参数 是否必选 参数类型 描述 protocol 是 String 使用以下协议,对VPC中主机执行健康检查: TCP HTTP HTTPS 枚举值: TCP HTTP HTTPS path 否 String 健康检查时的目标路径。protocol = http或https时必选 method 否 String 健康检查时的请求方法 缺省值:GET 枚举值: GET HEAD port 否 Integer 健康检查的目标端口,缺少或port = 0时为VPC中主机的端口号。 若此端口存在非0值,则使用此端口进行健康检查。 最小值:0 最大值:65535 threshold_normal 是 Integer 正常阈值。判定VPC通道中主机正常的依据为:连续检查x成功,x为您设置的正常阈值。 最小值:1 最大值:10 threshold_abnormal 是 Integer 异常阈值。判定VPC通道中主机异常的依据为:连续检查x失败,x为您设置的异常阈值。 最小值:1 最大值:10 time_interval 是 Integer 间隔时间:连续两次检查的间隔时间,单位为秒。必须大于timeout字段取值。 最小值:1 最大值:300 http_code 否 String 检查目标HTTP响应时,判断成功使用的HTTP响应码。取值范围为100到599之前的任意整数值,支持如下三种格式: 多个值,如:200,201,202 一系列值,如:200-299 组合值,如:201,202,210-299 protocol = http时必选 enable_client_ssl 否 Boolean 是否开启双向认证。若开启,则使用实例配置中的backend_client_certificate配置项的证书 缺省值:false status 否 Integer 健康检查状态 1:可用 2:不可用 枚举值: 1 2 timeout 是 Integer 超时时间:检查期间,无响应的时间,单位为秒。必须小于time_interval字段取值。 最小值:1 最大值:30
  • URI PUT /v2/{project_id}/apigw/instances/{instance_id}/vpc-channels/{vpc_channel_id}/health-config 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目ID,获取方式请参见获取项目ID。 instance_id 是 String 实例ID,在API网关控制台的“实例信息”中获取。 vpc_channel_id 是 String VPC通道的编号
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 protocol String 使用以下协议,对VPC中主机执行健康检查: TCP HTTP HTTPS 枚举值: TCP HTTP HTTPS path String 健康检查时的目标路径。protocol = http或https时必选 method String 健康检查时的请求方法 缺省值:GET 枚举值: GET HEAD port Integer 健康检查的目标端口,缺少或port = 0时为VPC中主机的端口号。 若此端口存在非0值,则使用此端口进行健康检查。 最小值:0 最大值:65535 threshold_normal Integer 正常阈值。判定VPC通道中主机正常的依据为:连续检查x成功,x为您设置的正常阈值。 最小值:1 最大值:10 threshold_abnormal Integer 异常阈值。判定VPC通道中主机异常的依据为:连续检查x失败,x为您设置的异常阈值。 最小值:1 最大值:10 time_interval Integer 间隔时间:连续两次检查的间隔时间,单位为秒。必须大于timeout字段取值。 最小值:1 最大值:300 http_code String 检查目标HTTP响应时,判断成功使用的HTTP响应码。取值范围为100到599之前的任意整数值,支持如下三种格式: 多个值,如:200,201,202 一系列值,如:200-299 组合值,如:201,202,210-299 protocol = http时必选 enable_client_ssl Boolean 是否开启双向认证。若开启,则使用实例配置中的backend_client_certificate配置项的证书 缺省值:false status Integer 健康检查状态 1:可用 2:不可用 枚举值: 1 2 timeout Integer 超时时间:检查期间,无响应的时间,单位为秒。必须小于time_interval字段取值。 最小值:1 最大值:30 vpc_channel_id String VPC通道的编号 id String 健康检查的编号 create_time 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 错误描述
  • URI POST /v2/{project_id}/apigw/instances/{instance_id}/vpc-channels/{vpc_channel_id}/members/batch-enable 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目ID,获取方式请参见获取项目ID。 instance_id 是 String 实例ID,在API网关控制台的“实例信息”中获取。 vpc_channel_id 是 String VPC通道的编号
  • 响应参数 状态码: 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: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.3023", "error_msg" : "The VPC channel does not exist,id:56a7d7358e1b42459c9d730d65b14e59" } 状态码: 500 Internal Server Error { "error_code" : "APIG.9999", "error_msg" : "System error" }
  • 响应示例 状态码: 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" : "App quota c900c5612dbe451bb43cbcc49cfaf2f3 does not exist" } 状态码: 500 Internal Server Error { "error_code" : "APIG.9999", "error_msg" : "System error" }
  • URI DELETE /v2/{project_id}/apigw/instances/{instance_id}/app-quotas/{app_quota_id} 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目ID,获取方式请参见获取项目ID。 instance_id 是 String 实例ID,在API网关控制台的“实例信息”中获取。 app_quota_id 是 String 凭据配额编号
  • 响应参数 状态码: 400 表3 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg 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 { "total" : 2, "size" : 2, "envs" : [ { "create_time" : "2019-02-12T19:42:19.914989Z", "name" : "RELEASE", "remark" : "xxx", "id" : "DEFAULT_ENVIRONMENT_RELEASE_ID" }, { "create_time" : "2020-07-31T06:41:43Z", "name" : "DEV", "remark" : "Development environment", "id" : "7a1ad0c350844ee69479b47df9a881cb" } ] } 状态码: 400 Bad Request { "error_code" : "APIG.2012", "error_msg" : "Invalid parameter value,parameterName:name. 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" } 状态码: 500 Internal Server Error { "error_code" : "APIG.9999", "error_msg" : "System error" }
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 size Integer 本次返回的列表长度 total Long 满足条件的记录数 envs Array of EnvInfo objects 本次返回的环境列表 表5 EnvInfo 参数 参数类型 描述 create_time String 创建时间 name String 环境名称 remark String 描述信息 id String 环境id 状态码: 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 错误描述 状态码: 500 表9 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述
  • URI GET /v2/{project_id}/apigw/instances/{instance_id}/envs 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目ID,获取方式请参见获取项目ID。 instance_id 是 String 实例ID,在API网关控制台的“实例信息”中获取。 表2 Query参数 参数 是否必选 参数类型 描述 offset 否 Long 偏移量,表示从此偏移量开始查询,偏移量小于0时,自动转换为0 缺省值:0 limit 否 Integer 每页显示的条目数量,条目数量小于等于0时,自动转换为20,条目数量大于500时,自动转换为500 最小值:1 最大值:500 缺省值:20 name 否 String 环境名称
共100000条