VM Related InterfacesKey Provider APIs

Query KMS Key Providers

GET/zstack/v1/key-providers/kms
GET zstack/v1/key-providers/kms/{uuid}

Headers

Authorization: OAuth the-session-uuid

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/key-providers/kms?q=uuid=ff0a9250e11b3fe5a553d61be176d300
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/key-providers/kms/828f3b926950324886a029baeccf85b1

Queryable Fields

Run the CLI command line tool, enter QueryKms, and press Tab to view all queryable fields and resource names that can be used for cross-table queries.

SDK Example

Java SDK

QueryKmsAction action = new QueryKmsAction();
action.conditions = asList("uuid=ff0a9250e11b3fe5a553d61be176d300");
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryKmsAction.Result res = action.call();

Python SDK

action = QueryKmsAction()
action.conditions = ["uuid=ff0a9250e11b3fe5a553d61be176d300"]
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()