appsec/Set-AppSecCustomRuleActions.ps1
function Set-AppSecCustomRuleActions { Param( [Parameter(Mandatory=$true)] [int] $ConfigID, [Parameter(Mandatory=$true)] [int] $VersionNumber, [Parameter(Mandatory=$true)] [string] $PolicyID, [Parameter(Mandatory=$true)] [int] $RuleID, [Parameter(Mandatory=$true)] [string] $Body, [Parameter(Mandatory=$false)] [string] $EdgeRCFile = '~\.edgerc', [Parameter(Mandatory=$false)] [string] $Section = 'default', [Parameter(Mandatory=$false)] [string] $AccountSwitchKey ) $Path = "/appsec/v1/configs/$ConfigID/versions/$VersionNumber/security-policies/$PolicyID/custom-rules/$RuleID`?accountSwitchKey=$AccountSwitchKey" try { $Result = Invoke-AkamaiRestMethod -Method GET -Path $Path -EdgeRCFile $EdgeRCFile -Section $Section -Body $Body return $Result } catch { throw $_.Exception } } |