New-AzActivityLogAlertCondition
Creates an new activity log alert condition object in memory.
Note
This is the previous version of our documentation. Please consult the most recent version for up-to-date information.
Syntax
New-AzActivityLogAlertCondition
-Field <String>
-Equal <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The New-AzActivityLogAlertCondition cmdlet creates new activity log alert condition object in memory.
Examples
Example 1: Create a new activity log alert condition object in memory.
PS C:\>$Condition = New-AzActivityLogAlertCondition -Field "Requests" -Equal "OtherField"
PS C:\>Write-Host "Field property value: $($Condition.Field)"
PS C:\>Write-Host "Equals property value: $($Condition.Equals)"
Field property value: Requests
Equals property value: OtherField
This command creates a new activity log alert condition object in memory. NOTE: when this cmdlet is used with Set-AzActivityLogAlert at least one of these objects, passed as parameters, must have its Field equal to "Category". Otherwise, the backend responds with a 400 (BadRequest.)
Parameters
The credentials, account, tenant, and subscription used for communication with azure
| Type: | IAzureContextContainer |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the equals property for the leaf condition.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Specifies the field for the condition.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |