Add¶
SYNOPSIS¶
In Modify, sets the piped field to a value only when it has none, or adds an element to a [] array. In Append, adds the value to the request: it sets a field, or adds an element to a [] array.
SYNTAX¶
Add [-InputObject <Object>] [[-Value] <Object>] [-Condition <Object>] [<CommonParameters>]
USED IN¶
Modify, Append
EXAMPLES¶
Example 1¶
Tag CostCenter | Add (ResourceGroupTag CostCenter)
Example 2¶
Field 'securityRules[*]' | Add @{ name = 'deny-ssh'; properties = @{ access = 'Deny'; direction = 'Inbound'; priority = 4000; protocol = 'Tcp'; sourceAddressPrefix = '*'; sourcePortRange = '*'; destinationAddressPrefix = '*'; destinationPortRange = '22' } }
In Modify, adds a rule to a network security group. Azure documents Modify on array elements as in preview (BYL3075).
PARAMETERS¶
-InputObject¶
The field to change: a Field or Tag, piped to the operation.
Type: Object
Required: false
Position: named
Accept pipeline input: true (ByValue)
-Value¶
The value to set: a literal, Param, Arm or ResourceGroupTag.
Type: Object
Required: false
Position: 1
Accept pipeline input: false
-Condition¶
Only apply the operation when this Arm expression is true.
Type: Object
Required: false
Position: named
Accept pipeline input: false