Custom rule

Set-AppSecCustomRule

Synopsis

Modify a custom rule.

Syntax

Set-AppSecCustomRule [-ConfigName] <String> -RuleID <Int32> -Body <Object> [-EdgeRCFile <String>] [-Section <String>] [-AccountSwitchKey <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Set-AppSecCustomRule -ConfigID <Int32> -RuleID <Int32> -Body <Object> [-EdgeRCFile <String>] [-Section <String>] [-AccountSwitchKey <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]

Description

Updates an existing custom rule or a configuration. When making a request, you can specify a configuration by its name or ID. The -VersionNumber parameter is an integer or the word latest.

Note: Due to the complexity of the request body, it's recommended that you retrieve the existing custom rule with the Get-AppSecCustomRule operation, edit it locally, and pipe the object to this command.

Parameters

‑AccountSwitchKey

An account credential key that lets you move between accounts when using an API client enabled for multiple accounts. To find account switch keys, use Get-AccountSwitchKey.

‑Body
Required

The request body, either as a PSCustomObject or a string. This parameter supports pipelining.

‑ConfigID
Conditionally required

Your configuration's ID.

‑ConfigName
Conditionally required

The name of your security configuration.

‑EdgeRCFile

Your EdgeGrid resource file to authenticate your command. Defaults to ~/.edgerc.

‑RuleID
Required

Your rule's ID.

‑Section

The section name in your EdgeGrid resource file to retrieve authentication credentials from. Defaults to default.

Related Links