esx kms key operation: generate key
Generate a new data encryption key.
Request:
HTTP request
POST https://{server}/rest/esx/kms/key-operation?action=generate-key
Request Body Structure:
{
"num_of_bytes" : 1,
"provider" : "obj-103"
}
"num_of_bytes" : 1,
"provider" : "obj-103"
}
Request Body Parameters:
Name | Type | Description |
---|---|---|
bold = required | ||
provider | string | Identifier of the Key Provider. |
num_of_bytes | long | Key length. |
Response:
HTTP Status Code: 200
Representation:
{
"value" : {
"ciphertext" : "string",
"plaintext" : "secret string"
}
}
"value" : {
"ciphertext" : "string",
"plaintext" : "secret string"
}
}
Response Type:
Name | Type | Description |
---|---|---|
bold = required | ||
value | generated_key | A new data encryption key. |
value.ciphertext | string | The encrypted copy of key data. Can be used as key identifier. Additional information is encoded in the ciphertext needed for retrieving the key. |
value.plaintext | secret | The plaintext key data. Optional. If unset, plaintext won't have key data. |
Errors:
HTTP Status Code | Type | Description |
---|---|---|
400 | invalid_argument | if the arguments are invalid. |
404 | not_found | if the provider is not found. |
401 | unauthenticated | if the caller is not authenticated. |
403 | unauthorized | if the caller is not authorized. |
500 | error | if any other error occurs. |