From 629d7837af6879024bf73ce18056bf7fca36dd44 Mon Sep 17 00:00:00 2001 From: Garry Trinder Date: Sat, 12 Oct 2019 08:39:01 +0200 Subject: [PATCH] Added the 'flow remove' command solving #1063 --- .../docs/about/comparison-powershell.md | 2 +- docs/manual/docs/cmd/flow/remove.md | 56 ++ docs/manual/mkdocs.yml | 1 + src/o365/flow/commands.ts | 1 + src/o365/flow/commands/flow-remove.spec.ts | 482 ++++++++++++++++++ src/o365/flow/commands/flow-remove.ts | 170 ++++++ 6 files changed, 711 insertions(+), 1 deletion(-) create mode 100644 docs/manual/docs/cmd/flow/remove.md create mode 100644 src/o365/flow/commands/flow-remove.spec.ts create mode 100644 src/o365/flow/commands/flow-remove.ts diff --git a/docs/manual/docs/about/comparison-powershell.md b/docs/manual/docs/about/comparison-powershell.md index 04a18e79c78..de22b726636 100644 --- a/docs/manual/docs/about/comparison-powershell.md +++ b/docs/manual/docs/about/comparison-powershell.md @@ -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| diff --git a/docs/manual/docs/cmd/flow/remove.md b/docs/manual/docs/cmd/flow/remove.md new file mode 100644 index 00000000000..4c3113061c6 --- /dev/null +++ b/docs/manual/docs/cmd/flow/remove.md @@ -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 `|The name of the Microsoft Flow to remove +`-e, --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 +``` diff --git a/docs/manual/mkdocs.yml b/docs/manual/mkdocs.yml index dc8d21996d7..2e00ab65df5 100644 --- a/docs/manual/mkdocs.yml +++ b/docs/manual/mkdocs.yml @@ -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' diff --git a/src/o365/flow/commands.ts b/src/o365/flow/commands.ts index 165daefcea6..2d8a1e9be40 100644 --- a/src/o365/flow/commands.ts +++ b/src/o365/flow/commands.ts @@ -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` }; \ No newline at end of file diff --git a/src/o365/flow/commands/flow-remove.spec.ts b/src/o365/flow/commands/flow-remove.spec.ts new file mode 100644 index 00000000000..2b4b7a2005a --- /dev/null +++ b/src/o365/flow/commands/flow-remove.spec.ts @@ -0,0 +1,482 @@ +import commands from '../commands'; +import Command, { CommandOption, CommandValidate, CommandError } from '../../../Command'; +import * as sinon from 'sinon'; +import appInsights from '../../../appInsights'; +import auth from '../../../Auth'; +const command: Command = require('./flow-remove'); +import * as assert from 'assert'; +import request from '../../../request'; +import Utils from '../../../Utils'; + +describe(commands.FLOW_REMOVE, () => { + let vorpal: Vorpal; + let log: string[]; + let cmdInstance: any; + let cmdInstanceLogSpy: sinon.SinonSpy; + let promptOptions: any; + + before(() => { + sinon.stub(auth, 'restoreAuth').callsFake(() => Promise.resolve()); + sinon.stub(appInsights, 'trackEvent').callsFake(() => { }); + auth.service.connected = true; + }); + + beforeEach(() => { + vorpal = require('../../../vorpal-init'); + log = []; + cmdInstance = { + commandWrapper: { + command: command.name + }, + action: command.action(), + log: (msg: string) => { + log.push(msg); + }, + prompt: (options: any, cb: (result: { continue: boolean }) => void) => { + promptOptions = options; + cb({ continue: false }); + } + }; + cmdInstanceLogSpy = sinon.spy(cmdInstance, 'log'); + promptOptions = undefined; + }); + + afterEach(() => { + Utils.restore([ + vorpal.find, + request.delete + ]); + }); + + after(() => { + Utils.restore([ + auth.restoreAuth, + appInsights.trackEvent + ]); + auth.service.connected = false; + }); + + it('has correct name', () => { + assert.equal(command.name.startsWith(commands.FLOW_REMOVE), true); + }); + + it('has a description', () => { + assert.notEqual(command.description, null); + }); + + it('fails validation if the name is not specified', () => { + const actual = (command.validate() as CommandValidate)({ + options: { + environment: 'Default-eff8592e-e14a-4ae8-8771-d96d5c549e1c' + } + }); + assert.notEqual(actual, true); + }); + + it('fails validation if the name is not valid GUID', () => { + const actual = (command.validate() as CommandValidate)({ + options: { + environment: 'Default-eff8592e-e14a-4ae8-8771-d96d5c549e1c', + name: 'invalid' + } + }); + assert.notEqual(actual, true); + }); + + it('fails validation if the environment is not specified', () => { + const actual = (command.validate() as CommandValidate)({ + options: { + name: '0f64d9dd-01bb-4c1b-95b3-cb4a1a08ac72' + } + }); + assert.notEqual(actual, true); + }); + + + it('passes validation when the name and environment specified', () => { + const actual = (command.validate() as CommandValidate)({ + options: { + environment: 'Default-eff8592e-e14a-4ae8-8771-d96d5c549e1c', + name: '0f64d9dd-01bb-4c1b-95b3-cb4a1a08ac72' + } + }); + assert.equal(actual, true); + }); + + it('prompts before removing the specified Microsoft Flow owned by the currently signed-in user when confirm option not passed', (done) => { + cmdInstance.action({ + options: { + debug: false, + environment: 'Default-eff8592e-e14a-4ae8-8771-d96d5c549e1c', + name: '0f64d9dd-01bb-4c1b-95b3-cb4a1a08ac72' + } + }, () => { + let promptIssued = false; + + if (promptOptions && promptOptions.type === 'confirm') { + promptIssued = true; + } + + try { + assert(promptIssued); + done(); + } + catch (e) { + done(e); + } + }); + }); + + it('aborts removing the specified Microsoft Flow owned by the currently signed-in user when confirm option not passed and prompt not confirmed', (done) => { + const postSpy = sinon.spy(request, 'delete'); + cmdInstance.prompt = (options: any, cb: (result: { continue: boolean }) => void) => { + cb({ continue: false }); + }; + cmdInstance.action({ + options: { + debug: false, + environment: 'Default-eff8592e-e14a-4ae8-8771-d96d5c549e1c', + name: '0f64d9dd-01bb-4c1b-95b3-cb4a1a08ac72' + } + }, () => { + try { + assert(postSpy.notCalled); + done(); + } + catch (e) { + done(e); + } + }); + }); + + it('removes the specified Microsoft Flow owned by the currently signed-in user when prompt confirmed', (done) => { + sinon.stub(request, 'delete').callsFake((opts) => { + if (opts.url === `https://management.azure.com/providers/Microsoft.ProcessSimple/environments/Default-eff8592e-e14a-4ae8-8771-d96d5c549e1c/flows/0f64d9dd-01bb-4c1b-95b3-cb4a1a08ac72?api-version=2016-11-01`) { + return Promise.resolve({ statusCode: 200 }); + } + + return Promise.reject('Invalid request'); + }); + + cmdInstance.prompt = (options: any, cb: (result: { continue: boolean }) => void) => { + cb({ continue: true }); + }; + cmdInstance.action({ + options: { + debug: true, + environment: 'Default-eff8592e-e14a-4ae8-8771-d96d5c549e1c', + name: '0f64d9dd-01bb-4c1b-95b3-cb4a1a08ac72' + } + }, () => { + try { + assert(cmdInstanceLogSpy.called); + done(); + } + catch (e) { + done(e); + } + }); + }); + + it('prompts before removing the specified Microsoft Flow owned by another user when confirm option not passed', (done) => { + cmdInstance.action({ + options: { + debug: false, + environment: 'Default-eff8592e-e14a-4ae8-8771-d96d5c549e1c', + name: '0f64d9dd-01bb-4c1b-95b3-cb4a1a08ac72', + asAdmin: true + } + }, () => { + let promptIssued = false; + + if (promptOptions && promptOptions.type === 'confirm') { + promptIssued = true; + } + + try { + assert(promptIssued); + done(); + } + catch (e) { + done(e); + } + }); + }); + + it('aborts removing the specified Microsoft Flow owned by another user when confirm option not passed and prompt not confirmed', (done) => { + const postSpy = sinon.spy(request, 'delete'); + cmdInstance.prompt = (options: any, cb: (result: { continue: boolean }) => void) => { + cb({ continue: false }); + }; + cmdInstance.action({ + options: { + debug: false, + environment: 'Default-eff8592e-e14a-4ae8-8771-d96d5c549e1c', + name: '0f64d9dd-01bb-4c1b-95b3-cb4a1a08ac72', + asAdmin: true + } + }, () => { + try { + assert(postSpy.notCalled); + done(); + } + catch (e) { + done(e); + } + }); + }); + + it('removes the specified Microsoft Flow owned by another user when prompt confirmed (debug)', (done) => { + sinon.stub(request, 'delete').callsFake((opts) => { + if (opts.url === `https://management.azure.com/providers/Microsoft.ProcessSimple/scopes/admin/environments/Default-eff8592e-e14a-4ae8-8771-d96d5c549e1c/flows/0f64d9dd-01bb-4c1b-95b3-cb4a1a08ac72?api-version=2016-11-01`) { + return Promise.resolve({ statusCode: 200 }); + } + + return Promise.reject('Invalid request'); + }); + + cmdInstance.prompt = (options: any, cb: (result: { continue: boolean }) => void) => { + cb({ continue: true }); + }; + cmdInstance.action({ + options: { + debug: true, + environment: 'Default-eff8592e-e14a-4ae8-8771-d96d5c549e1c', + name: '0f64d9dd-01bb-4c1b-95b3-cb4a1a08ac72', + asAdmin: true + } + }, () => { + try { + assert(cmdInstanceLogSpy.calledWith(vorpal.chalk.green('DONE'))); + done(); + } + catch (e) { + done(e); + } + }); + }); + + it('removes the specified Microsoft Flow without prompting when confirm specified (debug)', (done) => { + sinon.stub(request, 'delete').callsFake((opts) => { + if (opts.url === `https://management.azure.com/providers/Microsoft.ProcessSimple/environments/Default-eff8592e-e14a-4ae8-8771-d96d5c549e1c/flows/0f64d9dd-01bb-4c1b-95b3-cb4a1a08ac72?api-version=2016-11-01`) { + return Promise.resolve({ statusCode: 200 }); + } + + return Promise.reject('Invalid request'); + }); + + cmdInstance.action({ + options: { + debug: true, + environment: 'Default-eff8592e-e14a-4ae8-8771-d96d5c549e1c', + name: '0f64d9dd-01bb-4c1b-95b3-cb4a1a08ac72', + confirm: true + } + }, () => { + assert(cmdInstanceLogSpy.calledWith(vorpal.chalk.green('DONE'))); + done(); + }, (err: any) => done(err)); + }); + + it('removes the specified Microsoft Flow as Admin without prompting when confirm specified (debug)', (done) => { + sinon.stub(request, 'delete').callsFake((opts) => { + if (opts.url === `https://management.azure.com/providers/Microsoft.ProcessSimple/scopes/admin/environments/Default-eff8592e-e14a-4ae8-8771-d96d5c549e1c/flows/0f64d9dd-01bb-4c1b-95b3-cb4a1a08ac72?api-version=2016-11-01`) { + return Promise.resolve({ statusCode: 200 }); + } + + return Promise.reject('Invalid request'); + }); + + cmdInstance.action({ + options: { + debug: true, + environment: 'Default-eff8592e-e14a-4ae8-8771-d96d5c549e1c', + name: '0f64d9dd-01bb-4c1b-95b3-cb4a1a08ac72', + confirm: true, + asAdmin: true + } + }, () => { + assert(cmdInstanceLogSpy.calledWith(vorpal.chalk.green('DONE'))); + done(); + }, (err: any) => done(err)); + }); + + it('correctly handles no environment found without prompting when confirm specified', (done) => { + sinon.stub(request, 'delete').callsFake((opts) => { + return Promise.reject({ + "error": { + "code": "EnvironmentAccessDenied", + "message": "Access to the environment 'Default-eff8592e-e14a-4ae8-8771-d96d5c549e1c' is denied." + } + }); + }); + + cmdInstance.action({ + options: + { + debug: false, + environment: 'Default-eff8592e-e14a-4ae8-8771-d96d5c549e1c', + name: '0f64d9dd-01bb-4c1b-95b3-cb4a1a08ac72', + confirm: true + } + }, (err?: any) => { + try { + assert.equal(JSON.stringify(err), JSON.stringify(new CommandError(`Access to the environment 'Default-eff8592e-e14a-4ae8-8771-d96d5c549e1c' is denied.`))); + done(); + } + catch (e) { + done(e); + } + }); + }); + + it('correctly handles no environment found when prompt confirmed', (done) => { + sinon.stub(request, 'delete').callsFake((opts) => { + return Promise.reject({ + "error": { + "code": "EnvironmentAccessDenied", + "message": "Access to the environment 'Default-eff8592e-e14a-4ae8-8771-d96d5c549e1c' is denied." + } + }); + }); + + cmdInstance.prompt = (options: any, cb: (result: { continue: boolean }) => void) => { + cb({ continue: true }); + }; + + cmdInstance.action({ + options: + { + debug: false, + environment: 'Default-eff8592e-e14a-4ae8-8771-d96d5c549e1c', + name: '0f64d9dd-01bb-4c1b-95b3-cb4a1a08ac72' + } + }, (err?: any) => { + try { + assert.equal(JSON.stringify(err), JSON.stringify(new CommandError(`Access to the environment 'Default-eff8592e-e14a-4ae8-8771-d96d5c549e1c' is denied.`))); + done(); + } + catch (e) { + done(e); + } + }); + }); + + it('correctly handles no Microsoft Flow found when prompt confirmed', (done) => { + sinon.stub(request, 'delete').callsFake((opts) => { + return Promise.resolve({ statusCode: 204 }); + }); + + cmdInstance.prompt = (options: any, cb: (result: { continue: boolean }) => void) => { + cb({ continue: true }); + }; + + cmdInstance.action({ + options: + { + debug: false, + environment: 'Default-eff8592e-e14a-4ae8-8771-d96d5c549e1c', + name: '0f64d9dd-01bb-4c1b-95b3-cb4a1a08ac72' + } + }, (err?: any) => { + try { + assert(cmdInstanceLogSpy.calledWith(vorpal.chalk.red(`Error: Resource '0f64d9dd-01bb-4c1b-95b3-cb4a1a08ac72' does not exist in environment 'Default-eff8592e-e14a-4ae8-8771-d96d5c549e1c'`))); + done(); + } + catch (e) { + done(e); + } + }); + }); + + it('correctly handles no Microsoft Flow found when confirm specified', (done) => { + sinon.stub(request, 'delete').callsFake((opts) => { + return Promise.resolve({ statusCode: 204 }); + }); + + cmdInstance.action({ + options: + { + debug: false, + environment: 'Default-eff8592e-e14a-4ae8-8771-d96d5c549e1c', + name: '0f64d9dd-01bb-4c1b-95b3-cb4a1a08ac72', + confirm: true + } + }, (err?: any) => { + try { + assert(cmdInstanceLogSpy.calledWith(vorpal.chalk.red(`Error: Resource '0f64d9dd-01bb-4c1b-95b3-cb4a1a08ac72' does not exist in environment 'Default-eff8592e-e14a-4ae8-8771-d96d5c549e1c'`))); + done(); + } + catch (e) { + done(e); + } + }); + }); + + it('supports debug mode', () => { + const options = (command.options() as CommandOption[]); + let containsOption = false; + options.forEach(o => { + if (o.option === '--debug') { + containsOption = true; + } + }); + assert(containsOption); + }); + + it('supports specifying name', () => { + const options = (command.options() as CommandOption[]); + let containsOption = false; + options.forEach(o => { + if (o.option.indexOf('--name') > -1) { + containsOption = true; + } + }); + assert(containsOption); + }); + + it('supports specifying environment', () => { + const options = (command.options() as CommandOption[]); + let containsOption = false; + options.forEach(o => { + if (o.option.indexOf('--environment') > -1) { + containsOption = true; + } + }); + assert(containsOption); + }); + + it('has help referring to the right command', () => { + const cmd: any = { + log: (msg: string) => { }, + prompt: () => { }, + helpInformation: () => { } + }; + const find = sinon.stub(vorpal, 'find').callsFake(() => cmd); + cmd.help = command.help(); + cmd.help({}, () => { }); + assert(find.calledWith(commands.FLOW_REMOVE)); + }); + + it('has help with examples', () => { + const _log: string[] = []; + const cmd: any = { + log: (msg: string) => { + _log.push(msg); + }, + prompt: () => { }, + helpInformation: () => { } + }; + sinon.stub(vorpal, 'find').callsFake(() => cmd); + cmd.help = command.help(); + cmd.help({}, () => { }); + let containsExamples: boolean = false; + _log.forEach(l => { + if (l && l.indexOf('Examples:') > -1) { + containsExamples = true; + } + }); + Utils.restore(vorpal.find); + assert(containsExamples); + }); +}); \ No newline at end of file diff --git a/src/o365/flow/commands/flow-remove.ts b/src/o365/flow/commands/flow-remove.ts new file mode 100644 index 00000000000..64f9812aacf --- /dev/null +++ b/src/o365/flow/commands/flow-remove.ts @@ -0,0 +1,170 @@ +import commands from '../commands'; +import GlobalOptions from '../../../GlobalOptions'; +import { + CommandOption, + CommandValidate +} from '../../../Command'; +import request from '../../../request'; +import AzmgmtCommand from '../../base/AzmgmtCommand'; +import Utils from '../../../Utils'; + +const vorpal: Vorpal = require('../../../vorpal-init'); + +interface CommandArgs { + options: Options; +} + +interface Options extends GlobalOptions { + environment: string; + name: string; + asAdmin?: boolean; + confirm?: boolean; +} + +class FlowRemoveCommand extends AzmgmtCommand { + public get name(): string { + return commands.FLOW_REMOVE; + } + + public get description(): string { + return 'Removes the specified Microsoft Flow'; + } + + public getTelemetryProperties(args: CommandArgs): any { + const telemetryProps: any = super.getTelemetryProperties(args); + telemetryProps.asAdmin = typeof args.options.asAdmin !== 'undefined'; + telemetryProps.confirm = typeof args.options.confirm !== 'undefined'; + return telemetryProps; + } + + public commandAction(cmd: CommandInstance, args: CommandArgs, cb: () => void): void { + if (this.verbose) { + cmd.log(`Removing Microsoft Flow ${args.options.name}...`); + } + + const removeFlow: () => void = (): void => { + const requestOptions: any = { + url: `${this.resource}providers/Microsoft.ProcessSimple/${args.options.asAdmin ? 'scopes/admin/' : ''}environments/${encodeURIComponent(args.options.environment)}/flows/${encodeURIComponent(args.options.name)}?api-version=2016-11-01`, + resolveWithFullResponse: true, + headers: { + accept: 'application/json' + }, + json: true + }; + + request + .delete(requestOptions) + .then((rawRes: any): void => { + // handle 204 and throw error message to cmd when invalid flow id is passed + // https://github.com/pnp/office365-cli/issues/1063#issuecomment-537218957 + if (rawRes.statusCode === 204) { + cmd.log(vorpal.chalk.red(`Error: Resource '${args.options.name}' does not exist in environment '${args.options.environment}'`)); + cb(); + } + else { + if (this.verbose) { + cmd.log(vorpal.chalk.green('DONE')); + } + cb(); + } + }, (rawRes: any): void => this.handleRejectedODataJsonPromise(rawRes, cmd, cb)); + }; + if (args.options.confirm) { + removeFlow(); + } + else { + cmd.prompt({ + type: 'confirm', + name: 'continue', + default: false, + message: `Are you sure you want to remove the Microsoft Flow ${args.options.name}?` + }, (result: { continue: boolean }): void => { + if (!result.continue) { + cb(); + } + else { + removeFlow(); + } + }); + } + } + + public options(): CommandOption[] { + const options: CommandOption[] = [ + { + option: '-n, --name ', + description: 'The name of the Microsoft Flow to remove' + }, + { + option: '-e, --environment ', + description: 'The name of the environment to which the Flow belongs' + }, + { + option: '--asAdmin', + description: 'Set, to remove the Flow as admin' + }, + { + option: '--confirm', + description: 'Don\'t prompt for confirmation' + }, + ]; + + const parentOptions: CommandOption[] = super.options(); + return options.concat(parentOptions); + } + + public validate(): CommandValidate { + return (args: CommandArgs): boolean | string => { + if (!args.options.name) { + return 'Required option name missing'; + } + + if (!Utils.isValidGuid(args.options.name)) { + return `${args.options.name} is not a valid GUID`; + } + + if (!args.options.environment) { + return 'Required option environment missing'; + } + + return true; + }; + } + + public commandHelp(args: {}, log: (help: string) => void): void { + const chalk = vorpal.chalk; + log(vorpal.find(commands.FLOW_REMOVE).helpInformation()); + log( + ` Remarks: + + By default, the command will try to remove a Microsoft Flow you own. + If you want to remove a Microsoft Flow owned by another user, use the + ${chalk.blue('asAdmin')} flag. + + If the environment with the name you specified doesn't exist, you will get + the ${chalk.grey('Access to the environment \'xyz\' is denied.')} error. + + If the Microsoft Flow with the name you specified doesn't exist, you will + get the ${chalk.grey(`Error: Resource \'abc\' does not exist in environment \'xyz\'`)} + error. + + Examples: + + Removes the specified Microsoft Flow owned by the currently signed-in user + ${this.getCommandName()} --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 + ${this.getCommandName()} --environment Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --name 3989cb59-ce1a-4a5c-bb78-257c5c39381d --confirm + + Removes the specified Microsoft Flow owned by another user + ${this.getCommandName()} --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 + ${this.getCommandName()} --environment Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --name 3989cb59-ce1a-4a5c-bb78-257c5c39381d --asAdmin --confirm +`); + } +} + +module.exports = new FlowRemoveCommand(); \ No newline at end of file