pkg export all filter, resolves #803
parent
88c0d34723
commit
ee5f067641
|
@ -79,6 +79,21 @@ influx pkg export all \
|
||||||
-t $INFLUX_TOKEN
|
-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
|
For information about flags, see the
|
||||||
[`influx pkg export all` documentation](/v2.0/reference/cli/influx/pkg/export/all/).
|
[`influx pkg export all` documentation](/v2.0/reference/cli/influx/pkg/export/all/).
|
||||||
|
|
||||||
|
|
|
@ -17,11 +17,12 @@ influx pkg export all [flags]
|
||||||
```
|
```
|
||||||
|
|
||||||
## Flags
|
## Flags
|
||||||
| Flag | Description | Input Type | {{< cli/mapped >}} |
|
| Flag | Description | Input Type | {{< cli/mapped >}} |
|
||||||
|:---- |:----------- |:---------- |:------------------ |
|
|:---- |:----------- |:---------- |:------------------ |
|
||||||
| `-f`, `--file` | Package output file. Defaults to stdout. Use `.yml` or `.json` file extensions. | string | |
|
| `-f`, `--file` | Package output file. Defaults to stdout. Use `.yml` or `.json` file extensions. | string | |
|
||||||
| `-h`, `--help` | Help for the `export` command | | |
|
| `--filter` | Filter exported resources by labelName or resourceKind (format: `--filter=labelName=example`) | list of strings |
|
||||||
| `-o`, `--org` | The name of the organization that owns the resources | string | `INFLUX_ORG` |
|
| `-h`, `--help` | Help for the `export` command | | |
|
||||||
| `--org-id` | The ID of the organization that owns the resources | string | `INFLUX_ORG_ID` |
|
| `-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 %}}
|
{{% cli/influx-global-flags %}}
|
||||||
|
|
Loading…
Reference in New Issue