华为云用户手册

  • 响应参数 状态码: 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.3215", "error_msg" : "The livedata API name already exists" } 状态码: 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" }
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 表3 请求Body参数 参数 是否必选 参数类型 描述 type 是 String 校验类型: path:路径类型 name:名称类型 ld_api_name 否 String 自定义后端API名称。 type = name时必填 ld_api_method 否 String 自定义后端API请求方式。 type = path时必填 ld_api_path 否 String 自定义后端API的访问地址。 type = path时必填 roma_app_id 否 String 集成应用ID。 校验应用下后端API定义是否重复时必填
  • 响应示例 状态码: 200 OK { "app_id" : "98df09fb-d459-4cbf-83a7-2b55ca6f3d5d", "config_name" : "app-config-demo", "config_type" : 1, "config_value" : "", "description" : "", "id" : "a8bf4963c54544be81d5af4cc4630bde", "update_time" : "2020-09-07T07:05:41.96969041Z" } 状态码: 400 Bad Request { "error_code" : "APIG.2011", "error_msg" : "Invalid parameter value,parameterName:config_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" } 状态码: 404 Not Found { "error_code" : "APIG.3081", "error_msg" : "authorizer with id: 0d982c1ac3da493dae47627b6439fc5c not found" } 状态码: 500 Internal Server Error { "error_code" : "APIG.9999", "error_msg" : "System error" }
  • 响应参数 状态码: 200 表3 响应Body参数 参数 参数类型 描述 id String 应用配置编号 app_id String 应用编号 config_type String 应用配置类型 config_name String 应用配置名称 config_value String 应用配置值 update_time String 应用配置更新时间 description String 应用配置描述 状态码: 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 表3 响应Body参数 参数 参数类型 描述 id String 证书ID name String 证书名称 type String 证书类型 global:全局证书 instance:实例证书 instance_id String 实例编码 type为global时,缺省为common type为instance时,为实例编码 project_id String 租户项目编号 common_name String 域名 san Array of strings san扩展域名 not_after String 有效期到 signature_algorithm String 签名算法 create_time String 创建时间 update_time String 更新时间 algorithm_type String 证书算法类型: RSA ECC SM2 is_has_trusted_root_ca Boolean 是否存在信任的根证书CA。当绑定证书存在trusted_root_ca时为true。 缺省值:false version Integer 版本 organization Array of strings 公司、组织 organizational_unit Array of strings 部门 locality Array of strings 城市 state Array of strings 省份 country Array of strings 国家 not_before String 有效期从 serial_number String 序列号 issuer Array of strings 颁发者 状态码: 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 { "id" : "a27be832f2e9441c8127fe48e3b5ac67", "name" : "cert_demo", "common_name" : "apigtest.xxx.com", "san" : [ "apigtest.xxx.com", "*.san.com" ], "version" : 3, "organization" : [ "company" ], "organizational_unit" : [ "IT" ], "locality" : [ "city" ], "state" : [ "state" ], "country" : [ "Country" ], "not_before" : "2019-06-01T00:00:00Z", "not_after" : "2031-08-16T06:36:13Z", "serial_number" : "13010", "issuer" : [ "SSL Inc" ], "signature_algorithm" : "SHA256-RSA", "create_time" : "2021-08-20T02:03:53Z", "update_time" : "2021-08-20T02:03:53Z", "algorithm_type" : "RSA" } 状态码: 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" }
  • 请求示例 修改指定SSL证书的证书内容和证书私钥 { "name" : "cert_demo", "private_key" : "'-----BEGIN PRIVATE KEY-----THIS IS YOUR PRIVATE KEY-----END PRIVATE KEY-----'", "cert_content" : "'-----BEGIN CERTIFICATE-----THIS IS YOUR CERT CONTENT-----END CERTIFICATE-----'" }
  • 响应示例 状态码: 200 OK { "id" : "a27be832f2e9441c8127fe48e3b5ac67", "name" : "cert_demo", "common_name" : "apigtest.xxx.com", "san" : [ "apigtest.xxx.com", "*.san.com" ], "version" : 3, "organization" : [ "company" ], "organizational_unit" : [ "IT" ], "locality" : [ "city" ], "state" : [ "state" ], "country" : [ "Country" ], "not_before" : "2019-06-01T00:00:00Z", "not_after" : "2031-08-16T06:36:13Z", "serial_number" : "13010", "issuer" : [ "SSL Inc" ], "signature_algorithm" : "SHA256-RSA", "create_time" : "2021-08-20T02:03:53Z", "update_time" : "2021-08-20T02:03:53Z", "algorithm_type" : "RSA" } 状态码: 400 Bad Request { "error_code" : "APIG.3325", "error_msg" : "The dictionary name already exists" } 状态码: 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" }
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 id String 证书ID name String 证书名称 type String 证书类型 global:全局证书 instance:实例证书 instance_id String 实例编码 type为global时,缺省为common type为instance时,为实例编码 project_id String 租户项目编号 common_name String 域名 san Array of strings san扩展域名 not_after String 有效期到 signature_algorithm String 签名算法 create_time String 创建时间 update_time String 更新时间 algorithm_type String 证书算法类型: RSA ECC SM2 is_has_trusted_root_ca Boolean 是否存在信任的根证书CA。当绑定证书存在trusted_root_ca时为true。 缺省值:false version Integer 版本 organization Array of strings 公司、组织 organizational_unit Array of strings 部门 locality Array of strings 城市 state Array of strings 省份 country Array of strings 国家 not_before String 有效期从 serial_number String 序列号 issuer Array of strings 颁发者 状态码: 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参数 参数 是否必选 参数类型 描述 name 是 String 证书名称 cert_content 是 String 证书内容 private_key 是 String 证书私钥 type 否 String 证书可见范围: instance global 编辑证书时不支持修改为其他可见范围 缺省值:global instance_id 否 String 所属实例ID,当type=instance时必填 trusted_root_ca 否 String 信任的根证书CA algorithm_type 否 String 证书算法类型: RSA ECC SM2 cert_content_sign 否 String 签名类型证书内容,仅algorithm_type=SM2时必填 最大长度:8092 private_key_sign 否 String 签名类型私钥内容,仅algorithm_type=SM2时必填 最大长度:8092
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 total Integer 总数 最小值:0 最大值:9999999999999999 size Integer 本次返回数量 最小值:1 最大值:999 items Array of ProductTopic objects 产品主题列表 数组长度:0 - 9999 表5 ProductTopic 参数 参数类型 描述 product_id Integer 归属产品ID 最小值:1 最大值:99999999999999999 topic_id String 产品主题ID 最小长度:1 最大长度:99999999999999999 permission Integer 主题权限 0-发布 1-订阅 最小值:0 最大值:10 topic_name String 主题名称 最小长度:0 最大长度:64 version String 版本号 最小长度:0 最大长度:10 description String 描述 最小长度:0 最大长度:200 状态码: 400 表6 响应Body参数 参数 参数类型 描述 error_code String 系统错误码,针对4xx和5xx类HTTP错误码的详细错误码 最小长度:0 最大长度:64 error_msg String 错误描述 最小长度:0 最大长度:200 request_id String 消息ID 最小长度:0 最大长度:64 状态码: 404 表7 响应Body参数 参数 参数类型 描述 error_code String 系统错误码,针对4xx和5xx类HTTP错误码的详细错误码 最小长度:0 最大长度:64 error_msg String 错误描述 最小长度:0 最大长度:200 request_id String 消息ID 最小长度:0 最大长度:64 状态码: 500 表8 响应Body参数 参数 参数类型 描述 error_code String 系统错误码,针对4xx和5xx类HTTP错误码的详细错误码 最小长度:0 最大长度:64 error_msg String 错误描述 最小长度:0 最大长度:200 request_id String 消息ID 最小长度:0 最大长度:64
  • 响应示例 状态码: 200 OK { "total" : 1, "size" : 1, "items" : [ { "product_id" : 122888, "topic_id" : "17", "permission" : 1, "topic_name" : "/3.0/${deviceId}/t1", "version" : "3.0", "description" : "description" } ] } 状态码: 400 Bad Request { "error_code" : "SCB.00000000", "error_msg" : "Parameter is not valid for operation [romalink.link-product-topic.queryProductTopic]. Parameter is [productId]. Processor is [path].", "request_id" : "cb39e78a-afd3-4e04-901d-70468b1c23dc-1619602712496-cnnorth7a-P-romalink-service01" } 状态码: 404 Not Found { "error_code" : "ROMA.00110006", "error_msg" : "The resource does not exist. Check whether the resource ID ff38023c-0854-4779-847d-72528e1f5da5 is correct.", "request_id" : "72b07918-f6a2-4721-81bf-f3fd5486025e-1619663576836-cnnorth7a-P-romalink-service01" } 状态码: 500 Internal Server Error { "error_code" : "ROMA.00110002", "error_msg" : "The instance does not exist. project_id: 397cd10b30544c588b2f4a56d83856c4, instance_id: f3bb386a-23ec-47aa-9943-4c60ac658611", "request_id" : "c8c06d0a-be92-4fdf-9d10-bc20131ab158-1619593104919-cnnorth7a-P-romalink-service01" }
  • 响应示例 状态码: 201 Created { "total" : 1, "size" : 1, "member_groups" : [ { "member_group_name" : "vpc_member_group", "member_group_id" : "105c6902457144a4820dff8b1ad63331", "member_group_remark" : "", "member_group_weight" : 10, "create_time" : "2020-07-23T07:24:33Z", "update_time" : "2020-07-23T07:24:33Z" } ] } 状态码: 400 Bad Request { "error_code" : "APIG.2001", "error_msg" : "The request parameters must be specified, parameter name: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.3030", "error_msg" : "The instance does not exist;id:f0fa1789-3b76-433b-a787-9892951c620e" } 状态码: 500 Internal Server Error { "error_code" : "APIG.9999", "error_msg" : "System error" }
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 表3 请求Body参数 参数 是否必选 参数类型 描述 member_groups 否 Array of MemberGroupCreate objects 后端服务器组列表 表4 MemberGroupCreate 参数 是否必选 参数类型 描述 member_group_name 是 String VPC通道后端服务器组名称 member_group_remark 否 String VPC通道后端服务器组描述 member_group_weight 否 Integer VPC通道后端服务器组权重值。 当前服务器组存在服务器且此权重值存在时,自动使用此权重值分配权重。 最小值:0 最大值:100 dict_code 否 String VPC通道后端服务器组的字典编码 支持英文,数字,特殊字符(-_.) 暂不支持 最小长度:3 最大长度:64 microservice_version 否 String VPC通道后端服务器组的版本,仅VPC通道类型为微服务时支持。 最大长度:64 microservice_port 否 Integer VPC通道后端服务器组的端口号,仅VPC通道类型为微服务时支持。端口号为0时后端服务器组下的所有地址沿用原来负载端口继承逻辑。 最小值:0 最大值:65535 microservice_labels 否 Array of MicroserviceLabel objects VPC通道后端服务器组的标签,仅VPC通道类型为微服务时支持。 表5 MicroserviceLabel 参数 是否必选 参数类型 描述 label_name 是 String 标签名称。 以字母或者数字开头和结尾,由字母、数字、连接符('-')、下划线('_')、点号('.')组成且63个字符之内。 最小长度:1 最大长度:63 label_value 是 String 标签值。 以字母或者数字开头和结尾,由字母、数字、连接符('-')、下划线('_')、点号('.')组成且63个字符之内。 最小长度:1 最大长度:63
  • 响应参数 状态码: 201 表6 响应Body参数 参数 参数类型 描述 size Integer 本次返回的列表长度 total Long 满足条件的记录数 member_groups Array of MemberGroupInfo objects VPC通道后端服务器组列表 表7 MemberGroupInfo 参数 参数类型 描述 member_group_name String VPC通道后端服务器组名称 member_group_remark String VPC通道后端服务器组描述 member_group_weight Integer VPC通道后端服务器组权重值。 当前服务器组存在服务器且此权重值存在时,自动使用此权重值分配权重。 最小值:0 最大值:100 dict_code String VPC通道后端服务器组的字典编码 支持英文,数字,特殊字符(-_.) 暂不支持 最小长度:3 最大长度:64 microservice_version String VPC通道后端服务器组的版本,仅VPC通道类型为微服务时支持。 最大长度:64 microservice_port Integer VPC通道后端服务器组的端口号,仅VPC通道类型为微服务时支持。端口号为0时后端服务器组下的所有地址沿用原来负载端口继承逻辑。 最小值:0 最大值:65535 microservice_labels Array of MicroserviceLabel objects VPC通道后端服务器组的标签,仅VPC通道类型为微服务时支持。 member_group_id String VPC通道后端服务器组编号 create_time String VPC通道后端服务器组创建时间 update_time String VPC通道后端服务器组更新时间 表8 MicroserviceLabel 参数 参数类型 描述 label_name String 标签名称。 以字母或者数字开头和结尾,由字母、数字、连接符('-')、下划线('_')、点号('.')组成且63个字符之内。 最小长度:1 最大长度:63 label_value String 标签值。 以字母或者数字开头和结尾,由字母、数字、连接符('-')、下划线('_')、点号('.')组成且63个字符之内。 最小长度:1 最大长度:63 状态码: 400 表9 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 401 表10 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 403 表11 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 404 表12 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 500 表13 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述
  • 响应示例 状态码: 200 OK { "failure" : [ { "acl_id" : "7eb619ecf2a24943b099833cd24a01ba", "acl_name" : "acl_demo", "error_code" : "APIG.3447", "error_msg" : "The Acl Strategy has already binded to APIs" } ], "success_count" : 1 } 状态码: 400 Bad Request { "error_code" : "APIG.2011", "error_msg" : "Invalid parameter value: parameter action should be \\\"delete\\\"" } 状态码: 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-9892951c620e" } 状态码: 500 Internal Server Error { "error_code" : "APIG.9999", "error_msg" : "System error" }
  • 响应参数 状态码: 200 表5 响应Body参数 参数 参数类型 描述 success_count Integer 删除成功的ACL策略数量 failure Array of AclBatchFailure objects 删除失败的ACL策略及错误信息 表6 AclBatchFailure 参数 参数类型 描述 acl_id String 删除失败的ACL策略ID acl_name String 删除失败的ACL策略名称 error_code String 删除失败的错误码 error_msg String 删除失败的错误信息 状态码: 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 错误描述
  • 请求示例 POST https://{endpoint}/v2/{engine}/{project_id}/instances/{instance_id}/groups/{group_id}/reset-message-offset { "topic" : "test", "partition" : 0, "message_offset" : 10 } POST https://{endpoint}/v2/{engine}/{project_id}/instances/{instance_id}/groups/{group_id}/reset-message-offset { "topic" : "test", "partition" : 0, "timestamp" : 1571812144000 }
  • URI PUT /v2/{engine}/{project_id}/mqs/instances/{instance_id}/groups/{group_id}/reset-message-offset 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目ID。 instance_id 是 String 实例ID。 engine 是 String 引擎类型。 group_id 是 String 消费组id。
  • 请求参数 表2 请求Body参数 参数 是否必选 参数类型 描述 topic 是 String topic名称。 partition 否 Integer 分区编号,默认值为-1,若传入值为-1,则重置所有分区。 message_offset 否 Integer 重置消费进度到指定偏移量。 如果传入offset小于当前最小的offset,则重置到最小的offset。 如果大于最大的offset,则重置到最大的offset。 message_offset、timestamp二者必选其一。 timestamp 否 Integer 重置消费进度到指定时间,格式为unix时间戳,单位为毫秒。 如果传入timestamp早于当前最早的timestamp,则重置到最早的timestamp。 如果晚于最晚的timestamp,则重置到最晚的timestamp。 message_offset、timestamp二者必选其一。
  • 响应参数 状态码: 200 表3 响应Body参数 参数 参数类型 描述 failed_groups Array of FailedGroupsEntity objects 删除失败的消费组列表。 total Integer 删除失败的个数。 表4 FailedGroupsEntity 参数 参数类型 描述 group_id String 删除失败的消费组ID。 error_message String 删除失败的原因。
  • 响应示例 状态码: 200 查询实例集群的所有消费组成功。 { "groups" : [ { "createdAt" : 1691401194847, "group_id" : "consumer-1", "state" : "EMPTY", "coordinator_id" : 1, "lag" : 0, "group_desc" : null }, { "createdAt" : 1691401194960, "group_id" : "consumer-2", "state" : "STABLE", "coordinator_id" : 2, "lag" : 0, "group_desc" : null }, { "createdAt" : 1691401207309, "group_id" : "consumer-3", "state" : "STABLE", "coordinator_id" : 3, "lag" : 0, "group_desc" : null } ], "total" : 3 }
  • URI GET /v2/{project_id}/mqs/instances/{instance_id}/groups 表1 路径参数 参数 是否必选 参数类型 描述 instance_id 是 String 实例ID。 project_id 是 String 项目ID。 表2 Query参数 参数 是否必选 参数类型 描述 offset 否 Integer 偏移量,表示从此偏移量开始查询, offset大于等于0。 limit 否 Integer 当次查询返回的最大消费组id个数,默认值为10,取值范围为1~50。 group 否 String 消费组名过滤查询,过滤方式为字段包含过滤。
  • 响应参数 状态码: 200 表3 响应Body参数 参数 参数类型 描述 [数组元素] Array of ListInstanceGroupResp objects 查询实例集群的所有消费组成功。 表4 ListInstanceGroupResp 参数 参数类型 描述 groups Array of ListGroupEntity objects 所有的消费组。 total Integer 所有的消费组总数。 表5 ListGroupEntity 参数 参数类型 描述 createdAt Integer 创建时间。 group_id String 消费组ID。 state String 消费组状态。包含以下状态: Dead:消费组内没有任何成员,且没有任何元数据。 Empty:消费组内没有任何成员,存在元数据。 PreparingRebalance:准备开启rebalance。 CompletingRebalance:所有成员加入group。 Stable:消费组内成员可正常消费。 coordinator_id Integer 协调器编号。 group_desc String 消费组描述。 lag Integer 堆积数。
  • URI GET /v2/{project_id}/mqs/instances/{instance_id}/topics/diskusage 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目ID。 instance_id 是 String 实例ID。 表2 Query参数 参数 是否必选 参数类型 描述 minSize 否 String 占用磁盘大小,默认单位G (K ,M , G)。范围:1-10000 top 否 String 占用磁盘大小,查询top N。范围:1-1000 percentage 否 String 占用磁盘大小,查询大于占比的分区。范围:1-100
  • 请求示例 查询成功。 "GET https://{endpoint}/v2/{project_id}/instances/{instance_id}/topics/diskusage" { "broker_list" : [ { "broker_name" : "broker-0", "data_disk_size" : "66G", "data_disk_use" : "53M", "data_disk_free" : "63G", "data_disk_use_percentage" : "1", "status" : "Success get info", "topic_list" : [ { "size" : "12K", "topic_name" : "topic-test", "topic_partition" : "2", "percentage" : 1.7339533025568183E-5 }, { "size" : "12K", "topic_name" : "__consumer_offsets", "topic_partition" : "4", "percentage" : 1.7339533025568183E-5 }, { "size" : "12K", "topic_name" : "__consumer_offsets", "topic_partition" : "3", "percentage" : 1.7339533025568183E-5 }, { "size" : "8.0K", "topic_name" : "__trace", "topic_partition" : "6", "percentage" : 1.1559688683712121E-5 }, { "size" : "8.0K", "topic_name" : "__trace", "topic_partition" : "4", "percentage" : 1.1559688683712121E-5 }, { "size" : "8.0K", "topic_name" : "__trace", "topic_partition" : "2", "percentage" : 1.1559688683712121E-5 }, { "size" : "8.0K", "topic_name" : "__trace", "topic_partition" : "0", "percentage" : 1.1559688683712121E-5 }, { "size" : "8.0K", "topic_name" : "topic-test", "topic_partition" : "0", "percentage" : 1.1559688683712121E-5 }, { "size" : "8.0K", "topic_name" : "topic-1568537362", "topic_partition" : "2", "percentage" : 1.1559688683712121E-5 }, { "size" : "8.0K", "topic_name" : "__consumer_offsets", "topic_partition" : "7", "percentage" : 1.1559688683712121E-5 } ] } ] }
  • 响应示例 状态码: 200 OK { "broker_list" : [ { "broker_name" : "broker-0", "data_disk_size" : "66G", "data_disk_use" : "53M", "data_disk_free" : "63G", "data_disk_use_percentage" : "1", "status" : "Success get info", "topic_list" : [ { "size" : "12K", "topic_name" : "topic-test", "topic_partition" : "2", "percentage" : 1.7339533025568183E-5 }, { "size" : "12K", "topic_name" : "__consumer_offsets", "topic_partition" : "4", "percentage" : 1.7339533025568183E-5 }, { "size" : "12K", "topic_name" : "__consumer_offsets", "topic_partition" : "3", "percentage" : 1.7339533025568183E-5 }, { "size" : "8.0K", "topic_name" : "__trace", "topic_partition" : "6", "percentage" : 1.1559688683712121E-5 }, { "size" : "8.0K", "topic_name" : "__trace", "topic_partition" : "4", "percentage" : 1.1559688683712121E-5 }, { "size" : "8.0K", "topic_name" : "__trace", "topic_partition" : "2", "percentage" : 1.1559688683712121E-5 }, { "size" : "8.0K", "topic_name" : "__trace", "topic_partition" : "0", "percentage" : 1.1559688683712121E-5 }, { "size" : "8.0K", "topic_name" : "topic-test", "topic_partition" : "0", "percentage" : 1.1559688683712121E-5 }, { "size" : "8.0K", "topic_name" : "topic-1568537362", "topic_partition" : "2", "percentage" : 1.1559688683712121E-5 }, { "size" : "8.0K", "topic_name" : "__consumer_offsets", "topic_partition" : "7", "percentage" : 1.1559688683712121E-5 } ] } ] } 状态码: 400 查询失败。 { "error_code" : 400, "error_msg" : "Bad Request" } 状态码: 403 查询失败。 { "error_code" : 403, "error_msg" : "Forbidden" }
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 broker_name String broker名称 data_disk_size String 磁盘大小 data_disk_use String 已使用磁盘大小 data_disk_free String 空闲磁盘大小 data_disk_use_percentage Integer 磁盘使用率 status String 查询状态 topic_list Array of TopicListEnity objects topic列表 表5 TopicListEnity 参数 参数类型 描述 size String 大小 topic_name String topic名称 topic_partition Integer topic分区 percentage String 使用百分比 状态码: 400 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误信息 状态码: 403 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误信息
  • 响应示例 状态码: 200 查询实例集群的消费组信息成功。 { "group" : { "members" : [ { "host" : "/172.31.1.102", "assignment" : [ { "topic" : "test", "partitions" : [ 0, 1, 2 ] } ], "member_id" : "consumer-1-6b8ee551-d499-47d4-9beb-ba1527496785", "client_id" : "consumer-1" } ], "state" : "STABLE", "group_id" : "test-consumer-group", "coordinator_id" : 2, "group_message_offsets" : [ { "partition" : 0, "lag" : 31396, "topic" : "test", "message_current_offset" : 935, "message_log_end_offset" : 32331 }, { "partition" : 0, "lag" : 0, "topic" : "aaaa", "message_current_offset" : 0, "message_log_end_offset" : 0 }, { "partition" : 1, "lag" : 31279, "topic" : "test", "message_current_offset" : 1058, "message_log_end_offset" : 32337 }, { "partition" : 1, "lag" : 0, "topic" : "aaaa", "message_current_offset" : 0, "message_log_end_offset" : 0 }, { "partition" : 2, "lag" : 31603, "topic" : "test", "message_current_offset" : 739, "message_log_end_offset" : 32342 } ], "assignment_strategy" : "range" } }
共100000条