commit
28f35f7190
|
@ -25,11 +25,29 @@ to delete a bucket.
|
|||
## Delete a bucket using the influx CLI
|
||||
|
||||
Use the [`influx bucket delete` command](/v2.0/reference/cli/influx/bucket/delete)
|
||||
to delete a bucket. Deleting a bucket requires the following:
|
||||
to delete a bucket a bucket by name or ID.
|
||||
|
||||
- The bucket ID _(provided in the output of `influx bucket list`)_
|
||||
- The name or ID of the organization to which the bucket belongs
|
||||
### Delete a bucket by name
|
||||
**To delete a bucket by name, you need:**
|
||||
|
||||
- Bucket name
|
||||
- Bucket's organization name or ID
|
||||
|
||||
<!-- -->
|
||||
```sh
|
||||
# Syntax
|
||||
influx bucket delete -n <bucket-name> -o <org-name>
|
||||
|
||||
# Example
|
||||
influx bucket delete -n my-bucket -o my-org
|
||||
```
|
||||
|
||||
### Delete a bucket by ID
|
||||
**To delete a bucket by ID, you need:**
|
||||
|
||||
- Bucket ID _(provided in the output of `influx bucket list`)_
|
||||
|
||||
<!-- -->
|
||||
```sh
|
||||
# Syntax
|
||||
influx bucket delete -i <bucket-id>
|
||||
|
|
|
@ -6,6 +6,8 @@ menu:
|
|||
name: influx bucket delete
|
||||
parent: influx bucket
|
||||
weight: 201
|
||||
related:
|
||||
- /v2.0/organizations/buckets/delete-bucket/
|
||||
---
|
||||
|
||||
The `influx bucket delete` command deletes a bucket from InfluxDB and all the data it contains.
|
||||
|
@ -16,9 +18,12 @@ influx bucket delete [flags]
|
|||
```
|
||||
|
||||
## Flags
|
||||
| Flag | Description | Input type |
|
||||
|:---- |:----------- |:----------: |
|
||||
| `-h`, `--help` | Help for the `delete` command | |
|
||||
| `-i`, `--id` | **(Required)** Bucket ID | string |
|
||||
| Flag | Description | Input type | {{< cli/mapped >}} |
|
||||
|:---- |:----------- |:----------: |:------------------ |
|
||||
| `-h`, `--help` | Help for the `delete` command | | |
|
||||
| `-i`, `--id` | Bucket ID _(required if no `--name`)_ | string | |
|
||||
| `-n`, `--name` | Bucket name _(requires `--org` or `org-id`)_ | string | |
|
||||
| `-o`, `--org` | Organization name | string | `$INFLUX_ORG` |
|
||||
| `--org-id` | Organization ID | string | `$INFLUX_ORG_ID` |
|
||||
|
||||
{{% cli/influx-global-flags %}}
|
||||
|
|
Loading…
Reference in New Issue