Edit

Share via


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

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DimensionName

The Dimension name

Parameter properties

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

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-ValuesToExclude

The ExcludeValues

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ExcludeParameterSet
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-ValuesToInclude

The IncludeValues

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

IncludeParameterSet
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments: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.

Inputs

String

String

Outputs

PSMetricDimension