New-AzMetricFilter

Creates a metric dimension filter that can be used to query metrics.

Syntax

New-AzMetricFilter
   [-Dimension] <String>
   [-Operator] <String>
   [-Value] <String[]>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

The New-AzMetricFilter cmdlet creates a metric dimension filter that can be used to query metrics.

Examples

Example 1: Create a metric dimension filter

New-AzMetricFilter -Dimension City -Operator eq -Value "Seattle","New York"

This command creates metric dimension filter of the format "City eq 'Seattle' or City eq 'New York'".

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

-Dimension

The name of the metric dimension.

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

-Operator

Specifies the operator used to select the metric dimension.

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

-Value

Specifies the array of metric dimension values.

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

Inputs

String

String[]

Outputs

String