Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
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
Create an association.
az monitor data-collection rule association create --association-name --name
--resource --resource-uri
[--acquire-policy-token]
[--change-reference]
[--data-collection-endpoint-id --endpoint-id]
[--data-collection-rule-id --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
The name of the association. The name is case insensitive.
The identifier of the resource.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Acquiring an Azure Policy token automatically for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
The related change reference ID for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
The resource ID of the data collection endpoint that is to be associated.
The resource ID of the data collection rule that is to be associated.
Description of the association.
az monitor data-collection rule association delete
Delete an association.
az monitor data-collection rule association delete --association-name --name
--resource --resource-uri
[--acquire-policy-token]
[--change-reference]
[--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
The name of the association. The name is case insensitive.
The identifier of the resource.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Acquiring an Azure Policy token automatically for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
The related change reference ID for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
Do not prompt for confirmation.
| Property | Value |
|---|---|
| Default value: | False |
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.
az monitor data-collection rule association list [--data-collection-endpoint-name --endpoint-name]
[--data-collection-rule-name --rule-name]
[--resource --resource-uri]
[--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"
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
The name of the data collection endpoint. The name is case insensitive.
The name of the data collection rule. The name is case insensitive.
The identifier of the resource.
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
az monitor data-collection rule association list-by-resource
List associations for the specified resource.
az monitor data-collection rule association list-by-resource --resource --resource-uri
[--acquire-policy-token]
[--change-reference]
[--max-items]
[--next-token]
Required Parameters
The identifier of the resource.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Acquiring an Azure Policy token automatically for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
The related change reference ID for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
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.
| Property | Value |
|---|---|
| Parameter group: | Pagination Arguments |
Token to specify where to start paginating. This is the token value from a previously truncated response.
| Property | Value |
|---|---|
| Parameter group: | Pagination Arguments |
az monitor data-collection rule association show
Get the specified association.
az monitor data-collection rule association show --association-name --name
--resource --resource-uri
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
The name of the association. The name is case insensitive.
The identifier of the resource.
az monitor data-collection rule association update
Update an association.
az monitor data-collection rule association update --association-name --name
--resource --resource-uri
[--acquire-policy-token]
[--add]
[--change-reference]
[--data-collection-endpoint-id --endpoint-id]
[--data-collection-rule-id --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
The name of the association. The name is case insensitive.
The identifier of the resource.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Acquiring an Azure Policy token automatically for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
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>.
| Property | Value |
|---|---|
| Parameter group: | Generic Update Arguments |
The related change reference ID for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
The resource ID of the data collection endpoint that is to be associated.
The resource ID of the data collection rule that is to be associated.
Description of the association.
When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.
| Property | Value |
|---|---|
| Parameter group: | Generic Update Arguments |
| Accepted values: | 0, 1, f, false, n, no, t, true, y, yes |
Remove a property or an element from a list. Example: --remove property.list <indexToRemove> OR --remove propertyToRemove.
| Property | Value |
|---|---|
| Parameter group: | Generic Update Arguments |
Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>.
| Property | Value |
|---|---|
| Parameter group: | Generic Update Arguments |
Feedback
Was this page helpful?
