Muokkaa

Jaa


New-AzMetricAlertRuleV2DimensionSelection

Creates a local dimension selection object that can be used to construct a metric alert criteria.

Syntax

New-AzMetricAlertRuleV2DimensionSelection
   -DimensionName <String>
   -ValuesToInclude <String[]>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
New-AzMetricAlertRuleV2DimensionSelection
   -DimensionName <String>
   -ValuesToExclude <String[]>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

The New-AzMetricAlertRuleV2DimensionSelection cmdlet creates a local dimension selection object to help with the construction of metric alert criteria using New-AzMetricAlertRuleV2Criteria cmdlet.

Examples

Example 1: Create a dimension selection object

New-AzMetricAlertRuleV2DimensionSelection -DimensionName LUN -ValuesToInclude 1,3,4

Dimension IncludeValues ExcludeValues
--------- ------------- -------------
LUN       {1, 3, 4}

This command creates a dimension selection object that specifies that values {1,3,4} need to be selected for Dimension "LUN"

Parameters

-DefaultProfile

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

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DimensionName

The Dimension name

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

-ValuesToExclude

The ExcludeValues

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

-ValuesToInclude

The IncludeValues

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

Inputs

String

String[]

Outputs

PSMetricDimension