华为云用户手册

  • URI PUT /v2/{project_id}/instances/{instance_id}/accounts/{account_id}/password/reset 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目ID。获取方法请参见获取项目ID。 instance_id 是 String 实例ID。 account_id 是 String ACL账号ID。
  • 响应参数 状态码: 200 表1 响应Body参数 参数 参数类型 描述 maintain_windows Array of MaintainWindowsEntity objects 支持的维护时间窗列表。 表2 MaintainWindowsEntity 参数 参数类型 描述 seq Integer 序号。 default Boolean 是否为默认时间段。 begin String 维护时间窗开始时间,时间为UTC时间,格式为HH:mm:ss。 end String 维护时间窗结束时间,时间为UTC时间,格式为HH:mm:ss。 状态码: 500 表3 响应Body参数 参数 参数类型 描述 error_msg String 错误信息。 最大长度:1024 error_code String 错误码。 最大长度:9 error_ext_msg String 扩展错误信息(暂未使用,赋值为null)。 最大长度:1024
  • 响应示例 状态码: 200 查询维护时间窗时间段成功。 { "maintain_windows" : [ { "default" : true, "end" : "19", "begin" : "18", "seq" : 1 }, { "default" : false, "end" : "20", "begin" : "19", "seq" : 2 }, { "default" : false, "end" : "21", "begin" : "20", "seq" : 3 }, { "default" : false, "end" : "22", "begin" : "21", "seq" : 4 }, { "default" : false, "end" : "23", "begin" : "22", "seq" : 5 }, { "default" : false, "end" : "00", "begin" : "23", "seq" : 6 }, { "default" : false, "end" : "01", "begin" : "00", "seq" : 1 }, { "default" : false, "end" : "02", "begin" : "01", "seq" : 2 }, { "default" : false, "end" : "03", "begin" : "02", "seq" : 3 }, { "default" : false, "end" : "04", "begin" : "03", "seq" : 3 }, { "default" : false, "end" : "05", "begin" : "04", "seq" : 4 }, { "default" : false, "end" : "06", "begin" : "05", "seq" : 5 }, { "default" : false, "end" : "07", "begin" : "06", "seq" : 6 }, { "default" : false, "end" : "08", "begin" : "07", "seq" : 1 }, { "default" : true, "end" : "09", "begin" : "08", "seq" : 2 }, { "default" : false, "end" : "10", "begin" : "09", "seq" : 3 }, { "default" : false, "end" : "11", "begin" : "10", "seq" : 4 }, { "default" : false, "end" : "12", "begin" : "11", "seq" : 5 }, { "default" : false, "end" : "13", "begin" : "12", "seq" : 6 }, { "default" : false, "end" : "14", "begin" : "13", "seq" : 1 }, { "default" : true, "end" : "15", "begin" : "14", "seq" : 2 }, { "default" : false, "end" : "16", "begin" : "15", "seq" : 3 }, { "default" : false, "end" : "17", "begin" : "16", "seq" : 4 }, { "default" : false, "end" : "18", "begin" : "17", "seq" : 5 } ] }
  • 响应参数 状态码: 200 表2 响应Body参数 参数 参数类型 描述 [数组元素] Array of InstanceReplicationListInfo objects 查询分片和副本信息成功。 表3 InstanceReplicationListInfo 参数 参数类型 描述 replication_role String 副本角色,取值有: master:表示主节点。 slave:表示从节点。 replication_ip String 副本IP。 is_replication Boolean 是否是新加副本。 replication_id String 副本ID。 node_id String 节点ID。 status String 副本状态。 枚举值: Active Inactive az_code String 副本所在的可用区。 dimensions Array of InstanceReplicationDimensionsInfo objects 副本对应的监控指标维度信息。可用于调用云监控服务的查询监控数据指标相关接口 副本的监控维度为多维度,返回数组中包含两个维度信息。从云监控查询监控数据时,要按多维度传递指标维度参数,才能查询到监控指标值。 第一个维度为副本父维度信息,维度名称为dcs_instance_id,维度值对应副本所在的实例ID。 第二个维度,维度名称为dcs_cluster_redis_node,维度值为副本的监控对象ID,与副本ID和节点ID不同。 表4 InstanceReplicationDimensionsInfo 参数 参数类型 描述 name String 监控维度名称。 value String 维度取值。 状态码: 500 表5 响应Body参数 参数 参数类型 描述 error_msg String 错误信息。 最大长度:1024 error_code String 错误码。 最大长度:9 error_ext_msg String 扩展错误信息(暂未使用,赋值为null)。 最大长度:1024 状态码: 400 表6 响应Body参数 参数 参数类型 描述 error_msg String 错误信息。 最大长度:1024 error_code String 错误码。 最大长度:9 error_ext_msg String 扩展错误信息(暂未使用,赋值为null)。 最大长度:1024
  • 响应示例 状态码: 200 查询分片和副本信息成功。 [ { "az_code" : "region01", "is_replication" : false, "node_id" : "8abfa7aa73291f15017329e1cda0002d", "replication_id" : "dfbd3f84-08bc-42f0-b538-01d03e6dc178", "replication_ip" : "192.168.76.25", "replication_role" : "master", "status" : "Active", "dimensions" : [ { "name" : "dcs_instance_id", "value" : "caf2d19f-7783-44b0-be46-8c9da3ef1e94" } ] } ]
  • 响应参数 状态码: 200 表2 响应Body参数 参数 参数类型 描述 result String 删除自定义模板的结果,success表示成功,如果失败则会返回对应的报错信息。 枚举值: success 状态码: 400 表3 响应Body参数 参数 参数类型 描述 error_msg String 错误信息 最大长度:1024 error_code String 错误码 最大长度:9 error_ext_msg String 扩展错误信息(暂未使用,赋值为null) 最大长度:1024 状态码: 401 表4 响应Body参数 参数 参数类型 描述 error_msg String 错误信息 最大长度:1024 error_code String 错误码 最大长度:9 error_ext_msg String 扩展错误信息(暂未使用,赋值为null) 最大长度:1024 状态码: 403 表5 响应Body参数 参数 参数类型 描述 error_msg String 错误信息 最大长度:1024 error_code String 错误码 最大长度:9 error_ext_msg String 扩展错误信息(暂未使用,赋值为null) 最大长度:1024 状态码: 404 表6 响应Body参数 参数 参数类型 描述 error_msg String 错误信息 最大长度:1024 error_code String 错误码 最大长度:9 error_ext_msg String 扩展错误信息(暂未使用,赋值为null) 最大长度:1024 状态码: 500 表7 响应Body参数 参数 参数类型 描述 error_msg String 错误信息 最大长度:1024 error_code String 错误码 最大长度:9 error_ext_msg String 扩展错误信息(暂未使用,赋值为null) 最大长度:1024
  • 响应参数 状态码: 200 表3 响应Body参数 参数 参数类型 描述 restore_id String 恢复记录ID。 状态码: 400 表4 响应Body参数 参数 参数类型 描述 error_msg String 错误信息。 最大长度:1024 error_code String 错误码。 最大长度:9 error_ext_msg String 扩展错误信息(暂未使用,赋值为null)。 最大长度:1024 状态码: 500 表5 响应Body参数 参数 参数类型 描述 error_msg String 错误信息。 最大长度:1024 error_code String 错误码。 最大长度:9 error_ext_msg String 扩展错误信息(暂未使用,赋值为null)。 最大长度:1024
  • 响应参数 状态码: 400 表2 响应Body参数 参数 参数类型 描述 error_msg String 错误信息。 最大长度:1024 error_code String 错误码。 最大长度:9 error_ext_msg String 扩展错误信息(暂未使用,赋值为null)。 最大长度:1024 状态码: 500 表3 响应Body参数 参数 参数类型 描述 error_msg String 错误信息。 最大长度:1024 error_code String 错误码。 最大长度:9 error_ext_msg String 扩展错误信息(暂未使用,赋值为null)。 最大长度:1024
  • 响应示例 状态码: 200 查询迁移任务详情成功。 { "task_name" : "migration1", "task_id" : "a276c1ffa0a54c2597fc824b917db317", "status" : "MIGRATING", "migration_type" : "incremental_migration", "network_type" : "vpc", "source_instance" : { "addrs" : "192.168.1.2:6379" }, "target_instance" : { "id" : "86157b69-8a62-47f9-8c55-fa6ddc8927ee", "name" : "test-instance" }, "created_at" : "2019/10/22 14:44:30", "updated_at" : "2019/10/22 18:00:00" }
  • 响应参数 状态码: 200 表2 响应Body参数 参数 参数类型 描述 task_id String 迁移任务ID。 task_name String 迁移任务名称。 description String 迁移任务描述。 status String 迁移任务状态,这个字段的值包括:SUCCESS(成功), FAILED(失败), MIGRATING(迁移中),TERMINATED(已结束),TERMINATING(停止中),INCRMIGRATING(增量迁移中),FULLMIGRATING(全量迁移中),RUNNING(待配置),MIGRATION_FAILED(迁移失败),RELEASED(已释放)。 枚举值: SUCCESS FAILED MIGRATING TERMINATED TERMINATING INCRMIGEATING FULLMIGRATING RUNNING MIGRATION_FAILED RELEASED migration_type String 迁移任务类型,包括备份文件导入和在线迁移两种类型。 枚举值: backupfile_import online_migration migration_method String 迁移方式,包括全量迁移和增量迁移两种类型。 枚举值: full_amount_migration incremental_migration ecs_tenant_private_ip String 迁移机租户侧私有IP,与目的/源redis私有IP处于同VPC,可将此IP加入白名单。 backup_files BackupFilesBody object 备份文件导入场景的备份文件列表。 network_type String 网络类型,包括vpc和vpn两种类型。 枚举值: vpc vpn source_instance SourceInstanceBody object 源Redis信息。在线迁移场景需要填写。 target_instance TargetInstanceBody object 目标Redis信息。 created_at String 迁移任务创建时间。 updated_at String 迁移任务完成时间。 表3 BackupFilesBody 参数 参数类型 描述 file_source String 数据来源,包含OBS桶和备份记录两种类型。 枚举值: self_build_obs backup_record bucket_name String OBS桶名。 files Array of Files objects 导入的备份文件文件列表,数据来源为OBS桶时必须填写。 backup_id String 备份记录ID,数据来源为备份记录时必须填写。 表4 Files 参数 参数类型 描述 file_name String 备份文件名。 size String 文件大小(单位:Byte)。 update_at String 文件最后修改时间(格式YYYY-MM-DD HH:MM:SS)。 表5 SourceInstanceBody 参数 参数类型 描述 addrs String Redis实例地址(source_instance信息中填写)。 password String Redis密码,如果设置了密码,则必须填写。 表6 TargetInstanceBody 参数 参数类型 描述 id String Redis实例ID(target_instance信息中必须填写)。 name String Redis实例名称(target_instance信息中填写)。 password String Redis密码,如果设置了密码,则必须填写。 状态码: 400 表7 响应Body参数 参数 参数类型 描述 error_msg String 错误信息。 最大长度:1024 error_code String 错误码。 最大长度:9 error_ext_msg String 扩展错误信息(暂未使用,赋值为null)。 最大长度:1024 状态码: 401 表8 响应Body参数 参数 参数类型 描述 error_msg String 错误信息。 最大长度:1024 error_code String 错误码。 最大长度:9 error_ext_msg String 扩展错误信息(暂未使用,赋值为null)。 最大长度:1024 状态码: 403 表9 响应Body参数 参数 参数类型 描述 error_msg String 错误信息。 最大长度:1024 error_code String 错误码。 最大长度:9 error_ext_msg String 扩展错误信息(暂未使用,赋值为null)。 最大长度:1024 状态码: 404 表10 响应Body参数 参数 参数类型 描述 error_msg String 错误信息。 最大长度:1024 error_code String 错误码。 最大长度:9 error_ext_msg String 扩展错误信息(暂未使用,赋值为null)。 最大长度:1024 状态码: 500 表11 响应Body参数 参数 参数类型 描述 error_msg String 错误信息。 最大长度:1024 error_code String 错误码。 最大长度:9 error_ext_msg String 扩展错误信息(暂未使用,赋值为null)。 最大长度:1024
  • 响应示例 状态码: 200 查询热key分析详情成功。 { "id" : "858ee14c-2271-4489-8b82-7bda7459ae3e", "instance_id" : "5f9057b5-c330-4ee2-8138-7e69896eeec3", "status" : "success", "scan_type" : "manual", "created_at" : "2020-06-15T02:21:18.669Z", "started_at" : "2020-06-15T02:21:23.534Z", "finished_at" : "2020-06-15T02:21:25.588Z", "keys" : [ { "name" : "dcs-hotkey-test", "type" : "string", "shard" : "192.168.1.134:6379", "db" : 0, "size" : 3000, "unit" : "byte", "freq" : 4 } ] } 状态码: 400 非法请求。 { "error_code" : "DCS.4922", "error_msg" : "Does not support hotkey analyze." }
  • 响应参数 状态码: 200 表2 响应Body参数 参数 参数类型 描述 id String 热key分析记录ID。 instance_id String 实例ID。 status String 分析任务状态。 枚举值: waiting running success failed scan_type String 分析方式。 枚举值: manual auto created_at String 分析任务创建时间,格式为:"2020-06-15T02:21:18.669Z"。 started_at String 分析任务开始时间,格式为:"2020-06-15T02:21:18.669Z"(创建分析任务时此值为null,不返回)。 finished_at String 分析任务结束时间,格式为:"2020-06-15T02:21:18.669Z"(创建分析任务时此值为null,不返回)。 num Integer 热key的数量。 keys Array of HotkeysBody objects 热key记录(创建分析任务时此值为null,不返回)。 表3 HotkeysBody 参数 参数类型 描述 name String Key名称。 type String Key类型。 枚举值: string list set zset hash shard String 热key所在的分片,仅在实例类型为集群时支持,格式为ip:port。 db Integer 热key所在的DB。 size Long Key的value大小。 unit String 表示key的单位。count:key的数量,byte:key的大小。 freq Integer 表示某个key在一段时间的访问频度,会随着访问的频率而变化。 该值并不是简单的访问频率值,而是一个基于概率的对数计数器结果,最大为255(可表示100万次访问),超过255后如果继续频繁访问该值并不会继续增大,同时默认如果每过一分钟没有访问,该值会衰减1。 状态码: 400 表4 响应Body参数 参数 参数类型 描述 error_msg String 错误信息。 最大长度:1024 error_code String 错误码。 最大长度:9 error_ext_msg String 扩展错误信(暂未使用,赋值为null)。 最大长度:1024 状态码: 401 表5 响应Body参数 参数 参数类型 描述 error_msg String 错误信息。 最大长度:1024 error_code String 错误码。 最大长度:9 error_ext_msg String 扩展错误信(暂未使用,赋值为null)。 最大长度:1024 状态码: 403 表6 响应Body参数 参数 参数类型 描述 error_msg String 错误信息。 最大长度:1024 error_code String 错误码。 最大长度:9 error_ext_msg String 扩展错误信(暂未使用,赋值为null)。 最大长度:1024 状态码: 404 表7 响应Body参数 参数 参数类型 描述 error_msg String 错误信息。 最大长度:1024 error_code String 错误码。 最大长度:9 error_ext_msg String 扩展错误信(暂未使用,赋值为null)。 最大长度:1024 状态码: 500 表8 响应Body参数 参数 参数类型 描述 error_msg String 错误信息。 最大长度:1024 error_code String 错误码。 最大长度:9 error_ext_msg String 扩展错误信(暂未使用,赋值为null)。 最大长度:1024
  • URI POST /v2/{project_id}/instances/{instance_id}/groups/{group_id}/replications/{node_id}/slave-priority 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目ID。获取方法请参见获取项目ID。 instance_id 是 String 实例ID。 group_id 是 String 分片ID。 node_id 是 String 节点ID。
  • 响应参数 状态码: 400 表3 响应Body参数 参数 参数类型 描述 error_msg String 错误信息。 最大长度:1024 error_code String 错误码。 最大长度:9 error_ext_msg String 扩展错误信息(暂未使用,赋值为null)。 最大长度:1024 状态码: 401 表4 响应Body参数 参数 参数类型 描述 error_msg String 错误信息。 最大长度:1024 error_code String 错误码。 最大长度:9 error_ext_msg String 扩展错误信息(暂未使用,赋值为null)。 最大长度:1024 状态码: 403 表5 响应Body参数 参数 参数类型 描述 error_msg String 错误信息。 最大长度:1024 error_code String 错误码。 最大长度:9 error_ext_msg String 扩展错误信息(暂未使用,赋值为null)。 最大长度:1024 状态码: 404 表6 响应Body参数 参数 参数类型 描述 error_msg String 错误信息。 最大长度:1024 error_code String 错误码。 最大长度:9 error_ext_msg String 扩展错误信息(暂未使用,赋值为null)。 最大长度:1024 状态码: 500 表7 响应Body参数 参数 参数类型 描述 error_msg String 错误信息。 最大长度:1024 error_code String 错误码。 最大长度:9 error_ext_msg String 扩展错误信息(暂未使用,赋值为null)。 最大长度:1024
  • 客户端出现概率性超时错误 针对低概率超时错误,是Redis使用的正常现象。Redis使用受到网络传输、客户端设置超时时间等因素影响,可能出现单个请求超时问题。 建议客户业务编码时,具备重试操作,提升业务的可靠性,避免低概率的单次请求失败时业务失败。 当出现了连接超时问题时,可以优先检查Redis是否开启了AOF持久化功能,并根据业务需求,决定是否开启AOF持久化(开启/关闭AOF持久化的影响)。关闭AOF持久化可以提升客户端连接的稳定性,减少出现阻塞,连接不上的情况。 如果出现超时错误概率频繁,请联系技术服务人员。 父主题: 客户端和网络连接
  • 响应示例 状态码: 200 支持的云服务类型 { [ "AWS", "Aliyun", "Qiniu", "QingCloud", "Tencent", "Baidu", "KingsoftCloud", "Azure", "UCloud", "Google", "HuaweiCloud", "URLSource" ] }
  • 请求示例 查询2c0689c860ad4728a497c91ec0844383项目下的0d146099-8cf4-437d-b6ef-88e043771c8b任务的统计 GET https://{endpoint}/v2/2c0689c860ad4728a497c91ec0844383/sync-tasks/0d146099-8cf4-437d-b6ef-88e043771c8b/statistics?data_type=REQUEST { "sync_task_id" : "4fb05cd2-c94e-44e4-a07f-e65a2f01ebcb", "statistic_time_type" : "FIVE_MINUTES", "statistic_datas" : [ { "data_type" : "REQUEST", "data" : [ { "time_stamp" : 1700150400000, "statistic_num" : 1 }, { "time_stamp" : 1700151000000, "statistic_num" : 20 }, { "time_stamp" : 1700151300000, "statistic_num" : 13 }, { "time_stamp" : 1700151600000, "statistic_num" : 12 }, { "time_stamp" : 1700151900000, "statistic_num" : 10 }, { "time_stamp" : 1700152200000, "statistic_num" : 11 }, { "time_stamp" : 1700152500000, "statistic_num" : 9 }, { "time_stamp" : 1700152800000, "statistic_num" : 12 }, { "time_stamp" : 1700153100000, "statistic_num" : 9 }, { "time_stamp" : 1700153400000, "statistic_num" : 10 }, { "time_stamp" : 1700153700000, "statistic_num" : 7 }, { "time_stamp" : 1700154000000, "statistic_num" : 13 }, { "time_stamp" : 1700154300000, "statistic_num" : 9 }, { "time_stamp" : 1700154600000, "statistic_num" : 9 }, { "time_stamp" : 1700154900000, "statistic_num" : 9 }, { "time_stamp" : 1700155200000, "statistic_num" : 10 }, { "time_stamp" : 1700155500000, "statistic_num" : 11 }, { "time_stamp" : 1700155800000, "statistic_num" : 9 }, { "time_stamp" : 1700156100000, "statistic_num" : 8 }, { "time_stamp" : 1700156400000, "statistic_num" : 11 }, { "time_stamp" : 1700156700000, "statistic_num" : 10 }, { "time_stamp" : 1700157000000, "statistic_num" : 8 }, { "time_stamp" : 1700157300000, "statistic_num" : 10 }, { "time_stamp" : 1700157600000, "statistic_num" : 11 }, { "time_stamp" : 1700157900000, "statistic_num" : 9 }, { "time_stamp" : 1700158200000, "statistic_num" : 11 }, { "time_stamp" : 1700158500000, "statistic_num" : 9 }, { "time_stamp" : 1700158800000, "statistic_num" : 10 }, { "time_stamp" : 1700159100000, "statistic_num" : 11 }, { "time_stamp" : 1700159400000, "statistic_num" : 9 }, { "time_stamp" : 1700159700000, "statistic_num" : 11 }, { "time_stamp" : 1700160000000, "statistic_num" : 10 }, { "time_stamp" : 1700160300000, "statistic_num" : 10 }, { "time_stamp" : 1700160600000, "statistic_num" : 9 }, { "time_stamp" : 1700160900000, "statistic_num" : 8 }, { "time_stamp" : 1700161200000, "statistic_num" : 11 }, { "time_stamp" : 1700161500000, "statistic_num" : 9 }, { "time_stamp" : 1700161800000, "statistic_num" : 9 }, { "time_stamp" : 1700162100000, "statistic_num" : 9 }, { "time_stamp" : 1700162400000, "statistic_num" : 10 }, { "time_stamp" : 1700162700000, "statistic_num" : 11 }, { "time_stamp" : 1700163000000, "statistic_num" : 9 }, { "time_stamp" : 1700163300000, "statistic_num" : 9 }, { "time_stamp" : 1700163600000, "statistic_num" : 11 }, { "time_stamp" : 1700163900000, "statistic_num" : 10 }, { "time_stamp" : 1700164200000, "statistic_num" : 9 }, { "time_stamp" : 1700164500000, "statistic_num" : 10 }, { "time_stamp" : 1700164800000, "statistic_num" : 9 }, { "time_stamp" : 1700165100000, "statistic_num" : 11 }, { "time_stamp" : 1700165400000, "statistic_num" : 10 }, { "time_stamp" : 1700165700000, "statistic_num" : 10 }, { "time_stamp" : 1700166000000, "statistic_num" : 11 }, { "time_stamp" : 1700166300000, "statistic_num" : 10 }, { "time_stamp" : 1700166600000, "statistic_num" : 9 }, { "time_stamp" : 1700166900000, "statistic_num" : 9 }, { "time_stamp" : 1700167200000, "statistic_num" : 11 }, { "time_stamp" : 1700167500000, "statistic_num" : 10 }, { "time_stamp" : 1700167800000, "statistic_num" : 8 }, { "time_stamp" : 1700168100000, "statistic_num" : 11 }, { "time_stamp" : 1700168400000, "statistic_num" : 8 }, { "time_stamp" : 1700168700000, "statistic_num" : 10 }, { "time_stamp" : 1700169000000, "statistic_num" : 10 }, { "time_stamp" : 1700169300000, "statistic_num" : 9 }, { "time_stamp" : 1700169600000, "statistic_num" : 10 }, { "time_stamp" : 1700169900000, "statistic_num" : 8 }, { "time_stamp" : 1700170200000, "statistic_num" : 11 }, { "time_stamp" : 1700170500000, "statistic_num" : 9 }, { "time_stamp" : 1700170800000, "statistic_num" : 13 }, { "time_stamp" : 1700171100000, "statistic_num" : 10 }, { "time_stamp" : 1700171400000, "statistic_num" : 8 }, { "time_stamp" : 1700171700000, "statistic_num" : 10 }, { "time_stamp" : 1700172000000, "statistic_num" : 11 }, { "time_stamp" : 1700172300000, "statistic_num" : 11 }, { "time_stamp" : 1700172600000, "statistic_num" : 10 }, { "time_stamp" : 1700172900000, "statistic_num" : 11 }, { "time_stamp" : 1700173200000, "statistic_num" : 9 }, { "time_stamp" : 1700173500000, "statistic_num" : 9 }, { "time_stamp" : 1700173800000, "statistic_num" : 12 }, { "time_stamp" : 1700174100000, "statistic_num" : 9 }, { "time_stamp" : 1700174400000, "statistic_num" : 11 }, { "time_stamp" : 1700174700000, "statistic_num" : 10 }, { "time_stamp" : 1700175000000, "statistic_num" : 10 }, { "time_stamp" : 1700175300000, "statistic_num" : 11 }, { "time_stamp" : 1700175600000, "statistic_num" : 9 }, { "time_stamp" : 1700175900000, "statistic_num" : 11 }, { "time_stamp" : 1700176200000, "statistic_num" : 10 }, { "time_stamp" : 1700176500000, "statistic_num" : 9 }, { "time_stamp" : 1700176800000, "statistic_num" : 11 }, { "time_stamp" : 1700177100000, "statistic_num" : 9 }, { "time_stamp" : 1700177400000, "statistic_num" : 11 }, { "time_stamp" : 1700177700000, "statistic_num" : 9 }, { "time_stamp" : 1700178000000, "statistic_num" : 12 }, { "time_stamp" : 1700178300000, "statistic_num" : 10 }, { "time_stamp" : 1700178600000, "statistic_num" : 9 }, { "time_stamp" : 1700178900000, "statistic_num" : 11 }, { "time_stamp" : 1700179200000, "statistic_num" : 9 }, { "time_stamp" : 1700179500000, "statistic_num" : 10 }, { "time_stamp" : 1700179800000, "statistic_num" : 10 }, { "time_stamp" : 1700180100000, "statistic_num" : 11 }, { "time_stamp" : 1700180400000, "statistic_num" : 10 }, { "time_stamp" : 1700180700000, "statistic_num" : 9 }, { "time_stamp" : 1700181000000, "statistic_num" : 12 }, { "time_stamp" : 1700181300000, "statistic_num" : 9 }, { "time_stamp" : 1700181600000, "statistic_num" : 12 }, { "time_stamp" : 1700181900000, "statistic_num" : 9 }, { "time_stamp" : 1700182200000, "statistic_num" : 11 }, { "time_stamp" : 1700182500000, "statistic_num" : 9 }, { "time_stamp" : 1700182800000, "statistic_num" : 10 }, { "time_stamp" : 1700183100000, "statistic_num" : 11 }, { "time_stamp" : 1700183400000, "statistic_num" : 10 }, { "time_stamp" : 1700183700000, "statistic_num" : 9 }, { "time_stamp" : 1700184000000, "statistic_num" : 8 }, { "time_stamp" : 1700188200000, "statistic_num" : 1 } ] } ] }
  • 响应示例 状态码: 200 OK { "sync_task_id" : "4fb05cd2-c94e-44e4-a07f-e65a2f01ebcb", "statistic_time_type" : "FIVE_MINUTES", "statistic_datas" : [ { "data_type" : "REQUEST", "data" : [ { "time_stamp" : 1700150400000, "statistic_num" : 1 }, { "time_stamp" : 1700151000000, "statistic_num" : 20 }, { "time_stamp" : 1700151300000, "statistic_num" : 13 }, { "time_stamp" : 1700151600000, "statistic_num" : 12 }, { "time_stamp" : 1700151900000, "statistic_num" : 10 }, { "time_stamp" : 1700152200000, "statistic_num" : 11 }, { "time_stamp" : 1700152500000, "statistic_num" : 9 }, { "time_stamp" : 1700152800000, "statistic_num" : 12 }, { "time_stamp" : 1700153100000, "statistic_num" : 9 }, { "time_stamp" : 1700153400000, "statistic_num" : 10 }, { "time_stamp" : 1700153700000, "statistic_num" : 7 }, { "time_stamp" : 1700154000000, "statistic_num" : 13 }, { "time_stamp" : 1700154300000, "statistic_num" : 9 }, { "time_stamp" : 1700154600000, "statistic_num" : 9 }, { "time_stamp" : 1700154900000, "statistic_num" : 9 }, { "time_stamp" : 1700155200000, "statistic_num" : 10 }, { "time_stamp" : 1700155500000, "statistic_num" : 11 }, { "time_stamp" : 1700155800000, "statistic_num" : 9 }, { "time_stamp" : 1700156100000, "statistic_num" : 8 }, { "time_stamp" : 1700156400000, "statistic_num" : 11 }, { "time_stamp" : 1700156700000, "statistic_num" : 10 }, { "time_stamp" : 1700157000000, "statistic_num" : 8 }, { "time_stamp" : 1700157300000, "statistic_num" : 10 }, { "time_stamp" : 1700157600000, "statistic_num" : 11 }, { "time_stamp" : 1700157900000, "statistic_num" : 9 }, { "time_stamp" : 1700158200000, "statistic_num" : 11 }, { "time_stamp" : 1700158500000, "statistic_num" : 9 }, { "time_stamp" : 1700158800000, "statistic_num" : 10 }, { "time_stamp" : 1700159100000, "statistic_num" : 11 }, { "time_stamp" : 1700159400000, "statistic_num" : 9 }, { "time_stamp" : 1700159700000, "statistic_num" : 11 }, { "time_stamp" : 1700160000000, "statistic_num" : 10 }, { "time_stamp" : 1700160300000, "statistic_num" : 10 }, { "time_stamp" : 1700160600000, "statistic_num" : 9 }, { "time_stamp" : 1700160900000, "statistic_num" : 8 }, { "time_stamp" : 1700161200000, "statistic_num" : 11 }, { "time_stamp" : 1700161500000, "statistic_num" : 9 }, { "time_stamp" : 1700161800000, "statistic_num" : 9 }, { "time_stamp" : 1700162100000, "statistic_num" : 9 }, { "time_stamp" : 1700162400000, "statistic_num" : 10 }, { "time_stamp" : 1700162700000, "statistic_num" : 11 }, { "time_stamp" : 1700163000000, "statistic_num" : 9 }, { "time_stamp" : 1700163300000, "statistic_num" : 9 }, { "time_stamp" : 1700163600000, "statistic_num" : 11 }, { "time_stamp" : 1700163900000, "statistic_num" : 10 }, { "time_stamp" : 1700164200000, "statistic_num" : 9 }, { "time_stamp" : 1700164500000, "statistic_num" : 10 }, { "time_stamp" : 1700164800000, "statistic_num" : 9 }, { "time_stamp" : 1700165100000, "statistic_num" : 11 }, { "time_stamp" : 1700165400000, "statistic_num" : 10 }, { "time_stamp" : 1700165700000, "statistic_num" : 10 }, { "time_stamp" : 1700166000000, "statistic_num" : 11 }, { "time_stamp" : 1700166300000, "statistic_num" : 10 }, { "time_stamp" : 1700166600000, "statistic_num" : 9 }, { "time_stamp" : 1700166900000, "statistic_num" : 9 }, { "time_stamp" : 1700167200000, "statistic_num" : 11 }, { "time_stamp" : 1700167500000, "statistic_num" : 10 }, { "time_stamp" : 1700167800000, "statistic_num" : 8 }, { "time_stamp" : 1700168100000, "statistic_num" : 11 }, { "time_stamp" : 1700168400000, "statistic_num" : 8 }, { "time_stamp" : 1700168700000, "statistic_num" : 10 }, { "time_stamp" : 1700169000000, "statistic_num" : 10 }, { "time_stamp" : 1700169300000, "statistic_num" : 9 }, { "time_stamp" : 1700169600000, "statistic_num" : 10 }, { "time_stamp" : 1700169900000, "statistic_num" : 8 }, { "time_stamp" : 1700170200000, "statistic_num" : 11 }, { "time_stamp" : 1700170500000, "statistic_num" : 9 }, { "time_stamp" : 1700170800000, "statistic_num" : 13 }, { "time_stamp" : 1700171100000, "statistic_num" : 10 }, { "time_stamp" : 1700171400000, "statistic_num" : 8 }, { "time_stamp" : 1700171700000, "statistic_num" : 10 }, { "time_stamp" : 1700172000000, "statistic_num" : 11 }, { "time_stamp" : 1700172300000, "statistic_num" : 11 }, { "time_stamp" : 1700172600000, "statistic_num" : 10 }, { "time_stamp" : 1700172900000, "statistic_num" : 11 }, { "time_stamp" : 1700173200000, "statistic_num" : 9 }, { "time_stamp" : 1700173500000, "statistic_num" : 9 }, { "time_stamp" : 1700173800000, "statistic_num" : 12 }, { "time_stamp" : 1700174100000, "statistic_num" : 9 }, { "time_stamp" : 1700174400000, "statistic_num" : 11 }, { "time_stamp" : 1700174700000, "statistic_num" : 10 }, { "time_stamp" : 1700175000000, "statistic_num" : 10 }, { "time_stamp" : 1700175300000, "statistic_num" : 11 }, { "time_stamp" : 1700175600000, "statistic_num" : 9 }, { "time_stamp" : 1700175900000, "statistic_num" : 11 }, { "time_stamp" : 1700176200000, "statistic_num" : 10 }, { "time_stamp" : 1700176500000, "statistic_num" : 9 }, { "time_stamp" : 1700176800000, "statistic_num" : 11 }, { "time_stamp" : 1700177100000, "statistic_num" : 9 }, { "time_stamp" : 1700177400000, "statistic_num" : 11 }, { "time_stamp" : 1700177700000, "statistic_num" : 9 }, { "time_stamp" : 1700178000000, "statistic_num" : 12 }, { "time_stamp" : 1700178300000, "statistic_num" : 10 }, { "time_stamp" : 1700178600000, "statistic_num" : 9 }, { "time_stamp" : 1700178900000, "statistic_num" : 11 }, { "time_stamp" : 1700179200000, "statistic_num" : 9 }, { "time_stamp" : 1700179500000, "statistic_num" : 10 }, { "time_stamp" : 1700179800000, "statistic_num" : 10 }, { "time_stamp" : 1700180100000, "statistic_num" : 11 }, { "time_stamp" : 1700180400000, "statistic_num" : 10 }, { "time_stamp" : 1700180700000, "statistic_num" : 9 }, { "time_stamp" : 1700181000000, "statistic_num" : 12 }, { "time_stamp" : 1700181300000, "statistic_num" : 9 }, { "time_stamp" : 1700181600000, "statistic_num" : 12 }, { "time_stamp" : 1700181900000, "statistic_num" : 9 }, { "time_stamp" : 1700182200000, "statistic_num" : 11 }, { "time_stamp" : 1700182500000, "statistic_num" : 9 }, { "time_stamp" : 1700182800000, "statistic_num" : 10 }, { "time_stamp" : 1700183100000, "statistic_num" : 11 }, { "time_stamp" : 1700183400000, "statistic_num" : 10 }, { "time_stamp" : 1700183700000, "statistic_num" : 9 }, { "time_stamp" : 1700184000000, "statistic_num" : 8 }, { "time_stamp" : 1700188200000, "statistic_num" : 1 } ] } ] }
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 sync_task_id String 同步任务id 最小长度:1 最大长度:255 statistic_time_type String 统计结果时间间隔说明描述 FIVE_MINUTES:5分钟 ONE_HOUR:1小时 最小长度:1 最大长度:255 枚举值: FIVE_MINUTES ONE_HOUR statistic_datas Array of StatisticTypeData objects 查询的同步任务统计结果集 数组长度:0 - 1000 表5 StatisticTypeData 参数 参数类型 描述 data_type String 统计数据类型: REQUEST:请求对象数 SUCCESS:成功对象数 FAILURE:失败对象数 SKIP:跳过对象数 SIZE:对象容量(Byte) 最小长度:1 最大长度:255 枚举值: REQUEST SUCCESS FAILURE SKIP SIZE data Array of StatisticData objects 查询的同步任务统计结果集 数组长度:0 - 1000 表6 StatisticData 参数 参数类型 描述 time_stamp Long 统计时间戳 最小值:0 最大值:9223372036854775807 statistic_num Long 统计数量 最小值:0 最大值:9223372036854775807 状态码: 404 表7 响应Body参数 参数 参数类型 描述 error_msg String 错误信息。 error_code String 错误码。
  • URI GET /v2/{project_id}/sync-tasks/{sync_task_id}/statistics 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目ID 最小长度:1 最大长度:1024 sync_task_id 是 String 同步任务ID。 最小长度:0 最大长度:255 表2 Query参数 参数 是否必选 参数类型 描述 data_type 是 String 统计数据类型: 多类型查询用‘,’分割; REQUEST:接收同步请求对象数 SUCCESS:同步成功对象数 FAILURE:同步失败对象数 SKIP:同步跳过对象数 SIZE:同步成功对象容量(Byte) 最小长度:1 最大长度:255 枚举值: REQUEST SUCCESS FAILURE SKIP SIZE start_time 是 String 查询开始时间 最小长度:1 最大长度:1024 end_time 是 String 查询开始时间 最小长度:1 最大长度:1024
  • 查看设备 登录迁移中心管理控制台。 单击左侧导航栏的“迁移工具”,在页面右上角的当前项目下拉列表中选择迁移项目,即可查看当前项目下的所有Edge设备以及设备状态。 设备状态说明参见下表。 表1 设备状态说明 设备状态 说明 在线 Edge与MgC控制台之间一直连接,无断开。 离线 Edge运行程序退出与MgC控制台之间的连接断开1分钟后,置为“离线”状态。 未激活 已在Edge完成注册但设备还未接入平台。 异常 无此状态,如出现该状态,请联系华为云技术支持。 冻结 无此状态,如出现该状态,请联系华为云技术支持。 单击设备名称前的下拉按钮,可以查看该Edge设备所安装的采集器类型、版本和状态等信息。
  • 事件结构 云审计服务用于标示每个操作事件关键字段的详细信息,具体如表1所示。 为方便用户,部分字段在管理控制台呈现时进行了格式优化。 本章节将基于CTS管理控制台进行介绍和描述。 表1 事件的关键字段 字段名称 是否必选 类型 描述 time 是 Date 事件发生时间。以当地标准时间(采用格林威治时间加当地时区形式)进行展示,例如:2016/12/08 11:24:04 GMT+08:00。在接口中,该字段以时间戳格式进行传输和存储。该字段为格林威治时间1970年01月01日00时00分00秒至现在的总毫秒数。 user 是 Structure 发起操作的云账户信息。 在界面事件列表中,该字段于Operator列呈现。 该字段在API接口中以String类型进行传输和存储。 request 否 Structure 操作的请求内容。 该字段在API接口中以String类型进行传输和存储。 response 否 Structure 操作的响应内容。 该字段在API接口中以String类型进行传输和存储。 service_type 是 String 操作来源。 resource_type 是 String 资源类型。 resource_name 否 String 资源名称。 resource_id 否 String 资源的唯一标识。 source_ip 是 String 发起本次操作的用户的IP,若为系统内调用,则为空。 trace_name 是 String 操作名称。 trace_rating 是 String 操作事件等级,分为normal(正常)、warning(警告)和incident(事故)。 normal:代表本次操作成功。 warning:代表本次操作失败。 incident:代表本次操作引起了比失败更严重的后果,比如会造成节点故障或用户业务故障等情况。 trace_type 是 String 操作类型,分为如下五种: ConsoleAction表示通过管理控制台执行的操作。 SystemAction表示系统内部触发的操作。 ApiCall表示调用ApiGateway触发的操作。 ObsSDK表示通过调用OBS提供的SDK触发的关于OBS桶相关操作。 Others表示除去通过“ObsSDK”触发的关于OBS桶相关的操作。 api_version 否 String 作为操作来源的云服务的API版本号。 message 否 Structure 备注信息。 record_time 是 Number 记录操作的时间,表示方式为时间戳。 trace_id 是 String 操作的唯一标识。 code 否 Number 事件http返回码例如200,400 request_id 否 String 记录本次请求的request id location_info 否 String 记录本次请求出错后,问题定位所需要的辅助信息 endpoint 否 String 该操作涉及云资源的详情页面的endpoint resource_url 否 String 该操作涉及云资源的详情页面的访问链接(不含endpoint) user_agent 否 String OBS桶相关操作中非ObsSDK方式调用时的操作类型。 content_length 否 Number OBS桶相关操作中请求消息体的长度。 total_time 否 Number OBS桶相关操作中请求的响应时间。 父主题: 云审计服务事件参考
  • 响应消息 响应参数 参数 参数类型 描述 status String 任务状态,目前取值如下: SUCCESS:表示该任务执行已经结束,任务执行成功。 FAIL:表示该任务执行已经结束,任务执行失败。 RUNNING:表示该任务正在执行。 INIT:表示该任务还未执行,正在初始化。 job_id String 任务ID。 job_type String 任务类型。 imsCreateImageByInstance:云服务器制作镜像 imsImportImageJob:外部镜像文件创建镜像 imsImportOvaImageJob:外部Ova镜像文件创建镜像 imsVolumeCreateImageJob:数据盘制作数据盘镜像 imsImportDataImageJob:外部镜像文件制作数据盘镜像 imsCreateWholeImageByInstanceJob:云服务器制作整机镜像 imsCreateWholeImageByBackupJob:云备份或云服务器备份制作整机镜像 imsNativeImportImageJob:注册镜像 imsNativeExportImageJob:导出镜像 imsAddImageMembersJob:添加镜像成员 imsDelImageMembersJob:删除镜像成员 imsUpdateImageMembersJob:修改镜像成员 imsCopyImageInRegionJob:Region内复制镜像 imsCopyImageCrossUserJob:跨Region复制镜像 begin_time String 任务开始执行时间。格式为UTC时间。 end_time String 任务结束时间。格式为UTC时间。 error_code String 错误码。 fail_reason String 失败原因。 entities Object 任务自定义属性。 任务正常时,返回镜像的ID;任务异常时,返回错误码和信息。 详情请参见表2。 表2 entities字段数据结构说明 参数 参数类型 描述 image_id String 镜像ID。 current_task String 当前任务名称。 image_name String 镜像名称。 process_percent Double 任务执行进度。 results Array of result objects 批量任务执行结果。详情请参见表3。 sub_jobs_result Array of objects 子任务执行结果。详情请参见表4。 sub_jobs_list Array of string 子任务id列表。 addition_error_code string 添加错误码 addition_error_msg string 添加错误消息 error_code string 错误码 error string 错误消息 alarm_code string 告警代码 表3 result字段数据结构说明 参数 参数类型 描述 image_id String 镜像ID。 project_id String 项目ID。 status String 任务状态。 表4 SubJobResult字段数据结构说明 参数 参数类型 描述 status String 子任务状态,取值如下: SUCCESS:表示该任务执行已经结束,任务执行成功。 FAIL:表示该任务执行已经结束,任务执行失败。 RUNNING:表示该任务正在执行。 INIT:表示该任务还未执行,正在初始化。 job_id String 子任务ID。 job_type String 子任务类型。 begin_time String 子任务开始执行时间。格式为UTC时间。 end_time String 子任务结束时间。格式为UTC时间。 error_code String 错误码。 fail_reason String 失败原因。 entities Object 子任务自定义属性。详情请参见表5 任务正常时,返回镜像的ID。 任务异常时,返回错误码和信息。 表5 SubJobEntities字段数据结构说明 参数 参数类型 描述 image_id String 镜像ID。 image_name String 镜像名称。 响应样例 STATUS CODE 200 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 { "status": "SUCCESS", "entities": { "image_id": "e9e91bff-14b6-4a0b-8377-4ed0813e3360", "image_name": "asdfasdfasdfas", "process_percent": 0.20, "current_task": "CreateImageByInstanceTask", "results": [{ "image_id": "49e9447f-7dff-41e0-8036-f66fe5488c8b", "project_id": "089b2f9a3d80d3062f24c00ca4ed5cbd", "status": "success" } ] }, "job_id": "ff8080814dbd65d7014dbe0d84db0013", "job_type": "createImageByInstance", "begin_time": "04-Jun-2015 18:11:06:586", "end_time": "", "error_code": null, "fail_reason": null }
  • 风格一致:测试用例表达用词要求风格一致 规则7.5.1 测试语法表达规则,即测试用例的表达须符合测试语法表达规则。 规则7.5.2 测试逻辑与测试数据分离。 【测试语法表达规则案例】 类别 说明 建议的语法 语法 操作类 指执行一个特定操作或动作,主要是指测试执行步骤。 [操作者][动作][对象][参数] 用户按键1234567890#* 赋值类 指设置某个对象的属性,主要指预置条件。 设置[对象][属性]为[参数] 设置ICD业务字冠为1234567890#* 检查类 指检查某个对象的属性,主要指预期结果。 检查[对象][属性]为[参数] 检查ICD业务字冠为1234567890#* 重复类 当需要多次重复执行时。 重复步骤[X]到步骤[Y],重复N次 重复执行步骤(或流程)3~10,重复2次 父主题: 用例前置条件、测试步骤、预期结果文字表达规则
  • 身份认证 用户访问代码检查服务的方式有多种,包括代码检查用户界面、API、SDK,无论访问方式封装成何种形式,其本质都是通过代码检查提供的REST风格的API接口进行请求。 代码检查的接口需要经过认证请求后才可以访问成功。代码检查支持两种认证方式: Token认证:通过Token认证调用请求,访问代码检查用户界面默认使用Token认证机制。 AK/SK认证:通过AK(Access Key ID)/SK(Secret Access Key)加密调用请求。推荐使用AK/SK认证,其安全性比Token认证要高。 关于认证鉴权的详细介绍及获取方式,请参见认证鉴权。
  • 相关操作 关闭TensorBoard方式如下: 方式1:单击下图所示的,进入TensorBoard实例管理界面,该界面记录了所有启动的TensorBoard实例,单击对应实例后面的SHUT DOWN即可停止该实例。 图8 单击SHUT DOWN停该实例 方式2:在开发环境JupyterLab中的.ipynb文件窗口中输入命令,关闭 TensorBoard。PID在启动界面有提示或者通过 ps -ef | grep tensorboard 查看。 !kill PID 方式3:单击下方红框中的按钮可以关闭所有启动的TensorBoard实例。 图9 关闭所有启动的TensorBoard实例 方式4(不推荐):直接在JupyterLab中上关闭TensorBoard窗口,此方式仅关闭可视化窗口,并未关闭后台。
  • 如何查看用户组是否具有Tenant Administrator或VSS Administrator权限,及如何对用户组角色授权? 登录华为云,在右上角单击“控制台”。 单击右上角的个人账号下的“统一身份认证”,进入“统一身份认证服务”页面。 选择“用户组”,单击用户组名称即可查看角色授权记录。 图1 查看用户组授权记录 切换至“用户管理”页签,可以查看该用户组下的所有用户,也可以将其他用户添加至该用户组。 如果该用户组缺少相应角色权限,单击“授权”,进入“选择策略”步骤,模糊搜索“Tenant Administrator”或“VSS Administrator”权限的关键字,勾选相应策略。 单击“下一步”,设置最小授权范围。 图2 设置最小授权范围 单击“确定”,即可完成用户组角色授权。 父主题: 二进制成分分析类
  • 请求示例 navi请求体示例。 POST https://{Endpoint}.com/v1/algo/navi { "payload" : { "from" : { "x" : "xxx", "y" : "xxx", "z" : "xxx" }, "to" : { "x" : "xxx", "y" : "xxx", "z" : "xxx" }, "utm" : "51N" } }
  • 响应参数 状态码: 200 表6 响应Header参数 参数 参数类型 描述 X-Trace-Id String 跟踪请求ID。 表7 响应Body参数 参数 参数类型 描述 result Integer 接口返回状态码。 0:导航成功 1:起始地点无效 2:目标地点无效 3:未连接 6:栅格数据 8:途径地点无效 path Array of path objects 返回的路径信息。 表8 path 参数 参数类型 描述 linkID String 路段ID。 x Float X坐标。 y Float Y坐标。 z Float Z坐标。 floor String 楼层信息。 building String 楼层的描述。 status Integer 路段状态。 0:未经计算 1:直行 2:左转 3:左前方 4:左后方 5:右转 6:右前方 7:右后方 8:直梯 9:终止点 10:扶梯 11:楼梯 12:途经点
  • 请求参数 表1 请求Header参数 参数 是否必选 参数类型 描述 X-Trace-Id 否 String 追踪请求ID。 App-Id 否 String 可选项,场景模板分配的app_id;若无,置空。 Uuid 是 String 设备或者用户唯一标识。 X-Auth-Token 否 String IAM Token,和Authorization二选一必传。 Authorization 否 String AK/SK签名结果,和X-Auth-Token二选一必传。 表2 请求Body参数 参数 是否必选 参数类型 描述 payload 是 payload object 导航服务请求体。 表3 payload 参数 是否必选 参数类型 描述 from 是 from object 起始位置。 to 是 to object 终点位置。 utm 是 String 地区UTM编码。 表4 from 参数 是否必选 参数类型 描述 x 是 String X坐标。 y 是 String Y坐标。 z 是 String Z坐标。 表5 to 参数 是否必选 参数类型 描述 x 是 String X坐标。 y 是 String Y坐标。 z 是 String Z坐标。
共100000条