Welcome to Pulumi Registry, your window into the cloud. Read the announcement.

Azure Native

v1.42.0 published on Monday, Oct 25, 2021 by Pulumi

DataCollectionRuleAssociation

Definition of generic ARM proxy resource. API Version: 2019-11-01-preview.

Example Usage

Create or update association

using Pulumi;
using AzureNative = Pulumi.AzureNative;

class MyStack : Stack
{
    public MyStack()
    {
        var dataCollectionRuleAssociation = new AzureNative.Insights.DataCollectionRuleAssociation("dataCollectionRuleAssociation", new AzureNative.Insights.DataCollectionRuleAssociationArgs
        {
            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",
        });
    }

}

package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := insights.NewDataCollectionRuleAssociation(ctx, "dataCollectionRuleAssociation", &insights.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
	})
}

import pulumi
import pulumi_azure_native as azure_native

data_collection_rule_association = azure_native.insights.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")

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

const dataCollectionRuleAssociation = new azure_native.insights.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",
});

Create a DataCollectionRuleAssociation Resource

new DataCollectionRuleAssociation(name: string, args: DataCollectionRuleAssociationArgs, opts?: CustomResourceOptions);
@overload
def DataCollectionRuleAssociation(resource_name: str,
                                  opts: Optional[ResourceOptions] = None,
                                  association_name: Optional[str] = None,
                                  data_collection_rule_id: Optional[str] = None,
                                  description: Optional[str] = None,
                                  resource_uri: Optional[str] = None)
@overload
def DataCollectionRuleAssociation(resource_name: str,
                                  args: DataCollectionRuleAssociationArgs,
                                  opts: Optional[ResourceOptions] = None)
func NewDataCollectionRuleAssociation(ctx *Context, name string, args DataCollectionRuleAssociationArgs, opts ...ResourceOption) (*DataCollectionRuleAssociation, error)
public DataCollectionRuleAssociation(string name, DataCollectionRuleAssociationArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args DataCollectionRuleAssociationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args 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 string
The unique name of the resource.
args DataCollectionRuleAssociationArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args DataCollectionRuleAssociationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

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

The DataCollectionRuleAssociation resource accepts the following input properties:

ResourceUri string
The identifier of the resource.
AssociationName string
The name of the association. The name is case insensitive.
DataCollectionRuleId string
The resource ID of the data collection rule that is to be associated.
Description string
Description of the association.
ResourceUri string
The identifier of the resource.
AssociationName string
The name of the association. The name is case insensitive.
DataCollectionRuleId string
The resource ID of the data collection rule that is to be associated.
Description string
Description of the association.
resourceUri string
The identifier of the resource.
associationName string
The name of the association. The name is case insensitive.
dataCollectionRuleId string
The resource ID of the data collection rule that is to be associated.
description string
Description of the association.
resource_uri str
The identifier of the resource.
association_name str
The name of the association. The name is case insensitive.
data_collection_rule_id str
The resource ID of the data collection rule that is to be associated.
description str
Description of the association.

Outputs

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

Etag string
Resource entity tag (ETag).
Id string
The provider-assigned unique ID for this managed resource.
Name string
The name of the resource.
ProvisioningState string
The resource provisioning state.
Type string
The type of the resource.
Etag string
Resource entity tag (ETag).
Id string
The provider-assigned unique ID for this managed resource.
Name string
The name of the resource.
ProvisioningState string
The resource provisioning state.
Type string
The type of the resource.
etag string
Resource entity tag (ETag).
id string
The provider-assigned unique ID for this managed resource.
name string
The name of the resource.
provisioningState string
The resource provisioning state.
type string
The type of the resource.
etag str
Resource entity tag (ETag).
id str
The provider-assigned unique ID for this managed resource.
name str
The name of the resource.
provisioning_state str
The resource provisioning state.
type str
The type of the resource.

Import

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

$ pulumi import azure-native:insights:DataCollectionRuleAssociation myAssociation /subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVm/providers/Microsoft.Insights/dataCollectionRuleAssociations/myAssociation 

Package Details

Repository
https://github.com/pulumi/pulumi-azure-native
License
Apache-2.0