Property rules

Get-PropertyRules

Synopsis

Get a property's rule tree.

Syntax

Get-PropertyRules [-PropertyName] <String> [-PropertyVersion] <String> [-GroupID <String>] [-ContractId <String>] [-RuleFormat <String>] [-OriginalInput] [-OutputToFile] [-OutputFileName <String>] [-OutputSnippets] [-OutputDirectory <String>] [-MaxDepth <Int32>] [-ForceSlashStyle <String>] [-PathFromMainJson] [-Force] [-PassThru] [-EdgeRCFile <String>] [-Section <String>] [-AccountSwitchKey <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Get-PropertyRules -PropertyID <String> [-PropertyVersion] <String> [-GroupID <String>] [-ContractId <String>] [-RuleFormat <String>] [-OriginalInput] [-OutputToFile] [-OutputFileName <String>] [-OutputSnippets] [-OutputDirectory <String>] [-MaxDepth <Int32>] [-ForceSlashStyle <String>] [-PathFromMainJson] [-Force] [-PassThru] [-EdgeRCFile <String>] [-Section <String>] [-AccountSwitchKey <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]

Description

Retrieves the rules for a given property version. You can specify the rules' output 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. Multiple output formats can now be used in the same command and are no longer mutually exclusive.

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.

‑EdgeRCFile

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

‑Force

When enabled, overwrites a local file or files if they exist. If files exist and this is not specified, an error will be thrown.

‑ForceSlashStyle

Overrides the mechanism to detect your operating system and chooses appropriate slashes in file paths (\ for Windows, / for Unix). Use this if collaborating with users across different operating systems.

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

‑MaxDepth

How deep you want to iterate the rule extraction. By default, rules are exported into nested folders as deeply as the rule tree specifies. Note that rules below your max depth are included in the JSON file of their parent. All rules are exported in ALL cases.

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

‑OutputDirectory

A directory to store JSON snippets from the retrieved rule tree.

‑OutputFileName

A JSON filename to save the retrieved rule tree.

‑OutputSnippets

An output rule tree as JSON snippets.

‑OutputToFile

An output rule tree as a single JSON file.

‑PassThru

When writing rules to one or more files, include this switch to also return the rules as a PSCustomObject.

‑PathFromMainJson

When enabled, this option will use paths relative to the main JSON file, rather than purely relative to each file. This allows compatibility with the Akamai Terraform provider and other tools, which use this path style.

‑PropertyID
Conditionally required

Your property's ID. Commonly, you only need to specify either -PropertyName or -PropertyID.

‑PropertyName
Conditionally required

A human-readable name for your property. Commonly, you only need to specify either -PropertyName or -PropertyID.

‑PropertyVersion
Required

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

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

Related Links