Skip to content

Commit

Permalink
Added the 'flow remove' command solving pnp#1063
Browse files Browse the repository at this point in the history
  • Loading branch information
Garry Trinder authored and waldekmastykarz committed Oct 13, 2019
1 parent 89ac4fa commit 629d783
Show file tree
Hide file tree
Showing 6 changed files with 711 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/manual/docs/about/comparison-powershell.md
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ Get-PowerAppRoleAssignment|Microsoft.PowerApps.PowerShell|
Get-PowerAppsNotification|Microsoft.PowerApps.PowerShell|
Get-PowerAppVersion|Microsoft.PowerApps.PowerShell|
Publish-PowerApp|Microsoft.PowerApps.PowerShell|
Remove-Flow|Microsoft.PowerApps.PowerShell|
Remove-Flow|Microsoft.PowerApps.PowerShell|[flow remove](../cmd/flow/remove.md)
Remove-FlowOwnerRole|Microsoft.PowerApps.PowerShell|
Remove-PowerApp|Microsoft.PowerApps.PowerShell|
Remove-PowerAppConnection|Microsoft.PowerApps.PowerShell|
Expand Down
56 changes: 56 additions & 0 deletions docs/manual/docs/cmd/flow/remove.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# flow remove

Removes the specified Microsoft Flow

## Usage

```sh
flow remove [options]
```

## Options

Option|Description
------|-----------
`--help`|output usage information
`-n, --name <name>`|The name of the Microsoft Flow to remove
`-e, --environment <environment>`|The name of the environment to which the Flow belongs
`--asAdmin`|Set, to remove the Flow as admin
`--confirm`|Don't prompt for confirmation
`-o, --output [output]`|Output type. `json|text`. Default `text`
`--verbose`|Runs command with verbose logging
`--debug`|Runs command with debug logging

## Remarks

By default, the command will try to remove a Microsoft Flow you own. If you want to remove a Flow owned by another user, use the `asAdmin` flag.

If the environment with the name you specified doesn't exist, you will get the `Access to the environment 'xyz' is denied.` error.

If the Microsoft Flow with the name you specified doesn't exist, you will get the `Error: Resource 'abc' does not exist in environment 'xyz'` error.

## Examples

Removes the specified Microsoft Flow owned by the currently signed-in user

```sh
flow remove --environment Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --name 3989cb59-ce1a-4a5c-bb78-257c5c39381d
```

Removes the specified Microsoft Flow owned by the currently signed-in user without confirmation

```sh
flow remove --environment Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --name 3989cb59-ce1a-4a5c-bb78-257c5c39381d --confirm
```

Removes the specified Microsoft Flow owned by another user

```sh
flow remove --environment Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --name 3989cb59-ce1a-4a5c-bb78-257c5c39381d --asAdmin
```

Removes the specified Microsoft Flow owned by another user without confirmation

```sh
flow remove --environment Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --name 3989cb59-ce1a-4a5c-bb78-257c5c39381d --asAdmin --confirm
```
1 change: 1 addition & 0 deletions docs/manual/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ nav:
- export: 'cmd/flow/export.md'
- get: 'cmd/flow/get.md'
- list: 'cmd/flow/list.md'
- remove: 'cmd/flow/remove.md'
- environment:
- environment get: 'cmd/flow/environment/environment-get.md'
- environment list: 'cmd/flow/environment/environment-list.md'
Expand Down
1 change: 1 addition & 0 deletions src/o365/flow/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export default {
FLOW_EXPORT: `${prefix} export`,
FLOW_GET: `${prefix} get`,
FLOW_LIST: `${prefix} list`,
FLOW_REMOVE: `${prefix} remove`,
FLOW_RUN_GET: `${prefix} run get`,
FLOW_RUN_LIST: `${prefix} run list`
};
Loading

0 comments on commit 629d783

Please sign in to comment.