Rotate data encryption keys
Rotates all the KMS keys that Vault uses to encrypt properties, tokens, and more.
When the keys are rotated, new data is encrypted with the new key. All old keys are retained, so that content encrypted with previous keys can be decipherable.
The role that performs this operation must have the CapKMSWriter
capability.
See Access control for more information about how
capabilities are used to control access to operations.
Possible responses
- 200
- 400
- 401
- 403
- 404
- 409
- 500
- 503
The request is successful.
The request is invalid.
- application/json
context
- object required*The error context.
Type of additional properties:error_code
- string required*The error code.
message
- string required*The error message.
{
"error_code": "PV1001",
"message": "The access reason is missing.",
"context": {
"reason": null
}
}
Authentication credentials are incorrect or missing.
- application/json
context
- object required*The error context.
Type of additional properties:error_code
- string required*The error code.
message
- string required*The error message.
{
"error_code": "PV1005",
"message": "The request is unauthorized.",
"context": {}
}
The caller doesn't have the required access rights.
- application/json
context
- object required*The error context.
Type of additional properties:error_code
- string required*The error code.
message
- string required*The error message.
{
"error_code": "PV1007",
"message": "The operation is forbidden due to missing capabilities.",
"context": {
"username": "WebServer"
}
}
The requested resource is not found.
- application/json
context
- object required*The error context.
Type of additional properties:error_code
- string required*The error code.
message
- string required*The error message.
{
"error_code": "PV1004",
"message": "The collection is not found.",
"context": {}
}
A conflict occurs.
- application/json
context
- object required*The error context.
Type of additional properties:error_code
- string required*The error code.
message
- string required*The error message.
{
"error_code": "PV3218",
"message": "Concurrent conflicting updates to the same object.",
"context": {}
}
An error occurs on the server.
- application/json
context
- object required*The error context.
Type of additional properties:error_code
- string required*The error code.
message
- string required*The error message.
{
"error_code": "PV1000",
"message": "Something went wrong",
"context": {}
}
The service is unavailable.
- application/json
context
- object required*The error context.
Type of additional properties:error_code
- string required*The error code.
message
- string required*The error message.
{
"error_code": "PV1009",
"message": "The operation timed out on the server.",
"context": {}
}
Code examples