华为云用户手册

  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。通过调用 IAM 服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 表3 请求Body参数 参数 是否必选 参数类型 描述 name 是 String 产品模板名称,支持中文、英文大小写、数字、下划线和中划线,长度1-64。 description 否 String 产品模板描述,长度0-200。 status 是 Integer 产品模板状态,0-启用,1-禁用。
  • 请求示例 查询成功。 "GET https://{endpoint}/v2/{project_id}/instances/{instance_id}/topics/diskusage?minSize=1G" { "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 错误信息。
  • URI GET /v2/{project_id}/mqs/instances/{instance_id}/topics/diskusage 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目ID。 instance_id 是 String 实例ID。 表2 Query参数 参数 是否必选 参数类型 描述 minSize 否 String 占用磁盘大小,单位(K、M、G)。范围:1-10000。(minSize,top和percentage参数不能同时为空) top 否 String 占用磁盘大小,查询top N。范围:1-1000。(minSize,top和percentage参数不能同时为空) percentage 否 String 占用磁盘大小,查询大于占比的分区。范围:1-100。(minSize,top和percentage参数不能同时为空)
  • 响应示例 状态码: 200 OK { "serial_number" : "219450666855693268010130472645821723203", "version" : 3, "san" : [ "www.company.com" ], "not_before" : "2019-06-01T00:00:00Z", "issuer" : [ "mkcert development CA" ], "not_after" : "2030-08-04T07:41:19Z", "organization" : [ "mkcert development certificate" ], "signature_algorithm" : "SHA256-RSA", "organizational_unit" : [ "Country\\\\DESKTOP-L2TFOFH" ] } 状态码: 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参数 参数 参数类型 描述 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。 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 表4 响应Body参数 参数 参数类型 描述 columns Array of ColumnInfo objects 返回的实体对象。 表5 ColumnInfo 参数 参数类型 描述 field_name String 字段名称。 field_type String 字段类型。 field_length String 字段长度。 null_able String 是否允许为空。 is_partition Boolean 是否是分区字段。 primary String 是否是主键字段。 unique String 是否是唯一键字段。 decimal_digits String 小数部分位数,非数字类型返回null。 状态码: 400 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 detail String 描述详情。 状态码: 404 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 状态码: 500 表8 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。
  • 响应示例 状态码: 201 Created { "msg" : "SENDMESSAGE_SUC CES S.", "code" : "iot.api.device.command.post.service.sendMessage.success" } 状态码: 400 Bad Request { "error_code" : "SCB.00000000", "error_msg" : "Parameter is not valid for operation [romalink.link-device.save]. Parameter is [parent_device_id]. Processor is [body].", "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-72528e1f5da1 is correct.", "request_id" : "624c8be1-39b6-47b7-941d-c159aced368a-1619602544650-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 表5 响应Body参数 参数 参数类型 描述 code String 下发命令响应状态码。 msg String 下发命令具体信息。 状态码: 400 表6 响应Body参数 参数 参数类型 描述 error_code String 系统错误码,针对4xx和5xx类HTTP错误码的详细错误码。 error_msg String 错误描述。 request_id String 消息ID。 状态码: 404 表7 响应Body参数 参数 参数类型 描述 error_code String 系统错误码,针对4xx和5xx类HTTP错误码的详细错误码。 error_msg String 错误描述。 request_id String 消息ID。 状态码: 500 表8 响应Body参数 参数 参数类型 描述 error_code String 系统错误码,针对4xx和5xx类HTTP错误码的详细错误码。 error_msg String 错误描述。 request_id String 消息ID。
  • 请求示例 { "name" : "Authorizer_demo", "type" : "FRONTEND", "authorizer_type" : "LD", "ld_api_id" : "6f8e61317e4e4fbf8e8220cc19fcced9", "authorizer_uri" : "/test", "identities" : [ { "name" : "header", "location" : "HEADER" } ], "ttl" : 5 }
  • 响应示例 状态码: 200 OK { "name" : "Authorizer_demo", "type" : "FRONTEND", "authorizer_type" : "LD", "authorizer_uri" : "/test", "identities" : [ { "name" : "header", "location" : "HEADER" } ], "ttl" : 5, "need_body" : true, "id" : "0d982c1ac3da493dae47627b6439fc5c", "create_time" : "2020-09-23T02:32:10Z", "roma_app_id" : "98df09fb-d459-4cbf-83a7-2b55ca6f3d5d", "roma_app_name" : "app-demo" } 状态码: 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 表5 响应Body参数 参数 参数类型 描述 name String 自定义认证的名称。 长度为3 ~ 64位的字符串,字符串由中文、英文字母、数字、“_”组成,且只能以英文或中文开头。 type String 自定义认证类型 FRONTEND:前端 BACKEND:后端 authorizer_type String 自定义认证函数类型: LD:自定义后端函数 FUNC:函数服务函数 authorizer_uri String 函数地址。 注意:使用自定义后端的函数API,API请求方法必须为POST,且API状态必须为已部署。 network_type String 对接函数的网络架构类型 V1:非VPC网络架构 V2:VPC网络架构 注意:该字段在APIC场景下不生效 authorizer_version String 函数版本。 当函数别名URN和函数版本同时传入时,函数版本将被忽略,只会使用函数别名URN authorizer_alias_uri String 函数别名地址。 当函数别名URN和函数版本同时传入时,函数版本将被忽略,只会使用函数别名URN identities Array of Identity objects 认证来源 ttl Integer 缓存时间 user_data String 用户数据 ld_api_id String 自定义后端服务ID。 自定义认证函数类型为LD时必填 need_body Boolean 是否发送body auth_downgrade_enabled Boolean 宽松模式,连接函数鉴权服务失败或者函数鉴权服务返回5XX,网关是否接受客户端请求。 id String 自定义认证编号 create_time String 创建时间 roma_app_id String 自定义认证所属应用编号 roma_app_name String 自定义认证所属应用名称 表6 Identity 参数 参数类型 描述 name String 参数名称。 支持数字,英文,下划线,中划线,点,且只能以数字或英文开头。 location String 参数位置 validation String 参数校验表达式,默认为null,不做校验 状态码: 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参数 参数 是否必选 参数类型 描述 name 是 String 自定义认证的名称。 长度为3 ~ 64位的字符串,字符串由中文、英文字母、数字、“_”组成,且只能以英文或中文开头。 type 是 String 自定义认证类型 FRONTEND:前端 BACKEND:后端 authorizer_type 是 String 自定义认证函数类型: LD:自定义后端函数 FUNC:函数服务函数 authorizer_uri 是 String 函数地址。 注意:使用自定义后端的函数API,API请求方法必须为POST,且API状态必须为已部署。 network_type 否 String 对接函数的网络架构类型 V1:非VPC网络架构 V2:VPC网络架构 注意:该字段在APIC场景下不生效 authorizer_version 否 String 函数版本。 当函数别名URN和函数版本同时传入时,函数版本将被忽略,只会使用函数别名URN authorizer_alias_uri 否 String 函数别名地址。 当函数别名URN和函数版本同时传入时,函数版本将被忽略,只会使用函数别名URN identities 否 Array of Identity objects 认证来源 ttl 否 Integer 缓存时间 user_data 否 String 用户数据 ld_api_id 否 String 自定义后端服务ID。 自定义认证函数类型为LD时必填 need_body 否 Boolean 是否发送body auth_downgrade_enabled 否 Boolean 宽松模式,连接函数鉴权服务失败或者函数鉴权服务返回5XX,网关是否接受客户端请求。 表4 Identity 参数 是否必选 参数类型 描述 name 是 String 参数名称。 支持数字,英文,下划线,中划线,点,且只能以数字或英文开头。 location 是 String 参数位置 validation 否 String 参数校验表达式,默认为null,不做校验
  • 响应示例 状态码: 400 Bad Request { "error_code" : "SCB.00000000", "error_msg" : "Parameter is not valid for operation [romalink.link-product-topic.deleteProductTopic]. 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" }
  • 响应参数 状态码: 400 表3 响应Body参数 参数 参数类型 描述 error_code String 系统错误码,针对4xx和5xx类HTTP错误码的详细错误码。 error_msg String 错误描述。 request_id String 消息ID。 状态码: 404 表4 响应Body参数 参数 参数类型 描述 error_code String 系统错误码,针对4xx和5xx类HTTP错误码的详细错误码。 error_msg String 错误描述。 request_id String 消息ID。 状态码: 500 表5 响应Body参数 参数 参数类型 描述 error_code String 系统错误码,针对4xx和5xx类HTTP错误码的详细错误码。 error_msg String 错误描述。 request_id String 消息ID。
  • 响应示例 状态码: 201 Created { "permissions" : [ "read", "access", "delete", "modify" ], "id" : 711537, "device_id" : 711537, "parent_device_id" : 711536, "parent_device_name" : "parent-device", "product" : { "product_id" : 116303, "product_name" : "p1", "manufacturer_id" : "p1", "model" : "p1", "product_type" : 0, "protocol_type" : 0 }, "device_name" : "device", "instance_id" : "8993a690-cf61-46af-880d-587d823d14e5", "client_id" : "D116303711537sGDtK", "node_id" : "string", "app_name" : "app", "status" : 0, "online_status" : 2, "description" : "device", "authentication" : { "user_name" : "F01A8D25FE6E4CF5A286B711B31888AE", "password" : "************************" }, "created_user" : { "user_id" : "", "user_name" : "user" }, "last_updated_user" : { "user_id" : "", "user_name" : "user" }, "tags" : [ ], "created_datetime" : 1607408244841, "last_updated_datetime" : 1607422571094, "connect_address" : "xx.xx.xx.xx", "ssl_connect_address" : "xx.xx.xx.xx", "ipv6_connect_address" : "xx.xx.xx.xx", "ipv6_ssl_connect_address" : "xx.xx.xx.xx", "node_type" : 0, "device_type" : 0, "app_id" : "cb4b3ec0-8f7f-432f-b05e-fc149d05da5d" } 状态码: 400 Bad Request { "error_code" : "SCB.00000000", "error_msg" : "Parameter is not valid for operation [romalink.link-device.save]. Parameter is [parent_device_id]. Processor is [body].", "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-72528e1f5da1 is correct.", "request_id" : "624c8be1-39b6-47b7-941d-c159aced368a-1619602544650-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" }
  • 请求示例 创建一个设备,协议类型为MQTT,产品类型为普通产品,设备状态为启用。 { "parent_device_id" : 10001, "product" : { "product_id" : 10001, "product_name" : "testproduct", "manufacturer_id" : "test", "model" : "mate30pro", "protocol_type" : 0, "product_type" : 0 }, "password" : "**********", "device_name" : "device", "node_id" : "D32145A100FF", "app_id" : "ef3845be-091a-4ab5-869a-9de0025e2165", "status" : 0, "description" : "device", "tags" : [ "tag1", "tag2" ] }
  • 响应示例 状态码: 200 OK { "total" : 99999, "size" : 99999, "entities" : [ { "id" : "id123456789", "start_time" : 1603243428000, "dispatch_time" : 1603243428000, "end_time" : 1603243428000, "execute_status" : "RUNNING", "position" : "READER", "position_status" : "NORMAL", "status" : 504, "dirty_data_count" : 0, "data_count" : 100, "data_size" : 1000, "data_size_unit" : "B", "spend_time" : 5000, "read_spend_time" : 5000, "write_spend_time" : 5000, "remarks" : "Task execute success", "detail_logs" : [ { "id" : "id123456789", "status" : 500, "position" : "READER", "position_status" : "NORMAL", "stage" : "adapter", "dirty_data_count" : 0, "data_count" : 100, "data_size" : 1000, "data_size_unit" : "B", "spend_time" : 5000, "remarks" : "task start successfully.", "step_begin_time" : 1603243428000, "step_end_time" : 1603243428000 } ] } ] }
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 total Integer 总数。 size Integer 当前页日志数量。 entities Array of TaskMonitorLog objects 任务监控日志当前页元素。 表5 TaskMonitorLog 参数 参数类型 描述 id String 单次任务执行的跟踪ID。 start_time Integer 本次执行启动时间,格式timestamp(ms),使用UTC时区。 dispatch_time Integer 计划执行时间,格式timestamp(ms),使用UTC时区。 end_time Integer 写入结束时间,格式timestamp(ms),使用UTC时区。 execute_status String 任务本次执行状态: UNSTARTED(未启动) WAITING(等待调度中) RUNNING(执行中) SUCCESS(执行成功) CANCELLED(任务取消) ERROR(执行异常) position String 标识本次任务执行到哪一个阶段: ADAPTER(任务处于初始化阶段) READER(任务正在执行Reader读操作) WRITER(任务正在执行Writer写操作) position_status String 任务本次执行当前阶段的状态: NORMAL(正在运行) NODE_END(本节点正常结束) RUNTIME_CANCEL(任务被取消) TASK_END(本任务正常结束) RUNTIME_ERR(运行时异常) INTERNAL_ERR(内部程序异常) status Integer 本次任务执行详细状态,状态码划分规则:reader端 100 ~ 499,writer端 500 ~ 899,其他900 ~ : 16(被强制取消) 99(任务开始) 100(Reader 任务开始) 101(Reader 任务结束) 102(正在读取数据) 103(读端数据源端异常) 104(读取数据结束) 105(读取数据为0) 106(读任务强制取消) 107(在reader plugin中,任务发生了中断) 108(读任务恢复运行) 500(Writer 任务开始) 501(Writer 任务结束) 502(正在数据写入) 503(目标端异常) 504(数据写入结束) 505(写任务强制取消) 506(在writer plugin中,任务发生了中断) 507(写任务恢复运行) 900(接收到调度请求) 901(任务运行结束) 902(任务已运行结束,正在进行数据完整性校验) 903(输出数据完整性校验结果) 904(经过数据完整性校验,发现有数据缺失,正在进行数据补偿) 905(输出数据补偿结果) 906(读取任务正在在排队中(平台资源)) 907(读取任务被拒绝执行,因为上一次调度还没有结束) 908(写入任务正在在排队中(平台资源)) 909(写入任务被拒绝执行,因为上一次调度还没有结束) 911(读取任务没有被正常开启,请检查网络是否通畅,参数是否正确) 912(写入任务没有被正常开启,请检查网络是否通畅,参数是否正确) 913(任务调度请求失败) 914(任务被拒绝执行,因为上一次调度还没有结束) 915(任务不正常运行) 916(任务日志上报异常) dirty_data_count Integer 异常数据条数。 data_count Integer 成功数据条数。 data_size Number 成功数据大小,浮点数类型。 data_size_unit String 成功数据大小的计量单位。 spend_time Integer 执行时长,单位:ms。 read_spend_time Integer 读取执行时长,单位:ms,只有在定时任务时存在该属性。 write_spend_time Integer 写入执行时长,单位:ms。 remarks String 本次执行结果简要信息。 detail_logs Array of TaskMonitorDetailLog objects 本次执行详细轨迹信息。 表6 TaskMonitorDetailLog 参数 参数类型 描述 id String 任务每次执行步骤产生的唯一ID。 status Integer 本次任务执行详细状态,状态码划分规则:reader端 100 ~ 499,writer端 500 ~ 899,其他900 ~ : 16(被强制取消) 99(任务开始) 100(Reader 任务开始) 101(Reader 任务结束) 102(正在读取数据) 103(读端数据源端异常) 104(读取数据结束) 105(读取数据为0) 106(读任务强制取消) 107(在reader plugin中,任务发生了中断) 108(读任务恢复运行) 500(Writer 任务开始) 501(Writer 任务结束) 502(正在数据写入) 503(目标端异常) 504(数据写入结束) 505(写任务强制取消) 506(在writer plugin中,任务发生了中断) 507(写任务恢复运行) 900(接收到调度请求) 901(任务运行结束) 902(任务已运行结束,正在进行数据完整性校验) 903(输出数据完整性校验结果) 904(经过数据完整性校验,发现有数据缺失,正在进行数据补偿) 905(输出数据补偿结果) 906(读取任务正在在排队中(平台资源)) 907(读取任务被拒绝执行,因为上一次调度还没有结束) 908(写入任务正在在排队中(平台资源)) 909(写入任务被拒绝执行,因为上一次调度还没有结束) 911(读取任务没有被正常开启,请检查网络是否通畅,参数是否正确) 912(写入任务没有被正常开启,请检查网络是否通畅,参数是否正确) 913(任务调度请求失败) 914(任务被拒绝执行,因为上一次调度还没有结束) 915(任务不正常运行) 916(任务日志上报异常) position String 标识当前步骤属于哪一个阶段: ADAPTER(任务处于初始化阶段) READER(任务正在执行Reader读操作) WRITER(任务正在执行Writer写操作) position_status String 任务当前步骤的状态: NORMAL(正在运行) NODE_END(本节点正常结束) RUNTIME_CANCEL(任务被取消) TASK_END(本任务正常结束) RUNTIME_ERR(运行时异常) INTERNAL_ERR(内部程序异常) stage String 标识当前步骤属于哪一个FDI插件,如adapter、apireader、rdbwriter等。 dirty_data_count Integer 异常数据条数。 data_count Integer 成功数据条数。 data_size Number 成功数据大小,浮点数类型。 data_size_unit String 成功数据大小的计量单位。 spend_time Integer 执行时长,单位:ms。 remarks String 执行详细信息。 step_begin_time Integer 本次步骤启动时间,格式timestamp(ms),使用UTC时区。 step_end_time Integer 本次步骤结束时间,格式timestamp(ms),使用UTC时区。 状态码: 400 表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 { "name" : "Api_http", "type" : 1, "version" : "V0.0.1", "req_protocol" : "HTTPS", "req_method" : "GET", "req_uri" : "/test/http", "auth_type" : "AUTHORIZER", "auth_opt" : [ { "app_code_auth_type" : "DISABLE" } ], "cors" : false, "match_mode" : "NORMAL", "backend_type" : "HTTP", "remark" : "Web backend Api", "group_id" : "c77f5e81d9cb4424bf704ef2b0ac7600", "body_remark" : "", "result_normal_sample" : "Normal response example", "result_failure_sample" : "Failure response example", "authorizer_id" : "8d0443832a194eaa84244e0c1c1912ac", "tags" : [ ], "roma_app_id" : "f77f5e81d9cb4424bf704ef2b0ac7600", "domain_name" : "", "tag" : "", "id" : "5f918d104dc84480a75166ba99efff21", "status" : 1, "arrange_necessary" : 2, "register_time" : "2020-07-31T12:42:51Z", "update_time" : "2020-08-02T16:32:47.046289Z", "group_name" : "api_group_001", "group_version" : "", "run_env_name" : "RELEASE", "run_env_id" : "DEFAULT_ENVIRONMENT_RELEASE_ID", "publish_id" : "", "publish_time" : "2020-08-03T01:36:00Z", "roma_app_name" : "roma-test", "ld_api_id" : "", "backend_api" : { "url_domain" : "56a7d7358e1b42459c9d730d65b14e59", "req_protocol" : "HTTPS", "req_method" : "GET", "req_uri" : "/test/benchmark", "timeout" : 5000, "id" : "1ce8fda3586d4371bd83c955df37e102", "status" : 1, "register_time" : "2020-07-31T12:42:51Z", "update_time" : "2020-08-02T16:32:47.077029Z", "vpc_channel_status" : 1, "vpc_channel_info" : { "cascade_flag" : false, "vpc_channel_id" : "56a7d7358e1b42459c9d730d65b14e59", "vpc_channel_proxy_host" : "www.example.com", "vpc_channel_port" : 0 } }, "api_group_info" : null, "backend_params" : [ { "name" : "X-CONSTANT-HEADER", "location" : "HEADER", "origin" : "CONSTANT", "value" : "demo", "remark" : "constant_demo", "id" : "8cb2eba19e7a4423a4e835647a8b8d76" }, { "name" : "app-id", "location" : "HEADER", "origin" : "SYSTEM", "value" : "$context.appId", "remark" : "Application ID of the invoker.", "id" : "216ddda836e74d528f364ff589d9dd21" } ], "sl_domain" : "c77f5e81d9cb4424bf704ef2b0ac7600.apic.****.com", "sl_domains" : [ "c77f5e81d9cb4424bf704ef2b0ac7600.apic.****.com", "c77f5e81d9cb4424bf704ef2b0ac7600.apic.****.cn" ], "version_id" : "ee1a5a38d3d3493abf1dc4ed6cacfa0b" } 状态码: 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.3022", "error_msg" : "The API version does not exist,id:ee1a5a38d3d3493abf1dc4ed6cacfa0b" } 状态码: 500 Internal Server Error { "error_code" : "APIG.9999", "error_msg" : "System error" }
  • 响应示例 状态码:200 OK { "id" : "string", "name" : "string", "remark" : "string", "code" : "string", "extend_one" : "string", "extend_two" : "string", "parent_code" : "string", "type" : "system", "create_time" : "2019-12-06T06:49:04Z", "update_time" : "2019-12-06T06:49:04Z" } 状态码:403 Forbidden { "error_code" : "ROMA.00000101", "error_msg" : "error summary", "error_details" : "some error details here", "request_id" : "13760c1fe8655e61209b75665e9bef43" }
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 表3 请求Body参数 参数 是否必选 参数类型 描述 name 否 String 字典名称。 字符集:中文、英文字母、数字、下划线和空格。 约束:实例下唯一。 remark 否 String 字典描述。 order 否 Integer 字典排序,值越小顺序越靠前。 extend_one 否 String 字典扩展字段1。 字符集:中文、英文字母、数字、下划线和空格。 extend_two 否 String 字典扩展字段2。 字符集:中文、英文字母、数字、下划线和空格。
  • 响应参数 状态码:200 表4 响应Body参数 参数 参数类型 描述 id String 字典ID。 name String 字典名称。 字符集:中文、英文字母、数字、下划线和空格。 约束:实例下唯一。 remark String 字典描述。 code String 字典编码。 字符集:英文字母、数字、下划线和空格。 约束:实例下唯一。 extend_one String 字典扩展字段1。 字符集:中文、英文字母、数字、下划线和空格。 extend_two String 字典扩展字段2。 字符集:中文、英文字母、数字、下划线和空格。 parent_code String 父字典编码,为空时代表自身就是最顶级字典。 type String 字典类型。 system: 代表系统内置字典,用户可编辑但不可删除。 user: 代表用户创建字典。 create_time String 创建时间。 update_time String 更新时间。 状态码:403 表5 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误消息。 error_details String 具体错误消息。 request_id String 请求处理ID。
  • 响应示例 状态码: 200 OK { "available_zone_ids" : "[region01, region02]", "bandwidth_size" : 5, "description" : "test create instance", "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" : "PROFESSIONAL", "subnet_id" : "a938121c-11c4-4c91-b983-bc9acd347bb5", "vpc_id" : "0957108c-257c-4ce0-9e93-527d279ce763" } 状态码: 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 表3 响应Body参数 参数 参数类型 描述 id String 实例编号 project_id String 实例所属项目编号 instance_name String 实例名称 status String 实例状态: Creating:创建中 CreateSuccess:创建成功 CreateFail:创建失败 Initing:初始化中 Registering:注册中 Running:运行中 InitingFailed:初始化失败 RegisterFailed:注册失败 Installing:安装中 InstallFailed:安装失败 Updating:升级中 UpdateFailed:升级失败 Rollbacking:回滚中 RollbackSuccess:回滚成功 RollbackFailed:回滚失败 Deleting:删除中 DeleteFailed:删除失败 Unregistering:注销中 UnRegisterFailed:注销失败 CreateTimeout:创建超时 InitTimeout:初始化超时 RegisterTimeout:注册超时 InstallTimeout:安装超时 UpdateTimeout:升级超时 RollbackTimeout:回滚超时 DeleteTimeout:删除超时 UnregisterTimeout:注销超时 Starting:启动中 Freezing:冻结中 Frozen:已冻结 Restarting:重启中 RestartFail:重启失败 Unhealthy:实例异常 RestartTimeout:重启超时 instance_status Integer 实例状态对应编号 1:创建中 2:创建成功 3:创建失败 4:初始化中 5:注册中 6:运行中 7:初始化失败 8:注册失败 10:安装中 11:安装失败 12:升级中 13:升级失败 20:回滚中 21:回滚成功 22:回滚失败 23:删除中 24:删除失败 25:注销中 26:注销失败 27:创建超时 28:初始化超时 29:注册超时 30:安装超时 31:升级超时 32:回滚超时 33:删除超时 34:注销超时 35:启动中 36:冻结中 37:已冻结 38:重启中 39:重启失败 40:实例异常 41:重启超时 type String 实例类型 暂不支持 spec String 实例规格: ROMA_BASIC:基础版实例 ROMA_PROFESSIONAL:专业版实例 ROMA_ENTERPRISE:企业版实例 ROMA_PLATINUM:铂金版实例 create_time Long 实例创建时间。unix时间戳格式。 enterprise_project_id String 企业项目ID,企业账号必填 eip_address String 实例绑定的弹性IP地址 charging_mode Integer 实例计费方式 0:按需计费 1:包周期计费 cbc_metadata String 计费订单编号,包周期计费时使用。 cbc_operation_locks Array of CbcOperationLock objects 云运营限制操作锁 暂不支持 description String 实例描述 vpc_id String 虚拟私有云ID。 subnet_id String 子网的网络ID。 security_group_id String 实例所属的安全组。 maintain_begin String '维护时间窗开始时间。时间格式为 xx:00:00,xx取值为02,06,10,14,18,22。' '在这个时间段内,运维人员可以对该实例的节点进行维护操作。维护期间,业务可以正常使用,可能会发生闪断。维护操作通常几个月一次。' maintain_end String '维护时间窗结束时间。时间格式为 xx:00:00,与维护时间窗开始时间相差4个小时。' '在这个时间段内,运维人员可以对该实例的节点进行维护操作。维护期间,业务可以正常使用,可能会发生闪断。维护操作通常几个月一次'。 ingress_ip String 实例入口,虚拟私有云访问地址 user_id String 实例所属用户ID nat_eip_ipv6_cidr String 出公网网段 (IPv6) 。 当前仅部分region部分可用区支持IPv6 eip_ipv6_address String 弹性IP地址(IPv6)。 当前仅部分region部分可用区支持IPv6 nat_eip_address String 实例出公网IP bandwidth_size Integer 出公网带宽 available_zone_ids String 可用区 instance_version String 实例版本编号 virsubnet_id String 子网的网络ID。 暂不支持 roma_eip_address String roma弹性公网IP。 暂不支持 listeners Array of Listener objects 监听信息,暂不支持 supported_features Array of strings 实例支持的特性列表 ingress_ip_v6 String 实例入口(IPv6) 当前仅部分region部分可用区支持IPv6 node_ips NodeIps object 节点内部ip信息 ingress_ips String 实例集群全量入口(多入口实例) cipher_type String 实例算法类型: generalCipher:通用加密算法 SMCompatible:SM系列商密算法兼容 SMOnly:SM系列商密算法 暂不支持 表4 CbcOperationLock 参数 参数类型 描述 lock_scene String 限制操作场景: TO_PERIOD_LOCK:按需转包周期场景锁,不允许进行删除、规格变更、按需转包周期等 SPEC_CHG_LOCK:包周期规格变更场景锁,不允许进行删除、规格变更等 lock_source_id String 发起限制操作对象的标志 表5 Listener 参数 参数类型 描述 name String 监听器名称 port Integer 监听器对外提供服务端口 backend Backend object 后端服务定义 ip_version Integer 创建负载均衡器的IP协议类型 表6 Backend 参数 参数类型 描述 ip Array of strings 后端主机地址列表 port Integer 后端服务端口,不存在时使用监听器端口 health_check HealthCheck object 健康检查配置 表7 HealthCheck 参数 参数类型 描述 protocol String 当前LVS只支持TCP_CHECK port Integer 健康检查端口 unhealthy Integer 判定后端不健康的阈值,连续探测失败次数 timeout Integer 探测后端的超时时间,单位秒 interval Integer 探测后端的间隔时间,单位秒 表8 NodeIps 参数 参数类型 描述 livedata Array of strings 自定义后端服务livedta组件节点ip列表 shubao Array of strings API网关shubao组件节点ip列表 状态码: 401 表9 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 403 表10 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 404 表11 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 500 表12 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述
  • 响应参数 状态码:200 表4 响应Body参数 参数 参数类型 描述 total Integer 总的应用数量。 size Integer 当前页的数量。 apps Array of ServerAppInfo objects 应用信息。 表5 ServerAppInfo 参数 参数类型 描述 id String 应用ID。 name String 应用名称。 字符集:支持中文、英文字母、数字、中划线、下划线、点、空格和中英文圆括号。 约束:实例下唯一。 remark String 应用描述。 roles Array of strings 应用权限角色。 read:应用下资源只读权限,至少要存在此权限,包括API调试。 access:应用下资源的访问管理权限。 delete:应用下资源的删除权限。 modify:应用下资源的修改权限,包括API发布、下线。 admin:应用和应用下资源的权限。 仅提供admin时,会自动应用其它所有权限。 未提供read时会自动应用read权限。 create_time String 创建时间。 update_time String 更新时间。 created_user created_user object 创建用户信息。 last_updated_user last_updated_user object 最后更新用户信息。 owner Boolean 是否是应用拥有者。 key String 应用认证访问KEY,未提供时随机生成。 字符集:支持中文、英文字母、数字、中划线、下划线、@号和点,以字母或中文或数字开头。 约束:实例下唯一。 favorite Boolean 是否收藏应用,收藏的应用会在列表里优先显示。 表6 created_user 参数 参数类型 描述 user_id String 创建应用的用户ID。 user_name String 创建应用的用户名称。 表7 last_updated_user 参数 参数类型 描述 user_id String 最后修改者的用户ID。 user_name String 最后修改者的用户名。 状态码:403 表8 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误消息。 error_details String 具体错误消息。 request_id String 请求处理ID。
  • 响应示例 状态码:200 ok { "total" : 0, "size" : 0, "apps" : [ { "id" : "b2e6b145-4f3f-4a80-aa45-f4b8029f95a3", "name" : "AppName", "remark" : "example", "roles" : [ "admin" ], "create_time" : "2019-12-06T06:49:04Z", "update_time" : "2019-12-06T06:49:04Z", "created_user" : { "user_id" : "string", "user_name" : "string" }, "last_updated_user" : { "user_id" : "string", "user_name" : "string" }, "owner" : true, "key" : "TEI***8UM", "favorite" : true } ] } 状态码:403 Forbidden { "error_code" : "ROMA.00000101", "error_msg" : "error summary", "error_details" : "some error details here", "request_id" : "13760c1fe8655e61209b75665e9bef43" }
  • 响应示例 状态码: 400 Bad Request { "error_code" : "SCB.00000000", "error_msg" : "Parameter is not valid for operation [romalink.link-device-groups.delete]. Parameter is [group_id]. 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 1 is correct.", "request_id" : "624c8be1-39b6-47b7-941d-c159aced368a-1619602544650-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" }
  • 响应参数 状态码: 400 表3 响应Body参数 参数 参数类型 描述 error_code String 系统错误码,针对4xx和5xx类HTTP错误码的详细错误码。 error_msg String 错误描述。 request_id String 消息ID。 状态码: 404 表4 响应Body参数 参数 参数类型 描述 error_code String 系统错误码,针对4xx和5xx类HTTP错误码的详细错误码。 error_msg String 错误描述。 request_id String 消息ID。 状态码: 500 表5 响应Body参数 参数 参数类型 描述 error_code String 系统错误码,针对4xx和5xx类HTTP错误码的详细错误码。 error_msg String 错误描述。 request_id String 消息ID。
共100000条
提示

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