1. Packages
  2. Azure Native
  3. API Docs
  4. monitor
  5. DataCollectionRuleAssociation
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.1.0 published on Tuesday, Apr 8, 2025 by Pulumi

azure-native.monitor.DataCollectionRuleAssociation

Explore with Pulumi AI

This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.1.0 published on Tuesday, Apr 8, 2025 by Pulumi

Definition of generic ARM proxy resource.

Uses Azure REST API version 2022-06-01.

Example Usage

Create or update association

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var dataCollectionRuleAssociation = new AzureNative.Monitor.DataCollectionRuleAssociation("dataCollectionRuleAssociation", new()
    {
        AssociationName = "myAssociation",
        DataCollectionRuleId = "/subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule",
        ResourceUri = "subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVm",
    });

});
Copy
package main

import (
	monitor "github.com/pulumi/pulumi-azure-native-sdk/monitor/v3"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := monitor.NewDataCollectionRuleAssociation(ctx, "dataCollectionRuleAssociation", &monitor.DataCollectionRuleAssociationArgs{
			AssociationName:      pulumi.String("myAssociation"),
			DataCollectionRuleId: pulumi.String("/subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule"),
			ResourceUri:          pulumi.String("subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVm"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.monitor.DataCollectionRuleAssociation;
import com.pulumi.azurenative.monitor.DataCollectionRuleAssociationArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var dataCollectionRuleAssociation = new DataCollectionRuleAssociation("dataCollectionRuleAssociation", DataCollectionRuleAssociationArgs.builder()
            .associationName("myAssociation")
            .dataCollectionRuleId("/subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule")
            .resourceUri("subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVm")
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const dataCollectionRuleAssociation = new azure_native.monitor.DataCollectionRuleAssociation("dataCollectionRuleAssociation", {
    associationName: "myAssociation",
    dataCollectionRuleId: "/subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule",
    resourceUri: "subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVm",
});
Copy
import pulumi
import pulumi_azure_native as azure_native

data_collection_rule_association = azure_native.monitor.DataCollectionRuleAssociation("dataCollectionRuleAssociation",
    association_name="myAssociation",
    data_collection_rule_id="/subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule",
    resource_uri="subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVm")
Copy
resources:
  dataCollectionRuleAssociation:
    type: azure-native:monitor:DataCollectionRuleAssociation
    properties:
      associationName: myAssociation
      dataCollectionRuleId: /subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule
      resourceUri: subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVm
Copy

Create DataCollectionRuleAssociation Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new DataCollectionRuleAssociation(name: string, args: DataCollectionRuleAssociationArgs, opts?: CustomResourceOptions);
@overload
def DataCollectionRuleAssociation(resource_name: str,
                                  args: DataCollectionRuleAssociationArgs,
                                  opts: Optional[ResourceOptions] = None)

@overload
def DataCollectionRuleAssociation(resource_name: str,
                                  opts: Optional[ResourceOptions] = None,
                                  resource_uri: Optional[str] = None,
                                  association_name: Optional[str] = None,
                                  data_collection_endpoint_id: Optional[str] = None,
                                  data_collection_rule_id: Optional[str] = None,
                                  description: Optional[str] = None)
func NewDataCollectionRuleAssociation(ctx *Context, name string, args DataCollectionRuleAssociationArgs, opts ...ResourceOption) (*DataCollectionRuleAssociation, error)
public DataCollectionRuleAssociation(string name, DataCollectionRuleAssociationArgs args, CustomResourceOptions? opts = null)
public DataCollectionRuleAssociation(String name, DataCollectionRuleAssociationArgs args)
public DataCollectionRuleAssociation(String name, DataCollectionRuleAssociationArgs args, CustomResourceOptions options)
type: azure-native:monitor:DataCollectionRuleAssociation
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. DataCollectionRuleAssociationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. DataCollectionRuleAssociationArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. DataCollectionRuleAssociationArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. DataCollectionRuleAssociationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. DataCollectionRuleAssociationArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var dataCollectionRuleAssociationResource = new AzureNative.Monitor.DataCollectionRuleAssociation("dataCollectionRuleAssociationResource", new()
{
    ResourceUri = "string",
    AssociationName = "string",
    DataCollectionEndpointId = "string",
    DataCollectionRuleId = "string",
    Description = "string",
});
Copy
example, err := monitor.NewDataCollectionRuleAssociation(ctx, "dataCollectionRuleAssociationResource", &monitor.DataCollectionRuleAssociationArgs{
	ResourceUri:              pulumi.String("string"),
	AssociationName:          pulumi.String("string"),
	DataCollectionEndpointId: pulumi.String("string"),
	DataCollectionRuleId:     pulumi.String("string"),
	Description:              pulumi.String("string"),
})
Copy
var dataCollectionRuleAssociationResource = new DataCollectionRuleAssociation("dataCollectionRuleAssociationResource", DataCollectionRuleAssociationArgs.builder()
    .resourceUri("string")
    .associationName("string")
    .dataCollectionEndpointId("string")
    .dataCollectionRuleId("string")
    .description("string")
    .build());
Copy
data_collection_rule_association_resource = azure_native.monitor.DataCollectionRuleAssociation("dataCollectionRuleAssociationResource",
    resource_uri="string",
    association_name="string",
    data_collection_endpoint_id="string",
    data_collection_rule_id="string",
    description="string")
Copy
const dataCollectionRuleAssociationResource = new azure_native.monitor.DataCollectionRuleAssociation("dataCollectionRuleAssociationResource", {
    resourceUri: "string",
    associationName: "string",
    dataCollectionEndpointId: "string",
    dataCollectionRuleId: "string",
    description: "string",
});
Copy
type: azure-native:monitor:DataCollectionRuleAssociation
properties:
    associationName: string
    dataCollectionEndpointId: string
    dataCollectionRuleId: string
    description: string
    resourceUri: string
Copy

DataCollectionRuleAssociation Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The DataCollectionRuleAssociation resource accepts the following input properties:

ResourceUri
This property is required.
Changes to this property will trigger replacement.
string
The identifier of the resource.
AssociationName Changes to this property will trigger replacement. string
The name of the association. The name is case insensitive.
DataCollectionEndpointId string
The resource ID of the data collection endpoint that is to be associated.
DataCollectionRuleId string
The resource ID of the data collection rule that is to be associated.
Description string
Description of the association.
ResourceUri
This property is required.
Changes to this property will trigger replacement.
string
The identifier of the resource.
AssociationName Changes to this property will trigger replacement. string
The name of the association. The name is case insensitive.
DataCollectionEndpointId string
The resource ID of the data collection endpoint that is to be associated.
DataCollectionRuleId string
The resource ID of the data collection rule that is to be associated.
Description string
Description of the association.
resourceUri
This property is required.
Changes to this property will trigger replacement.
String
The identifier of the resource.
associationName Changes to this property will trigger replacement. String
The name of the association. The name is case insensitive.
dataCollectionEndpointId String
The resource ID of the data collection endpoint that is to be associated.
dataCollectionRuleId String
The resource ID of the data collection rule that is to be associated.
description String
Description of the association.
resourceUri
This property is required.
Changes to this property will trigger replacement.
string
The identifier of the resource.
associationName Changes to this property will trigger replacement. string
The name of the association. The name is case insensitive.
dataCollectionEndpointId string
The resource ID of the data collection endpoint that is to be associated.
dataCollectionRuleId string
The resource ID of the data collection rule that is to be associated.
description string
Description of the association.
resource_uri
This property is required.
Changes to this property will trigger replacement.
str
The identifier of the resource.
association_name Changes to this property will trigger replacement. str
The name of the association. The name is case insensitive.
data_collection_endpoint_id str
The resource ID of the data collection endpoint that is to be associated.
data_collection_rule_id str
The resource ID of the data collection rule that is to be associated.
description str
Description of the association.
resourceUri
This property is required.
Changes to this property will trigger replacement.
String
The identifier of the resource.
associationName Changes to this property will trigger replacement. String
The name of the association. The name is case insensitive.
dataCollectionEndpointId String
The resource ID of the data collection endpoint that is to be associated.
dataCollectionRuleId String
The resource ID of the data collection rule that is to be associated.
description String
Description of the association.

Outputs

All input properties are implicitly available as output properties. Additionally, the DataCollectionRuleAssociation resource produces the following output properties:

AzureApiVersion string
The Azure API version of the resource.
Etag string
Resource entity tag (ETag).
Id string
The provider-assigned unique ID for this managed resource.
Metadata Pulumi.AzureNative.Monitor.Outputs.DataCollectionRuleAssociationResponseMetadata
Metadata about the resource
Name string
The name of the resource.
ProvisioningState string
The resource provisioning state.
SystemData Pulumi.AzureNative.Monitor.Outputs.DataCollectionRuleAssociationProxyOnlyResourceResponseSystemData
Metadata pertaining to creation and last modification of the resource.
Type string
The type of the resource.
AzureApiVersion string
The Azure API version of the resource.
Etag string
Resource entity tag (ETag).
Id string
The provider-assigned unique ID for this managed resource.
Metadata DataCollectionRuleAssociationResponseMetadata
Metadata about the resource
Name string
The name of the resource.
ProvisioningState string
The resource provisioning state.
SystemData DataCollectionRuleAssociationProxyOnlyResourceResponseSystemData
Metadata pertaining to creation and last modification of the resource.
Type string
The type of the resource.
azureApiVersion String
The Azure API version of the resource.
etag String
Resource entity tag (ETag).
id String
The provider-assigned unique ID for this managed resource.
metadata DataCollectionRuleAssociationResponseMetadata
Metadata about the resource
name String
The name of the resource.
provisioningState String
The resource provisioning state.
systemData DataCollectionRuleAssociationProxyOnlyResourceResponseSystemData
Metadata pertaining to creation and last modification of the resource.
type String
The type of the resource.
azureApiVersion string
The Azure API version of the resource.
etag string
Resource entity tag (ETag).
id string
The provider-assigned unique ID for this managed resource.
metadata DataCollectionRuleAssociationResponseMetadata
Metadata about the resource
name string
The name of the resource.
provisioningState string
The resource provisioning state.
systemData DataCollectionRuleAssociationProxyOnlyResourceResponseSystemData
Metadata pertaining to creation and last modification of the resource.
type string
The type of the resource.
azure_api_version str
The Azure API version of the resource.
etag str
Resource entity tag (ETag).
id str
The provider-assigned unique ID for this managed resource.
metadata DataCollectionRuleAssociationResponseMetadata
Metadata about the resource
name str
The name of the resource.
provisioning_state str
The resource provisioning state.
system_data DataCollectionRuleAssociationProxyOnlyResourceResponseSystemData
Metadata pertaining to creation and last modification of the resource.
type str
The type of the resource.
azureApiVersion String
The Azure API version of the resource.
etag String
Resource entity tag (ETag).
id String
The provider-assigned unique ID for this managed resource.
metadata Property Map
Metadata about the resource
name String
The name of the resource.
provisioningState String
The resource provisioning state.
systemData Property Map
Metadata pertaining to creation and last modification of the resource.
type String
The type of the resource.

Supporting Types

DataCollectionRuleAssociationProxyOnlyResourceResponseSystemData
, DataCollectionRuleAssociationProxyOnlyResourceResponseSystemDataArgs

CreatedAt string
The timestamp of resource creation (UTC).
CreatedBy string
The identity that created the resource.
CreatedByType string
The type of identity that created the resource.
LastModifiedAt string
The timestamp of resource last modification (UTC)
LastModifiedBy string
The identity that last modified the resource.
LastModifiedByType string
The type of identity that last modified the resource.
CreatedAt string
The timestamp of resource creation (UTC).
CreatedBy string
The identity that created the resource.
CreatedByType string
The type of identity that created the resource.
LastModifiedAt string
The timestamp of resource last modification (UTC)
LastModifiedBy string
The identity that last modified the resource.
LastModifiedByType string
The type of identity that last modified the resource.
createdAt String
The timestamp of resource creation (UTC).
createdBy String
The identity that created the resource.
createdByType String
The type of identity that created the resource.
lastModifiedAt String
The timestamp of resource last modification (UTC)
lastModifiedBy String
The identity that last modified the resource.
lastModifiedByType String
The type of identity that last modified the resource.
createdAt string
The timestamp of resource creation (UTC).
createdBy string
The identity that created the resource.
createdByType string
The type of identity that created the resource.
lastModifiedAt string
The timestamp of resource last modification (UTC)
lastModifiedBy string
The identity that last modified the resource.
lastModifiedByType string
The type of identity that last modified the resource.
created_at str
The timestamp of resource creation (UTC).
created_by str
The identity that created the resource.
created_by_type str
The type of identity that created the resource.
last_modified_at str
The timestamp of resource last modification (UTC)
last_modified_by str
The identity that last modified the resource.
last_modified_by_type str
The type of identity that last modified the resource.
createdAt String
The timestamp of resource creation (UTC).
createdBy String
The identity that created the resource.
createdByType String
The type of identity that created the resource.
lastModifiedAt String
The timestamp of resource last modification (UTC)
lastModifiedBy String
The identity that last modified the resource.
lastModifiedByType String
The type of identity that last modified the resource.

DataCollectionRuleAssociationResponseMetadata
, DataCollectionRuleAssociationResponseMetadataArgs

ProvisionedBy This property is required. string
Azure offering managing this resource on-behalf-of customer.
ProvisionedByResourceId This property is required. string
Resource Id of azure offering managing this resource on-behalf-of customer.
ProvisionedBy This property is required. string
Azure offering managing this resource on-behalf-of customer.
ProvisionedByResourceId This property is required. string
Resource Id of azure offering managing this resource on-behalf-of customer.
provisionedBy This property is required. String
Azure offering managing this resource on-behalf-of customer.
provisionedByResourceId This property is required. String
Resource Id of azure offering managing this resource on-behalf-of customer.
provisionedBy This property is required. string
Azure offering managing this resource on-behalf-of customer.
provisionedByResourceId This property is required. string
Resource Id of azure offering managing this resource on-behalf-of customer.
provisioned_by This property is required. str
Azure offering managing this resource on-behalf-of customer.
provisioned_by_resource_id This property is required. str
Resource Id of azure offering managing this resource on-behalf-of customer.
provisionedBy This property is required. String
Azure offering managing this resource on-behalf-of customer.
provisionedByResourceId This property is required. String
Resource Id of azure offering managing this resource on-behalf-of customer.

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:monitor:DataCollectionRuleAssociation myAssociation /{resourceUri}/providers/Microsoft.Insights/dataCollectionRuleAssociations/{associationName} 
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Azure Native pulumi/pulumi-azure-native
License
Apache-2.0
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.1.0 published on Tuesday, Apr 8, 2025 by Pulumi