New-AzNewRelicMonitorTagRule
Create a TagRule
Syntax
New-AzNewRelicMonitorTagRule
-MonitorName <String>
-ResourceGroupName <String>
-RuleSetName <String>
[-SubscriptionId <String>]
[-LogRuleFilteringTag <IFilteringTag[]>]
[-LogRuleSendAadLog <SendAadLogsStatus>]
[-LogRuleSendActivityLog <SendActivityLogsStatus>]
[-LogRuleSendSubscriptionLog <SendSubscriptionLogsStatus>]
[-MetricRuleFilteringTag <IFilteringTag[]>]
[-MetricRuleSendMetric <SendMetricsStatus>]
[-MetricRuleUserEmail <String>]
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Create a TagRule
Examples
Example 1: Create tag rule
New-AzNewRelicMonitorTagRule -MonitorName test-01 -ResourceGroupName ps-test -RuleSetName default -LogRuleSendAadLog 'Disabled' -LogRuleSendActivityLog 'Enabled' -LogRuleSendSubscriptionLog 'Disabled' -MetricRuleSendMetric 'Enabled' -MetricRuleUserEmail v-jiaji@outlook.com
Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName RetryAfter
---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- ----------
default 6/28/2023 6:03:14 AM v-jiaji@outlook.com User 6/28/2023 6:03:14 AM v-jiaji@outlook.com User ps-test
Create monitor tag rule with specified monitor and default name
Parameters
-AsJob
Run the command as a job
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
Type: | PSObject |
Aliases: | AzureRMContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-LogRuleFilteringTag
List of filtering tags to be used for capturing logs. This only takes effect if SendActivityLogs flag is enabled. If empty, all resources will be captured.If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags. To construct, see NOTES section for LOGRULEFILTERINGTAG properties and create a hash table.
Type: | IFilteringTag[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-LogRuleSendAadLog
Flag specifying if AAD logs should be sent for the Monitor resource.
Type: | SendAadLogsStatus |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-LogRuleSendActivityLog
Flag specifying if activity logs from Azure resources should be sent for the Monitor resource.
Type: | SendActivityLogsStatus |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-LogRuleSendSubscriptionLog
Flag specifying if subscription logs should be sent for the Monitor resource.
Type: | SendSubscriptionLogsStatus |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-MetricRuleFilteringTag
List of filtering tags to be used for capturing metrics. To construct, see NOTES section for METRICRULEFILTERINGTAG properties and create a hash table.
Type: | IFilteringTag[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-MetricRuleSendMetric
Flag specifying if metrics should be sent for the Monitor resource.
Type: | SendMetricsStatus |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-MetricRuleUserEmail
User Email
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-MonitorName
Name of the Monitors resource
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-NoWait
Run the command asynchronously
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroupName
The name of the resource group. The name is case insensitive.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RuleSetName
Name of the TagRule
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SubscriptionId
The ID of the target subscription.
Type: | String |
Position: | Named |
Default value: | (Get-AzContext).Subscription.Id |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Outputs
Azure PowerShell
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for