Editar

Partilhar via


Get-AzPrometheusRuleGroup

Retrieve a Prometheus rule group definition.

Syntax

Get-AzPrometheusRuleGroup
   [-SubscriptionId <String[]>]
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]
Get-AzPrometheusRuleGroup
   -ResourceGroupName <String>
   [-SubscriptionId <String[]>]
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]
Get-AzPrometheusRuleGroup
   -ResourceGroupName <String>
   -RuleGroupName <String>
   [-SubscriptionId <String[]>]
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]
Get-AzPrometheusRuleGroup
   -InputObject <IPrometheusRuleGroupsIdentity>
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]

Description

Retrieve a Prometheus rule group definition.

Examples

Example 1: Retrieve a Prometheus rule group definition from subscription.

Get-AzPrometheusRuleGroup

Name     Location ClusterName Enabled
----     -------- ----------- -------
newrule  eastus               True
newrule2 eastus               False

Retrieve a Prometheus rule group definition from subscription.

Example 2: Retrieve a certain Prometheus rule group definition.

Get-AzPrometheusRuleGroup -RuleGroupName newrule -ResourceGroupName MyGroupName

Name    Location ClusterName Enabled
----    -------- ----------- -------
newrule eastus               True

Retrieve a certain Prometheus rule group definition from ResourceGroup.

Parameters

-DefaultProfile

The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.

Type:PSObject
Aliases:AzureRMContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-InputObject

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

Type:IPrometheusRuleGroupsIdentity
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-ResourceGroupName

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

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-RuleGroupName

The name of the rule group.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-SubscriptionId

The ID of the target subscription.

Type:String[]
Position:Named
Default value:(Get-AzContext).Subscription.Id
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

IPrometheusRuleGroupsIdentity

Outputs

IPrometheusRuleGroupResource