Include rules

Set-PropertyIncludeRules

Synopsis

Update an include's rule tree.

Syntax

Set-PropertyIncludeRules -IncludeVersion <String> [-VersionNotes <String>] [-RuleFormat <String>] [-UpgradeRules] [-OriginalInput] [-DryRun] [-ValidateMode <String>] [-ValidateRules] [-GroupID <String>] [-ContractId <String>] [-EdgeRCFile <String>] [-Section <String>] [-AccountSwitchKey <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Set-PropertyIncludeRules [-IncludeName] <String> -IncludeVersion <String> -InputDirectory <String> [-DefaultRuleFilename <String>] [-VersionNotes <String>] [-RuleFormat <String>] [-UpgradeRules] [-OriginalInput] [-DryRun] [-ValidateMode <String>] [-ValidateRules] [-GroupID <String>] [-ContractId <String>] [-EdgeRCFile <String>] [-Section <String>] [-AccountSwitchKey <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Set-PropertyIncludeRules [-IncludeName] <String> -IncludeVersion <String> -InputFile <String> [-VersionNotes <String>] [-RuleFormat <String>] [-UpgradeRules] [-OriginalInput] [-DryRun] [-ValidateMode <String>] [-ValidateRules] [-GroupID <String>] [-ContractId <String>] [-EdgeRCFile <String>] [-Section <String>] [-AccountSwitchKey <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Set-PropertyIncludeRules [-IncludeName] <String> -IncludeVersion <String> -Body <Object> [-VersionNotes <String>] [-RuleFormat <String>] [-UpgradeRules] [-OriginalInput] [-DryRun] [-ValidateMode <String>] [-ValidateRules] [-GroupID <String>] [-ContractId <String>] [-EdgeRCFile <String>] [-Section <String>] [-AccountSwitchKey <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Set-PropertyIncludeRules -IncludeID <String> -IncludeVersion <String> -InputDirectory <String> [-DefaultRuleFilename <String>] [-VersionNotes <String>] [-RuleFormat <String>] [-UpgradeRules] [-OriginalInput] [-DryRun] [-ValidateMode <String>] [-ValidateRules] [-GroupID <String>] [-ContractId <String>] [-EdgeRCFile <String>] [-Section <String>] [-AccountSwitchKey <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Set-PropertyIncludeRules -IncludeID <String> -IncludeVersion <String> -InputFile <String> [-VersionNotes <String>] [-RuleFormat <String>] [-UpgradeRules] [-OriginalInput] [-DryRun] [-ValidateMode <String>] [-ValidateRules] [-GroupID <String>] [-ContractId <String>] [-EdgeRCFile <String>] [-Section <String>] [-AccountSwitchKey <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Set-PropertyIncludeRules -IncludeID <String> -IncludeVersion <String> -Body <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

Updates the rules for a given property include version. You can provide the rules as either:

  • A PSCustomObject.
  • A single JSON file (with the -OutputToFile parameter and optionally the -OutputFilename parameter).
  • Broken out into JSON snippets (with the -OutputSnippets parameter and optionally the -OutputDirectory parameter).

You can also specify the -RuleFormat to retrieve your property rules in a specific schema version.

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
Conditionally required

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

‑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.

‑DefaultRuleFilename

The JSON file containing the default rule of your property. Defaults to main.json.

‑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.

‑InputDirectory
Conditionally required

A directory containing JSON snippet files representing your rule tree.

‑InputFile
Conditionally required

The location of the JSON file representing your rule tree.

‑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.

‑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.

‑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