az monitor data-collection rule association

Note

This reference is part of the monitor-control-service extension for the Azure CLI (version 2.15.0 or higher). The extension will automatically install the first time you run an az monitor data-collection rule association command. Learn more about extensions.

Manage data collection rule association for monitor control service.

Commands

Name Description Type Status
az monitor data-collection rule association create

Create an association.

Extension GA
az monitor data-collection rule association delete

Delete an association.

Extension GA
az monitor data-collection rule association list

List associations for the specified data collection rule. And Lists associations for the specified resource.

Extension GA
az monitor data-collection rule association show

Return the specified association.

Extension GA
az monitor data-collection rule association update

Update an association.

Extension GA

az monitor data-collection rule association create

Create an association.

az monitor data-collection rule association create --name
                                                   --resource
                                                   [--description]
                                                   [--endpoint-id]
                                                   [--rule-id]

Examples

Create association

az monitor data-collection rule association create --name "myAssociation" --rule-id "/subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule" --resource "subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVm"

Required Parameters

--name -n

The name of the association.

--resource

The identifier of the resource.

Optional Parameters

--description

Description of the association.

--endpoint-id

The resource ID of the data collection endpoint that is to be associated.

--rule-id

The resource ID of the data collection rule that is to be associated.

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 monitor data-collection rule association delete

Delete an association.

az monitor data-collection rule association delete --name
                                                   --resource
                                                   [--yes]

Examples

Delete association

az monitor data-collection rule association delete --name "myAssociation" --resource "subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVm"

Required Parameters

--name -n

The name of the association. The name is case insensitive.

--resource

The identifier of the resource.

Optional Parameters

--yes -y

Do not prompt for confirmation.

default value: False
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 monitor data-collection rule association list

List associations for the specified data collection rule. And Lists associations for the specified resource.

az monitor data-collection rule association list [--endpoint-name]
                                                 [--resource]
                                                 [--resource-group]
                                                 [--rule-name]

Examples

List associations for specified data collection rule

az monitor data-collection rule association list --rule-name "myCollectionRule" --resource-group "myResourceGroup"

List associations for specified resource

az monitor data-collection rule association list --resource "subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVm"

Optional Parameters

--endpoint-name

The name of the data collection endpoint. The name is case insensitive.

--resource

The identifier of the resource.

--resource-group -g

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

--rule-name

The name of the data collection rule. The name is case insensitive.

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 monitor data-collection rule association show

Return the specified association.

az monitor data-collection rule association show --name
                                                 --resource

Examples

Get association

az monitor data-collection rule association show --name "myAssociation" --resource "subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVm"

Required Parameters

--name -n

The name of the association. The name is case insensitive.

--resource

The identifier of the resource.

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 monitor data-collection rule association update

Update an association.

az monitor data-collection rule association update --name
                                                   --resource
                                                   [--description]
                                                   [--endpoint-id]
                                                   [--rule-id]

Examples

Update association

az monitor data-collection rule association update --name "myAssociation" --rule-id "/subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule" --resource "subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVm"

Required Parameters

--name -n

The name of the association.

--resource

The identifier of the resource.

Optional Parameters

--description

Description of the association.

--endpoint-id

The resource ID of the data collection endpoint that is to be associated.

--rule-id

The resource ID of the data collection rule that is to be associated.

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.