Include rule

Synopsis

Patch an include's rule tree.

Syntax

Add-PropertyIncludeRule [-IncludeName] <String> [-IncludeVersion] <String> -Path <String> -Value <Object> [-VersionNotes <String>] [-RuleFormat <String>] [-UpgradeRules] [-OriginalInput] [-DryRun] [-ValidateMode <String>] [-ValidateRules] [-GroupID <String>] [-ContractId <String>] [-EdgeRCFile <String>] [-Section <String>] [-AccountSwitchKey <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Add-PropertyIncludeRule -IncludeID <String> [-IncludeVersion] <String> -Path <String> -Value <Object> [-VersionNotes <String>] [-RuleFormat <String>] [-UpgradeRules] [-OriginalInput] [-DryRun] [-ValidateMode <String>] [-ValidateRules] [-GroupID <String>] [-ContractId <String>] [-EdgeRCFile <String>] [-Section <String>] [-AccountSwitchKey <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]

Description

Add a rule to the rule tree using JSON patch syntax. Set the validateRules query parameter to false to bypass a set of validation tests that may significantly slow this operation's execution time. See for guidance on when to defer validation. See and for information on how validation data is embedded within the response object.

The -IncludeVersion parameter is an integer or the word latest.

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.

‑ContractId

Your contract's ID. The parameter is optional if a property belongs to only one contract; otherwise, you need to specify it along with the -GroupID. This parameter is optional except for the create requests.

‑DryRun

With the validateRules query parameter also enabled, allows for a dry run in order to gather any possible errors without saving the rule tree.

‑EdgeRCFile

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

‑GroupID

Your group's ID. The parameter is optional if a property belongs to only one group, otherwise you need to specify it along with the -ContractID. This parameter is optional except for the create requests.

‑IncludeID
Conditionally required

Your include's ID. Commonly, you only need to specify either -IncludeName or -IncludeID.

‑IncludeName
Conditionally required

A human-readable name of your property include.

‑IncludeVersion
Required

Your include's incremental version number. Can be an integer or the word latest.

‑OriginalInput

When you include this switch, PAPI outputs a property's rule tree in the original form provided by the Set-PropertyRules operation, deliberately suppressing any updates. Also, PAPI still upgrades catalog features in the background every time you run GET-PropertyRules and patch them on property version rules, but the response shows the rule tree just as you last saved it.

When you don't include this switch, your original input can include the latest rule changes, such as new options with default values.

‑Path
Required

A JSON Pointer path, e.g. "/rules/children/0".

‑RuleFormat

The name of the rule format. The rule format can be frozen to a specific version, or represent the latest set of behaviors and criteria. You can retrieve rule formats with Get-RuleFormat.

‑Section

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

‑UpgradeRules

When this switch parameter is present, PAPI upgrades the input rule tree object to ensure backward compatibility. You can continuously use the latest rule format and keep working with your current rule tree without causing new validation errors as Akamai dynamically modifies catalog options. Upgrade applies renames, and transformations, fills in default values for new features, and removes extraneous options. New PAPI users have this set to true automatically. Otherwise, you can set the default value manually in your API client.

‑ValidateMode

With -ValidateRules enabled, setting this to fast performs a quick validation check based on the provided JSON. This is faster than the default full validation, which performs more extensive checks on the converted XML metadata configuration.

‑ValidateRules

When enabled, performs validation tests that would identify potential problems within the response object's errors and warnings arrays.

‑Value
Required

The value to apply to the PATCH operation. Can be as simple as a string or integer, or an entire rule tree, depending on the -Path provided.

‑VersionNotes

Notes to add to your property or include version. Note that you can also provide this information as the top-level "comments" object in the rule tree JSON, but if both are present, this parameter takes precedence.

Related Links