{"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"},"internationalPhoneNumber":{"type":"string","description":"International phone number","format":"phone-number"},"ip":{"type":"string","description":"IP address (e.g., 192.0.2.0)","format":"ipv4","example":"192.0.2.0"},"ipBlock":{"type":"string","description":"IP (v4 or v6) CIDR notation (e.g., 192.0.2.0/24)","format":"ip-block","example":"192.0.2.0/24"},"ipInterface":{"type":"string","description":"IP address (e.g., 192.0.2.0)","format":"ipv4","example":"192.0.2.0"},"ipv4":{"type":"string","description":"IPv4 address (e.g., 192.0.2.0)","format":"ipv4","example":"192.0.2.0"},"ipv4Block":{"type":"string","description":"IPv4 CIDR notation (e.g., 192.0.2.0/24)","format":"ipv4-block","example":"192.0.2.0/24"},"ipv6":{"type":"string","description":"IPv6 address (e.g., 2001:41d0:1:1994::1)","format":"ipv6","example":"2001:41d0:1:1994::1"},"ipv6Block":{"type":"string","description":"IPv6 CIDR notation (e.g., 2001:41d0::/128)","format":"ipv6-block","example":"2001:41d0::/128"},"macAddress":{"type":"string","description":"MAC address (e.g., 00:00:5e:00:53:01)","format":"mac-address","example":"00:00:5e:00:53:01"},"phoneNumber":{"type":"string","description":"Phone number","format":"phone-number"},"publicCloud.database.UserStatusEnum":{"type":"string","description":"Readiness status of a managed database user","enum":["CREATING","DELETING","ERROR","READY","UPDATING"]},"publicCloud.database.valkey.User":{"type":"object","description":"A user account on a managed Valkey service","properties":{"admin":{"type":"boolean","description":"Whether this is the service administrator, the user created automatically at provisioning time, which cannot be deleted","readOnly":true},"categories":{"type":"array","description":"Command category rules granted to the user, each written as a category name prefixed with `+@` when it is allowed or `-@` when it is denied, for example `+@read`, `-@dangerous`","items":{"type":"string"},"readOnly":true},"channels":{"type":"array","description":"Glob patterns of the Pub/Sub channels the user can subscribe to and publish on, for example `news:*`, `chat:room1`. `*` means every channel, and an empty list means the user cannot use any channel.","items":{"type":"string"},"readOnly":true},"checksum":{"type":"string","description":"Hash of the resource used for concurrency control","readOnly":true},"commands":{"type":"array","description":"Individual command rules refining the permissions granted through the categories, each written as a Valkey command name prefixed with `+` when it is allowed or `-` when it is denied, for example `+get`, `-flushall`","items":{"type":"string"},"readOnly":true},"createdAt":{"type":"string","description":"Date at which the user was created","format":"date-time","readOnly":true},"credentialsLastUpdatedAt":{"type":"string","description":"Date at which the user credentials were last updated","format":"date-time","readOnly":true},"id":{"type":"string","description":"Unique identifier of the user","format":"uuid","readOnly":true},"keys":{"type":"array","description":"Glob patterns of the keys the user can access, for example `cache:*`, `session:user:42`. `*` means every key, and an empty list means the user cannot access any key.","items":{"type":"string"},"readOnly":true},"password":{"type":"string","description":"Password of the user. Returned only on creation or password reset.","nullable":true,"format":"password","readOnly":true},"status":{"allOf":[{"$ref":"#/components/schemas/publicCloud.database.UserStatusEnum"}],"description":"Current readiness status of the user","readOnly":true},"username":{"type":"string","description":"Login name of the user","readOnly":true}}},"publicCloud.database.valkey.UserCreation":{"type":"object","description":"Input parameters for creating a user on a managed Valkey service","properties":{"categories":{"type":"array","description":"Command category rules granted to the user, each written as a category name prefixed with `+@` to allow it or `-@` to deny it, for example `+@read`, `-@dangerous`. Available categories are all, admin, bitmap, blocking, connection, dangerous, fast, geo, hash, hyperloglog, keyspace, list, pubsub, read, scripting, set, slow, sortedset, stream, string, transaction and write.","items":{"type":"string"}},"channels":{"type":"array","description":"Glob patterns of the Pub/Sub channels the user can subscribe to and publish on, for example `news:*`, `chat:room1`. Use `*` to allow every channel. When the list is empty, the user cannot use any channel.","items":{"type":"string"}},"commands":{"type":"array","description":"Individual command rules that refine the permissions granted through the categories, each written as a Valkey command name in lowercase prefixed with `+` to allow it or `-` to deny it, for example `+get`, `-flushall`","items":{"type":"string"}},"keys":{"type":"array","description":"Glob patterns of the keys the user can access, for example `cache:*`, `session:user:42`. Use `*` to allow every key. When the list is empty, the user cannot access any key.","items":{"type":"string"}},"name":{"type":"string","description":"Login name of the new user, unique on the service. It must be 1 to 32 characters long, start with a letter, a digit or an underscore, and contain only letters, digits, underscores, dots and hyphens."}},"required":["name"]},"publicCloud.database.valkey.UserReplace":{"type":"object","description":"Input parameters for replacing a Valkey user. Every field is required: the request describes the whole user.","properties":{"categories":{"type":"array","description":"Command category rules granted to the user, each written as a category name prefixed with `+@` to allow it or `-@` to deny it, for example `+@read`, `-@dangerous`. Available categories are all, admin, bitmap, blocking, connection, dangerous, fast, geo, hash, hyperloglog, keyspace, list, pubsub, read, scripting, set, slow, sortedset, stream, string, transaction and write. The list replaces the one currently set on the user.","items":{"type":"string"}},"channels":{"type":"array","description":"Glob patterns of the Pub/Sub channels the user can subscribe to and publish on, for example `news:*`, `chat:room1`. Use `*` to allow every channel. The list replaces the one currently set on the user, and an empty list revokes access to every channel.","items":{"type":"string"}},"commands":{"type":"array","description":"Individual command rules that refine the permissions granted through the categories, each written as a Valkey command name in lowercase prefixed with `+` to allow it or `-` to deny it, for example `+get`, `-flushall`. The list replaces the one currently set on the user.","items":{"type":"string"}},"keys":{"type":"array","description":"Glob patterns of the keys the user can access, for example `cache:*`, `session:user:42`. Use `*` to allow every key. The list replaces the one currently set on the user, and an empty list revokes access to every key.","items":{"type":"string"}}},"required":["categories","channels","commands","keys"]},"publicCloud.database.valkey.UserUpdate":{"type":"object","description":"Input parameters for updating a Valkey user","properties":{"categories":{"type":"array","description":"Command category rules granted to the user, each written as a category name prefixed with `+@` to allow it or `-@` to deny it, for example `+@read`, `-@dangerous`. Available categories are all, admin, bitmap, blocking, connection, dangerous, fast, geo, hash, hyperloglog, keyspace, list, pubsub, read, scripting, set, slow, sortedset, stream, string, transaction and write. The list replaces the one currently set on the user.","items":{"type":"string"}},"channels":{"type":"array","description":"Glob patterns of the Pub/Sub channels the user can subscribe to and publish on, for example `news:*`, `chat:room1`. Use `*` to allow every channel. The list replaces the one currently set on the user, and an empty list revokes access to every channel.","items":{"type":"string"}},"commands":{"type":"array","description":"Individual command rules that refine the permissions granted through the categories, each written as a Valkey command name in lowercase prefixed with `+` to allow it or `-` to deny it, for example `+get`, `-flushall`. The list replaces the one currently set on the user.","items":{"type":"string"}},"credentialsLastUpdatedAt":{"type":"string","description":"Date at which the user credentials were last updated. Setting this field triggers a credential reset and returns the new password.","format":"date-time"},"keys":{"type":"array","description":"Glob patterns of the keys the user can access, for example `cache:*`, `session:user:42`. Use `*` to allow every key. The list replaces the one currently set on the user, and an empty list revokes access to every key.","items":{"type":"string"}}}},"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":{"/publicCloud/project/{projectId}/managedDatabase/valkey/{serviceId}/user":{"get":{"operationId":"getAllValkeyUsers","summary":"List users","description":"Returns the users of the service with their access rules and status. Passwords are not returned.","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":"projectId","description":"Project ID","required":true,"schema":{"type":"string"}},{"in":"path","name":"serviceId","description":"Service ID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/publicCloud.database.valkey.User"}}}}}},"tags":["Managed Databases","Valkey"],"x-developer-hub-navigation":[["Public Cloud","Databases","Valkey","Users@@@10"]],"x-badges":[{"color":"blue","label":"Beta version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\nresult = client.get(\"/v2/publicCloud/project/{projectId}/managedDatabase/valkey/{serviceId}/user\")\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/publicCloud/project/{projectId}/managedDatabase/valkey/{serviceId}/user\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"publicCloudProject:apiovh:database/valkey/user/get","required":true}],"x-response-identifier":"id","x-expanded-response":"PublicCloudDatabaseValkeyUser"},"post":{"operationId":"createValkeyUser","summary":"Create a user","description":"Creates a user with access rules on command categories, commands, keys and Pub/Sub channels. An empty keys or channels list grants no access. The generated password is returned only on creation and on password reset.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"projectId","description":"Project ID","required":true,"schema":{"type":"string"}},{"in":"path","name":"serviceId","description":"Service ID","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/publicCloud.database.valkey.UserCreation"}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/publicCloud.database.valkey.User"}}}}},"tags":["Managed Databases","Valkey"],"x-developer-hub-navigation":[["Public Cloud","Databases","Valkey","Users@@@30"]],"x-badges":[{"color":"blue","label":"Beta version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\n# Request body type: publicCloud.database.valkey.UserCreation\nresult = client.post(\"/v2/publicCloud/project/{projectId}/managedDatabase/valkey/{serviceId}/user\",\n\tcategories = None, # Command category rules granted to the user, each written as a category name prefixed with `+@` to allow it or `-@` to deny it, for example `+@read`, `-@dangerous`. Available categories are all, admin, bitmap, blocking, connection, dangerous, fast, geo, hash, hyperloglog, keyspace, list, pubsub, read, scripting, set, slow, sortedset, stream, string, transaction and write. (type: array)\n\tchannels = None, # Glob patterns of the Pub/Sub channels the user can subscribe to and publish on, for example `news:*`, `chat:room1`. Use `*` to allow every channel. When the list is empty, the user cannot use any channel. (type: array)\n\tcommands = None, # Individual command rules that refine the permissions granted through the categories, each written as a Valkey command name in lowercase prefixed with `+` to allow it or `-` to deny it, for example `+get`, `-flushall` (type: array)\n\tkeys = None, # Glob patterns of the keys the user can access, for example `cache:*`, `session:user:42`. Use `*` to allow every key. When the list is empty, the user cannot access any key. (type: array)\n\tname = None, # Login name of the new user, unique on the service. It must be 1 to 32 characters long, start with a letter, a digit or an underscore, and contain only letters, digits, underscores, dots and hyphens. (type: string)\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: publicCloud.database.valkey.UserCreation\n$result = $ovh->post(\"/v2/publicCloud/project/{projectId}/managedDatabase/valkey/{serviceId}/user\", array(\n\tcategories => null, // Command category rules granted to the user, each written as a category name prefixed with `+@` to allow it or `-@` to deny it, for example `+@read`, `-@dangerous`. Available categories are all, admin, bitmap, blocking, connection, dangerous, fast, geo, hash, hyperloglog, keyspace, list, pubsub, read, scripting, set, slow, sortedset, stream, string, transaction and write. (type: array)\n\tchannels => null, // Glob patterns of the Pub/Sub channels the user can subscribe to and publish on, for example `news:*`, `chat:room1`. Use `*` to allow every channel. When the list is empty, the user cannot use any channel. (type: array)\n\tcommands => null, // Individual command rules that refine the permissions granted through the categories, each written as a Valkey command name in lowercase prefixed with `+` to allow it or `-` to deny it, for example `+get`, `-flushall` (type: array)\n\tkeys => null, // Glob patterns of the keys the user can access, for example `cache:*`, `session:user:42`. Use `*` to allow every key. When the list is empty, the user cannot access any key. (type: array)\n\tname => null, // Login name of the new user, unique on the service. It must be 1 to 32 characters long, start with a letter, a digit or an underscore, and contain only letters, digits, underscores, dots and hyphens. (type: string)\n));\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"publicCloudProject:apiovh:database/valkey/user/create","required":true}]}},"/publicCloud/project/{projectId}/managedDatabase/valkey/{serviceId}/user/{userId}":{"delete":{"operationId":"deleteValkeyUser","summary":"Delete a user","description":"Permanently deletes the user.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"projectId","description":"Project ID","required":true,"schema":{"type":"string"}},{"in":"path","name":"serviceId","description":"Service ID","required":true,"schema":{"type":"string","format":"uuid"}},{"in":"path","name":"userId","description":"User ID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/publicCloud.database.valkey.User"}}}}},"tags":["Managed Databases","Valkey"],"x-developer-hub-navigation":[["Public Cloud","Databases","Valkey","Users@@@40"]],"x-badges":[{"color":"blue","label":"Beta version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\nresult = client.delete(\"/v2/publicCloud/project/{projectId}/managedDatabase/valkey/{serviceId}/user/{userId}\")\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/publicCloud/project/{projectId}/managedDatabase/valkey/{serviceId}/user/{userId}\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"publicCloudProject:apiovh:database/valkey/user/delete","required":true}]},"get":{"operationId":"getValkeyUser","summary":"Get a user","description":"Returns the user, its access rules and its status. The password is not returned.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"projectId","description":"Project ID","required":true,"schema":{"type":"string"}},{"in":"path","name":"serviceId","description":"Service ID","required":true,"schema":{"type":"string","format":"uuid"}},{"in":"path","name":"userId","description":"User ID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/publicCloud.database.valkey.User"}}}}},"tags":["Managed Databases","Valkey"],"x-developer-hub-navigation":[["Public Cloud","Databases","Valkey","Users@@@20"]],"x-badges":[{"color":"blue","label":"Beta version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\nresult = client.get(\"/v2/publicCloud/project/{projectId}/managedDatabase/valkey/{serviceId}/user/{userId}\")\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/publicCloud/project/{projectId}/managedDatabase/valkey/{serviceId}/user/{userId}\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"publicCloudProject:apiovh:database/valkey/user/get","required":true}],"x-response-identifier":"id"},"patch":{"operationId":"updateValkeyUser","summary":"Partially update a user","description":"Partially updates the access rules of the user. Each list replaces the current one, and an empty keys or channels list revokes all access. Setting credentialsLastUpdatedAt resets the password and returns the new one.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"projectId","description":"Project ID","required":true,"schema":{"type":"string"}},{"in":"path","name":"serviceId","description":"Service ID","required":true,"schema":{"type":"string","format":"uuid"}},{"in":"path","name":"userId","description":"User ID","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/publicCloud.database.valkey.UserUpdate"}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/publicCloud.database.valkey.User"}}}}},"tags":["Managed Databases","Valkey"],"x-developer-hub-navigation":[["Public Cloud","Databases","Valkey","Users@@@60"]],"x-badges":[{"color":"blue","label":"Beta version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\n# Request body type: publicCloud.database.valkey.UserUpdate\nresult = client.patch(\"/v2/publicCloud/project/{projectId}/managedDatabase/valkey/{serviceId}/user/{userId}\",\n\tcategories = None, # Command category rules granted to the user, each written as a category name prefixed with `+@` to allow it or `-@` to deny it, for example `+@read`, `-@dangerous`. Available categories are all, admin, bitmap, blocking, connection, dangerous, fast, geo, hash, hyperloglog, keyspace, list, pubsub, read, scripting, set, slow, sortedset, stream, string, transaction and write. The list replaces the one currently set on the user. (type: array)\n\tchannels = None, # Glob patterns of the Pub/Sub channels the user can subscribe to and publish on, for example `news:*`, `chat:room1`. Use `*` to allow every channel. The list replaces the one currently set on the user, and an empty list revokes access to every channel. (type: array)\n\tcommands = None, # Individual command rules that refine the permissions granted through the categories, each written as a Valkey command name in lowercase prefixed with `+` to allow it or `-` to deny it, for example `+get`, `-flushall`. The list replaces the one currently set on the user. (type: array)\n\tcredentialsLastUpdatedAt = None, # Date at which the user credentials were last updated. Setting this field triggers a credential reset and returns the new password. (type: string)\n\tkeys = None, # Glob patterns of the keys the user can access, for example `cache:*`, `session:user:42`. Use `*` to allow every key. The list replaces the one currently set on the user, and an empty list revokes access to every key. (type: array)\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: publicCloud.database.valkey.UserUpdate\n$result = $ovh->patch(\"/v2/publicCloud/project/{projectId}/managedDatabase/valkey/{serviceId}/user/{userId}\", array(\n\tcategories => null, // Command category rules granted to the user, each written as a category name prefixed with `+@` to allow it or `-@` to deny it, for example `+@read`, `-@dangerous`. Available categories are all, admin, bitmap, blocking, connection, dangerous, fast, geo, hash, hyperloglog, keyspace, list, pubsub, read, scripting, set, slow, sortedset, stream, string, transaction and write. The list replaces the one currently set on the user. (type: array)\n\tchannels => null, // Glob patterns of the Pub/Sub channels the user can subscribe to and publish on, for example `news:*`, `chat:room1`. Use `*` to allow every channel. The list replaces the one currently set on the user, and an empty list revokes access to every channel. (type: array)\n\tcommands => null, // Individual command rules that refine the permissions granted through the categories, each written as a Valkey command name in lowercase prefixed with `+` to allow it or `-` to deny it, for example `+get`, `-flushall`. The list replaces the one currently set on the user. (type: array)\n\tcredentialsLastUpdatedAt => null, // Date at which the user credentials were last updated. Setting this field triggers a credential reset and returns the new password. (type: string)\n\tkeys => null, // Glob patterns of the keys the user can access, for example `cache:*`, `session:user:42`. Use `*` to allow every key. The list replaces the one currently set on the user, and an empty list revokes access to every key. (type: array)\n));\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"publicCloudProject:apiovh:database/valkey/user/edit","required":true}]},"put":{"operationId":"editValkeyUser","summary":"Update a user","description":"Updates the access rules of the user. Each list replaces the current one, and an empty keys or channels list revokes all access. To reset the password, use the resetPassword route of the user or a partial update with credentialsLastUpdatedAt.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"projectId","description":"Project ID","required":true,"schema":{"type":"string"}},{"in":"path","name":"serviceId","description":"Service ID","required":true,"schema":{"type":"string","format":"uuid"}},{"in":"path","name":"userId","description":"User ID","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/publicCloud.database.valkey.UserReplace"}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/publicCloud.database.valkey.User"}}}}},"tags":["Managed Databases","Valkey"],"x-developer-hub-navigation":[["Public Cloud","Databases","Valkey","Users@@@50"]],"x-badges":[{"color":"blue","label":"Beta version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\n# Request body type: publicCloud.database.valkey.UserReplace\nresult = client.put(\"/v2/publicCloud/project/{projectId}/managedDatabase/valkey/{serviceId}/user/{userId}\",\n\tcategories = None, # Command category rules granted to the user, each written as a category name prefixed with `+@` to allow it or `-@` to deny it, for example `+@read`, `-@dangerous`. Available categories are all, admin, bitmap, blocking, connection, dangerous, fast, geo, hash, hyperloglog, keyspace, list, pubsub, read, scripting, set, slow, sortedset, stream, string, transaction and write. The list replaces the one currently set on the user. (type: array)\n\tchannels = None, # Glob patterns of the Pub/Sub channels the user can subscribe to and publish on, for example `news:*`, `chat:room1`. Use `*` to allow every channel. The list replaces the one currently set on the user, and an empty list revokes access to every channel. (type: array)\n\tcommands = None, # Individual command rules that refine the permissions granted through the categories, each written as a Valkey command name in lowercase prefixed with `+` to allow it or `-` to deny it, for example `+get`, `-flushall`. The list replaces the one currently set on the user. (type: array)\n\tkeys = None, # Glob patterns of the keys the user can access, for example `cache:*`, `session:user:42`. Use `*` to allow every key. The list replaces the one currently set on the user, and an empty list revokes access to every key. (type: array)\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: publicCloud.database.valkey.UserReplace\n$result = $ovh->put(\"/v2/publicCloud/project/{projectId}/managedDatabase/valkey/{serviceId}/user/{userId}\", array(\n\tcategories => null, // Command category rules granted to the user, each written as a category name prefixed with `+@` to allow it or `-@` to deny it, for example `+@read`, `-@dangerous`. Available categories are all, admin, bitmap, blocking, connection, dangerous, fast, geo, hash, hyperloglog, keyspace, list, pubsub, read, scripting, set, slow, sortedset, stream, string, transaction and write. The list replaces the one currently set on the user. (type: array)\n\tchannels => null, // Glob patterns of the Pub/Sub channels the user can subscribe to and publish on, for example `news:*`, `chat:room1`. Use `*` to allow every channel. The list replaces the one currently set on the user, and an empty list revokes access to every channel. (type: array)\n\tcommands => null, // Individual command rules that refine the permissions granted through the categories, each written as a Valkey command name in lowercase prefixed with `+` to allow it or `-` to deny it, for example `+get`, `-flushall`. The list replaces the one currently set on the user. (type: array)\n\tkeys => null, // Glob patterns of the keys the user can access, for example `cache:*`, `session:user:42`. Use `*` to allow every key. The list replaces the one currently set on the user, and an empty list revokes access to every key. (type: array)\n));\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"publicCloudProject:apiovh:database/valkey/user/edit","required":true}]}},"/publicCloud/project/{projectId}/managedDatabase/valkey/{serviceId}/user/{userId}/resetPassword":{"post":{"operationId":"resetValkeyUserPassword","summary":"Reset the password of a user","description":"Generates a new password for the user and returns it in the response. Reading the user never returns it. The previous password stops working once the new one is applied, and credentialsLastUpdatedAt becomes the date of this reset. This is the same reset as a partial update of the user that sets credentialsLastUpdatedAt.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"projectId","description":"Project ID","required":true,"schema":{"type":"string"}},{"in":"path","name":"serviceId","description":"Service ID","required":true,"schema":{"type":"string","format":"uuid"}},{"in":"path","name":"userId","description":"User ID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/publicCloud.database.valkey.User"}}}}},"tags":["Managed Databases","Valkey"],"x-developer-hub-navigation":[["Public Cloud","Databases","Valkey","Users@@@70"]],"x-badges":[{"color":"blue","label":"Beta version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\nresult = client.post(\"/v2/publicCloud/project/{projectId}/managedDatabase/valkey/{serviceId}/user/{userId}/resetPassword\")\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->post(\"/v2/publicCloud/project/{projectId}/managedDatabase/valkey/{serviceId}/user/{userId}/resetPassword\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"publicCloudProject:apiovh:database/valkey/user/credentials/reset","required":true}]}}},"tags":[{"name":"Managed Databases","x-tag-expanded":false,"description":"Missing description"},{"name":"Valkey","x-tag-expanded":false,"description":"Missing description"}]}
