We recommend using Azure Native.
azure.monitoring.DataCollectionRuleAssociation
Explore with Pulumi AI
Manages a Data Collection Rule Association.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new()
{
Location = "West Europe",
});
var exampleVirtualNetwork = new Azure.Network.VirtualNetwork("exampleVirtualNetwork", new()
{
AddressSpaces = new[]
{
"10.0.0.0/16",
},
Location = exampleResourceGroup.Location,
ResourceGroupName = exampleResourceGroup.Name,
});
var exampleSubnet = new Azure.Network.Subnet("exampleSubnet", new()
{
ResourceGroupName = exampleResourceGroup.Name,
VirtualNetworkName = exampleVirtualNetwork.Name,
AddressPrefixes = new[]
{
"10.0.2.0/24",
},
});
var exampleNetworkInterface = new Azure.Network.NetworkInterface("exampleNetworkInterface", new()
{
Location = exampleResourceGroup.Location,
ResourceGroupName = exampleResourceGroup.Name,
IpConfigurations = new[]
{
new Azure.Network.Inputs.NetworkInterfaceIpConfigurationArgs
{
Name = "internal",
SubnetId = exampleSubnet.Id,
PrivateIpAddressAllocation = "Dynamic",
},
},
});
var exampleLinuxVirtualMachine = new Azure.Compute.LinuxVirtualMachine("exampleLinuxVirtualMachine", new()
{
ResourceGroupName = exampleResourceGroup.Name,
Location = exampleResourceGroup.Location,
Size = "Standard_B1ls",
AdminUsername = "adminuser",
NetworkInterfaceIds = new[]
{
exampleNetworkInterface.Id,
},
AdminPassword = "example-Password@7890",
DisablePasswordAuthentication = false,
OsDisk = new Azure.Compute.Inputs.LinuxVirtualMachineOsDiskArgs
{
Caching = "ReadWrite",
StorageAccountType = "Standard_LRS",
},
SourceImageReference = new Azure.Compute.Inputs.LinuxVirtualMachineSourceImageReferenceArgs
{
Publisher = "Canonical",
Offer = "0001-com-ubuntu-server-jammy",
Sku = "22_04-lts",
Version = "latest",
},
});
var exampleDataCollectionRule = new Azure.Monitoring.DataCollectionRule("exampleDataCollectionRule", new()
{
ResourceGroupName = exampleResourceGroup.Name,
Location = exampleResourceGroup.Location,
Destinations = new Azure.Monitoring.Inputs.DataCollectionRuleDestinationsArgs
{
AzureMonitorMetrics = new Azure.Monitoring.Inputs.DataCollectionRuleDestinationsAzureMonitorMetricsArgs
{
Name = "example-destination-metrics",
},
},
DataFlows = new[]
{
new Azure.Monitoring.Inputs.DataCollectionRuleDataFlowArgs
{
Streams = new[]
{
"Microsoft-InsightsMetrics",
},
Destinations = new[]
{
"example-destination-metrics",
},
},
},
});
var exampleDataCollectionEndpoint = new Azure.Monitoring.DataCollectionEndpoint("exampleDataCollectionEndpoint", new()
{
ResourceGroupName = exampleResourceGroup.Name,
Location = exampleResourceGroup.Location,
});
// associate to a Data Collection Rule
var example1 = new Azure.Monitoring.DataCollectionRuleAssociation("example1", new()
{
TargetResourceId = exampleLinuxVirtualMachine.Id,
DataCollectionRuleId = exampleDataCollectionRule.Id,
Description = "example",
});
// associate to a Data Collection Endpoint
var example2 = new Azure.Monitoring.DataCollectionRuleAssociation("example2", new()
{
TargetResourceId = exampleLinuxVirtualMachine.Id,
DataCollectionEndpointId = exampleDataCollectionEndpoint.Id,
Description = "example",
});
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/compute"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/monitoring"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/network"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "exampleVirtualNetwork", &network.VirtualNetworkArgs{
AddressSpaces: pulumi.StringArray{
pulumi.String("10.0.0.0/16"),
},
Location: exampleResourceGroup.Location,
ResourceGroupName: exampleResourceGroup.Name,
})
if err != nil {
return err
}
exampleSubnet, err := network.NewSubnet(ctx, "exampleSubnet", &network.SubnetArgs{
ResourceGroupName: exampleResourceGroup.Name,
VirtualNetworkName: exampleVirtualNetwork.Name,
AddressPrefixes: pulumi.StringArray{
pulumi.String("10.0.2.0/24"),
},
})
if err != nil {
return err
}
exampleNetworkInterface, err := network.NewNetworkInterface(ctx, "exampleNetworkInterface", &network.NetworkInterfaceArgs{
Location: exampleResourceGroup.Location,
ResourceGroupName: exampleResourceGroup.Name,
IpConfigurations: network.NetworkInterfaceIpConfigurationArray{
&network.NetworkInterfaceIpConfigurationArgs{
Name: pulumi.String("internal"),
SubnetId: exampleSubnet.ID(),
PrivateIpAddressAllocation: pulumi.String("Dynamic"),
},
},
})
if err != nil {
return err
}
exampleLinuxVirtualMachine, err := compute.NewLinuxVirtualMachine(ctx, "exampleLinuxVirtualMachine", &compute.LinuxVirtualMachineArgs{
ResourceGroupName: exampleResourceGroup.Name,
Location: exampleResourceGroup.Location,
Size: pulumi.String("Standard_B1ls"),
AdminUsername: pulumi.String("adminuser"),
NetworkInterfaceIds: pulumi.StringArray{
exampleNetworkInterface.ID(),
},
AdminPassword: pulumi.String("example-Password@7890"),
DisablePasswordAuthentication: pulumi.Bool(false),
OsDisk: &compute.LinuxVirtualMachineOsDiskArgs{
Caching: pulumi.String("ReadWrite"),
StorageAccountType: pulumi.String("Standard_LRS"),
},
SourceImageReference: &compute.LinuxVirtualMachineSourceImageReferenceArgs{
Publisher: pulumi.String("Canonical"),
Offer: pulumi.String("0001-com-ubuntu-server-jammy"),
Sku: pulumi.String("22_04-lts"),
Version: pulumi.String("latest"),
},
})
if err != nil {
return err
}
exampleDataCollectionRule, err := monitoring.NewDataCollectionRule(ctx, "exampleDataCollectionRule", &monitoring.DataCollectionRuleArgs{
ResourceGroupName: exampleResourceGroup.Name,
Location: exampleResourceGroup.Location,
Destinations: &monitoring.DataCollectionRuleDestinationsArgs{
AzureMonitorMetrics: &monitoring.DataCollectionRuleDestinationsAzureMonitorMetricsArgs{
Name: pulumi.String("example-destination-metrics"),
},
},
DataFlows: monitoring.DataCollectionRuleDataFlowArray{
&monitoring.DataCollectionRuleDataFlowArgs{
Streams: pulumi.StringArray{
pulumi.String("Microsoft-InsightsMetrics"),
},
Destinations: pulumi.StringArray{
pulumi.String("example-destination-metrics"),
},
},
},
})
if err != nil {
return err
}
exampleDataCollectionEndpoint, err := monitoring.NewDataCollectionEndpoint(ctx, "exampleDataCollectionEndpoint", &monitoring.DataCollectionEndpointArgs{
ResourceGroupName: exampleResourceGroup.Name,
Location: exampleResourceGroup.Location,
})
if err != nil {
return err
}
_, err = monitoring.NewDataCollectionRuleAssociation(ctx, "example1", &monitoring.DataCollectionRuleAssociationArgs{
TargetResourceId: exampleLinuxVirtualMachine.ID(),
DataCollectionRuleId: exampleDataCollectionRule.ID(),
Description: pulumi.String("example"),
})
if err != nil {
return err
}
_, err = monitoring.NewDataCollectionRuleAssociation(ctx, "example2", &monitoring.DataCollectionRuleAssociationArgs{
TargetResourceId: exampleLinuxVirtualMachine.ID(),
DataCollectionEndpointId: exampleDataCollectionEndpoint.ID(),
Description: pulumi.String("example"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.network.VirtualNetwork;
import com.pulumi.azure.network.VirtualNetworkArgs;
import com.pulumi.azure.network.Subnet;
import com.pulumi.azure.network.SubnetArgs;
import com.pulumi.azure.network.NetworkInterface;
import com.pulumi.azure.network.NetworkInterfaceArgs;
import com.pulumi.azure.network.inputs.NetworkInterfaceIpConfigurationArgs;
import com.pulumi.azure.compute.LinuxVirtualMachine;
import com.pulumi.azure.compute.LinuxVirtualMachineArgs;
import com.pulumi.azure.compute.inputs.LinuxVirtualMachineOsDiskArgs;
import com.pulumi.azure.compute.inputs.LinuxVirtualMachineSourceImageReferenceArgs;
import com.pulumi.azure.monitoring.DataCollectionRule;
import com.pulumi.azure.monitoring.DataCollectionRuleArgs;
import com.pulumi.azure.monitoring.inputs.DataCollectionRuleDestinationsArgs;
import com.pulumi.azure.monitoring.inputs.DataCollectionRuleDestinationsAzureMonitorMetricsArgs;
import com.pulumi.azure.monitoring.inputs.DataCollectionRuleDataFlowArgs;
import com.pulumi.azure.monitoring.DataCollectionEndpoint;
import com.pulumi.azure.monitoring.DataCollectionEndpointArgs;
import com.pulumi.azure.monitoring.DataCollectionRuleAssociation;
import com.pulumi.azure.monitoring.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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()
.addressSpaces("10.0.0.0/16")
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.build());
var exampleSubnet = new Subnet("exampleSubnet", SubnetArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.virtualNetworkName(exampleVirtualNetwork.name())
.addressPrefixes("10.0.2.0/24")
.build());
var exampleNetworkInterface = new NetworkInterface("exampleNetworkInterface", NetworkInterfaceArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.ipConfigurations(NetworkInterfaceIpConfigurationArgs.builder()
.name("internal")
.subnetId(exampleSubnet.id())
.privateIpAddressAllocation("Dynamic")
.build())
.build());
var exampleLinuxVirtualMachine = new LinuxVirtualMachine("exampleLinuxVirtualMachine", LinuxVirtualMachineArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.size("Standard_B1ls")
.adminUsername("adminuser")
.networkInterfaceIds(exampleNetworkInterface.id())
.adminPassword("example-Password@7890")
.disablePasswordAuthentication(false)
.osDisk(LinuxVirtualMachineOsDiskArgs.builder()
.caching("ReadWrite")
.storageAccountType("Standard_LRS")
.build())
.sourceImageReference(LinuxVirtualMachineSourceImageReferenceArgs.builder()
.publisher("Canonical")
.offer("0001-com-ubuntu-server-jammy")
.sku("22_04-lts")
.version("latest")
.build())
.build());
var exampleDataCollectionRule = new DataCollectionRule("exampleDataCollectionRule", DataCollectionRuleArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.destinations(DataCollectionRuleDestinationsArgs.builder()
.azureMonitorMetrics(DataCollectionRuleDestinationsAzureMonitorMetricsArgs.builder()
.name("example-destination-metrics")
.build())
.build())
.dataFlows(DataCollectionRuleDataFlowArgs.builder()
.streams("Microsoft-InsightsMetrics")
.destinations("example-destination-metrics")
.build())
.build());
var exampleDataCollectionEndpoint = new DataCollectionEndpoint("exampleDataCollectionEndpoint", DataCollectionEndpointArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.build());
var example1 = new DataCollectionRuleAssociation("example1", DataCollectionRuleAssociationArgs.builder()
.targetResourceId(exampleLinuxVirtualMachine.id())
.dataCollectionRuleId(exampleDataCollectionRule.id())
.description("example")
.build());
var example2 = new DataCollectionRuleAssociation("example2", DataCollectionRuleAssociationArgs.builder()
.targetResourceId(exampleLinuxVirtualMachine.id())
.dataCollectionEndpointId(exampleDataCollectionEndpoint.id())
.description("example")
.build());
}
}
import pulumi
import pulumi_azure as azure
example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_virtual_network = azure.network.VirtualNetwork("exampleVirtualNetwork",
address_spaces=["10.0.0.0/16"],
location=example_resource_group.location,
resource_group_name=example_resource_group.name)
example_subnet = azure.network.Subnet("exampleSubnet",
resource_group_name=example_resource_group.name,
virtual_network_name=example_virtual_network.name,
address_prefixes=["10.0.2.0/24"])
example_network_interface = azure.network.NetworkInterface("exampleNetworkInterface",
location=example_resource_group.location,
resource_group_name=example_resource_group.name,
ip_configurations=[azure.network.NetworkInterfaceIpConfigurationArgs(
name="internal",
subnet_id=example_subnet.id,
private_ip_address_allocation="Dynamic",
)])
example_linux_virtual_machine = azure.compute.LinuxVirtualMachine("exampleLinuxVirtualMachine",
resource_group_name=example_resource_group.name,
location=example_resource_group.location,
size="Standard_B1ls",
admin_username="adminuser",
network_interface_ids=[example_network_interface.id],
admin_password="example-Password@7890",
disable_password_authentication=False,
os_disk=azure.compute.LinuxVirtualMachineOsDiskArgs(
caching="ReadWrite",
storage_account_type="Standard_LRS",
),
source_image_reference=azure.compute.LinuxVirtualMachineSourceImageReferenceArgs(
publisher="Canonical",
offer="0001-com-ubuntu-server-jammy",
sku="22_04-lts",
version="latest",
))
example_data_collection_rule = azure.monitoring.DataCollectionRule("exampleDataCollectionRule",
resource_group_name=example_resource_group.name,
location=example_resource_group.location,
destinations=azure.monitoring.DataCollectionRuleDestinationsArgs(
azure_monitor_metrics=azure.monitoring.DataCollectionRuleDestinationsAzureMonitorMetricsArgs(
name="example-destination-metrics",
),
),
data_flows=[azure.monitoring.DataCollectionRuleDataFlowArgs(
streams=["Microsoft-InsightsMetrics"],
destinations=["example-destination-metrics"],
)])
example_data_collection_endpoint = azure.monitoring.DataCollectionEndpoint("exampleDataCollectionEndpoint",
resource_group_name=example_resource_group.name,
location=example_resource_group.location)
# associate to a Data Collection Rule
example1 = azure.monitoring.DataCollectionRuleAssociation("example1",
target_resource_id=example_linux_virtual_machine.id,
data_collection_rule_id=example_data_collection_rule.id,
description="example")
# associate to a Data Collection Endpoint
example2 = azure.monitoring.DataCollectionRuleAssociation("example2",
target_resource_id=example_linux_virtual_machine.id,
data_collection_endpoint_id=example_data_collection_endpoint.id,
description="example")
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const exampleVirtualNetwork = new azure.network.VirtualNetwork("exampleVirtualNetwork", {
addressSpaces: ["10.0.0.0/16"],
location: exampleResourceGroup.location,
resourceGroupName: exampleResourceGroup.name,
});
const exampleSubnet = new azure.network.Subnet("exampleSubnet", {
resourceGroupName: exampleResourceGroup.name,
virtualNetworkName: exampleVirtualNetwork.name,
addressPrefixes: ["10.0.2.0/24"],
});
const exampleNetworkInterface = new azure.network.NetworkInterface("exampleNetworkInterface", {
location: exampleResourceGroup.location,
resourceGroupName: exampleResourceGroup.name,
ipConfigurations: [{
name: "internal",
subnetId: exampleSubnet.id,
privateIpAddressAllocation: "Dynamic",
}],
});
const exampleLinuxVirtualMachine = new azure.compute.LinuxVirtualMachine("exampleLinuxVirtualMachine", {
resourceGroupName: exampleResourceGroup.name,
location: exampleResourceGroup.location,
size: "Standard_B1ls",
adminUsername: "adminuser",
networkInterfaceIds: [exampleNetworkInterface.id],
adminPassword: "example-Password@7890",
disablePasswordAuthentication: false,
osDisk: {
caching: "ReadWrite",
storageAccountType: "Standard_LRS",
},
sourceImageReference: {
publisher: "Canonical",
offer: "0001-com-ubuntu-server-jammy",
sku: "22_04-lts",
version: "latest",
},
});
const exampleDataCollectionRule = new azure.monitoring.DataCollectionRule("exampleDataCollectionRule", {
resourceGroupName: exampleResourceGroup.name,
location: exampleResourceGroup.location,
destinations: {
azureMonitorMetrics: {
name: "example-destination-metrics",
},
},
dataFlows: [{
streams: ["Microsoft-InsightsMetrics"],
destinations: ["example-destination-metrics"],
}],
});
const exampleDataCollectionEndpoint = new azure.monitoring.DataCollectionEndpoint("exampleDataCollectionEndpoint", {
resourceGroupName: exampleResourceGroup.name,
location: exampleResourceGroup.location,
});
// associate to a Data Collection Rule
const example1 = new azure.monitoring.DataCollectionRuleAssociation("example1", {
targetResourceId: exampleLinuxVirtualMachine.id,
dataCollectionRuleId: exampleDataCollectionRule.id,
description: "example",
});
// associate to a Data Collection Endpoint
const example2 = new azure.monitoring.DataCollectionRuleAssociation("example2", {
targetResourceId: exampleLinuxVirtualMachine.id,
dataCollectionEndpointId: exampleDataCollectionEndpoint.id,
description: "example",
});
resources:
exampleResourceGroup:
type: azure:core:ResourceGroup
properties:
location: West Europe
exampleVirtualNetwork:
type: azure:network:VirtualNetwork
properties:
addressSpaces:
- 10.0.0.0/16
location: ${exampleResourceGroup.location}
resourceGroupName: ${exampleResourceGroup.name}
exampleSubnet:
type: azure:network:Subnet
properties:
resourceGroupName: ${exampleResourceGroup.name}
virtualNetworkName: ${exampleVirtualNetwork.name}
addressPrefixes:
- 10.0.2.0/24
exampleNetworkInterface:
type: azure:network:NetworkInterface
properties:
location: ${exampleResourceGroup.location}
resourceGroupName: ${exampleResourceGroup.name}
ipConfigurations:
- name: internal
subnetId: ${exampleSubnet.id}
privateIpAddressAllocation: Dynamic
exampleLinuxVirtualMachine:
type: azure:compute:LinuxVirtualMachine
properties:
resourceGroupName: ${exampleResourceGroup.name}
location: ${exampleResourceGroup.location}
size: Standard_B1ls
adminUsername: adminuser
networkInterfaceIds:
- ${exampleNetworkInterface.id}
adminPassword: example-Password@7890
disablePasswordAuthentication: false
osDisk:
caching: ReadWrite
storageAccountType: Standard_LRS
sourceImageReference:
publisher: Canonical
offer: 0001-com-ubuntu-server-jammy
sku: 22_04-lts
version: latest
exampleDataCollectionRule:
type: azure:monitoring:DataCollectionRule
properties:
resourceGroupName: ${exampleResourceGroup.name}
location: ${exampleResourceGroup.location}
destinations:
azureMonitorMetrics:
name: example-destination-metrics
dataFlows:
- streams:
- Microsoft-InsightsMetrics
destinations:
- example-destination-metrics
exampleDataCollectionEndpoint:
type: azure:monitoring:DataCollectionEndpoint
properties:
resourceGroupName: ${exampleResourceGroup.name}
location: ${exampleResourceGroup.location}
# associate to a Data Collection Rule
example1:
type: azure:monitoring:DataCollectionRuleAssociation
properties:
targetResourceId: ${exampleLinuxVirtualMachine.id}
dataCollectionRuleId: ${exampleDataCollectionRule.id}
description: example
# associate to a Data Collection Endpoint
example2:
type: azure:monitoring:DataCollectionRuleAssociation
properties:
targetResourceId: ${exampleLinuxVirtualMachine.id}
dataCollectionEndpointId: ${exampleDataCollectionEndpoint.id}
description: example
Create DataCollectionRuleAssociation Resource
new DataCollectionRuleAssociation(name: string, args: DataCollectionRuleAssociationArgs, opts?: CustomResourceOptions);
@overload
def DataCollectionRuleAssociation(resource_name: str,
opts: Optional[ResourceOptions] = None,
data_collection_endpoint_id: Optional[str] = None,
data_collection_rule_id: Optional[str] = None,
description: Optional[str] = None,
name: Optional[str] = None,
target_resource_id: 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)
public DataCollectionRuleAssociation(String name, DataCollectionRuleAssociationArgs args)
public DataCollectionRuleAssociation(String name, DataCollectionRuleAssociationArgs args, CustomResourceOptions options)
type: azure:monitoring:DataCollectionRuleAssociation
properties: # The arguments to resource properties.
options: # 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.
- 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.
- name String
- The unique name of the resource.
- args DataCollectionRuleAssociationArgs
- The arguments to resource properties.
- options 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:
- Target
Resource stringId The ID of the Azure Resource which to associate to a Data Collection Rule or a Data Collection Endpoint. Changing this forces a new resource to be created.
- Data
Collection stringEndpoint Id The ID of the Data Collection Endpoint which will be associated to the target resource.
- Data
Collection stringRule Id The ID of the Data Collection Rule which will be associated to the target resource.
NOTE Exactly one of
data_collection_endpoint_id
anddata_collection_rule_id
blocks must be specified.- Description string
The description of the Data Collection Rule Association.
- Name string
The name which should be used for this Data Collection Rule Association. Changing this forces a new Data Collection Rule Association to be created. Defaults to
configurationAccessEndpoint
.NOTE
name
is required whendata_collection_rule_id
is specified. And whendata_collection_endpoint_id
is specified, thename
is populated withconfigurationAccessEndpoint
.
- Target
Resource stringId The ID of the Azure Resource which to associate to a Data Collection Rule or a Data Collection Endpoint. Changing this forces a new resource to be created.
- Data
Collection stringEndpoint Id The ID of the Data Collection Endpoint which will be associated to the target resource.
- Data
Collection stringRule Id The ID of the Data Collection Rule which will be associated to the target resource.
NOTE Exactly one of
data_collection_endpoint_id
anddata_collection_rule_id
blocks must be specified.- Description string
The description of the Data Collection Rule Association.
- Name string
The name which should be used for this Data Collection Rule Association. Changing this forces a new Data Collection Rule Association to be created. Defaults to
configurationAccessEndpoint
.NOTE
name
is required whendata_collection_rule_id
is specified. And whendata_collection_endpoint_id
is specified, thename
is populated withconfigurationAccessEndpoint
.
- target
Resource StringId The ID of the Azure Resource which to associate to a Data Collection Rule or a Data Collection Endpoint. Changing this forces a new resource to be created.
- data
Collection StringEndpoint Id The ID of the Data Collection Endpoint which will be associated to the target resource.
- data
Collection StringRule Id The ID of the Data Collection Rule which will be associated to the target resource.
NOTE Exactly one of
data_collection_endpoint_id
anddata_collection_rule_id
blocks must be specified.- description String
The description of the Data Collection Rule Association.
- name String
The name which should be used for this Data Collection Rule Association. Changing this forces a new Data Collection Rule Association to be created. Defaults to
configurationAccessEndpoint
.NOTE
name
is required whendata_collection_rule_id
is specified. And whendata_collection_endpoint_id
is specified, thename
is populated withconfigurationAccessEndpoint
.
- target
Resource stringId The ID of the Azure Resource which to associate to a Data Collection Rule or a Data Collection Endpoint. Changing this forces a new resource to be created.
- data
Collection stringEndpoint Id The ID of the Data Collection Endpoint which will be associated to the target resource.
- data
Collection stringRule Id The ID of the Data Collection Rule which will be associated to the target resource.
NOTE Exactly one of
data_collection_endpoint_id
anddata_collection_rule_id
blocks must be specified.- description string
The description of the Data Collection Rule Association.
- name string
The name which should be used for this Data Collection Rule Association. Changing this forces a new Data Collection Rule Association to be created. Defaults to
configurationAccessEndpoint
.NOTE
name
is required whendata_collection_rule_id
is specified. And whendata_collection_endpoint_id
is specified, thename
is populated withconfigurationAccessEndpoint
.
- target_
resource_ strid The ID of the Azure Resource which to associate to a Data Collection Rule or a Data Collection Endpoint. Changing this forces a new resource to be created.
- data_
collection_ strendpoint_ id The ID of the Data Collection Endpoint which will be associated to the target resource.
- data_
collection_ strrule_ id The ID of the Data Collection Rule which will be associated to the target resource.
NOTE Exactly one of
data_collection_endpoint_id
anddata_collection_rule_id
blocks must be specified.- description str
The description of the Data Collection Rule Association.
- name str
The name which should be used for this Data Collection Rule Association. Changing this forces a new Data Collection Rule Association to be created. Defaults to
configurationAccessEndpoint
.NOTE
name
is required whendata_collection_rule_id
is specified. And whendata_collection_endpoint_id
is specified, thename
is populated withconfigurationAccessEndpoint
.
- target
Resource StringId The ID of the Azure Resource which to associate to a Data Collection Rule or a Data Collection Endpoint. Changing this forces a new resource to be created.
- data
Collection StringEndpoint Id The ID of the Data Collection Endpoint which will be associated to the target resource.
- data
Collection StringRule Id The ID of the Data Collection Rule which will be associated to the target resource.
NOTE Exactly one of
data_collection_endpoint_id
anddata_collection_rule_id
blocks must be specified.- description String
The description of the Data Collection Rule Association.
- name String
The name which should be used for this Data Collection Rule Association. Changing this forces a new Data Collection Rule Association to be created. Defaults to
configurationAccessEndpoint
.NOTE
name
is required whendata_collection_rule_id
is specified. And whendata_collection_endpoint_id
is specified, thename
is populated withconfigurationAccessEndpoint
.
Outputs
All input properties are implicitly available as output properties. Additionally, the DataCollectionRuleAssociation resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
- Id string
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
- id string
The provider-assigned unique ID for this managed resource.
- id str
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
Look up Existing DataCollectionRuleAssociation Resource
Get an existing DataCollectionRuleAssociation resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: DataCollectionRuleAssociationState, opts?: CustomResourceOptions): DataCollectionRuleAssociation
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
data_collection_endpoint_id: Optional[str] = None,
data_collection_rule_id: Optional[str] = None,
description: Optional[str] = None,
name: Optional[str] = None,
target_resource_id: Optional[str] = None) -> DataCollectionRuleAssociation
func GetDataCollectionRuleAssociation(ctx *Context, name string, id IDInput, state *DataCollectionRuleAssociationState, opts ...ResourceOption) (*DataCollectionRuleAssociation, error)
public static DataCollectionRuleAssociation Get(string name, Input<string> id, DataCollectionRuleAssociationState? state, CustomResourceOptions? opts = null)
public static DataCollectionRuleAssociation get(String name, Output<String> id, DataCollectionRuleAssociationState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Data
Collection stringEndpoint Id The ID of the Data Collection Endpoint which will be associated to the target resource.
- Data
Collection stringRule Id The ID of the Data Collection Rule which will be associated to the target resource.
NOTE Exactly one of
data_collection_endpoint_id
anddata_collection_rule_id
blocks must be specified.- Description string
The description of the Data Collection Rule Association.
- Name string
The name which should be used for this Data Collection Rule Association. Changing this forces a new Data Collection Rule Association to be created. Defaults to
configurationAccessEndpoint
.NOTE
name
is required whendata_collection_rule_id
is specified. And whendata_collection_endpoint_id
is specified, thename
is populated withconfigurationAccessEndpoint
.- Target
Resource stringId The ID of the Azure Resource which to associate to a Data Collection Rule or a Data Collection Endpoint. Changing this forces a new resource to be created.
- Data
Collection stringEndpoint Id The ID of the Data Collection Endpoint which will be associated to the target resource.
- Data
Collection stringRule Id The ID of the Data Collection Rule which will be associated to the target resource.
NOTE Exactly one of
data_collection_endpoint_id
anddata_collection_rule_id
blocks must be specified.- Description string
The description of the Data Collection Rule Association.
- Name string
The name which should be used for this Data Collection Rule Association. Changing this forces a new Data Collection Rule Association to be created. Defaults to
configurationAccessEndpoint
.NOTE
name
is required whendata_collection_rule_id
is specified. And whendata_collection_endpoint_id
is specified, thename
is populated withconfigurationAccessEndpoint
.- Target
Resource stringId The ID of the Azure Resource which to associate to a Data Collection Rule or a Data Collection Endpoint. Changing this forces a new resource to be created.
- data
Collection StringEndpoint Id The ID of the Data Collection Endpoint which will be associated to the target resource.
- data
Collection StringRule Id The ID of the Data Collection Rule which will be associated to the target resource.
NOTE Exactly one of
data_collection_endpoint_id
anddata_collection_rule_id
blocks must be specified.- description String
The description of the Data Collection Rule Association.
- name String
The name which should be used for this Data Collection Rule Association. Changing this forces a new Data Collection Rule Association to be created. Defaults to
configurationAccessEndpoint
.NOTE
name
is required whendata_collection_rule_id
is specified. And whendata_collection_endpoint_id
is specified, thename
is populated withconfigurationAccessEndpoint
.- target
Resource StringId The ID of the Azure Resource which to associate to a Data Collection Rule or a Data Collection Endpoint. Changing this forces a new resource to be created.
- data
Collection stringEndpoint Id The ID of the Data Collection Endpoint which will be associated to the target resource.
- data
Collection stringRule Id The ID of the Data Collection Rule which will be associated to the target resource.
NOTE Exactly one of
data_collection_endpoint_id
anddata_collection_rule_id
blocks must be specified.- description string
The description of the Data Collection Rule Association.
- name string
The name which should be used for this Data Collection Rule Association. Changing this forces a new Data Collection Rule Association to be created. Defaults to
configurationAccessEndpoint
.NOTE
name
is required whendata_collection_rule_id
is specified. And whendata_collection_endpoint_id
is specified, thename
is populated withconfigurationAccessEndpoint
.- target
Resource stringId The ID of the Azure Resource which to associate to a Data Collection Rule or a Data Collection Endpoint. Changing this forces a new resource to be created.
- data_
collection_ strendpoint_ id The ID of the Data Collection Endpoint which will be associated to the target resource.
- data_
collection_ strrule_ id The ID of the Data Collection Rule which will be associated to the target resource.
NOTE Exactly one of
data_collection_endpoint_id
anddata_collection_rule_id
blocks must be specified.- description str
The description of the Data Collection Rule Association.
- name str
The name which should be used for this Data Collection Rule Association. Changing this forces a new Data Collection Rule Association to be created. Defaults to
configurationAccessEndpoint
.NOTE
name
is required whendata_collection_rule_id
is specified. And whendata_collection_endpoint_id
is specified, thename
is populated withconfigurationAccessEndpoint
.- target_
resource_ strid The ID of the Azure Resource which to associate to a Data Collection Rule or a Data Collection Endpoint. Changing this forces a new resource to be created.
- data
Collection StringEndpoint Id The ID of the Data Collection Endpoint which will be associated to the target resource.
- data
Collection StringRule Id The ID of the Data Collection Rule which will be associated to the target resource.
NOTE Exactly one of
data_collection_endpoint_id
anddata_collection_rule_id
blocks must be specified.- description String
The description of the Data Collection Rule Association.
- name String
The name which should be used for this Data Collection Rule Association. Changing this forces a new Data Collection Rule Association to be created. Defaults to
configurationAccessEndpoint
.NOTE
name
is required whendata_collection_rule_id
is specified. And whendata_collection_endpoint_id
is specified, thename
is populated withconfigurationAccessEndpoint
.- target
Resource StringId The ID of the Azure Resource which to associate to a Data Collection Rule or a Data Collection Endpoint. Changing this forces a new resource to be created.
Import
Data Collection Rules Association can be imported using the resource id
, e.g.
$ pulumi import azure:monitoring/dataCollectionRuleAssociation:DataCollectionRuleAssociation example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/vm1/providers/Microsoft.Insights/dataCollectionRuleAssociations/dca1
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
azurerm
Terraform Provider.