{"openapi":"3.0.0","info":{"title":"OVHcloud API specification","description":"Specification for OVHcloud API","version":"1.0","contact":{"name":"OVH","email":"api@ml.ovh.net"}},"servers":[{"url":"https://api.eu.ovhcloud.com/v2"}],"components":{"schemas":{"any":{"description":"Can be anything (text, int, bool, json, html, etc.)","example":"This is a content of any type !"},"cloudHSM.resource.CurrentState":{"type":"object","description":"Current state of a Cloud HSM service, as observed by the platform","properties":{"ipAllowlist":{"type":"array","description":"Source IP ranges allowed to send KMIP requests to the Cloud HSM service. Empty when any IP is allowed.","items":{"$ref":"#/components/schemas/cloudHSM.resource.IpRange"},"readOnly":true},"partitions":{"type":"array","description":"Partitions provisioned for the service, one per HSM appliance hosting it","items":{"$ref":"#/components/schemas/cloudHSM.resource.Partition"},"readOnly":true},"region":{"allOf":[{"$ref":"#/components/schemas/common.RegionEnum"}],"description":"Region where the Cloud HSM service is deployed","readOnly":true}}},"cloudHSM.resource.IpRange":{"type":"object","description":"A source IP range allowed to send KMIP requests to a Cloud HSM service","properties":{"cidr":{"allOf":[{"$ref":"#/components/schemas/ipBlock"}],"description":"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."},"description":{"type":"string","description":"Free text describing the range. Omitted when no description is set. At most 255 characters.","nullable":true}},"required":["cidr"]},"cloudHSM.resource.Partition":{"type":"object","description":"A partition of a Cloud HSM service on one HSM appliance","properties":{"az":{"type":"string","description":"Availability zone of the HSM appliance hosting the partition, when the service region is split into availability zones. Null when `region` is set.","nullable":true,"readOnly":true},"endpoint":{"type":"string","description":"Endpoint of the HSM gateway through which the partition is reached. May be null on backup partition.","nullable":true,"readOnly":true},"id":{"type":"string","description":"Unique identifier of the partition","format":"uuid","readOnly":true},"model":{"type":"string","description":"Model of the HSM appliance hosting the partition","readOnly":true},"region":{"allOf":[{"$ref":"#/components/schemas/common.RegionEnum"}],"description":"Region of the HSM appliance hosting the partition, when the service region is not split into availability zones. Null when `az` is set.","nullable":true,"readOnly":true},"vendor":{"type":"string","description":"Vendor of the HSM appliance hosting the partition","readOnly":true}}},"cloudHSM.resource.Response":{"type":"object","description":"A Cloud HSM service","properties":{"checksum":{"type":"string","description":"Hash of `targetSpec`. Send it back in the body of a PUT request to detect concurrent updates.","readOnly":true},"createdAt":{"type":"string","description":"Date the Cloud HSM service was created","format":"date-time","readOnly":true},"currentState":{"allOf":[{"$ref":"#/components/schemas/cloudHSM.resource.CurrentState"}],"description":"Current state of the Cloud HSM service: its region, its partitions and its IP allowlist","readOnly":true},"id":{"type":"string","description":"Unique identifier of the Cloud HSM service","format":"uuid","readOnly":true},"resourceStatus":{"allOf":[{"$ref":"#/components/schemas/common.ResourceStatusEnum"}],"description":"Readiness of the Cloud HSM service. Partitions can be used only in `READY` status.","readOnly":true},"targetSpec":{"allOf":[{"$ref":"#/components/schemas/cloudHSM.resource.TargetSpec"}],"description":"Target specification of the Cloud HSM service, which holds its IP allowlist","readOnly":true},"updatedAt":{"type":"string","description":"Date of the last update of the Cloud HSM service. Null when it was never updated since its creation.","nullable":true,"format":"date-time","readOnly":true}}},"cloudHSM.resource.ResponseWithIAM":{"type":"object","description":"A Cloud HSM service","properties":{"checksum":{"type":"string","description":"Hash of `targetSpec`. Send it back in the body of a PUT request to detect concurrent updates.","readOnly":true},"createdAt":{"type":"string","description":"Date the Cloud HSM service was created","format":"date-time","readOnly":true},"currentState":{"allOf":[{"$ref":"#/components/schemas/cloudHSM.resource.CurrentState"}],"description":"Current state of the Cloud HSM service: its region, its partitions and its IP allowlist","readOnly":true},"iam":{"allOf":[{"$ref":"#/components/schemas/iam.ResourceMetadata"}],"description":"IAM resource metadata","nullable":true,"readOnly":true},"id":{"type":"string","description":"Unique identifier of the Cloud HSM service","format":"uuid","readOnly":true},"resourceStatus":{"allOf":[{"$ref":"#/components/schemas/common.ResourceStatusEnum"}],"description":"Readiness of the Cloud HSM service. Partitions can be used only in `READY` status.","readOnly":true},"targetSpec":{"allOf":[{"$ref":"#/components/schemas/cloudHSM.resource.TargetSpec"}],"description":"Target specification of the Cloud HSM service, which holds its IP allowlist","readOnly":true},"updatedAt":{"type":"string","description":"Date of the last update of the Cloud HSM service. Null when it was never updated since its creation.","nullable":true,"format":"date-time","readOnly":true}}},"cloudHSM.resource.TargetSpec":{"type":"object","description":"Target specification of a Cloud HSM service, as requested by the customer","properties":{"ipAllowlist":{"type":"array","description":"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.","items":{"$ref":"#/components/schemas/cloudHSM.resource.IpRange"}}},"required":["ipAllowlist"]},"cloudHSM.resource.UpdateRequest":{"type":"object","description":"Request body to update a Cloud HSM service","properties":{"checksum":{"type":"string","description":"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.","nullable":true},"targetSpec":{"allOf":[{"$ref":"#/components/schemas/cloudHSM.resource.TargetSpec"}],"description":"New target specification of the Cloud HSM service. It replaces the current one."}},"required":["targetSpec"]},"common.RegionEnum":{"type":"string","description":"OVHcloud region identifier","enum":["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","eu-north-lz-osl","eu-north-lz-sto","eu-south-lz-lis","eu-south-lz-mad","eu-south-lz-mil","eu-south-mil","eu-west-eri","eu-west-gra","eu-west-gra-snc","eu-west-lim","eu-west-lz-ams","eu-west-lz-bru","eu-west-lz-dln","eu-west-lz-lux","eu-west-lz-mnc","eu-west-lz-mrs","eu-west-lz-vie","eu-west-lz-zrh","eu-west-par","eu-west-rbx","eu-west-rbx-snc","eu-west-sbg","eu-west-sbg-snc","us-central-lz-slc","us-central-lz-stl","us-east-lz-atl","us-east-lz-bos","us-east-lz-chi","us-east-lz-dal","us-east-lz-mia","us-east-lz-nyc","us-east-vin","us-west-hil","us-west-lz-den","us-west-lz-lax","us-west-lz-pao","us-west-lz-phx","us-west-lz-sea"]},"common.ResourceStatusEnum":{"type":"string","description":"Current status of a resource","enum":["CREATING","CREATION_PLANNED","DELETING","ERROR","OUT_OF_SYNC","READY","SUSPENDED","UNKNOWN","UPDATING"]},"duration":{"type":"string","description":"Duration (e.g., P1Y2M3DT4H6M9S)","example":"P1Y2M3DT4H6M9S"},"email":{"type":"string","description":"Email address (e.g., api@ml.ovh.net)","format":"email","example":"api@ml.ovh.net"},"iam.ResourceMetadata":{"type":"object","description":"IAM resource metadata embedded in services models","properties":{"displayName":{"type":"string","description":"Resource display name","nullable":true,"readOnly":true},"id":{"type":"string","description":"Unique identifier of the resource","format":"uuid","readOnly":true},"state":{"allOf":[{"$ref":"#/components/schemas/iam.ResourceMetadata.StateEnum"}],"description":"Resource state","nullable":true,"readOnly":true},"tags":{"type":"object","description":"Resource tags. Tags that were internally computed are prefixed with ovh:","nullable":true,"additionalProperties":{"type":"string"},"readOnly":true},"urn":{"type":"string","description":"Unique resource name used in policies","readOnly":true}}},"iam.ResourceMetadata.StateEnum":{"type":"string","description":"Resource state","enum":["EXPIRED","IN_CREATION","OK","SUSPENDED"]},"iam.resource.TagFilter":{"type":"object","description":"Resource tag filter","properties":{"operator":{"allOf":[{"$ref":"#/components/schemas/iam.resource.TagFilter.OperatorEnum"}],"description":"Operator to use in order to filter on the value. Defaults to `EQ`.","nullable":true,"readOnly":true},"value":{"type":"string","description":"Value to use in order to filter tags","readOnly":true}}},"iam.resource.TagFilter.OperatorEnum":{"type":"string","description":"Operator that can be used in order to filter resources tags","enum":["EQ","EXISTS","ILIKE","LIKE","NEQ","NEXISTS"]},"internationalPhoneNumber":{"type":"string","description":"International phone number","format":"phone-number"},"ip":{"type":"string","description":"IP address (e.g., 192.0.2.0)","format":"ipv4","example":"192.0.2.0"},"ipBlock":{"type":"string","description":"IP (v4 or v6) CIDR notation (e.g., 192.0.2.0/24)","format":"ip-block","example":"192.0.2.0/24"},"ipInterface":{"type":"string","description":"IP address (e.g., 192.0.2.0)","format":"ipv4","example":"192.0.2.0"},"ipv4":{"type":"string","description":"IPv4 address (e.g., 192.0.2.0)","format":"ipv4","example":"192.0.2.0"},"ipv4Block":{"type":"string","description":"IPv4 CIDR notation (e.g., 192.0.2.0/24)","format":"ipv4-block","example":"192.0.2.0/24"},"ipv6":{"type":"string","description":"IPv6 address (e.g., 2001:41d0:1:1994::1)","format":"ipv6","example":"2001:41d0:1:1994::1"},"ipv6Block":{"type":"string","description":"IPv6 CIDR notation (e.g., 2001:41d0::/128)","format":"ipv6-block","example":"2001:41d0::/128"},"macAddress":{"type":"string","description":"MAC address (e.g., 00:00:5e:00:53:01)","format":"mac-address","example":"00:00:5e:00:53:01"},"phoneNumber":{"type":"string","description":"Phone number","format":"phone-number"},"time":{"type":"string","description":"Time (e.g., 15:04:05)","format":"time","example":"15:04:05"}},"securitySchemes":{"oAuth2AuthCode":{"type":"oauth2","description":"Oauth2","x-client-id":"1bb9c7df371741c0","x-client-secret":"a5b4de870aca620d10fbf63cd18d205b","flows":{"authorizationCode":{"authorizationUrl":"https://auth.eu.ovhcloud.com/oauth2/authorize","tokenUrl":"https://auth.eu.ovhcloud.com/oauth2/token","scopes":{"account/all":"Manage your account","all":"Manage your whole account and all your services","services/all":"Manage your services lifecycle and billing"}}}}}},"paths":{"/cloudHSM/resource":{"get":{"operationId":"getAllCloudHsmServices","summary":"List Cloud HSM services","description":"Returns the Cloud HSM services, each with its region and its partitions.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"header","name":"X-Pagination-Cursor","description":"Pagination cursor","schema":{"type":"string"}},{"in":"header","name":"X-Pagination-Size","description":"Pagination size","schema":{"type":"integer"}},{"in":"query","name":"iamTags","description":"Filter resources on IAM tags","schema":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/iam.resource.TagFilter"}}}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/cloudHSM.resource.ResponseWithIAM"}},"examples":{"Simple example":{"value":[{"checksum":"38032c9c7ae536b32cdb72ed20212627b1c5ead33897c84fd70ceb3d71010fe2","createdAt":"2026-10-01T09:30:00Z","currentState":{"ipAllowlist":[{"cidr":"198.51.100.7/32"}],"partitions":[{"az":"eu-west-par-a","endpoint":"eu-west-par-a.cloudhsm.ovh.net:5696","id":"1b3f2c8e-6a7d-4f5e-9c2b-3d4e5f6a7b8c","model":"Luna 7","vendor":"Thales"},{"az":"eu-west-par-b","endpoint":"eu-west-par-b.cloudhsm.ovh.net:5696","id":"2c4a3d9f-7b8e-4a6f-8d3c-4e5f6a7b8c9d","model":"Luna 7","vendor":"Thales"},{"az":"eu-west-par-c","endpoint":"eu-west-par-c.cloudhsm.ovh.net:5696","id":"12bce19d-1ae3-4679-ad1f-2aa5fee02132","model":"Luna 7","vendor":"Thales"}],"region":"eu-west-par"},"id":"699048b5-e49e-4869-98a6-5bae91444db1","resourceStatus":"READY","targetSpec":{"ipAllowlist":[{"cidr":"198.51.100.7/32"}]},"updatedAt":"2026-10-15T14:02:11Z"},{"checksum":"8fbed1ef9f17a0ea6daad2f3b2be55291a94838aff2eded2be6352cb63505b6e","createdAt":"2026-10-28T08:00:00Z","currentState":{"ipAllowlist":[],"partitions":[{"endpoint":"eu-west-sbg-a.cloudhsm.ovh.net:5696","id":"3d5b4eaf-8c9f-4b7a-9e4d-5f6a7b8c9d0e","model":"Luna 7","region":"eu-west-sbg","vendor":"Thales"},{"endpoint":"eu-west-sbg-b.cloudhsm.ovh.net:5696","id":"4e6c5fb0-9d0a-4c8b-8f5e-6a7b8c9d0e1f","model":"Luna 7","region":"eu-west-sbg","vendor":"Thales"},{"id":"5f7d60c1-ae1b-4d9c-9a6f-7b8c9d0e1f2a","model":"Luna 7","region":"eu-west-rbx","vendor":"Thales"}],"region":"eu-west-sbg"},"id":"a39652b2-5e02-4fef-9d78-ae67fec4d46e","resourceStatus":"CREATING","targetSpec":{"ipAllowlist":[]},"updatedAt":null}]}}}}}},"tags":["Resources"],"x-developer-hub-navigation":[["Security","Cloud HSM@@@10"]],"x-badges":[{"color":"blue","label":"Beta version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\nresult = client.get(\"/v2/cloudHSM/resource\")\n\n# Pretty print\nprint(json.dumps(result, indent=4))"},{"lang":"php","label":"PHP","source":"<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx',  // Application Key\n               'xxxxxxxxxx',  // Application Secret\n               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n               'xxxxxxxxxx'); // Consumer Key\n\n$result = $ovh->get(\"/v2/cloudHSM/resource\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"cloudHSM:apiovh:resource/get","required":true}],"x-expanded-response":"CloudHSMResourceResponseWithIAM"}},"/cloudHSM/resource/{cloudHSMId}":{"get":{"operationId":"getCloudHsmService","summary":"Get a Cloud HSM service","description":"Returns the Cloud HSM service, its region and its partitions, one per HSM appliance.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"cloudHSMId","description":"Cloud hsmid","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/cloudHSM.resource.ResponseWithIAM"},"examples":{"Simple example":{"value":{"checksum":"38032c9c7ae536b32cdb72ed20212627b1c5ead33897c84fd70ceb3d71010fe2","createdAt":"2026-10-01T09:30:00Z","currentState":{"ipAllowlist":[{"cidr":"198.51.100.7/32"}],"partitions":[{"az":"eu-west-par-a","endpoint":"eu-west-par-a.cloudhsm.ovh.net:5696","id":"1b3f2c8e-6a7d-4f5e-9c2b-3d4e5f6a7b8c","model":"Luna 7","vendor":"Thales"},{"az":"eu-west-par-b","endpoint":"eu-west-par-b.cloudhsm.ovh.net:5696","id":"2c4a3d9f-7b8e-4a6f-8d3c-4e5f6a7b8c9d","model":"Luna 7","vendor":"Thales"},{"az":"eu-west-par-c","endpoint":"eu-west-par-c.cloudhsm.ovh.net:5696","id":"12bce19d-1ae3-4679-ad1f-2aa5fee02132","model":"Luna 7","vendor":"Thales"}],"region":"eu-west-par"},"id":"699048b5-e49e-4869-98a6-5bae91444db1","resourceStatus":"READY","targetSpec":{"ipAllowlist":[{"cidr":"198.51.100.7/32"}]},"updatedAt":"2026-10-15T14:02:11Z"}}}}}}},"tags":["Resources"],"x-developer-hub-navigation":[["Security","Cloud HSM@@@20"]],"x-badges":[{"color":"blue","label":"Beta version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\nresult = client.get(\"/v2/cloudHSM/resource/{cloudHSMId}\")\n\n# Pretty print\nprint(json.dumps(result, indent=4))"},{"lang":"php","label":"PHP","source":"<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx',  // Application Key\n               'xxxxxxxxxx',  // Application Secret\n               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n               'xxxxxxxxxx'); // Consumer Key\n\n$result = $ovh->get(\"/v2/cloudHSM/resource/{cloudHSMId}\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"cloudHSM:apiovh:resource/get","required":true}]},"put":{"operationId":"editCloudHsmService","summary":"Update a Cloud HSM service","description":"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.\n\nThe 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.\n\nThe `checksum` protects your change against concurrent updates. To use it:\n1. Get the service. Keep its `checksum` and its `targetSpec`.\n2. Send the new `targetSpec` with that `checksum`.\n3. When the service changed since your read, the request is refused with a 412 (`ChecksumMismatch`). Get the service again and redo your change.\n\nWhen the `checksum` is omitted, the update is applied without this check, and it can overwrite a concurrent change.\n\nThe 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.\n\nA new IP allowlist is enforced within 30 seconds, on new connections and on the connections already open.\n\nThe service must be in `READY` status.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"cloudHSMId","description":"Cloud hsmid","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/cloudHSM.resource.UpdateRequest"},"examples":{"Add a range to the IP allowlist":{"value":{"checksum":"38032c9c7ae536b32cdb72ed20212627b1c5ead33897c84fd70ceb3d71010fe2","targetSpec":{"ipAllowlist":[{"cidr":"198.51.100.7/32"},{"cidr":"203.0.113.0/24","description":"Office in Roubaix"}]}}},"Remove every range without checking the checksum":{"value":{"targetSpec":{"ipAllowlist":[]}}}}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/cloudHSM.resource.Response"},"examples":{"Simple example":{"value":{"checksum":"e21e89e9a38b5d01a7f829f200eccdb7ce6837cc63f37275dc1d239232fdf12d","createdAt":"2026-10-01T09:30:00Z","currentState":{"ipAllowlist":[{"cidr":"198.51.100.7/32"},{"cidr":"203.0.113.0/24","description":"Office in Roubaix"}],"partitions":[{"az":"eu-west-par-a","endpoint":"eu-west-par-a.cloudhsm.ovh.net:5696","id":"1b3f2c8e-6a7d-4f5e-9c2b-3d4e5f6a7b8c","model":"Luna 7","vendor":"Thales"},{"az":"eu-west-par-b","endpoint":"eu-west-par-b.cloudhsm.ovh.net:5696","id":"2c4a3d9f-7b8e-4a6f-8d3c-4e5f6a7b8c9d","model":"Luna 7","vendor":"Thales"},{"az":"eu-west-par-c","endpoint":"eu-west-par-c.cloudhsm.ovh.net:5696","id":"12bce19d-1ae3-4679-ad1f-2aa5fee02132","model":"Luna 7","vendor":"Thales"}],"region":"eu-west-par"},"id":"699048b5-e49e-4869-98a6-5bae91444db1","resourceStatus":"READY","targetSpec":{"ipAllowlist":[{"cidr":"198.51.100.7/32"},{"cidr":"203.0.113.0/24","description":"Office in Roubaix"}]},"updatedAt":"2026-11-12T14:02:11Z"}}}}}}},"tags":["Resources"],"x-developer-hub-navigation":[["Security","Cloud HSM@@@30"]],"x-badges":[{"color":"blue","label":"Beta version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\n# Request body type: cloudHSM.resource.UpdateRequest\nresult = client.put(\"/v2/cloudHSM/resource/{cloudHSMId}\",\n\tchecksum = 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)\n\ttargetSpec = None, # New target specification of the Cloud HSM service. It replaces the current one. (type: cloudHSM.resource.TargetSpec)\n)\n\n# Pretty print\nprint(json.dumps(result, indent=4))"},{"lang":"php","label":"PHP","source":"<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx',  // Application Key\n               'xxxxxxxxxx',  // Application Secret\n               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n               'xxxxxxxxxx'); // Consumer Key\n\n// Request body type: cloudHSM.resource.UpdateRequest\n$result = $ovh->put(\"/v2/cloudHSM/resource/{cloudHSMId}\", array(\n\tchecksum => 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)\n\ttargetSpec => null, // New target specification of the Cloud HSM service. It replaces the current one. (type: cloudHSM.resource.TargetSpec)\n));\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"cloudHSM:apiovh:resource/edit","required":true}]}}},"tags":[{"name":"Resources","x-tag-expanded":false,"description":"Missing description"}]}
