Network ServicesSecurity Group
QueryVmNicInSecurityGroup
Headers
Authorization: OAuth the-session-uuidCurl Example
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth 3f2df305cc614ecb9d0b93480cf84b33" \
-X GET http://localhost:8080/zstack/v1/security-groups/vm-instances/nicsQueryable Fields
Run the CLI tool, type QueryVmNicInSecurityGroup and press the Tab key to view all queryable fields and cross-table queryable resource names.
API Response
Response Example
{
"inventories": [
{
"uuid": "9bac6b3729ae4915bc9f4cee67753774",
"vmNicUuid": "7d0784059df64a11aef748e18b0d5fa7",
"securityGroupUuid": "d3ace95b1236482896f5d1921638ada5",
"vmInstanceUuid": "ace37e89d86c4994942f858a67172a0d",
"createDate": "Jun 7, 2017 9:20:32 PM",
"lastOpDate": "Jun 7, 2017 9:20:32 PM"
}
]
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| error | ErrorCode | Error code. If not null, the operation failed. If null, the operation succeeded. See error | 0.6 |
| inventories | List | See inventories | 0.6 |
error
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | Error code number, a globally unique identifier for the error, for example SYS.1000, HOST.1001 | 0.6 |
| description | String | Brief description of the error | 0.6 |
| details | String | Detailed error information | 0.6 |
| elaboration | String | Reserved field, defaults to null | 0.6 |
| opaque | LinkedHashMap | Reserved field, defaults to null | 0.6 |
| cause | ErrorCode | Root error: the source error that caused the current error. If there is no original error, this field is null | 0.6 |
inventories
| Name | Type | Description | Starting Version |
|---|---|---|---|
| vmNicUuid | String | The VM NIC UUID | 0.6 |
| securityGroupUuid | String | The security group UUID | 0.6 |
| vmInstanceUuid | String | The VM instance UUID | 0.6 |
| createDate | Timestamp | The creation time | 0.6 |
| lastOpDate | Timestamp | The last modification time | 0.6 |
SDK Examples
Java SDK
QueryVmNicInSecurityGroupAction action = new QueryVmNicInSecurityGroupAction();
action.conditions = asList();
action.sessionId = "fc82274e695143118923150b6008bef2";
QueryVmNicInSecurityGroupAction.Result res = action.call();Python SDK
QueryVmNicInSecurityGroupAction action = QueryVmNicInSecurityGroupAction()
action.conditions = []
action.sessionId = "32b2bfd366774b67a51ebdeb374df1cc"
QueryVmNicInSecurityGroupAction.Result res = action.call()