added new pkg cli commands, resolves #704

pull/705/head
Scott Anderson 2020-01-08 16:04:20 -07:00
parent 1aea8bf8a8
commit 05e1d66ed3
7 changed files with 175 additions and 16 deletions

View File

@ -18,23 +18,25 @@ influx pkg [command]
```
## Available commands
| Command | Description |
|:--------|----------------------------------------------------------------|
| `all` | Export all existing resources for an organization as a package |
| Command | Description |
|:------- |:----------- |
| [export](/v2.0/reference/cli/influx/pkg/export/) | Export existing resources as a package |
| [new](/v2.0/reference/cli/influx/pkg/new/) | Create a reusable pkg to create resources in a declarative manner |
| [summary](/v2.0/reference/cli/influx/pkg/summary/) | Summarize the provided package |
| [validate](/v2.0/reference/cli/influx/pkg/validate/) | Validate the provided package |
## Flags
| Flag | Description | Input Type |
|:----------------------|:--------------------------------------------------------------------------------|-----------------|
| `--buckets` | Comma-separated list of bucket IDs | list of strings |
| `--dashboards` | Comma-separated list of dashboard IDs | list of strings |
| `-d`, `--description` | Package description | string |
| `-f`, `--file` | Package output file. Defaults to stdout. Use `.yml` or `.json` file extensions. | string |
| `-h`, `--help` | Help for the `export` command | |
| `--labels` | Comma-separated list of label IDs | list of strings |
| `-n`, `--name` | Package name | string |
| `--resource-type` | Resource type associated with all IDs via stdin | string |
| `--variables` | Comma-separated list of variable IDs | list of strings |
| `-v`, `--version` | Package version | string |
| Flag | Description | Input Type |
|:---- |:----------------------------- |:---------- |
| `-c`, `--color` | Enable color in output _(default is true) _ | |
| `-f`, `--file` | Path to package file | string |
| `--force` | Ignore warnings about destructive changes | |
| `-h`, `--help` | Help for the `pkg` command | |
| `-o`, `--org` | The name of the organization that owns the bucket | string |
| `--org-id` | The ID of the organization that owns the bucket | string |
| `-q`, `--quiet` | Disable output printing | |
| `--secret` | Secrets to provide alongside the package (format: `--secret=SECRET_KEY::SECRET_VALUE`) | string |
| `--table-borders` | Enable table borders _(default is true)_ | |
{{% influx-cli-global-flags %}}

View File

@ -0,0 +1,43 @@
---
title: influx pkg export
description: The 'influx pkg' command exports existing resources as a package.
menu:
v2_0_ref:
parent: influx pkg
weight: 101
---
The `influx pkg export` command exports existing resources as a package.
## Usage
```
influx pkg export [flags]
influx pkg export [command]
```
## Available subcommands
| Subcommand | Description |
|:---------- |----------------------------------------------------------------|
| [all](/v2.0/reference/cli/influx/pkg/export/all/) | Export all existing resources for an organization as a package |
## Flags
| Flag | Description | Input Type |
|:---- |:----------- |:---------- |
| `--buckets` | Comma-separated list of bucket IDs | string |
| `--checks` | Comma-separated list of check IDs | string |
| `--dashboards` | Comma-separated list of dashboard IDs | string |
| `-d`, `--description` | Package description | string |
| `--endpoints` | Comma-separated list of notification endpoint IDs | string |
| `-f`, `--file` | Package output file. Defaults to stdout. Use `.yml` or `.json` file extensions. | string |
| `-h`, `--help` | Help for the `export` command | |
| `--labels` | Comma-separated list of label IDs | string |
| `-n`, `--name` | Package name | string |
| `--resource-type` | Resource type associated with all IDs via stdin | string |
| `--rules` | Comma-separated list of notification rule IDs | string |
| `--tasks` | Comma-separated list of task IDs | string |
| `--telegraf-configs` | Comma-separated list of Telegraf configuration IDs | string |
| `--variables` | Comma-separated list of variable IDs | string |
| `-v`, `--version` | Package version | string |
{{% influx-cli-global-flags %}}

View File

@ -0,0 +1,31 @@
---
title: influx pkg export all
description: >
The 'influx pkg' command exports all existing resources for an organization as a package.
menu:
v2_0_ref:
parent: influx pkg export
weight: 201
---
The `influx pkg export all` command exports all existing resources for an
organization as a package.
## Usage
```
influx pkg export all [flags]
```
## Flags
| Flag | Description | Input Type |
|:---- |:----------- |:---------- |
| `-d`, `--description` | Package description | string |
| `-f`, `--file` | Package output file. Defaults to stdout. Use `.yml` or `.json` file extensions. | string |
| `-h`, `--help` | Help for the `export` command | |
| `-n`, `--name` | Package name | string |
| `-o`, `--org` | The name of the organization that owns the resources | string |
| `--org-id` | The ID of the organization that owns the resources | string |
| `-v`, `--version` | Package version | string |
{{% influx-cli-global-flags %}}

View File

@ -0,0 +1,31 @@
---
title: influx pkg new
description: >
The 'influx pkg new' command creates a reusable package that create resources
in a declarative manner.
menu:
v2_0_ref:
parent: influx pkg
weight: 101
---
The `influx pkg new` command creates a reusable package that create resources in
a declarative manner.
## Usage
```
influx pkg new [flags]
```
## Flags
| Flag | Description | Input Type |
|:----------------------|:--------------------------------------------------------------------------------|-----------------|
| `-d`, `--description` | Package description | string |
| `-f`, `--file` | Package output file. Defaults to stdout. Use `.yml` or `.json` file extensions. | string |
| `-h`, `--help` | Help for the `new` command | |
| `-n`, `--name` | Package name | string |
| `-q`, `--quiet` | Skip interactive mode | |
| `-v`, `--version` | Package version | string |
{{% influx-cli-global-flags %}}

View File

@ -0,0 +1,27 @@
---
title: influx pkg summary
description: >
The 'influx pkg summary' command summarizes the provided package.
menu:
v2_0_ref:
parent: influx pkg
weight: 101
---
The `influx pkg summary` command summarizes the provided package.
## Usage
```
influx pkg summary [flags]
```
## Flags
| Flag | Description | Input Type |
|:---- |:----------- |:---------- |
| `-c`, `--color` | Enable color in output _(default is true) _ | |
| `-f`, `--file` | Package file to summarize | string |
| `-h`, `--help` | Help for the `summary` command | |
| `--table-borders` | Enable table borders _(default is true)_ | |
{{% influx-cli-global-flags %}}

View File

@ -0,0 +1,25 @@
---
title: influx pkg validate
description: >
The 'influx pkg validate' command validates the provided package.
menu:
v2_0_ref:
parent: influx pkg
weight: 101
---
The `influx pkg validate` command validates the provided package.
## Usage
```
influx pkg validate [flags]
```
## Flags
| Flag | Description | Input Type |
|:---- |:----------- |:---------- |
| `-f`, `--file` | Package file to validate | string |
| `-h`, `--help` | Help for the `validate` command | |
{{% influx-cli-global-flags %}}

View File

@ -1,6 +1,6 @@
<hr/>
<div class="feedback block">
<h4>Bug Reports and Feedback</h4>
<h4 id="bug-reports-and-feedback">Bug Reports and Feedback</h4>
<p>
Thank you for being willing to help test InfluxDB v2.0 beta!
Feedback and bug reports are welcome and encouraged both for InfluxDB and this documentation.