Skip to content

Commit 68c3812

Browse files
doc(export): Update USERGUIDE with App resource
1 parent 4c563f7 commit 68c3812

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

cmd/exporter/docs/USERGUIDE.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,7 @@ Specifies the resource kinds to export. If not set, the user is prompted interac
366366

367367
The possible values are:
368368

369+
- `app`
369370
- `organization`
370371
- `orgrole`
371372
- `serviceinstance`
@@ -425,6 +426,18 @@ When exporting *Organization* resource kinds, the `org` parameter value specifie
425426
When exporting *Space* resource kinds, the `space` parameter value specifies regular expressions that the *Space* names must match.
426427

427428

429+
<a id="app"></a>
430+
431+
##### App
432+
433+
| Type | []string |
434+
|-------------------- |--------- |
435+
| CLI flag | `--app` |
436+
| Environment variable | - |
437+
| Config file key | `app` |
438+
439+
When exporting *App* resource kinds, the `app` parameter value specifies regular expressions that the *App* names must match. Apps can be filtered by organization (`--org`) and space (`--space`) parameters.
440+
428441
<a id="serviceinstance"></a>
429442

430443
##### ServiceInstance
@@ -573,6 +586,32 @@ The `org`, `space`, and `serviceinstance` parameter values are entered interacti
573586
![img](vhs/cf-export-sis-interactive.gif "Exporting an interactively selected ServiceInstance resource")
574587

575588

589+
## Exporting all *Apps* from spaces matching a regex
590+
591+
This example shows how to export all *App* resources from spaces with names containing the word *production*. It demonstrates resolving space references by name.
592+
593+
Configure the following:
594+
595+
- The credentials and API URL of the Cloud Foundry cluster ([username](#username), [password](#password), [apiurl](#apiurl))
596+
- The resource kind to export, set to `app` ([kind](#kind))
597+
- A regular expression matching the organization names to include ([org](#org))
598+
- A regular expression matching the space names to include ([space](#space))
599+
- A regular expression matching the app names to include ([app](#app))
600+
- The resolve references setting ([resolve-references](#resolve-references))
601+
602+
In this example, the export tool retrieves the `username`, `password`, and `apiurl` parameters from the configuration file, as set by the [login](#login-workflows) command.
603+
604+
The `kind`, `org`, `space`, `app`, and `resolve-references` configuration parameters are set using CLI flags.
605+
606+
The regular expression `.*` matches all names. The regular expression `.*production.*` matches names containing the string *production*.
607+
608+
The following command exports the required resources:
609+
610+
```bash
611+
xpcf export --kind app --org '.*' --space '.*production.*' --app '.*' -r
612+
```
613+
614+
576615
# Troubleshooting
577616

578617

0 commit comments

Comments
 (0)