Functions/BYOK/Set-PASBYOKConfig.ps1
|
# .ExternalHelp psPAS-help.xml function Set-PASBYOKConfig { [CmdletBinding(SupportsShouldProcess)] param( [parameter( Mandatory = $true, ValueFromPipelinebyPropertyName = $true )] [string]$kms_arn ) begin { Assert-VersionRequirement -PrivilegeCloud } process { #Create URL for request $URI = "$($psPASSession.ApiURI)/api/byok/configure" #Request body $Body = $PSBoundParameters | Get-PASParameter | ConvertTo-Json if ($PSCmdlet.ShouldProcess($kms_arn, 'Configuring BYOK')) { #send request to web service $result = Invoke-PASRestMethod -Uri $URI -Method POST -Body $Body if ($null -ne $result) { $result } } } end {} } |