# Security › Cloud HSM API

> Part of the OVHcloud developer hub. Index of every page and section: https://developers.eu.ovhcloud.com/llms.txt
> The Security product's sections: https://developers.eu.ovhcloud.com/reference/security/llms.txt
> Everything in one file: https://developers.eu.ovhcloud.com/llms-full.txt

> 3 operations of the OVHcloud API. Calls carry `authorization: Bearer $OVH_TOKEN`; the EU host is shown, Canada and the United States answer on api.ca.ovhcloud.com and api.us.ovhcloud.com.

Page: https://developers.eu.ovhcloud.com/reference/security/cloud-hsm/

OpenAPI v1: https://api.eu.ovhcloud.com/v1/__schemas/developer-hub-navigation/security/cloud-hsm.json?format=openapi3
OpenAPI v2: https://api.eu.ovhcloud.com/v2/__schemas/developer-hub-navigation/security/cloud-hsm.json?format=openapi3

## Operations

- `GET /cloudHSM/resource` — List Cloud HSM services
- `GET /cloudHSM/resource/{cloudHSMId}` — Get a Cloud HSM service
- `PUT /cloudHSM/resource/{cloudHSMId}` — Update a Cloud HSM service

## List Cloud HSM services

`GET /v2/cloudHSM/resource`

Link: https://developers.eu.ovhcloud.com/reference/security/cloud-hsm/#getAllCloudHsmServices

**Status:** Beta version  
**IAM actions:** `cloudHSM:apiovh:resource/get`

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `X-Pagination-Cursor` | header | string |  | Pagination cursor |
| `X-Pagination-Size` | header | integer |  | Pagination size |
| `iamTags` | query | object |  | Filter resources on IAM tags |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | cloudHSM.resource.ResponseWithIAM[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checksum` | string | read-only | Hash of `targetSpec`. Send it back in the body of a PUT request to detect concurrent updates. |
| `createdAt` | string (date-time) | read-only | Date the Cloud HSM service was created |
| `currentState` | cloudHSM.resource.CurrentState | read-only | Current state of the Cloud HSM service: its region, its partitions and its IP allowlist |
| `currentState.ipAllowlist` | cloudHSM.resource.IpRange[] | read-only | Source IP ranges allowed to send KMIP requests to the Cloud HSM service. Empty when any IP is allowed. |
| `currentState.ipAllowlist[].cidr` | ipBlock | yes | IPv4 or IPv6 range in CIDR notation, for example 203.0.113.0/24. A single address is written as a /32 or /128 range. Host bits must be zero. |
| `currentState.ipAllowlist[].description` | string |  | Free text describing the range. Omitted when no description is set. At most 255 characters. |
| `currentState.partitions` | cloudHSM.resource.Partition[] | read-only | Partitions provisioned for the service, one per HSM appliance hosting it |
| `currentState.partitions[].az` | string | read-only | Availability zone of the HSM appliance hosting the partition, when the service region is split into availability zones. Null when `region` is set. |
| `currentState.partitions[].endpoint` | string | read-only | Endpoint of the HSM gateway through which the partition is reached. May be null on backup partition. |
| `currentState.partitions[].id` | string (uuid) | read-only | Unique identifier of the partition |
| `currentState.partitions[].model` | string | read-only | Model of the HSM appliance hosting the partition |
| `currentState.partitions[].region` | common.RegionEnum | read-only | Region of the HSM appliance hosting the partition, when the service region is not split into availability zones. Null when `az` is set. — one of `af-north-lz-rba`, `ap-south-mum`, `ap-southeast-sgp`, `ap-southeast-syd`, `ca-east-bhs`, `ca-east-tor`, `eu-central-lz-buh`, `eu-central-lz-prg`, `eu-central-lz-sof`, `eu-central-waw`, `eu-north-lz-cph`, `eu-north-lz-hel`, … |
| `currentState.partitions[].vendor` | string | read-only | Vendor of the HSM appliance hosting the partition |
| `currentState.region` | common.RegionEnum | read-only | Region where the Cloud HSM service is deployed — one of `af-north-lz-rba`, `ap-south-mum`, `ap-southeast-sgp`, `ap-southeast-syd`, `ca-east-bhs`, `ca-east-tor`, `eu-central-lz-buh`, `eu-central-lz-prg`, `eu-central-lz-sof`, `eu-central-waw`, `eu-north-lz-cph`, `eu-north-lz-hel`, … |
| `iam` | iam.ResourceMetadata | read-only | IAM resource metadata |
| `iam.displayName` | string | read-only | Resource display name |
| `iam.id` | string (uuid) | read-only | Unique identifier of the resource |
| `iam.state` | iam.ResourceMetadata.StateEnum | read-only | Resource state — one of `EXPIRED`, `IN_CREATION`, `OK`, `SUSPENDED` |
| `iam.tags` | object | read-only | Resource tags. Tags that were internally computed are prefixed with ovh: |
| `iam.urn` | string | read-only | Unique resource name used in policies |
| `id` | string (uuid) | read-only | Unique identifier of the Cloud HSM service |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Readiness of the Cloud HSM service. Partitions can be used only in `READY` status. — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `targetSpec` | cloudHSM.resource.TargetSpec | read-only | Target specification of the Cloud HSM service, which holds its IP allowlist |
| `targetSpec.ipAllowlist` | cloudHSM.resource.IpRange[] | yes | Source IP ranges allowed to send KMIP requests to the Cloud HSM service. When empty, any IP is allowed. The list replaces the one currently set. At most 100 ranges. |
| `targetSpec.ipAllowlist[].cidr` | ipBlock | yes | IPv4 or IPv6 range in CIDR notation, for example 203.0.113.0/24. A single address is written as a /32 or /128 range. Host bits must be zero. |
| `targetSpec.ipAllowlist[].description` | string |  | Free text describing the range. Omitted when no description is set. At most 255 characters. |
| `updatedAt` | string (date-time) | read-only | Date of the last update of the Cloud HSM service. Null when it was never updated since its creation. |

```json
[
  {
    "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"
  }
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/cloudHSM/resource" \
  -H "accept: application/json" \
  -H "X-Schemas-Version: 2026-06" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/v2/cloudHSM/resource")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/v2/cloudHSM/resource");

print_r($result);
?>
```

## Get a Cloud HSM service

`GET /v2/cloudHSM/resource/{cloudHSMId}`

Link: https://developers.eu.ovhcloud.com/reference/security/cloud-hsm/#getCloudHsmService

**Status:** Beta version  
**IAM actions:** `cloudHSM:apiovh:resource/get`

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `cloudHSMId` | path | string (uuid) | yes | Cloud hsmid |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | cloudHSM.resource.ResponseWithIAM | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checksum` | string | read-only | Hash of `targetSpec`. Send it back in the body of a PUT request to detect concurrent updates. |
| `createdAt` | string (date-time) | read-only | Date the Cloud HSM service was created |
| `currentState` | cloudHSM.resource.CurrentState | read-only | Current state of the Cloud HSM service: its region, its partitions and its IP allowlist |
| `currentState.ipAllowlist` | cloudHSM.resource.IpRange[] | read-only | Source IP ranges allowed to send KMIP requests to the Cloud HSM service. Empty when any IP is allowed. |
| `currentState.ipAllowlist[].cidr` | ipBlock | yes | IPv4 or IPv6 range in CIDR notation, for example 203.0.113.0/24. A single address is written as a /32 or /128 range. Host bits must be zero. |
| `currentState.ipAllowlist[].description` | string |  | Free text describing the range. Omitted when no description is set. At most 255 characters. |
| `currentState.partitions` | cloudHSM.resource.Partition[] | read-only | Partitions provisioned for the service, one per HSM appliance hosting it |
| `currentState.partitions[].az` | string | read-only | Availability zone of the HSM appliance hosting the partition, when the service region is split into availability zones. Null when `region` is set. |
| `currentState.partitions[].endpoint` | string | read-only | Endpoint of the HSM gateway through which the partition is reached. May be null on backup partition. |
| `currentState.partitions[].id` | string (uuid) | read-only | Unique identifier of the partition |
| `currentState.partitions[].model` | string | read-only | Model of the HSM appliance hosting the partition |
| `currentState.partitions[].region` | common.RegionEnum | read-only | Region of the HSM appliance hosting the partition, when the service region is not split into availability zones. Null when `az` is set. — one of `af-north-lz-rba`, `ap-south-mum`, `ap-southeast-sgp`, `ap-southeast-syd`, `ca-east-bhs`, `ca-east-tor`, `eu-central-lz-buh`, `eu-central-lz-prg`, `eu-central-lz-sof`, `eu-central-waw`, `eu-north-lz-cph`, `eu-north-lz-hel`, … |
| `currentState.partitions[].vendor` | string | read-only | Vendor of the HSM appliance hosting the partition |
| `currentState.region` | common.RegionEnum | read-only | Region where the Cloud HSM service is deployed — one of `af-north-lz-rba`, `ap-south-mum`, `ap-southeast-sgp`, `ap-southeast-syd`, `ca-east-bhs`, `ca-east-tor`, `eu-central-lz-buh`, `eu-central-lz-prg`, `eu-central-lz-sof`, `eu-central-waw`, `eu-north-lz-cph`, `eu-north-lz-hel`, … |
| `iam` | iam.ResourceMetadata | read-only | IAM resource metadata |
| `iam.displayName` | string | read-only | Resource display name |
| `iam.id` | string (uuid) | read-only | Unique identifier of the resource |
| `iam.state` | iam.ResourceMetadata.StateEnum | read-only | Resource state — one of `EXPIRED`, `IN_CREATION`, `OK`, `SUSPENDED` |
| `iam.tags` | object | read-only | Resource tags. Tags that were internally computed are prefixed with ovh: |
| `iam.urn` | string | read-only | Unique resource name used in policies |
| `id` | string (uuid) | read-only | Unique identifier of the Cloud HSM service |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Readiness of the Cloud HSM service. Partitions can be used only in `READY` status. — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `targetSpec` | cloudHSM.resource.TargetSpec | read-only | Target specification of the Cloud HSM service, which holds its IP allowlist |
| `targetSpec.ipAllowlist` | cloudHSM.resource.IpRange[] | yes | Source IP ranges allowed to send KMIP requests to the Cloud HSM service. When empty, any IP is allowed. The list replaces the one currently set. At most 100 ranges. |
| `targetSpec.ipAllowlist[].cidr` | ipBlock | yes | IPv4 or IPv6 range in CIDR notation, for example 203.0.113.0/24. A single address is written as a /32 or /128 range. Host bits must be zero. |
| `targetSpec.ipAllowlist[].description` | string |  | Free text describing the range. Omitted when no description is set. At most 255 characters. |
| `updatedAt` | string (date-time) | read-only | Date of the last update of the Cloud HSM service. Null when it was never updated since its creation. |

```json
{
  "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"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/cloudHSM/resource/{cloudHSMId}" \
  -H "accept: application/json" \
  -H "X-Schemas-Version: 2026-06" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/v2/cloudHSM/resource/{cloudHSMId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/v2/cloudHSM/resource/{cloudHSMId}");

print_r($result);
?>
```

## Update a Cloud HSM service

`PUT /v2/cloudHSM/resource/{cloudHSMId}`

Link: https://developers.eu.ovhcloud.com/reference/security/cloud-hsm/#editCloudHsmService

**Status:** Beta version  
**IAM actions:** `cloudHSM:apiovh:resource/edit`

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.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `cloudHSMId` | path | string (uuid) | yes | Cloud hsmid |

### Request body (required)

Type: `cloudHSM.resource.UpdateRequest`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `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` | cloudHSM.resource.TargetSpec | yes | New target specification of the Cloud HSM service. It replaces the current one. |
| `targetSpec.ipAllowlist` | cloudHSM.resource.IpRange[] | yes | Source IP ranges allowed to send KMIP requests to the Cloud HSM service. When empty, any IP is allowed. The list replaces the one currently set. At most 100 ranges. |
| `targetSpec.ipAllowlist[].cidr` | ipBlock | yes | IPv4 or IPv6 range in CIDR notation, for example 203.0.113.0/24. A single address is written as a /32 or /128 range. Host bits must be zero. |
| `targetSpec.ipAllowlist[].description` | string |  | Free text describing the range. Omitted when no description is set. At most 255 characters. |

```json
{
  "checksum": "string",
  "targetSpec": {
    "ipAllowlist": [
      {
        "cidr": "192.0.2.0/24",
        "description": "string"
      }
    ]
  }
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | cloudHSM.resource.Response | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checksum` | string | read-only | Hash of `targetSpec`. Send it back in the body of a PUT request to detect concurrent updates. |
| `createdAt` | string (date-time) | read-only | Date the Cloud HSM service was created |
| `currentState` | cloudHSM.resource.CurrentState | read-only | Current state of the Cloud HSM service: its region, its partitions and its IP allowlist |
| `currentState.ipAllowlist` | cloudHSM.resource.IpRange[] | read-only | Source IP ranges allowed to send KMIP requests to the Cloud HSM service. Empty when any IP is allowed. |
| `currentState.ipAllowlist[].cidr` | ipBlock | yes | IPv4 or IPv6 range in CIDR notation, for example 203.0.113.0/24. A single address is written as a /32 or /128 range. Host bits must be zero. |
| `currentState.ipAllowlist[].description` | string |  | Free text describing the range. Omitted when no description is set. At most 255 characters. |
| `currentState.partitions` | cloudHSM.resource.Partition[] | read-only | Partitions provisioned for the service, one per HSM appliance hosting it |
| `currentState.partitions[].az` | string | read-only | Availability zone of the HSM appliance hosting the partition, when the service region is split into availability zones. Null when `region` is set. |
| `currentState.partitions[].endpoint` | string | read-only | Endpoint of the HSM gateway through which the partition is reached. May be null on backup partition. |
| `currentState.partitions[].id` | string (uuid) | read-only | Unique identifier of the partition |
| `currentState.partitions[].model` | string | read-only | Model of the HSM appliance hosting the partition |
| `currentState.partitions[].region` | common.RegionEnum | read-only | Region of the HSM appliance hosting the partition, when the service region is not split into availability zones. Null when `az` is set. — one of `af-north-lz-rba`, `ap-south-mum`, `ap-southeast-sgp`, `ap-southeast-syd`, `ca-east-bhs`, `ca-east-tor`, `eu-central-lz-buh`, `eu-central-lz-prg`, `eu-central-lz-sof`, `eu-central-waw`, `eu-north-lz-cph`, `eu-north-lz-hel`, … |
| `currentState.partitions[].vendor` | string | read-only | Vendor of the HSM appliance hosting the partition |
| `currentState.region` | common.RegionEnum | read-only | Region where the Cloud HSM service is deployed — one of `af-north-lz-rba`, `ap-south-mum`, `ap-southeast-sgp`, `ap-southeast-syd`, `ca-east-bhs`, `ca-east-tor`, `eu-central-lz-buh`, `eu-central-lz-prg`, `eu-central-lz-sof`, `eu-central-waw`, `eu-north-lz-cph`, `eu-north-lz-hel`, … |
| `id` | string (uuid) | read-only | Unique identifier of the Cloud HSM service |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Readiness of the Cloud HSM service. Partitions can be used only in `READY` status. — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `targetSpec` | cloudHSM.resource.TargetSpec | read-only | Target specification of the Cloud HSM service, which holds its IP allowlist |
| `targetSpec.ipAllowlist` | cloudHSM.resource.IpRange[] | yes | Source IP ranges allowed to send KMIP requests to the Cloud HSM service. When empty, any IP is allowed. The list replaces the one currently set. At most 100 ranges. |
| `targetSpec.ipAllowlist[].cidr` | ipBlock | yes | IPv4 or IPv6 range in CIDR notation, for example 203.0.113.0/24. A single address is written as a /32 or /128 range. Host bits must be zero. |
| `targetSpec.ipAllowlist[].description` | string |  | Free text describing the range. Omitted when no description is set. At most 255 characters. |
| `updatedAt` | string (date-time) | read-only | Date of the last update of the Cloud HSM service. Null when it was never updated since its creation. |

```json
{
  "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"
}
```

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/v2/cloudHSM/resource/{cloudHSMId}" \
  -H "accept: application/json" \
  -H "X-Schemas-Version: 2026-06" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: cloudHSM.resource.UpdateRequest
result = client.put("/v2/cloudHSM/resource/{cloudHSMId}",
	checksum = None, # 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. (type: string, nullable)
	targetSpec = None, # New target specification of the Cloud HSM service. It replaces the current one. (type: cloudHSM.resource.TargetSpec)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: cloudHSM.resource.UpdateRequest
$result = $ovh->put("/v2/cloudHSM/resource/{cloudHSMId}", array(
	checksum => null, // 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. (type: string, nullable)
	targetSpec => null, // New target specification of the Cloud HSM service. It replaces the current one. (type: cloudHSM.resource.TargetSpec)
));

print_r($result);
?>
```
