Child rule snippet
Get-ChildRuleSnippet
Synopsis
Extract json snippets from child rules.
Syntax
Get-ChildRuleSnippet [-Rules] <Object> [-Path] <String> [-CurrentDepth] <Int32> [-MaxDepth] <Int32>
[-PathFromMainJson] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Description
It's a recursive internal function used to extract a child rule from a property's PSCustomObject
and convert it to a JSON snippet file.
It isn't intended for direct use, but is part of the Get-PropertyRules
operation with the specified OutputDirectory
parameter.
Parameters
-CurrentDepth
Current level of recursion. If equal or greater than MaxDepth
, children will remain in the parent JSON file.
Type: Int32
Parameter Sets: (All)
Aliases: None
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-MaxDepth
By default, rules will be exported into nested folders as deeply as the rule tree specifies. This option allows you to specify how deep you want to iterate the rule extraction.
Note: rules below your max depth will simply be included in the JSON file of their parent.
All rules are exported in ALL cases.
Type: Int32
Parameter Sets: (All)
Aliases: None
Required: True
Position: 3
Default value: None
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: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-PathFromMainJson
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.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: None
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-Rules
The rule object to recurse.
Type: Object
Parameter Sets: (All)
Aliases: None
Required: True
Position: 0
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
None
Outputs
System.Object
Related links
Updated 12 days ago