cloudlets/Get-CloudletPolicyVersionRule.ps1
function Get-CloudletPolicyVersionRule { Param( [Parameter(Mandatory=$true)] [string] $PolicyID, [Parameter(Mandatory=$true)] [string] $Version, [Parameter(Mandatory=$true)] [string] $AkaRuleID, [Parameter(Mandatory=$false)] [string] $EdgeRCFile = '~\.edgerc', [Parameter(Mandatory=$false)] [string] $Section = 'default', [Parameter(Mandatory=$false)] [string] $AccountSwitchKey ) $Path = "/cloudlets/api/v2/policies/$PolicyID/versions/$Version/rules/$AkaRuleID`?accountSwitchKey=$AccountSwitchKey" try { $Result = Invoke-AkamaiRestMethod -Method GET -Path $Path -EdgeRCFile $EdgeRCFile -Section $Section return $Result } catch { throw $_.Exception } } |