sps/New-SPSEdgeHostname.ps1
function New-SPSRequest { Param( [Parameter(Mandatory=$true)] [string] $GroupID, [Parameter(Mandatory=$true)] [string] $ContractId, [Parameter(Mandatory=$true)] [string] $Body, [Parameter(Mandatory=$false)] [string] $EdgeRCFile = '~\.edgerc', [Parameter(Mandatory=$false)] [string] $Section = 'papi', [Parameter(Mandatory=$false)] [string] $AccountSwitchKey ) $Path = "/config-secure-provisioning-service/v1/secure-edge-hosts?groupId=$GroupID&contractId=$ContractID&accountSwitchKey=$AccountSwitchKey" try { $Result = Invoke-AkamaiRestMethod -Method POST -Path $Path -Body $Body -EdgeRCFile $EdgeRCFile -Section $Section return $Result } catch { throw $_.Exception } } |