From 6f3f9e0f496d304a5f81ba3eec86865db61f5cfe Mon Sep 17 00:00:00 2001 From: Wes Carroll Date: Tue, 26 Feb 2019 13:05:46 -0500 Subject: [PATCH] Create stop vpg clone operation. --- ZertoApiWrapper/Public/Stop-ZertoCloneVpg.ps1 | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 ZertoApiWrapper/Public/Stop-ZertoCloneVpg.ps1 diff --git a/ZertoApiWrapper/Public/Stop-ZertoCloneVpg.ps1 b/ZertoApiWrapper/Public/Stop-ZertoCloneVpg.ps1 new file mode 100644 index 0000000..6baf22b --- /dev/null +++ b/ZertoApiWrapper/Public/Stop-ZertoCloneVpg.ps1 @@ -0,0 +1,24 @@ +function Stop-ZertoCloneVpg { + param( + [Parameter( + HelpMessage = "Name of the VPG to stop cloning", + Mandatory = $true + )] + [string]$vpgName + ) + + begin { + $baseUri = "vpgs" + $vpgIdentifier = $(Get-ZertoVpg -name $vpgName).vpgIdentifier + } + + process { + $uri = "{0}/{1}/CloneAbort" -f $baseUri, $vpgIdentifier + invoke-ZertoRestRequest -uri $uri -method "POST" + } + + end { + # Nothing to do + } +} +