云服务器内容精选

  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 size Integer 本次返回的列表长度 total Long 满足条件的记录数 ingress_port_infos Array of IngressPortInfo objects 实例自定义入方向端口列表。 表5 IngressPortInfo 参数 参数类型 描述 protocol String 实例自定义入方向端口协议。 HTTP:实例自定义入方向端口使用HTTP协议。 HTTPS:实例自定义入方向端口使用HTTPS协议。 枚举值: HTTP HTTPS ingress_port Integer 实例自定义入方向端口,支持的端口范围为1024~49151。 最小值:1024 最大值:49151 ingress_port_id String 实例自定义入方向端口ID。 最小长度:32 最大长度:36 status String 实例自定义入方向端口的有效状态。 normal:实例自定义入方向端口状态正常。 abnormal:实例自定义入方向端口状态异常,无法使用。 枚举值: normal abnormal 状态码: 401 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 403 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 500 表8 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述
  • 响应示例 状态码: 200 OK { "total" : 1, "size" : 1, "ingress_port_infos" : [ { "protocol" : "HTTP", "ingress_port" : 8080, "ingress_port_id" : "0ae98839d78043d8a6dff54d7cb096dc", "status" : "normal" } ] } 状态码: 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" }
  • URI GET /v2/{project_id}/apigw/instances/{instance_id}/custom-ingress-ports 表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 protocol 否 String 入方向端口的请求协议。 HTTP: 入方向端口为HTTP协议。 HTTPS: 入方向端口为HTTPS协议。 枚举值: HTTP HTTPS ingress_port 否 Integer 入方向端口的端口号,支持的端口范围为1024~49151。 最小值:1024 最大值:49151
  • 响应参数 状态码: 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 错误描述
  • URI DELETE /v2/{project_id}/apigw/instances/{instance_id}/custom-ingress-ports/{ingress_port_id} 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目ID,获取方式请参见获取项目ID。 instance_id 是 String 实例ID,在API网关控制台的“实例信息”中获取。 ingress_port_id 是 String 实例自定义入方向端口ID。
  • 响应示例 状态码: 400 Bad Request { "error_code" : "APIC.7211", "error_msg" : "Parameter value does not match the rules, parameter name[ingress_port_id]" } 状态码: 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.7302", "error_msg" : "Instance not found" } 状态码: 500 Internal Server Error { "error_code" : "APIC.9000", "error_msg" : "Failed to request internal service" }
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 size Integer 本次返回的列表长度 total Long 满足条件的记录数 orchestrations Array of OrchestrationBaseResp objects 本次查询到的编排规则列表。 表5 OrchestrationBaseResp 参数 参数类型 描述 orchestration_name String 编排映射规则名称。 支持英文,数字,下划线,且只能以英文开头,3-64个字符,同一实例下不允许重名。 最小长度:3 最大长度:64 orchestration_strategy String 编排策略,有以下几种策略类型: list:列表; hash:哈希; range:区间; hash_range: 哈希+区间; none_value: 空值映射; default: 默认值映射; head_n: 截取前n项; tail_n: 截取后n项; 当编排策略为list时,orchestration_map列表长度*map_param_list长度不超过3000。 枚举值: list hash range hash_range none_value default head_n tail_n orchestration_mapped_param OrchestrationMappedParam object 编排后的参数配置,isPreprocessing为false时必填。 is_preprocessing Boolean 是否为预处理策略,预处理策略只会生成临时参数作为后面参数编排规则的入参标记。当为预处理策略时,该编排规则不能作为除default之外的最后一个编排规则。 orchestration_id String 编排规则编号。 orchestration_create_time String 编排规则创建时间。 orchestration_update_time String 编排规则更新时间。 表6 OrchestrationMappedParam 参数 参数类型 描述 mapped_param_name String 编排后的请求参数名,只支持英文,数字,中划线,必须以英文开头,1-128个字符,不能与已有的参数重名,默认会透传到后端。 最小长度:1 最大长度:128 mapped_param_type String 编排后的参数类型,支持string和number。 枚举值: string number mapped_param_location String 编排后的参数位置,支持query和header。 枚举值: query header 状态码: 400 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 401 表8 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 403 表9 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 404 表10 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 500 表11 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述
  • 响应示例 状态码: 200 OK { "total" : 2, "size" : 2, "orchestrations" : [ { "orchestration_id" : "76545e81d9cb4424bf704ef2b0ac7600", "orchestration_name" : "orchestration_demo_1", "orchestration_create_time" : "2023-07-02T12:31:23.353Z", "orchestration_update_time" : "2023-07-02T13:31:23.353Z", "orchestration_strategy" : "list", "orchestration_mapped_param" : { "mapped_param_name" : "shared-tag", "mapped_param_type" : "number", "mapped_param_location" : "header" } }, { "orchestration_id" : "yt655e81d9cb4424bf704ef2b0ac7600", "orchestration_name" : "orchestration_demo_2", "orchestration_create_time" : "2023-07-02T12:31:23.353Z", "orchestration_update_time" : "2023-07-02T13:31:23.353Z", "orchestration_strategy" : "range", "orchestration_mapped_param" : { "mapped_param_name" : "shared-tag", "mapped_param_type" : "number", "mapped_param_location" : "header" } } ] } 状态码: 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.3030", "error_msg" : "The instance does not exist;id:f0fa1789-3b76-433b-a787-9892951c620ec" } 状态码: 500 Internal Server Error { "error_code" : "APIG.9999", "error_msg" : "System error" }
  • URI GET /v2/{project_id}/apigw/instances/{instance_id}/orchestrations 表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 orchestration_name 否 String 编排规则名称。 precise_search 否 String 指定需要精确匹配查找的参数名称,多个参数需要支持精确匹配时参数之间使用“,”隔开。当前仅支持orchestration_name。 orchestration_id 否 String 编排规则编号。 支持指定多个编号作为查询条件,多个参数之间使用“,”隔开,支持的查询参数个数与api允许绑定的参数规则上限保持一致,具体请参考产品介绍的“配额说明”章节。
  • 响应示例 状态码: 200 OK { "total_count" : 20 } 状态码: 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" }
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。通过调用 IAM 服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 表3 请求Body参数 参数 是否必选 参数类型 描述 without_any_tag 否 Boolean 不包含任意一个标签,该字段为true时查询所有不带标签的资源,此时忽略 “tags”字段。 该字段为false或者未提供该参数时,该条件不生效。 tags 否 Array of TmsKeyValues objects 包含标签,最多包含20个key,每个key下面的value最多20个。无tag过滤条件时返回全量数据。 数组长度:0 - 20 sys_tags 否 Array of TmsKeyValues objects 企业项目.仅op_service权限可以使用此字段做资源实例过滤条件. 无sys_tags时按照tag接口处理,无tag过滤条件时返回全量数据。 数组长度:0 - 1 matches 否 Array of TmsMatchesKeyValue objects 搜索字段,key为要匹配的字段,当前限定为resource_name。value为匹配的值。 根据key的值确认是否需要模糊匹配,如resource_name需要实现前缀搜索。 表4 TmsKeyValues 参数 是否必选 参数类型 描述 key 否 String 键。 支持可用 UTF-8 格式表示的字母(包含中文)、数字和空格,以及以下字符: _ . : = + - @; _sys_开头属于系统标签,租户不能输入 最小长度:1 最大长度:128 values 否 Array of strings 值。 支持可用 UTF-8 格式表示的字母(包含中文)、数字和空格,以及以下字符: _ . : / = + - @ 表5 TmsMatchesKeyValue 参数 是否必选 参数类型 描述 key 否 String 要匹配的字段 resource_name 表示按照APIG实例的名称去匹配 枚举值: resource_name value 否 String 值。 支持可用 UTF-8 格式表示的字母(包含中文)、数字和空格,以及以下字符: _ . : / = + - @ 最大长度:255
  • 请求示例 查询包含指定标签的实例数量 { "without_any_tag" : false, "tags" : [ { "key" : "test-key", "values" : [ "test-value" ] } ], "matches" : [ { "key" : "resource_name", "value" : "test-apig" } ] } 查询企业项目id为指定值的实例数量 { "without_any_tag" : false, "sys_tags" : [ { "key" : "_sys_enterprise_project_id", "values" : [ "0" ] } ], "matches" : [ { "key" : "resource_name", "value" : "test-apig" } ] }
  • 响应参数 状态码: 200 表6 响应Body参数 参数 参数类型 描述 total_count Integer 总记录数 状态码: 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 错误描述
  • 响应示例 状态码: 200 OK { "total" : 1, "size" : 1, "domain_infos" : [ { "group_id" : "73c58022f20d495aa18885d718647f09", "group_name" : "group_01", "domain_name" : "test.com" } ] } 状态码: 400 Bad Request { "error_code" : "APIG.2012", "error_msg" : "Invalid parameter value,parameterName:ingress_port_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" } 状态码: 500 Internal Server Error { "error_code" : "APIG.9999", "error_msg" : "System error" }
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 size Integer 本次返回的列表长度 total Long 满足条件的记录数 domain_infos Array of PortBindingDomainInfo objects 入方向端口绑定的 域名 信息列表。 表5 PortBindingDomainInfo 参数 参数类型 描述 group_id String 入方向端口绑定的API分组编号。 最小长度:0 最大长度:64 group_name String 入方向端口绑定的API分组名称。 最小长度:3 最大长度:255 domain_name String 入方向端口绑定的域名。 最小长度:0 最大长度:255 状态码: 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 错误描述