fastdns/Get-MasterZoneFile.ps1
function Get-MasterZoneFile { Param( [Parameter(Mandatory=$true)] [string] $Zone, [Parameter(Mandatory=$false)] [string] $EdgeRCFile = '~\.edgerc', [Parameter(Mandatory=$false)] [string] $Section = 'default', [Parameter(Mandatory=$false)] [string] $AccountSwitchKey ) $Path = "/config-dns/v2/zones/$Zone/zone-file`?accountSwitchKey=$AccountSwitchKey" $AdditionalHeaders = @{ Accept = 'text/dns' } try { $Result = Invoke-AkamaiRestMethod -Method GET -Path $Path -AdditionalHeaders $AdditionalHeaders -EdgeRCFile $EdgeRCFile -Section $Section return $Result } catch { throw $_.Exception } } |