# Documentation for `scw datawarehouse`


:::note{title="The CLI documentation pages are currently under construction"}
The content is up to date. We're making improvements to the site over the next few weeks for a better experience.
:::

<!-- DO NOT EDIT: this file is automatically generated using scw-doc-gen -->
Data Warehouse API.

- [Database management commands](#database-management-commands)
  - [Create a new database within a deployment](#create-a-new-database-within-a-deployment)
  - [Delete a database from a deployment](#delete-a-database-from-a-deployment)
  - [List databases within a deployment](#list-databases-within-a-deployment)
- [Deployment management commands](#deployment-management-commands)
  - [Create a deployment](#create-a-deployment)
  - [Delete a deployment](#delete-a-deployment)
  - [Get a deployment](#get-a-deployment)
  - [Get deployment TLS certificate](#get-deployment-tls-certificate)
  - [List deployments](#list-deployments)
  - [Update a deployment](#update-a-deployment)
- [Endpoint management commands](#endpoint-management-commands)
  - [Create a new endpoint for a deployment](#create-a-new-endpoint-for-a-deployment)
  - [Delete an endpoint from a deployment](#delete-an-endpoint-from-a-deployment)
- [List available presets](#list-available-presets)
  - [List available presets](#list-available-presets)
- [User management commands](#user-management-commands)
  - [Create a new user for a deployment](#create-a-new-user-for-a-deployment)
  - [Delete a user from a deployment](#delete-a-user-from-a-deployment)
  - [List users associated with a deployment](#list-users-associated-with-a-deployment)
  - [Update an existing user for a deployment](#update-an-existing-user-for-a-deployment)
- [List available Clickhouse® versions](#list-available-clickhouse®-versions)
  - [List available ClickHouse® versions](#list-available-clickhouse®-versions)


## Database management commands

Manage databases within a deployment.


### Create a new database within a deployment

Create a new database within a deployment.

**Usage:**

```shell
scw datawarehouse database create [arg=value ...]
```


**Args:**

| Name |   | Description |
|------|---|-------------|
| deployment-id | Required | UUID of the deployment |
| name |  | Name of the database |
| region | Default: `fr-par`<br />One of: `fr-par` | Region to target. If none is passed will use default region from the config |



### Delete a database from a deployment

Delete a database from a deployment.

**Usage:**

```shell
scw datawarehouse database delete [arg=value ...]
```


**Args:**

| Name |   | Description |
|------|---|-------------|
| deployment-id | Required | UUID of the deployment |
| name | Required | Name of the database to delete |
| region | Default: `fr-par`<br />One of: `fr-par` | Region to target. If none is passed will use default region from the config |



### List databases within a deployment

List databases within a deployment.

**Usage:**

```shell
scw datawarehouse database list [arg=value ...]
```


**Args:**

| Name |   | Description |
|------|---|-------------|
| deployment-id | Required | UUID of the deployment |
| name |  | Name of the database to filter by |
| order-by | One of: `name_asc`, `name_desc`, `size_asc`, `size_desc` | Criteria to use when ordering database listings |
| region | Default: `fr-par`<br />One of: `fr-par`, `all` | Region to target. If none is passed will use default region from the config |



## Deployment management commands

A deployment is composed of one or multiple replicas.


### Create a deployment

Create a new deployment.

**Usage:**

```shell
scw datawarehouse deployment create [arg=value ...]
```


**Args:**

| Name |   | Description |
|------|---|-------------|
| project-id |  | Project ID to use. If none is passed the default project ID will be used |
| name |  | Name of the deployment |
| tags.{index} |  | Tags to apply to the deployment |
| version |  | ClickHouse® version to use for the deployment |
| replica-count |  | Number of replicas for the deployment |
| shard-count |  | Number of shard for the deployment |
| password |  | Password for the initial user |
| cpu-min |  | Minimum CPU count for the deployment |
| cpu-max |  | Maximum CPU count for the deployment |
| endpoints.{index}.private-network.private-network-id |  | UUID of the Private Network |
| ram-per-cpu |  | RAM per CPU count for the deployment (in GB) |
| move-factor |  | For the `tiered` storage policy, controls when data is moved from the hot volume (Block Storage) to the cold volume (Object Storage). Data is moved once free space on the hot volume drops below this fraction of its capacity. Value between 0 and 1 (default 0.1, i.e. data is moved when the hot volume is 90% full). |
| region | Default: `fr-par`<br />One of: `fr-par` | Region to target. If none is passed will use default region from the config |



### Delete a deployment

Delete a given deployment, specified by the `region` and `deployment_id` parameters. Deleting a deployment is permanent, and cannot be undone. Upon deletion, all your data will be lost.

**Usage:**

```shell
scw datawarehouse deployment delete <deployment-id ...> [arg=value ...]
```


**Args:**

| Name |   | Description |
|------|---|-------------|
| deployment-id | Required | UUID of the deployment to delete |
| region | Default: `fr-par`<br />One of: `fr-par` | Region to target. If none is passed will use default region from the config |



### Get a deployment

Retrieve information about a given deployment, specified by the `region` and `deployment_id` parameters. Its full details, including name, status are returned in the response object.

**Usage:**

```shell
scw datawarehouse deployment get <deployment-id ...> [arg=value ...]
```


**Args:**

| Name |   | Description |
|------|---|-------------|
| deployment-id | Required | UUID of the deployment |
| region | Default: `fr-par`<br />One of: `fr-par` | Region to target. If none is passed will use default region from the config |



### Get deployment TLS certificate

Retrieve the TLS certificate associated with a deployment.

**Usage:**

```shell
scw datawarehouse deployment get-certificate <deployment-id ...> [arg=value ...]
```


**Args:**

| Name |   | Description |
|------|---|-------------|
| deployment-id | Required | UUID of the deployment |
| region | Default: `fr-par`<br />One of: `fr-par` | Region to target. If none is passed will use default region from the config |



### List deployments

List all deployments in the specified region, for a given Scaleway Project. By default, the deployments 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 provide will be checked against the whole name string to see if it includes the string you put in the parameter.

**Usage:**

```shell
scw datawarehouse deployment list [arg=value ...]
```


**Args:**

| Name |   | Description |
|------|---|-------------|
| tags.{index} |  | List deployments with a given tag |
| name |  | Lists deployments that match a name pattern |
| order-by | One of: `created_at_desc`, `created_at_asc`, `name_asc`, `name_desc` | Criteria to use when ordering deployment listings |
| project-id |  | Project ID the deployment belongs to |
| organization-id |  | Organization ID the deployment belongs to |
| region | Default: `fr-par`<br />One of: `fr-par`, `all` | Region to target. If none is passed will use default region from the config |



### Update a deployment

Update the parameters of a deployment.

**Usage:**

```shell
scw datawarehouse deployment update <deployment-id ...> [arg=value ...]
```


**Args:**

| Name |   | Description |
|------|---|-------------|
| deployment-id | Required | UUID of the deployment to update |
| name |  | Name of the deployment |
| tags.{index} |  | Tags of a deployment |
| cpu-min |  | Minimum CPU count for the deployment |
| cpu-max |  | Maximum CPU count for the deployment |
| replica-count |  | Number of replicas for the deployment |
| move-factor |  | For the `tiered` storage policy, controls when data is moved from the hot volume (Block Storage) to the cold volume (Object Storage). Data is moved once free space on the hot volume drops below this fraction of its capacity. Value between 0 and 1 (default 0.1, i.e. data is moved when the hot volume is 90% full). |
| region | Default: `fr-par`<br />One of: `fr-par` | Region to target. If none is passed will use default region from the config |



## Endpoint management commands

Manage endpoints associated with a deployment.


### Create a new endpoint for a deployment

Create a new endpoint for a deployment.

**Usage:**

```shell
scw datawarehouse endpoint create [arg=value ...]
```


**Args:**

| Name |   | Description |
|------|---|-------------|
| deployment-id |  | UUID of the deployment |
| endpoint.private-network.private-network-id |  | UUID of the Private Network |
| region | Default: `fr-par`<br />One of: `fr-par` | Region to target. If none is passed will use default region from the config |



### Delete an endpoint from a deployment

Delete an endpoint from a deployment.

**Usage:**

```shell
scw datawarehouse endpoint delete [arg=value ...]
```


**Args:**

| Name |   | Description |
|------|---|-------------|
| endpoint-id | Required | UUID of the Endpoint to delete |
| region | Default: `fr-par`<br />One of: `fr-par` | Region to target. If none is passed will use default region from the config |



## List available presets

Data Warehouse preset to help you choose the best configuration.


### List available presets

List available presets.

**Usage:**

```shell
scw datawarehouse preset list [arg=value ...]
```


**Args:**

| Name |   | Description |
|------|---|-------------|
| region | Default: `fr-par`<br />One of: `fr-par`, `all` | Region to target. If none is passed will use default region from the config |



## User management commands

Manage users associated with a deployment.


### Create a new user for a deployment

Create a new user for a deployment.

**Usage:**

```shell
scw datawarehouse user create [arg=value ...]
```


**Args:**

| Name |   | Description |
|------|---|-------------|
| deployment-id | Required | UUID of the deployment |
| name |  | Name of the user |
| password |  | Password for the user |
| is-admin |  | Indicates if the user is an administrator |
| region | Default: `fr-par`<br />One of: `fr-par` | Region to target. If none is passed will use default region from the config |



### Delete a user from a deployment

Delete a user from a deployment.

**Usage:**

```shell
scw datawarehouse user delete [arg=value ...]
```


**Args:**

| Name |   | Description |
|------|---|-------------|
| deployment-id | Required | UUID of the deployment |
| name | Required | Name of the user to delete |
| region | Default: `fr-par`<br />One of: `fr-par` | Region to target. If none is passed will use default region from the config |



### List users associated with a deployment

List users associated with a deployment.

**Usage:**

```shell
scw datawarehouse user list [arg=value ...]
```


**Args:**

| Name |   | Description |
|------|---|-------------|
| deployment-id | Required | UUID of the deployment |
| name |  | Name of the user to filter by |
| order-by | One of: `name_asc`, `name_desc` | Criteria to use when ordering user listings |
| region | Default: `fr-par`<br />One of: `fr-par`, `all` | Region to target. If none is passed will use default region from the config |



### Update an existing user for a deployment

Update an existing user for a deployment.

**Usage:**

```shell
scw datawarehouse user update [arg=value ...]
```


**Args:**

| Name |   | Description |
|------|---|-------------|
| deployment-id | Required | UUID of the deployment |
| name | Required | Name of the user |
| password |  | New password for the user |
| is-admin |  | Updates the user administrator permissions |
| region | Default: `fr-par`<br />One of: `fr-par` | Region to target. If none is passed will use default region from the config |



## List available Clickhouse® versions

ClickHouse® versions powering your deployment.


### List available ClickHouse® versions

List available ClickHouse® versions.

**Usage:**

```shell
scw datawarehouse version list [arg=value ...]
```


**Args:**

| Name |   | Description |
|------|---|-------------|
| version |  |  |
| region | Default: `fr-par`<br />One of: `fr-par`, `all` | Region to target. If none is passed will use default region from the config |



