config-gtm/New-GTMDomain.ps1
function New-GTMDomain { Param( [Parameter(Mandatory=$true)] [string] $Body, [Parameter(Mandatory=$false)] [string] $ContractID, [Parameter(Mandatory=$false)] [string] $GroupID, [Parameter(Mandatory=$false)] [string] $EdgeRCFile = '~\.edgerc', [Parameter(Mandatory=$false)] [string] $Section = 'default', [Parameter(Mandatory=$false)] [string] $AccountSwitchKey ) $Path = "/config-gtm/v1/domains/?contractId=$ContractID&gid=$GroupID&accountSwitchKey=$AccountSwitchKey" try { $Result = Invoke-AkamaiRestMethod -Method POST -Path $Path -Body $Body -EdgeRCFile $EdgeRCFile -Section $Section return $Result } catch { throw $_.Exception } } |