Property rule
Add-PropertyRule
Synopsis
Add a rule or setting to a property.
Syntax
name (Default)
Add-PropertyRule [-PropertyName] <String> [-PropertyVersion] <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>]
id
Add-PropertyRule -PropertyID <String> [-PropertyVersion] <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 or setting to a property using JSON patch syntax. This can be a single string or integer, up to an entire rule, including its children. The -PropertyVersion
parameter is an integer or the word latest
.
To find the JSONPath rule path, commonly we recommend pairing this command New-BulkSearch
.
Parameters
-AccountSwitchKey
Account switch key, for use when you have access to multiple accounts and need to specify which one to use. Account Switch Keys can be found using Get-AccountSwitchKey
.
Type: String
Parameter Sets: (All)
Aliases: None
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ContractId
Unique identifier for the contract. 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 create requests.
Type: String
Parameter Sets: (All)
Aliases: None
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-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.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: None
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-EdgeRCFile
EdgeRC file to authenticate your command. Defaults to ~/.edgerc
.
Type: String
Parameter Sets: (All)
Aliases: None
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-GroupID
Unique identifier for the group. 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 create requests.
Type: String
Parameter Sets: (All)
Aliases: None
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-OriginalInput
When present, PAPI outputs a property's rule tree in the original form provided by Set-PropertyRules, deliberately suppressing any updates.
When present, PAPI still upgrades catalog features in the background each time you run Get-PropertyRules
and Add-PropertyRules
operations on property version rules, but the response yields the rule tree just as you last saved it.
The parameter defaults to false
, which means your original input can include latest rule changes, such as new options with default values.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: None
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-Path
Absolute path from top of the rule tree.
Type: String
Parameter Sets: (All)
Aliases: None
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-PropertyID
Unique identifier for the property. Commonly you only need to specify one of: PropertyName
, PropertyID
.
Type: String
Parameter Sets: id
Aliases: None
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-PropertyName
Name of your property. Commonly you only need to specify one of: PropertyName
, PropertyID
.
Type: String
Parameter Sets: name
Aliases: None
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-PropertyVersion
Property's incremental version number. Can be an integer or the word latest
.
Type: String
Parameter Sets: (All)
Aliases: None
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-RuleFormat
Name of the rule format. The rule format can be frozen to a specific version, or represent the latest
set of behaviors and criteria. Rule formats can be retrieved with Get-RuleFormat
.
Type: String
Parameter Sets: (All)
Aliases: None
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Section
EdgeRC section to retrieve authentication credentials from. Defaults to default
.
Type: String
Parameter Sets: (All)
Aliases: None
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-UpgradeRules
When present, PAPI upgrades the input rule tree object to ensure backwards 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, 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.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: None
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-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.
Type: String
Parameter Sets: (All)
Aliases:
Accepted values: fast, full
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ValidateRules
Perform validation tests that would identify potential problems within the response object's errors
and warnings
arrays.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: None
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-Value
Value to apply to PATCH operation. Can be as simple as a string or integer, or an entire rule tree, depending on the path provided.
Type: Object
Parameter Sets: (All)
Aliases: None
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-VersionNotes
Notes to add to your property/include version. You can also provide this information as the top-level "comments" object in the rule tree JSON, but if both are present this parameter will win.
Type: String
Parameter Sets: (All)
Aliases: None
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
CommonParameters
This cmdlet supports the common parameters: -Debug
, -ErrorAction
, -ErrorVariable
, -InformationAction
, -InformationVariable
, -OutVariable
, -OutBuffer
, -PipelineVariable
, -Verbose
, -WarningAction
, and -WarningVariable
. For more information, see about_CommonParameters.
Inputs
System.Object
Outputs
System.Object
Related links
Updated 12 days ago