SingleScripts/Delete-SecretScope.ps1
[CmdletBinding()] Param( [Parameter(Mandatory=$true,Position=1)] [string] $DBAPIRootUrl, [Parameter(Mandatory=$True,Position=2)] [string] $DBAPIKey, [Parameter(Mandatory=$True,Position=3)] [string] $Name ) [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12 $DBAPIUrl = $DBAPIRootUrl.Trim('/') + "/api/2.0/secrets/scopes/delete" $headers = @{ Authorization = "Bearer $DBAPIKey" "Content-Type" = "application/json" } $body = @{ scope = $Name } $bodyJson = $body | ConvertTo-Json Write-Information "Creating Secret-Scope '$Name' ..." $result = Invoke-RestMethod -Uri $DBAPIUrl -Method POST -Headers $headers -Body $bodyJson $result |