Field¶
SYNOPSIS¶
A field reference, resolved to a full alias at compile time. Pipe it to Must, or inside Modify to an operation.
SYNTAX¶
Field [-Name] <String> [-AllowUnknownAlias] [<CommonParameters>]
DESCRIPTION¶
A short name such as minimumTlsVersion is resolved against the aliases of the Resource type, so it becomes Microsoft.Storage/storageAccounts/minimumTlsVersion. Reserved fields need no alias: name, fullName, kind, type, location, id, identity.type, identity.userAssignedIdentities, extendedLocation and its name and type, and tags, including tags['name']. Inside Each, names are relative to the element. A name not in the alias snapshot fails the build with the closest match, unless -AllowUnknownAlias is used.
USED IN¶
When, Require, Each, AnyOf, AllOf, Count -Where, Modify, Append
EXAMPLES¶
Example 1¶
Field minimumTlsVersion | Must -Be 'TLS1_2'
Example 2¶
Field location | Must -BeIn (Param AllowedLocations)
Example 3¶
Field properties.newPreviewSetting -AllowUnknownAlias | Must -Be 'Enabled'
PARAMETERS¶
-Name¶
The field: a short alias name, a full alias, or a reserved field such as location.
Type: String
Required: true
Position: 1
Accept pipeline input: false
-AllowUnknownAlias¶
Accept an alias that is not in the alias snapshot (ADR-0008).
Type: SwitchParameter
Required: false
Position: named
Accept pipeline input: false