From 402d31a954126ad054a8d73cc95e9f7d4b525510 Mon Sep 17 00:00:00 2001 From: Aaron Schuett Date: Wed, 4 Jan 2017 21:02:41 -0500 Subject: [PATCH] Add support for modification of existing publish set (aka sharing portal) attributes. --- Skytap.psm1 | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/Skytap.psm1 b/Skytap.psm1 index 9facb2c..d98100a 100644 --- a/Skytap.psm1 +++ b/Skytap.psm1 @@ -356,6 +356,29 @@ function Publish-URL ([string]$configId, [string]$ptype, [string]$pname,[Boolean } return $result } + +function Edit-PublishSet ( [string]$configId, [string]$publishSetId, $configAttributes ){ +<# + .SYNOPSIS + Change Publish Set attributes + .SYNTAX + Edit-PublishSet ConfigId PublishSetId Attribute-Hash + .EXAMPLE + Edit-PublishSet 12345 12345 @{name='config 1234'; password='secret'} + #> + try { + $uri = "$url/configurations/$configId/publish_sets/$publishSetId" + + $body = $configAttributes + $result = Invoke-RestMethod -Uri $uri -Method PUT -Body (ConvertTo-Json $body) -ContentType "application/json" -Headers $headers + $result | Add-member -MemberType NoteProperty -name requestResultCode -value 0 + } catch { + $global:errorResponse = $_.Exception + $result = Show-RequestFailure + return $result + } + return $result + } function Save-ConfigurationToTemplate ([string]$configId, [string]$tname) { <#