Disable-AzActivityLogAlert
Disables an activity log alert and sets its tags.
Sintaxis
DisableByNameAndResourceGroup
Disable-AzActivityLogAlert
-Name <String>
-ResourceGroupName <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Disable-AzActivityLogAlert
-InputObject <PSActivityLogAlertResource>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
DisableByResourceId
Disable-AzActivityLogAlert
-ResourceId <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Disable-AzActivityLogAlert cmdlet disables and activity log alert and allows setting its tags.
This cmdlet implements the ShouldProcess pattern, i.e. it might request confirmation from the user before actually patching the resource.
Ejemplos
Example 1: Disable an activity log alert
PS C:\>Disable-AzActivityLogAlert -Name "alert1" -ResourceGroupName "Default-ActivityLogsAlerts"
This command disables the activity log alert called alert1 in the resource group Default-ActivityLogsAlerts.
This command changes the tags property of the activity log alert called alert1 and disables it.
PS C:\>$obj = Get-AzActivityLogAlert -ResourceGroup "Default-activityLogAlerts" -Name "alert1"
PS C:\>Disable-AzActivityLogAlert -InputObject $obj
This command disables an activity log alert called alert1. For this it uses a PSActivityLogAlertResource object as input argument.
Example 3: Disable the ActivityLogAlert using the ResourceId parameter
PS C:\>Get-AzResource -ResourceGroupName "myResourceGroup" -Name "myLogAlert" | Disable-AzActivityLogAlert
This command disables the ActivityLogAlert using the ResourceId parameter from the pipe.
Parámetros
-Confirm
Prompts you for confirmation before running the cmdlet.
Propiedades del parámetro
Tipo: SwitchParameter
Valor predeterminado: None
Admite caracteres comodín: False
DontShow: False
Alias: cf
Conjuntos de parámetros
(All)
Posición: Named
Mandatory: False
Valor de la canalización: False
Valor de la canalización por nombre de propiedad: False
Valor de los argumentos restantes: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Propiedades del parámetro
Tipo: IAzureContextContainer
Valor predeterminado: None
Admite caracteres comodín: False
DontShow: False
Alias: AzContext, AzureRmContext, AzureCredential
Conjuntos de parámetros
(All)
Posición: Named
Mandatory: False
Valor de la canalización: False
Valor de la canalización por nombre de propiedad: False
Valor de los argumentos restantes: False
Sets the InputObject tags property of the call to extract the required name, resource group name, and the optional tag properties.
DisableByInputObject
Posición: Named
Mandatory: True
Valor de la canalización: True
Valor de la canalización por nombre de propiedad: False
Valor de los argumentos restantes: False
-Name
The name of the activity log alert.
Propiedades del parámetro
Tipo: String
Valor predeterminado: None
Admite caracteres comodín: False
DontShow: False
Conjuntos de parámetros
DisableByNameAndResourceGroup
Posición: Named
Mandatory: True
Valor de la canalización: False
Valor de la canalización por nombre de propiedad: True
Valor de los argumentos restantes: False
-ResourceGroupName
The name of the resource group where the alert resource is going to exist.
Propiedades del parámetro
Tipo: String
Valor predeterminado: None
Admite caracteres comodín: False
DontShow: False
Conjuntos de parámetros
DisableByNameAndResourceGroup
Posición: Named
Mandatory: True
Valor de la canalización: False
Valor de la canalización por nombre de propiedad: True
Valor de los argumentos restantes: False
-ResourceId
Sets the ResourceId tags property of the call to extract the required name, resource group name properties.
Propiedades del parámetro
Tipo: String
Valor predeterminado: None
Admite caracteres comodín: False
DontShow: False
Conjuntos de parámetros
DisableByResourceId
Posición: Named
Mandatory: True
Valor de la canalización: False
Valor de la canalización por nombre de propiedad: True
Valor de los argumentos restantes: False
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Propiedades del parámetro
Tipo: SwitchParameter
Valor predeterminado: None
Admite caracteres comodín: False
DontShow: False
Alias: wi
Conjuntos de parámetros
(All)
Posición: Named
Mandatory: False
Valor de la canalización: False
Valor de la canalización por nombre de propiedad: False
Valor de los 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 .
Salidas