openapi: 3.1.0
info:
title: Managed Database for PostgreSQL and MySQL API
description: |-
Managed Database for PostgreSQL and MySQL provides fully-managed relational Database Instances, with MySQL or PostgreSQL as database engines. The resource allows you to focus on development rather than administration or configuration. It comes with a high-availability mode, data replication, and automatic backups.
Compared to traditional database management, which requires customers to provide their infrastructure and resources to manage their databases, Managed Database for PostgreSQL and MySQL Instance offers the user access to Database Instances without setting up the hardware or configuring the software. Scaleway handles the provisioning, manages the configuration, and provides useful features as high availability, automated backup, user management, and more.
## Concepts
Refer to our [dedicated concepts page](https://www.scaleway.com/en/docs/managed-databases-for-postgresql-and-mysql/concepts/) to find definitions of the different terms referring to Managed Database for PostgreSQL and MySQL.
## Quickstart
1. Configure your environment variables.
This is an optional step that seeks to simplify your usage of the APIs.
```bash
export SCW_ACCESS_KEY=""
export SCW_SECRET_KEY=""
export SCW_REGION=""
```
2. Edit the POST request payload you will use to create your Database Instance. Replace the parameters in the following example:
```json
'{
"project_id": "d8e65f2b-cce9-40b7-80fc-6a2902db6826",
"name": "myDB",
"engine": "PostgreSQL-15",
"tags": ["donnerstag"],
"is_ha_cluster": true,
"node_type": "db-pro2-xxs",
"disable_backup": false,
"user_name": "my_initial_user",
"password": "thiZ_is_v0ry_s3cret",
"volume_type": "sbs_5k",
"volume_size": "30000000000"
}'
```
| Parameter | Description |
| :--------------- |:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `project_id` | The ID of the Project you want to create your Database Instance in. To find your Project ID you can **[list the projects](/api/account/project-api/#path-projects-list-all-projects-of-an-organization)** or consult the **[Scaleway console](https://console.scaleway.com/project/settings)**. |
| `engine` | **REQUIRED** Version ID of the database engine. To check the list of available engines you can use the following endpoint: `https://api.scaleway.com/rdb/v1/regions/$SCW_REGION/database-engines` |
| `name` | Name of the Database Instance |
| `node_type` | **REQUIRED** The node type. To check the list of available node types you can use the following endpoint: `https://api.scaleway.com/rdb/v1/regions/$SCW_REGION/node-types` |
| `is_ha_cluster` | **BOOLEAN** Defines whether High Availability is enabled for the Database Instance |
| `disable_backup` | **BOOLEAN** Defines whether automated backups are disabled for the Database Instance |
| `tags` | The list of tags `["tag1", "tag2", ...]` that will be associated with the Database Instance. Tags can be appended to the query of the [List Database Instances](#path-database-instances-list-database-instances) call to show results for only the Database Instances using a specific tag. You can also combine tags to list Database Instances that possess all the appended tags. |
| `user_name` | **REQUIRED** Identifier of the default user, which is created concurrently with the Database Instance |
| `password` | **REQUIRED** Password for the default user |
| `volume_type` | Type of volume where data is stored. You can specify either local volume (`lssd`) or block volume (`bssd`, `sbs_5k` or `sbs_15k`). The default value is `lssd` |
| `volume_size` | Volume size when volume_type is `bssd`, `sbs_5k` or `sbs_15k`. The value should be expressed in bytes. For example 30GB is expressed as 30000000000 |
3. Create a Database Instance by running the following command. Make sure you include the payload you edited in the previous step.
```bash
curl -X POST \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
"Content-Type: application/json" \
https://api.scaleway.com/rdb/v1/regions/$SCW_REGION/instances \
-d '{
"project_id": "d8e65f2b-cce9-40b7-80fc-6a2902db6826",
"name": "myDB",
"engine": "PostgreSQL-15",
"tags": ["donnerstag"],
"is_ha_cluster": true,
"node_type": "db-pro2-xxs",
"disable_backup": false,
"user_name": "my_initial_user",
"password": "thiZ_is_v0ry_s3cret",
"volume_type": "sbs_5k",
"volume_size": "30000000000"
}'
```
4. List your Database Instances.
```bash
curl -X GET \
-H "Content-Type: application/json" \
-H "X-Auth-Token: $SCW_SECRET_KEY" https://api.scaleway.com/rdb/v1/regions/$SCW_REGION/instances
```
You should get a response like the following:
This is a response example, the UUIDs and IP address displayed are not real.
```json
{
"id": "f5122f66-fb50-4cef-aa02-487ef4fc1af0",
"name": "myDB",
"organization_id": "895693aa-3915-4896-8761-c2923b008be7",
"project_id": "d8e65f2b-cce9-40b7-80fc-6a2902db6826",
"status": "ready",
"engine": "PostgreSQL-15",
"endpoint": {
"ip": "198.51.100.0",
"port": 22245,
"name": null
},
"tags": [
"donnerstag"
],
"settings": [],
"backup_schedule": {
"frequency": 24,
"retention": 7,
"disabled": true
},
"is_ha_cluster": true,
"read_replicas": [],
"node_type": "db-pro2-xxs",
"volume": {
"type": "sbs_5k",
"size": 30000000000
}
"created_at": "2019-04-19T16:24:52.591417Z",
"region": "fr-par"
}
```
5. Retrieve your Database Instance IP and port from the response.
In the example above, the IP and port are `198.51.100.0` and `22245`, respectively.
6. Connect to your Database Instance with the database client of the engine you selected.
For MySQL, run the following command:
```bash
mysql -h --port -p -u
```
For PostgreSQL, run:
```bash
psql -h -p -U -d rdb
```
For the recurring example, the command would look like:
```bash
psql -h 198.51.100.0 -p 22245 -U my_initial_user -d rdb
```
7. Enter the database password that you defined upon creation.
You are now connected to your Managed Database.
To perform the following steps, you must first ensure that:
- you have an account and are logged into the [Scaleway console](https://console.scaleway.com/organization)
- you have created an [API key](https://www.scaleway.com/en/docs/iam/how-to/create-api-keys/) and that the API key has sufficient [IAM permissions](https://www.scaleway.com/en/docs/iam/reference-content/permission-sets/) to perform the actions described on this page.
- you have [installed `curl`](https://curl.se/download.html)
## Technical Information
### Regions
Scaleway's infrastructure is spread across different [regions and Availability Zones](https://www.scaleway.com/en/docs/account/reference-content/products-availability/).
Managed Database for PostgreSQL and MySQL is available in the Paris, Amsterdam and Warsaw regions, which are represented by the following path parameters:
- `fr-par`
- `nl-ams`
- `pl-waw`
### PostgreSQL specifications
#### Versions
Scaleway Database for PostgreSQL supports PostgreSQL versions 11, 12, 13, 14 and 15.
#### System
Different modules are available for installation, including TimescaleDB and PostGIS. Refer to the [Managed Database for PostgreSQL and MySQL FAQ page](https://www.scaleway.com/en/docs/managed-databases-for-postgresql-and-mysql/faq/#which-postgresql-extensions-are-available) for an extensive list of PostgreSQL extensions.
#### Database Management
You can create logical databases through the Scaleway console, the Scaleway APIs or SQL.
- databases created using the Scaleway console or the API are owned by an internal system user. These are called "managed databases".
- databases created using SQL will be owned by the creator. These are called "unmanaged databases".
### MySQL specifications
#### Versions
Scaleway Database for MySQL supports MySQL 8.
#### System
- only the [InnoDB engine](https://dev.mysql.com/doc/refman/8.0/en/innodb-storage-engine.html) is supported
- the [Global Transaction Identifier (GTID)](https://dev.mysql.com/doc/refman/8.0/en/replication-gtids-concepts.html) is enabled.
- [`mysql_native_password`](https://dev.mysql.com/doc/refman/8.0/en/native-pluggable-authentication.html) (default) and [`caching_sha2_password`](https://dev.mysql.com/doc/refman/8.0/en/caching-sha2-pluggable-authentication.html) authentication are supported.
#### User Management
- users with an `admin` role have access to all logical databases and can create new ones.
- users created via the API are authenticated using the default authentication plugin, which can be changed in the settings.
## Technical Limitations
### PostgreSQL
#### User Management
- users with an `admin` role have `CREATEROLE` and `CREATEDB` privileges.
- users do NOT have `SUPERUSER` nor `REPLICATION` privileges.
- permission management through the Scaleway console or API is only possible for the "managed databases".
#### Backup and restoration
Databases that have been backed up and then restored retain the user permission settings in use at the time of backup. If you delete users after backup and then restore your backup in the same database, or if you restore a backup to a different database with different or no users, the permissions configured for them continue to exist, but with no associated owner. This error will put a stop to the restoration process.
To avoid this issue, we recommend you re-create the users you deleted. In the occasion you restore the backup to a new database, you must create new users with the same names.
## Going Further
For more information about Managed Database for PostgreSQL and MySQL, you can check out the following pages:
* [Managed Database for PostgreSQL and MySQL Documentation](https://www.scaleway.com/en/docs/managed-databases/postgresql-and-mysql/)
* [Managed Database for PostgreSQL and MySQL FAQ](https://www.scaleway.com/en/docs/managed-databases-for-postgresql-and-mysql/faq/)
* [Scaleway Slack Community](https://scaleway-community.slack.com/) join the #database channel
* [Contact our support team](https://console.scaleway.com/support/tickets)
### How to migrate a database
If you wish to migrate existing databases to a Managed Database for PostgreSQL or MySQL, you can refer to the [Migrating existing databases to a Database Instance](https://www.scaleway.com/en/docs/tutorials/migrate-databases-instance/) tutorial page.
### Troubleshoooting
#### Disk full status
If your Database Instance uses local storage, your local volume might eventually approach full capacity and shift to `disk_full` mode. This mode grants you enough space to either [upgrade your node type](https://www.scaleway.com/en/docs/managed-databases-for-postgresql-and-mysql/how-to/upgrade-version/#how-to-change-the-node-type) or [clear out space in your volume](https://www.scaleway.com/en/docs/managed-databases-for-postgresql-and-mysql/troubleshooting/disk-full/).
version: v1
servers:
- url: https://api.scaleway.com
tags:
- name: Backups
description: |
A database backup is a dated export of a Database Instance stored on an offsite backend located in a different region than your database, by default. Once a backup is created, it can be used to restore the database. Each logical database in a Database Instance is backed up and can be restored separately.
- name: Engines
description: |
A database engine is the software component that stores and retrieves your data from a database. Currently PostgreSQL 11, 12, 13 and 14 are available. MySQL is available in version 8.
- name: Database Instances
description: |
A Database Instance is made up of one or multiple dedicated compute nodes running a single database engine. Two node settings are available: **High-Availability (HA)**, with a main node and one replica, and **standalone** with a main node. The HA standby node is linked to the main node, using synchronous replication. Synchronous replication offers the ability to confirm that all changes intended by a transaction have been transferred and applied to the synchronous replica node, providing durability to the data.
**Note**: HA standby nodes are not accessible to users unless the main node becomes unavailable and the standby takes over. If you wish to run queries on a read-only node, you can use [Read Replicas](#path-read-replicas-create-a-read-replica)
Read Replicas can be used for certain read-only workflows such as Business Intelligence, or for a read-only scaling of your application. Read Replicas use asynchronous replication to replicate data from the main node.
- name: Read Replicas
description: |
A Read Replica is a live copy of a Database Instance that behaves like an Instance, but that only allows read-only connections.
The replica mirrors the data of the primary Database node and any changes made are replicated to the replica asynchronously. Read Replicas allow you to scale your Database Instance for read-heavy database workloads. They can also be used for business intelligence workloads.
A Read Replica can have at most one direct access and one Private Network endpoint. `Loadbalancer` endpoints are not available on Read Replicas even if this resource is displayed in the Read Replica response example.
If you want to remove a Read Replica endpoint, you can use [delete a Database Instance endpoint](#path-endpoints-delete-a-database-instance-endpoint) API call.
Instance Access Control Lists (ACL) also apply to Read Replica direct access endpoints.
**Limitations:**
There might be replication lags between the primary node and its Read Replica nodes. You can try to reduce this lag with some good practices:
* All your tables should have a primary key
* Don't run large transactions that modify, delete or insert lots of rows. Try to split it into several small transactions.
- name: ACLs
description: |
Network Access Control Lists allow you to control incoming network traffic by setting up ACL rules.
- name: Instance Settings
description: |
Advanced Database Instance settings allow you to tune the behavior of your database engines to better fit your needs.
Available settings depend on the database engine and its version. Note that some settings can only be defined upon database engine initialization. These are called init settings. You can find a full list of the settings available in the response body of the [list available database engines](#path-databases-list-databases-in-a-database-instance) endpoint.
Each advanced setting entry has a default value that users can override. The deletion of a setting entry will restore the setting to default value. Some of the defaults values can be different from the engine's defaults, as we optimize them to the Scaleway platform.
- name: Privileges
description: |
Privileges are permissions that can be granted to database users. You can manage user permissions either via the console, the Scaleway APIs or SQL. Managed Database for PostgreSQL and MySQL provides a simplified and unified permission model through the API and the console to make things easier to manage and understand.
Each user has associated permissions that give them access to zero or more logical databases. These include:
* **None:** No access to the database
* **Read:** Allow users to read tables and fields in a database
* **Write:** Allow users to write content in databases.
* **Admin:** Read and write access to the data, and extended privileges depending on the database engine.
- name: Users
description: |
Users are profiles to which you can attribute database-level permissions. They allow you to define permissions specific to each type of database usage. For example, users with an `admin` role can create new databases and users.
- name: Databases
description: |
Databases can be used to store and manage sets of structured information, or data. The interaction between the user and a database is done using a Database Engine, which provides a structured query language to add, modify or delete information from the database.
- name: NodeTypes
description: |
Two node type ranges are available:
* **General Purpose:** production-grade nodes designed for scalable database infrastructures.
* **Development:** sandbox environments and reliable performance for development and testing purposes.
- name: Snapshots
description: |
A snapshot is a consistent, instantaneous copy of the Block Storage volume of your Database Instance at a certain point in time. They are designed to recover your data in case of failure or accidental alterations of the data by a user. They allow you to quickly create a new Instance from a previous state of your database, regardless of the size of the volume. Their limitation is that, unlike backups, snapshots can only be stored in the same location as the original data.
- name: Endpoints
description: |
A point of connection to a Database Instance. The endpoint is associated with an IPv4 address and a port. It contains the information about whether the endpoint is read-write or not. The endpoints always point to the main node of a Database Instance.
All endpoints have TLS enabled. You can use TLS to make your data and your passwords unreadable in transit to anyone but you.
For added security, you can set up ACL rules to restrict access to your endpoint to a set of trusted hosts or networks of your choice.
Load Balancers are used to forward traffic to the right node based on the node state (active/hot standby). The Load Balancers' configuration is set to cut off inactive connections if no TCP traffic is sent within a 6-hour timeframe. We recommend using connection pooling on the application side to renew database connections regularly.
components:
schemas:
google.protobuf.Int32Value:
type: integer
format: int32
nullable: true
scaleway.rdb.v1.ACLRule:
type: object
properties:
ip:
type: string
description: (IP network)
example: 1.2.3.4/32
protocol:
$ref: '#/components/schemas/scaleway.rdb.v1.ACLRule.Protocol'
direction:
$ref: '#/components/schemas/scaleway.rdb.v1.ACLRule.Direction'
action:
$ref: '#/components/schemas/scaleway.rdb.v1.ACLRule.Action'
description:
type: string
port:
type: integer
deprecated: true
format: uint32
x-properties-order:
- ip
- protocol
- direction
- action
- description
- port
scaleway.rdb.v1.ACLRule.Action:
type: string
enum:
- allow
- deny
default: allow
scaleway.rdb.v1.ACLRule.Direction:
type: string
enum:
- inbound
- outbound
default: inbound
scaleway.rdb.v1.ACLRule.Protocol:
type: string
enum:
- tcp
- udp
- icmp
default: tcp
scaleway.rdb.v1.ACLRuleRequest:
type: object
properties:
ip:
type: string
description: (IP network)
example: 1.2.3.4/32
description:
type: string
x-properties-order:
- ip
- description
scaleway.rdb.v1.AddInstanceACLRulesResponse:
type: object
properties:
rules:
type: array
description: ACL Rules enabled for the Database Instance.
items:
$ref: '#/components/schemas/scaleway.rdb.v1.ACLRule'
x-properties-order:
- rules
scaleway.rdb.v1.AddInstanceSettingsResponse:
type: object
properties:
settings:
type: array
description: Settings available on the Database Instance.
items:
$ref: '#/components/schemas/scaleway.rdb.v1.InstanceSetting'
x-properties-order:
- settings
scaleway.rdb.v1.Database:
type: object
properties:
name:
type: string
description: Name of the database.
owner:
type: string
description: Name of the database owner.
managed:
type: boolean
description: Defines whether the database is managed or not.
size:
type: integer
description: Size of the database. Set to 0 if the size retrieval is too
time-consuming or `skip_size_retrieval` is set to true. (in bytes)
format: uint64
x-properties-order:
- name
- owner
- managed
- size
scaleway.rdb.v1.DatabaseBackup:
type: object
properties:
id:
type: string
description: UUID of the database backup.
instance_id:
type: string
description: UUID of the Database Instance.
database_name:
type: string
description: Name of backed up database.
name:
type: string
description: Name of the backup.
status:
type: string
description: Status of the backup.
enum:
- unknown
- creating
- ready
- restoring
- deleting
- error
- exporting
- locked
default: unknown
size:
type: integer
description: Size of the database backup. (in bytes)
format: uint64
nullable: true
expires_at:
type: string
description: Expiration date (must follow the ISO 8601 format). (RFC 3339
format)
format: date-time
example: "2022-03-22T12:34:56.123456Z"
nullable: true
created_at:
type: string
description: Creation date (must follow the ISO 8601 format). (RFC 3339
format)
format: date-time
example: "2022-03-22T12:34:56.123456Z"
nullable: true
updated_at:
type: string
description: Updated date (must follow the ISO 8601 format). (RFC 3339 format)
format: date-time
example: "2022-03-22T12:34:56.123456Z"
nullable: true
instance_name:
type: string
description: Name of the Database Instance of the backup.
download_url:
type: string
description: URL you can download the backup from.
nullable: true
download_url_expires_at:
type: string
description: Expiration date of the download link. (RFC 3339 format)
format: date-time
example: "2022-03-22T12:34:56.123456Z"
nullable: true
region:
type: string
description: Region of the database backup.
same_region:
type: boolean
description: Store logical backups in the same region as the source Database
Instance.
x-properties-order:
- id
- instance_id
- database_name
- name
- status
- size
- expires_at
- created_at
- updated_at
- instance_name
- download_url
- download_url_expires_at
- region
- same_region
scaleway.rdb.v1.DatabaseEngine:
type: object
properties:
name:
type: string
description: Engine name.
logo_url:
type: string
description: Engine logo URL.
versions:
type: array
description: Available versions.
items:
$ref: '#/components/schemas/scaleway.rdb.v1.EngineVersion'
region:
type: string
description: Region of this Database Instance.
x-properties-order:
- name
- logo_url
- versions
- region
scaleway.rdb.v1.DeleteInstanceACLRulesResponse:
type: object
properties:
rules:
type: array
description: IP addresses defined in the ACL rules of the Database Instance.
items:
$ref: '#/components/schemas/scaleway.rdb.v1.ACLRule'
x-properties-order:
- rules
scaleway.rdb.v1.DeleteInstanceSettingsResponse:
type: object
properties:
settings:
type: array
description: Settings names to delete from the Database Instance.
items:
$ref: '#/components/schemas/scaleway.rdb.v1.InstanceSetting'
x-properties-order:
- settings
scaleway.rdb.v1.Endpoint:
type: object
properties:
id:
type: string
description: UUID of the endpoint. (UUID format)
example: 6170692e-7363-616c-6577-61792e636f6d
ip:
type: string
description: IPv4 address of the endpoint. (IP address)
example: 1.2.3.4
nullable: true
x-one-of: address
port:
type: integer
description: TCP port of the endpoint.
format: uint32
name:
type: string
description: Name of the endpoint.
nullable: true
private_network:
type: object
description: Private Network details. One maximum per Database Instance
or Read Replica (a Database Instance and its Read Replica can have different
Private Networks). Cannot be updated (has to be deleted and recreated).
properties:
private_network_id:
type: string
description: UUID of the private network. (UUID format)
example: 6170692e-7363-616c-6577-61792e636f6d
service_ip:
type: string
description: CIDR notation of the endpoint IPv4 address. (IP network)
example: 1.2.3.4/32
zone:
type: string
description: Private network zone.
provisioning_mode:
type: string
description: How endpoint ips are provisioned.
enum:
- static
- ipam
default: static
nullable: true
x-properties-order:
- private_network_id
- service_ip
- zone
- provisioning_mode
x-one-of: details
load_balancer:
type: object
description: Load balancer details. Public endpoint for Database Instance
which is systematically present. One per Database Instance.
nullable: true
x-one-of: details
direct_access:
type: object
description: Direct access details. Public endpoint reserved for Read Replicas.
One per Read Replica.
nullable: true
x-one-of: details
hostname:
type: string
description: Hostname of the endpoint.
nullable: true
x-one-of: address
x-properties-order:
- id
- ip
- port
- name
- private_network
- load_balancer
- direct_access
- hostname
scaleway.rdb.v1.EndpointSpec:
type: object
properties:
load_balancer:
type: object
description: Load balancer endpoint specifications. Public endpoint for
Database Instance which is systematically present. One per RDB instance.
nullable: true
x-one-of: spec
private_network:
type: object
description: Private Network endpoint specifications. One maximum per Database
Instance or Read Replica (a Database Instance and its Read Replica can
have different Private Networks). Cannot be updated (has to be deleted
and recreated).
properties:
private_network_id:
type: string
description: UUID of the Private Network to be connected to the Database
Instance. (UUID format)
example: 6170692e-7363-616c-6577-61792e636f6d
service_ip:
type: string
description: Endpoint IPv4 address with a CIDR notation. Refer to the
official Scaleway documentation to learn more about IP and subnet
limitations. (IP network)
example: 1.2.3.4/32
nullable: true
x-one-of: config
ipam_config:
type: object
description: Automated configuration of your Private Network endpoint
with Scaleway IPAM service. One at the most per Database Instance
or Read Replica (a Database Instance and its Read Replica can have
different Private Networks). Cannot be updated (has to be deleted
and recreated).
nullable: true
x-one-of: config
nullable: true
x-properties-order:
- private_network_id
- service_ip
- ipam_config
x-one-of: spec
x-properties-order:
- load_balancer
- private_network
scaleway.rdb.v1.EngineSetting:
type: object
properties:
name:
type: string
description: Setting name from the database engine.
default_value:
type: string
description: Value set when not specified.
hot_configurable:
type: boolean
description: Setting can be applied without restarting.
description:
type: string
description: Setting description.
property_type:
type: string
description: Setting type.
enum:
- BOOLEAN
- INT
- STRING
- FLOAT
default: BOOLEAN
unit:
type: string
description: Setting base unit.
nullable: true
string_constraint:
type: string
description: Validation regex for string type settings.
nullable: true
int_min:
type: integer
description: Minimum value for int types.
format: int32
nullable: true
int_max:
type: integer
description: Maximum value for int types.
format: int32
nullable: true
float_min:
type: object
description: Minimum value for float types.
properties:
value:
type: number
format: float
x-properties-order:
- value
float_max:
type: object
description: Maximum value for float types.
properties:
value:
type: number
format: float
x-properties-order:
- value
x-properties-order:
- name
- default_value
- hot_configurable
- description
- property_type
- unit
- string_constraint
- int_min
- int_max
- float_min
- float_max
scaleway.rdb.v1.EngineVersion:
type: object
properties:
version:
type: string
description: Database engine version.
name:
type: string
description: Database engine name.
end_of_life:
type: string
description: End of life date. (RFC 3339 format)
format: date-time
example: "2022-03-22T12:34:56.123456Z"
nullable: true
available_settings:
type: array
description: Engine settings available to be set.
items:
$ref: '#/components/schemas/scaleway.rdb.v1.EngineSetting'
disabled:
type: boolean
description: Disabled versions cannot be created.
beta:
type: boolean
description: Beta status of engine version.
available_init_settings:
type: array
description: Engine settings available to be set at database initialization.
items:
$ref: '#/components/schemas/scaleway.rdb.v1.EngineSetting'
x-properties-order:
- version
- name
- end_of_life
- available_settings
- disabled
- beta
- available_init_settings
scaleway.rdb.v1.Instance:
type: object
properties:
created_at:
type: string
description: Creation date (must follow the ISO 8601 format). (RFC 3339
format)
format: date-time
example: "2022-03-22T12:34:56.123456Z"
nullable: true
volume:
type: object
description: Volumes of the Database Instance.
properties:
type:
$ref: '#/components/schemas/scaleway.rdb.v1.Volume.Type'
size:
type: integer
description: (in bytes)
format: uint64
class:
$ref: '#/components/schemas/scaleway.rdb.v1.StorageClass'
x-properties-order:
- type
- size
- class
region:
type: string
description: Region the Database Instance is in.
id:
type: string
description: UUID of the Database Instance. (UUID format)
example: 6170692e-7363-616c-6577-61792e636f6d
name:
type: string
description: Name of the Database Instance.
organization_id:
type: string
description: Organization ID the Database Instance belongs to. (UUID format)
example: 6170692e-7363-616c-6577-61792e636f6d
project_id:
type: string
description: Project ID the Database Instance belongs to. (UUID format)
example: 6170692e-7363-616c-6577-61792e636f6d
status:
type: string
description: Status of the Database Instance.
enum:
- unknown
- ready
- provisioning
- configuring
- deleting
- error
- autohealing
- locked
- initializing
- disk_full
- backuping
- snapshotting
- restarting
default: unknown
engine:
type: string
description: Database engine of the database (PostgreSQL, MySQL, ...).
upgradable_version:
type: array
description: Available database engine versions for upgrade.
items:
$ref: '#/components/schemas/scaleway.rdb.v1.UpgradableVersion'
endpoint:
type: object
description: Endpoint of the Database Instance.
deprecated: true
properties:
id:
type: string
description: UUID of the endpoint. (UUID format)
example: 6170692e-7363-616c-6577-61792e636f6d
ip:
type: string
description: IPv4 address of the endpoint. (IP address)
example: 1.2.3.4
nullable: true
x-one-of: address
port:
type: integer
description: TCP port of the endpoint.
format: uint32
name:
type: string
description: Name of the endpoint.
nullable: true
private_network:
type: object
description: Private Network details. One maximum per Database Instance
or Read Replica (a Database Instance and its Read Replica can have
different Private Networks). Cannot be updated (has to be deleted
and recreated).
properties:
private_network_id:
type: string
description: UUID of the private network. (UUID format)
example: 6170692e-7363-616c-6577-61792e636f6d
service_ip:
type: string
description: CIDR notation of the endpoint IPv4 address. (IP network)
example: 1.2.3.4/32
zone:
type: string
description: Private network zone.
provisioning_mode:
type: string
description: How endpoint ips are provisioned.
enum:
- static
- ipam
default: static
nullable: true
x-properties-order:
- private_network_id
- service_ip
- zone
- provisioning_mode
x-one-of: details
load_balancer:
type: object
description: Load balancer details. Public endpoint for Database Instance
which is systematically present. One per Database Instance.
nullable: true
x-one-of: details
direct_access:
type: object
description: Direct access details. Public endpoint reserved for Read
Replicas. One per Read Replica.
nullable: true
x-one-of: details
hostname:
type: string
description: Hostname of the endpoint.
nullable: true
x-one-of: address
x-properties-order:
- id
- ip
- port
- name
- private_network
- load_balancer
- direct_access
- hostname
tags:
type: array
description: List of tags applied to the Database Instance.
items:
type: string
settings:
type: array
description: Advanced settings of the Database Instance.
items:
$ref: '#/components/schemas/scaleway.rdb.v1.InstanceSetting'
backup_schedule:
type: object
description: Backup schedule of the Database Instance.
properties:
frequency:
type: integer
description: Frequency of the backup schedule (in hours).
format: uint32
retention:
type: integer
description: Default retention period of backups (in days).
format: uint32
disabled:
type: boolean
description: Defines whether the backup schedule feature is disabled.
next_run_at:
type: string
description: Next run of the backup schedule (accurate to 10 minutes).
(RFC 3339 format)
format: date-time
example: "2022-03-22T12:34:56.123456Z"
nullable: true
x-properties-order:
- frequency
- retention
- disabled
- next_run_at
is_ha_cluster:
type: boolean
description: Defines whether or not High-Availability is enabled.
read_replicas:
type: array
description: Read Replicas of the Database Instance.
items:
$ref: '#/components/schemas/scaleway.rdb.v1.ReadReplica'
node_type:
type: string
description: Node type of the Database Instance.
init_settings:
type: array
description: List of engine settings to be set at database initialization.
items:
$ref: '#/components/schemas/scaleway.rdb.v1.InstanceSetting'
endpoints:
type: array
description: List of Database Instance endpoints.
items:
$ref: '#/components/schemas/scaleway.rdb.v1.Endpoint'
logs_policy:
type: object
description: Logs policy of the Database Instance.
properties:
max_age_retention:
type: integer
description: Max age (in days) of remote logs to keep on the Database
Instance.
format: uint32
nullable: true
total_disk_retention:
type: integer
description: Max disk size of remote logs to keep on the Database Instance.
(in bytes)
format: uint64
nullable: true
x-properties-order:
- max_age_retention
- total_disk_retention
backup_same_region:
type: boolean
description: Store logical backups in the same region as the Database Instance.
maintenances:
type: array
description: List of Database Instance maintenance events.
items:
$ref: '#/components/schemas/scaleway.rdb.v1.Maintenance'
encryption:
type: object
description: Encryption at rest settings for your Database Instance.
properties:
enabled:
type: boolean
x-properties-order:
- enabled
x-properties-order:
- created_at
- volume
- region
- id
- name
- organization_id
- project_id
- status
- engine
- upgradable_version
- endpoint
- tags
- settings
- backup_schedule
- is_ha_cluster
- read_replicas
- node_type
- init_settings
- endpoints
- logs_policy
- backup_same_region
- maintenances
- encryption
scaleway.rdb.v1.InstanceLog:
type: object
properties:
download_url:
type: string
description: Presigned Object Storage URL to download your log file.
nullable: true
id:
type: string
description: UUID of the Database Instance log.
status:
type: string
description: Status of the logs in a Database Instance.
enum:
- unknown
- ready
- creating
- error
default: unknown
node_name:
type: string
description: Name of the underlying node.
expires_at:
type: string
description: Expiration date (must follow the ISO 8601 format). (RFC 3339
format)
format: date-time
example: "2022-03-22T12:34:56.123456Z"
nullable: true
created_at:
type: string
description: Creation date (must follow the ISO 8601 format). (RFC 3339
format)
format: date-time
example: "2022-03-22T12:34:56.123456Z"
nullable: true
region:
type: string
description: Region the Database Instance is in.
x-properties-order:
- download_url
- id
- status
- node_name
- expires_at
- created_at
- region
scaleway.rdb.v1.InstanceMetrics:
type: object
properties:
timeseries:
type: array
description: Time series of metrics of a Database Instance.
items:
$ref: '#/components/schemas/scaleway.std.TimeSeries'
x-properties-order:
- timeseries
scaleway.rdb.v1.InstanceSetting:
type: object
properties:
name:
type: string
value:
type: string
x-properties-order:
- name
- value
scaleway.rdb.v1.ListDatabaseBackupsResponse:
type: object
properties:
database_backups:
type: array
description: List of database backups.
items:
$ref: '#/components/schemas/scaleway.rdb.v1.DatabaseBackup'
total_count:
type: integer
description: Total count of database backups available.
format: uint32
x-properties-order:
- database_backups
- total_count
scaleway.rdb.v1.ListDatabaseEnginesResponse:
type: object
properties:
engines:
type: array
description: List of the available database engines.
items:
$ref: '#/components/schemas/scaleway.rdb.v1.DatabaseEngine'
total_count:
type: integer
description: Total count of database engines available.
format: uint32
x-properties-order:
- engines
- total_count
scaleway.rdb.v1.ListDatabasesResponse:
type: object
properties:
databases:
type: array
description: List of the databases.
items:
$ref: '#/components/schemas/scaleway.rdb.v1.Database'
total_count:
type: integer
description: Total count of databases present on a Database Instance.
format: uint32
x-properties-order:
- databases
- total_count
scaleway.rdb.v1.ListInstanceACLRulesResponse:
type: object
properties:
rules:
type: array
description: List of ACL rules present on a Database Instance.
items:
$ref: '#/components/schemas/scaleway.rdb.v1.ACLRule'
total_count:
type: integer
description: Total count of ACL rules present on a Database Instance.
format: uint32
x-properties-order:
- rules
- total_count
scaleway.rdb.v1.ListInstanceLogsDetailsResponse:
type: object
properties:
details:
type: array
description: Remote Database Instance logs details.
items:
$ref: '#/components/schemas/scaleway.rdb.v1.ListInstanceLogsDetailsResponse.InstanceLogDetail'
x-properties-order:
- details
scaleway.rdb.v1.ListInstanceLogsDetailsResponse.InstanceLogDetail:
type: object
properties:
log_name:
type: string
size:
type: integer
format: uint64
x-properties-order:
- log_name
- size
scaleway.rdb.v1.ListInstanceLogsResponse:
type: object
properties:
instance_logs:
type: array
description: Available logs in a Database Instance.
items:
$ref: '#/components/schemas/scaleway.rdb.v1.InstanceLog'
x-properties-order:
- instance_logs
scaleway.rdb.v1.ListInstancesResponse:
type: object
properties:
instances:
type: array
description: List of all Database Instances available in an Organization
or Project.
items:
$ref: '#/components/schemas/scaleway.rdb.v1.Instance'
total_count:
type: integer
description: Total count of Database Instances available in a Organization
or Project.
format: uint32
x-properties-order:
- instances
- total_count
scaleway.rdb.v1.ListNodeTypesResponse:
type: object
properties:
node_types:
type: array
description: Types of the node.
items:
$ref: '#/components/schemas/scaleway.rdb.v1.NodeType'
total_count:
type: integer
description: Total count of node-types available.
format: uint32
x-properties-order:
- node_types
- total_count
scaleway.rdb.v1.ListPrivilegesResponse:
type: object
properties:
privileges:
type: array
description: Privileges of a user in a database in a Database Instance.
items:
$ref: '#/components/schemas/scaleway.rdb.v1.Privilege'
total_count:
type: integer
description: Total count of privileges present on a database.
format: uint32
x-properties-order:
- privileges
- total_count
scaleway.rdb.v1.ListSnapshotsResponse:
type: object
properties:
snapshots:
type: array
description: List of snapshots.
items:
$ref: '#/components/schemas/scaleway.rdb.v1.Snapshot'
total_count:
type: integer
description: Total count of snapshots available.
format: uint32
x-properties-order:
- snapshots
- total_count
scaleway.rdb.v1.ListUsersResponse:
type: object
properties:
users:
type: array
description: List of users in a Database Instance.
items:
$ref: '#/components/schemas/scaleway.rdb.v1.User'
total_count:
type: integer
description: Total count of users present on a Database Instance.
format: uint32
x-properties-order:
- users
- total_count
scaleway.rdb.v1.Maintenance:
type: object
properties:
starts_at:
type: string
description: Start date of the maintenance window. (RFC 3339 format)
format: date-time
example: "2022-03-22T12:34:56.123456Z"
nullable: true
stops_at:
type: string
description: End date of the maintenance window. (RFC 3339 format)
format: date-time
example: "2022-03-22T12:34:56.123456Z"
nullable: true
closed_at:
type: string
description: Closed maintenance date. (RFC 3339 format)
format: date-time
example: "2022-03-22T12:34:56.123456Z"
nullable: true
reason:
type: string
description: Maintenance information message.
status:
type: string
description: Status of the maintenance.
enum:
- unknown
- pending
- done
- canceled
- ongoing
default: unknown
forced_at:
type: string
description: Time when Scaleway-side maintenance will be applied. (RFC 3339
format)
format: date-time
example: "2022-03-22T12:34:56.123456Z"
nullable: true
is_applicable:
type: boolean
description: Indicate if the maintenance can be applied by the user.
x-properties-order:
- starts_at
- stops_at
- closed_at
- reason
- status
- forced_at
- is_applicable
scaleway.rdb.v1.NodeType:
type: object
properties:
name:
type: string
description: Node Type name identifier.
stock_status:
type: string
description: Current stock status for the Node Type.
enum:
- unknown
- low_stock
- out_of_stock
- available
default: unknown
description:
type: string
description: Current specs of the offer.
vcpus:
type: integer
description: Number of virtual CPUs.
format: uint32
memory:
type: integer
description: Quantity of RAM. (in bytes)
format: uint64
volume_constraint:
type: object
description: '[deprecated] Node Type volume constraints.'
deprecated: true
properties:
min_size:
type: integer
description: '[deprecated] Minimum size required for the Volume. (in
bytes)'
format: uint64
max_size:
type: integer
description: '[deprecated] Maximum size required for the Volume. (in
bytes)'
format: uint64
x-properties-order:
- min_size
- max_size
is_bssd_compatible:
type: boolean
description: The Node Type is compliant with Block Storage.
deprecated: true
disabled:
type: boolean
description: The Node Type is currently disabled.
beta:
type: boolean
description: The Node Type is currently in beta.
available_volume_types:
type: array
description: Available storage options for the Node Type.
items:
$ref: '#/components/schemas/scaleway.rdb.v1.NodeType.VolumeType'
is_ha_required:
type: boolean
description: The Node Type can be used only with high availability option.
generation:
type: string
description: Generation associated with the NodeType offer.
enum:
- unknown_generation
- generation_v1
- generation_v2
- generation_v3
default: unknown_generation
instance_range:
type: string
description: Instance range associated with the NodeType offer.
region:
type: string
description: Region the Node Type is in.
x-properties-order:
- name
- stock_status
- description
- vcpus
- memory
- volume_constraint
- is_bssd_compatible
- disabled
- beta
- available_volume_types
- is_ha_required
- generation
- instance_range
- region
scaleway.rdb.v1.NodeType.VolumeType:
type: object
properties:
type:
type: string
description: Volume Type.
enum:
- lssd
- bssd
- sbs_5k
- sbs_15k
default: lssd
description:
type: string
description: The description of the Volume.
min_size:
type: integer
description: Minimum size required for the Volume. (in bytes)
format: uint64
max_size:
type: integer
description: Maximum size required for the Volume. (in bytes)
format: uint64
chunk_size:
type: integer
description: Minimum increment level for a Block Storage volume size. (in
bytes)
format: uint64
class:
type: string
description: The storage class of the volume.
enum:
- unknown_storage_class
- lssd
- bssd
- sbs
default: unknown_storage_class
x-properties-order:
- type
- description
- min_size
- max_size
- chunk_size
- class
scaleway.rdb.v1.PrepareInstanceLogsResponse:
type: object
properties:
instance_logs:
type: array
description: Instance logs for a Database Instance between a start and an
end date.
items:
$ref: '#/components/schemas/scaleway.rdb.v1.InstanceLog'
x-properties-order:
- instance_logs
scaleway.rdb.v1.Privilege:
type: object
properties:
permission:
type: string
description: Permission (Read, Read/Write, All, Custom).
enum:
- readonly
- readwrite
- all
- custom
- none
default: readonly
database_name:
type: string
description: Name of the database.
user_name:
type: string
description: Name of the user.
x-properties-order:
- permission
- database_name
- user_name
scaleway.rdb.v1.ReadReplica:
type: object
properties:
id:
type: string
description: UUID of the Read Replica. (UUID format)
example: 6170692e-7363-616c-6577-61792e636f6d
endpoints:
type: array
description: Display Read Replica connection information.
items:
$ref: '#/components/schemas/scaleway.rdb.v1.Endpoint'
status:
type: string
description: Read replica status.
enum:
- unknown
- provisioning
- initializing
- ready
- deleting
- error
- locked
- configuring
- promoting
default: unknown
region:
type: string
description: Region the Read Replica is in.
same_zone:
type: boolean
description: Whether the replica is in the same availability zone as the
main instance nodes or not.
instance_id:
type: string
description: UUID of the Database Instance.
x-properties-order:
- id
- endpoints
- status
- region
- same_zone
- instance_id
scaleway.rdb.v1.ReadReplicaEndpointSpec:
type: object
properties:
direct_access:
type: object
description: Direct access endpoint specifications. Public endpoint reserved
for Read Replicas. One per Read Replica.
nullable: true
x-one-of: spec
private_network:
type: object
description: Private Network endpoint specifications. One at the most per
Read Replica. Cannot be updated (has to be deleted and recreated).
properties:
private_network_id:
type: string
description: UUID of the Private Network to be connected to the Read
Replica. (UUID format)
example: 6170692e-7363-616c-6577-61792e636f6d
service_ip:
type: string
description: Endpoint IPv4 address with a CIDR notation. Refer to the
official Scaleway documentation to learn more about IP and subnet
limitations. (IP network)
example: 1.2.3.4/32
nullable: true
x-one-of: config
ipam_config:
type: object
description: Automated configuration of your Private Network endpoint
with Scaleway IPAM service. One at the most per Database Instance
or Read Replica (a Database Instance and its Read Replica can have
different private networks). Cannot be updated (has to be deleted
and recreated).
nullable: true
x-one-of: config
nullable: true
x-properties-order:
- private_network_id
- service_ip
- ipam_config
x-one-of: spec
x-properties-order:
- direct_access
- private_network
scaleway.rdb.v1.SetInstanceACLRulesResponse:
type: object
properties:
rules:
type: array
description: ACLs rules configured for a Database Instance.
items:
$ref: '#/components/schemas/scaleway.rdb.v1.ACLRule'
x-properties-order:
- rules
scaleway.rdb.v1.SetInstanceSettingsResponse:
type: object
properties:
settings:
type: array
description: Settings configured for a Database Instance.
items:
$ref: '#/components/schemas/scaleway.rdb.v1.InstanceSetting'
x-properties-order:
- settings
scaleway.rdb.v1.Snapshot:
type: object
properties:
id:
type: string
description: UUID of the snapshot.
instance_id:
type: string
description: UUID of the Database Instance.
name:
type: string
description: Name of the snapshot.
status:
type: string
description: Status of the snapshot.
enum:
- unknown
- creating
- ready
- restoring
- deleting
- error
- locked
default: unknown
size:
type: integer
description: Size of the snapshot. (in bytes)
format: uint64
nullable: true
expires_at:
type: string
description: Expiration date (must follow the ISO 8601 format). (RFC 3339
format)
format: date-time
example: "2022-03-22T12:34:56.123456Z"
nullable: true
created_at:
type: string
description: Creation date (must follow the ISO 8601 format). (RFC 3339
format)
format: date-time
example: "2022-03-22T12:34:56.123456Z"
nullable: true
updated_at:
type: string
description: Updated date (must follow the ISO 8601 format). (RFC 3339 format)
format: date-time
example: "2022-03-22T12:34:56.123456Z"
nullable: true
instance_name:
type: string
description: Name of the Database Instance of the snapshot.
node_type:
type: string
description: Source node type.
volume_type:
type: object
description: Type of volume where data is stored (lssd, bssd or sbs).
properties:
type:
$ref: '#/components/schemas/scaleway.rdb.v1.Volume.Type'
class:
$ref: '#/components/schemas/scaleway.rdb.v1.StorageClass'
x-properties-order:
- type
- class
region:
type: string
description: Region of this snapshot.
x-properties-order:
- id
- instance_id
- name
- status
- size
- expires_at
- created_at
- updated_at
- instance_name
- node_type
- volume_type
- region
scaleway.rdb.v1.StorageClass:
type: string
enum:
- unknown_storage_class
- lssd
- bssd
- sbs
default: unknown_storage_class
scaleway.rdb.v1.UpgradableVersion:
type: object
properties:
id:
type: string
description: (UUID format)
example: 6170692e-7363-616c-6577-61792e636f6d
name:
type: string
version:
type: string
minor_version:
type: string
x-properties-order:
- id
- name
- version
- minor_version
scaleway.rdb.v1.User:
type: object
properties:
name:
type: string
description: Name of the user (Length must be between 1 and 63 characters
for PostgreSQL and between 1 and 32 characters for MySQL. First character
must be an alphabet character (a-zA-Z). Your username cannot start with
'_rdb' or in PostgreSQL, 'pg_'. Only a-zA-Z0-9_$- characters are accepted).
is_admin:
type: boolean
description: Defines whether or not a user got administrative privileges
on the Database Instance.
x-properties-order:
- name
- is_admin
scaleway.rdb.v1.Volume.Type:
type: string
enum:
- lssd
- bssd
- sbs_5k
- sbs_15k
default: lssd
scaleway.std.File:
type: object
properties:
name:
type: string
content_type:
type: string
content:
type: string
x-properties-order:
- name
- content_type
- content
scaleway.std.TimeSeries:
type: object
properties:
name:
type: string
points:
type: array
items:
$ref: '#/components/schemas/scaleway.std.TimeSeries.Point'
metadata:
type: object
properties:
:
type: string
additionalProperties: true
x-properties-order:
- name
- points
- metadata
scaleway.std.TimeSeries.Point:
type: array
items:
oneOf:
- type: string
format: date-time
- type: number
securitySchemes:
scaleway:
in: header
name: X-Auth-Token
type: apiKey
paths:
/rdb/v1/regions/{region}/backups:
get:
tags:
- Backups
operationId: ListDatabaseBackups
summary: List database backups
description: List all backups in a specified region, for a given Scaleway Organization
or Scaleway Project. By default, the backups listed are ordered by creation
date in ascending order. This can be modified via the `order_by` field.
parameters:
- in: path
name: region
description: The region you want to target
required: true
schema:
type: string
enum:
- fr-par
- nl-ams
- pl-waw
- in: query
name: name
description: Name of the database backups.
schema:
type: string
- in: query
name: order_by
description: Criteria to use when ordering database backups listing.
schema:
type: string
enum:
- created_at_asc
- created_at_desc
- name_asc
- name_desc
- status_asc
- status_desc
default: created_at_asc
- in: query
name: instance_id
description: UUID of the Database Instance.
schema:
type: string
- in: query
name: organization_id
description: Organization ID of the Organization the database backups belong
to.
schema:
type: string
- in: query
name: project_id
description: Project ID of the Project the database backups belong to.
schema:
type: string
- in: query
name: page
schema:
$ref: '#/components/schemas/google.protobuf.Int32Value'
- in: query
name: page_size
schema:
type: integer
format: uint32
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: '#/components/schemas/scaleway.rdb.v1.ListDatabaseBackupsResponse'
security:
- scaleway: []
x-codeSamples:
- lang: cURL
source: |-
curl -X GET \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
"https://api.scaleway.com/rdb/v1/regions/{region}/backups"
- lang: HTTPie
source: |-
http GET "https://api.scaleway.com/rdb/v1/regions/{region}/backups" \
X-Auth-Token:$SCW_SECRET_KEY
post:
tags:
- Backups
operationId: CreateDatabaseBackup
summary: Create a database backup
description: Create a new backup. You must set the `instance_id`, `database_name`,
`name` and `expires_at` parameters.
parameters:
- in: path
name: region
description: The region you want to target
required: true
schema:
type: string
enum:
- fr-par
- nl-ams
- pl-waw
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: '#/components/schemas/scaleway.rdb.v1.DatabaseBackup'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
instance_id:
type: string
description: UUID of the Database Instance.
database_name:
type: string
description: Name of the database you want to back up.
name:
type: string
description: Name of the backup.
expires_at:
type: string
description: Expiration date (must follow the ISO 8601 format).
(RFC 3339 format)
format: date-time
example: "2022-03-22T12:34:56.123456Z"
nullable: true
required:
- instance_id
- database_name
x-properties-order:
- instance_id
- database_name
- name
- expires_at
security:
- scaleway: []
x-codeSamples:
- lang: cURL
source: |-
curl -X POST \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"database_name": "string",
"instance_id": "string",
"name": "string"
}' \
"https://api.scaleway.com/rdb/v1/regions/{region}/backups"
- lang: HTTPie
source: |-
http POST "https://api.scaleway.com/rdb/v1/regions/{region}/backups" \
X-Auth-Token:$SCW_SECRET_KEY \
database_name="string" \
instance_id="string" \
name="string"
/rdb/v1/regions/{region}/backups/{database_backup_id}:
get:
tags:
- Backups
operationId: GetDatabaseBackup
summary: Get a database backup
description: Retrieve information about a given backup, specified by its database
backup ID and region. Full details about the backup, like size, URL and expiration
date, are returned in the response.
parameters:
- in: path
name: region
description: The region you want to target
required: true
schema:
type: string
enum:
- fr-par
- nl-ams
- pl-waw
- in: path
name: database_backup_id
description: UUID of the database backup.
required: true
schema:
type: string
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: '#/components/schemas/scaleway.rdb.v1.DatabaseBackup'
security:
- scaleway: []
x-codeSamples:
- lang: cURL
source: |-
curl -X GET \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
"https://api.scaleway.com/rdb/v1/regions/{region}/backups/{database_backup_id}"
- lang: HTTPie
source: |-
http GET "https://api.scaleway.com/rdb/v1/regions/{region}/backups/{database_backup_id}" \
X-Auth-Token:$SCW_SECRET_KEY
patch:
tags:
- Backups
operationId: UpdateDatabaseBackup
summary: Update a database backup
description: Update the parameters of a backup, including name and expiration
date.
parameters:
- in: path
name: region
description: The region you want to target
required: true
schema:
type: string
enum:
- fr-par
- nl-ams
- pl-waw
- in: path
name: database_backup_id
description: UUID of the database backup to update.
required: true
schema:
type: string
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: '#/components/schemas/scaleway.rdb.v1.DatabaseBackup'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
name:
type: string
description: Name of the Database Backup.
nullable: true
expires_at:
type: string
description: Expiration date (must follow the ISO 8601 format).
(RFC 3339 format)
format: date-time
example: "2022-03-22T12:34:56.123456Z"
nullable: true
x-properties-order:
- name
- expires_at
security:
- scaleway: []
x-codeSamples:
- lang: cURL
source: |-
curl -X PATCH \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{}' \
"https://api.scaleway.com/rdb/v1/regions/{region}/backups/{database_backup_id}"
- lang: HTTPie
source: |-
http PATCH "https://api.scaleway.com/rdb/v1/regions/{region}/backups/{database_backup_id}" \
X-Auth-Token:$SCW_SECRET_KEY
delete:
tags:
- Backups
operationId: DeleteDatabaseBackup
summary: Delete a database backup
description: Delete a backup, specified by its database backup ID and region.
Deleting a backup is permanent, and cannot be undone.
parameters:
- in: path
name: region
description: The region you want to target
required: true
schema:
type: string
enum:
- fr-par
- nl-ams
- pl-waw
- in: path
name: database_backup_id
description: UUID of the database backup to delete.
required: true
schema:
type: string
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: '#/components/schemas/scaleway.rdb.v1.DatabaseBackup'
security:
- scaleway: []
x-codeSamples:
- lang: cURL
source: |-
curl -X DELETE \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
"https://api.scaleway.com/rdb/v1/regions/{region}/backups/{database_backup_id}"
- lang: HTTPie
source: |-
http DELETE "https://api.scaleway.com/rdb/v1/regions/{region}/backups/{database_backup_id}" \
X-Auth-Token:$SCW_SECRET_KEY
/rdb/v1/regions/{region}/backups/{database_backup_id}/export:
post:
tags:
- Backups
operationId: ExportDatabaseBackup
summary: Export a database backup
description: Export a backup, specified by the `database_backup_id` and the
`region` parameters. The download URL is returned in the response.
parameters:
- in: path
name: region
description: The region you want to target
required: true
schema:
type: string
enum:
- fr-par
- nl-ams
- pl-waw
- in: path
name: database_backup_id
description: UUID of the database backup you want to export.
required: true
schema:
type: string
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: '#/components/schemas/scaleway.rdb.v1.DatabaseBackup'
requestBody:
required: true
content:
application/json:
schema:
type: object
security:
- scaleway: []
x-codeSamples:
- lang: cURL
source: |-
curl -X POST \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{}' \
"https://api.scaleway.com/rdb/v1/regions/{region}/backups/{database_backup_id}/export"
- lang: HTTPie
source: |-
http POST "https://api.scaleway.com/rdb/v1/regions/{region}/backups/{database_backup_id}/export" \
X-Auth-Token:$SCW_SECRET_KEY
/rdb/v1/regions/{region}/backups/{database_backup_id}/restore:
post:
tags:
- Backups
operationId: RestoreDatabaseBackup
summary: Restore a database backup
description: Launch the process of restoring database backup. You must specify
the `instance_id` of the Database Instance of destination, where the backup
will be restored. Note that large database backups can take up to several
hours to restore.
parameters:
- in: path
name: region
description: The region you want to target
required: true
schema:
type: string
enum:
- fr-par
- nl-ams
- pl-waw
- in: path
name: database_backup_id
description: Backup of a logical database.
required: true
schema:
type: string
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: '#/components/schemas/scaleway.rdb.v1.DatabaseBackup'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
database_name:
type: string
description: Defines the destination database to restore into a
specified database (the default destination is set to the origin
database of the backup).
nullable: true
instance_id:
type: string
description: Defines the Database Instance where the backup has
to be restored.
required:
- instance_id
x-properties-order:
- database_name
- instance_id
security:
- scaleway: []
x-codeSamples:
- lang: cURL
source: |-
curl -X POST \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{"instance_id":"string"}' \
"https://api.scaleway.com/rdb/v1/regions/{region}/backups/{database_backup_id}/restore"
- lang: HTTPie
source: |-
http POST "https://api.scaleway.com/rdb/v1/regions/{region}/backups/{database_backup_id}/restore" \
X-Auth-Token:$SCW_SECRET_KEY \
instance_id="string"
/rdb/v1/regions/{region}/database-engines:
get:
tags:
- Engines
operationId: ListDatabaseEngines
summary: List available database engines
description: List the PostgreSQL and MySQL database engines available at Scaleway.
parameters:
- in: path
name: region
description: The region you want to target
required: true
schema:
type: string
enum:
- fr-par
- nl-ams
- pl-waw
- in: query
name: name
description: Name of the database engine.
schema:
type: string
- in: query
name: version
description: Version of the database engine.
schema:
type: string
- in: query
name: page
schema:
$ref: '#/components/schemas/google.protobuf.Int32Value'
- in: query
name: page_size
schema:
type: integer
format: uint32
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: '#/components/schemas/scaleway.rdb.v1.ListDatabaseEnginesResponse'
security:
- scaleway: []
x-codeSamples:
- lang: cURL
source: |-
curl -X GET \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
"https://api.scaleway.com/rdb/v1/regions/{region}/database-engines"
- lang: HTTPie
source: |-
http GET "https://api.scaleway.com/rdb/v1/regions/{region}/database-engines" \
X-Auth-Token:$SCW_SECRET_KEY
/rdb/v1/regions/{region}/endpoints/{endpoint_id}:
get:
tags:
- Endpoints
operationId: GetEndpoint
summary: Get a Database Instance endpoint
description: Retrieve information about a Database Instance endpoint. Full details
about the endpoint, like `ip`, `port`, `private_network` and `load_balancer`
specifications are returned in the response.
parameters:
- in: path
name: region
description: The region you want to target
required: true
schema:
type: string
enum:
- fr-par
- nl-ams
- pl-waw
- in: path
name: endpoint_id
description: UUID of the endpoint you want to get.
required: true
schema:
type: string
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: '#/components/schemas/scaleway.rdb.v1.Endpoint'
security:
- scaleway: []
x-codeSamples:
- lang: cURL
source: |-
curl -X GET \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
"https://api.scaleway.com/rdb/v1/regions/{region}/endpoints/{endpoint_id}"
- lang: HTTPie
source: |-
http GET "https://api.scaleway.com/rdb/v1/regions/{region}/endpoints/{endpoint_id}" \
X-Auth-Token:$SCW_SECRET_KEY
delete:
tags:
- Endpoints
operationId: DeleteEndpoint
summary: Delete a Database Instance endpoint
description: Delete the endpoint of a Database Instance. You must specify the
`region` and `endpoint_id` parameters of the endpoint you want to delete.
Note that might need to update any environment configurations that point to
the deleted endpoint.
parameters:
- in: path
name: region
description: The region you want to target
required: true
schema:
type: string
enum:
- fr-par
- nl-ams
- pl-waw
- in: path
name: endpoint_id
description: |-
UUID of the endpoint you want to delete.
This endpoint can also be used to delete a Read Replica endpoint.
required: true
schema:
type: string
responses:
"204":
description: ""
security:
- scaleway: []
x-codeSamples:
- lang: cURL
source: |-
curl -X DELETE \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
"https://api.scaleway.com/rdb/v1/regions/{region}/endpoints/{endpoint_id}"
- lang: HTTPie
source: |-
http DELETE "https://api.scaleway.com/rdb/v1/regions/{region}/endpoints/{endpoint_id}" \
X-Auth-Token:$SCW_SECRET_KEY
/rdb/v1/regions/{region}/endpoints/{endpoint_id}/migrate:
post:
tags:
- Endpoints
operationId: MigrateEndpoint
summary: Migrate an existing instance endpoint to another instance
parameters:
- in: path
name: region
description: The region you want to target
required: true
schema:
type: string
enum:
- fr-par
- nl-ams
- pl-waw
- in: path
name: endpoint_id
description: UUID of the endpoint you want to migrate.
required: true
schema:
type: string
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: '#/components/schemas/scaleway.rdb.v1.Endpoint'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
instance_id:
type: string
description: UUID of the instance you want to attach the endpoint
to.
required:
- instance_id
x-properties-order:
- instance_id
security:
- scaleway: []
x-codeSamples:
- lang: cURL
source: |-
curl -X POST \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{"instance_id":"string"}' \
"https://api.scaleway.com/rdb/v1/regions/{region}/endpoints/{endpoint_id}/migrate"
- lang: HTTPie
source: |-
http POST "https://api.scaleway.com/rdb/v1/regions/{region}/endpoints/{endpoint_id}/migrate" \
X-Auth-Token:$SCW_SECRET_KEY \
instance_id="string"
/rdb/v1/regions/{region}/instances:
get:
tags:
- Database Instances
operationId: ListInstances
summary: List Database Instances
description: List all Database Instances in the specified region, for a given
Scaleway Organization or Scaleway Project. By default, the Database Instances
returned in the list are ordered by creation date in ascending order, though
this can be modified via the order_by field. You can define additional parameters
for your query, such as `tags` and `name`. For the `name` parameter, the value
you include will be checked against the whole name string to see if it includes
the string you put in the parameter.
parameters:
- in: path
name: region
description: The region you want to target
required: true
schema:
type: string
enum:
- fr-par
- nl-ams
- pl-waw
- in: query
name: tags
description: List Database Instances that have a given tag.
schema:
type: array
items:
type: string
- in: query
name: name
description: Lists Database Instances that match a name pattern.
schema:
type: string
- in: query
name: order_by
description: Criteria to use when ordering Database Instance listings.
schema:
type: string
enum:
- created_at_asc
- created_at_desc
- name_asc
- name_desc
- region
- status_asc
- status_desc
default: created_at_asc
- in: query
name: organization_id
description: Please use project_id instead.
schema:
type: string
- in: query
name: project_id
description: Project ID to list the Database Instance of.
schema:
type: string
- in: query
name: has_maintenances
description: Filter to only list instances with a scheduled maintenance.
schema:
type: boolean
- in: query
name: page
schema:
$ref: '#/components/schemas/google.protobuf.Int32Value'
- in: query
name: page_size
schema:
type: integer
format: uint32
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: '#/components/schemas/scaleway.rdb.v1.ListInstancesResponse'
security:
- scaleway: []
x-codeSamples:
- lang: cURL
source: |-
curl -X GET \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
"https://api.scaleway.com/rdb/v1/regions/{region}/instances"
- lang: HTTPie
source: |-
http GET "https://api.scaleway.com/rdb/v1/regions/{region}/instances" \
X-Auth-Token:$SCW_SECRET_KEY
post:
tags:
- Database Instances
operationId: CreateInstance
summary: Create a Database Instance
description: Create a new Database Instance. You must set the `engine`, `user_name`,
`password` and `node_type` parameters. Optionally, you can specify the volume
type and size.
parameters:
- in: path
name: region
description: The region you want to target
required: true
schema:
type: string
enum:
- fr-par
- nl-ams
- pl-waw
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: '#/components/schemas/scaleway.rdb.v1.Instance'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
organization_id:
type: string
description: Please use project_id instead.
deprecated: true
nullable: true
x-one-of: ProjectIdentifier
project_id:
type: string
description: The Project ID on which the Database Instance will
be created.
nullable: true
x-one-of: ProjectIdentifier
name:
type: string
description: Name of the Database Instance.
engine:
type: string
description: Database engine of the Database Instance (PostgreSQL,
MySQL, ...).
user_name:
type: string
description: Username created when the Database Instance is created.
password:
type: string
description: Password of the user. Password must be between 8 and
128 characters, contain at least one digit, one uppercase, one
lowercase and one special character.
node_type:
type: string
description: Type of node to use for the Database Instance.
is_ha_cluster:
type: boolean
description: Defines whether or not High-Availability is enabled.
disable_backup:
type: boolean
description: Defines whether or not backups are disabled.
tags:
type: array
description: Tags to apply to the Database Instance.
items:
type: string
init_settings:
type: array
description: List of engine settings to be set upon Database Instance
initialization.
items:
$ref: '#/components/schemas/scaleway.rdb.v1.InstanceSetting'
volume_type:
type: string
description: Type of volume where data is stored (lssd, bssd, ...).
enum:
- lssd
- bssd
- sbs_5k
- sbs_15k
default: lssd
volume_size:
type: integer
description: Volume size when volume_type is not lssd. (in bytes)
format: uint64
init_endpoints:
type: array
description: One or multiple EndpointSpec used to expose your Database
Instance. A load_balancer public endpoint is systematically created.
items:
$ref: '#/components/schemas/scaleway.rdb.v1.EndpointSpec'
backup_same_region:
type: boolean
description: Defines whether to or not to store logical backups
in the same region as the Database Instance.
encryption:
type: object
description: Encryption at rest settings for your Database Instance.
properties:
enabled:
type: boolean
x-properties-order:
- enabled
required:
- engine
- user_name
- password
- node_type
x-properties-order:
- organization_id
- project_id
- name
- engine
- user_name
- password
- node_type
- is_ha_cluster
- disable_backup
- tags
- init_settings
- volume_type
- volume_size
- init_endpoints
- backup_same_region
- encryption
security:
- scaleway: []
x-codeSamples:
- lang: cURL
source: |-
curl -X POST \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"backup_same_region": false,
"disable_backup": false,
"engine": "string",
"is_ha_cluster": false,
"name": "string",
"node_type": "string",
"password": "string",
"user_name": "string",
"volume_size": 42
}' \
"https://api.scaleway.com/rdb/v1/regions/{region}/instances"
- lang: HTTPie
source: |-
http POST "https://api.scaleway.com/rdb/v1/regions/{region}/instances" \
X-Auth-Token:$SCW_SECRET_KEY \
backup_same_region:=false \
disable_backup:=false \
engine="string" \
is_ha_cluster:=false \
name="string" \
node_type="string" \
password="string" \
user_name="string" \
volume_size:=42
/rdb/v1/regions/{region}/instances/{instance_id}:
get:
tags:
- Database Instances
operationId: GetInstance
summary: Get a Database Instance
description: Retrieve information about a given Database Instance, specified
by the `region` and `instance_id` parameters. Its full details, including
name, status, IP address and port, are returned in the response object.
parameters:
- in: path
name: region
description: The region you want to target
required: true
schema:
type: string
enum:
- fr-par
- nl-ams
- pl-waw
- in: path
name: instance_id
description: UUID of the Database Instance.
required: true
schema:
type: string
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: '#/components/schemas/scaleway.rdb.v1.Instance'
security:
- scaleway: []
x-codeSamples:
- lang: cURL
source: |-
curl -X GET \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
"https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}"
- lang: HTTPie
source: |-
http GET "https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}" \
X-Auth-Token:$SCW_SECRET_KEY
patch:
tags:
- Database Instances
operationId: UpdateInstance
summary: Update a Database Instance
description: Update the parameters of a Database Instance, including name, tags
and backup schedule details.
parameters:
- in: path
name: region
description: The region you want to target
required: true
schema:
type: string
enum:
- fr-par
- nl-ams
- pl-waw
- in: path
name: instance_id
description: UUID of the Database Instance to update.
required: true
schema:
type: string
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: '#/components/schemas/scaleway.rdb.v1.Instance'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
backup_schedule_frequency:
type: integer
description: In hours.
format: uint32
nullable: true
backup_schedule_retention:
type: integer
description: In days.
format: uint32
nullable: true
is_backup_schedule_disabled:
type: boolean
description: Defines whether or not the backup schedule is disabled.
nullable: true
name:
type: string
description: Name of the Database Instance.
nullable: true
tags:
type: array
description: Tags of a Database Instance.
nullable: true
items:
type: string
logs_policy:
type: object
description: Logs policy of the Database Instance.
properties:
max_age_retention:
type: integer
description: Max age (in days) of remote logs to keep on the
Database Instance.
format: uint32
nullable: true
total_disk_retention:
type: integer
description: Max disk size of remote logs to keep on the Database
Instance. (in bytes)
format: uint64
nullable: true
x-properties-order:
- max_age_retention
- total_disk_retention
backup_same_region:
type: boolean
description: Store logical backups in the same region as the Database
Instance.
nullable: true
backup_schedule_start_hour:
type: integer
description: Defines the start time of the autobackup.
format: uint32
nullable: true
x-properties-order:
- backup_schedule_frequency
- backup_schedule_retention
- is_backup_schedule_disabled
- name
- tags
- logs_policy
- backup_same_region
- backup_schedule_start_hour
security:
- scaleway: []
x-codeSamples:
- lang: cURL
source: |-
curl -X PATCH \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{}' \
"https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}"
- lang: HTTPie
source: |-
http PATCH "https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}" \
X-Auth-Token:$SCW_SECRET_KEY
delete:
tags:
- Database Instances
operationId: DeleteInstance
summary: Delete a Database Instance
description: Delete a given Database Instance, specified by the `region` and
`instance_id` parameters. Deleting a Database Instance is permanent, and cannot
be undone. Note that upon deletion all your data will be lost.
parameters:
- in: path
name: region
description: The region you want to target
required: true
schema:
type: string
enum:
- fr-par
- nl-ams
- pl-waw
- in: path
name: instance_id
description: UUID of the Database Instance to delete.
required: true
schema:
type: string
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: '#/components/schemas/scaleway.rdb.v1.Instance'
security:
- scaleway: []
x-codeSamples:
- lang: cURL
source: |-
curl -X DELETE \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
"https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}"
- lang: HTTPie
source: |-
http DELETE "https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}" \
X-Auth-Token:$SCW_SECRET_KEY
/rdb/v1/regions/{region}/instances/{instance_id}/acls:
get:
tags:
- ACLs
operationId: ListInstanceACLRules
summary: List ACL rules of a Database Instance
description: List the ACL rules for a given Database Instance. The response
is an array of ACL objects, each one representing an ACL that denies, allows
or redirects traffic based on certain conditions.
parameters:
- in: path
name: region
description: The region you want to target
required: true
schema:
type: string
enum:
- fr-par
- nl-ams
- pl-waw
- in: path
name: instance_id
description: UUID of the Database Instance.
required: true
schema:
type: string
- in: query
name: page
schema:
$ref: '#/components/schemas/google.protobuf.Int32Value'
- in: query
name: page_size
schema:
type: integer
format: uint32
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: '#/components/schemas/scaleway.rdb.v1.ListInstanceACLRulesResponse'
security:
- scaleway: []
x-codeSamples:
- lang: cURL
source: |-
curl -X GET \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
"https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/acls"
- lang: HTTPie
source: |-
http GET "https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/acls" \
X-Auth-Token:$SCW_SECRET_KEY
post:
tags:
- ACLs
operationId: AddInstanceACLRules
summary: Add an ACL rule to a Database Instance
description: Add an additional ACL rule to a Database Instance.
parameters:
- in: path
name: region
description: The region you want to target
required: true
schema:
type: string
enum:
- fr-par
- nl-ams
- pl-waw
- in: path
name: instance_id
description: UUID of the Database Instance you want to add ACL rules to.
required: true
schema:
type: string
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: '#/components/schemas/scaleway.rdb.v1.AddInstanceACLRulesResponse'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
rules:
type: array
description: ACL rules to add to the Database Instance.
items:
$ref: '#/components/schemas/scaleway.rdb.v1.ACLRuleRequest'
required:
- rules
x-properties-order:
- rules
security:
- scaleway: []
x-codeSamples:
- lang: cURL
source: |-
curl -X POST \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{"rules":[""]}' \
"https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/acls"
- lang: HTTPie
source: |-
http POST "https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/acls" \
X-Auth-Token:$SCW_SECRET_KEY \
rules:='[""]'
put:
tags:
- ACLs
operationId: SetInstanceACLRules
summary: Set ACL rules for a Database Instance
description: Replace all the ACL rules of a Database Instance.
parameters:
- in: path
name: region
description: The region you want to target
required: true
schema:
type: string
enum:
- fr-par
- nl-ams
- pl-waw
- in: path
name: instance_id
description: UUID of the Database Instance where the ACL rules must be set.
required: true
schema:
type: string
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: '#/components/schemas/scaleway.rdb.v1.SetInstanceACLRulesResponse'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
rules:
type: array
description: ACL rules to define for the Database Instance.
items:
$ref: '#/components/schemas/scaleway.rdb.v1.ACLRuleRequest'
required:
- rules
x-properties-order:
- rules
security:
- scaleway: []
x-codeSamples:
- lang: cURL
source: |-
curl -X PUT \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{"rules":[""]}' \
"https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/acls"
- lang: HTTPie
source: |-
http PUT "https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/acls" \
X-Auth-Token:$SCW_SECRET_KEY \
rules:='[""]'
delete:
tags:
- ACLs
operationId: DeleteInstanceACLRules
summary: Delete ACL rules of a Database Instance
description: Delete one or more ACL rules of a Database Instance.
parameters:
- in: path
name: region
description: The region you want to target
required: true
schema:
type: string
enum:
- fr-par
- nl-ams
- pl-waw
- in: path
name: instance_id
description: UUID of the Database Instance you want to delete an ACL rule
from.
required: true
schema:
type: string
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: '#/components/schemas/scaleway.rdb.v1.DeleteInstanceACLRulesResponse'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
acl_rule_ips:
type: array
description: IP addresses defined in the ACL rules of the Database
Instance.
items:
type: string
required:
- acl_rule_ips
x-properties-order:
- acl_rule_ips
security:
- scaleway: []
x-codeSamples:
- lang: cURL
source: |-
curl -X DELETE \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{"acl_rule_ips":["string"]}' \
"https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/acls"
- lang: HTTPie
source: |-
http DELETE "https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/acls" \
X-Auth-Token:$SCW_SECRET_KEY \
acl_rule_ips:='["string"]'
/rdb/v1/regions/{region}/instances/{instance_id}/apply-maintenance:
post:
tags:
- Database Instances
operationId: ApplyInstanceMaintenance
summary: Apply Database Instance maintenance
description: Apply maintenance tasks to your Database Instance. This will trigger
pending maintenance tasks to start in your Database Instance and can generate
service interruption. Maintenance tasks can be applied between `starts_at`
and `stops_at` times, and are run directly by Scaleway at `forced_at` timestamp.
parameters:
- in: path
name: region
description: The region you want to target
required: true
schema:
type: string
enum:
- fr-par
- nl-ams
- pl-waw
- in: path
name: instance_id
description: UUID of the Database Instance you want to apply maintenance.
required: true
schema:
type: string
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: '#/components/schemas/scaleway.rdb.v1.Maintenance'
requestBody:
required: true
content:
application/json:
schema:
type: object
security:
- scaleway: []
x-codeSamples:
- lang: cURL
source: |-
curl -X POST \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{}' \
"https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/apply-maintenance"
- lang: HTTPie
source: |-
http POST "https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/apply-maintenance" \
X-Auth-Token:$SCW_SECRET_KEY
/rdb/v1/regions/{region}/instances/{instance_id}/certificate:
get:
tags:
- Database Instances
operationId: GetInstanceCertificate
summary: Get the TLS certificate of a Database Instance
description: Retrieve information about the TLS certificate of a given Database
Instance. Details like name and content are returned in the response.
parameters:
- in: path
name: region
description: The region you want to target
required: true
schema:
type: string
enum:
- fr-par
- nl-ams
- pl-waw
- in: path
name: instance_id
description: UUID of the Database Instance.
required: true
schema:
type: string
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: '#/components/schemas/scaleway.std.File'
security:
- scaleway: []
x-codeSamples:
- lang: cURL
source: |-
curl -X GET \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
"https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/certificate"
- lang: HTTPie
source: |-
http GET "https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/certificate" \
X-Auth-Token:$SCW_SECRET_KEY
/rdb/v1/regions/{region}/instances/{instance_id}/clone:
post:
tags:
- Database Instances
operationId: CloneInstance
summary: Clone a Database Instance
description: Clone a given Database Instance, specified by the `region` and
`instance_id` parameters. The clone feature allows you to create a new Database
Instance from an existing one. The clone includes all existing databases,
users and permissions. You can create a clone on a Database Instance bigger
than your current one.
parameters:
- in: path
name: region
description: The region you want to target
required: true
schema:
type: string
enum:
- fr-par
- nl-ams
- pl-waw
- in: path
name: instance_id
description: UUID of the Database Instance you want to clone.
required: true
schema:
type: string
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: '#/components/schemas/scaleway.rdb.v1.Instance'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
name:
type: string
description: Name of the Database Instance clone.
node_type:
type: string
description: Node type of the clone.
nullable: true
x-properties-order:
- name
- node_type
security:
- scaleway: []
x-codeSamples:
- lang: cURL
source: |-
curl -X POST \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"string"}' \
"https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/clone"
- lang: HTTPie
source: |-
http POST "https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/clone" \
X-Auth-Token:$SCW_SECRET_KEY \
name="string"
/rdb/v1/regions/{region}/instances/{instance_id}/databases:
get:
tags:
- Databases
operationId: ListDatabases
summary: List databases in a Database Instance
description: List all databases of a given Database Instance. By default, the
databases returned in the list are ordered by creation date in ascending order,
though this can be modified via the order_by field. You can define additional
parameters for your query, such as `name`, `managed` and `owner`.
parameters:
- in: path
name: region
description: The region you want to target
required: true
schema:
type: string
enum:
- fr-par
- nl-ams
- pl-waw
- in: path
name: instance_id
description: UUID of the Database Instance to list the databases of.
required: true
schema:
type: string
- in: query
name: name
description: Name of the database.
schema:
type: string
- in: query
name: managed
description: Defines whether or not the database is managed.
schema:
type: boolean
- in: query
name: owner
description: User that owns this database.
schema:
type: string
- in: query
name: order_by
description: Criteria to use when ordering database listing.
schema:
type: string
enum:
- name_asc
- name_desc
- size_asc
- size_desc
default: name_asc
- in: query
name: skip_size_retrieval
description: Whether to skip the retrieval of each database size. If true,
the size of each returned database will be set to 0.
schema:
type: boolean
- in: query
name: page
schema:
$ref: '#/components/schemas/google.protobuf.Int32Value'
- in: query
name: page_size
schema:
type: integer
format: uint32
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: '#/components/schemas/scaleway.rdb.v1.ListDatabasesResponse'
security:
- scaleway: []
x-codeSamples:
- lang: cURL
source: |-
curl -X GET \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
"https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/databases"
- lang: HTTPie
source: |-
http GET "https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/databases" \
X-Auth-Token:$SCW_SECRET_KEY
post:
tags:
- Databases
operationId: CreateDatabase
summary: Create a database in a Database Instance
description: Create a new database. You must define the `name` parameter in
the request.
parameters:
- in: path
name: region
description: The region you want to target
required: true
schema:
type: string
enum:
- fr-par
- nl-ams
- pl-waw
- in: path
name: instance_id
description: UUID of the Database Instance where to create the database.
required: true
schema:
type: string
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: '#/components/schemas/scaleway.rdb.v1.Database'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
name:
type: string
description: Name of the database.
x-properties-order:
- name
security:
- scaleway: []
x-codeSamples:
- lang: cURL
source: |-
curl -X POST \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"string"}' \
"https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/databases"
- lang: HTTPie
source: |-
http POST "https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/databases" \
X-Auth-Token:$SCW_SECRET_KEY \
name="string"
/rdb/v1/regions/{region}/instances/{instance_id}/databases/{name}:
delete:
tags:
- Databases
operationId: DeleteDatabase
summary: Delete a database in a Database Instance
description: Delete a given database on a Database Instance. You must specify,
in the endpoint, the `region`, `instance_id` and `name` parameters of the
database you want to delete.
parameters:
- in: path
name: region
description: The region you want to target
required: true
schema:
type: string
enum:
- fr-par
- nl-ams
- pl-waw
- in: path
name: instance_id
description: UUID of the Database Instance where to delete the database.
required: true
schema:
type: string
- in: path
name: name
description: Name of the database to delete.
required: true
schema:
type: string
responses:
"204":
description: ""
security:
- scaleway: []
x-codeSamples:
- lang: cURL
source: |-
curl -X DELETE \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
"https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/databases/{name}"
- lang: HTTPie
source: |-
http DELETE "https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/databases/{name}" \
X-Auth-Token:$SCW_SECRET_KEY
/rdb/v1/regions/{region}/instances/{instance_id}/endpoints:
post:
tags:
- Endpoints
operationId: CreateEndpoint
summary: Create a new Database Instance endpoint
description: Create a new endpoint for a Database Instance. You can add `load_balancer`
and `private_network` specifications to the body of the request.
parameters:
- in: path
name: region
description: The region you want to target
required: true
schema:
type: string
enum:
- fr-par
- nl-ams
- pl-waw
- in: path
name: instance_id
description: UUID of the Database Instance you to which you want to add an
endpoint.
required: true
schema:
type: string
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: '#/components/schemas/scaleway.rdb.v1.Endpoint'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
endpoint_spec:
type: object
description: Specification of the endpoint you want to create.
properties:
load_balancer:
type: object
description: Load balancer endpoint specifications. Public endpoint
for Database Instance which is systematically present. One
per RDB instance.
nullable: true
x-one-of: spec
private_network:
type: object
description: Private Network endpoint specifications. One maximum
per Database Instance or Read Replica (a Database Instance
and its Read Replica can have different Private Networks).
Cannot be updated (has to be deleted and recreated).
properties:
private_network_id:
type: string
description: UUID of the Private Network to be connected
to the Database Instance. (UUID format)
example: 6170692e-7363-616c-6577-61792e636f6d
service_ip:
type: string
description: Endpoint IPv4 address with a CIDR notation.
Refer to the official Scaleway documentation to learn
more about IP and subnet limitations. (IP network)
example: 1.2.3.4/32
nullable: true
x-one-of: config
ipam_config:
type: object
description: Automated configuration of your Private Network
endpoint with Scaleway IPAM service. One at the most per
Database Instance or Read Replica (a Database Instance
and its Read Replica can have different Private Networks).
Cannot be updated (has to be deleted and recreated).
nullable: true
x-one-of: config
nullable: true
x-properties-order:
- private_network_id
- service_ip
- ipam_config
x-one-of: spec
x-properties-order:
- load_balancer
- private_network
x-properties-order:
- endpoint_spec
security:
- scaleway: []
x-codeSamples:
- lang: cURL
source: |-
curl -X POST \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{}' \
"https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/endpoints"
- lang: HTTPie
source: |-
http POST "https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/endpoints" \
X-Auth-Token:$SCW_SECRET_KEY
/rdb/v1/regions/{region}/instances/{instance_id}/logs:
get:
tags:
- Database Instances
operationId: ListInstanceLogs
summary: List available logs of a Database Instance
description: List the available logs of a Database Instance. By default, the
logs returned in the list are ordered by creation date in ascending order,
though this can be modified via the order_by field.
parameters:
- in: path
name: region
description: The region you want to target
required: true
schema:
type: string
enum:
- fr-par
- nl-ams
- pl-waw
- in: path
name: instance_id
description: UUID of the Database Instance you want logs of.
required: true
schema:
type: string
- in: query
name: order_by
description: Criteria to use when ordering Database Instance logs listing.
schema:
type: string
enum:
- created_at_asc
- created_at_desc
default: created_at_asc
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: '#/components/schemas/scaleway.rdb.v1.ListInstanceLogsResponse'
security:
- scaleway: []
x-codeSamples:
- lang: cURL
source: |-
curl -X GET \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
"https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/logs"
- lang: HTTPie
source: |-
http GET "https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/logs" \
X-Auth-Token:$SCW_SECRET_KEY
/rdb/v1/regions/{region}/instances/{instance_id}/logs-details:
get:
tags:
- Database Instances
operationId: ListInstanceLogsDetails
summary: List remote Database Instance logs details
description: List remote log details. By default, the details returned in the
list are ordered by creation date in ascending order, though this can be modified
via the order_by field.
parameters:
- in: path
name: region
description: The region you want to target
required: true
schema:
type: string
enum:
- fr-par
- nl-ams
- pl-waw
- in: path
name: instance_id
description: UUID of the Database Instance you want logs of.
required: true
schema:
type: string
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: '#/components/schemas/scaleway.rdb.v1.ListInstanceLogsDetailsResponse'
security:
- scaleway: []
x-codeSamples:
- lang: cURL
source: |-
curl -X GET \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
"https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/logs-details"
- lang: HTTPie
source: |-
http GET "https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/logs-details" \
X-Auth-Token:$SCW_SECRET_KEY
/rdb/v1/regions/{region}/instances/{instance_id}/metrics:
get:
tags:
- Database Instances
operationId: GetInstanceMetrics
summary: '[deprecated] Get Database Instance metrics'
description: Retrieve the time series metrics of a given Database Instance.
You can define the period from which to retrieve metrics by specifying the
`start_date` and `end_date`. This method is deprecated and will be removed
in a future version.
parameters:
- in: path
name: region
description: The region you want to target
required: true
schema:
type: string
enum:
- fr-par
- nl-ams
- pl-waw
- in: path
name: instance_id
description: UUID of the Database Instance.
required: true
schema:
type: string
- in: query
name: start_date
description: Start date to gather metrics from. (RFC 3339 format)
schema:
type: string
format: date-time
example: "2022-03-22T12:34:56.123456Z"
- in: query
name: end_date
description: End date to gather metrics from. (RFC 3339 format)
schema:
type: string
format: date-time
example: "2022-03-22T12:34:56.123456Z"
- in: query
name: metric_name
description: Name of the metric to gather.
schema:
type: string
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: '#/components/schemas/scaleway.rdb.v1.InstanceMetrics'
security:
- scaleway: []
deprecated: true
x-codeSamples:
- lang: cURL
source: |-
curl -X GET \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
"https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/metrics"
- lang: HTTPie
source: |-
http GET "https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/metrics" \
X-Auth-Token:$SCW_SECRET_KEY
/rdb/v1/regions/{region}/instances/{instance_id}/prepare-logs:
post:
tags:
- Database Instances
operationId: PrepareInstanceLogs
summary: Prepare logs of a Database Instance
description: Prepare your Database Instance logs. You can define the `start_date`
and `end_date` parameters for your query. The download URL is returned in
the response. Logs are recorded from 00h00 to 23h59 and then aggregated in
a `.log` file once a day. Therefore, even if you specify a timeframe from
which you want to get the logs, you will receive logs from the full 24 hours.
parameters:
- in: path
name: region
description: The region you want to target
required: true
schema:
type: string
enum:
- fr-par
- nl-ams
- pl-waw
- in: path
name: instance_id
description: UUID of the Database Instance you want logs of.
required: true
schema:
type: string
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: '#/components/schemas/scaleway.rdb.v1.PrepareInstanceLogsResponse'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
start_date:
type: string
description: Start datetime of your log. (RFC 3339 format). (RFC
3339 format)
format: date-time
example: "2022-03-22T12:34:56.123456Z"
nullable: true
end_date:
type: string
description: End datetime of your log. (RFC 3339 format). (RFC 3339
format)
format: date-time
example: "2022-03-22T12:34:56.123456Z"
nullable: true
x-properties-order:
- start_date
- end_date
security:
- scaleway: []
x-codeSamples:
- lang: cURL
source: |-
curl -X POST \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{}' \
"https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/prepare-logs"
- lang: HTTPie
source: |-
http POST "https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/prepare-logs" \
X-Auth-Token:$SCW_SECRET_KEY
/rdb/v1/regions/{region}/instances/{instance_id}/privileges:
get:
tags:
- Privileges
operationId: ListPrivileges
summary: List user privileges for a database
description: List privileges of a user on a database. By default, the details
returned in the list are ordered by creation date in ascending order, though
this can be modified via the order_by field. You can define additional parameters
for your query, such as `database_name` and `user_name`.
parameters:
- in: path
name: region
description: The region you want to target
required: true
schema:
type: string
enum:
- fr-par
- nl-ams
- pl-waw
- in: path
name: instance_id
description: UUID of the Database Instance.
required: true
schema:
type: string
- in: query
name: order_by
description: Criteria to use when ordering privileges listing.
schema:
type: string
enum:
- user_name_asc
- user_name_desc
- database_name_asc
- database_name_desc
default: user_name_asc
- in: query
name: page
schema:
$ref: '#/components/schemas/google.protobuf.Int32Value'
- in: query
name: page_size
schema:
type: integer
format: uint32
- in: query
name: database_name
description: Name of the database.
schema:
type: string
- in: query
name: user_name
description: Name of the user.
schema:
type: string
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: '#/components/schemas/scaleway.rdb.v1.ListPrivilegesResponse'
security:
- scaleway: []
x-codeSamples:
- lang: cURL
source: |-
curl -X GET \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
"https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/privileges"
- lang: HTTPie
source: |-
http GET "https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/privileges" \
X-Auth-Token:$SCW_SECRET_KEY
put:
tags:
- Privileges
operationId: SetPrivilege
summary: Set user privileges for a database
description: Set the privileges of a user on a database. You must define `database_name`,
`user_name` and `permission` in the request body.
parameters:
- in: path
name: region
description: The region you want to target
required: true
schema:
type: string
enum:
- fr-par
- nl-ams
- pl-waw
- in: path
name: instance_id
description: UUID of the Database Instance.
required: true
schema:
type: string
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: '#/components/schemas/scaleway.rdb.v1.Privilege'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
database_name:
type: string
description: Name of the database.
user_name:
type: string
description: Name of the user.
permission:
type: string
description: Permission to set (Read, Read/Write, All, Custom).
enum:
- readonly
- readwrite
- all
- custom
- none
default: readonly
x-properties-order:
- database_name
- user_name
- permission
security:
- scaleway: []
x-codeSamples:
- lang: cURL
source: |-
curl -X PUT \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{"database_name":"string","user_name":"string"}' \
"https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/privileges"
- lang: HTTPie
source: |-
http PUT "https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/privileges" \
X-Auth-Token:$SCW_SECRET_KEY \
database_name="string" \
user_name="string"
/rdb/v1/regions/{region}/instances/{instance_id}/purge-logs:
post:
tags:
- Database Instances
operationId: PurgeInstanceLogs
summary: Purge remote Database Instance logs
description: Purge a given remote log from a Database Instance. You can specify
the `log_name` of the log you wish to clean from your Database Instance.
parameters:
- in: path
name: region
description: The region you want to target
required: true
schema:
type: string
enum:
- fr-par
- nl-ams
- pl-waw
- in: path
name: instance_id
description: UUID of the Database Instance you want logs of.
required: true
schema:
type: string
responses:
"204":
description: ""
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
log_name:
type: string
description: Given log name to purge.
nullable: true
x-properties-order:
- log_name
security:
- scaleway: []
x-codeSamples:
- lang: cURL
source: |-
curl -X POST \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{}' \
"https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/purge-logs"
- lang: HTTPie
source: |-
http POST "https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/purge-logs" \
X-Auth-Token:$SCW_SECRET_KEY
/rdb/v1/regions/{region}/instances/{instance_id}/renew-certificate:
post:
tags:
- Database Instances
operationId: RenewInstanceCertificate
summary: Renew the TLS certificate of a Database Instance
description: Renew a TLS for a Database Instance. Renewing a certificate means
that you will not be able to connect to your Database Instance using the previous
certificate. You will also need to download and update the new certificate
for all database clients.
parameters:
- in: path
name: region
description: The region you want to target
required: true
schema:
type: string
enum:
- fr-par
- nl-ams
- pl-waw
- in: path
name: instance_id
description: UUID of the Database Instance you want logs of.
required: true
schema:
type: string
responses:
"204":
description: ""
requestBody:
required: true
content:
application/json:
schema:
type: object
security:
- scaleway: []
x-codeSamples:
- lang: cURL
source: |-
curl -X POST \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{}' \
"https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/renew-certificate"
- lang: HTTPie
source: |-
http POST "https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/renew-certificate" \
X-Auth-Token:$SCW_SECRET_KEY
/rdb/v1/regions/{region}/instances/{instance_id}/restart:
post:
tags:
- Database Instances
operationId: RestartInstance
summary: Restart Database Instance
description: Restart a given Database Instance, specified by the `region` and
`instance_id` parameters. The status of the Database Instance returned in
the response.
parameters:
- in: path
name: region
description: The region you want to target
required: true
schema:
type: string
enum:
- fr-par
- nl-ams
- pl-waw
- in: path
name: instance_id
description: UUID of the Database Instance you want to restart.
required: true
schema:
type: string
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: '#/components/schemas/scaleway.rdb.v1.Instance'
requestBody:
required: true
content:
application/json:
schema:
type: object
security:
- scaleway: []
x-codeSamples:
- lang: cURL
source: |-
curl -X POST \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{}' \
"https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/restart"
- lang: HTTPie
source: |-
http POST "https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/restart" \
X-Auth-Token:$SCW_SECRET_KEY
/rdb/v1/regions/{region}/instances/{instance_id}/settings:
post:
tags:
- Instance Settings
operationId: AddInstanceSettings
summary: Add Database Instance advanced settings
description: Add an advanced setting to a Database Instance. You must set the
`name` and the `value` of each setting.
parameters:
- in: path
name: region
description: The region you want to target
required: true
schema:
type: string
enum:
- fr-par
- nl-ams
- pl-waw
- in: path
name: instance_id
description: UUID of the Database Instance you want to add settings to.
required: true
schema:
type: string
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: '#/components/schemas/scaleway.rdb.v1.AddInstanceSettingsResponse'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
settings:
type: array
description: Settings to add to the Database Instance.
items:
$ref: '#/components/schemas/scaleway.rdb.v1.InstanceSetting'
required:
- settings
x-properties-order:
- settings
security:
- scaleway: []
x-codeSamples:
- lang: cURL
source: |-
curl -X POST \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{"settings":[""]}' \
"https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/settings"
- lang: HTTPie
source: |-
http POST "https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/settings" \
X-Auth-Token:$SCW_SECRET_KEY \
settings:='[""]'
put:
tags:
- Instance Settings
operationId: SetInstanceSettings
summary: Set Database Instance advanced settings
description: Update an advanced setting for a Database Instance. Settings added
upon database engine initialization can only be defined once, and cannot,
therefore, be updated.
parameters:
- in: path
name: region
description: The region you want to target
required: true
schema:
type: string
enum:
- fr-par
- nl-ams
- pl-waw
- in: path
name: instance_id
description: UUID of the Database Instance where the settings must be set.
required: true
schema:
type: string
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: '#/components/schemas/scaleway.rdb.v1.SetInstanceSettingsResponse'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
settings:
type: array
description: Settings to define for the Database Instance.
items:
$ref: '#/components/schemas/scaleway.rdb.v1.InstanceSetting'
required:
- settings
x-properties-order:
- settings
security:
- scaleway: []
x-codeSamples:
- lang: cURL
source: |-
curl -X PUT \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{"settings":[""]}' \
"https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/settings"
- lang: HTTPie
source: |-
http PUT "https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/settings" \
X-Auth-Token:$SCW_SECRET_KEY \
settings:='[""]'
delete:
tags:
- Instance Settings
operationId: DeleteInstanceSettings
summary: Delete Database Instance advanced settings
description: Delete an advanced setting in a Database Instance. You must specify
the names of the settings you want to delete in the request.
parameters:
- in: path
name: region
description: The region you want to target
required: true
schema:
type: string
enum:
- fr-par
- nl-ams
- pl-waw
- in: path
name: instance_id
description: UUID of the Database Instance to delete settings from.
required: true
schema:
type: string
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: '#/components/schemas/scaleway.rdb.v1.DeleteInstanceSettingsResponse'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
setting_names:
type: array
description: Settings names to delete.
items:
type: string
required:
- setting_names
x-properties-order:
- setting_names
security:
- scaleway: []
x-codeSamples:
- lang: cURL
source: |-
curl -X DELETE \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{"setting_names":["string"]}' \
"https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/settings"
- lang: HTTPie
source: |-
http DELETE "https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/settings" \
X-Auth-Token:$SCW_SECRET_KEY \
setting_names:='["string"]'
/rdb/v1/regions/{region}/instances/{instance_id}/snapshots:
post:
tags:
- Snapshots
operationId: CreateSnapshot
summary: Create a Database Instance snapshot
description: Create a new snapshot of a Database Instance. You must define the
`name` parameter in the request.
parameters:
- in: path
name: region
description: The region you want to target
required: true
schema:
type: string
enum:
- fr-par
- nl-ams
- pl-waw
- in: path
name: instance_id
description: UUID of the Database Instance.
required: true
schema:
type: string
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: '#/components/schemas/scaleway.rdb.v1.Snapshot'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
name:
type: string
description: Name of the snapshot.
expires_at:
type: string
description: Expiration date (must follow the ISO 8601 format).
(RFC 3339 format)
format: date-time
example: "2022-03-22T12:34:56.123456Z"
nullable: true
required:
- name
x-properties-order:
- name
- expires_at
security:
- scaleway: []
x-codeSamples:
- lang: cURL
source: |-
curl -X POST \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"string"}' \
"https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/snapshots"
- lang: HTTPie
source: |-
http POST "https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/snapshots" \
X-Auth-Token:$SCW_SECRET_KEY \
name="string"
/rdb/v1/regions/{region}/instances/{instance_id}/upgrade:
post:
tags:
- Database Instances
operationId: UpgradeInstance
summary: Upgrade a Database Instance
description: Upgrade your current Database Instance specifications like node
type, high availability, volume, or the database engine version. Note that
upon upgrade the `enable_ha` parameter can only be set to `true`.
parameters:
- in: path
name: region
description: The region you want to target
required: true
schema:
type: string
enum:
- fr-par
- nl-ams
- pl-waw
- in: path
name: instance_id
description: UUID of the Database Instance you want to upgrade.
required: true
schema:
type: string
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: '#/components/schemas/scaleway.rdb.v1.Instance'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
node_type:
type: string
description: Node type of the Database Instance you want to upgrade
to.
nullable: true
x-one-of: UpgradeTarget
enable_ha:
type: boolean
description: Defines whether or not high availability should be
enabled on the Database Instance.
nullable: true
x-one-of: UpgradeTarget
volume_size:
type: integer
description: Increase your block storage volume size.
format: uint64
nullable: true
x-one-of: UpgradeTarget
volume_type:
type: string
description: Change your Database Instance storage type.
enum:
- lssd
- bssd
- sbs_5k
- sbs_15k
nullable: true
default: lssd
x-one-of: UpgradeTarget
upgradable_version_id:
type: string
description: |-
Update your database engine to a newer version.
This will create a new Database Instance with same specifications as the current one and perform a Database Engine upgrade. (UUID format)
example: 6170692e-7363-616c-6577-61792e636f6d
nullable: true
x-one-of: UpgradeTarget
major_upgrade_workflow:
type: object
description: Upgrade your database engine to a new major version
including instance endpoints.
properties:
upgradable_version_id:
type: string
description: |-
Update your database engine to a newer version.
This will create a new Database Instance with same specifications as the current one and perform a Database Engine upgrade. (UUID format)
example: 6170692e-7363-616c-6577-61792e636f6d
with_endpoints:
type: boolean
description: |-
Include endpoint during the migration.
At the end of the migration procedure this option let you migrate all your database endpoint to the upgraded instance.
nullable: true
x-properties-order:
- upgradable_version_id
- with_endpoints
x-one-of: UpgradeTarget
enable_encryption:
type: boolean
description: Defines whether or not encryption should be enabled
on the Database Instance.
nullable: true
x-one-of: UpgradeTarget
x-properties-order:
- node_type
- enable_ha
- volume_size
- volume_type
- upgradable_version_id
- major_upgrade_workflow
- enable_encryption
security:
- scaleway: []
x-codeSamples:
- lang: cURL
source: |-
curl -X POST \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{}' \
"https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/upgrade"
- lang: HTTPie
source: |-
http POST "https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/upgrade" \
X-Auth-Token:$SCW_SECRET_KEY
/rdb/v1/regions/{region}/instances/{instance_id}/users:
get:
tags:
- Users
operationId: ListUsers
summary: List users of a Database Instance
description: List all users of a given Database Instance. By default, the users
returned in the list are ordered by creation date in ascending order, though
this can be modified via the order_by field.
parameters:
- in: path
name: region
description: The region you want to target
required: true
schema:
type: string
enum:
- fr-par
- nl-ams
- pl-waw
- in: path
name: instance_id
description: UUID of the Database Instance.
required: true
schema:
type: string
- in: query
name: name
description: Name of the user.
schema:
type: string
- in: query
name: order_by
description: Criteria to use when requesting user listing.
schema:
type: string
enum:
- name_asc
- name_desc
- is_admin_asc
- is_admin_desc
default: name_asc
- in: query
name: page
schema:
$ref: '#/components/schemas/google.protobuf.Int32Value'
- in: query
name: page_size
schema:
type: integer
format: uint32
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: '#/components/schemas/scaleway.rdb.v1.ListUsersResponse'
security:
- scaleway: []
x-codeSamples:
- lang: cURL
source: |-
curl -X GET \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
"https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/users"
- lang: HTTPie
source: |-
http GET "https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/users" \
X-Auth-Token:$SCW_SECRET_KEY
post:
tags:
- Users
operationId: CreateUser
summary: Create a user for a Database Instance
description: Create a new user for a Database Instance. You must define the
`name`, `password` and `is_admin` parameters.
parameters:
- in: path
name: region
description: The region you want to target
required: true
schema:
type: string
enum:
- fr-par
- nl-ams
- pl-waw
- in: path
name: instance_id
description: UUID of the Database Instance in which you want to create a user.
required: true
schema:
type: string
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: '#/components/schemas/scaleway.rdb.v1.User'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
name:
type: string
description: Name of the user you want to create.
password:
type: string
description: Password of the user you want to create. Password must
be between 8 and 128 characters, contain at least one digit, one
uppercase, one lowercase and one special character.
is_admin:
type: boolean
description: Defines whether the user will have administrative privileges.
x-properties-order:
- name
- password
- is_admin
security:
- scaleway: []
x-codeSamples:
- lang: cURL
source: |-
curl -X POST \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"is_admin": false,
"name": "string",
"password": "string"
}' \
"https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/users"
- lang: HTTPie
source: |-
http POST "https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/users" \
X-Auth-Token:$SCW_SECRET_KEY \
is_admin:=false \
name="string" \
password="string"
/rdb/v1/regions/{region}/instances/{instance_id}/users/{name}:
patch:
tags:
- Users
operationId: UpdateUser
summary: Update a user on a Database Instance
description: Update the parameters of a user on a Database Instance. You can
update the `password` and `is_admin` parameters, but you cannot change the
name of the user.
parameters:
- in: path
name: region
description: The region you want to target
required: true
schema:
type: string
enum:
- fr-par
- nl-ams
- pl-waw
- in: path
name: instance_id
description: UUID of the Database Instance the user belongs to.
required: true
schema:
type: string
- in: path
name: name
description: Name of the database user.
required: true
schema:
type: string
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: '#/components/schemas/scaleway.rdb.v1.User'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
password:
type: string
description: Password of the database user. Password must be between
8 and 128 characters, contain at least one digit, one uppercase,
one lowercase and one special character.
nullable: true
is_admin:
type: boolean
description: Defines whether or not this user got administrative
privileges.
nullable: true
x-properties-order:
- password
- is_admin
security:
- scaleway: []
x-codeSamples:
- lang: cURL
source: |-
curl -X PATCH \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{}' \
"https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/users/{name}"
- lang: HTTPie
source: |-
http PATCH "https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/users/{name}" \
X-Auth-Token:$SCW_SECRET_KEY
delete:
tags:
- Users
operationId: DeleteUser
summary: Delete a user on a Database Instance
description: Delete a given user on a Database Instance. You must specify, in
the endpoint, the `region`, `instance_id` and `name` parameters of the user
you want to delete.
parameters:
- in: path
name: region
description: The region you want to target
required: true
schema:
type: string
enum:
- fr-par
- nl-ams
- pl-waw
- in: path
name: instance_id
description: UUID of the Database Instance to delete the user from.
required: true
schema:
type: string
- in: path
name: name
description: Name of the user.
required: true
schema:
type: string
responses:
"204":
description: ""
security:
- scaleway: []
x-codeSamples:
- lang: cURL
source: |-
curl -X DELETE \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
"https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/users/{name}"
- lang: HTTPie
source: |-
http DELETE "https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/users/{name}" \
X-Auth-Token:$SCW_SECRET_KEY
/rdb/v1/regions/{region}/logs/{instance_log_id}:
get:
tags:
- Database Instances
operationId: GetInstanceLog
summary: Get given logs of a Database Instance
description: Retrieve information about the logs of a Database Instance. Specify
the `instance_log_id` and `region` in your request to get information such
as `download_url`, `status`, `expires_at` and `created_at` about your logs
in the response.
parameters:
- in: path
name: region
description: The region you want to target
required: true
schema:
type: string
enum:
- fr-par
- nl-ams
- pl-waw
- in: path
name: instance_log_id
description: UUID of the instance_log you want.
required: true
schema:
type: string
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: '#/components/schemas/scaleway.rdb.v1.InstanceLog'
security:
- scaleway: []
x-codeSamples:
- lang: cURL
source: |-
curl -X GET \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
"https://api.scaleway.com/rdb/v1/regions/{region}/logs/{instance_log_id}"
- lang: HTTPie
source: |-
http GET "https://api.scaleway.com/rdb/v1/regions/{region}/logs/{instance_log_id}" \
X-Auth-Token:$SCW_SECRET_KEY
/rdb/v1/regions/{region}/node-types:
get:
tags:
- NodeTypes
operationId: ListNodeTypes
summary: List available node types
description: List all available node types. By default, the node types returned
in the list are ordered by creation date in ascending order, though this can
be modified via the `order_by` field.
parameters:
- in: path
name: region
description: The region you want to target
required: true
schema:
type: string
enum:
- fr-par
- nl-ams
- pl-waw
- in: query
name: include_disabled_types
description: Defines whether or not to include disabled types.
required: true
schema:
type: boolean
- in: query
name: page
schema:
$ref: '#/components/schemas/google.protobuf.Int32Value'
- in: query
name: page_size
schema:
type: integer
format: uint32
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: '#/components/schemas/scaleway.rdb.v1.ListNodeTypesResponse'
security:
- scaleway: []
x-codeSamples:
- lang: cURL
source: |-
curl -X GET \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
"https://api.scaleway.com/rdb/v1/regions/{region}/node-types?include_disabled_types=false"
- lang: HTTPie
source: |-
http GET "https://api.scaleway.com/rdb/v1/regions/{region}/node-types" \
X-Auth-Token:$SCW_SECRET_KEY \
include_disabled_types==false
/rdb/v1/regions/{region}/read-replicas:
post:
tags:
- Read Replicas
operationId: CreateReadReplica
summary: Create a Read Replica
description: Create a new Read Replica of a Database Instance. You must specify
the `region` and the `instance_id`. You can only create a maximum of 3 Read
Replicas per Database Instance.
parameters:
- in: path
name: region
description: The region you want to target
required: true
schema:
type: string
enum:
- fr-par
- nl-ams
- pl-waw
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: '#/components/schemas/scaleway.rdb.v1.ReadReplica'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
instance_id:
type: string
description: UUID of the Database Instance you want to create a
Read Replica from. (UUID format)
example: 6170692e-7363-616c-6577-61792e636f6d
endpoint_spec:
type: array
description: Specification of the endpoint you want to create.
items:
$ref: '#/components/schemas/scaleway.rdb.v1.ReadReplicaEndpointSpec'
same_zone:
type: boolean
description: Defines whether to create the replica in the same availability
zone as the main instance nodes or not.
nullable: true
required:
- instance_id
x-properties-order:
- instance_id
- endpoint_spec
- same_zone
security:
- scaleway: []
x-codeSamples:
- lang: cURL
source: |-
curl -X POST \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{"instance_id":"6170692e-7363-616c-6577-61792e636f6d"}' \
"https://api.scaleway.com/rdb/v1/regions/{region}/read-replicas"
- lang: HTTPie
source: |-
http POST "https://api.scaleway.com/rdb/v1/regions/{region}/read-replicas" \
X-Auth-Token:$SCW_SECRET_KEY \
instance_id="6170692e-7363-616c-6577-61792e636f6d"
/rdb/v1/regions/{region}/read-replicas/{read_replica_id}:
get:
tags:
- Read Replicas
operationId: GetReadReplica
summary: Get a Read Replica
description: Retrieve information about a Database Instance Read Replica. Full
details about the Read Replica, like `endpoints`, `status` and `region` are
returned in the response.
parameters:
- in: path
name: region
description: The region you want to target
required: true
schema:
type: string
enum:
- fr-par
- nl-ams
- pl-waw
- in: path
name: read_replica_id
description: UUID of the Read Replica. (UUID format)
required: true
schema:
type: string
example: 6170692e-7363-616c-6577-61792e636f6d
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: '#/components/schemas/scaleway.rdb.v1.ReadReplica'
security:
- scaleway: []
x-codeSamples:
- lang: cURL
source: |-
curl -X GET \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
"https://api.scaleway.com/rdb/v1/regions/{region}/read-replicas/{read_replica_id}"
- lang: HTTPie
source: |-
http GET "https://api.scaleway.com/rdb/v1/regions/{region}/read-replicas/{read_replica_id}" \
X-Auth-Token:$SCW_SECRET_KEY
delete:
tags:
- Read Replicas
operationId: DeleteReadReplica
summary: Delete a Read Replica
description: Delete a Read Replica of a Database Instance. You must specify
the `region` and `read_replica_id` parameters of the Read Replica you want
to delete.
parameters:
- in: path
name: region
description: The region you want to target
required: true
schema:
type: string
enum:
- fr-par
- nl-ams
- pl-waw
- in: path
name: read_replica_id
description: UUID of the Read Replica. (UUID format)
required: true
schema:
type: string
example: 6170692e-7363-616c-6577-61792e636f6d
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: '#/components/schemas/scaleway.rdb.v1.ReadReplica'
security:
- scaleway: []
x-codeSamples:
- lang: cURL
source: |-
curl -X DELETE \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
"https://api.scaleway.com/rdb/v1/regions/{region}/read-replicas/{read_replica_id}"
- lang: HTTPie
source: |-
http DELETE "https://api.scaleway.com/rdb/v1/regions/{region}/read-replicas/{read_replica_id}" \
X-Auth-Token:$SCW_SECRET_KEY
/rdb/v1/regions/{region}/read-replicas/{read_replica_id}/endpoints:
post:
tags:
- Read Replicas
operationId: CreateReadReplicaEndpoint
summary: Create an endpoint for a Read Replica
description: Create a new endpoint for a Read Replica. Read Replicas can have
at most one direct access and one Private Network endpoint.
parameters:
- in: path
name: region
description: The region you want to target
required: true
schema:
type: string
enum:
- fr-par
- nl-ams
- pl-waw
- in: path
name: read_replica_id
description: UUID of the Read Replica. (UUID format)
required: true
schema:
type: string
example: 6170692e-7363-616c-6577-61792e636f6d
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: '#/components/schemas/scaleway.rdb.v1.ReadReplica'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
endpoint_spec:
type: array
description: Specification of the endpoint you want to create.
items:
$ref: '#/components/schemas/scaleway.rdb.v1.ReadReplicaEndpointSpec'
required:
- endpoint_spec
x-properties-order:
- endpoint_spec
security:
- scaleway: []
x-codeSamples:
- lang: cURL
source: |-
curl -X POST \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{"endpoint_spec":[""]}' \
"https://api.scaleway.com/rdb/v1/regions/{region}/read-replicas/{read_replica_id}/endpoints"
- lang: HTTPie
source: |-
http POST "https://api.scaleway.com/rdb/v1/regions/{region}/read-replicas/{read_replica_id}/endpoints" \
X-Auth-Token:$SCW_SECRET_KEY \
endpoint_spec:='[""]'
/rdb/v1/regions/{region}/read-replicas/{read_replica_id}/promote:
post:
tags:
- Read Replicas
operationId: PromoteReadReplica
summary: Promote a Read Replica
description: Promote a Read Replica to Database Instance automatically.
parameters:
- in: path
name: region
description: The region you want to target
required: true
schema:
type: string
enum:
- fr-par
- nl-ams
- pl-waw
- in: path
name: read_replica_id
description: UUID of the Read Replica. (UUID format)
required: true
schema:
type: string
example: 6170692e-7363-616c-6577-61792e636f6d
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: '#/components/schemas/scaleway.rdb.v1.Instance'
requestBody:
required: true
content:
application/json:
schema:
type: object
security:
- scaleway: []
x-codeSamples:
- lang: cURL
source: |-
curl -X POST \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{}' \
"https://api.scaleway.com/rdb/v1/regions/{region}/read-replicas/{read_replica_id}/promote"
- lang: HTTPie
source: |-
http POST "https://api.scaleway.com/rdb/v1/regions/{region}/read-replicas/{read_replica_id}/promote" \
X-Auth-Token:$SCW_SECRET_KEY
/rdb/v1/regions/{region}/read-replicas/{read_replica_id}/reset:
post:
tags:
- Read Replicas
operationId: ResetReadReplica
summary: Resync a Read Replica
description: |-
When you resync a Read Replica, first it is reset, then its data is resynchronized from the primary node. Your Read Replica remains unavailable during the resync process. The duration of this process is proportional to the size of your Database Instance.
The configured endpoints do not change.
parameters:
- in: path
name: region
description: The region you want to target
required: true
schema:
type: string
enum:
- fr-par
- nl-ams
- pl-waw
- in: path
name: read_replica_id
description: UUID of the Read Replica. (UUID format)
required: true
schema:
type: string
example: 6170692e-7363-616c-6577-61792e636f6d
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: '#/components/schemas/scaleway.rdb.v1.ReadReplica'
requestBody:
required: true
content:
application/json:
schema:
type: object
security:
- scaleway: []
x-codeSamples:
- lang: cURL
source: |-
curl -X POST \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{}' \
"https://api.scaleway.com/rdb/v1/regions/{region}/read-replicas/{read_replica_id}/reset"
- lang: HTTPie
source: |-
http POST "https://api.scaleway.com/rdb/v1/regions/{region}/read-replicas/{read_replica_id}/reset" \
X-Auth-Token:$SCW_SECRET_KEY
/rdb/v1/regions/{region}/snapshots:
get:
tags:
- Snapshots
operationId: ListSnapshots
summary: List snapshots
description: List snapshots. You can include the `instance_id` or `project_id`
in your query to get the list of snapshots for specific Database Instances
and/or Projects. By default, the details returned in the list are ordered
by creation date in ascending order, though this can be modified via the `order_by`
field.
parameters:
- in: path
name: region
description: The region you want to target
required: true
schema:
type: string
enum:
- fr-par
- nl-ams
- pl-waw
- in: query
name: name
description: Name of the snapshot.
schema:
type: string
- in: query
name: order_by
description: Criteria to use when ordering snapshot listing.
schema:
type: string
enum:
- created_at_asc
- created_at_desc
- name_asc
- name_desc
- expires_at_asc
- expires_at_desc
default: created_at_asc
- in: query
name: instance_id
description: UUID of the Database Instance.
schema:
type: string
- in: query
name: organization_id
description: Organization ID the snapshots belongs to.
schema:
type: string
- in: query
name: project_id
description: Project ID the snapshots belongs to.
schema:
type: string
- in: query
name: page
schema:
$ref: '#/components/schemas/google.protobuf.Int32Value'
- in: query
name: page_size
schema:
type: integer
format: uint32
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: '#/components/schemas/scaleway.rdb.v1.ListSnapshotsResponse'
security:
- scaleway: []
x-codeSamples:
- lang: cURL
source: |-
curl -X GET \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
"https://api.scaleway.com/rdb/v1/regions/{region}/snapshots"
- lang: HTTPie
source: |-
http GET "https://api.scaleway.com/rdb/v1/regions/{region}/snapshots" \
X-Auth-Token:$SCW_SECRET_KEY
/rdb/v1/regions/{region}/snapshots/{snapshot_id}:
get:
tags:
- Snapshots
operationId: GetSnapshot
summary: Get a Database Instance snapshot
description: Retrieve information about a given snapshot, specified by its `snapshot_id`
and `region`. Full details about the snapshot, like size and expiration date,
are returned in the response.
parameters:
- in: path
name: region
description: The region you want to target
required: true
schema:
type: string
enum:
- fr-par
- nl-ams
- pl-waw
- in: path
name: snapshot_id
description: UUID of the snapshot.
required: true
schema:
type: string
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: '#/components/schemas/scaleway.rdb.v1.Snapshot'
security:
- scaleway: []
x-codeSamples:
- lang: cURL
source: |-
curl -X GET \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
"https://api.scaleway.com/rdb/v1/regions/{region}/snapshots/{snapshot_id}"
- lang: HTTPie
source: |-
http GET "https://api.scaleway.com/rdb/v1/regions/{region}/snapshots/{snapshot_id}" \
X-Auth-Token:$SCW_SECRET_KEY
patch:
tags:
- Snapshots
operationId: UpdateSnapshot
summary: Update a Database Instance snapshot
description: Update the parameters of a snapshot of a Database Instance. You
can update the `name` and `expires_at` parameters.
parameters:
- in: path
name: region
description: The region you want to target
required: true
schema:
type: string
enum:
- fr-par
- nl-ams
- pl-waw
- in: path
name: snapshot_id
description: UUID of the snapshot to update.
required: true
schema:
type: string
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: '#/components/schemas/scaleway.rdb.v1.Snapshot'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
name:
type: string
description: Name of the snapshot.
nullable: true
expires_at:
type: string
description: Expiration date (must follow the ISO 8601 format).
(RFC 3339 format)
format: date-time
example: "2022-03-22T12:34:56.123456Z"
nullable: true
x-properties-order:
- name
- expires_at
security:
- scaleway: []
x-codeSamples:
- lang: cURL
source: |-
curl -X PATCH \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{}' \
"https://api.scaleway.com/rdb/v1/regions/{region}/snapshots/{snapshot_id}"
- lang: HTTPie
source: |-
http PATCH "https://api.scaleway.com/rdb/v1/regions/{region}/snapshots/{snapshot_id}" \
X-Auth-Token:$SCW_SECRET_KEY
delete:
tags:
- Snapshots
operationId: DeleteSnapshot
summary: Delete a Database Instance snapshot
description: Delete a given snapshot of a Database Instance. You must specify,
in the endpoint, the `region` and `snapshot_id` parameters of the snapshot
you want to delete.
parameters:
- in: path
name: region
description: The region you want to target
required: true
schema:
type: string
enum:
- fr-par
- nl-ams
- pl-waw
- in: path
name: snapshot_id
description: UUID of the snapshot to delete.
required: true
schema:
type: string
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: '#/components/schemas/scaleway.rdb.v1.Snapshot'
security:
- scaleway: []
x-codeSamples:
- lang: cURL
source: |-
curl -X DELETE \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
"https://api.scaleway.com/rdb/v1/regions/{region}/snapshots/{snapshot_id}"
- lang: HTTPie
source: |-
http DELETE "https://api.scaleway.com/rdb/v1/regions/{region}/snapshots/{snapshot_id}" \
X-Auth-Token:$SCW_SECRET_KEY
/rdb/v1/regions/{region}/snapshots/{snapshot_id}/create-instance:
post:
tags:
- Snapshots
operationId: CreateInstanceFromSnapshot
summary: Create a new Database Instance from a snapshot
description: Restore a snapshot. When you restore a snapshot, a new Instance
is created and billed to your account. Note that is possible to select a larger
node type for your new Database Instance. However, the Block volume size will
be the same as the size of the restored snapshot. All Instance settings will
be restored if you chose a node type with the same or more memory size than
the initial Instance. Settings will be reset to the default if your node type
has less memory.
parameters:
- in: path
name: region
description: The region you want to target
required: true
schema:
type: string
enum:
- fr-par
- nl-ams
- pl-waw
- in: path
name: snapshot_id
description: Block snapshot of the Database Instance.
required: true
schema:
type: string
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: '#/components/schemas/scaleway.rdb.v1.Instance'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
instance_name:
type: string
description: Name of the Database Instance created with the snapshot.
is_ha_cluster:
type: boolean
description: Defines whether or not High-Availability is enabled
on the new Database Instance.
nullable: true
node_type:
type: string
description: The node type used to restore the snapshot.
nullable: true
x-properties-order:
- instance_name
- is_ha_cluster
- node_type
security:
- scaleway: []
x-codeSamples:
- lang: cURL
source: |-
curl -X POST \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{"instance_name":"string"}' \
"https://api.scaleway.com/rdb/v1/regions/{region}/snapshots/{snapshot_id}/create-instance"
- lang: HTTPie
source: |-
http POST "https://api.scaleway.com/rdb/v1/regions/{region}/snapshots/{snapshot_id}/create-instance" \
X-Auth-Token:$SCW_SECRET_KEY \
instance_name="string"