{"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 !"},"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"},"okms.KeyAlgEnum":{"type":"string","description":"Key algorithm","enum":["ES256","ES384","ES512","PS256","PS384","PS512","RS256","RS384","RS512"]},"okms.KeyClassEnum":{"type":"string","description":"Key class","enum":["KEY_PAIR","PUBLIC_KEY","SECRET_KEY"]},"okms.KeyCurveEnum":{"type":"string","description":"Key curve","enum":["P-256","P-384","P-521"]},"okms.KeyDeactivationReasonEnum":{"type":"string","description":"Key deactivation reason","enum":["AFFILIATION_CHANGED","CA_COMPROMISE","CESSATION_OF_OPERATION","KEY_COMPROMISE","PRIVILEGE_WITHDRAWN","SUPERSEDED","UNSPECIFIED"]},"okms.KeyFormatEnum":{"type":"string","description":"Key format","enum":["JWK","PEM"]},"okms.KeyOpsEnum":{"type":"string","description":"Key operations","enum":["decrypt","encrypt","sign","unwrapKey","verify","wrapKey"]},"okms.KeyProtectionLevelEnum":{"type":"string","description":"Key protection level","enum":["HSM","SOFTWARE"]},"okms.KeySizeEnum":{"type":"integer","description":"The size of a key","enum":[128,192,256,384,521,2048,3072,4096]},"okms.KeyStateEnum":{"type":"string","description":"The state of a key","enum":["ACTIVE","ALL","COMPROMISED","DEACTIVATED","DESTROYED","DESTROYED_COMPROMISED","PRE_ACTIVE"]},"okms.KeyStateUpdateEnum":{"type":"string","description":"The desired state of a key","enum":["ACTIVE","COMPROMISED","DEACTIVATED"]},"okms.KeyTypeEnum":{"type":"string","description":"Cryptographic algorithm family used with the key","enum":["EC","RSA","oct"]},"okms.KeyUseEnum":{"type":"string","description":"Key usage","enum":["enc","sig"]},"okms.serviceKey.Consumer":{"type":"object","description":"A consumer of the key","properties":{"additionalInfo":{"type":"string","description":"Additionnal information on the consumer","nullable":true,"readOnly":true},"createdAt":{"type":"string","description":"Date of consumer declaration","format":"date-time","readOnly":true},"type":{"type":"string","description":"Type of resource consuming the key","readOnly":true},"urn":{"type":"string","description":"Urn of the resource consuming the key","readOnly":true}}},"okms.serviceKey.Creation":{"type":"object","description":"Create an OKMS service key","properties":{"context":{"type":"string","description":"Context of the key","nullable":true},"curve":{"allOf":[{"$ref":"#/components/schemas/okms.KeyCurveEnum"}],"description":"Curve type for Elliptic Curve (EC) keys","nullable":true},"extractable":{"type":"boolean","description":"Whether the key material can be extracted from the KMS. Defaults to false.","nullable":true},"keys":{"type":"array","description":"Set of JSON Web Keys in case of import, incompatible with type,size,curve and operations","nullable":true,"items":{"$ref":"#/components/schemas/okms.serviceKey.JsonWebKeyRequest"}},"name":{"type":"string","description":"Key name"},"operations":{"type":"array","description":"The operations for which the key is intended to be used","nullable":true,"items":{"$ref":"#/components/schemas/okms.KeyOpsEnum"}},"protectionLevel":{"allOf":[{"$ref":"#/components/schemas/okms.KeyProtectionLevelEnum"}],"description":"Key protection level","nullable":true},"size":{"allOf":[{"$ref":"#/components/schemas/okms.KeySizeEnum"}],"description":"Size of the key to be created","nullable":true},"type":{"allOf":[{"$ref":"#/components/schemas/okms.KeyTypeEnum"}],"description":"Type of the key to be created","nullable":true}}},"okms.serviceKey.JsonWebKeyRequest":{"type":"object","description":"A JSON Web Key (JWK) object","properties":{"alg":{"allOf":[{"$ref":"#/components/schemas/okms.KeyAlgEnum"}],"description":"The algorithm intended to be used with the key","nullable":true},"crv":{"allOf":[{"$ref":"#/components/schemas/okms.KeyCurveEnum"}],"description":"The cryptographic curve used with the key","nullable":true},"d":{"type":"string","description":"The RSA or EC private exponent","nullable":true,"format":"password"},"dp":{"type":"string","description":"The RSA private key's first factor CRT exponent","nullable":true,"format":"password"},"dq":{"type":"string","description":"The RSA private key's second factor CRT exponent","nullable":true,"format":"password"},"e":{"type":"string","description":"The exponent value for the RSA public key","nullable":true},"k":{"type":"string","description":"The value of the symmetric (or other single-valued) key","nullable":true,"format":"password"},"key_ops":{"type":"array","description":"The operation for which the key is intended to be used","nullable":true,"items":{"$ref":"#/components/schemas/okms.KeyOpsEnum"}},"kid":{"type":"string","description":"key ID parameter used to match a specific key","nullable":true},"kty":{"allOf":[{"$ref":"#/components/schemas/okms.KeyTypeEnum"}],"description":"Key type parameter identifies the cryptographic algorithm family used with the key, such as RSA or EC"},"n":{"type":"string","description":"The modulus value for the RSA public key","nullable":true},"p":{"type":"string","description":"The first prime factor of the RSA private key","nullable":true,"format":"password"},"q":{"type":"string","description":"The second prime factor of the RSA private key","nullable":true,"format":"password"},"qi":{"type":"string","description":"The CRT coefficient of the second factor of the RSA private key","nullable":true,"format":"password"},"use":{"allOf":[{"$ref":"#/components/schemas/okms.KeyUseEnum"}],"description":"The intended use of the public key","nullable":true},"x":{"type":"string","description":"The x coordinate for the Elliptic Curve point","nullable":true},"y":{"type":"string","description":"The y coordinate for the Elliptic Curve point","nullable":true}},"required":["kty"]},"okms.serviceKey.JsonWebKeyResponse":{"type":"object","description":"A JSON Web Key (JWK) object","properties":{"alg":{"allOf":[{"$ref":"#/components/schemas/okms.KeyAlgEnum"}],"description":"The algorithm intended to be used with the key","nullable":true,"readOnly":true},"crv":{"allOf":[{"$ref":"#/components/schemas/okms.KeyCurveEnum"}],"description":"The cryptographic curve used with the key","nullable":true,"readOnly":true},"d":{"type":"string","description":"The RSA or EC private exponent","nullable":true,"format":"password","readOnly":true},"dp":{"type":"string","description":"The RSA private key's first factor CRT exponent","nullable":true,"format":"password","readOnly":true},"dq":{"type":"string","description":"The RSA private key's second factor CRT exponent","nullable":true,"format":"password","readOnly":true},"e":{"type":"string","description":"The exponent value for the RSA public key","nullable":true,"readOnly":true},"k":{"type":"string","description":"The value of the symmetric (or other single-valued) key","nullable":true,"format":"password","readOnly":true},"key_ops":{"type":"array","description":"The operation for which the key is intended to be used","nullable":true,"items":{"$ref":"#/components/schemas/okms.KeyOpsEnum"},"readOnly":true},"kid":{"type":"string","description":"key ID parameter used to match a specific key","readOnly":true},"kty":{"allOf":[{"$ref":"#/components/schemas/okms.KeyTypeEnum"}],"description":"Key type parameter identifies the cryptographic algorithm family used with the key, such as RSA or EC","readOnly":true},"n":{"type":"string","description":"The modulus value for the RSA public key","nullable":true,"readOnly":true},"p":{"type":"string","description":"The first prime factor of the RSA private key","nullable":true,"format":"password","readOnly":true},"q":{"type":"string","description":"The second prime factor of the RSA private key","nullable":true,"format":"password","readOnly":true},"qi":{"type":"string","description":"The CRT coefficient of the second factor of the RSA private key","nullable":true,"format":"password","readOnly":true},"use":{"allOf":[{"$ref":"#/components/schemas/okms.KeyUseEnum"}],"description":"The intended use of the public key","nullable":true,"readOnly":true},"x":{"type":"string","description":"The x coordinate for the Elliptic Curve point","nullable":true,"readOnly":true},"y":{"type":"string","description":"The y coordinate for the Elliptic Curve point","nullable":true,"readOnly":true}}},"okms.serviceKey.PEM":{"type":"object","description":"A PEM (Privacy-Enhanced Mail) object","properties":{"pem":{"type":"string","description":"Data in PEM format","readOnly":true}}},"okms.serviceKey.Response":{"type":"object","description":"An OKMS service key","properties":{"alwaysSensitive":{"type":"boolean","description":"Whether the key has always been sensitive since creation","readOnly":true},"class":{"allOf":[{"$ref":"#/components/schemas/okms.KeyClassEnum"}],"description":"Class of the key","readOnly":true},"consumerCount":{"type":"integer","description":"Number of declared consumers","readOnly":true},"consumers":{"type":"array","description":"List of declared consumers of the key","nullable":true,"items":{"$ref":"#/components/schemas/okms.serviceKey.Consumer"},"readOnly":true},"createdAt":{"type":"string","description":"Creation time of the key","format":"date-time","readOnly":true},"curve":{"allOf":[{"$ref":"#/components/schemas/okms.KeyCurveEnum"}],"description":"Curve type for Elliptic Curve (EC) keys","nullable":true,"readOnly":true},"extractable":{"type":"boolean","description":"Whether the key material can be extracted from the KMS","readOnly":true},"id":{"type":"string","description":"Key ID","format":"uuid","readOnly":true},"keys":{"type":"array","description":"The key in JWK format","nullable":true,"items":{"$ref":"#/components/schemas/okms.serviceKey.JsonWebKeyResponse"},"readOnly":true},"keysPEM":{"type":"array","description":"The key in PEM format","nullable":true,"items":{"$ref":"#/components/schemas/okms.serviceKey.PEM"},"readOnly":true},"name":{"type":"string","description":"Key name","readOnly":true},"neverExtractable":{"type":"boolean","description":"Whether the key has never been extractable at any point in its lifetime","readOnly":true},"operations":{"type":"array","description":"The operations for which the key is intended to be used","nullable":true,"items":{"$ref":"#/components/schemas/okms.KeyOpsEnum"},"readOnly":true},"protectionLevel":{"allOf":[{"$ref":"#/components/schemas/okms.KeyProtectionLevelEnum"}],"description":"Key protection level","readOnly":true},"sensitive":{"type":"boolean","description":"Whether the key material can be exposed in plaintext. If true, extraction is only allowed in wrapped form.","readOnly":true},"size":{"allOf":[{"$ref":"#/components/schemas/okms.KeySizeEnum"}],"description":"Size of the key","nullable":true,"readOnly":true},"state":{"allOf":[{"$ref":"#/components/schemas/okms.KeyStateEnum"}],"description":"State of the key","readOnly":true},"type":{"allOf":[{"$ref":"#/components/schemas/okms.KeyTypeEnum"}],"description":"Key type","readOnly":true}}},"okms.serviceKey.ResponseWithIAM":{"type":"object","description":"An OKMS service key","properties":{"alwaysSensitive":{"type":"boolean","description":"Whether the key has always been sensitive since creation","readOnly":true},"class":{"allOf":[{"$ref":"#/components/schemas/okms.KeyClassEnum"}],"description":"Class of the key","readOnly":true},"consumerCount":{"type":"integer","description":"Number of declared consumers","readOnly":true},"consumers":{"type":"array","description":"List of declared consumers of the key","nullable":true,"items":{"$ref":"#/components/schemas/okms.serviceKey.Consumer"},"readOnly":true},"createdAt":{"type":"string","description":"Creation time of the key","format":"date-time","readOnly":true},"curve":{"allOf":[{"$ref":"#/components/schemas/okms.KeyCurveEnum"}],"description":"Curve type for Elliptic Curve (EC) keys","nullable":true,"readOnly":true},"extractable":{"type":"boolean","description":"Whether the key material can be extracted from the KMS","readOnly":true},"iam":{"allOf":[{"$ref":"#/components/schemas/iam.ResourceMetadata"}],"description":"IAM resource metadata","nullable":true,"readOnly":true},"id":{"type":"string","description":"Key ID","format":"uuid","readOnly":true},"keys":{"type":"array","description":"The key in JWK format","nullable":true,"items":{"$ref":"#/components/schemas/okms.serviceKey.JsonWebKeyResponse"},"readOnly":true},"keysPEM":{"type":"array","description":"The key in PEM format","nullable":true,"items":{"$ref":"#/components/schemas/okms.serviceKey.PEM"},"readOnly":true},"name":{"type":"string","description":"Key name","readOnly":true},"neverExtractable":{"type":"boolean","description":"Whether the key has never been extractable at any point in its lifetime","readOnly":true},"operations":{"type":"array","description":"The operations for which the key is intended to be used","nullable":true,"items":{"$ref":"#/components/schemas/okms.KeyOpsEnum"},"readOnly":true},"protectionLevel":{"allOf":[{"$ref":"#/components/schemas/okms.KeyProtectionLevelEnum"}],"description":"Key protection level","readOnly":true},"sensitive":{"type":"boolean","description":"Whether the key material can be exposed in plaintext. If true, extraction is only allowed in wrapped form.","readOnly":true},"size":{"allOf":[{"$ref":"#/components/schemas/okms.KeySizeEnum"}],"description":"Size of the key","nullable":true,"readOnly":true},"state":{"allOf":[{"$ref":"#/components/schemas/okms.KeyStateEnum"}],"description":"State of the key","readOnly":true},"type":{"allOf":[{"$ref":"#/components/schemas/okms.KeyTypeEnum"}],"description":"Key type","readOnly":true}}},"okms.serviceKey.Update":{"type":"object","description":"Update an OKMS service key","properties":{"deactivationReason":{"allOf":[{"$ref":"#/components/schemas/okms.KeyDeactivationReasonEnum"}],"description":"Key deactivation reason","nullable":true},"extractable":{"type":"boolean","description":"Whether the key material can be extracted from the KMS","nullable":true},"name":{"type":"string","description":"Key Name","nullable":true},"state":{"allOf":[{"$ref":"#/components/schemas/okms.KeyStateUpdateEnum"}],"description":"Key desired state for activation, deactivation and compromise (specific case of deactivation)","nullable":true}}},"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":{"/okms/resource/{okmsId}/serviceKey":{"get":{"operationId":"getAllOkmsServiceKeys","summary":"List service keys","description":"Returns the service keys of the service, with their metadata.","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"}}}},{"in":"path","name":"okmsId","description":"Okms ID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/okms.serviceKey.ResponseWithIAM"}},"examples":{"Simple example":{"value":[{"alwaysSensitive":true,"class":"SECRET_KEY","consumerCount":2,"createdAt":"2024-10-10T15:20:23.337051+01:00","extractable":false,"id":"53b7b57c-fff7-45c3-8267-c32cd060577b","name":"encryption-key","neverExtractable":true,"operations":["encrypt","decrypt"],"protectionLevel":"SOFTWARE","sensitive":true,"size":256,"state":"ACTIVE","type":"oct"},{"alwaysSensitive":false,"class":"KEY_PAIR","consumerCount":0,"createdAt":"2024-10-11T16:20:23.337052+01:00","extractable":true,"id":"fbfa04a8-634a-42dc-989e-b7f92eb463d0","name":"rsaKey","neverExtractable":false,"operations":["sign","verify"],"protectionLevel":"SOFTWARE","sensitive":false,"size":4096,"state":"DEACTIVATED","type":"RSA"}]}}}}},"400":{"description":"Error 400 response","content":{"application/json":{"schema":{"type":"object","description":"Common error model","properties":{"class":{"type":"string","description":"Class of the error"},"message":{"type":"string","description":"Error message"}}},"examples":{"Client::BadRequest::OKMSExpired":{"value":{"class":"Client::BadRequest::OKMSExpired","message":"This service is expired"}}}}}}},"tags":["Service Keys"],"x-developer-hub-navigation":[["Manage & operate","Key and Secret Manager","Keys@@@10"]],"x-badges":[{"color":"green","label":"Stable production 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/okms/resource/{okmsId}/serviceKey\")\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/okms/resource/{okmsId}/serviceKey\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"okms:apiovh:serviceKey/get","required":true}],"x-expanded-response":"OkmsServiceKeyResponseWithIAM"},"post":{"operationId":"createOkmsServiceKey","summary":"Create or import a service key","description":"To create a new service key, omit the key material from the request. The KMS generates it from the type, size, curve and operations you specify.\n\nTo import an existing service key, supply its key material in the request. The key is stored in the KMS with the attributes you provide.\n\nFor a secure BYOK import, send the key material encrypted in `wrappedKeys` (RSA wrap) instead of in cleartext. The KMS unwraps it with the referenced transport key and stores the resulting service key.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"okmsId","description":"Okms ID","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/okms.serviceKey.Creation"},"examples":{"Generate EC Key":{"value":{"context":"ecKey","curve":"P-256","extractable":false,"name":"ecKey","operations":["sign","verify"],"protectionLevel":"SOFTWARE","type":"EC"}},"Generate RSA Key":{"value":{"context":"rsaKey","extractable":false,"name":"rsaKey","operations":["sign","verify"],"protectionLevel":"SOFTWARE","size":2048,"type":"RSA"}},"Generate oct Key":{"value":{"context":"octKey","name":"octKey","operations":["encrypt","decrypt"],"protectionLevel":"SOFTWARE","size":256,"type":"oct"}}}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/okms.serviceKey.Response"},"examples":{"Simple example":{"value":{"alwaysSensitive":true,"class":"SECRET_KEY","consumerCount":0,"createdAt":"2024-10-10T15:20:23.337051+01:00","extractable":false,"id":"53b7b57c-fff7-45c3-8267-c32cd060577b","name":"encryption-key","neverExtractable":true,"operations":["encrypt","decrypt"],"protectionLevel":"SOFTWARE","sensitive":true,"size":256,"state":"ACTIVE","type":"oct"}}}}}},"400":{"description":"Error 400 response","content":{"application/json":{"schema":{"type":"object","description":"Common error model","properties":{"class":{"type":"string","description":"Class of the error"},"message":{"type":"string","description":"Error message"}}},"examples":{"Client::BadRequest::HsmDisabled":{"value":{"class":"Client::BadRequest::HsmDisabled","message":"HSM disabled on this region"}},"Client::BadRequest::ManagedHsmDisabled":{"value":{"class":"Client::BadRequest::ManagedHsmDisabled","message":"Managed HSM disabled on this region"}},"Client::BadRequest::OKMSExpired":{"value":{"class":"Client::BadRequest::OKMSExpired","message":"This service is expired"}},"Client::BadRequest::ServiceKeyContextInvalidCharacter":{"value":{"class":"Client::BadRequest::ServiceKeyContextInvalidCharacter","message":"Invalid parameter 'context', expected only ASCII characters"}},"Client::BadRequest::ServiceKeyContextMaxExceeded":{"value":{"class":"Client::BadRequest::ServiceKeyContextMaxExceeded","message":"Invalid parameter 'context', it should not exceed '{{.paramValue}}' characters"}},"Client::BadRequest::ServiceKeyCrvRequired":{"value":{"class":"Client::BadRequest::ServiceKeyCrvRequired","message":"Parameter 'crv' is required for EC 'type'"}},"Client::BadRequest::ServiceKeyCurveIncompatible":{"value":{"class":"Client::BadRequest::ServiceKeyCurveIncompatible","message":"Parameter 'curve' is incompatible with parameter 'keys' used for importing key"}},"Client::BadRequest::ServiceKeyCurveRequired":{"value":{"class":"Client::BadRequest::ServiceKeyCurveRequired","message":"Parameter 'curve' is required for the specified 'type'"}},"Client::BadRequest::ServiceKeyDInvalidFormat":{"value":{"class":"Client::BadRequest::ServiceKeyDInvalidFormat","message":"Invalid Parameter 'd', expected base64url encoding"}},"Client::BadRequest::ServiceKeyDRequired":{"value":{"class":"Client::BadRequest::ServiceKeyDRequired","message":"Parameter 'd' is required for the specified 'kty'"}},"Client::BadRequest::ServiceKeyDpRequired":{"value":{"class":"Client::BadRequest::ServiceKeyDpRequired","message":"Parameter 'dp' is required for RSA 'kty'"}},"Client::BadRequest::ServiceKeyDqRequired":{"value":{"class":"Client::BadRequest::ServiceKeyDqRequired","message":"Parameter 'dq' is required for RSA 'kty'"}},"Client::BadRequest::ServiceKeyEInvalidFormat":{"value":{"class":"Client::BadRequest::ServiceKeyEInvalidFormat","message":"Invalid parameter 'e, expected base64url encoding"}},"Client::BadRequest::ServiceKeyERequired":{"value":{"class":"Client::BadRequest::ServiceKeyERequired","message":"Parameter 'e' is required for RSA 'kty'"}},"Client::BadRequest::ServiceKeyKInvalidFormat":{"value":{"class":"Client::BadRequest::ServiceKeyKInvalidFormat","message":"Invalid parameter 'k', expected base64url encoding"}},"Client::BadRequest::ServiceKeyKRequired":{"value":{"class":"Client::BadRequest::ServiceKeyKRequired","message":"Parameter 'k' is required for oct 'kty'"}},"Client::BadRequest::ServiceKeyKeyOpsInvalidUsage":{"value":{"class":"Client::BadRequest::ServiceKeyKeyOpsInvalidUsage","message":"Invalid parameter 'key_ops' for the specified 'kty'"}},"Client::BadRequest::ServiceKeyKeyOpsRequired":{"value":{"class":"Client::BadRequest::ServiceKeyKeyOpsRequired","message":"Parameter 'key_ops' is required"}},"Client::BadRequest::ServiceKeyKeysIncompatible":{"value":{"class":"Client::BadRequest::ServiceKeyKeysIncompatible","message":"Parameter 'keys' is incompatible with parameters 'type', 'size', 'curve' and 'operations'"}},"Client::BadRequest::ServiceKeyKeysMaxExceeded":{"value":{"class":"Client::BadRequest::ServiceKeyKeysMaxExceeded","message":"Parameter 'keys' should not contain more than '{{.paramValue}}' elements"}},"Client::BadRequest::ServiceKeyKeysMinRequired":{"value":{"class":"Client::BadRequest::ServiceKeyKeysMinRequired","message":"Parameter 'keys' should contain at least '{{.paramValue}}' elements"}},"Client::BadRequest::ServiceKeyKidRequired":{"value":{"class":"Client::BadRequest::ServiceKeyKidRequired","message":"Parameter 'kid' is required"}},"Client::BadRequest::ServiceKeyKtyRequired":{"value":{"class":"Client::BadRequest::ServiceKeyKtyRequired","message":"Parameter 'kty' is required"}},"Client::BadRequest::ServiceKeyNInvalidFormat":{"value":{"class":"Client::BadRequest::ServiceKeyNInvalidFormat","message":"Invalid parameter 'n', expected base64url encoding"}},"Client::BadRequest::ServiceKeyNInvalidSize":{"value":{"class":"Client::BadRequest::ServiceKeyNInvalidSize","message":"Parameter 'n' has an invalid size"}},"Client::BadRequest::ServiceKeyNRequired":{"value":{"class":"Client::BadRequest::ServiceKeyNRequired","message":"Parameter 'n' is required for RSA 'kty'"}},"Client::BadRequest::ServiceKeyNameInvalidCharacter":{"value":{"class":"Client::BadRequest::ServiceKeyNameInvalidCharacter","message":"Invalid parameter 'name', expected only ASCII characters"}},"Client::BadRequest::ServiceKeyNameMaxExceeded":{"value":{"class":"Client::BadRequest::ServiceKeyNameMaxExceeded","message":"Invalid parameter 'name', it should not exceed '{{.paramValue}}' characters"}},"Client::BadRequest::ServiceKeyNameMinRequired":{"value":{"class":"Client::BadRequest::ServiceKeyNameMinRequired","message":"Invalid parameter 'name', it should have at least '{{.paramValue}}' characters"}},"Client::BadRequest::ServiceKeyOperationsIncompatible":{"value":{"class":"Client::BadRequest::ServiceKeyOperationsIncompatible","message":"Parameter 'operation' is incompatible with parameter 'keys' used for importing key"}},"Client::BadRequest::ServiceKeyOperationsInvalid":{"value":{"class":"Client::BadRequest::ServiceKeyOperationsInvalid","message":"Invalid parameter 'operations' for the specified 'type'"}},"Client::BadRequest::ServiceKeyOperationsRequired":{"value":{"class":"Client::BadRequest::ServiceKeyOperationsRequired","message":"Parameter 'operations' is required"}},"Client::BadRequest::ServiceKeyPInvalidFormat":{"value":{"class":"Client::BadRequest::ServiceKeyPInvalidFormat","message":"Invalid parameter 'p', expected base64url encoding"}},"Client::BadRequest::ServiceKeyPRequired":{"value":{"class":"Client::BadRequest::ServiceKeyPRequired","message":"Parameter 'p' is required for RSA 'kty'"}},"Client::BadRequest::ServiceKeyQInvalidFormat":{"value":{"class":"Client::BadRequest::ServiceKeyQInvalidFormat","message":"Invalid parameter 'q', expected base64url encoding"}},"Client::BadRequest::ServiceKeyQRequired":{"value":{"class":"Client::BadRequest::ServiceKeyQRequired","message":"Parameter 'q' is required for RSA 'kty'"}},"Client::BadRequest::ServiceKeyQiRequired":{"value":{"class":"Client::BadRequest::ServiceKeyQiRequired","message":"Parameter 'qi' is required for RSA 'kty'"}},"Client::BadRequest::ServiceKeySizeIncompatible":{"value":{"class":"Client::BadRequest::ServiceKeySizeIncompatible","message":"Parameter 'size' is incompatible with parameter 'keys' used for importing key"}},"Client::BadRequest::ServiceKeySizeInvalid":{"value":{"class":"Client::BadRequest::ServiceKeySizeInvalid","message":"Invalid parameter 'size' for the specified 'type'"}},"Client::BadRequest::ServiceKeySizeRequired":{"value":{"class":"Client::BadRequest::ServiceKeySizeRequired","message":"Parameter 'size' is required for the specified 'type'"}},"Client::BadRequest::ServiceKeyTypeIncompatible":{"value":{"class":"Client::BadRequest::ServiceKeyTypeIncompatible","message":"Parameter 'type' is incompatible with parameter 'keys' used for importing key"}},"Client::BadRequest::ServiceKeyTypeRequired":{"value":{"class":"Client::BadRequest::ServiceKeyTypeRequired","message":"Parameter 'type' is required"}},"Client::BadRequest::ServiceKeyUseInconsistentUsage":{"value":{"class":"Client::BadRequest::ServiceKeyUseInconsistentUsage","message":"Inconsistent values between 'key_ops' and 'use' fields"}},"Client::BadRequest::ServiceKeyXInvalidFormat":{"value":{"class":"Client::BadRequest::ServiceKeyXInvalidFormat","message":"Invalid Parameter 'x', expected base64url encoding"}},"Client::BadRequest::ServiceKeyXRequired":{"value":{"class":"Client::BadRequest::ServiceKeyXRequired","message":"Parameter 'x' is required for EC 'kty'"}},"Client::BadRequest::ServiceKeyYInvalidFormat":{"value":{"class":"Client::BadRequest::ServiceKeyYInvalidFormat","message":"Invalid Parameter 'y', expected base64url encoding"}}}}}}},"tags":["Service Keys"],"x-developer-hub-navigation":[["Manage & operate","Key and Secret Manager","Keys@@@30"]],"x-badges":[{"color":"green","label":"Stable production 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: okms.serviceKey.Creation\nresult = client.post(\"/v2/okms/resource/{okmsId}/serviceKey\",\n\tcontext = None, # Context of the key (type: string, nullable)\n\tcurve = None, # Curve type for Elliptic Curve (EC) keys (type: okms.KeyCurveEnum, nullable)\n\textractable = None, # Whether the key material can be extracted from the KMS. Defaults to false. (type: boolean, nullable)\n\tkeys = None, # Set of JSON Web Keys in case of import, incompatible with type,size,curve and operations (type: array, nullable)\n\tname = None, # Key name (type: string)\n\toperations = None, # The operations for which the key is intended to be used (type: array, nullable)\n\tprotectionLevel = None, # Key protection level (type: okms.KeyProtectionLevelEnum, nullable)\n\tsize = None, # Size of the key to be created (type: okms.KeySizeEnum, nullable)\n\ttype = None, # Type of the key to be created (type: okms.KeyTypeEnum, nullable)\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: okms.serviceKey.Creation\n$result = $ovh->post(\"/v2/okms/resource/{okmsId}/serviceKey\", array(\n\tcontext => null, // Context of the key (type: string, nullable)\n\tcurve => null, // Curve type for Elliptic Curve (EC) keys (type: okms.KeyCurveEnum, nullable)\n\textractable => null, // Whether the key material can be extracted from the KMS. Defaults to false. (type: boolean, nullable)\n\tkeys => null, // Set of JSON Web Keys in case of import, incompatible with type,size,curve and operations (type: array, nullable)\n\tname => null, // Key name (type: string)\n\toperations => null, // The operations for which the key is intended to be used (type: array, nullable)\n\tprotectionLevel => null, // Key protection level (type: okms.KeyProtectionLevelEnum, nullable)\n\tsize => null, // Size of the key to be created (type: okms.KeySizeEnum, nullable)\n\ttype => null, // Type of the key to be created (type: okms.KeyTypeEnum, nullable)\n));\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"okms:apiovh:serviceKey/create","required":true},{"name":"okms:apiovh:serviceKey/import","description":"Required when importing a service key","required":false}]}},"/okms/resource/{okmsId}/serviceKey/{keyId}":{"delete":{"operationId":"deleteOkmsServiceKey","summary":"Delete a service key","description":"Permanently deletes the key and its material from the KMS. Once deleted, the key cannot be recovered.\n\nThe key must already be deactivated, unless `force` is set.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"query","name":"force","description":"Force deletion of the key","schema":{"type":"boolean"}},{"in":"path","name":"keyId","description":"Key ID","required":true,"schema":{"type":"string","format":"uuid"}},{"in":"path","name":"okmsId","description":"Okms ID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"successful operation"}},"tags":["Service Keys"],"x-developer-hub-navigation":[["Manage & operate","Key and Secret Manager","Keys@@@40"]],"x-badges":[{"color":"green","label":"Stable production 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.delete(\"/v2/okms/resource/{okmsId}/serviceKey/{keyId}\")\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->delete(\"/v2/okms/resource/{okmsId}/serviceKey/{keyId}\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"okms:apiovh:serviceKey/delete","required":true}]},"get":{"operationId":"getOkmsServiceKey","summary":"Get a service key","description":"Returns one service key and its metadata. Pass optional `format` to also export the key material as JWK or PEM, when the key is extractable.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"query","name":"format","description":"Optional additional output format of the key","schema":{"$ref":"#/components/schemas/okms.KeyFormatEnum"}},{"in":"path","name":"keyId","description":"Key ID","required":true,"schema":{"type":"string","format":"uuid"}},{"in":"path","name":"okmsId","description":"Okms ID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/okms.serviceKey.ResponseWithIAM"},"examples":{"Simple example":{"value":{"alwaysSensitive":true,"class":"SECRET_KEY","consumerCount":2,"consumers":[{"additionalInfo":"Encryption of volume data-01","createdAt":"2024-10-10T09:12:44.112038+01:00","type":"publicCloudProject/volume","urn":"urn:v1:eu:resource:publicCloudProject:53b7b57c-fff7-45c3-8267-c32cd060577b/volume/53b7b57c-fff7-45c3-8267-c32cd060577b"}],"createdAt":"2024-10-09T15:20:23.337051+01:00","extractable":false,"id":"53b7b57c-fff7-45c3-8267-c32cd060577b","name":"encryption-key","neverExtractable":true,"operations":["encrypt","decrypt"],"protectionLevel":"SOFTWARE","sensitive":true,"size":256,"state":"ACTIVE","type":"oct"}}}}}},"400":{"description":"Error 400 response","content":{"application/json":{"schema":{"type":"object","description":"Common error model","properties":{"class":{"type":"string","description":"Class of the error"},"message":{"type":"string","description":"Error message"}}},"examples":{"Client::BadRequest::OKMSExpired":{"value":{"class":"Client::BadRequest::OKMSExpired","message":"This service is expired"}}}}}}},"tags":["Service Keys"],"x-developer-hub-navigation":[["Manage & operate","Key and Secret Manager","Keys@@@20"]],"x-badges":[{"color":"green","label":"Stable production 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/okms/resource/{okmsId}/serviceKey/{keyId}\")\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/okms/resource/{okmsId}/serviceKey/{keyId}\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"okms:apiovh:serviceKey/get","required":true}]},"put":{"operationId":"editOkmsServiceKey","summary":"Update a service key","description":"Updates the key's name or extractability.\n\nYou can also change the key state to activate, deactivate, or mark it as compromised. Deactivation requires `deactivationReason`.\n\nA deactivated key keeps its material in the KMS and can be reactivated later.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"keyId","description":"Key ID","required":true,"schema":{"type":"string","format":"uuid"}},{"in":"path","name":"okmsId","description":"Okms ID","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/okms.serviceKey.Update"},"examples":{"Activate":{"value":{"state":"ACTIVE"}},"Deactivate":{"value":{"deactivationReason":"UNSPECIFIED","state":"DEACTIVATED"}},"Deactivate (compromise)":{"value":{"deactivationReason":"KEY_COMPROMISE","state":"COMPROMISED"}},"Make the key extractable":{"value":{"extractable":true}},"Update name":{"value":{"name":"key name"}}}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/okms.serviceKey.Response"},"examples":{"Simple example":{"value":{"alwaysSensitive":true,"class":"SECRET_KEY","consumerCount":0,"createdAt":"2024-10-10T15:20:23.337051+01:00","extractable":false,"id":"53b7b57c-fff7-45c3-8267-c32cd060577b","name":"encryption-key","neverExtractable":true,"operations":["encrypt","decrypt"],"protectionLevel":"SOFTWARE","sensitive":true,"size":256,"state":"ACTIVE","type":"oct"}}}}}},"400":{"description":"Error 400 response","content":{"application/json":{"schema":{"type":"object","description":"Common error model","properties":{"class":{"type":"string","description":"Class of the error"},"message":{"type":"string","description":"Error message"}}},"examples":{"Client::BadRequest::OKMSExpired":{"value":{"class":"Client::BadRequest::OKMSExpired","message":"This service is expired"}},"Client::BadRequest::ServiceKeyDeactivationReasonIncompatible":{"value":{"class":"Client::BadRequest::ServiceKeyDeactivationReasonIncompatible","message":"Parameter 'deactivationReason' is forbidden unless 'state' is COMPROMISED or DEACTIVATED"}},"Client::BadRequest::ServiceKeyDeactivationReasonIncompatibleReason":{"value":{"class":"Client::BadRequest::ServiceKeyDeactivationReasonIncompatibleReason","message":"Invalid combination of parameters 'state' and 'deactivationReason'"}},"Client::BadRequest::ServiceKeyDeactivationReasonRequired":{"value":{"class":"Client::BadRequest::ServiceKeyDeactivationReasonRequired","message":"Parameter 'deactivationReason' is required for 'state' COMPROMISED or DEACTIVATED"}},"Client::BadRequest::ServiceKeyNameInvalidCharacter":{"value":{"class":"Client::BadRequest::ServiceKeyNameInvalidCharacter","message":"Invalid parameter 'name', expected only ASCII characters"}},"Client::BadRequest::ServiceKeyNameMaxExceeded":{"value":{"class":"Client::BadRequest::ServiceKeyNameMaxExceeded","message":"Invalid parameter 'name', it should not exceed '{{.paramValue}}' characters"}},"Client::BadRequest::ServiceKeyNameMinRequired":{"value":{"class":"Client::BadRequest::ServiceKeyNameMinRequired","message":"Invalid parameter 'name', it should have at least '{{.paramValue}}' characters"}}}}}}},"tags":["Service Keys"],"x-developer-hub-navigation":[["Manage & operate","Key and Secret Manager","Keys@@@50"]],"x-badges":[{"color":"green","label":"Stable production 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: okms.serviceKey.Update\nresult = client.put(\"/v2/okms/resource/{okmsId}/serviceKey/{keyId}\",\n\tdeactivationReason = None, # Key deactivation reason (type: okms.KeyDeactivationReasonEnum, nullable)\n\textractable = None, # Whether the key material can be extracted from the KMS (type: boolean, nullable)\n\tname = None, # Key Name (type: string, nullable)\n\tstate = None, # Key desired state for activation, deactivation and compromise (specific case of deactivation) (type: okms.KeyStateUpdateEnum, nullable)\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: okms.serviceKey.Update\n$result = $ovh->put(\"/v2/okms/resource/{okmsId}/serviceKey/{keyId}\", array(\n\tdeactivationReason => null, // Key deactivation reason (type: okms.KeyDeactivationReasonEnum, nullable)\n\textractable => null, // Whether the key material can be extracted from the KMS (type: boolean, nullable)\n\tname => null, // Key Name (type: string, nullable)\n\tstate => null, // Key desired state for activation, deactivation and compromise (specific case of deactivation) (type: okms.KeyStateUpdateEnum, nullable)\n));\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"okms:apiovh:serviceKey/update","required":true},{"name":"okms:apiovh:serviceKey/activate","description":"Required when activating the service key","required":false},{"name":"okms:apiovh:serviceKey/deactivate","description":"Required when deactivating the service key","required":false}]}}},"tags":[{"name":"Service Keys","x-tag-expanded":false,"description":"Missing description"}]}
