Get-AzScheduledQueryRule
Obtém recursos de consulta agendada
Sintaxe
Get-AzScheduledQueryRule
[-ResourceGroupName <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzScheduledQueryRule
-ResourceGroupName <String>
-Name <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzScheduledQueryRule
-ResourceId <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
Obtém recursos de consulta agendada
Exemplos
Exemplo 1 – Listar por assinatura ou grupo de recursos
PS C:\> Get-AzScheduledQueryRule -ResourceGroupName "MyResourceGroup"
Description : description 1
Enabled : true
LastUpdatedTime : 19-Apr-19 12:29:39 PM
ProvisioningState : Succeeded
Source : Microsoft.Azure.Management.Monitor.Models.Source
Schedule : Microsoft.Azure.Management.Monitor.Models.Schedule
Action : Microsoft.Azure.Management.Monitor.Models.AlertingAction
Id : /subscriptions/a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1/resourceGroups/MyResourceGroup/providers/microsoft.insights/scheduledqueryrules/LogAlertRule1
Name : LogAlertRule1
Type : microsoft.insights/scheduledqueryrules
Location : centralindia
Tags : {[hidden-link:/subscriptions/a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1/resourceGroups/MyResourceGroup/providers/Microsoft.OperationalInsights/workspaces/MyWorkspace, Resource]}
Description : description 2
Enabled : true
LastUpdatedTime : 15-Apr-19 6:57:00 PM
ProvisioningState : Succeeded
Source : Microsoft.Azure.Management.Monitor.Models.Source
Schedule : Microsoft.Azure.Management.Monitor.Models.Schedule
Action : Microsoft.Azure.Management.Monitor.Models.Action
Id : /subscriptions/a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1/resourceGroups/MyResourceGroup/providers/microsoft.insights/scheduledqueryrules/LogAlertRule2
Name : LogAlertRule2
Type : microsoft.insights/scheduledqueryrules
Location : centralindia
Tags : {[hidden-link:/subscriptions/a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1/resourceGroups/MyResourceGroup/providers/Microsoft.OperationalInsights/workspaces/MyWorkspace, Resource]}
Exemplo 2 – Obter pelo nome da regra
PS C:\> Get-AzScheduledQueryRule -ResourceGroupName "MyResourceGroup" -Name "LogAlertRule1"
Description : desc 1
Enabled : true
LastUpdatedTime : 19-Apr-19 12:29:39 PM
ProvisioningState : Succeeded
Source : Microsoft.Azure.Management.Monitor.Models.Source
Schedule : Microsoft.Azure.Management.Monitor.Models.Schedule
Action : Microsoft.Azure.Management.Monitor.Models.AlertingAction
Id : /subscriptions/a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1/resourceGroups/MyResourceGroup/providers/microsoft.insights/scheduledqueryrules/LogAlertRule1
Name : LogAlertRule1
Type : microsoft.insights/scheduledqueryrules
Location : centralindia
Tags : {[hidden-link:/subscriptions/a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1/resourceGroups/MyResourceGroup/providers/Microsoft.OperationalInsights/workspaces/MyWorkspace, Resource]}
Exemplo 3 – Obter por ID do recurso
PS C:\> Get-AzScheduledQueryRule -ResourceId "/subscriptions/a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1/resourceGroups/MyResourceGroup/providers/microsoft.insights/scheduledqueryrules/LogAlertRule1"
Description : desc 1
Enabled : true
LastUpdatedTime : 19-Apr-19 12:29:39 PM
ProvisioningState : Succeeded
Source : Microsoft.Azure.Management.Monitor.Models.Source
Schedule : Microsoft.Azure.Management.Monitor.Models.Schedule
Action : Microsoft.Azure.Management.Monitor.Models.AlertingAction
Id : /subscriptions/a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1/resourceGroups/MyResourceGroup/providers/microsoft.insights/scheduledqueryrules/LogAlertRule1
Name : LogAlertRule1
Type : microsoft.insights/scheduledqueryrules
Location : centralindia
Tags : {[hidden-link:/subscriptions/a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1/resourceGroups/MyResourceGroup/providers/Microsoft.OperationalInsights/workspaces/MyWorkspace, Resource]}
Parâmetros
-DefaultProfile
As credenciais, a conta, o locatário e a assinatura usados para a comunicação com o Azure.
Tipo: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Cargo: | Named |
Valor padrão: | None |
Obrigatório: | False |
Aceitar a entrada de pipeline: | False |
Aceitar caracteres curinga: | False |
-Name
O nome da regra de alerta
Tipo: | String |
Cargo: | Named |
Valor padrão: | None |
Obrigatório: | True |
Aceitar a entrada de pipeline: | False |
Aceitar caracteres curinga: | False |
-ResourceGroupName
O nome do grupo de recursos
Tipo: | String |
Cargo: | Named |
Valor padrão: | None |
Obrigatório: | True |
Aceitar a entrada de pipeline: | False |
Aceitar caracteres curinga: | False |
-ResourceId
A ID do recurso
Tipo: | String |
Cargo: | Named |
Valor padrão: | None |
Obrigatório: | True |
Aceitar a entrada de pipeline: | True |
Aceitar caracteres curinga: | False |
Entradas
None