chinacdn/List-ChinaCDNGroups.ps1
function List-ChinaCDNGroups { Param( [Parameter(Mandatory=$false)] [string] $EdgeRCFile = '~\.edgerc', [Parameter(Mandatory=$false)] [string] $Section = 'default', [Parameter(Mandatory=$false)] [string] $AccountSwitchKey ) $Path = "/chinacdn/v1/groups?accountSwitchKey=$AccountSwitchKey" $AdditionalHeaders = @{ Accept = 'application/vnd.akamai.chinacdn.groups.v1+json' } try { $Result = Invoke-AkamaiRestMethod -Method GET -Path $Path -AdditionalHeaders $AdditionalHeaders -EdgeRCFile $EdgeRCFile -Section $Section return $Result.groups } catch { throw $_.Exception } } |