{"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.SecretStateEnum":{"type":"string","description":"State of the secret version","enum":["ACTIVE","DEACTIVATED","DELETED"]},"okms.secret.Creation":{"type":"object","description":"Create an OKMS secret","properties":{"metadata":{"allOf":[{"$ref":"#/components/schemas/okms.secret.MetadataRequest"}],"description":"Secret metadata","nullable":true},"path":{"type":"string","description":"Secret path"},"version":{"allOf":[{"$ref":"#/components/schemas/okms.secret.version.Creation"}],"description":"Data of the secret version"}},"required":["path","version"]},"okms.secret.GetResponse":{"type":"object","description":"An OKMS secret","properties":{"metadata":{"allOf":[{"$ref":"#/components/schemas/okms.secret.Metadata"}],"description":"Secret metadata","readOnly":true},"path":{"type":"string","description":"Unique identifier of the secret","readOnly":true},"version":{"allOf":[{"$ref":"#/components/schemas/okms.secret.Version"}],"description":"Data of the secret version","nullable":true,"readOnly":true}}},"okms.secret.GetResponseWithIAM":{"type":"object","description":"An OKMS secret","properties":{"iam":{"allOf":[{"$ref":"#/components/schemas/iam.ResourceMetadata"}],"description":"IAM resource metadata","nullable":true,"readOnly":true},"metadata":{"allOf":[{"$ref":"#/components/schemas/okms.secret.Metadata"}],"description":"Secret metadata","readOnly":true},"path":{"type":"string","description":"Unique identifier of the secret","readOnly":true},"version":{"allOf":[{"$ref":"#/components/schemas/okms.secret.Version"}],"description":"Data of the secret version","nullable":true,"readOnly":true}}},"okms.secret.Metadata":{"type":"object","description":"Secret metadata","properties":{"casRequired":{"type":"boolean","description":"If set to true, the `Cas` (Check And Set) parameter will be required and verified for each secret update. If set to false, OKMS domain configuration is applied.","nullable":true,"readOnly":true},"createdAt":{"type":"string","description":"Time of creation of the secret","format":"date-time","readOnly":true},"currentVersion":{"type":"integer","description":"The secret version","nullable":true,"readOnly":true},"customMetadata":{"type":"object","description":"Your own name-value pairs stored alongside the secret to describe or classify it. They are held separately from the secret value.","nullable":true,"additionalProperties":{"type":"string"},"readOnly":true},"deactivateVersionAfter":{"type":"string","description":"Time duration before a version is deactivated. If 0s, OKMS domain configuration is applied.","nullable":true,"readOnly":true},"maxVersions":{"type":"integer","description":"The number of versions to keep. If 0, OKMS domain configuration is applied.","nullable":true,"readOnly":true},"oldestVersion":{"type":"integer","description":"The secret oldest version","readOnly":true},"updatedAt":{"type":"string","description":"Time of the last update of the secret","nullable":true,"format":"date-time","readOnly":true}}},"okms.secret.MetadataRequest":{"type":"object","description":"Create a secret metadata","properties":{"casRequired":{"type":"boolean","description":"If set to true, the `Cas` (Check And Set) parameter will be required and verified for each secret update. If set to false, OKMS domain configuration is applied.","nullable":true},"customMetadata":{"type":"object","description":"Your own name-value pairs stored alongside the secret to describe or classify it. They are held separately from the secret value.","nullable":true,"additionalProperties":{"type":"string"}},"deactivateVersionAfter":{"type":"string","description":"Time duration before a version is deactivated. If 0s, OKMS domain configuration is applied.","nullable":true},"maxVersions":{"type":"integer","description":"The number of versions to keep. If 0, OKMS domain configuration is applied.","nullable":true}}},"okms.secret.PostResponse":{"type":"object","description":"An OKMS secret","properties":{"metadata":{"allOf":[{"$ref":"#/components/schemas/okms.secret.Metadata"}],"description":"Secret metadata","readOnly":true},"path":{"type":"string","description":"Secret identifier","readOnly":true}}},"okms.secret.UpdateRequest":{"type":"object","description":"Update an OKMS secret","properties":{"metadata":{"allOf":[{"$ref":"#/components/schemas/okms.secret.MetadataRequest"}],"description":"Secret metadata","nullable":true},"version":{"allOf":[{"$ref":"#/components/schemas/okms.secret.version.Creation"}],"description":"Secret version","nullable":true}}},"okms.secret.Version":{"type":"object","description":"An OKMS secret version","properties":{"createdAt":{"type":"string","description":"Time of creation of the secret version","format":"date-time","readOnly":true},"data":{"allOf":[{"$ref":"#/components/schemas/any"}],"description":"Secret version data","nullable":true,"readOnly":true},"deactivatedAt":{"type":"string","description":"Time of deactivation of the secret version","nullable":true,"format":"date-time","readOnly":true},"id":{"type":"integer","description":"Secret version","readOnly":true},"state":{"allOf":[{"$ref":"#/components/schemas/okms.SecretStateEnum"}],"description":"State of the secret version","readOnly":true}}},"okms.secret.version.Creation":{"type":"object","description":"Create an OKMS secret version","properties":{"data":{"allOf":[{"$ref":"#/components/schemas/any"}],"description":"Secret version data in key value json format"}},"required":["data"]},"okms.secret.version.UpdateRequest":{"type":"object","description":"Update an OKMS secret","properties":{"state":{"allOf":[{"$ref":"#/components/schemas/okms.SecretStateEnum"}],"description":"State of the secret version"}},"required":["state"]},"okms.secret.version.UpdateResponse":{"type":"object","description":"An OKMS secret version","properties":{"createdAt":{"type":"string","description":"Time of creation of the secret version","format":"date-time","readOnly":true},"deactivatedAt":{"type":"string","description":"Time of deactivation of the secret version","nullable":true,"format":"date-time","readOnly":true},"id":{"type":"integer","description":"Secret version","readOnly":true},"state":{"allOf":[{"$ref":"#/components/schemas/okms.SecretStateEnum"}],"description":"State of the secret version","readOnly":true}}},"okms.secretConfig.Response":{"type":"object","description":"Secrets configuration settings","properties":{"casRequired":{"type":"boolean","description":"If set to true, the `Cas` (Check And Set) parameter will be required and verified for each secret update","readOnly":true},"deactivateVersionAfter":{"type":"string","description":"Time duration before a version is deactivated. If 0s, default configuration (unlimited) is applied.","readOnly":true},"maxVersions":{"type":"integer","description":"The number of versions to keep. If 0, default configuration (10) is applied.","readOnly":true}}},"okms.secretConfig.UpdateRequest":{"type":"object","description":"Secrets configuration settings","properties":{"casRequired":{"type":"boolean","description":"If set to true, the `Cas` (Check And Set) parameter will be required and verified for each secret update","nullable":true},"deactivateVersionAfter":{"type":"string","description":"Time duration before a version is deactivated. If 0s, default configuration (unlimited) is applied.","nullable":true},"maxVersions":{"type":"integer","description":"The number of versions to keep. If 0, default configuration (10) is applied.","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}/secret":{"get":{"operationId":"getAllOkmsSecrets","summary":"List secrets","description":"Lists secret paths with metadata (versions, CAS settings). The content of secret versions is not accessible through this API.","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.secret.GetResponseWithIAM"}},"examples":{"Simple example":{"value":[{"metadata":{"casRequired":false,"createdAt":"2025-01-02T15:04:05+02:00","currentVersion":3,"customMetadata":{"bar":"123","foo":"abc"},"deactivateVersionAfter":"10h30m10s","maxVersions":10,"oldestVersion":1,"updatedAt":"2025-01-02T15:04:06+02:00"},"path":"foo/bar","version":{"createdAt":"2025-01-02T15:04:05+02:00","id":3,"state":"ACTIVE"}},{"metadata":{"casRequired":false,"createdAt":"2025-01-02T15:04:05+02:00","currentVersion":2,"customMetadata":{"baz":"456","qux":"efg"},"deactivateVersionAfter":"10h30m10s","maxVersions":3,"oldestVersion":1,"updatedAt":"2025-01-03T15:05:05+02:00"},"path":"baz/qux/quux","version":{"createdAt":"2025-01-03T15:05:05+02:00","id":2,"state":"ACTIVE"}}]}}}}},"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":["Secrets"],"x-developer-hub-navigation":[["Manage & operate","Key and Secret Manager","Secrets@@@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}/secret\")\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}/secret\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"okms:apiovh:secret/get","required":true}],"x-expanded-response":"OkmsSecretGetResponseWithIAM"},"post":{"operationId":"createOkmsSecret","summary":"Create a secret","description":"Creates a secret at the given path and stores the first version.\nPath and engine defaults (CAS, max versions) apply from the service secret config unless overridden in the body.","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.secret.Creation"},"examples":{"Sample payload":{"value":{"metadata":{"casRequired":false,"customMetadata":{"bar":"123","foo":"abc"},"deactivateVersionAfter":"10h30m10s","maxVersions":5},"path":"foo/bar","version":{"data":{"foo":"bar","zip":"zap"}}}}}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/okms.secret.PostResponse"},"examples":{"Simple example":{"value":{"metadata":{"casRequired":false,"createdAt":"2025-01-02T15:04:05+02:00","currentVersion":1,"customMetadata":{"bar":"123","foo":"abc"},"deactivateVersionAfter":"10h30m10s","maxVersions":5,"oldestVersion":1,"updatedAt":"2025-01-02T15:05:05+02:00"},"path":"foo/bar"}}}}}},"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::SecretCasMaxExceeded":{"value":{"class":"Client::BadRequest::SecretCasMaxExceeded","message":"Invalid 'cas' parameter, maximum value is '{{.paramValue}}'"}},"Client::BadRequest::SecretCasMinRequired":{"value":{"class":"Client::BadRequest::SecretCasMinRequired","message":"Invalid 'cas' parameter, minimum value is '{{.paramValue}}'"}},"Client::BadRequest::SecretCustomMetadataKeyInvalidCharacter":{"value":{"class":"Client::BadRequest::SecretCustomMetadataKeyInvalidCharacter","message":"Invalid chacater in parameter 'customMetadata'. Valid characters include A-Z, a-z, 0-9, '.', '_', ':', '/', '=', '@', '%', and '-'"}},"Client::BadRequest::SecretCustomMetadataKeyMaxExceeded":{"value":{"class":"Client::BadRequest::SecretCustomMetadataKeyMaxExceeded","message":"Invalid parameter 'customMetadata', key length should not exceed 128 characters and value length should not exceed 512 characters"}},"Client::BadRequest::SecretCustomMetadataKeyMinRequired":{"value":{"class":"Client::BadRequest::SecretCustomMetadataKeyMinRequired","message":"Invalid parameter 'customMetadata', key or value should not be empty"}},"Client::BadRequest::SecretCustomMetadataMaxExceeded":{"value":{"class":"Client::BadRequest::SecretCustomMetadataMaxExceeded","message":"Invalid parameter 'customMetadata', it should not contain more than '{{.paramValue}}' elements"}},"Client::BadRequest::SecretDataInvalidKeyValueJson":{"value":{"class":"Client::BadRequest::SecretDataInvalidKeyValueJson","message":"Invalid 'data' parameter, value should be in JSON key value format"}},"Client::BadRequest::SecretDataMaxExceeded":{"value":{"class":"Client::BadRequest::SecretDataMaxExceeded","message":"Invalid 'data' parameter, maximum data size is '{{.paramValue}}' bytes"}},"Client::BadRequest::SecretDeactivateVersionAfterInvalidDuration":{"value":{"class":"Client::BadRequest::SecretDeactivateVersionAfterInvalidDuration","message":"Invalid parameter 'deactivateVersionAfter'. Valid time units are 'ns', 'us' (or 'µs'), 'ms', 's', 'm', 'h' and 'd'"}},"Client::BadRequest::SecretMaxVersionsMaxExceeded":{"value":{"class":"Client::BadRequest::SecretMaxVersionsMaxExceeded","message":"Invalid parameter 'maxVersions', maximum value is '{{.paramValue}}'"}},"Client::BadRequest::SecretMaxVersionsMinRequired":{"value":{"class":"Client::BadRequest::SecretMaxVersionsMinRequired","message":"Invalid parameter 'maxVersions', minimum value is '{{.paramValue}}'"}},"Client::BadRequest::SecretPathInvalidCharacter":{"value":{"class":"Client::BadRequest::SecretPathInvalidCharacter","message":"Invalid parameter 'path'. Valid characters include A-Z, a-z, 0-9, '.', '_', ':', '/', '=', '@', and '-'. It should not start or end with '/'"}},"Client::BadRequest::SecretPathMaxExceeded":{"value":{"class":"Client::BadRequest::SecretPathMaxExceeded","message":"Invalid parameter 'path', it should not exceed 255 characters"}}}}}}},"tags":["Secrets"],"x-developer-hub-navigation":[["Manage & operate","Key and Secret Manager","Secrets@@@60"]],"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.secret.Creation\nresult = client.post(\"/v2/okms/resource/{okmsId}/secret\",\n\tmetadata = None, # Secret metadata (type: okms.secret.MetadataRequest, nullable)\n\tpath = None, # Secret path (type: string)\n\tversion = None, # Data of the secret version (type: okms.secret.version.Creation)\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.secret.Creation\n$result = $ovh->post(\"/v2/okms/resource/{okmsId}/secret\", array(\n\tmetadata => null, // Secret metadata (type: okms.secret.MetadataRequest, nullable)\n\tpath => null, // Secret path (type: string)\n\tversion => null, // Data of the secret version (type: okms.secret.version.Creation)\n));\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"okms:apiovh:secret/create","required":true}]}},"/okms/resource/{okmsId}/secret/{path}":{"delete":{"operationId":"deleteOkmsSecret","summary":"Delete a secret","description":"Deletes the secret and all its versions.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"okmsId","description":"Okms ID","required":true,"schema":{"type":"string","format":"uuid"}},{"in":"path","name":"path","description":"Path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation"}},"tags":["Secrets"],"x-developer-hub-navigation":[["Manage & operate","Key and Secret Manager","Secrets@@@80"]],"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}/secret/{path}\")\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}/secret/{path}\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"okms:apiovh:secret/delete","required":true}]},"get":{"operationId":"getOkmsSecret","summary":"Get a secret","description":"Returns a secret's metadata. By default the latest version is selected. Pass `version` to target another one.\n\nSet `includeData=true` to also return that version's data (requires the matching IAM action).","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"query","name":"includeData","description":"Secret data","schema":{"type":"boolean"}},{"in":"path","name":"okmsId","description":"Okms ID","required":true,"schema":{"type":"string","format":"uuid"}},{"in":"path","name":"path","description":"Path","required":true,"schema":{"type":"string"}},{"in":"query","name":"version","description":"Secret version. When omitted, the latest version will be returned.","schema":{"type":"integer"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/okms.secret.GetResponseWithIAM"},"examples":{"Secret example":{"value":{"metadata":{"casRequired":false,"createdAt":"2025-01-02T15:04:05+02:00","currentVersion":3,"customMetadata":{"bar":"123","foo":"abc"},"deactivateVersionAfter":"10h30m10s","maxVersions":5,"oldestVersion":1,"updatedAt":"2025-01-02T15:04:05+02:00"},"path":"foo/bar","version":{"createdAt":"2025-01-02T15:04:05+02:00","data":{"foo":"bar"},"id":1,"state":"ACTIVE"}}}}}}},"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::SecretPathInvalidCharacter":{"value":{"class":"Client::BadRequest::SecretPathInvalidCharacter","message":"Invalid parameter 'path'. Valid characters include A-Z, a-z, 0-9, '.', '_', ':', '/', '=', '@', and '-'. It should not start or end with '/'"}},"Client::BadRequest::SecretPathMaxExceeded":{"value":{"class":"Client::BadRequest::SecretPathMaxExceeded","message":"Invalid parameter 'path', it should not exceed 255 characters"}},"Client::BadRequest::SecretVersionMaxExceeded":{"value":{"class":"Client::BadRequest::SecretVersionMaxExceeded","message":"Invalid parameter 'version', maximum value is '{{.paramValue}}'"}},"Client::BadRequest::SecretVersionMinRequired":{"value":{"class":"Client::BadRequest::SecretVersionMinRequired","message":"Invalid parameter 'version', minimum value is '{{.paramValue}}'"}}}}}}},"tags":["Secrets"],"x-developer-hub-navigation":[["Manage & operate","Key and Secret Manager","Secrets@@@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\nresult = client.get(\"/v2/okms/resource/{okmsId}/secret/{path}\")\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}/secret/{path}\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"okms:apiovh:secret/get","required":true},{"name":"okms:apiovh:secret/version/getData","description":"Required to get version data","required":false}]},"put":{"operationId":"editOkmsSecret","summary":"Update a secret","description":"Updates the secret: include `version.data` to add a new version, and/or `metadata` to change this secret's engine settings.\nWhen `cas` is set, it must equal the current version for the write to succeed.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"query","name":"cas","description":"Current secret version number. When the `cas` (Check and set) is specified, the current version of the secret is verified before updating it. In order for a write to be successful,`cas` must be set to the current version of the secret.","schema":{"type":"integer"}},{"in":"path","name":"okmsId","description":"Okms ID","required":true,"schema":{"type":"string","format":"uuid"}},{"in":"path","name":"path","description":"Path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/okms.secret.UpdateRequest"},"examples":{"Update metadata":{"value":{"metadata":{"casRequired":false,"customMetadata":{"bar":"123","foo":"abc"},"deactivateVersionAfter":"10h30m10s","maxVersions":5}}},"Update version data":{"value":{"version":{"data":{"bar":"b","foo":"a"}}}}}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/okms.secret.PostResponse"},"examples":{"Simple example":{"value":{"metadata":{"casRequired":false,"createdAt":"2025-01-02T15:04:05+02:00","currentVersion":3,"customMetadata":{"bar":"123","foo":"abc"},"deactivateVersionAfter":"10h30m10s","maxVersions":5,"oldestVersion":1,"updatedAt":"2025-01-02T15:04:06+02:00"},"path":"foo/bar"}}}}}},"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::SecretCasMaxExceeded":{"value":{"class":"Client::BadRequest::SecretCasMaxExceeded","message":"Invalid 'cas' parameter, maximum value is '{{.paramValue}}'"}},"Client::BadRequest::SecretCasMinRequired":{"value":{"class":"Client::BadRequest::SecretCasMinRequired","message":"Invalid 'cas' parameter, minimum value is '{{.paramValue}}'"}},"Client::BadRequest::SecretCustomMetadataKeyInvalidCharacter":{"value":{"class":"Client::BadRequest::SecretCustomMetadataKeyInvalidCharacter","message":"Invalid chacater in parameter 'customMetadata'. Valid characters include A-Z, a-z, 0-9, '.', '_', ':', '/', '=', '@', '%', and '-'"}},"Client::BadRequest::SecretCustomMetadataKeyMaxExceeded":{"value":{"class":"Client::BadRequest::SecretCustomMetadataKeyMaxExceeded","message":"Invalid parameter 'customMetadata', key length should not exceed 128 characters and value length should not exceed 512 characters"}},"Client::BadRequest::SecretCustomMetadataKeyMinRequired":{"value":{"class":"Client::BadRequest::SecretCustomMetadataKeyMinRequired","message":"Invalid parameter 'customMetadata', key or value should not be empty"}},"Client::BadRequest::SecretCustomMetadataMaxExceeded":{"value":{"class":"Client::BadRequest::SecretCustomMetadataMaxExceeded","message":"Invalid parameter 'customMetadata', it should not contain more than '{{.paramValue}}' elements"}},"Client::BadRequest::SecretDataInvalidKeyValueJson":{"value":{"class":"Client::BadRequest::SecretDataInvalidKeyValueJson","message":"Invalid 'data' parameter, value should be in JSON key value format"}},"Client::BadRequest::SecretDataMaxExceeded":{"value":{"class":"Client::BadRequest::SecretDataMaxExceeded","message":"Invalid 'data' parameter, maximum data size is '{{.paramValue}}' bytes"}},"Client::BadRequest::SecretDeactivateVersionAfterInvalidDuration":{"value":{"class":"Client::BadRequest::SecretDeactivateVersionAfterInvalidDuration","message":"Invalid parameter 'deactivateVersionAfter'. Valid time units are 'ns', 'us' (or 'µs'), 'ms', 's', 'm', 'h' and 'd'"}},"Client::BadRequest::SecretFieldRequired":{"value":{"class":"Client::BadRequest::SecretFieldRequired","message":"At least one field is required"}},"Client::BadRequest::SecretMaxVersionsMaxExceeded":{"value":{"class":"Client::BadRequest::SecretMaxVersionsMaxExceeded","message":"Invalid parameter 'maxVersions', maximum value is '{{.paramValue}}'"}},"Client::BadRequest::SecretMaxVersionsMinRequired":{"value":{"class":"Client::BadRequest::SecretMaxVersionsMinRequired","message":"Invalid parameter 'maxVersions', minimum value is '{{.paramValue}}'"}},"Client::BadRequest::SecretPathInvalidCharacter":{"value":{"class":"Client::BadRequest::SecretPathInvalidCharacter","message":"Invalid parameter 'path'. Valid characters include A-Z, a-z, 0-9, '.', '_', ':', '/', '=', '@', and '-'. It should not start or end with '/'"}},"Client::BadRequest::SecretPathMaxExceeded":{"value":{"class":"Client::BadRequest::SecretPathMaxExceeded","message":"Invalid parameter 'path', it should not exceed 255 characters"}}}}}}},"tags":["Secrets"],"x-developer-hub-navigation":[["Manage & operate","Key and Secret Manager","Secrets@@@90"]],"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.secret.UpdateRequest\nresult = client.put(\"/v2/okms/resource/{okmsId}/secret/{path}\",\n\tmetadata = None, # Secret metadata (type: okms.secret.MetadataRequest, nullable)\n\tversion = None, # Secret version (type: okms.secret.version.Creation, 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.secret.UpdateRequest\n$result = $ovh->put(\"/v2/okms/resource/{okmsId}/secret/{path}\", array(\n\tmetadata => null, // Secret metadata (type: okms.secret.MetadataRequest, nullable)\n\tversion => null, // Secret version (type: okms.secret.version.Creation, nullable)\n));\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"okms:apiovh:secret/edit","required":true},{"name":"okms:apiovh:secret/version/create","description":"Required to update secret data","required":false},{"name":"okms:apiovh:secret/updateMetadata","description":"Required to update secret metadata","required":false}]}},"/okms/resource/{okmsId}/secret/{path}/version":{"get":{"operationId":"getAllOkmsSecretVersions","summary":"List secret versions","description":"Lists version numbers and states for the secret. Version data is not returned by this API.","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":"path","name":"okmsId","description":"Okms ID","required":true,"schema":{"type":"string","format":"uuid"}},{"in":"path","name":"path","description":"Path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/okms.secret.Version"}},"examples":{"Secret example":{"value":[{"createdAt":"2025-01-02T15:04:05+02:00","deactivatedAt":"2025-01-03T15:04:05+02:00","id":1,"state":"DEACTIVATED"},{"createdAt":"2025-01-02T15:04:05+02:00","id":2,"state":"ACTIVE"}]}}}}},"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::SecretPathInvalidCharacter":{"value":{"class":"Client::BadRequest::SecretPathInvalidCharacter","message":"Invalid parameter 'path'. Valid characters include A-Z, a-z, 0-9, '.', '_', ':', '/', '=', '@', and '-'. It should not start or end with '/'"}},"Client::BadRequest::SecretPathMaxExceeded":{"value":{"class":"Client::BadRequest::SecretPathMaxExceeded","message":"Invalid parameter 'path', it should not exceed 255 characters"}}}}}}},"tags":["Secrets"],"x-developer-hub-navigation":[["Manage & operate","Key and Secret Manager","Secrets@@@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}/secret/{path}/version\")\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}/secret/{path}/version\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"okms:apiovh:secret/get","required":true}],"x-response-identifier":"id","x-expanded-response":"OkmsSecretVersion"},"post":{"operationId":"createOkmsSecretVersion","summary":"Create a secret version","description":"Appends a new version of the secret data. Optional `cas` must match the current version or the write is rejected.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"query","name":"cas","description":"Current secret version number. When the `cas` (Check and set) is specified, the current version of the secret is verified before updating it. In order for a write to be successful,`cas` must be set to the current version of the secret.","schema":{"type":"integer"}},{"in":"path","name":"okmsId","description":"Okms ID","required":true,"schema":{"type":"string","format":"uuid"}},{"in":"path","name":"path","description":"Path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/okms.secret.version.Creation"},"examples":{"Sample payload":{"value":{"data":{"foo":"bar"}}}}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/okms.secret.Version"},"examples":{"Simple example":{"value":{"createdAt":"2025-01-02T15:04:05+02:00","id":2,"state":"ACTIVE"}}}}}},"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::SecretCasMaxExceeded":{"value":{"class":"Client::BadRequest::SecretCasMaxExceeded","message":"Invalid 'cas' parameter, maximum value is '{{.paramValue}}'"}},"Client::BadRequest::SecretCasMinRequired":{"value":{"class":"Client::BadRequest::SecretCasMinRequired","message":"Invalid 'cas' parameter, minimum value is '{{.paramValue}}'"}},"Client::BadRequest::SecretDataInvalidKeyValueJson":{"value":{"class":"Client::BadRequest::SecretDataInvalidKeyValueJson","message":"Invalid 'data' parameter, value should be in JSON key value format"}},"Client::BadRequest::SecretDataMaxExceeded":{"value":{"class":"Client::BadRequest::SecretDataMaxExceeded","message":"Invalid 'data' parameter, maximum data size is '{{.paramValue}}' bytes"}},"Client::BadRequest::SecretPathInvalidCharacter":{"value":{"class":"Client::BadRequest::SecretPathInvalidCharacter","message":"Invalid parameter 'path'. Valid characters include A-Z, a-z, 0-9, '.', '_', ':', '/', '=', '@', and '-'. It should not start or end with '/'"}},"Client::BadRequest::SecretPathMaxExceeded":{"value":{"class":"Client::BadRequest::SecretPathMaxExceeded","message":"Invalid parameter 'path', it should not exceed 255 characters"}}}}}}},"tags":["Secrets"],"x-developer-hub-navigation":[["Manage & operate","Key and Secret Manager","Secrets@@@70"]],"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.secret.version.Creation\nresult = client.post(\"/v2/okms/resource/{okmsId}/secret/{path}/version\",\n\tdata = None, # Secret version data in key value json format (type: any)\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.secret.version.Creation\n$result = $ovh->post(\"/v2/okms/resource/{okmsId}/secret/{path}/version\", array(\n\tdata => null, // Secret version data in key value json format (type: any)\n));\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"okms:apiovh:secret/version/create","required":true}]}},"/okms/resource/{okmsId}/secret/{path}/version/{version}":{"get":{"operationId":"getOkmsSecretVersion","summary":"Get a secret version","description":"Returns one version's metadata. Set `includeData=true` to also return the version data.\n\nReading the data requires a specific IAM right.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"query","name":"includeData","description":"Secret version data","schema":{"type":"boolean"}},{"in":"path","name":"okmsId","description":"Okms ID","required":true,"schema":{"type":"string","format":"uuid"}},{"in":"path","name":"path","description":"Path","required":true,"schema":{"type":"string"}},{"in":"path","name":"version","description":"Version","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/okms.secret.Version"},"examples":{"Secret example":{"value":{"createdAt":"2025-01-02T15:04:05+02:00","data":{"foo":"bar"},"id":1,"state":"ACTIVE"}}}}}},"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::SecretPathInvalidCharacter":{"value":{"class":"Client::BadRequest::SecretPathInvalidCharacter","message":"Invalid parameter 'path'. Valid characters include A-Z, a-z, 0-9, '.', '_', ':', '/', '=', '@', and '-'. It should not start or end with '/'"}},"Client::BadRequest::SecretPathMaxExceeded":{"value":{"class":"Client::BadRequest::SecretPathMaxExceeded","message":"Invalid parameter 'path', it should not exceed 255 characters"}},"Client::BadRequest::SecretVersionMaxExceeded":{"value":{"class":"Client::BadRequest::SecretVersionMaxExceeded","message":"Invalid parameter 'version', maximum value is '{{.paramValue}}'"}},"Client::BadRequest::SecretVersionMinRequired":{"value":{"class":"Client::BadRequest::SecretVersionMinRequired","message":"Invalid parameter 'version', minimum value is '{{.paramValue}}'"}}}}}}},"tags":["Secrets"],"x-developer-hub-navigation":[["Manage & operate","Key and Secret Manager","Secrets@@@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.get(\"/v2/okms/resource/{okmsId}/secret/{path}/version/{version}\")\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}/secret/{path}/version/{version}\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"okms:apiovh:secret/get","required":true},{"name":"okms:apiovh:secret/version/getData","description":"Required to get version data","required":false}],"x-response-identifier":"id"},"put":{"operationId":"editOkmsSecretVersion","summary":"Update the state of a secret version","description":"Changes the version state: activate, deactivate, or delete.\n\nTo modify the secret data, create a new version.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"okmsId","description":"Okms ID","required":true,"schema":{"type":"string","format":"uuid"}},{"in":"path","name":"path","description":"Path","required":true,"schema":{"type":"string"}},{"in":"path","name":"version","description":"Version","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/okms.secret.version.UpdateRequest"},"examples":{"Activate a secret version":{"value":{"state":"ACTIVE"}},"Deactivate a secret version":{"value":{"state":"DEACTIVATED"}},"Delete a secret version":{"value":{"state":"DELETED"}}}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/okms.secret.version.UpdateResponse"},"examples":{"Secret example":{"value":{"createdAt":"2025-01-02T15:04:05+02:00","deactivatedAt":"2025-01-02T15:05:05+02:00","id":1,"state":"DEACTIVATED"}}}}}},"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::SecretPathInvalidCharacter":{"value":{"class":"Client::BadRequest::SecretPathInvalidCharacter","message":"Invalid parameter 'path'. Valid characters include A-Z, a-z, 0-9, '.', '_', ':', '/', '=', '@', and '-'. It should not start or end with '/'"}},"Client::BadRequest::SecretPathMaxExceeded":{"value":{"class":"Client::BadRequest::SecretPathMaxExceeded","message":"Invalid parameter 'path', it should not exceed 255 characters"}},"Client::BadRequest::SecretVersionMaxExceeded":{"value":{"class":"Client::BadRequest::SecretVersionMaxExceeded","message":"Invalid parameter 'version', maximum value is '{{.paramValue}}'"}},"Client::BadRequest::SecretVersionMinRequired":{"value":{"class":"Client::BadRequest::SecretVersionMinRequired","message":"Invalid parameter 'version', minimum value is '{{.paramValue}}'"}}}}}}},"tags":["Secrets"],"x-developer-hub-navigation":[["Manage & operate","Key and Secret Manager","Secrets@@@100"]],"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.secret.version.UpdateRequest\nresult = client.put(\"/v2/okms/resource/{okmsId}/secret/{path}/version/{version}\",\n\tstate = None, # State of the secret version (type: okms.SecretStateEnum)\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.secret.version.UpdateRequest\n$result = $ovh->put(\"/v2/okms/resource/{okmsId}/secret/{path}/version/{version}\", array(\n\tstate => null, // State of the secret version (type: okms.SecretStateEnum)\n));\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"okms:apiovh:secret/version/edit","description":"Required to delete/deactivate/activate a secret version","required":true},{"name":"okms:apiovh:secret/version/delete","description":"Required to delete a secret version","required":false},{"name":"okms:apiovh:secret/version/activate","description":"Required to activate a secret version","required":false},{"name":"okms:apiovh:secret/version/deactivate","description":"Required to deactivate a secret version","required":false}]}},"/okms/resource/{okmsId}/secretConfig":{"get":{"operationId":"getOkmsSecretConfig","summary":"Get the secret configuration","description":"Returns the service-level defaults applied to new secrets: `casRequired`, `maxVersions` and `deactivateVersionAfter`.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"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.secretConfig.Response"},"examples":{"Secret configuration example":{"value":{"casRequired":true,"deactivateVersionAfter":"10h30m10s","maxVersions":3}}}}}},"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":["Secrets"],"x-developer-hub-navigation":[["Manage & operate","Key and Secret Manager","Secrets@@@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\nresult = client.get(\"/v2/okms/resource/{okmsId}/secretConfig\")\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}/secretConfig\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"okms:apiovh:secretConfig/get","required":true}]},"put":{"operationId":"editOkmsSecretConfig","summary":"Update the secret configuration","description":"Updates the service-level defaults applied to new secrets.\nExisting secrets keep the metadata they were created with.","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.secretConfig.UpdateRequest"},"examples":{"Update secrets config":{"value":{"casRequired":true,"deactivateVersionAfter":"10h30m10s","maxVersions":3}}}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/okms.secretConfig.Response"},"examples":{"Secret example":{"value":{"casRequired":true,"deactivateVersionAfter":"10h30m10s","maxVersions":3}}}}}},"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::SecretDeactivateVersionAfterInvalidDuration":{"value":{"class":"Client::BadRequest::SecretDeactivateVersionAfterInvalidDuration","message":"Invalid parameter 'deactivateVersionAfter'. Valid time units are 'ns', 'us' (or 'µs'), 'ms', 's', 'm', 'h' and 'd'"}},"Client::BadRequest::SecretFieldRequired":{"value":{"class":"Client::BadRequest::SecretFieldRequired","message":"At least one field is required"}},"Client::BadRequest::SecretMaxVersionsMaxExceeded":{"value":{"class":"Client::BadRequest::SecretMaxVersionsMaxExceeded","message":"Invalid parameter 'maxVersions', maximum value is '{{.paramValue}}'"}},"Client::BadRequest::SecretMaxVersionsMinRequired":{"value":{"class":"Client::BadRequest::SecretMaxVersionsMinRequired","message":"Invalid parameter 'maxVersions', minimum value is '{{.paramValue}}'"}}}}}}},"tags":["Secrets"],"x-developer-hub-navigation":[["Manage & operate","Key and Secret Manager","Secrets@@@110"]],"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.secretConfig.UpdateRequest\nresult = client.put(\"/v2/okms/resource/{okmsId}/secretConfig\",\n\tcasRequired = None, # If set to true, the `Cas` (Check And Set) parameter will be required and verified for each secret update (type: boolean, nullable)\n\tdeactivateVersionAfter = None, # Time duration before a version is deactivated. If 0s, default configuration (unlimited) is applied. (type: string, nullable)\n\tmaxVersions = None, # The number of versions to keep. If 0, default configuration (10) is applied. (type: integer, 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.secretConfig.UpdateRequest\n$result = $ovh->put(\"/v2/okms/resource/{okmsId}/secretConfig\", array(\n\tcasRequired => null, // If set to true, the `Cas` (Check And Set) parameter will be required and verified for each secret update (type: boolean, nullable)\n\tdeactivateVersionAfter => null, // Time duration before a version is deactivated. If 0s, default configuration (unlimited) is applied. (type: string, nullable)\n\tmaxVersions => null, // The number of versions to keep. If 0, default configuration (10) is applied. (type: integer, nullable)\n));\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"okms:apiovh:secretConfig/update","required":true}]}}},"tags":[{"name":"Secrets","x-tag-expanded":false,"description":"Missing description"}]}
