1. Packages
  2. Azure Native
  3. API Docs
  4. insights
  5. GuestDiagnosticsSettingsAssociation
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.63.0 published on Tuesday, Sep 24, 2024 by Pulumi

azure-native.insights.GuestDiagnosticsSettingsAssociation

Explore with Pulumi AI

azure-native logo
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.63.0 published on Tuesday, Sep 24, 2024 by Pulumi

    Virtual machine guest diagnostic settings resource. Azure REST API version: 2018-06-01-preview. Prior API version in Azure Native 1.x: 2018-06-01-preview.

    Example Usage

    Create or update an guest diagnostic settings association

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var guestDiagnosticsSettingsAssociation = new AzureNative.Insights.GuestDiagnosticsSettingsAssociation("guestDiagnosticsSettingsAssociation", new()
        {
            AssociationName = "healthSystemMachineConfigAssociation",
            GuestDiagnosticSettingsName = "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-Association-ResourceGroup/providers/providers/microsoft.insights/guestDiagnosticSettings/vmSettingForSecurity",
            Location = "Global",
            ResourceUri = "subscriptions/8498f01b-8064-4e37-856e-318f3c6c685f/resourceGroups/healthsystem/providers/Microsoft.Compute/virtualMachines/eastussojai",
            Tags = null,
        });
    
    });
    
    package main
    
    import (
    	insights "github.com/pulumi/pulumi-azure-native-sdk/insights/v2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := insights.NewGuestDiagnosticsSettingsAssociation(ctx, "guestDiagnosticsSettingsAssociation", &insights.GuestDiagnosticsSettingsAssociationArgs{
    			AssociationName:             pulumi.String("healthSystemMachineConfigAssociation"),
    			GuestDiagnosticSettingsName: pulumi.String("/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-Association-ResourceGroup/providers/providers/microsoft.insights/guestDiagnosticSettings/vmSettingForSecurity"),
    			Location:                    pulumi.String("Global"),
    			ResourceUri:                 pulumi.String("subscriptions/8498f01b-8064-4e37-856e-318f3c6c685f/resourceGroups/healthsystem/providers/Microsoft.Compute/virtualMachines/eastussojai"),
    			Tags:                        nil,
    		})
    		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.azurenative.insights.GuestDiagnosticsSettingsAssociation;
    import com.pulumi.azurenative.insights.GuestDiagnosticsSettingsAssociationArgs;
    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 guestDiagnosticsSettingsAssociation = new GuestDiagnosticsSettingsAssociation("guestDiagnosticsSettingsAssociation", GuestDiagnosticsSettingsAssociationArgs.builder()
                .associationName("healthSystemMachineConfigAssociation")
                .guestDiagnosticSettingsName("/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-Association-ResourceGroup/providers/providers/microsoft.insights/guestDiagnosticSettings/vmSettingForSecurity")
                .location("Global")
                .resourceUri("subscriptions/8498f01b-8064-4e37-856e-318f3c6c685f/resourceGroups/healthsystem/providers/Microsoft.Compute/virtualMachines/eastussojai")
                .tags()
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    guest_diagnostics_settings_association = azure_native.insights.GuestDiagnosticsSettingsAssociation("guestDiagnosticsSettingsAssociation",
        association_name="healthSystemMachineConfigAssociation",
        guest_diagnostic_settings_name="/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-Association-ResourceGroup/providers/providers/microsoft.insights/guestDiagnosticSettings/vmSettingForSecurity",
        location="Global",
        resource_uri="subscriptions/8498f01b-8064-4e37-856e-318f3c6c685f/resourceGroups/healthsystem/providers/Microsoft.Compute/virtualMachines/eastussojai",
        tags={})
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const guestDiagnosticsSettingsAssociation = new azure_native.insights.GuestDiagnosticsSettingsAssociation("guestDiagnosticsSettingsAssociation", {
        associationName: "healthSystemMachineConfigAssociation",
        guestDiagnosticSettingsName: "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-Association-ResourceGroup/providers/providers/microsoft.insights/guestDiagnosticSettings/vmSettingForSecurity",
        location: "Global",
        resourceUri: "subscriptions/8498f01b-8064-4e37-856e-318f3c6c685f/resourceGroups/healthsystem/providers/Microsoft.Compute/virtualMachines/eastussojai",
        tags: {},
    });
    
    resources:
      guestDiagnosticsSettingsAssociation:
        type: azure-native:insights:GuestDiagnosticsSettingsAssociation
        properties:
          associationName: healthSystemMachineConfigAssociation
          guestDiagnosticSettingsName: /subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-Association-ResourceGroup/providers/providers/microsoft.insights/guestDiagnosticSettings/vmSettingForSecurity
          location: Global
          resourceUri: subscriptions/8498f01b-8064-4e37-856e-318f3c6c685f/resourceGroups/healthsystem/providers/Microsoft.Compute/virtualMachines/eastussojai
          tags: {}
    

    Create GuestDiagnosticsSettingsAssociation Resource

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

    Constructor syntax

    new GuestDiagnosticsSettingsAssociation(name: string, args: GuestDiagnosticsSettingsAssociationArgs, opts?: CustomResourceOptions);
    @overload
    def GuestDiagnosticsSettingsAssociation(resource_name: str,
                                            args: GuestDiagnosticsSettingsAssociationArgs,
                                            opts: Optional[ResourceOptions] = None)
    
    @overload
    def GuestDiagnosticsSettingsAssociation(resource_name: str,
                                            opts: Optional[ResourceOptions] = None,
                                            guest_diagnostic_settings_name: Optional[str] = None,
                                            resource_uri: Optional[str] = None,
                                            association_name: Optional[str] = None,
                                            location: Optional[str] = None,
                                            tags: Optional[Mapping[str, str]] = None)
    func NewGuestDiagnosticsSettingsAssociation(ctx *Context, name string, args GuestDiagnosticsSettingsAssociationArgs, opts ...ResourceOption) (*GuestDiagnosticsSettingsAssociation, error)
    public GuestDiagnosticsSettingsAssociation(string name, GuestDiagnosticsSettingsAssociationArgs args, CustomResourceOptions? opts = null)
    public GuestDiagnosticsSettingsAssociation(String name, GuestDiagnosticsSettingsAssociationArgs args)
    public GuestDiagnosticsSettingsAssociation(String name, GuestDiagnosticsSettingsAssociationArgs args, CustomResourceOptions options)
    
    type: azure-native:insights:GuestDiagnosticsSettingsAssociation
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args GuestDiagnosticsSettingsAssociationArgs
    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 GuestDiagnosticsSettingsAssociationArgs
    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 GuestDiagnosticsSettingsAssociationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args GuestDiagnosticsSettingsAssociationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args GuestDiagnosticsSettingsAssociationArgs
    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 guestDiagnosticsSettingsAssociationResource = new AzureNative.Insights.GuestDiagnosticsSettingsAssociation("guestDiagnosticsSettingsAssociationResource", new()
    {
        GuestDiagnosticSettingsName = "string",
        ResourceUri = "string",
        AssociationName = "string",
        Location = "string",
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := insights.NewGuestDiagnosticsSettingsAssociation(ctx, "guestDiagnosticsSettingsAssociationResource", &insights.GuestDiagnosticsSettingsAssociationArgs{
    	GuestDiagnosticSettingsName: pulumi.String("string"),
    	ResourceUri:                 pulumi.String("string"),
    	AssociationName:             pulumi.String("string"),
    	Location:                    pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var guestDiagnosticsSettingsAssociationResource = new GuestDiagnosticsSettingsAssociation("guestDiagnosticsSettingsAssociationResource", GuestDiagnosticsSettingsAssociationArgs.builder()
        .guestDiagnosticSettingsName("string")
        .resourceUri("string")
        .associationName("string")
        .location("string")
        .tags(Map.of("string", "string"))
        .build());
    
    guest_diagnostics_settings_association_resource = azure_native.insights.GuestDiagnosticsSettingsAssociation("guestDiagnosticsSettingsAssociationResource",
        guest_diagnostic_settings_name="string",
        resource_uri="string",
        association_name="string",
        location="string",
        tags={
            "string": "string",
        })
    
    const guestDiagnosticsSettingsAssociationResource = new azure_native.insights.GuestDiagnosticsSettingsAssociation("guestDiagnosticsSettingsAssociationResource", {
        guestDiagnosticSettingsName: "string",
        resourceUri: "string",
        associationName: "string",
        location: "string",
        tags: {
            string: "string",
        },
    });
    
    type: azure-native:insights:GuestDiagnosticsSettingsAssociation
    properties:
        associationName: string
        guestDiagnosticSettingsName: string
        location: string
        resourceUri: string
        tags:
            string: string
    

    GuestDiagnosticsSettingsAssociation 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 GuestDiagnosticsSettingsAssociation resource accepts the following input properties:

    GuestDiagnosticSettingsName string
    The guest diagnostic settings name.
    ResourceUri string
    The fully qualified ID of the resource, including the resource name and resource type.
    AssociationName string
    The name of the diagnostic settings association.
    Location string
    Resource location
    Tags Dictionary<string, string>
    Resource tags
    GuestDiagnosticSettingsName string
    The guest diagnostic settings name.
    ResourceUri string
    The fully qualified ID of the resource, including the resource name and resource type.
    AssociationName string
    The name of the diagnostic settings association.
    Location string
    Resource location
    Tags map[string]string
    Resource tags
    guestDiagnosticSettingsName String
    The guest diagnostic settings name.
    resourceUri String
    The fully qualified ID of the resource, including the resource name and resource type.
    associationName String
    The name of the diagnostic settings association.
    location String
    Resource location
    tags Map<String,String>
    Resource tags
    guestDiagnosticSettingsName string
    The guest diagnostic settings name.
    resourceUri string
    The fully qualified ID of the resource, including the resource name and resource type.
    associationName string
    The name of the diagnostic settings association.
    location string
    Resource location
    tags {[key: string]: string}
    Resource tags
    guest_diagnostic_settings_name str
    The guest diagnostic settings name.
    resource_uri str
    The fully qualified ID of the resource, including the resource name and resource type.
    association_name str
    The name of the diagnostic settings association.
    location str
    Resource location
    tags Mapping[str, str]
    Resource tags
    guestDiagnosticSettingsName String
    The guest diagnostic settings name.
    resourceUri String
    The fully qualified ID of the resource, including the resource name and resource type.
    associationName String
    The name of the diagnostic settings association.
    location String
    Resource location
    tags Map<String>
    Resource tags

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Azure resource name
    Type string
    Azure resource type
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Azure resource name
    Type string
    Azure resource type
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    Azure resource name
    type String
    Azure resource type
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    Azure resource name
    type string
    Azure resource type
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    Azure resource name
    type str
    Azure resource type
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    Azure resource name
    type String
    Azure resource type

    Import

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

    $ pulumi import azure-native:insights:GuestDiagnosticsSettingsAssociation healthSystemMachineConfigAssociation /{resourceUri}/providers/microsoft.insights/guestDiagnosticSettingsAssociation/{associationName} 
    

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

    Package Details

    Repository
    Azure Native pulumi/pulumi-azure-native
    License
    Apache-2.0
    azure-native logo
    This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
    Azure Native v2.63.0 published on Tuesday, Sep 24, 2024 by Pulumi