批量检查加域 - BatchCheckDesktopRejoinDomain
功能介绍
该接口用于批量检查桌面是否支持重新加入AD域。
调试
您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。
授权信息
账号具备所有API的调用权限,如果使用账号下的IAM用户调用当前API,该IAM用户需具备调用API所需的权限。
- 如果使用角色与策略授权,具体权限要求请参见权限和授权项。
- 如果使用身份策略授权,需具备如下身份策略权限。
URI
POST /v2/{project_id}/desktops/batch-rejoin-domain/check
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| project_id | 是 | String | 项目ID。 |
请求参数
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| desktop_ids | 是 | Array of strings | 桌面ID列表。 |
响应参数
状态码:200
| 参数 | 参数类型 | 描述 |
|---|---|---|
| total_count | Integer | 检查总数。 |
| desktops | Array of BatchCheckRejoinDomainResult objects | 检查结果列表。 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| desktop_id | String | 桌面ID。 |
| desktop_name | String | 桌面名称。 |
| image_name | String | 镜像名称。 |
| domain_status | Integer | 加域状态。|- 1 正常。 2 脱域。 3 未上报。 |
| rejoin_able | Boolean | 是否可以加域。 |
| product | ProductInfo object | 产品信息。 |
| error_code | String | 错误码。 |
| error_msg | String | 错误信息。 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| product_id | String | 产品ID。 |
| flavor_id | String | 产品规格ID。 |
| type | String | 产品类型。 |
| cpu | String | CPU。 |
| memory | String | 内存。 |
| descriptions | String | 产品描述。 |
| charge_mode | String | 周期套餐标识,0表示包周期,1表示按需。 |
| architecture | String | 产品架构。 |
| is_gpu | Boolean | 是否是GPU类型的规格。 |
| package_type | String | 套餐类型。 |
| system_disk_type | String | 系统盘类型。 |
| system_disk_size | String | 系统盘大小。 |
| contain_data_disk | Boolean | 套餐计费是否包含了数据盘,off-不包含。 |
| resource_type | String | 资源类型。 |
| cloud_service_type | String | 云服务类型。 |
| volume_product_type | String | 磁盘产品类型。 |
| status | String | 默认在售状态,normal代表正常,sellout代表售空,abandon代表下线。 |
状态码:400
| 参数 | 参数类型 | 描述 |
|---|---|---|
| error_code | String | 错误码,失败时返回。 |
| error_msg | String | 错误描述。 |
| error_detail | String | 错误详情。 |
| encoded_authorization_message | String | 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 |
状态码:401
| 参数 | 参数类型 | 描述 |
|---|---|---|
| error_code | String | 错误码,失败时返回。 |
| error_msg | String | 错误描述。 |
| error_detail | String | 错误详情。 |
| encoded_authorization_message | String | 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 |
状态码:403
| 参数 | 参数类型 | 描述 |
|---|---|---|
| error_code | String | 错误码,失败时返回。 |
| error_msg | String | 错误描述。 |
| error_detail | String | 错误详情。 |
| encoded_authorization_message | String | 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 |
状态码:404
| 参数 | 参数类型 | 描述 |
|---|---|---|
| error_code | String | 错误码,失败时返回。 |
| error_msg | String | 错误描述。 |
| error_detail | String | 错误详情。 |
| encoded_authorization_message | String | 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 |
状态码:409
| 参数 | 参数类型 | 描述 |
|---|---|---|
| error_code | String | 错误码,失败时返回。 |
| error_msg | String | 错误描述。 |
| error_detail | String | 错误详情。 |
| encoded_authorization_message | String | 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 |
状态码:500
| 参数 | 参数类型 | 描述 |
|---|---|---|
| error_code | String | 错误码,失败时返回。 |
| error_msg | String | 错误描述。 |
| error_detail | String | 错误详情。 |
| encoded_authorization_message | String | 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 |
请求示例
POST /v2/29dfe82ada564ac2b927e1ff036d9a9b/desktops/batch-rejoin-domain/check
{
"desktop_ids" : [ "acbxxx0695-4b5c-a9a2-8xxxxd7f4998", "acbxxx0695-4b5c-a9a2-8xxxxd7f4999" ]
} 响应示例
状态码:200
正常。
{
"total_count" : 100,
"desktops" : [ {
"desktop_id" : "acbxxx0695-4b5c-a9a2-8xxxxd7f4999",
"desktop_name" : "test-desktop2",
"image_name" : "test-image2",
"domain_status" : 2,
"rejoin_able" : true,
"error_code" : "XXXX",
"error_msg" : "xxxx"
} ]
} 状态码
| 状态码 | 描述 |
|---|---|
| 200 | 正常。 |
| 400 | 由于包含语法错误,当前请求无法被服务器理解。 |
| 401 | 鉴权失败。 |
| 403 | 没有操作权限。 |
| 404 | 找不到资源。 |
| 409 | 操作冲突。 |
| 500 | 服务内部错误,具体返回错误码请参见错误码说明。 |
错误码
请参见错误码。