QueryIPSecConnection
API Request
URLs
GET zstack/v1/ipsec
GET zstack/v1/ipsec/{uuid}
Headers
Authorization: OAuth the-session-uuid
Curl
Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth 4c96297b4d134027b936f8933ff49340"
-X GET http://localhost:8080/zstack/v1/ipsec
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b94b692454d1447b82aa06a3d872d0d6" \
-X GET http://localhost:8080/zstack/v1/ipsec/bc2318751b5648eb98982f2428e691ea
Queryable Fields
You can check all queryable fields and resource names that can be queried across
tables by using zstack-cli, entering
QueryIPSecConnection
, and pressing the Tab key.
API Response
Sample
Response
{
"inventories": [
{
"name": "Test-IPSec",
"peerAddress": "100.64.10.10",
"authKey": "auth",
"vipUuid": "c2cc681608bc444288aa4bb6ebc674ac",
"peerCidrs": [
{
"uuid": "95c8eadec32b46e5b123958c32273778",
"cidr": "192.168.100.0/24",
"connectionUuid": "0b61bea0d4f04d5abcc74fdb67d83509",
"createDate": "Jun 7, 2017 9:21:14 PM",
"lastOpDate": "Jun 7, 2017 9:21:14 PM"
}
],
"l3NetworkRefs": [
{}
]
}
]
}
Name | Type | Description | Starting Version |
---|---|---|---|
error | ErrorCode | The error code. If not null, the operation fails, or vice versa. For more information, see error. | 0.6 |
inventories | List | See inventories. | 0.6 |
#error
Name | Type | Description | Starting Version |
---|---|---|---|
code | String | The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001. | 0.6 |
description | String | The brief description of the error. | 0.6 |
details | String | The details about the error. | 0.6 |
elaboration | String | The reserved field. Default value: null. | 0.6 |
opaque | LinkedHashMap | The reserved field. Default value: null. | 0.6 |
cause | ErrorCode | The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. | 0.6 |
#inventories
Name | Type | Description | Starting Version |
---|---|---|---|
uuid | String | The resource UUID. | 0.6 |
name | String | The resource name. | 0.6 |
description | String | The detailed description of the resource. | 0.6 |
peerAddress | String | 0.6 | |
authMode | String | 0.6 | |
authKey | String | 0.6 | |
vipUuid | String | The VIP UUID. | 0.6 |
ikeAuthAlgorithm | String | 0.6 | |
ikeEncryptionAlgorithm | String | 0.6 | |
ikeDhGroup | Integer | 0.6 | |
policyAuthAlgorithm | String | 0.6 | |
policyEncryptionAlgorithm | String | 0.6 | |
pfs | String | 0.6 | |
policyMode | String | 0.6 | |
transformProtocol | String | 0.6 | |
state | String | 0.6 | |
status | String | 0.6 | |
createDate | Timestamp | The creation date. | 0.6 |
lastOpDate | Timestamp | The last operation date. | 0.6 |
peerCidrs | List | See peerCidrs. | 0.6 |
l3NetworkRefs | List | See l3NetworkRefs. | 2.3 |
#peerCidrs
Name | Type | Description | Starting Version |
---|---|---|---|
uuid | String | The resource UUID. | 0.6 |
cidr | String | 0.6 | |
connectionUuid | String | 0.6 | |
createDate | Timestamp | The creation date. | 0.6 |
lastOpDate | Timestamp | The last operation date. | 0.6 |
#l3NetworkRefs
Name | Type | Description | Starting Version |
---|---|---|---|
uuid | String | The resource UUID. | 2.3 |
connectionUuid | String | 2.3 | |
l3NetworkUuid | String | The L3 network UUID. | 2.3 |
createDate | Timestamp | The creation date. | 2.3 |
lastOpDate | Timestamp | The last operation date. | 2.3 |
SDK Sample
Java
SDK
QueryIPSecConnectionAction action = new QueryIPSecConnectionAction();
action.conditions = asList();
action.sessionId = "2da0145074b749de95a5f7e6197dedf5";
QueryIPSecConnectionAction.Result res = action.call();
Python
SDK
QueryIPSecConnectionAction action = QueryIPSecConnectionAction()
action.conditions = []
action.sessionId = "39df08f032b9490a853c60158dee9140"
QueryIPSecConnectionAction.Result res = action.call()