Skip to content

Cloud HSM

All operations require authentication.

3 operationsv2/cloudHSM/resource
View as Markdown (opens in a new tab)
Agent setupPrevious console (opens in a new tab)

List Cloud HSM servicesBeta

GET
/v2/cloudHSM/resource

Returns the Cloud HSM services, each with its region and its partitions.

IAM actions

cloudHSM:apiovh:resource/getrequired—

Query parameters

iamTags
object

Filter resources on IAM tags

Headers

X-Pagination-Cursor
string

Pagination cursor

X-Pagination-Size
integer

Pagination size

Response

200ResponseWithIAM[]successful operation
checksum
read-only
string

Hash of targetSpec. Send it back in the body of a PUT request to detect concurrent updates.

createdAt
read-only
stringdate-time

Date the Cloud HSM service was created

currentState
read-only
CurrentState

Current state of the Cloud HSM service: its region, its partitions and its IP allowlist

iam
read-only
ResourceMetadata

IAM resource metadata

id
read-only
stringuuid

Unique identifier of the Cloud HSM service

resourceStatus
read-only
ResourceStatusEnum

Readiness of the Cloud HSM service. Partitions can be used only in READY status.

ValuesCREATINGCREATION_PLANNEDDELETINGERROROUT_OF_SYNCREADYSUSPENDEDUNKNOWNUPDATING
targetSpec
read-only
TargetSpec

Target specification of the Cloud HSM service, which holds its IP allowlist

updatedAt
read-only
stringdate-time

Date of the last update of the Cloud HSM service. Null when it was never updated since its creation.

Reads your token from $OVH_TOKEN

$ curl https://api.eu.ovhcloud.com/v2/cloudHSM/resource \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ { "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "currentState": { "ipAllowlist": [ { "cidr": "192.0.2.0/24", "description": "string" } ], "partitions": [ { "az": "string", "endpoint": "string", "id": "00000000-0000-0000-0000-000000000000", "model": "string", "region": "af-north-lz-rba", "vendor": "string" } ], "region": "af-north-lz-rba" }, "iam": { "displayName": "string", "id": "00000000-0000-0000-0000-000000000000", "state": "EXPIRED", "tags": { "key": "string" }, "urn": "string" }, "id": "00000000-0000-0000-0000-000000000000", "resourceStatus": "CREATING", "targetSpec": { "ipAllowlist": [ { "cidr": "192.0.2.0/24", "description": "string" } ] }, "updatedAt": "2024-01-01T12:00:00Z" }]

Get a Cloud HSM serviceBeta

GET
/v2/cloudHSM/resource/{cloudHSMId}

Returns the Cloud HSM service, its region and its partitions, one per HSM appliance.

IAM actions

cloudHSM:apiovh:resource/getrequired—

Path parameters

cloudHSMId
required
stringuuid

Cloud hsmid

Response

200ResponseWithIAMsuccessful operation
checksum
read-only
string

Hash of targetSpec. Send it back in the body of a PUT request to detect concurrent updates.

createdAt
read-only
stringdate-time

Date the Cloud HSM service was created

currentState
read-only
CurrentState

Current state of the Cloud HSM service: its region, its partitions and its IP allowlist

iam
read-only
ResourceMetadata

IAM resource metadata

id
read-only
stringuuid

Unique identifier of the Cloud HSM service

resourceStatus
read-only
ResourceStatusEnum

Readiness of the Cloud HSM service. Partitions can be used only in READY status.

ValuesCREATINGCREATION_PLANNEDDELETINGERROROUT_OF_SYNCREADYSUSPENDEDUNKNOWNUPDATING
targetSpec
read-only
TargetSpec

Target specification of the Cloud HSM service, which holds its IP allowlist

updatedAt
read-only
stringdate-time

Date of the last update of the Cloud HSM service. Null when it was never updated since its creation.

Example uses cloudHSMId = 00000000-0000-0000-0000-000000000000

$ curl https://api.eu.ovhcloud.com/v2/cloudHSM/resource/{cloudHSMId} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "currentState": { "ipAllowlist": [ { "cidr": "192.0.2.0/24", "description": "string" } ], "partitions": [ { "az": "string", "endpoint": "string", "id": "00000000-0000-0000-0000-000000000000", "model": "string", "region": "af-north-lz-rba", "vendor": "string" } ], "region": "af-north-lz-rba" }, "iam": { "displayName": "string", "id": "00000000-0000-0000-0000-000000000000", "state": "EXPIRED", "tags": { "key": "string" }, "urn": "string" }, "id": "00000000-0000-0000-0000-000000000000", "resourceStatus": "CREATING", "targetSpec": { "ipAllowlist": [ { "cidr": "192.0.2.0/24", "description": "string" } ] }, "updatedAt": "2024-01-01T12:00:00Z"}

Update a Cloud HSM serviceBeta

PUT
/v2/cloudHSM/resource/{cloudHSMId}

Replaces the target specification of the Cloud HSM service. Its only setting is the IP allowlist. This list holds the source IP ranges allowed to send KMIP (Key Management Interoperability Protocol) requests to the service.

The request is a full replacement. The ipAllowlist sent replaces the one currently set. To add a range, send the current list plus the new range. An empty list allows any IP.

The checksum protects your change against concurrent updates. To use it:

  1. Get the service. Keep its checksum and its targetSpec.
  2. Send the new targetSpec with that checksum.
  3. When the service changed since your read, the request is refused with a 412 (ChecksumMismatch). Get the service again and redo your change.

When the checksum is omitted, the update is applied without this check, and it can overwrite a concurrent change.

The update is done when the response is sent. The response carries the new targetSpec and its new checksum. The ranges are returned as stored, in normalized form and sorted by address.

A new IP allowlist is enforced within 30 seconds, on new connections and on the connections already open.

The service must be in READY status.

IAM actions

cloudHSM:apiovh:resource/editrequired—

Path parameters

cloudHSMId
required
stringuuid

Cloud hsmid

Request body (required)

checksum
string

Hash of targetSpec, as returned by the last read. The request is refused with a 412 when it differs from the current one. When omitted, the update is applied without this check.

targetSpec
required
TargetSpec

New target specification of the Cloud HSM service. It replaces the current one.

Response

200Responsesuccessful operation
checksum
read-only
string

Hash of targetSpec. Send it back in the body of a PUT request to detect concurrent updates.

createdAt
read-only
stringdate-time

Date the Cloud HSM service was created

currentState
read-only
CurrentState

Current state of the Cloud HSM service: its region, its partitions and its IP allowlist

id
read-only
stringuuid

Unique identifier of the Cloud HSM service

resourceStatus
read-only
ResourceStatusEnum

Readiness of the Cloud HSM service. Partitions can be used only in READY status.

ValuesCREATINGCREATION_PLANNEDDELETINGERROROUT_OF_SYNCREADYSUSPENDEDUNKNOWNUPDATING
targetSpec
read-only
TargetSpec

Target specification of the Cloud HSM service, which holds its IP allowlist

updatedAt
read-only
stringdate-time

Date of the last update of the Cloud HSM service. Null when it was never updated since its creation.

Example uses cloudHSMId = 00000000-0000-0000-0000-000000000000

$ curl https://api.eu.ovhcloud.com/v2/cloudHSM/resource/{cloudHSMId} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "currentState": { "ipAllowlist": [ { "cidr": "192.0.2.0/24", "description": "string" } ], "partitions": [ { "az": "string", "endpoint": "string", "id": "00000000-0000-0000-0000-000000000000", "model": "string", "region": "af-north-lz-rba", "vendor": "string" } ], "region": "af-north-lz-rba" }, "id": "00000000-0000-0000-0000-000000000000", "resourceStatus": "CREATING", "targetSpec": { "ipAllowlist": [ { "cidr": "192.0.2.0/24", "description": "string" } ] }, "updatedAt": "2024-01-01T12:00:00Z"}