Param¶
SYNOPSIS¶
References a policy parameter by its DSL name; emits [parameters('
SYNTAX¶
Param [-Name] <String> [-Length] [<CommonParameters>]
USED IN¶
Anywhere in a Policy or Initiative, as a value
EXAMPLES¶
Example 1¶
Field location | Must -BeIn (Param AllowedLocations)
Example 2¶
Count -Value (Param NamePatterns) -Name pattern -Where {
Field name | Must -BeLike (Current pattern)
} | Must -Be (Param NamePatterns -Length)
'param' is a language keyword only at the start of a scriptblock; as a command it parses normally (verified with the parser). The name is part of the DSL spec.
PARAMETERS¶
-Name¶
The parameter's name, as declared with Parameter.
Type: String
Required: true
Position: 1
Accept pipeline input: false
-Length¶
The number of members of an Array parameter (or characters of a String one), as Azure's length() function returns it (ADR-0020).
Type: SwitchParameter
Required: false
Position: named
Accept pipeline input: false