Update a KMS Key Provider
Headers
Authorization: OAuth the-session-uuidBody
{
"updateKms": {
"endpoint": "kms.example.com",
"port": 5696,
"kmipVersion": "1.2",
"username": "user",
"password": "password",
"description": "example"
},
"systemTags": [],
"userTags": []
}In the preceding example, the systemTags and userTags fields can be omitted. They are listed to indicate that the body can include these two fields.
Curl Example
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X PUT -d '{"updateKms":{"endpoint":"kms.example.com","port":5696,"kmipVersion":"1.2","username":"user","password":"password","description":"example"}}' \
http://localhost:8080/zstack/v1/key-providers/kms/ff0a9250e11b3fe5a553d61be176d300/actionsParameter List
Name | Type | Location | Description | Optional Value | Since |
|---|---|---|---|---|---|
endpoint (optional) | String | body (contained in | Endpoint |
| 5.0.0 |
port (optional) | Integer | body (contained in | Port |
| 5.0.0 |
kmipVersion (optional) | String | body (contained in | KMIP protocol version |
| 5.0.0 |
username (optional) | String | body (contained in | Username |
| 5.0.0 |
password (optional) | String | body (contained in | Password |
| 5.0.0 |
uuid | String | url | Resource UUID, which uniquely identifies the resource |
| 5.0.0 |
description (optional) | String | body (contained in | Detailed description of the resource |
| 5.0.0 |
systemTags (optional) | List | body | System tags |
| 5.0.0 |
userTags (optional) | List | body | User tags |
| 5.0.0 |
SDK Example
Java SDK
UpdateKmsAction action = new UpdateKmsAction();
action.endpoint = "kms.example.com";
action.port = 5696;
action.kmipVersion = "1.2";
action.username = "user";
action.password = "password";
action.uuid = "ff0a9250e11b3fe5a553d61be176d300";
action.description = "example";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
UpdateKmsAction.Result res = action.call();Python SDK
action = UpdateKmsAction()
action.endpoint = "kms.example.com"
action.port = 5696
action.kmipVersion = "1.2"
action.username = "user"
action.password = "password"
action.uuid = "ff0a9250e11b3fe5a553d61be176d300"
action.description = "example"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()