Share via


az monitor data-collection rule association

Note

This reference is part of the monitor-control-service extension for the Azure CLI (version 2.61.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

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

Extension GA
az monitor data-collection rule association list-by-resource

List associations for the specified resource.

Extension GA
az monitor data-collection rule association show

Get the specified association.

Extension GA
az monitor data-collection rule association update

Update an association.

Extension GA

az monitor data-collection rule association create

Experimental Preview Deprecated

Create an association.

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

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

--association-name --name -n
Experimental Preview Deprecated

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

--resource --resource-uri
Experimental Preview Deprecated

The identifier of the resource.

Optional Parameters

--data-collection-endpoint-id --endpoint-id
Experimental Preview Deprecated

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

--data-collection-rule-id --rule-id
Experimental Preview Deprecated

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

--description
Experimental Preview Deprecated

Description of the association.

Global Parameters
--debug
Experimental Preview Deprecated

Increase logging verbosity to show all debug logs.

--help -h
Experimental Preview Deprecated

Show this help message and exit.

--only-show-errors
Experimental Preview Deprecated

Only show errors, suppressing warnings.

--output -o
Experimental Preview Deprecated

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query
Experimental Preview Deprecated

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

--subscription
Experimental Preview Deprecated

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

--verbose
Experimental Preview Deprecated

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

az monitor data-collection rule association delete

Experimental Preview Deprecated

Delete an association.

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

Examples

Delete association

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

Required Parameters

--association-name --name -n
Experimental Preview Deprecated

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

--resource --resource-uri
Experimental Preview Deprecated

The identifier of the resource.

Optional Parameters

--yes -y
Experimental Preview Deprecated

Do not prompt for confirmation.

Default value: False
Global Parameters
--debug
Experimental Preview Deprecated

Increase logging verbosity to show all debug logs.

--help -h
Experimental Preview Deprecated

Show this help message and exit.

--only-show-errors
Experimental Preview Deprecated

Only show errors, suppressing warnings.

--output -o
Experimental Preview Deprecated

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query
Experimental Preview Deprecated

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

--subscription
Experimental Preview Deprecated

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

--verbose
Experimental Preview Deprecated

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

az monitor data-collection rule association list

Experimental Preview Deprecated

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

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

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 data collection endpoint

az monitor data-collection rule association list --data-collection-endpoint-name "myDataCollectionEndpointName" --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"

Required Parameters

Optional Parameters

--data-collection-endpoint-name --endpoint-name
Experimental Preview Deprecated

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

--data-collection-rule-name --rule-name
Experimental Preview Deprecated

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

--resource --resource-uri
Experimental Preview Deprecated

The identifier of the resource.

--resource-group -g
Experimental Preview Deprecated

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

Global Parameters
--debug
Experimental Preview Deprecated

Increase logging verbosity to show all debug logs.

--help -h
Experimental Preview Deprecated

Show this help message and exit.

--only-show-errors
Experimental Preview Deprecated

Only show errors, suppressing warnings.

--output -o
Experimental Preview Deprecated

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query
Experimental Preview Deprecated

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

--subscription
Experimental Preview Deprecated

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

--verbose
Experimental Preview Deprecated

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

az monitor data-collection rule association list-by-resource

Experimental Preview Deprecated

List associations for the specified resource.

az monitor data-collection rule association list-by-resource --resource
                                                             [--max-items]
                                                             [--next-token]

Examples

Required Parameters

--resource --resource-uri
Experimental Preview Deprecated

The identifier of the resource.

Optional Parameters

--max-items
Experimental Preview Deprecated

Total number of items to return in the command's output. If the total number of items available is more than the value specified, a token is provided in the command's output. To resume pagination, provide the token value in --next-token argument of a subsequent command.

--next-token
Experimental Preview Deprecated

Token to specify where to start paginating. This is the token value from a previously truncated response.

Global Parameters
--debug
Experimental Preview Deprecated

Increase logging verbosity to show all debug logs.

--help -h
Experimental Preview Deprecated

Show this help message and exit.

--only-show-errors
Experimental Preview Deprecated

Only show errors, suppressing warnings.

--output -o
Experimental Preview Deprecated

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query
Experimental Preview Deprecated

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

--subscription
Experimental Preview Deprecated

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

--verbose
Experimental Preview Deprecated

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

az monitor data-collection rule association show

Experimental Preview Deprecated

Get the specified association.

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

Examples

Get association

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

Required Parameters

--association-name --name -n
Experimental Preview Deprecated

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

--resource --resource-uri
Experimental Preview Deprecated

The identifier of the resource.

Optional Parameters

Global Parameters
--debug
Experimental Preview Deprecated

Increase logging verbosity to show all debug logs.

--help -h
Experimental Preview Deprecated

Show this help message and exit.

--only-show-errors
Experimental Preview Deprecated

Only show errors, suppressing warnings.

--output -o
Experimental Preview Deprecated

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query
Experimental Preview Deprecated

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

--subscription
Experimental Preview Deprecated

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

--verbose
Experimental Preview Deprecated

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

az monitor data-collection rule association update

Experimental Preview Deprecated

Update an association.

az monitor data-collection rule association update --association-name
                                                   --resource
                                                   [--add]
                                                   [--data-collection-endpoint-id]
                                                   [--data-collection-rule-id]
                                                   [--description]
                                                   [--force-string {0, 1, f, false, n, no, t, true, y, yes}]
                                                   [--remove]
                                                   [--set]

Examples

Update association

az monitor data-collection rule association update --name "myAssociation" --rule-id "/subscr iptions/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

--association-name --name -n
Experimental Preview Deprecated

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

--resource --resource-uri
Experimental Preview Deprecated

The identifier of the resource.

Optional Parameters

--add
Experimental Preview Deprecated

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>.

--data-collection-endpoint-id --endpoint-id
Experimental Preview Deprecated

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

--data-collection-rule-id --rule-id
Experimental Preview Deprecated

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

--description
Experimental Preview Deprecated

Description of the association.

--force-string
Experimental Preview Deprecated

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

Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--remove
Experimental Preview Deprecated

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

--set
Experimental Preview Deprecated

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

Global Parameters
--debug
Experimental Preview Deprecated

Increase logging verbosity to show all debug logs.

--help -h
Experimental Preview Deprecated

Show this help message and exit.

--only-show-errors
Experimental Preview Deprecated

Only show errors, suppressing warnings.

--output -o
Experimental Preview Deprecated

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query
Experimental Preview Deprecated

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

--subscription
Experimental Preview Deprecated

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

--verbose
Experimental Preview Deprecated

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