Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

New-AzMetricAlertRuleV2DimensionSelection

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

Syntax

IncludeParameterSet (Default)

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

ExcludeParameterSet

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.

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

-DimensionName

The Dimension name

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-ValuesToExclude

The ExcludeValues

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-ValuesToInclude

The IncludeValues

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

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.

Inputs

String

String

Outputs

PSMetricDimension


Feedback

Was this page helpful?