pkg export all filter, resolves #803

pull/806/head
Scott Anderson 2020-03-09 15:28:42 -06:00
parent 88c0d34723
commit ee5f067641
2 changed files with 22 additions and 6 deletions

View File

@ -79,6 +79,21 @@ influx pkg export all \
-t $INFLUX_TOKEN
```
#### Export resources filtered by labelName or resourceKind
The `influx pkg export all` command has an optional `--filter` flag that filters
only exports resources that match a specified `labelName` or `resourceKind`.
###### Export only buckets with a specific label name
```sh
influx pkg export all \
-o my-org \
-f ~/templates/awesome-template.yml \
-t $INFLUX_TOKEN \
--filter=resourceKind=Bucket \
--filter=labelName=Example
```
For information about flags, see the
[`influx pkg export all` documentation](/v2.0/reference/cli/influx/pkg/export/all/).

View File

@ -17,11 +17,12 @@ influx pkg export all [flags]
```
## Flags
| Flag | Description | Input Type | {{< cli/mapped >}} |
|:---- |:----------- |:---------- |:------------------ |
| `-f`, `--file` | Package output file. Defaults to stdout. Use `.yml` or `.json` file extensions. | string | |
| `-h`, `--help` | Help for the `export` command | | |
| `-o`, `--org` | The name of the organization that owns the resources | string | `INFLUX_ORG` |
| `--org-id` | The ID of the organization that owns the resources | string | `INFLUX_ORG_ID` |
| Flag | Description | Input Type | {{< cli/mapped >}} |
|:---- |:----------- |:---------- |:------------------ |
| `-f`, `--file` | Package output file. Defaults to stdout. Use `.yml` or `.json` file extensions. | string | |
| `--filter` | Filter exported resources by labelName or resourceKind (format: `--filter=labelName=example`) | list of strings |
| `-h`, `--help` | Help for the `export` command | | |
| `-o`, `--org` | The name of the organization that owns the resources | string | `INFLUX_ORG` |
| `--org-id` | The ID of the organization that owns the resources | string | `INFLUX_ORG_ID` |
{{% cli/influx-global-flags %}}