From 6518bd99afceca1c2f9e10690dbbb8bbb63f001b Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Wed, 25 Mar 2020 09:23:56 -0600 Subject: [PATCH 1/2] delete a bucket by name, resolves #861 --- .../organizations/buckets/delete-bucket.md | 23 +++++++++++++++++-- .../reference/cli/influx/bucket/delete.md | 13 +++++++---- 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/content/v2.0/organizations/buckets/delete-bucket.md b/content/v2.0/organizations/buckets/delete-bucket.md index 6bc8a0aa1..9f74dc115 100644 --- a/content/v2.0/organizations/buckets/delete-bucket.md +++ b/content/v2.0/organizations/buckets/delete-bucket.md @@ -25,11 +25,30 @@ 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. +Delete buckets by name or ID. + +### Delete a bucket by name +**To delete a bucket by name, you need:** + +- The bucket name +- The name or ID of the organization the bucket belongs to + + +```sh +# Syntax +influx bucket delete -n -o + +# Example +influx bucket delete -n my-bucket -o my-org +``` + +### Delete a bucket by ID +**To delete a bucket by ID, you need:** - The bucket ID _(provided in the output of `influx bucket list`)_ -- The name or ID of the organization to which the bucket belongs + ```sh # Syntax influx bucket delete -i diff --git a/content/v2.0/reference/cli/influx/bucket/delete.md b/content/v2.0/reference/cli/influx/bucket/delete.md index 324ae2a38..2ee119cbb 100644 --- a/content/v2.0/reference/cli/influx/bucket/delete.md +++ b/content/v2.0/reference/cli/influx/bucket/delete.md @@ -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 %}} From 3a7d815a91b6f20138207c69058809cdd449823b Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Wed, 25 Mar 2020 11:10:36 -0600 Subject: [PATCH 2/2] updated bucket delete docs to address PR feedback --- content/v2.0/organizations/buckets/delete-bucket.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/content/v2.0/organizations/buckets/delete-bucket.md b/content/v2.0/organizations/buckets/delete-bucket.md index 9f74dc115..ab3ce6111 100644 --- a/content/v2.0/organizations/buckets/delete-bucket.md +++ b/content/v2.0/organizations/buckets/delete-bucket.md @@ -25,14 +25,13 @@ 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. -Delete buckets by name or ID. +to delete a bucket a bucket by name or ID. ### Delete a bucket by name **To delete a bucket by name, you need:** -- The bucket name -- The name or ID of the organization the bucket belongs to +- Bucket name +- Bucket's organization name or ID ```sh @@ -46,7 +45,7 @@ influx bucket delete -n my-bucket -o my-org ### Delete a bucket by ID **To delete a bucket by ID, you need:** -- The bucket ID _(provided in the output of `influx bucket list`)_ +- Bucket ID _(provided in the output of `influx bucket list`)_ ```sh