Merge pull request #5440 from influxdata/jstirnaman/issue5411

Dedicated: Add task-based for the DELETE database management endpoint, fix others
sql-timezone
Jason Stirnaman 2024-04-24 16:10:20 -05:00 committed by GitHub
commit e16cb0cfe3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
14 changed files with 345 additions and 75 deletions

View File

@ -1,7 +1,8 @@
--- ---
title: Create a database title: Create a database
description: > description: >
Use the [`influxctl database create` command](/influxdb/cloud-dedicated/reference/cli/influxctl/database/create/) or the Management HTTP API Use the [`influxctl database create` command](/influxdb/cloud-dedicated/reference/cli/influxctl/database/create/)
or the [Management HTTP API](/influxdb/cloud-dedicated/api/management/)
to create a new InfluxDB database in your InfluxDB Cloud Dedicated cluster. to create a new InfluxDB database in your InfluxDB Cloud Dedicated cluster.
Provide a database name and an optional retention period. Provide a database name and an optional retention period.
menu: menu:
@ -9,6 +10,7 @@ menu:
parent: Manage databases parent: Manage databases
weight: 201 weight: 201
list_code_example: | list_code_example: |
##### CLI
```sh ```sh
influxctl database create \ influxctl database create \
--retention-period 30d \ --retention-period 30d \
@ -16,13 +18,57 @@ list_code_example: |
--max-columns 250 \ --max-columns 250 \
<DATABASE_NAME> <DATABASE_NAME>
``` ```
##### API
```sh
curl \
--location "https://console.influxdata.com/api/v0/accounts/ACCOUNT_ID/clusters/CLUSTER_ID/databases" \
--request POST
--header "Accept: application/json" \
--header 'Content-Type: application/json' \
--header "Authorization: Bearer MANAGEMENT_TOKEN" \
--data '{
"name": "'DATABASE_NAME'",
"maxTables": 500,
"maxColumnsPerTable": 250,
"retentionPeriod": 2592000000000,
"partitionTemplate": [
{
"type": "tag",
"value": "TAG_KEY_1"
},
{
"type": "tag",
"value": "TAG_KEY_2"
},
{
"type": "bucket",
"value": {
"tagName": "TAG_KEY_3",
"numberOfBuckets": 100
}
},
{
"type": "bucket",
"value": {
"tagName": "TAG_KEY_4",
"numberOfBuckets": 300
}
},
{
"type": "time",
"value": "%Y-%m-%d"
}
]
}'
```
related: related:
- /influxdb/cloud-dedicated/reference/cli/influxctl/database/create/ - /influxdb/cloud-dedicated/reference/cli/influxctl/database/create/
- /influxdb/cloud-dedicated/admin/custom-partitions/ - /influxdb/cloud-dedicated/admin/custom-partitions/
- /influxdb/cloud-dedicated/api/management/#operation/CreateClusterDatabase - /influxdb/cloud-dedicated/reference/api/
--- ---
Use the [`influxctl` CLI](/influxdb/cloud-dedicated/reference/cli/influxctl/database/create/) Use the [`influxctl` CLI](/influxdb/cloud-dedicated/reference/cli/influxctl/)
or the [Management HTTP API](influxdb/cloud-dedicated/api/management/) to create a database in your {{< product-name omit=" Clustered" >}} cluster. or the [Management HTTP API](influxdb/cloud-dedicated/api/management/) to create a database in your {{< product-name omit=" Clustered" >}} cluster.
{{< tabs-wrapper >}} {{< tabs-wrapper >}}
@ -33,13 +79,15 @@ or the [Management HTTP API](influxdb/cloud-dedicated/api/management/) to create
{{% tab-content %}} {{% tab-content %}}
<!------------------------------- BEGIN INFLUXCTL -----------------------------> <!------------------------------- BEGIN INFLUXCTL ----------------------------->
Use the [`influxctl database create` command](/influxdb/cloud-dedicated/reference/cli/influxctl/database/create/)
to create a database in your {{< product-name omit=" Clustered" >}} cluster.
1. If you haven't already, [download and install the `influxctl` CLI](/influxdb/cloud-dedicated/reference/cli/influxctl/#download-and-install-influxctl), and then [configure an `influxctl` connection profile](/influxdb/cloud-dedicated/reference/cli/influxctl/#configure-connection-profiles) for your cluster. 1. If you haven't already, [download and install the `influxctl` CLI](/influxdb/cloud-dedicated/reference/cli/influxctl/#download-and-install-influxctl), and then [configure an `influxctl` connection profile](/influxdb/cloud-dedicated/reference/cli/influxctl/#configure-connection-profiles) for your cluster.
2. Run the `influxctl database create` command and provide the following: 2. Run the `influxctl database create` command and provide the following:
- _Optional_: Database [retention period](/influxdb/cloud-dedicated/admin/databases/#retention-periods) - _Optional_: Database [retention period](/influxdb/cloud-dedicated/admin/databases/#retention-periods)
Default is `0` (infinite). Default is `infinite` (`0`).
- _Optional_: Database table (measurement) limit. Default is `500`. - _Optional_: Database table (measurement) limit. Default is `500`.
- _Optional_: Database column limit. Default is `250`. - _Optional_: Database column limit. Default is `250`.
- _Optional_: [InfluxDB tags](/influxdb/cloud-dedicated/reference/glossary/#tag) - _Optional_: [InfluxDB tags](/influxdb/cloud-dedicated/reference/glossary/#tag)
@ -74,7 +122,7 @@ influxctl database create \
Replace the following in your command: Replace the following in your command:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} database - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} [database](/influxdb/cloud-dedicated/admin/databases/)
- {{% code-placeholder-key %}}`TAG_KEY_1`, `TAG_KEY_2`, `TAG_KEY_3`, and `TAG_KEY_4`{{% /code-placeholder-key %}}: [tag]((/influxdb/cloud-dedicated/reference/glossary/#tag)) keys from your data - {{% code-placeholder-key %}}`TAG_KEY_1`, `TAG_KEY_2`, `TAG_KEY_3`, and `TAG_KEY_4`{{% /code-placeholder-key %}}: [tag]((/influxdb/cloud-dedicated/reference/glossary/#tag)) keys from your data
## Database attributes ## Database attributes
@ -138,6 +186,7 @@ flags to define partition template parts used to generate partition keys for the
For more information, see [Manage data partitioning](/influxdb/cloud-dedicated/admin/custom-partitions/). For more information, see [Manage data partitioning](/influxdb/cloud-dedicated/admin/custom-partitions/).
{{% note %}} {{% note %}}
#### Partition templates can only be applied on create #### Partition templates can only be applied on create
You can only apply a partition template when creating a database. You can only apply a partition template when creating a database.
@ -158,8 +207,9 @@ _This example uses [cURL](https://curl.se/) to send a Management HTTP API reques
In the URL, provide the following credentials: In the URL, provide the following credentials:
- `ACCOUNT_ID`: The ID of the [account](/influxdb/cloud-dedicated/get-started/setup/#request-an-influxdb-cloud-dedicated-cluster) that the cluster belongs to. To view account ID and cluster ID, [list cluster details](/influxdb/cloud-dedicated/admin/clusters/list/#detailed-output-in-json). - `ACCOUNT_ID`: The ID of the [account](/influxdb/cloud-dedicated/get-started/setup/#request-an-influxdb-cloud-dedicated-cluster) that the cluster belongs to _(see how to [list cluster details](/influxdb/cloud-dedicated/admin/clusters/list/#detailed-output-in-json))_.
- `CLUSTER_ID`: The ID of the [cluster](/influxdb/cloud-dedicated/get-started/setup/#request-an-influxdb-cloud-dedicated-cluster) that you want to manage. To view account ID and cluster ID, [list cluster details](/influxdb/cloud-dedicated/admin/clusters/list/#detailed-output-in-json). - `CLUSTER_ID`: The ID of the [cluster](/influxdb/cloud-dedicated/get-started/setup/#request-an-influxdb-cloud-dedicated-cluster) that you want to manage _(see how to [list cluster details](/influxdb/cloud-dedicated/admin/clusters/list/#detailed-output-in-json))_.
Provide the following request headers: Provide the following request headers:
@ -193,6 +243,7 @@ The following example shows how to use the Management API to create a database w
```sh ```sh
curl \ curl \
--location "https://console.influxdata.com/api/v0/accounts/ACCOUNT_ID/clusters/CLUSTER_ID/databases" \ --location "https://console.influxdata.com/api/v0/accounts/ACCOUNT_ID/clusters/CLUSTER_ID/databases" \
--request POST
--header "Accept: application/json" \ --header "Accept: application/json" \
--header 'Content-Type: application/json' \ --header 'Content-Type: application/json' \
--header "Authorization: Bearer MANAGEMENT_TOKEN" \ --header "Authorization: Bearer MANAGEMENT_TOKEN" \
@ -236,10 +287,10 @@ curl \
Replace the following in your request: Replace the following in your request:
- {{% code-placeholder-key %}}`ACCOUNT_ID`{{% /code-placeholder-key %}}: the ID of the {{% product-name %}} account to create the database for - {{% code-placeholder-key %}}`ACCOUNT_ID`{{% /code-placeholder-key %}}: the ID of the {{% product-name %}} [account](/influxdb/cloud-dedicated/get-started/setup/#request-an-influxdb-cloud-dedicated-cluster) to create the database for
- {{% code-placeholder-key %}}`CLUSTER_ID`{{% /code-placeholder-key %}}: the ID of the {{% product-name %}} cluster to create the database for - {{% code-placeholder-key %}}`CLUSTER_ID`{{% /code-placeholder-key %}}: the ID of the {{% product-name %}} [cluster](/influxdb/cloud-dedicated/get-started/setup/#request-an-influxdb-cloud-dedicated-cluster) to create the database for
- {{% code-placeholder-key %}}`MANAGEMENT TOKEN`{{% /code-placeholder-key %}}: a [management token](/influxdb/cloud-dedicated/admin/tokens/management/) for your {{% product-name %}} cluster - {{% code-placeholder-key %}}`MANAGEMENT TOKEN`{{% /code-placeholder-key %}}: a [management token](/influxdb/cloud-dedicated/admin/tokens/management/) for your {{% product-name %}} cluster
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} database - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} [database](/influxdb/cloud-dedicated/admin/databases/)
- {{% code-placeholder-key %}}`TAG_KEY_1`, `TAG_KEY_2`, `TAG_KEY_3`, and `TAG_KEY_4`{{% /code-placeholder-key %}}: [tag]((/influxdb/cloud-dedicated/reference/glossary/#tag)) keys from your data - {{% code-placeholder-key %}}`TAG_KEY_1`, `TAG_KEY_2`, `TAG_KEY_3`, and `TAG_KEY_4`{{% /code-placeholder-key %}}: [tag]((/influxdb/cloud-dedicated/reference/glossary/#tag)) keys from your data
## Database attributes ## Database attributes
@ -280,6 +331,7 @@ Use the [`partitionTemplate`](/influxdb/cloud-dedicated/api/management/#operatio
For more information, see [Manage data partitioning](/influxdb/cloud-dedicated/admin/custom-partitions/). For more information, see [Manage data partitioning](/influxdb/cloud-dedicated/admin/custom-partitions/).
{{% note %}} {{% note %}}
#### Partition templates can only be applied on create #### Partition templates can only be applied on create
You can only apply a partition template when creating a database. You can only apply a partition template when creating a database.

View File

@ -2,6 +2,7 @@
title: Delete a database title: Delete a database
description: > description: >
Use the [`influxctl database delete` command](/influxdb/cloud-dedicated/reference/cli/influxctl/database/delete/) Use the [`influxctl database delete` command](/influxdb/cloud-dedicated/reference/cli/influxctl/database/delete/)
or the [Management HTTP API](/influxdb/cloud-dedicated/api/management/)
to delete a database from your InfluxDB Cloud Dedicated cluster. to delete a database from your InfluxDB Cloud Dedicated cluster.
Provide the name of the database you want to delete. Provide the name of the database you want to delete.
menu: menu:
@ -9,30 +10,29 @@ menu:
parent: Manage databases parent: Manage databases
weight: 203 weight: 203
list_code_example: | list_code_example: |
##### CLI
```sh ```sh
influxctl database delete <DATABASE_NAME> influxctl database delete <DATABASE_NAME>
``` ```
##### API
```sh
curl \
--location "https://console.influxdata.com/api/v0/accounts/ACCOUNT_ID/clusters/CLUSTER_ID/databases/DATABASE_NAME" \
--request DELETE \
--header "Accept: application/json" \
--header "Authorization: Bearer MANAGEMENT_TOKEN"
```
related: related:
- /influxdb/cloud-dedicated/reference/cli/influxctl/database/delete/ - /influxdb/cloud-dedicated/reference/cli/influxctl/database/delete/
- /influxdb/cloud-dedicated/reference/api/
--- ---
Use the [`influxctl database delete` command](/influxdb/cloud-dedicated/reference/cli/influxctl/database/delete/) Use the [`influxctl` CLI](/influxdb/cloud-dedicated/reference/cli/influxctl/)
to delete a database from your InfluxDB Cloud Dedicated cluster. or the [Management HTTP API](/influxdb/cloud-dedicated/api/management/) to create a database in your {{< product-name omit=" Clustered" >}} cluster.
1. If you haven't already, [download and install the `influxctl` CLI](/influxdb/cloud-dedicated/reference/cli/influxctl/#download-and-install-influxctl).
2. Run the `influxctl database delete` command and provide the following:
- Name of the database to delete
3. Confirm that you want to delete the database.
{{% code-placeholders "DATABASE_NAME" %}}
```sh
influxctl database delete DATABASE_NAME
```
{{% /code-placeholders %}}
{{% warn %}} {{% warn %}}
#### Deleting a database cannot be undone #### Deleting a database cannot be undone
Once a database is deleted, data stored in that database cannot be recovered. Once a database is deleted, data stored in that database cannot be recovered.
@ -40,4 +40,78 @@ Once a database is deleted, data stored in that database cannot be recovered.
#### Cannot reuse database names #### Cannot reuse database names
After a database is deleted, you cannot reuse the same name for a new database. After a database is deleted, you cannot reuse the same name for a new database.
{{% /warn %}} {{% /warn %}}
{{< tabs-wrapper >}}
{{% tabs %}}
[influxctl](#)
[Management API](#)
{{% /tabs %}}
{{% tab-content %}}
<!------------------------------- BEGIN INFLUXCTL ----------------------------->
1. If you haven't already, [download and install the `influxctl` CLI](/influxdb/cloud-dedicated/reference/cli/influxctl/#download-and-install-influxctl), and then [configure an `influxctl` connection profile](/influxdb/cloud-dedicated/reference/cli/influxctl/#configure-connection-profiles) for your cluster.
2. Run the `influxctl database delete` command and provide the following:
- Name of the database to delete
3. Confirm that you want to delete the database.
{{% code-placeholders "DATABASE_NAME" %}}
```sh
influxctl database delete DATABASE_NAME
```
{{% /code-placeholders %}}
<!-------------------------------- END INFLUXCTL ------------------------------>
{{% /tab-content %}}
{{% tab-content %}}
<!------------------------------- BEGIN cURL ---------------------------------->
_This example uses [cURL](https://curl.se/) to send a Management HTTP API request, but you can use any HTTP client._
1. If you haven't already, follow the instructions to [install cURL](https://everything.curl.dev/install/index.html) for your system.
2. In your terminal, use cURL to send a request to the following {{% product-name %}} console endpoint:
{{% api-endpoint endpoint="https://console.influxdata.com/api/v0/accounts/ACCOUNT_ID/clusters/CLUSTER_ID/databases/DATABASE_NAME" method="delete" api-ref="/influxdb/cloud-dedicated/api/management/#operation/DeleteClusterDatabase" %}}
In the URL, provide the following:
- `ACCOUNT_ID`: The ID of the [account](/influxdb/cloud-dedicated/get-started/setup/#request-an-influxdb-cloud-dedicated-cluster) that the cluster belongs to _(see how to [list cluster details](/influxdb/cloud-dedicated/admin/clusters/list/#detailed-output-in-json))_.
- `CLUSTER_ID`: The ID of the [cluster](/influxdb/cloud-dedicated/get-started/setup/#request-an-influxdb-cloud-dedicated-cluster) that you want to manage _(see how to [list cluster details](/influxdb/cloud-dedicated/admin/clusters/list/#detailed-output-in-json))_.
- `DATABASE_NAME`: The name of the [database](/influxdb/cloud-dedicated/admin/databases/) that you want to delete _(see how to [list databases](/influxdb/cloud-dedicated/admin/databases/list/))_.
Provide the following request headers:
- `Accept: application/json` to ensure the response body is JSON content
- `Authorization: Bearer` and a [Management API token](/influxdb/cloud-dedicated/admin/tokens/management/) for your cluster _(see how to [create a management token](/influxdb/cloud-dedicated/admin/tokens/management/) for Management API requests)_.
Specify the `DELETE` request method.
The following example shows how to use the Management API to delete a database:
{{% code-placeholders "DATABASE_NAME|ACCOUNT_ID|CLUSTER_ID|MANAGEMENT_TOKEN" %}}
```sh
curl \
--location "https://console.influxdata.com/api/v0/accounts/ACCOUNT_ID/clusters/CLUSTER_ID/databases/DATABASE_NAME" \
--request DELETE \
--header "Accept: application/json" \
--header "Authorization: Bearer MANAGEMENT_TOKEN"
```
{{% /code-placeholders %}}
Replace the following in your request:
- {{% code-placeholder-key %}}`ACCOUNT_ID`{{% /code-placeholder-key %}}: the ID of the {{% product-name %}} [account](/influxdb/cloud-dedicated/get-started/setup/#request-an-influxdb-cloud-dedicated-cluster) to create the database for
- {{% code-placeholder-key %}}`CLUSTER_ID`{{% /code-placeholder-key %}}: the ID of the {{% product-name %}} [cluster](/influxdb/cloud-dedicated/get-started/setup/#request-an-influxdb-cloud-dedicated-cluster) to create the database for
- {{% code-placeholder-key %}}`MANAGEMENT TOKEN`{{% /code-placeholder-key %}}: a [management token](/influxdb/cloud-dedicated/admin/tokens/management/) for your {{% product-name %}} cluster
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} [database](/influxdb/cloud-dedicated/admin/databases/)
<!------------------------------- END cURL ------------------------------------>
{{% /tab-content %}}
{{< /tabs-wrapper >}}

View File

@ -8,11 +8,21 @@ menu:
parent: Manage databases parent: Manage databases
weight: 202 weight: 202
list_code_example: | list_code_example: |
##### CLI
```sh ```sh
influxctl database list influxctl database list
``` ```
##### API
```sh
curl \
--location "https://console.influxdata.com/api/v0/accounts/ACCOUNT_ID/clusters/CLUSTER_ID/databases" \
--header "Accept: application/json" \
--header "Authorization: Bearer MANAGEMENT_TOKEN"
```
related: related:
- /influxdb/cloud-dedicated/reference/cli/influxctl/database/list/ - /influxdb/cloud-dedicated/reference/cli/influxctl/database/list/
- /influxdb/cloud-dedicated/reference/api/
--- ---
Use the [`influxctl` CLI](/influxdb/cloud-dedicated/reference/cli/influxctl/database/create/) Use the [`influxctl` CLI](/influxdb/cloud-dedicated/reference/cli/influxctl/database/create/)
@ -33,7 +43,7 @@ to list databases in your InfluxDB Cloud Dedicated cluster.
1. If you haven't already, [download and install the `influxctl` CLI](/influxdb/cloud-dedicated/reference/cli/influxctl/#download-and-install-influxctl), and then [configure an `influxctl` connection profile](/influxdb/cloud-dedicated/reference/cli/influxctl/#configure-connection-profiles) for your cluster. 1. If you haven't already, [download and install the `influxctl` CLI](/influxdb/cloud-dedicated/reference/cli/influxctl/#download-and-install-influxctl), and then [configure an `influxctl` connection profile](/influxdb/cloud-dedicated/reference/cli/influxctl/#configure-connection-profiles) for your cluster.
2. Run the `influxctl database list` command and provide the following: 2. Run the `influxctl database list` command and provide the following:
- _Optional_: [Output format](#output-formats) - _Optional_: [Output format](#output-format)
```sh ```sh
influxctl database list --format table influxctl database list --format table
@ -48,17 +58,15 @@ _This example uses [cURL](https://curl.se/) to send a Management HTTP API reques
1. If you haven't already, follow the instructions to [install cURL](https://everything.curl.dev/install/index.html) for your system. 1. If you haven't already, follow the instructions to [install cURL](https://everything.curl.dev/install/index.html) for your system.
2. In your terminal, use cURL to send a request to the following {{% product-name %}} console endpoint: 2. In your terminal, use cURL to send a request to the following {{% product-name %}} console endpoint:
{{% api-endpoint endpoint="https://console.influxdata.com/api/v0/accounts/ACCOUNT_ID/clusters/CLUSTER_ID/databases" method="get" api-ref="/influxdb/cloud-dedicated/api/management/#operation/CreateClusterDatabase" %}} {{% api-endpoint endpoint="https://console.influxdata.com/api/v0/accounts/ACCOUNT_ID/clusters/CLUSTER_ID/databases" method="get" api-ref="/influxdb/cloud-dedicated/api/management/#operation/GetClusterDatabases" %}}
In the URL, provide the following credentials: In the URL, provide the following credentials:
- `ACCOUNT_ID`: The ID of the [account](/influxdb/cloud-dedicated/get-started/setup/#request-an-influxdb-cloud-dedicated-cluster) that the cluster belongs to _(see how to [list cluster details](/influxdb/cloud-dedicated/admin/clusters/list/#detailed-output-in-json))_.
- `ACCOUNT_ID`: The ID of the [account](/influxdb/cloud-dedicated/get-started/setup/#request-an-influxdb-cloud-dedicated-cluster) that the cluster belongs to. To view account ID and cluster ID, [list cluster details](/influxdb/cloud-dedicated/admin/clusters/list/#detailed-output-in-json). - `CLUSTER_ID`: The ID of the [cluster](/influxdb/cloud-dedicated/get-started/setup/#request-an-influxdb-cloud-dedicated-cluster) that you want to manage _(see how to [list cluster details](/influxdb/cloud-dedicated/admin/clusters/list/#detailed-output-in-json))_.
- `CLUSTER_ID`: The ID of the [cluster](/influxdb/cloud-dedicated/get-started/setup/#request-an-influxdb-cloud-dedicated-cluster) that you want to manage. To view account ID and cluster ID, [list cluster details](/influxdb/cloud-dedicated/admin/clusters/list/#detailed-output-in-json).
Provide the following request headers: Provide the following request headers:
- `Accept: application/json` to ensure the response body is JSON content - `Accept: application/json` to ensure the response body is JSON content
- `Content-Type: application/json` to indicate the request body is JSON content
- `Authorization: Bearer` and a [Management API token](/influxdb/cloud-dedicated/admin/tokens/management/) for your cluster _(see how to [create a management token](/influxdb/cloud-dedicated/admin/tokens/management/) for Management API requests)_. - `Authorization: Bearer` and a [Management API token](/influxdb/cloud-dedicated/admin/tokens/management/) for your cluster _(see how to [create a management token](/influxdb/cloud-dedicated/admin/tokens/management/) for Management API requests)_.
The following example shows how to use the Management API to list databases in a cluster: The following example shows how to use the Management API to list databases in a cluster:
@ -76,8 +84,8 @@ curl \
Replace the following in your request: Replace the following in your request:
- {{% code-placeholder-key %}}`ACCOUNT_ID`{{% /code-placeholder-key %}}: the ID of the {{% product-name %}} account to create the database for - {{% code-placeholder-key %}}`ACCOUNT_ID`{{% /code-placeholder-key %}}: the ID of the {{% product-name %}} [account](/influxdb/cloud-dedicated/get-started/setup/#request-an-influxdb-cloud-dedicated-cluster) to create the database for
- {{% code-placeholder-key %}}`CLUSTER_ID`{{% /code-placeholder-key %}}: the ID of the {{% product-name %}} cluster to create the database for - {{% code-placeholder-key %}}`CLUSTER_ID`{{% /code-placeholder-key %}}: the ID of the {{% product-name %}} [cluster](/influxdb/cloud-dedicated/get-started/setup/#request-an-influxdb-cloud-dedicated-cluster) to create the database for
- {{% code-placeholder-key %}}`MANAGEMENT TOKEN`{{% /code-placeholder-key %}}: a [management token](/influxdb/cloud-dedicated/admin/tokens/management/) for your {{% product-name %}} cluster - {{% code-placeholder-key %}}`MANAGEMENT TOKEN`{{% /code-placeholder-key %}}: a [management token](/influxdb/cloud-dedicated/admin/tokens/management/) for your {{% product-name %}} cluster
<!------------------------------- END cURL ------------------------------------> <!------------------------------- END cURL ------------------------------------>
{{% /tab-content %}} {{% /tab-content %}}

View File

@ -2,22 +2,53 @@
title: Update a database title: Update a database
description: > description: >
Use the [`influxctl database update` command](/influxdb/cloud-dedicated/reference/cli/influxctl/database/update/) Use the [`influxctl database update` command](/influxdb/cloud-dedicated/reference/cli/influxctl/database/update/)
to update a database in your InfluxDB Cloud Dedicated cluster. or the [Management HTTP API](/influxdb/cloud-dedicated/api/management/)
to update attributes for a database in your InfluxDB Cloud Dedicated cluster.
Provide the database name and the attributes to update.
menu: menu:
influxdb_cloud_dedicated: influxdb_cloud_dedicated:
parent: Manage databases parent: Manage databases
weight: 201 weight: 201
list_code_example: | list_code_example: |
##### CLI
```sh ```sh
influxctl database update DATABASE_NAME \ influxctl database update \
--retention-period 30d \ --retention-period 30d \
--max-tables 500 \ --max-tables 500 \
--max-columns 250 --max-columns 250
<DATABASE_NAME>
```
##### API
```sh
curl \
--location "https://console.influxdata.com/api/v0/accounts/ACCOUNT_ID/clusters/CLUSTER_ID/databases/DATABASE_NAME" \
--request PATCH \
--header "Accept: application/json" \
--header 'Content-Type: application/json' \
--header "Authorization: Bearer MANAGEMENT_TOKEN" \
--data '{
"maxTables": 500,
"maxColumnsPerTable": 250,
"retentionPeriod": 2592000000000000
}'
``` ```
related: related:
- /influxdb/cloud-dedicated/reference/cli/influxctl/database/update/ - /influxdb/cloud-dedicated/reference/cli/influxctl/database/update/
- /influxdb/cloud-dedicated/reference/api/
--- ---
Use the [`influxctl` CLI](/influxdb/cloud-dedicated/reference/cli/influxctl/database/create/)
or the [Management HTTP API](/influxdb/cloud-dedicated/api/management/) to update attributes such as retention period, column limits, and table limits for a database in your {{< product-name omit=" Clustered" >}} cluster.
{{< tabs-wrapper >}}
{{% tabs %}}
[influxctl](#)
[Management API](#)
{{% /tabs %}}
{{% tab-content %}}
<!------------------------------- BEGIN INFLUXCTL ----------------------------->
Use the [`influxctl database update` command](/influxdb/cloud-dedicated/reference/cli/influxctl/database/update/) Use the [`influxctl database update` command](/influxdb/cloud-dedicated/reference/cli/influxctl/database/update/)
to update a database in your {{< product-name omit=" Clustered" >}} cluster. to update a database in your {{< product-name omit=" Clustered" >}} cluster.
@ -26,45 +57,47 @@ to update a database in your {{< product-name omit=" Clustered" >}} cluster.
- Database name - Database name
- _Optional_: Database [retention period](/influxdb/cloud-dedicated/admin/databases/#retention-periods) - _Optional_: Database [retention period](/influxdb/cloud-dedicated/admin/databases/#retention-periods)
_(default is infinite)_ Default is `infinite` (`0`).
- _Optional_: Database table (measurement) limit _(default is 500)_ - _Optional_: Database table (measurement) limit. Default is `500`.
- _Optional_: Database column limit _(default is 250)_ - _Optional_: Database column limit. Default is `250`.
{{% code-placeholders "DATABASE_NAME|30d|500|200" %}} {{% code-placeholders "DATABASE_NAME|30d|500|200" %}}
```sh ```sh
influxctl database update DATABASE_NAME \ influxctl database update DATABASE_NAME \
--retention-period 30d \ --retention-period 30d \
--max-tables 500 \ --max-tables 500 \
--max-columns 250 --max-columns 250
``` ```
{{% /code-placeholders %}} {{% /code-placeholders %}}
{{% warn %}} Replace the following in your command:
#### Database names can't be updated
The `influxctl database update` command uses the database name to identify which - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} [database](/influxdb/cloud-dedicated/admin/databases/)
database to apply updates to. The database name itself can't be updated.
{{% /warn %}}
- [Retention period syntax](#retention-period-syntax) ## Database attributes
- [Retention period syntax](#retention-period-syntax-influxctl-cli)
- [Database naming restrictions](#database-naming-restrictions) - [Database naming restrictions](#database-naming-restrictions)
- [InfluxQL DBRP naming convention](#influxql-dbrp-naming-convention) - [InfluxQL DBRP naming convention](#influxql-dbrp-naming-convention)
- [Table and column limits](#table-and-column-limits) - [Table and column limits](#table-and-column-limits)
## Retention period syntax ### Retention period syntax (influxctl CLI)
Use the `--retention-period` flag to define a specific Use the `--retention-period` flag to define the
[retention period](/influxdb/cloud-dedicated/admin/databases/#retention-periods) [retention period](/influxdb/cloud-dedicated/admin/databases/#retention-periods)
for the database. for the database.
The retention period value is a time duration value made up of a numeric value The retention period value is a time duration value made up of a numeric value
plus a duration unit. For example, `30d` means 30 days. plus a duration unit.
A zero duration retention period is infinite and data will not expire. For example, `30d` means 30 days.
A zero duration (`0d`) retention period is infinite and data won't expire.
The retention period value cannot be negative or contain whitespace. The retention period value cannot be negative or contain whitespace.
{{< flex >}} {{< flex >}}
{{% flex-content %}} {{% flex-content "half" %}}
##### Valid durations units include #### Valid durations units include
- **m**: minute - **m**: minute
- **h**: hour - **h**: hour
@ -74,9 +107,9 @@ The retention period value cannot be negative or contain whitespace.
- **y**: year - **y**: year
{{% /flex-content %}} {{% /flex-content %}}
{{% flex-content %}} {{% flex-content "half" %}}
##### Example retention period values #### Example retention period values
- `0d`: infinite/none - `0d`: infinite/none
- `3d`: 3 days - `3d`: 3 days
@ -89,7 +122,105 @@ The retention period value cannot be negative or contain whitespace.
{{% /flex-content %}} {{% /flex-content %}}
{{< /flex >}} {{< /flex >}}
## Database naming restrictions <!-------------------------------- END INFLUXCTL ------------------------------>
{{% /tab-content %}}
{{% tab-content %}}
<!------------------------------- BEGIN cURL ---------------------------------->
1. In your terminal, use cURL to send a request to the following {{% product-name %}} console endpoint:
{{% api-endpoint endpoint="https://console.influxdata.com/api/v0/accounts/ACCOUNT_ID/clusters/CLUSTER_ID/databases" method="post" api-ref="/influxdb/cloud-dedicated/api/management/#operation/CreateClusterDatabase" %}}
In the URL, provide the following credentials:
- `ACCOUNT_ID`: The ID of the [account](/influxdb/cloud-dedicated/get-started/setup/#request-an-influxdb-cloud-dedicated-cluster) that the cluster belongs to _(see how to [list cluster details](/influxdb/cloud-dedicated/admin/clusters/list/#detailed-output-in-json))_.
- `CLUSTER_ID`: The ID of the [cluster](/influxdb/cloud-dedicated/get-started/setup/#request-an-influxdb-cloud-dedicated-cluster) that you want to manage _(see how to [list cluster details](/influxdb/cloud-dedicated/admin/clusters/list/#detailed-output-in-json))_.
- `DATABASE_NAME`: The name of the [database](/influxdb/cloud-dedicated/admin/databases/) that you want to delete _(see how to [list databases](/influxdb/cloud-dedicated/admin/databases/list/))_.
Provide the following request headers:
- `Accept: application/json` to ensure the response body is JSON content
- `Content-Type: application/json` to indicate the request body is JSON content
- `Authorization: Bearer` and a [Management API token](/influxdb/cloud-dedicated/admin/tokens/management/) for your cluster _(see how to [create a management token](/influxdb/cloud-dedicated/admin/tokens/management/) for Management API requests)_.
In the request body, provide the parameters to update:
- _Optional:_ Database [retention period](/influxdb/cloud-dedicated/admin/databases/#retention-periods) in nanoseconds.
Default is `0` (infinite).
- _Optional_: Database table (measurement) limit. Default is `500`.
- _Optional_: Database column limit. Default is `250`.
Specify the `PATCH` request method.
The following example shows how to use the Management API to update a database:
{{% code-placeholders "DATABASE_NAME|2592000000000000|500|250|ACCOUNT_ID|CLUSTER_ID|MANAGEMENT_TOKEN" %}}
```sh
curl \
--location "https://console.influxdata.com/api/v0/accounts/ACCOUNT_ID/clusters/CLUSTER_ID/databases/DATABASE_NAME" \
--request PATCH \
--header "Accept: application/json" \
--header 'Content-Type: application/json' \
--header "Authorization: Bearer MANAGEMENT_TOKEN" \
--data '{
"maxTables": 500,
"maxColumnsPerTable": 250,
"retentionPeriod": 2592000000000000
}'
```
{{% /code-placeholders %}}
Replace the following in your request:
- {{% code-placeholder-key %}}`ACCOUNT_ID`{{% /code-placeholder-key %}}: the ID of the {{% product-name %}} [account](/influxdb/cloud-dedicated/get-started/setup/#request-an-influxdb-cloud-dedicated-cluster) to create the database for
- {{% code-placeholder-key %}}`CLUSTER_ID`{{% /code-placeholder-key %}}: the ID of the {{% product-name %}} [cluster](/influxdb/cloud-dedicated/get-started/setup/#request-an-influxdb-cloud-dedicated-cluster) to create the database for
- {{% code-placeholder-key %}}`MANAGEMENT TOKEN`{{% /code-placeholder-key %}}: a [management token](/influxdb/cloud-dedicated/admin/tokens/management/) for your {{% product-name %}} cluster
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} [database](/influxdb/cloud-dedicated/admin/databases/)
## Database attributes
- [Retention period syntax](#retention-period-syntax-management-api)
- [Database naming restrictions](#database-naming-restrictions)
- [InfluxQL DBRP naming convention](#influxql-dbrp-naming-convention)
- [Table and column limits](#table-and-column-limits)
### Retention period syntax (Management API)
Use the `retentionPeriod` property to specify the
[retention period](/influxdb/cloud-dedicated/admin/databases/#retention-periods)
for the database.
The retention period value is an integer (`<int32>`) that represents the number of nanoseconds.
For example, `2592000000000` means 30 days.
A zero (`0`) retention period is infinite and data won't expire.
The retention period value cannot be negative or contain whitespace.
#### Example retention period values
- `0`: infinite/none
- `259200000000000`: 3 days
- `2592000000000000`: 30 days
- `31536000000000000`: 1 standard year (365 days)
<!------------------------------- END cURL ------------------------------------>
{{% /tab-content %}}
{{< /tabs-wrapper >}}
{{% warn %}}
#### Database names can't be updated
The `influxctl database update` command uses the database name to identify which
database to apply updates to. The database name itself can't be updated.
#### Partition templates can't be updated
You can only apply a partition template when creating a database.
There is no way to update a partition template on an existing database.
{{% /warn %}}
### Database naming restrictions
Database names must adhere to the following naming restrictions: Database names must adhere to the following naming restrictions:
@ -99,7 +230,7 @@ Database names must adhere to the following naming restrictions:
- Should not start with an underscore (`_`). - Should not start with an underscore (`_`).
- Maximum length of 64 characters. - Maximum length of 64 characters.
## InfluxQL DBRP naming convention ### InfluxQL DBRP naming convention
In InfluxDB 1.x, data is stored in [databases](/influxdb/v1/concepts/glossary/#database) In InfluxDB 1.x, data is stored in [databases](/influxdb/v1/concepts/glossary/#database)
and [retention policies](/influxdb/v1/concepts/glossary/#retention-policy-rp). and [retention policies](/influxdb/v1/concepts/glossary/#retention-policy-rp).
@ -116,7 +247,7 @@ naming convention to automatically map v1 DBRP combinations to a database:
database_name/retention_policy_name database_name/retention_policy_name
``` ```
##### Database naming examples #### Database naming examples
| v1 Database name | v1 Retention Policy name | New database name | | v1 Database name | v1 Retention Policy name | New database name |
| :--------------- | :----------------------- | :------------------------ | | :--------------- | :----------------------- | :------------------------ |
@ -124,12 +255,17 @@ database_name/retention_policy_name
| telegraf | autogen | telegraf/autogen | | telegraf | autogen | telegraf/autogen |
| webmetrics | 1w-downsampled | webmetrics/1w-downsampled | | webmetrics | 1w-downsampled | webmetrics/1w-downsampled |
## Table and column limits ### Table and column limits
In {{< product-name >}}, table (measurement) and column limits can be In {{< product-name >}}, table (measurement) and column limits can be
configured using the `--max-tables` and `--max-columns` flags. configured using the following options:
### Table limit | Description | Default | influxctl CLI flag | Management API property |
| :---------------------------- | :------ | :-------------- | :------------------- |
| [Table limit](#table-limit) | 500 | `--max-tables` | `maxTables` |
| [Column limit](#column-limit) | 250 | `--max-columns` | `maxColumnsPerTable` |
#### Table limit
**Default maximum number of tables**: 500 **Default maximum number of tables**: 500
@ -172,7 +308,7 @@ operating cost of your cluster.
{{% /expand %}} {{% /expand %}}
{{< /expand-wrapper >}} {{< /expand-wrapper >}}
### Column limit #### Column limit
**Default maximum number of columns**: 250 **Default maximum number of columns**: 250

View File

@ -95,7 +95,7 @@ Use `Token` to authenticate a write request:
Replace the following: Replace the following:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} database - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} [database](/influxdb/cloud-dedicated/admin/databases/)
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: - {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens)
with sufficient permissions to the specified database with sufficient permissions to the specified database

View File

@ -91,7 +91,7 @@ assert 'logical_plan' in df.plan_type.values, "Expect logical_plan"
Replace the following: Replace the following:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} database - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} [database](/influxdb/cloud-dedicated/admin/databases/)
- {{% code-placeholder-key %}}`TOKEN`{{% /code-placeholder-key %}}: - {{% code-placeholder-key %}}`TOKEN`{{% /code-placeholder-key %}}:
a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens)
with sufficient permissions to the specified database with sufficient permissions to the specified database

View File

@ -230,7 +230,7 @@ use_middleware_trace_header()
Replace the following: Replace the following:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} database - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} [database](/influxdb/cloud-dedicated/admin/databases/)
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: - {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens)
with sufficient permissions to the specified database with sufficient permissions to the specified database

View File

@ -29,7 +29,7 @@ influxctl cluster get <CLUSTER_ID>
| Argument | Description | | Argument | Description |
| :------------- | :----------------------- | | :------------- | :----------------------- |
| **CLUSTER_ID** | ID of the cluster to get | | **CLUSTER_ID** | ID of the [cluster](/influxdb/cloud-dedicated/reference/glossary/#cluster) to get |
## Flags ## Flags

View File

@ -21,7 +21,7 @@ influxctl cluster update [flags] <CLUSTER_ID>
| Argument | Description | | Argument | Description |
| :------------- | :----------------------- | | :------------- | :----------------------- |
| **CLUSTER_ID** | ID of the cluster to get | | **CLUSTER_ID** | ID of the [cluster](/influxdb/cloud-dedicated/reference/glossary/#cluster) to get |
## Flags ## Flags

View File

@ -105,7 +105,7 @@ curl "https://{{< influxdb/host >}}/query" \
Replace the following: Replace the following:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} bucket - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} [bucket](/influxdb/cloud-serverless/admin/buckets/)
- {{% code-placeholder-key %}}`RETENTION_POLICY`{{% /code-placeholder-key %}}: your {{% product-name %}} retention policy - {{% code-placeholder-key %}}`RETENTION_POLICY`{{% /code-placeholder-key %}}: your {{% product-name %}} retention policy
- {{% code-placeholder-key %}}`API_TOKEN`{{% /code-placeholder-key %}}: a [token](/influxdb/cloud-serverless/admin/tokens/) with sufficient permissions to the mapped bucket - {{% code-placeholder-key %}}`API_TOKEN`{{% /code-placeholder-key %}}: a [token](/influxdb/cloud-serverless/admin/tokens/) with sufficient permissions to the mapped bucket

View File

@ -89,7 +89,7 @@ assert 'logical_plan' in df.plan_type.values, "Expect logical_plan"
Replace the following: Replace the following:
- {{% code-placeholder-key %}}`BUCKET_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} bucket - {{% code-placeholder-key %}}`BUCKET_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} [bucket](/influxdb/cloud-serverless/admin/buckets/)
- {{% code-placeholder-key %}}`TOKEN`{{% /code-placeholder-key %}}: a [token](/influxdb/cloud-serverless/admin/tokens/) with sufficient permissions to the specified bucket - {{% code-placeholder-key %}}`TOKEN`{{% /code-placeholder-key %}}: a [token](/influxdb/cloud-serverless/admin/tokens/) with sufficient permissions to the specified bucket
{{% /expand %}} {{% /expand %}}

View File

@ -112,7 +112,7 @@ curl --get "https://{{< influxdb/host >}}/query" \
Replace the following: Replace the following:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} database - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} [database](/influxdb/clustered/admin/databases/)
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with sufficient permissions to the specified database - {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with sufficient permissions to the specified database
#### Query string authentication #### Query string authentication
@ -142,7 +142,7 @@ curl --get "https://{{< influxdb/host >}}/query" \
Replace the following: Replace the following:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} database - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} [database](/influxdb/clustered/admin/databases/)
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with sufficient permissions to the specified database - {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with sufficient permissions to the specified database
### Authenticate with a token scheme ### Authenticate with a token scheme
@ -195,7 +195,7 @@ curl -i "https://{{< influxdb/host >}}/write?db=DATABASE_NAME&precision=s" \
Replace the following: Replace the following:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} database - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} [database](/influxdb/clustered/admin/databases/)
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with sufficient permissions to the specified database - {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with sufficient permissions to the specified database
## Responses ## Responses
@ -320,7 +320,7 @@ To configure the v1.x output plugin for writing to {{% product-name %}}, add the
Replace the following: Replace the following:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} database - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} [database](/influxdb/clustered/admin/databases/)
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with sufficient permissions to the specified database - {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with sufficient permissions to the specified database
##### Other Telegraf configuration options ##### Other Telegraf configuration options
@ -355,7 +355,7 @@ curl -i 'https://{{< influxdb/host >}}/write?db=DATABASE_NAME&precision=s' \
Replace the following: Replace the following:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} database - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} [database](/influxdb/clustered/admin/databases/)
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with sufficient permissions to the specified database - {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with sufficient permissions to the specified database
##### v1 CLI (not supported) ##### v1 CLI (not supported)
@ -425,7 +425,7 @@ client = InfluxDBClient(
Replace the following: Replace the following:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} database - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} [database](/influxdb/clustered/admin/databases/)
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with sufficient permissions to the specified database - {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with sufficient permissions to the specified database
## Query data ## Query data

View File

@ -97,7 +97,7 @@ curl --request post "https://{{< influxdb/host >}}/api/v2/write?bucket=DATABASE_
Replace the following: Replace the following:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} database - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} [database](/influxdb/clustered/admin/databases/)
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with sufficient permissions to the specified database - {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with sufficient permissions to the specified database
## Responses ## Responses

View File

@ -91,7 +91,7 @@ assert 'logical_plan' in df.plan_type.values, "Expect logical_plan"
Replace the following: Replace the following:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} database - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} [database](/influxdb/clustered/admin/databases/)
- {{% code-placeholder-key %}}`TOKEN`{{% /code-placeholder-key %}}: - {{% code-placeholder-key %}}`TOKEN`{{% /code-placeholder-key %}}:
a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with
sufficient permissions to the specified database sufficient permissions to the specified database