批量查询桌面网络
功能介绍
查询桌面vpc、子网、privateIp、EIP、安全组。
调试
您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。
URI
GET /v2/{project_id}/desktops/networks
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
project_id |
是 |
String |
项目ID。 |
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
desktop_ids |
否 |
Array of strings |
桌面id列表,最小为1,最大为100。 |
请求参数
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
X-Auth-Token |
否 |
String |
用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 |
|
Content-Type |
否 |
String |
发送的实体的MIME类型。 |
响应参数
状态码:200
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
networks |
Array of DesktopNetworkResult objects |
桌面网络信息列表。 |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
computer_name |
String |
桌面名称。 |
|
computer_id |
String |
桌面ID。 |
|
computer_ip |
String |
桌面IP。 |
|
network_infos |
Array of NetworkInfo objects |
桌面网络信息。 |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
vpc_info |
Vpc object |
vpc信息。 |
|
subnet_info |
DesktopSubnet object |
子网信息。 |
|
port_info |
Port object |
私有IP信息。 |
|
public_ip_info |
PublicIp object |
弹性IP信息。 |
|
security_groups |
Array of SecurityGroupInfo objects |
桌面绑定的安全组列表。 |
状态码: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接口进行解密。 |
请求示例
无
响应示例
状态码:200
正常。
{
"networks" : [ {
"computer_name" : "string",
"computer_id" : "string",
"computer_ip" : "string",
"network_infos" : [ {
"vpc_info" : {
"id" : "string",
"name" : "string",
"cidr" : "string"
},
"subnet_info" : {
"id" : "string",
"name" : "string",
"cidr" : "string"
},
"port_info" : {
"id" : "string",
"ip_address" : "string"
},
"public_ip_info" : {
"id" : "string",
"public_ip_address" : "string"
},
"security_groups" : [ {
"id" : "string",
"name" : "string"
} ]
} ]
} ]
}
状态码
|
状态码 |
描述 |
|---|---|
|
200 |
正常。 |
|
400 |
由于包含语法错误,当前请求无法被服务器理解。 |
|
401 |
鉴权失败。 |
|
403 |
没有操作权限。 |
|
404 |
找不到资源。 |
|
409 |
操作冲突。 |
|
500 |
服务内部错误,具体返回错误码请参见错误码说明。 |
错误码
请参见错误码。