UpdateIPsecConnection
API Request
URLs
PUT zstack/v1/ipsec/{uuid}Headers
Authorization: OAuth the-session-uuidBody
{
"updateIPsecConnection": {
"name": "test Ipsec",
"description": "info",
"deleteMode": "Permissive"
},
"systemTags": [],
"userTags": []
}
Note: In the preceding sample, both systemTags and userTags are optional.
These two fields can be included in the body structure.Curl
Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth 4dca24d8fce24355a048290b7adf5889" \
-X PUT -d '{"updateIPsecConnection":{"name":"test Ipsec","description":"info"}}' \
http://localhost:8080/zstack/v1/ipsec/1bcf0b898cf33f05b29edeb54a87ed82Request Parameters
| Name | Type | Location | Description | Optional Value | Starting Version |
|---|---|---|---|---|---|
| uuid | String | url | The resource UUID. | 0.6 | |
| name | String | body (contained in the updateIPsecConnection structure) | Optional. The resource name. | 0.6 | |
| description | String | body (contained in the updateIPsecConnection structure) | Optional. The detailed description of the resource. | 0.6 | |
| deleteMode | String | body (contained in the updateIPsecConnection structure) | Optional. | 0.6 | |
| systemTags | List | body | Optional. The system tags. | 0.6 | |
| userTags | List | body | Optional. The user tags. | 0.6 |
API Response
Sample Response
{
"inventory": {
"name": "Test-IPSec",
"description": "desc info ",
"peerAddress": "100.64.10.10",
"authKey": "auth",
"vipUuid": "8db7a95857db4771b309933783a6975e",
"peerCidrs": [
{
"uuid": "c58723c6002240f9a57c6e47b3e3f11c",
"cidr": "192.168.100.0/24",
"connectionUuid": "d58eaa352bf74465ac18e6a86d89298e",
"createDate": "Sep 22, 2017 12:24:59 PM",
"lastOpDate": "Sep 22, 2017 12:24:59 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 |
| inventory | IPsecConnectionInventory | See inventory. | 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 |
#inventory
| 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
UpdateIPsecConnectionAction action = new UpdateIPsecConnectionAction();
action.uuid = "cedcb7a02f1548cbb8a68665cab0b191";
action.name = "test Ipsec";
action.description = "info";
action.deleteMode = "Permissive";
action.sessionId = "4e74102f098948cf97781ee6604b1571";
UpdateIPsecConnectionAction.Result res = action.call();Python
SDK
UpdateIPsecConnectionAction action = UpdateIPsecConnectionAction()
action.uuid = "dba5bbf127124fe2a3def62bcb96743d"
action.name = "test Ipsec"
action.description = "info"
action.deleteMode = "Permissive"
action.sessionId = "cc93dbb3278c4a699f2f1635eb756caf"
UpdateIPsecConnectionAction.Result res = action.call()