Compartilhar via


Update-AzActivityLogAlert

Updates 'tags' and 'enabled' fields in an existing Alert rule. This method is used to update the Alert rule tags, and to enable or disable the Alert rule. To update other fields use CreateOrUpdate operation.

Sintaxe

UpdateExpanded (Padrão)

Update-AzActivityLogAlert
    -Name <String>
    -ResourceGroupName <String>
    [-SubscriptionId <String>]
    [-Enabled <Boolean>]
    [-Tag <Hashtable>]
    [-DefaultProfile <PSObject>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

UpdateViaIdentityExpanded

Update-AzActivityLogAlert
    -InputObject <IActivityLogAlertIdentity>
    [-Enabled <Boolean>]
    [-Tag <Hashtable>]
    [-DefaultProfile <PSObject>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

Updates 'tags' and 'enabled' fields in an existing Alert rule. This method is used to update the Alert rule tags, and to enable or disable the Alert rule. To update other fields use CreateOrUpdate operation.

Exemplos

Example 1: Update activity log alert

Update-AzActivityLogAlert -ResourceGroupName $ResourceGroupName -Name $AlertName -Tag @{"key"="val"} -Enabled $false

Disable activity log alert, add tag "key":"val"

Parâmetros

-Confirm

Prompts you for confirmation before running the cmdlet.

Propriedades do parâmetro

Tipo:SwitchParameter
Valor padrão:None
Dá suporte a curingas:False
DontShow:False
Aliases:cf

Conjuntos de parâmetros

(All)
Cargo:Named
Obrigatório:False
Valor do pipeline:False
Valor do pipeline pelo nome da propriedade:False
Valor dos argumentos restantes:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Propriedades do parâmetro

Tipo:PSObject
Valor padrão:None
Dá suporte a curingas:False
DontShow:False
Aliases:AzureRMContext, AzureCredential

Conjuntos de parâmetros

(All)
Cargo:Named
Obrigatório:False
Valor do pipeline:False
Valor do pipeline pelo nome da propriedade:False
Valor dos argumentos restantes:False

-Enabled

Indicates whether this Activity Log Alert rule is enabled. If an Activity Log Alert rule is not enabled, then none of its actions will be activated.

Propriedades do parâmetro

Tipo:Boolean
Valor padrão:None
Dá suporte a curingas:False
DontShow:False

Conjuntos de parâmetros

(All)
Cargo:Named
Obrigatório:False
Valor do pipeline:False
Valor do pipeline pelo nome da propriedade:False
Valor dos argumentos restantes:False

-InputObject

Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table.

Propriedades do parâmetro

Tipo:IActivityLogAlertIdentity
Valor padrão:None
Dá suporte a curingas:False
DontShow:False

Conjuntos de parâmetros

UpdateViaIdentityExpanded
Cargo:Named
Obrigatório:True
Valor do pipeline:True
Valor do pipeline pelo nome da propriedade:False
Valor dos argumentos restantes:False

-Name

The name of the Activity Log Alert rule.

Propriedades do parâmetro

Tipo:String
Valor padrão:None
Dá suporte a curingas:False
DontShow:False
Aliases:ActivityLogAlertName

Conjuntos de parâmetros

UpdateExpanded
Cargo:Named
Obrigatório:True
Valor do pipeline:False
Valor do pipeline pelo nome da propriedade:False
Valor dos argumentos restantes:False

-ResourceGroupName

The name of the resource group. The name is case insensitive.

Propriedades do parâmetro

Tipo:String
Valor padrão:None
Dá suporte a curingas:False
DontShow:False

Conjuntos de parâmetros

UpdateExpanded
Cargo:Named
Obrigatório:True
Valor do pipeline:False
Valor do pipeline pelo nome da propriedade:False
Valor dos argumentos restantes:False

-SubscriptionId

The ID of the target subscription.

Propriedades do parâmetro

Tipo:String
Valor padrão:(Get-AzContext).Subscription.Id
Dá suporte a curingas:False
DontShow:False

Conjuntos de parâmetros

UpdateExpanded
Cargo:Named
Obrigatório:False
Valor do pipeline:False
Valor do pipeline pelo nome da propriedade:False
Valor dos argumentos restantes:False

-Tag

The resource tags

Propriedades do parâmetro

Tipo:Hashtable
Valor padrão:None
Dá suporte a curingas:False
DontShow:False

Conjuntos de parâmetros

(All)
Cargo:Named
Obrigatório:False
Valor do pipeline:False
Valor do pipeline pelo nome da propriedade:False
Valor dos argumentos restantes:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Propriedades do parâmetro

Tipo:SwitchParameter
Valor padrão:None
Dá suporte a curingas:False
DontShow:False
Aliases:wi

Conjuntos de parâmetros

(All)
Cargo:Named
Obrigatório:False
Valor do pipeline:False
Valor do pipeline pelo nome da propriedade:False
Valor dos argumentos restantes:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Entradas

IActivityLogAlertIdentity

Saídas

IActivityLogAlertResource