查询指定ID的模板中的目的端服务器的密码
功能介绍
查询指定ID的模板中的目的端服务器的密码。
调用方法
请参见如何调用API。
URI
GET /v3/vm/templates/{id}/target-password
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| id | 是 | String | 模板的ID 最小长度:1 最大长度:36 |
请求参数
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| X-Auth-Token | 是 | String | 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 最小长度:1 最大长度:16384 |
响应参数
状态码:200
| 参数 | 参数类型 | 描述 |
|---|---|---|
| template_id | String | 模板ID 最小长度:0 最大长度:255 |
| target_password | String | 目的端密码 最小长度:0 最大长度:255 |
状态码:403
| 参数 | 参数类型 | 描述 |
|---|---|---|
| error_code | String | 错误代码 最小长度:0 最大长度:255 |
| error_msg | String | 错误信息 最小长度:0 最大长度:255 |
| encoded_authorization_message | String | 加密授权信息 最小长度:0 最大长度:65535 |
| error_param | Array of strings | 错误参数 最小长度:0 最大长度:65535 数组长度:1 - 20 |
| details | Array of details objects | 详细错误信息 数组长度:1 - 20 |
请求示例
查询指定ID的模板中的目的端服务器密码
GET https://{endpoint}/v3/vm/templates/ef3b9722-07a0-40ae-89b0-889ee96dfc56/target-password 响应示例
状态码:200
目的端服务器密码返回值
{
"template_id" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx0001",
"target_password" : "********"
} 状态码:403
鉴权失败
{
"error_code" : "SMS.9004",
"error_msg" : "The current account does not have the permission to execute policy. You do not have permission to perform action XXX on resource XXX.",
"encoded_authorization_message" : "XXXXXX",
"error_param" : [ "You do not have permission to perform action XXX on resource XXX." ],
"details" : [ {
"error_code" : "SMS.9004",
"error_msg" : "You do not have permission to perform action XXX on resource XXX."
} ]
} 状态码
| 状态码 | 描述 |
|---|---|
| 200 | 目的端服务器密码返回值 |
| 403 | 鉴权失败 |
错误码
请参见错误码。