Skip to content

KMS Key

Operations for KMS Key lifecycle management.

Read more

enable-kms-key

Enable KMS Key

POST /kms-key/{id}/enable

Enables a KMS Key by setting its state to “enabled”. It restores the ability to fully use the KMS key for cryptographic operations and key lifecycle operations.

Path parameters

NameInDescription
idpathMust be a valid UUID.

Responses

200: Key enabled

Content-Type: application/json

PropertyTypeDescription
statusstringAllowed values: success, target-registered, already-applied.

Default: success.
Example output
{
  "status": "success"
}

400: ### Errors

Key Not Found: The request was rejected because the specified KMS Key could not be found.

Key is Pending Deletion: The request was rejected because it was performed on a key that is pending deletion.

Content-Type: application/json

PropertyTypeDescription
detailstringA highly contextual, readable explanation breaking down explicitly what triggered this error scenario.
statusintegerMin: 100. Max: 599.
titlestringA brief summary defining the class of failure, optimal for quick user interface groupings.
typestringAn absolute or relative URI reference pointing to human-readable documentation concerning the specific problem type encountered.

Must be a valid URI reference.
Example output
{
  "detail": "string",
  "status": 0,
  "title": "string",
  "type": "string"
}

SDK reference for enable-kms-key: golang | Python | Java

CLI: exo api enable-kms-key

disable-kms-key

Disable KMS Key

POST /kms-key/{id}/disable

Disables a KMS Key by setting its state to “disabled”. This prevents the use of the KMS key for cryptographic and key lifecycle operations.

Path parameters

NameInDescription
idpathMust be a valid UUID.

Responses

200: Key disabled

Content-Type: application/json

PropertyTypeDescription
statusstringAllowed values: success, target-registered, already-applied.

Default: success.
Example output
{
  "status": "success"
}

400: ### Errors

Key Not Found: The request was rejected because the specified KMS Key could not be found.

Key is Pending Deletion: The request was rejected because it was performed on a key that is pending deletion.

Not on Default: The request was rejected because the operation is not allowed on the default key.

Content-Type: application/json

PropertyTypeDescription
detailstringA highly contextual, readable explanation breaking down explicitly what triggered this error scenario.
statusintegerMin: 100. Max: 599.
titlestringA brief summary defining the class of failure, optimal for quick user interface groupings.
typestringAn absolute or relative URI reference pointing to human-readable documentation concerning the specific problem type encountered.

Must be a valid URI reference.
Example output
{
  "detail": "string",
  "status": 0,
  "title": "string",
  "type": "string"
}

SDK reference for disable-kms-key: golang | Python | Java

CLI: exo api disable-kms-key

create-kms-key

Create KMS Key

POST /kms-key

Create a customer-managed unique KMS Key in your organization. A KMS Key is a logical representation of a cryptographic key material. It also includes metadata such as a UUID, a name and its state.

Request body

Content-Type: application/json

PropertyTypeRequiredDescription
namestringyesA human-readable display name uniquely identifying the KMS key within the tenant space.
descriptionstringnoAn optional detailed description providing additional context about the key’s intended use case.
multi-zonebooleannoTrue if this is a multi-zone key.

Default: false.
usagestringnoAllowed values: encrypt-decrypt.

Default: encrypt-decrypt.
Example
{
  "description": "string",
  "multi-zone": true,
  "name": "string",
  "usage": "encrypt-decrypt"
}

Responses

200: Created new KMS key

Content-Type: application/json

PropertyTypeDescription
created-atstringThe UTC timestamp showing when the KMS key was originally provisioned.

ISO 8601 date-time.
descriptionstringAn optional detailed description providing additional context about the key’s intended use case.
idstringThe globally unique identifier (UUID) assigned to the newly created KMS key.

Must be a valid UUID.
multi-zonebooleanTrue if this is a multi-zone key.
namestringThe display name assigned to the KMS key.
origin-zonestringThe creation zone of the KMS key.
revisionRevision Stamp
sourcestringAllowed values: exoscale-kms.
statusstringAllowed values: enabled, disabled, pending-deletion.
status-sincestringThe timestamp indicating exactly when the current key status was last transitioned.

ISO 8601 date-time.
usagestringThe cryptographic operation constraints allowed on this key.
Example output
{
  "created-at": "2024-01-01T12:00:00Z",
  "description": "string",
  "id": "string",
  "multi-zone": true,
  "name": "string",
  "origin-zone": "string",
  "revision": {
    "at": "2024-01-01T12:00:00Z",
    "seq": 0
  },
  "source": "exoscale-kms",
  "status": "enabled",
  "status-since": "2024-01-01T12:00:00Z",
  "usage": "string"
}

400: ### Errors

Name Conflict: The request was rejected because a key with the same name already exists in the target zone.

Bad Request: The request was rejected because of an invalid request body or path parameter.

Content-Type: application/json

PropertyTypeDescription
detailstringA highly contextual, readable explanation breaking down explicitly what triggered this error scenario.
statusintegerMin: 100. Max: 599.
titlestringA brief summary defining the class of failure, optimal for quick user interface groupings.
typestringAn absolute or relative URI reference pointing to human-readable documentation concerning the specific problem type encountered.

Must be a valid URI reference.
Example output
{
  "detail": "string",
  "status": 0,
  "title": "string",
  "type": "string"
}

SDK reference for create-kms-key: golang | Python | Java

CLI: exo api create-kms-key

get-kms-key

Get KMS Key

GET /kms-key/{id}

Retrieve KMS Key details.

Path parameters

NameInDescription
idpathMust be a valid UUID.

Responses

200: KMS Key Details

Content-Type: application/json

PropertyTypeDescription
created-atstringThe UTC timestamp showing when the KMS key was originally provisioned.

ISO 8601 date-time.
delete-atstringISO 8601 date-time.
descriptionstringAn optional detailed description providing additional context about the key’s intended use case.
idstringThe globally unique identifier (UUID) of the retrieved KMS key.

Must be a valid UUID.
materialKey Material
multi-zonebooleanTrue if this is a multi-zone key.
namestringThe display name of the KMS key.
origin-zonestringThe creation zone of the KMS key.
replicasarray[string]A list of availability zones where this specific key has active replica mirrors.
replicas-statusarray of Replica StateDetailed synchronization metrics for each regional replica mirror.
revisionRevision Stamp
rotationKey Rotation Config
sourcestringAllowed values: exoscale-kms.
statusstringAllowed values: enabled, disabled, pending-deletion.
status-sincestringThe timestamp indicating exactly when the current key status was last transitioned.

ISO 8601 date-time.
usagestringThe cryptographic operation constraints allowed on this key.
Example output
{
  "created-at": "2024-01-01T12:00:00Z",
  "delete-at": "2024-01-01T12:00:00Z",
  "description": "string",
  "id": "string",
  "material": {
    "automatic": true,
    "created-at": "2024-01-01T12:00:00Z",
    "version": 0
  },
  "multi-zone": true,
  "name": "string",
  "origin-zone": "string",
  "replicas": [
    "string"
  ],
  "replicas-status": [
    {
      "last-applied-watermark": 0,
      "last-failure": {
        "attempted-watermark": 0,
        "error": "string",
        "failed-at": "2024-01-01T12:00:00Z"
      },
      "zone": "string"
    }
  ],
  "revision": {
    "at": "2024-01-01T12:00:00Z",
    "seq": 0
  },
  "rotation": {
    "automatic": true,
    "manual-count": 0,
    "next-at": "2024-01-01T12:00:00Z",
    "rotation-period": 0
  },
  "source": "exoscale-kms",
  "status": "enabled",
  "status-since": "2024-01-01T12:00:00Z",
  "usage": "string"
}

400: ### Errors

Key Not Found: The request was rejected because the specified KMS Key could not be found.

Content-Type: application/json

PropertyTypeDescription
detailstringA highly contextual, readable explanation breaking down explicitly what triggered this error scenario.
statusintegerMin: 100. Max: 599.
titlestringA brief summary defining the class of failure, optimal for quick user interface groupings.
typestringAn absolute or relative URI reference pointing to human-readable documentation concerning the specific problem type encountered.

Must be a valid URI reference.
Example output
{
  "detail": "string",
  "status": 0,
  "title": "string",
  "type": "string"
}

SDK reference for get-kms-key: golang | Python | Java

CLI: exo api get-kms-key

disable-kms-key-rotation

Disable Key Rotation

POST /kms-key/{id}/disable-key-rotation

Disable the periodic rotation of a KMS Key.

Path parameters

NameInDescription
idpathMust be a valid UUID.

Responses

200: Key rotation disabled

Content-Type: application/json

PropertyTypeDescription
rotationKey Rotation Config
Example output
{
  "rotation": {
    "automatic": true,
    "manual-count": 0,
    "next-at": "2024-01-01T12:00:00Z",
    "rotation-period": 0
  }
}

400: ### Errors

Invalid Origin: The request was rejected because automatic key rotation can only be enabled on a KMS key with origin “exoscale-kms”.

Key Not Found: The request was rejected because the specified KMS Key could not be found.

Not on Default: The request was rejected because the operation is not allowed on the default key.

Not on Replica: The request was rejectde because the operation is not allowed on a replica.

Key is Pending Deletion: The request was rejected because it was performed on a key that is pending deletion.

Key is Disabled: The request was rejected because the specified KMS key is disabled.

Invalid Usage: The request was rejected because the operation is only allowed on symmetric keys with usage “encrypt-decrypt”.

Conflict: The request was rejected because the automatic rotation is already enabled for this KMS Key.

Content-Type: application/json

PropertyTypeDescription
detailstringA highly contextual, readable explanation breaking down explicitly what triggered this error scenario.
statusintegerMin: 100. Max: 599.
titlestringA brief summary defining the class of failure, optimal for quick user interface groupings.
typestringAn absolute or relative URI reference pointing to human-readable documentation concerning the specific problem type encountered.

Must be a valid URI reference.
Example output
{
  "detail": "string",
  "status": 0,
  "title": "string",
  "type": "string"
}

SDK reference for disable-kms-key-rotation: golang | Python | Java

CLI: exo api disable-kms-key-rotation

enable-kms-key-rotation

Enable Key Rotation

POST /kms-key/{id}/enable-key-rotation

Enable the periodic rotation of a KMS Key.

Path parameters

NameInDescription
idpathMust be a valid UUID.

Request body

Content-Type: application/json

PropertyTypeRequiredDescription
rotation-periodintegernoThe number of days between each automatic key rotation.

Min: 90. Max: 2560. Default: 365.
Example
{
  "rotation-period": 0
}

Responses

200: Periodic key rotation enabled

Content-Type: application/json

PropertyTypeDescription
rotationKey Rotation Config
Example output
{
  "rotation": {
    "automatic": true,
    "manual-count": 0,
    "next-at": "2024-01-01T12:00:00Z",
    "rotation-period": 0
  }
}

400: ### Errors

Invalid Origin: The request was rejected because automatic key rotation can only be enabled on a KMS key with origin “exoscale-kms”.

Key Not Found: The request was rejected because the specified KMS Key could not be found.

Not on Default: The request was rejected because the operation is not allowed on the default key.

Not on Replica: The request was rejectde because the operation is not allowed on a replica.

Key is Pending Deletion: The request was rejected because it was performed on a key that is pending deletion.

Key is Disabled: The request was rejected because the specified KMS key is disabled.

Invalid Usage: The request was rejected because the operation is only allowed on symmetric keys with usage “encrypt-decrypt”.

Conflict: The request was rejected because the automatic rotation is already enabled for this KMS Key.

Bad Request: The request was rejected because of an invalid request body or path parameter.

Content-Type: application/json

PropertyTypeDescription
detailstringA highly contextual, readable explanation breaking down explicitly what triggered this error scenario.
statusintegerMin: 100. Max: 599.
titlestringA brief summary defining the class of failure, optimal for quick user interface groupings.
typestringAn absolute or relative URI reference pointing to human-readable documentation concerning the specific problem type encountered.

Must be a valid URI reference.
Example output
{
  "detail": "string",
  "status": 0,
  "title": "string",
  "type": "string"
}

SDK reference for enable-kms-key-rotation: golang | Python | Java

CLI: exo api enable-kms-key-rotation


Other Operations

cancel-kms-key-deletion

Cancel KMS Key Deletion

POST /kms-key/{id}/cancel-deletion

Cancels the scheduled deletion of a KMS Key.

Path parameters

NameInDescription
idpathMust be a valid UUID.

Responses

200: Key deletion cancelled

Content-Type: application/json

PropertyTypeDescription
statusstringAllowed values: success, target-registered, already-applied.

Default: success.
Example output
{
  "status": "success"
}

400: ### Errors

Key Not Found: The request was rejected because the specified KMS Key could not be found.

Not on Replica: The request was rejectde because the operation is not allowed on a replica.

Not Pending Deletion: The request was rejected because the key is not pending deletion.

Content-Type: application/json

PropertyTypeDescription
detailstringA highly contextual, readable explanation breaking down explicitly what triggered this error scenario.
statusintegerMin: 100. Max: 599.
titlestringA brief summary defining the class of failure, optimal for quick user interface groupings.
typestringAn absolute or relative URI reference pointing to human-readable documentation concerning the specific problem type encountered.

Must be a valid URI reference.
Example output
{
  "detail": "string",
  "status": 0,
  "title": "string",
  "type": "string"
}

SDK reference for cancel-kms-key-deletion: golang | Python | Java

CLI: exo api cancel-kms-key-deletion

list-kms-key-rotations

List KMS Key Rotations

GET /kms-key/{id}/list-key-rotations

List all the key material versions of a KMS Key.

Path parameters

NameInDescription
idpathMust be a valid UUID.

Responses

200: The list of all historical rotations for the requested KMS key.

Content-Type: application/json

PropertyTypeDescription
rotationsarray of List Kms Key Rotations Response EntryA chronologically ordered collection tracking historical rotation lifecycle occurrences for this resource.
Example output
{
  "rotations": [
    {
      "automatic": true,
      "rotated-at": "2024-01-01T12:00:00Z",
      "version": 0
    }
  ]
}

400: ### Errors

Key Not Found: The request was rejected because the specified KMS Key could not be found.

Content-Type: application/json

PropertyTypeDescription
detailstringA highly contextual, readable explanation breaking down explicitly what triggered this error scenario.
statusintegerMin: 100. Max: 599.
titlestringA brief summary defining the class of failure, optimal for quick user interface groupings.
typestringAn absolute or relative URI reference pointing to human-readable documentation concerning the specific problem type encountered.

Must be a valid URI reference.
Example output
{
  "detail": "string",
  "status": 0,
  "title": "string",
  "type": "string"
}

SDK reference for list-kms-key-rotations: golang | Python | Java

CLI: exo api list-kms-key-rotations

list-kms-keys

List KMS Keys

GET /kms-key

Lists all KMS Keys in your organization in a given zone.

Responses

200: A list of all KMS keys in the target zone

Content-Type: application/json

PropertyTypeDescription
kms-keysarray of List Kms Keys Response EntryAn array containing metadata entries for all available keys for your organization in the requested zone.
Example output
{
  "kms-keys": [
    {
      "created-at": "2024-01-01T12:00:00Z",
      "delete-at": "2024-01-01T12:00:00Z",
      "description": "string",
      "id": "string",
      "material": {
        "automatic": true,
        "created-at": "2024-01-01T12:00:00Z",
        "version": 0
      },
      "multi-zone": true,
      "name": "string",
      "origin-zone": "string",
      "replicas": [
        "string"
      ],
      "revision": {
        "at": "2024-01-01T12:00:00Z",
        "seq": 0
      },
      "rotation": {
        "automatic": true,
        "manual-count": 0,
        "next-at": "2024-01-01T12:00:00Z",
        "rotation-period": 0
      },
      "source": "exoscale-kms",
      "status": "enabled",
      "status-since": "2024-01-01T12:00:00Z",
      "usage": "string"
    }
  ]
}

400: ### Errors

Bad Request: The request was rejected because of an invalid request body or path parameter.

Content-Type: application/json

PropertyTypeDescription
detailstringA highly contextual, readable explanation breaking down explicitly what triggered this error scenario.
statusintegerMin: 100. Max: 599.
titlestringA brief summary defining the class of failure, optimal for quick user interface groupings.
typestringAn absolute or relative URI reference pointing to human-readable documentation concerning the specific problem type encountered.

Must be a valid URI reference.
Example output
{
  "detail": "string",
  "status": 0,
  "title": "string",
  "type": "string"
}

SDK reference for list-kms-keys: golang | Python | Java

CLI: exo api list-kms-keys

replicate-kms-key

Replicate KMS Key

POST /kms-key/{id}/replicate

Replicate a KMS key to a target zone.

Path parameters

NameInDescription
idpathMust be a valid UUID.

Request body

Content-Type: application/json

PropertyTypeRequiredDescription
zonestringyesThe targeted cloud zone where the KMS key should be replicated.
Example
{
  "zone": "string"
}

Responses

200: Key replication target registered

Content-Type: application/json

PropertyTypeDescription
statusstringAllowed values: success, target-registered, already-applied.

Default: success.
Example output
{
  "status": "success"
}

400: ### Errors

Key Not Found: The request was rejected because the specified KMS Key could not be found.

Key is Pending Deletion: The request was rejected because it was performed on a key that is pending deletion.

Not on Default: The request was rejected because the operation is not allowed on the default key.

Not Multizone: The request was rejected because the KMS key is not a multi-zone key.

Conflict: The request was rejected because the key is already replicated in the target zone.

Invalid Argument: The request was rejected because the target zone is invalid.

Content-Type: application/json

PropertyTypeDescription
detailstringA highly contextual, readable explanation breaking down explicitly what triggered this error scenario.
statusintegerMin: 100. Max: 599.
titlestringA brief summary defining the class of failure, optimal for quick user interface groupings.
typestringAn absolute or relative URI reference pointing to human-readable documentation concerning the specific problem type encountered.

Must be a valid URI reference.
Example output
{
  "detail": "string",
  "status": 0,
  "title": "string",
  "type": "string"
}

SDK reference for replicate-kms-key: golang | Python | Java

CLI: exo api replicate-kms-key

rotate-kms-key

Rotate Key

POST /kms-key/{id}/rotate

Performs an immediate rotation of the key material for a symmetric key.

Path parameters

NameInDescription
idpathMust be a valid UUID.

Responses

200: Key rotated

Content-Type: application/json

PropertyTypeDescription
rotationKey Rotation Config
Example output
{
  "rotation": {
    "automatic": true,
    "manual-count": 0,
    "next-at": "2024-01-01T12:00:00Z",
    "rotation-period": 0
  }
}

400: ### Errors

Key Not Found: The request was rejected because the specified KMS Key could not be found.

Key is Pending Deletion: The request was rejected because it was performed on a key that is pending deletion.

Not on a Replica: The request was rejected because the operation is not allowed on a replica.

Invalid Usage: The request was rejected because the operation is only allowed on symmetric keys with usage “encrypt-decrypt”.

Key is Disabled: The request was rejected because the specified KMS key is disabled.

Manual Rotation Limit: The request was rejected because you reached your limit of 10 manual rotations per key for this KMS key.

Content-Type: application/json

PropertyTypeDescription
detailstringA highly contextual, readable explanation breaking down explicitly what triggered this error scenario.
statusintegerMin: 100. Max: 599.
titlestringA brief summary defining the class of failure, optimal for quick user interface groupings.
typestringAn absolute or relative URI reference pointing to human-readable documentation concerning the specific problem type encountered.

Must be a valid URI reference.
Example output
{
  "detail": "string",
  "status": 0,
  "title": "string",
  "type": "string"
}

SDK reference for rotate-kms-key: golang | Python | Java

CLI: exo api rotate-kms-key

schedule-kms-key-deletion

Schedule KMS Key Deletion

POST /kms-key/{id}/schedule-deletion

Schedules a KMS key for deletion after a delay. You can specify a delay of 7-30 days.

Path parameters

NameInDescription
idpathMust be a valid UUID.

Request body

Content-Type: application/json

PropertyTypeRequiredDescription
delay-daysintegernoNumber of days to wait until deletion is final.

Min: 7. Max: 30. Default: 30.
Example
{
  "delay-days": 0
}

Responses

200: Key deletion scheduled

Content-Type: application/json

PropertyTypeDescription
delete-atstringTimestamp of the key deletion

ISO 8601 date-time.
Example output
{
  "delete-at": "2024-01-01T12:00:00Z"
}

400: ### Errors

Key Not Found: The request was rejected because the specified KMS Key could not be found.

Not on Default: The request was rejected because the operation is not allowed on the default key.

Not on Replica: The request was rejectde because the operation is not allowed on a replica.

Bad Request: The request was rejected because of an invalid request body or path parameter.

Content-Type: application/json

PropertyTypeDescription
detailstringA highly contextual, readable explanation breaking down explicitly what triggered this error scenario.
statusintegerMin: 100. Max: 599.
titlestringA brief summary defining the class of failure, optimal for quick user interface groupings.
typestringAn absolute or relative URI reference pointing to human-readable documentation concerning the specific problem type encountered.

Must be a valid URI reference.
Example output
{
  "detail": "string",
  "status": 0,
  "title": "string",
  "type": "string"
}

SDK reference for schedule-kms-key-deletion: golang | Python | Java

CLI: exo api schedule-kms-key-deletion

Last updated on