华为云用户手册

  • 响应示例 状态码:200 OK。 { "total_count" : 2, "desktop_snapshots" : [ { "snapshot_id" : "eed156d9-02a5-46f5-8eb1-54f09ab9fbae", "snapshot_name" : "sys0420_xzx03_1713602176593", "desktop_id" : "7163a7ba-fc09-4238-ab73-0689ea7f54c3", "desktop_name" : "xzx03", "desktop_sid" : "22ad6780-3236-4838-b509-8068d254e9de", "is_system_disk" : true, "status" : "create_success", "description" : "description。", "create_time" : "2024-04-20T08:36:16Z", "create_type" : "MANUALLY" }, { "snapshot_id" : "a7e996da-20db-4de8-8aff-4c8e4c6d5ed3", "snapshot_name" : "AUTOCREATED_AA_1713595811910", "desktop_id" : "a3e8d0d0-79df-413d-a327-d702a4fb2e15", "desktop_name" : "AA", "desktop_sid" : "1346b13d-d3e4-4965-bfb4-5bb880bf7dbf", "is_system_disk" : false, "status" : "create_success", "description" : "description。", "create_time" : "2024-04-20T06:50:11Z", "create_type" : "AUTO" } ] }
  • 响应参数 状态码:200 表4 响应Body参数 参数 参数类型 描述 desktop_snapshots Array of DesktopSnapshotDetailInfo objects 桌面快照详情列表。 total_count Integer 桌面快照总数。 表5 DesktopSnapshotDetailInfo 参数 参数类型 描述 snapshot_id String 桌面快照ID。 snapshot_name String 桌面快照记录名称。 desktop_id String 桌面快照对应的桌面id。 desktop_name String 桌面快照对应的桌面名称。 desktop_sid String 桌面快照对应的桌面sid。 desktop_pool_id String 桌面快照对应的桌面池id。 is_system_disk Boolean 快照对应磁盘类型,true表示系统盘,false表示数据盘。 status String 快照状态。 creating:表示创建中。 restoring:表示恢复中。 create_success:表示创建成功。 create_failed:表示创建快照失败。 restore_success:表示快照恢复成功。 restore_failed:表示快照恢复失败。 process Integer 快照任务进度, 取值范围0-100以及null,null表示该快照无任务,0-100表明该任务进度的百分比。 description String 快照描述。 create_time String 快照的创建时间,UTC时间,格式为:yyyy-MM-dd'T'HH:mm:ss'Z。' create_type String 快照创建类型。 AUTO 定时任务自动创建。 MANUALLY 手动创建。 last_restore_time String 快照的最近恢复时间,UTC时间,格式为:yyyy-MM-dd'T'HH:mm:ss'Z。' restore_fail_reason String 快照恢复失败原因。 状态码:400 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码,失败时返回。 error_msg String 错误描述。 encoded_authorization_message String 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 状态码:403 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码,失败时返回。 error_msg String 错误描述。 encoded_authorization_message String 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 状态码:404 表8 响应Body参数 参数 参数类型 描述 error_code String 错误码,失败时返回。 error_msg String 错误描述。 encoded_authorization_message String 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 状态码:500 表9 响应Body参数 参数 参数类型 描述 error_code String 错误码,失败时返回。 error_msg String 错误描述。 encoded_authorization_message String 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 状态码:default 表10 响应Body参数 参数 参数类型 描述 error_code String 错误码,失败时返回。 error_msg String 错误描述。 encoded_authorization_message String 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。
  • URI GET /v2/{project_id}/snapshots 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目ID。 表2 Query参数 参数 是否必选 参数类型 描述 desktop_id 否 String 桌面id。 desktop_name 否 String 桌面名称。 snapshot_name 否 String 快照名称。 disk_type 否 String 快照类型。 SYSTEM_DISK 系统盘。 DATA_DISKS 数据盘。 ALL 系统盘和数据盘。 create_type 否 String 快照创建类型。 AUTO 定时任务自动创建。 MANUALLY 手动创建。 status 否 String 快照状态。 creating:表示创建中。 restoring:表示恢复中。 create_success:表示创建成功。 create_failed:表示创建快照失败。 restore_success:表示快照恢复成功。 restore_failed:表示快照恢复失败。 sort_field 否 String 排序字段名称,需要结合sort_type字段一起使用。 create_time 创建时间。 snapshot_name 快照名称。 sort_type 否 String 排序类型,默认升序,需要结合sort_field字段一起使用。 ASC 升序。 DESC 降序。 offset 否 Integer 用于分页查询,查询的起始记录序号,从0开始。 limit 否 Integer 用于分页查询。默认1000,取值范围1-1000。
  • 响应示例 状态码:200 查询桌面用户详细信息响应。 { "user_detail" : { "description" : "api测试用户。", "id" : "8a2c3f9579d240820179d51e6caf0001", "user_name" : "api-test", "user_email" : "test@huawei.com", "object_sid" : "8a2c3f9579d240820179d51e6caf0001", "sam_account_name" : "api-test", "full_name" : "api-test", "distinguished_name" : "api-test", "account_type" : 0, "when_created" : "2021-06-03T19:43:31.000Z", "account_expires" : 0, "user_expired" : false, "locked" : false, "enable_change_password" : true, "password_never_expired" : false, "next_login_change_password" : true, "disabled" : false, "group_names" : [ "DomainUsers" ], "total_desktops" : 0 } }
  • 响应参数 状态码:200 表3 响应Body参数 参数 参数类型 描述 user_detail UserDetail object 用户详情。 表4 UserDetail 参数 参数类型 描述 description String 用户描述。 id String 用户id。 user_name String 桌面用户名。 user_email String 用户邮箱。 user_phone String 手机号。 active_type String 激活类型,默认为用户激活。 USER_ACTIVATE: 用户激活 ADMIN_ACTIVATE: 管理员激活 object_sid String 用户sid。 sam_account_name String 登录名(windows以前版本)。 user_principal_name String 用户登录名。 full_name String 全名。 distinguished_name String 用户在域树上的唯一位置。 account_type Integer 帐号类型(0:用户;1:用户组)。 when_created String UTC时间毫秒数对应的字符,格式为:yyyy-MM-ddTHH:mm:ss.SSSZ。 account_expires Long 账号有效期最后一天对应的UTC时间,以毫秒为单位。 is_pre_user Boolean 是否是预创建的用户,true表示是预创建用户,false表示不是预创建用户。 user_expired Boolean 账户是否过期,true表示过期,false表示未过期。 locked Boolean 账户是否被锁定,true表示被锁定,false表示未锁定。 enable_change_password Boolean 是否允许修改密码,true表示允许修改密码,false表示不允许。 password_never_expired Boolean 密码是否永不过期,true表示密码永不过期,false表示密码会过期。 next_login_change_password Boolean 下次登录是否需要重置密码,true表示需要重置密码,false表示不需要。 disabled Boolean 账户是否禁用,true表示被禁用,false表示未禁用。 group_names Array of strings 加入的组列表。 share_space_subscription Boolean 用户是否订阅协同,true表示已订阅,false表示未订阅。 share_space_desktops Integer 用户已绑定协同桌面数。 total_desktops Integer 用户绑定桌面云总数。 状态码:400 表5 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 encoded_authorization_message String 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 状态码:401 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 encoded_authorization_message String 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 状态码:403 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 encoded_authorization_message String 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 状态码:404 表8 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 encoded_authorization_message String 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 状态码:405 表9 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 encoded_authorization_message String 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 状态码:500 表10 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 encoded_authorization_message String 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 状态码:503 表11 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 encoded_authorization_message String 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。
  • 请求示例 { "app_ids" : [ "3f791197-d166-4c8e-81e4-38c40ffc1989", "62f48b59-0ebb-4b1e-ad35-f64948a0591b" ], "authorization_type" : "ALL_USER", "users" : [ { "account" : "zhangsan******@test.com", "domain" : "siv.**.huawei.com", "account_type" : "SIMPLE", "platform_type" : "AD" } ], "del_users" : [ { "account" : "zhangsan******@test.com", "domain" : "siv.**.huawei.com", "account_type" : "SIMPLE", "platform_type" : "AD" } ] }
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 否 String 用户Token。 通过调用 IAM 服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 表3 请求Body参数 参数 是否必选 参数类型 描述 app_ids 是 Array of strings 批量唯一标识请求列表,一次请求数量区间 [1, 20]。 authorization_type 是 String ALL_USER - 全部用户 ASSIGN_USER - 授权指定用户 users 否 Array of AccountInfo objects 新增授权用户列表,一次请求数量区间 [0, 100]。 del_users 否 Array of AccountInfo objects 取消授权用户列表,一次请求数量区间 [0, 100]。 表4 AccountInfo 参数 是否必选 参数类型 描述 account 是 String 账户,账户的格式必须为:账户(组)的形式。 domain 否 String 域名 (用户组必填,不填时使用默认值 local.com)。 account_type 是 String 账户类型: 'SIMPLE' - 普通用户 'USER_GROUP' - 用户组 platform_type 否 String 平台类型: AD - AD域 LOCAL - LiteAs
  • 响应参数 状态码: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 错误描述。 状态码:405 表9 响应Body参数 参数 参数类型 描述 error_code String 错误码,失败时返回。 error_msg String 错误描述。 状态码:500 表10 响应Body参数 参数 参数类型 描述 error_code String 错误码,失败时返回。 error_msg String 错误描述。 状态码:503 表11 响应Body参数 参数 参数类型 描述 error_code String 错误码,失败时返回。 error_msg String 错误描述。
  • 响应参数 状态码:400 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码,失败时返回。 error_msg String 错误描述。 encoded_authorization_message String 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 状态码:401 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码,失败时返回。 error_msg String 错误描述。 encoded_authorization_message String 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 状态码:403 表8 响应Body参数 参数 参数类型 描述 error_code String 错误码,失败时返回。 error_msg String 错误描述。 encoded_authorization_message String 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 状态码:404 表9 响应Body参数 参数 参数类型 描述 error_code String 错误码,失败时返回。 error_msg String 错误描述。 encoded_authorization_message String 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 状态码:500 表10 响应Body参数 参数 参数类型 描述 error_code String 错误码,失败时返回。 error_msg String 错误描述。 encoded_authorization_message String 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。
  • 请求示例 { "name" : "string", "description" : "string。", "ou_name" : "string", "tags" : [ { "key" : "string", "value" : "string" } ], "disconnected_retention_period" : 43200, "enable_autoscale" : true, "autoscale_policy" : { "autoscale_type" : "string", "max_auto_created" : 1000, "min_idle" : 100, "once_auto_created" : 10 }, "in_maintenance_mode" : true, "desktop_name_policy_id" : "string", "availability_zone" : "string" }
  • 响应参数 状态码:200 表10 响应Body参数 参数 参数类型 描述 orders Array of OrderV5 objects 批量生成订单结果。 表11 OrderV5 参数 参数类型 描述 order_id String 订单id。 order_status Integer 订单状态:0:初始化; 1:待审核; 2:待退款; 3:处理中; 4:已取消; 5:已完成; 6:待支付; 7:补偿中; 8:待审批; 9:待确认; 10:待发货; 11:待收货; 12:待上门取货; 13:换新中; 14:待商家收货。 result String 结果,SUC CES S:成功; FAIL:失败。 result_code String result=FAIL时,必填,表示该订单失败原因。 result_msg String 失败信息,和result_code结对出现。 状态码:400 表12 响应Body参数 参数 参数类型 描述 error_code String 错误码,失败时返回。 error_msg String 错误描述。 encoded_authorization_message String 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 状态码:409 表13 响应Body参数 参数 参数类型 描述 error_code String 错误码,失败时返回。 error_msg String 错误描述。 encoded_authorization_message String 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 状态码:500 表14 响应Body参数 参数 参数类型 描述 error_code String 错误码,失败时返回。 error_msg String 错误描述。 encoded_authorization_message String 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。
  • 请求示例 { "type" : "string", "add_volume_param" : { "desktop_pool_id" : "string", "desktop_ids" : [ "string" ], "promotion_plan_id" : "string", "volume_type" : "string", "volume_size" : 8200 }, "extend_volume_param" : { "desktop_pool_id" : "string", "desktop_ids" : [ "string" ], "promotion_plan_id" : "string", "desktop_pool_disk_id" : "string", "new_size" : 8200 }, "resize_param" : { "desktop_pool_id" : "string", "desktop_ids" : [ "string" ], "promotion_plan_id" : "string", "product_id" : "string", "mode" : "string", "extend_param" : { "is_auto_pay" : "string" } }, "change_image_param" : { "desktop_pool_id" : "string", "desktop_ids" : [ "string" ], "promotion_plan_id" : "string", "image_spec_code" : "string", "image_id" : "string", "delay_time" : 15, "message" : "string" }, "add_sub_resources_param" : { "desktop_pool_id" : "string", "desktop_ids" : [ "string" ], "promotion_plan_id" : "string", "sub_resource_sku" : "string" }, "delete_sub_resources_param" : { "desktop_pool_id" : "string", "desktop_ids" : [ "string" ], "promotion_plan_id" : "string", "sub_resource_type" : "string" } }
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 否 String 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 Content-Type 否 String 发送的实体的MIME类型。 表3 请求Body参数 参数 是否必选 参数类型 描述 type 否 String 下单类型。 ADD_VOLUME:增加磁盘 EXTEND_VOLUME:扩容磁盘 RESIZE:变更规格 CHANGE_IMAGE:切换镜像 ADD_SUB_RESOURCES:购买桌面协同资源 DELETE_SUB_RESOURCES:退订桌面协同资源 add_volume_param 否 EstimateAddVolumeRequestBody object 包周期桌面池添加磁盘、切换镜像询价请求体。 extend_volume_param 否 EstimateExtendVolumeRequestBody object 包周期扩容磁盘询价请求体。 resize_param 否 CreateResizeOrderRequestBody object 包周期变更规格询价请求体。 change_image_param 否 CreateChangeImageOrderRequestBody object 包周期重建系统盘询价请求体。 add_sub_resources_param 否 EstimateAddSubResourcesRequestBody object 包周期新增附属资源询价请求体。 delete_sub_resources_param 否 CreateDeleteSubResourcesOrderRequestBody object 包周期删除附属资源询价请求体。 表4 EstimateAddVolumeRequestBody 参数 是否必选 参数类型 描述 desktop_pool_id 否 String 桌面池ID。当desktop_pool_id与desktop_ids同时存在时,取desktop_ids的值,两者不可同时为空。 desktop_ids 否 Array of strings 包周期桌面ID列表。 不可同时存在普通桌面和池桌面ID。 promotion_plan_id 否 String 促销计划ID。 volume_type 是 String 新增磁盘类型。 volume_size 是 Integer 新增磁盘大小。 表5 EstimateExtendVolumeRequestBody 参数 是否必选 参数类型 描述 desktop_pool_id 否 String 桌面池ID。当desktop_pool_id与desktop_ids同时存在时,取desktop_ids的值,两者不可同时为空。 desktop_ids 否 Array of strings 包周期桌面ID列表。 不可同时存在普通桌面和池桌面ID。 promotion_plan_id 否 String 促销计划ID。 desktop_pool_disk_id 是 String 需要扩容的桌面池磁盘ID。 new_size 是 Integer 扩容后的磁盘大小。 表6 CreateResizeOrderRequestBody 参数 是否必选 参数类型 描述 desktop_pool_id 否 String 桌面池ID。当desktop_pool_id与desktop_ids同时存在时,取desktop_ids的值,两者不可同时为空。 desktop_ids 否 Array of strings 包周期桌面ID列表。 不可同时存在普通桌面和池桌面ID。 promotion_plan_id 否 String 促销计划ID。 product_id 是 String 目标规格产品ID。 mode 否 String 是否支持开机状态下执行变更规格操作。固定传值STOP_DESKTOP,如果桌面处于开机状态,会先关机再变更规格。 表7 CreateChangeImageOrderRequestBody 参数 是否必选 参数类型 描述 desktop_pool_id 否 String 桌面池ID。当desktop_pool_id与desktop_ids同时存在时,取desktop_ids的值,两者不可同时为空。 desktop_ids 否 Array of strings 包周期桌面ID列表。 不可同时存在普通桌面和池桌面ID。 promotion_plan_id 否 String 促销计划ID。 image_spec_code 否 String 云市场镜像的specCode,即将停用。image_spec_code与image_id同时存在时取image_id的值,两者不可同时为空。 image_id 否 String 云市场镜像ID,建议使用image_id。 delay_time 否 Integer 立即重建时给用户预留的保存数据的时间(单位:分钟)。 message 否 String 下发重建系统盘任务时,给用户发送的提示信息。 表8 EstimateAddSubResourcesRequestBody 参数 是否必选 参数类型 描述 desktop_pool_id 否 String 桌面池ID。当desktop_pool_id与desktop_ids同时存在时,取desktop_ids的值,两者不可同时为空。 desktop_ids 否 Array of strings 包周期桌面ID列表。 不可同时存在普通桌面和池桌面ID。 promotion_plan_id 否 String 促销计划ID。 sub_resource_sku 是 String 新增附属资源SKU码。 表9 CreateDeleteSubResourcesOrderRequestBody 参数 是否必选 参数类型 描述 desktop_pool_id 否 String 桌面池ID。当desktop_pool_id与desktop_ids同时存在时,取desktop_ids的值,两者不可同时为空。 desktop_ids 否 Array of strings 包周期桌面ID列表。 不可同时存在普通桌面和池桌面ID。 promotion_plan_id 否 String 促销计划ID。 sub_resource_type 是 String 待删除附属资源类型:DESKTOP_SHARER(桌面协同资源)。
  • 请求示例 GET /v1/a4da8115c9d8464ead3a38309130523f/app-servers/server-metric-data/8115c9d8464ead3a38309130?namespace=AGT.E CS &metric_name=cpu_util&from=1691671739879&to=1691671739872&period=1&filter=average
  • 响应示例 状态码:200 操作成功。 { "server_metrics" : [ { "datapoints" : [ { "average" : 0.23, "timestamp" : 1442341200000, "unit" : "%" } ], "metric_name" : "gpu_usage_encoder", "dimension_value" : "2e84018fc8b4484b94e89aae212fe615" }, { "datapoints" : [ { "average" : 0.23, "timestamp" : 1442341200000, "unit" : "%" } ], "metric_name" : "gpu_usage_encoder", "dimension_value" : "7784018fc8b4484b94e89aae212fe455" } ] }
  • 响应参数 状态码:200 表4 响应Body参数 参数 参数类型 描述 server_metrics Array of ServerMetricData objects 监控数据。 表5 ServerMetricData 参数 参数类型 描述 metric_name String 监控指标名称。 datapoints Array of ServerDataPoints objects 指标数据列表。 dimension_value String 维度值,仅查询GPU监控信息时有值。 表6 ServerDataPoints 参数 参数类型 描述 average Double 聚合周期内指标数据的平均值。 max Double 聚合周期内指标数据的最大值。 min Double 聚合周期内指标数据的最小值。 sum Double 聚合周期内指标数据的求和值。 variance Double 聚合周期内指标数据的方差。 timestamp Long 指标采集时间,UNIX时间戳,单位毫秒。 unit 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 错误描述。 状态码:405 表11 响应Body参数 参数 参数类型 描述 error_code String 错误码,失败时返回。 error_msg String 错误描述。 状态码:500 表12 响应Body参数 参数 参数类型 描述 error_code String 错误码,失败时返回。 error_msg String 错误描述。 状态码:503 表13 响应Body参数 参数 参数类型 描述 error_code String 错误码,失败时返回。 error_msg String 错误描述。
  • URI GET /v1/{project_id}/app-servers/server-metric-data/{server_id} 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目唯一标识。 server_id 是 String 服务器唯一标识。 表2 Query参数 参数 是否必选 参数类型 描述 namespace 是 String 服务的命名空间:例如 "SYS.ECS/AGT.ECS",当namespace为AGT.ECS,则查询GPU监控指标: - SYS.ECS:弹性云服务器的基础监控指标。 - AGT.ECS:弹性云服务器操作系统监控的监控指标(GPU指标)。 metric_name 是 String 监控查询指标名称: - SYS.ECS命名空间的指标名称,请参考帮助文档:“弹性云服务器支持的基础监控指标”。 - AGT.ECS命名空间的指标名称,请参考帮助文档:“操作系统监控指标:GPU”。 from 是 String 查询数据起始时间,UNIX时间戳,单位毫秒。 to 是 String 查询数据截止时间UNIX时间戳,单位毫秒。from必须小于to。 period 是 Integer 监控数据粒度。 取值范围: - 1: 实时数据。 - 300: 5分钟粒度。 - 1200: 20分钟粒度。 - 3600: 1小时粒度。 - 14400: 4小时粒度。 - 86400: 1天粒度。 filter 是 String 数据聚合方式,支持的聚合方式如下: - average:聚合周期内指标数据的平均值。 - max:聚合周期内指标数据的最大值。 - min:聚合周期内指标数据的最小值。 - sum:聚合周期内指标数据的求和值。 - variance:聚合周期内指标数据的方差。
  • 响应示例 状态码:200 成功响应。 { "count" : 0, "items" : [ { "name" : "user-file-persistent", "location" : "https://sfs-tmp.****.huawei.com:/sfs-tmp", "usage" : 1024, "create_time" : "2024-12-25T12:19:03.229Z" } ] }
  • 响应参数 状态码:200 表3 响应Body参数 参数 参数类型 描述 count Integer 总数。 items Array of Sfs3Storage objects 存储列表。 表4 Sfs3Storage 参数 参数类型 描述 name String 文件系统名称。 location String 挂载地址。 usage String 存储使用量(Byte)。 create_time String 创建时间。 状态码:400 表5 响应Body参数 参数 参数类型 描述 error_code String 错误码,失败时返回。 error_msg String 错误描述。 状态码:401 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码,失败时返回。 error_msg String 错误描述。 状态码:403 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码,失败时返回。 error_msg String 错误描述。 状态码:404 表8 响应Body参数 参数 参数类型 描述 error_code String 错误码,失败时返回。 error_msg String 错误描述。 状态码:405 表9 响应Body参数 参数 参数类型 描述 error_code String 错误码,失败时返回。 error_msg String 错误描述。 状态码:500 表10 响应Body参数 参数 参数类型 描述 error_code String 错误码,失败时返回。 error_msg String 错误描述。 状态码:503 表11 响应Body参数 参数 参数类型 描述 error_code String 错误码,失败时返回。 error_msg String 错误描述。
  • 响应参数 状态码:200 表4 响应Body参数 参数 参数类型 描述 resources Array of ResourceNoLimit objects 配额资源列表。 site_id String 站点ID。 表5 ResourceNoLimit 参数 参数类型 描述 type String 资源类别。 general_instances:普通桌面 Memory:内存 cores:CPU volumes:磁盘数量 volume_gigabytes:磁盘容量 gpu_instances:GPU桌面 deh:云办公主机 users:用户 policy_groups: 策略组 Cores: CPU(配额工具使用) quota Integer 配额数。 used Integer 配额已用值。 unit String 配额单位。 状态码:400 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 encoded_authorization_message String 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 状态码:401 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 encoded_authorization_message String 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 状态码:403 表8 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 encoded_authorization_message String 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 状态码:404 表9 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 encoded_authorization_message String 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 状态码:500 表10 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 encoded_authorization_message String 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。
  • 响应参数 状态码:200 表4 响应Body参数 参数 参数类型 描述 function_configs Array of FunctionConfig objects 租户个性配置列表。 表5 FunctionConfig 参数 参数类型 描述 id String 功能配置id。 name String 功能配置名称。 status String 功能配置开关的状态,表示开启还是关闭 ON/OFF。 - ON: 开启该功能 - OFF: 关闭该功能。 values Array of MapObject objects 配置项列表,键值对格式。 表6 MapObject 参数 参数类型 描述 key String 配置项的键。 value String 配置项对应的值。 状态码:400 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 encoded_authorization_message String 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 状态码:401 表8 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 encoded_authorization_message String 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 状态码:403 表9 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 encoded_authorization_message String 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 状态码:404 表10 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 encoded_authorization_message String 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 状态码:500 表11 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 encoded_authorization_message String 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。
  • 响应参数 状态码:200 表4 响应Body参数 参数 参数类型 描述 count Integer 总数。 状态码: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 错误描述。 状态码:405 表9 响应Body参数 参数 参数类型 描述 error_code String 错误码,失败时返回。 error_msg String 错误描述。 状态码:500 表10 响应Body参数 参数 参数类型 描述 error_code String 错误码,失败时返回。 error_msg String 错误描述。 状态码:503 表11 响应Body参数 参数 参数类型 描述 error_code String 错误码,失败时返回。 error_msg String 错误描述。
  • URI GET /v1/{project_id}/app-server-sub-jobs/actions/count 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目唯一标识。 表2 Query参数 参数 是否必选 参数类型 描述 status 否 String job详情的状态: WAITING - 等待 RUNNING - 运行中 SUCCESS - 成功 FAILED - 失败 ABNORMAL - 异常 ROLLBACK - 回滚中 ABORTING - 取消 job_type 否 String 任务类型,传入多个任务类型的时候将任务类型用英文逗号(,)进行分隔。 job_id 否 String 任务ID。
  • 响应参数 状态码:200 表3 响应Body参数 参数 参数类型 描述 quotas QuotaNoLimit object 配额信息。 site_quotas Array of SiteQuotaNoLimit objects 站点配额信息,暂不包括中心站点。 表4 QuotaNoLimit 参数 参数类型 描述 resources Array of ResourceNoLimit objects 配额资源列表。 表5 SiteQuotaNoLimit 参数 参数类型 描述 resources Array of ResourceNoLimit objects 配额资源列表。 site_id String 站点ID。 表6 ResourceNoLimit 参数 参数类型 描述 type String 资源类别。 general_instances:普通桌面 Memory:内存 cores:CPU volumes:磁盘数量 volume_gigabytes:磁盘容量 gpu_instances:GPU桌面 deh:云办公主机 users:用户 policy_groups: 策略组 Cores: CPU(配额工具使用) quota Integer 配额数。 used Integer 配额已用值。 unit String 配额单位。 状态码:400 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 encoded_authorization_message String 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 状态码:401 表8 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 encoded_authorization_message String 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 状态码:403 表9 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 encoded_authorization_message String 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 状态码:404 表10 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 encoded_authorization_message String 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 状态码:500 表11 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 encoded_authorization_message String 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。
  • 响应示例 状态码:200 查询租户配额响应。 { "quotas" : { "resources" : [ { "type" : "general_instances", "quota" : 10, "used" : 3 }, { "type" : "volumes", "quota" : 500, "used" : 33 }, { "type" : "volume_gigabytes", "quota" : 21500, "unit" : "GB", "used" : 2090 }, { "type" : "cores", "quota" : 80, "used" : 10 }, { "type" : "Memory", "quota" : 100, "unit" : "GB", "used" : 19 }, { "type" : "gpu_instances", "quota" : 10, "used" : 0 }, { "type" : "users", "quota" : 3000, "used" : 29 }, { "type" : "policy_groups", "quota" : 10, "used" : 0 }, { "type" : "Cores", "quota" : 80, "used" : 0 } ] }, "site_quotas" : [ { "site_id" : 147258369, "resources" : [ { "type" : "gpu_instances", "quota" : 50, "used" : 0 }, { "type" : "ies_instances", "quota" : 500, "used" : 0 } ] } ] }
  • URI GET /v2/{project_id}/statistics/notification-records 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目ID。 表2 Query参数 参数 是否必选 参数类型 描述 metric_name 否 String 指标名称(精确匹配) (metric_name和rule_id不允许同时为空) rule_id 否 String 通知规则ID (metric_name和rule_id不允许同时为空) offset 否 Integer 查询的偏移量,默认值0。 limit 否 Integer 单次查询的大小[1-100],默认值10。
  • 响应示例 状态码:200 正常。 { "policies" : [ { "policy_id" : "8ac225c2781edb0d01781edde3f4xxxx", "create_time" : "2022-10-24T17:24:56.000+00:00", "policy_name" : "PRIVATE_ACCESS", "blacklist_type" : "INTERNET" } ], "total" : 1 }
  • URI GET /v2/{project_id}/access-policy 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目id。 表2 Query参数 参数 是否必选 参数类型 描述 access_control_type 否 String 接入策略控制类型 ACCESS_TYPE: 接入类型 IP_WHITE_LIST: IP白名单 limit 否 Integer 每页数量,范围0-100,默认100。 offset 否 Integer 偏移量,范围0-99,默认0。
  • 响应参数 状态码:200 表4 响应Body参数 参数 参数类型 描述 policies Array of AccessPolicyDetailInfo objects 查询接入策略响应。 total Integer 策略总数。 表5 AccessPolicyDetailInfo 参数 参数类型 描述 policy_name String 策略名。 blacklist_type String 黑名单类型,当前黑名单只支持互联网。 INTERNET: 互联网 access_control_type String 访问控制类型。默认为接入类型 ACCESS_TYPE: 接入类型 IP_WHITE_LIST: IP白名单 ip_list Array of IpInfo objects 策略的ip列表。 ip_total_count Integer 策略总数。 policy_id String 策略id。 create_time String 接入策略创建的时间。 表6 IpInfo 参数 参数类型 描述 ip_address String ip地址。 subnet_mask String 子网掩码。 状态码:400 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 encoded_authorization_message String 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 状态码:401 表8 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 encoded_authorization_message String 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 状态码:403 表9 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 encoded_authorization_message String 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 状态码:404 表10 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 encoded_authorization_message String 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 状态码:405 表11 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 encoded_authorization_message String 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 状态码:500 表12 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 encoded_authorization_message String 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 状态码:503 表13 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 encoded_authorization_message String 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。
  • 响应示例 状态码:200 正常。 { "id" : "2c2be3fb-0013-48d5-a081-0731f3473997", "name" : "POOL2", "type" : "DYNAMIC", "description" : "string。", "created_time" : "2023-01-04T07:10:53.554Z", "charging_mode" : "1", "desktop_count" : 10, "desktop_used" : 5, "on_demand_desktop_num" : 0, "availability_zone" : "string", "subnet_id" : "string", "product" : { "product_id" : "workspace.x86.ultimate.large2", "flavor_id" : "s6.large.2", "type" : "BASE", "cpu" : "2", "memory" : "4096", "descriptions" : "尊享办公|2核|4GB内存。", "charge_mode" : "1", "architecture" : "x86", "is_gpu" : false, "package_type" : "ultimate", "system_disk_type" : "SAS", "system_disk_size" : "80", "contain_data_disk" : false, "resource_type" : "hws.resource.type.workspace.desktop", "cloud_service_type" : "hws.service.type.vdi", "volume_product_type" : "workspace", "status" : "normal", "sub_product_list" : [ ] }, "image_id" : "string", "image_name" : "string", "image_os_type" : "string", "image_os_version" : "string", "image_os_platform" : "string", "image_product_code" : "string", "root_volume" : { "id" : "string", "type" : "string", "size" : 8200, "cluster_id" : "string", "resource_spec_code" : "string" }, "data_volumes" : [ { "id" : "string", "type" : "string", "size" : 8200, "cluster_id" : "string", "resource_spec_code" : "string" } ], "security_groups" : [ { "id" : "string", "name" : "string" } ], "disconnected_retention_period" : 10, "enable_autoscale" : true, "autoscale_policy" : { "autoscale_type" : "AUTO_CREATED", "max_auto_created" : 1000, "min_idle" : 100, "once_auto_created" : 10 }, "status" : "STEADY", "enterprise_project_id" : "0", "in_maintenance_mode" : false, "desktop_name_policy_id" : "TEST" }
共100000条