az datadog tag-rule

Note

This reference is part of the datadog extension for the Azure CLI (version 2.17.0 or higher). The extension will automatically install the first time you run an az datadog tag-rule command. Learn more about extensions.

Manage tag rule with datadog.

Commands

Name Description Type Status
az datadog tag-rule create

Create a tag rule set for a given monitor resource.

Extension GA
az datadog tag-rule list

List the tag rules for a given monitor resource.

Extension GA
az datadog tag-rule show

Get a tag rule set for a given monitor resource.

Extension GA
az datadog tag-rule update

Update a tag rule set for a given monitor resource.

Extension GA

az datadog tag-rule create

Create a tag rule set for a given monitor resource.

az datadog tag-rule create --monitor-name
                           --resource-group
                           --rule-set-name
                           [--filtering-tags]
                           [--log-rules-filtering-tags]
                           [--send-aad-logs {false, true}]
                           [--send-resource-logs {false, true}]
                           [--send-subscription-logs {false, true}]

Examples

TagRules_CreateOrUpdate

az datadog tag-rule create --monitor-name "myMonitor" --log-rules-filtering-tags name="Environment" action="Include" value="Prod" --log-rules-filtering-tags name="Environment" action="Exclude" value="Dev" --send-aad-logs false --send-resource-logs true --send-subscription-logs true --resource-group "myResourceGroup" --rule-set-name "default"

Required Parameters

--monitor-name

Monitor resource name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--rule-set-name

Rule set name.

Optional Parameters

--filtering-tags

List of filtering tags to be used for capturing metrics. 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.

Usage: --filtering-tags name=XX value=XX action=XX

name: The name (also known as the key) of the tag. value: The value of the tag. action: Valid actions for a filtering tag. Exclusion takes priority over inclusion.

Multiple actions can be specified by using more than one --filtering-tags argument.

--log-rules-filtering-tags

List of filtering tags to be used for capturing logs. This only takes effect if SendResourceLogs 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.

Usage: --log-rules-filtering-tags name=XX value=XX action=XX

name: The name (also known as the key) of the tag. value: The value of the tag. action: Valid actions for a filtering tag. Exclusion takes priority over inclusion.

Multiple actions can be specified by using more than one --log-rules-filtering-tags argument.

--send-aad-logs

Flag specifying if AAD logs should be sent for the Monitor resource.

accepted values: false, true
--send-resource-logs

Flag specifying if Azure resource logs should be sent for the Monitor resource.

accepted values: false, true
--send-subscription-logs

Flag specifying if Azure subscription logs should be sent for the Monitor resource.

accepted values: false, true
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az datadog tag-rule list

List the tag rules for a given monitor resource.

az datadog tag-rule list --monitor-name
                         --resource-group

Examples

TagRules_List

az datadog tag-rule list --monitor-name "myMonitor" --resource-group "myResourceGroup"

Required Parameters

--monitor-name

Monitor resource name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az datadog tag-rule show

Get a tag rule set for a given monitor resource.

az datadog tag-rule show [--ids]
                         [--monitor-name]
                         [--resource-group]
                         [--rule-set-name]
                         [--subscription]

Examples

TagRules_Get

az datadog tag-rule show --monitor-name "myMonitor" --resource-group "myResourceGroup" --rule-set-name "default"

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--monitor-name

Monitor resource name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--rule-set-name

Rule set name.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az datadog tag-rule update

Update a tag rule set for a given monitor resource.

az datadog tag-rule update [--add]
                           [--filtering-tags]
                           [--force-string]
                           [--ids]
                           [--log-rules-filtering-tags]
                           [--monitor-name]
                           [--remove]
                           [--resource-group]
                           [--rule-set-name]
                           [--send-aad-logs {false, true}]
                           [--send-resource-logs {false, true}]
                           [--send-subscription-logs {false, true}]
                           [--set]
                           [--subscription]

Optional Parameters

--add

Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>.

default value: []
--filtering-tags

List of filtering tags to be used for capturing metrics. 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.

Usage: --filtering-tags name=XX value=XX action=XX

name: The name (also known as the key) of the tag. value: The value of the tag. action: Valid actions for a filtering tag. Exclusion takes priority over inclusion.

Multiple actions can be specified by using more than one --filtering-tags argument.

--force-string

When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.

default value: False
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--log-rules-filtering-tags

List of filtering tags to be used for capturing logs. This only takes effect if SendResourceLogs 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.

Usage: --log-rules-filtering-tags name=XX value=XX action=XX

name: The name (also known as the key) of the tag. value: The value of the tag. action: Valid actions for a filtering tag. Exclusion takes priority over inclusion.

Multiple actions can be specified by using more than one --log-rules-filtering-tags argument.

--monitor-name

Monitor resource name.

--remove

Remove a property or an element from a list. Example: --remove property.list <indexToRemove> OR --remove propertyToRemove.

default value: []
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--rule-set-name

Rule set name.

--send-aad-logs

Flag specifying if AAD logs should be sent for the Monitor resource.

accepted values: false, true
--send-resource-logs

Flag specifying if Azure resource logs should be sent for the Monitor resource.

accepted values: false, true
--send-subscription-logs

Flag specifying if Azure subscription logs should be sent for the Monitor resource.

accepted values: false, true
--set

Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>.

default value: []
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.