New-AzMetricAlertRuleV2DimensionSelection
建立可用來建構計量警示準則的本機維度選取物件。
語法
New-AzMetricAlertRuleV2DimensionSelection
-DimensionName <String>
-ValuesToInclude <String[]>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
New-AzMetricAlertRuleV2DimensionSelection
-DimensionName <String>
-ValuesToExclude <String[]>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
New-AzMetricAlertRuleV2DimensionSelection Cmdlet 會建立本機維度選取物件,以 協助使用 new-AzMetricAlertRuleV2Criteria Cmdlet 來建構計量警示準則。
範例
範例 1:建立維度選取物件
New-AzMetricAlertRuleV2DimensionSelection -DimensionName LUN -ValuesToInclude 1,3,4
Dimension IncludeValues ExcludeValues
--------- ------------- -------------
LUN {1, 3, 4}
此命令會建立維度選取物件,指定維度 「LUN」 必須選取 {1,3,4} 的值
參數
-DefaultProfile
用於與 Azure 通訊的認證、帳戶、租用戶和訂用帳戶。
類型: | IAzureContextContainer |
別名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-DimensionName
維度名稱
類型: | String |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-ValuesToExclude
The ExcludeValues
類型: | String[] |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-ValuesToInclude
The IncludeValues
類型: | String[] |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
輸入
String[]