1. Packages
  2. Azure Classic
  3. API Docs
  4. datadog
  5. Monitor

We recommend using Azure Native.

Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi

azure.datadog.Monitor

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi

    Manages a datadog Monitor.

    Example Usage

    Monitor creation with linking to Datadog organization

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = new azure.core.ResourceGroup("example", {
        name: "example-datadog",
        location: "West US 2",
    });
    const exampleMonitor = new azure.datadog.Monitor("example", {
        name: "example-monitor",
        resourceGroupName: example.name,
        location: example.location,
        datadogOrganization: {
            apiKey: "XXXX",
            applicationKey: "XXXX",
        },
        user: {
            name: "Example",
            email: "abc@xyz.com",
        },
        skuName: "Linked",
        identity: {
            type: "SystemAssigned",
        },
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.core.ResourceGroup("example",
        name="example-datadog",
        location="West US 2")
    example_monitor = azure.datadog.Monitor("example",
        name="example-monitor",
        resource_group_name=example.name,
        location=example.location,
        datadog_organization=azure.datadog.MonitorDatadogOrganizationArgs(
            api_key="XXXX",
            application_key="XXXX",
        ),
        user=azure.datadog.MonitorUserArgs(
            name="Example",
            email="abc@xyz.com",
        ),
        sku_name="Linked",
        identity=azure.datadog.MonitorIdentityArgs(
            type="SystemAssigned",
        ))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/datadog"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
    			Name:     pulumi.String("example-datadog"),
    			Location: pulumi.String("West US 2"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = datadog.NewMonitor(ctx, "example", &datadog.MonitorArgs{
    			Name:              pulumi.String("example-monitor"),
    			ResourceGroupName: example.Name,
    			Location:          example.Location,
    			DatadogOrganization: &datadog.MonitorDatadogOrganizationArgs{
    				ApiKey:         pulumi.String("XXXX"),
    				ApplicationKey: pulumi.String("XXXX"),
    			},
    			User: &datadog.MonitorUserArgs{
    				Name:  pulumi.String("Example"),
    				Email: pulumi.String("abc@xyz.com"),
    			},
    			SkuName: pulumi.String("Linked"),
    			Identity: &datadog.MonitorIdentityArgs{
    				Type: pulumi.String("SystemAssigned"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Azure.Core.ResourceGroup("example", new()
        {
            Name = "example-datadog",
            Location = "West US 2",
        });
    
        var exampleMonitor = new Azure.Datadog.Monitor("example", new()
        {
            Name = "example-monitor",
            ResourceGroupName = example.Name,
            Location = example.Location,
            DatadogOrganization = new Azure.Datadog.Inputs.MonitorDatadogOrganizationArgs
            {
                ApiKey = "XXXX",
                ApplicationKey = "XXXX",
            },
            User = new Azure.Datadog.Inputs.MonitorUserArgs
            {
                Name = "Example",
                Email = "abc@xyz.com",
            },
            SkuName = "Linked",
            Identity = new Azure.Datadog.Inputs.MonitorIdentityArgs
            {
                Type = "SystemAssigned",
            },
        });
    
    });
    
    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.datadog.Monitor;
    import com.pulumi.azure.datadog.MonitorArgs;
    import com.pulumi.azure.datadog.inputs.MonitorDatadogOrganizationArgs;
    import com.pulumi.azure.datadog.inputs.MonitorUserArgs;
    import com.pulumi.azure.datadog.inputs.MonitorIdentityArgs;
    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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
                .name("example-datadog")
                .location("West US 2")
                .build());
    
            var exampleMonitor = new Monitor("exampleMonitor", MonitorArgs.builder()
                .name("example-monitor")
                .resourceGroupName(example.name())
                .location(example.location())
                .datadogOrganization(MonitorDatadogOrganizationArgs.builder()
                    .apiKey("XXXX")
                    .applicationKey("XXXX")
                    .build())
                .user(MonitorUserArgs.builder()
                    .name("Example")
                    .email("abc@xyz.com")
                    .build())
                .skuName("Linked")
                .identity(MonitorIdentityArgs.builder()
                    .type("SystemAssigned")
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: azure:core:ResourceGroup
        properties:
          name: example-datadog
          location: West US 2
      exampleMonitor:
        type: azure:datadog:Monitor
        name: example
        properties:
          name: example-monitor
          resourceGroupName: ${example.name}
          location: ${example.location}
          datadogOrganization:
            apiKey: XXXX
            applicationKey: XXXX
          user:
            name: Example
            email: abc@xyz.com
          skuName: Linked
          identity:
            type: SystemAssigned
    

    Role Assignment

    To enable metrics flow, perform role assignment on the identity created above. Monitoring reader(43d0d8ad-25c7-4714-9337-8ba259a9fe05) role is required .

    Role assignment on the monitor created

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const primary = azure.core.getSubscription({});
    const monitoringReader = azure.authorization.getRoleDefinition({
        name: "Monitoring Reader",
    });
    const example = new azure.authorization.Assignment("example", {
        scope: primary.then(primary => primary.id),
        roleDefinitionId: monitoringReader.then(monitoringReader => monitoringReader.roleDefinitionId),
        principalId: exampleAzurermDatadogMonitor.identity[0].principalId,
    });
    
    import pulumi
    import pulumi_azure as azure
    
    primary = azure.core.get_subscription()
    monitoring_reader = azure.authorization.get_role_definition(name="Monitoring Reader")
    example = azure.authorization.Assignment("example",
        scope=primary.id,
        role_definition_id=monitoring_reader.role_definition_id,
        principal_id=example_azurerm_datadog_monitor["identity"][0]["principalId"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/authorization"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		primary, err := core.LookupSubscription(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		monitoringReader, err := authorization.LookupRoleDefinition(ctx, &authorization.LookupRoleDefinitionArgs{
    			Name: pulumi.StringRef("Monitoring Reader"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = authorization.NewAssignment(ctx, "example", &authorization.AssignmentArgs{
    			Scope:            pulumi.String(primary.Id),
    			RoleDefinitionId: pulumi.String(monitoringReader.RoleDefinitionId),
    			PrincipalId:      pulumi.Any(exampleAzurermDatadogMonitor.Identity[0].PrincipalId),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var primary = Azure.Core.GetSubscription.Invoke();
    
        var monitoringReader = Azure.Authorization.GetRoleDefinition.Invoke(new()
        {
            Name = "Monitoring Reader",
        });
    
        var example = new Azure.Authorization.Assignment("example", new()
        {
            Scope = primary.Apply(getSubscriptionResult => getSubscriptionResult.Id),
            RoleDefinitionId = monitoringReader.Apply(getRoleDefinitionResult => getRoleDefinitionResult.RoleDefinitionId),
            PrincipalId = exampleAzurermDatadogMonitor.Identity[0].PrincipalId,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.core.CoreFunctions;
    import com.pulumi.azure.core.inputs.GetSubscriptionArgs;
    import com.pulumi.azure.authorization.AuthorizationFunctions;
    import com.pulumi.azure.authorization.inputs.GetRoleDefinitionArgs;
    import com.pulumi.azure.authorization.Assignment;
    import com.pulumi.azure.authorization.AssignmentArgs;
    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) {
            final var primary = CoreFunctions.getSubscription();
    
            final var monitoringReader = AuthorizationFunctions.getRoleDefinition(GetRoleDefinitionArgs.builder()
                .name("Monitoring Reader")
                .build());
    
            var example = new Assignment("example", AssignmentArgs.builder()
                .scope(primary.applyValue(getSubscriptionResult -> getSubscriptionResult.id()))
                .roleDefinitionId(monitoringReader.applyValue(getRoleDefinitionResult -> getRoleDefinitionResult.roleDefinitionId()))
                .principalId(exampleAzurermDatadogMonitor.identity()[0].principalId())
                .build());
    
        }
    }
    
    resources:
      example:
        type: azure:authorization:Assignment
        properties:
          scope: ${primary.id}
          roleDefinitionId: ${monitoringReader.roleDefinitionId}
          principalId: ${exampleAzurermDatadogMonitor.identity[0].principalId}
    variables:
      primary:
        fn::invoke:
          Function: azure:core:getSubscription
          Arguments: {}
      monitoringReader:
        fn::invoke:
          Function: azure:authorization:getRoleDefinition
          Arguments:
            name: Monitoring Reader
    

    Create Monitor Resource

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

    Constructor syntax

    new Monitor(name: string, args: MonitorArgs, opts?: CustomResourceOptions);
    @overload
    def Monitor(resource_name: str,
                args: MonitorArgs,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def Monitor(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                datadog_organization: Optional[MonitorDatadogOrganizationArgs] = None,
                resource_group_name: Optional[str] = None,
                sku_name: Optional[str] = None,
                user: Optional[MonitorUserArgs] = None,
                identity: Optional[MonitorIdentityArgs] = None,
                location: Optional[str] = None,
                monitoring_enabled: Optional[bool] = None,
                name: Optional[str] = None,
                tags: Optional[Mapping[str, str]] = None)
    func NewMonitor(ctx *Context, name string, args MonitorArgs, opts ...ResourceOption) (*Monitor, error)
    public Monitor(string name, MonitorArgs args, CustomResourceOptions? opts = null)
    public Monitor(String name, MonitorArgs args)
    public Monitor(String name, MonitorArgs args, CustomResourceOptions options)
    
    type: azure:datadog:Monitor
    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 MonitorArgs
    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 MonitorArgs
    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 MonitorArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MonitorArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MonitorArgs
    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 monitorResource = new Azure.Datadog.Monitor("monitorResource", new()
    {
        DatadogOrganization = new Azure.Datadog.Inputs.MonitorDatadogOrganizationArgs
        {
            ApiKey = "string",
            ApplicationKey = "string",
            EnterpriseAppId = "string",
            Id = "string",
            LinkingAuthCode = "string",
            LinkingClientId = "string",
            Name = "string",
            RedirectUri = "string",
        },
        ResourceGroupName = "string",
        SkuName = "string",
        User = new Azure.Datadog.Inputs.MonitorUserArgs
        {
            Email = "string",
            Name = "string",
            PhoneNumber = "string",
        },
        Identity = new Azure.Datadog.Inputs.MonitorIdentityArgs
        {
            Type = "string",
            PrincipalId = "string",
            TenantId = "string",
        },
        Location = "string",
        MonitoringEnabled = false,
        Name = "string",
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := datadog.NewMonitor(ctx, "monitorResource", &datadog.MonitorArgs{
    	DatadogOrganization: &datadog.MonitorDatadogOrganizationArgs{
    		ApiKey:          pulumi.String("string"),
    		ApplicationKey:  pulumi.String("string"),
    		EnterpriseAppId: pulumi.String("string"),
    		Id:              pulumi.String("string"),
    		LinkingAuthCode: pulumi.String("string"),
    		LinkingClientId: pulumi.String("string"),
    		Name:            pulumi.String("string"),
    		RedirectUri:     pulumi.String("string"),
    	},
    	ResourceGroupName: pulumi.String("string"),
    	SkuName:           pulumi.String("string"),
    	User: &datadog.MonitorUserArgs{
    		Email:       pulumi.String("string"),
    		Name:        pulumi.String("string"),
    		PhoneNumber: pulumi.String("string"),
    	},
    	Identity: &datadog.MonitorIdentityArgs{
    		Type:        pulumi.String("string"),
    		PrincipalId: pulumi.String("string"),
    		TenantId:    pulumi.String("string"),
    	},
    	Location:          pulumi.String("string"),
    	MonitoringEnabled: pulumi.Bool(false),
    	Name:              pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var monitorResource = new Monitor("monitorResource", MonitorArgs.builder()
        .datadogOrganization(MonitorDatadogOrganizationArgs.builder()
            .apiKey("string")
            .applicationKey("string")
            .enterpriseAppId("string")
            .id("string")
            .linkingAuthCode("string")
            .linkingClientId("string")
            .name("string")
            .redirectUri("string")
            .build())
        .resourceGroupName("string")
        .skuName("string")
        .user(MonitorUserArgs.builder()
            .email("string")
            .name("string")
            .phoneNumber("string")
            .build())
        .identity(MonitorIdentityArgs.builder()
            .type("string")
            .principalId("string")
            .tenantId("string")
            .build())
        .location("string")
        .monitoringEnabled(false)
        .name("string")
        .tags(Map.of("string", "string"))
        .build());
    
    monitor_resource = azure.datadog.Monitor("monitorResource",
        datadog_organization=azure.datadog.MonitorDatadogOrganizationArgs(
            api_key="string",
            application_key="string",
            enterprise_app_id="string",
            id="string",
            linking_auth_code="string",
            linking_client_id="string",
            name="string",
            redirect_uri="string",
        ),
        resource_group_name="string",
        sku_name="string",
        user=azure.datadog.MonitorUserArgs(
            email="string",
            name="string",
            phone_number="string",
        ),
        identity=azure.datadog.MonitorIdentityArgs(
            type="string",
            principal_id="string",
            tenant_id="string",
        ),
        location="string",
        monitoring_enabled=False,
        name="string",
        tags={
            "string": "string",
        })
    
    const monitorResource = new azure.datadog.Monitor("monitorResource", {
        datadogOrganization: {
            apiKey: "string",
            applicationKey: "string",
            enterpriseAppId: "string",
            id: "string",
            linkingAuthCode: "string",
            linkingClientId: "string",
            name: "string",
            redirectUri: "string",
        },
        resourceGroupName: "string",
        skuName: "string",
        user: {
            email: "string",
            name: "string",
            phoneNumber: "string",
        },
        identity: {
            type: "string",
            principalId: "string",
            tenantId: "string",
        },
        location: "string",
        monitoringEnabled: false,
        name: "string",
        tags: {
            string: "string",
        },
    });
    
    type: azure:datadog:Monitor
    properties:
        datadogOrganization:
            apiKey: string
            applicationKey: string
            enterpriseAppId: string
            id: string
            linkingAuthCode: string
            linkingClientId: string
            name: string
            redirectUri: string
        identity:
            principalId: string
            tenantId: string
            type: string
        location: string
        monitoringEnabled: false
        name: string
        resourceGroupName: string
        skuName: string
        tags:
            string: string
        user:
            email: string
            name: string
            phoneNumber: string
    

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

    DatadogOrganization MonitorDatadogOrganization
    A datadog_organization block as defined below.
    ResourceGroupName string
    The name of the Resource Group where the Datadog Monitor should exist. Changing this forces a new Datadog Monitor to be created.
    SkuName string
    The name which should be used for this sku.
    User MonitorUser
    A user block as defined below.
    Identity MonitorIdentity
    A identity block as defined below.
    Location string
    The Azure Region where the Datadog Monitor should exist. Changing this forces a new Datadog Monitor to be created.
    MonitoringEnabled bool
    Is monitoring enabled? Defaults to true.
    Name string
    The name of the user that will be associated with the Datadog Monitor. Changing this forces a new Datadog Monitor to be created.
    Tags Dictionary<string, string>
    A mapping of tags which should be assigned to the Datadog Monitor.
    DatadogOrganization MonitorDatadogOrganizationArgs
    A datadog_organization block as defined below.
    ResourceGroupName string
    The name of the Resource Group where the Datadog Monitor should exist. Changing this forces a new Datadog Monitor to be created.
    SkuName string
    The name which should be used for this sku.
    User MonitorUserArgs
    A user block as defined below.
    Identity MonitorIdentityArgs
    A identity block as defined below.
    Location string
    The Azure Region where the Datadog Monitor should exist. Changing this forces a new Datadog Monitor to be created.
    MonitoringEnabled bool
    Is monitoring enabled? Defaults to true.
    Name string
    The name of the user that will be associated with the Datadog Monitor. Changing this forces a new Datadog Monitor to be created.
    Tags map[string]string
    A mapping of tags which should be assigned to the Datadog Monitor.
    datadogOrganization MonitorDatadogOrganization
    A datadog_organization block as defined below.
    resourceGroupName String
    The name of the Resource Group where the Datadog Monitor should exist. Changing this forces a new Datadog Monitor to be created.
    skuName String
    The name which should be used for this sku.
    user MonitorUser
    A user block as defined below.
    identity MonitorIdentity
    A identity block as defined below.
    location String
    The Azure Region where the Datadog Monitor should exist. Changing this forces a new Datadog Monitor to be created.
    monitoringEnabled Boolean
    Is monitoring enabled? Defaults to true.
    name String
    The name of the user that will be associated with the Datadog Monitor. Changing this forces a new Datadog Monitor to be created.
    tags Map<String,String>
    A mapping of tags which should be assigned to the Datadog Monitor.
    datadogOrganization MonitorDatadogOrganization
    A datadog_organization block as defined below.
    resourceGroupName string
    The name of the Resource Group where the Datadog Monitor should exist. Changing this forces a new Datadog Monitor to be created.
    skuName string
    The name which should be used for this sku.
    user MonitorUser
    A user block as defined below.
    identity MonitorIdentity
    A identity block as defined below.
    location string
    The Azure Region where the Datadog Monitor should exist. Changing this forces a new Datadog Monitor to be created.
    monitoringEnabled boolean
    Is monitoring enabled? Defaults to true.
    name string
    The name of the user that will be associated with the Datadog Monitor. Changing this forces a new Datadog Monitor to be created.
    tags {[key: string]: string}
    A mapping of tags which should be assigned to the Datadog Monitor.
    datadog_organization MonitorDatadogOrganizationArgs
    A datadog_organization block as defined below.
    resource_group_name str
    The name of the Resource Group where the Datadog Monitor should exist. Changing this forces a new Datadog Monitor to be created.
    sku_name str
    The name which should be used for this sku.
    user MonitorUserArgs
    A user block as defined below.
    identity MonitorIdentityArgs
    A identity block as defined below.
    location str
    The Azure Region where the Datadog Monitor should exist. Changing this forces a new Datadog Monitor to be created.
    monitoring_enabled bool
    Is monitoring enabled? Defaults to true.
    name str
    The name of the user that will be associated with the Datadog Monitor. Changing this forces a new Datadog Monitor to be created.
    tags Mapping[str, str]
    A mapping of tags which should be assigned to the Datadog Monitor.
    datadogOrganization Property Map
    A datadog_organization block as defined below.
    resourceGroupName String
    The name of the Resource Group where the Datadog Monitor should exist. Changing this forces a new Datadog Monitor to be created.
    skuName String
    The name which should be used for this sku.
    user Property Map
    A user block as defined below.
    identity Property Map
    A identity block as defined below.
    location String
    The Azure Region where the Datadog Monitor should exist. Changing this forces a new Datadog Monitor to be created.
    monitoringEnabled Boolean
    Is monitoring enabled? Defaults to true.
    name String
    The name of the user that will be associated with the Datadog Monitor. Changing this forces a new Datadog Monitor to be created.
    tags Map<String>
    A mapping of tags which should be assigned to the Datadog Monitor.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    MarketplaceSubscriptionStatus string
    Flag specifying the Marketplace Subscription Status of the resource. If payment is not made in time, the resource will go in Suspended state.
    Id string
    The provider-assigned unique ID for this managed resource.
    MarketplaceSubscriptionStatus string
    Flag specifying the Marketplace Subscription Status of the resource. If payment is not made in time, the resource will go in Suspended state.
    id String
    The provider-assigned unique ID for this managed resource.
    marketplaceSubscriptionStatus String
    Flag specifying the Marketplace Subscription Status of the resource. If payment is not made in time, the resource will go in Suspended state.
    id string
    The provider-assigned unique ID for this managed resource.
    marketplaceSubscriptionStatus string
    Flag specifying the Marketplace Subscription Status of the resource. If payment is not made in time, the resource will go in Suspended state.
    id str
    The provider-assigned unique ID for this managed resource.
    marketplace_subscription_status str
    Flag specifying the Marketplace Subscription Status of the resource. If payment is not made in time, the resource will go in Suspended state.
    id String
    The provider-assigned unique ID for this managed resource.
    marketplaceSubscriptionStatus String
    Flag specifying the Marketplace Subscription Status of the resource. If payment is not made in time, the resource will go in Suspended state.

    Look up Existing Monitor Resource

    Get an existing Monitor 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?: MonitorState, opts?: CustomResourceOptions): Monitor
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            datadog_organization: Optional[MonitorDatadogOrganizationArgs] = None,
            identity: Optional[MonitorIdentityArgs] = None,
            location: Optional[str] = None,
            marketplace_subscription_status: Optional[str] = None,
            monitoring_enabled: Optional[bool] = None,
            name: Optional[str] = None,
            resource_group_name: Optional[str] = None,
            sku_name: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            user: Optional[MonitorUserArgs] = None) -> Monitor
    func GetMonitor(ctx *Context, name string, id IDInput, state *MonitorState, opts ...ResourceOption) (*Monitor, error)
    public static Monitor Get(string name, Input<string> id, MonitorState? state, CustomResourceOptions? opts = null)
    public static Monitor get(String name, Output<String> id, MonitorState 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.
    The following state arguments are supported:
    DatadogOrganization MonitorDatadogOrganization
    A datadog_organization block as defined below.
    Identity MonitorIdentity
    A identity block as defined below.
    Location string
    The Azure Region where the Datadog Monitor should exist. Changing this forces a new Datadog Monitor to be created.
    MarketplaceSubscriptionStatus string
    Flag specifying the Marketplace Subscription Status of the resource. If payment is not made in time, the resource will go in Suspended state.
    MonitoringEnabled bool
    Is monitoring enabled? Defaults to true.
    Name string
    The name of the user that will be associated with the Datadog Monitor. Changing this forces a new Datadog Monitor to be created.
    ResourceGroupName string
    The name of the Resource Group where the Datadog Monitor should exist. Changing this forces a new Datadog Monitor to be created.
    SkuName string
    The name which should be used for this sku.
    Tags Dictionary<string, string>
    A mapping of tags which should be assigned to the Datadog Monitor.
    User MonitorUser
    A user block as defined below.
    DatadogOrganization MonitorDatadogOrganizationArgs
    A datadog_organization block as defined below.
    Identity MonitorIdentityArgs
    A identity block as defined below.
    Location string
    The Azure Region where the Datadog Monitor should exist. Changing this forces a new Datadog Monitor to be created.
    MarketplaceSubscriptionStatus string
    Flag specifying the Marketplace Subscription Status of the resource. If payment is not made in time, the resource will go in Suspended state.
    MonitoringEnabled bool
    Is monitoring enabled? Defaults to true.
    Name string
    The name of the user that will be associated with the Datadog Monitor. Changing this forces a new Datadog Monitor to be created.
    ResourceGroupName string
    The name of the Resource Group where the Datadog Monitor should exist. Changing this forces a new Datadog Monitor to be created.
    SkuName string
    The name which should be used for this sku.
    Tags map[string]string
    A mapping of tags which should be assigned to the Datadog Monitor.
    User MonitorUserArgs
    A user block as defined below.
    datadogOrganization MonitorDatadogOrganization
    A datadog_organization block as defined below.
    identity MonitorIdentity
    A identity block as defined below.
    location String
    The Azure Region where the Datadog Monitor should exist. Changing this forces a new Datadog Monitor to be created.
    marketplaceSubscriptionStatus String
    Flag specifying the Marketplace Subscription Status of the resource. If payment is not made in time, the resource will go in Suspended state.
    monitoringEnabled Boolean
    Is monitoring enabled? Defaults to true.
    name String
    The name of the user that will be associated with the Datadog Monitor. Changing this forces a new Datadog Monitor to be created.
    resourceGroupName String
    The name of the Resource Group where the Datadog Monitor should exist. Changing this forces a new Datadog Monitor to be created.
    skuName String
    The name which should be used for this sku.
    tags Map<String,String>
    A mapping of tags which should be assigned to the Datadog Monitor.
    user MonitorUser
    A user block as defined below.
    datadogOrganization MonitorDatadogOrganization
    A datadog_organization block as defined below.
    identity MonitorIdentity
    A identity block as defined below.
    location string
    The Azure Region where the Datadog Monitor should exist. Changing this forces a new Datadog Monitor to be created.
    marketplaceSubscriptionStatus string
    Flag specifying the Marketplace Subscription Status of the resource. If payment is not made in time, the resource will go in Suspended state.
    monitoringEnabled boolean
    Is monitoring enabled? Defaults to true.
    name string
    The name of the user that will be associated with the Datadog Monitor. Changing this forces a new Datadog Monitor to be created.
    resourceGroupName string
    The name of the Resource Group where the Datadog Monitor should exist. Changing this forces a new Datadog Monitor to be created.
    skuName string
    The name which should be used for this sku.
    tags {[key: string]: string}
    A mapping of tags which should be assigned to the Datadog Monitor.
    user MonitorUser
    A user block as defined below.
    datadog_organization MonitorDatadogOrganizationArgs
    A datadog_organization block as defined below.
    identity MonitorIdentityArgs
    A identity block as defined below.
    location str
    The Azure Region where the Datadog Monitor should exist. Changing this forces a new Datadog Monitor to be created.
    marketplace_subscription_status str
    Flag specifying the Marketplace Subscription Status of the resource. If payment is not made in time, the resource will go in Suspended state.
    monitoring_enabled bool
    Is monitoring enabled? Defaults to true.
    name str
    The name of the user that will be associated with the Datadog Monitor. Changing this forces a new Datadog Monitor to be created.
    resource_group_name str
    The name of the Resource Group where the Datadog Monitor should exist. Changing this forces a new Datadog Monitor to be created.
    sku_name str
    The name which should be used for this sku.
    tags Mapping[str, str]
    A mapping of tags which should be assigned to the Datadog Monitor.
    user MonitorUserArgs
    A user block as defined below.
    datadogOrganization Property Map
    A datadog_organization block as defined below.
    identity Property Map
    A identity block as defined below.
    location String
    The Azure Region where the Datadog Monitor should exist. Changing this forces a new Datadog Monitor to be created.
    marketplaceSubscriptionStatus String
    Flag specifying the Marketplace Subscription Status of the resource. If payment is not made in time, the resource will go in Suspended state.
    monitoringEnabled Boolean
    Is monitoring enabled? Defaults to true.
    name String
    The name of the user that will be associated with the Datadog Monitor. Changing this forces a new Datadog Monitor to be created.
    resourceGroupName String
    The name of the Resource Group where the Datadog Monitor should exist. Changing this forces a new Datadog Monitor to be created.
    skuName String
    The name which should be used for this sku.
    tags Map<String>
    A mapping of tags which should be assigned to the Datadog Monitor.
    user Property Map
    A user block as defined below.

    Supporting Types

    MonitorDatadogOrganization, MonitorDatadogOrganizationArgs

    ApiKey string
    Api key associated to the Datadog organization. Changing this forces a new Datadog Monitor to be created.
    ApplicationKey string
    Application key associated to the Datadog organization. Changing this forces a new Datadog Monitor to be created.
    EnterpriseAppId string
    The ID of the enterprise_app. Changing this forces a new resource to be created.
    Id string
    The ID of the Datadog Monitor.
    LinkingAuthCode string
    The auth code used to linking to an existing Datadog organization. Changing this forces a new Datadog Monitor to be created.
    LinkingClientId string
    The ID of the linking_client. Changing this forces a new Datadog Monitor to be created.
    Name string
    The name of the user that will be associated with the Datadog Monitor. Changing this forces a new Datadog Monitor to be created.
    RedirectUri string
    The redirect uri for linking. Changing this forces a new Datadog Monitor to be created.
    ApiKey string
    Api key associated to the Datadog organization. Changing this forces a new Datadog Monitor to be created.
    ApplicationKey string
    Application key associated to the Datadog organization. Changing this forces a new Datadog Monitor to be created.
    EnterpriseAppId string
    The ID of the enterprise_app. Changing this forces a new resource to be created.
    Id string
    The ID of the Datadog Monitor.
    LinkingAuthCode string
    The auth code used to linking to an existing Datadog organization. Changing this forces a new Datadog Monitor to be created.
    LinkingClientId string
    The ID of the linking_client. Changing this forces a new Datadog Monitor to be created.
    Name string
    The name of the user that will be associated with the Datadog Monitor. Changing this forces a new Datadog Monitor to be created.
    RedirectUri string
    The redirect uri for linking. Changing this forces a new Datadog Monitor to be created.
    apiKey String
    Api key associated to the Datadog organization. Changing this forces a new Datadog Monitor to be created.
    applicationKey String
    Application key associated to the Datadog organization. Changing this forces a new Datadog Monitor to be created.
    enterpriseAppId String
    The ID of the enterprise_app. Changing this forces a new resource to be created.
    id String
    The ID of the Datadog Monitor.
    linkingAuthCode String
    The auth code used to linking to an existing Datadog organization. Changing this forces a new Datadog Monitor to be created.
    linkingClientId String
    The ID of the linking_client. Changing this forces a new Datadog Monitor to be created.
    name String
    The name of the user that will be associated with the Datadog Monitor. Changing this forces a new Datadog Monitor to be created.
    redirectUri String
    The redirect uri for linking. Changing this forces a new Datadog Monitor to be created.
    apiKey string
    Api key associated to the Datadog organization. Changing this forces a new Datadog Monitor to be created.
    applicationKey string
    Application key associated to the Datadog organization. Changing this forces a new Datadog Monitor to be created.
    enterpriseAppId string
    The ID of the enterprise_app. Changing this forces a new resource to be created.
    id string
    The ID of the Datadog Monitor.
    linkingAuthCode string
    The auth code used to linking to an existing Datadog organization. Changing this forces a new Datadog Monitor to be created.
    linkingClientId string
    The ID of the linking_client. Changing this forces a new Datadog Monitor to be created.
    name string
    The name of the user that will be associated with the Datadog Monitor. Changing this forces a new Datadog Monitor to be created.
    redirectUri string
    The redirect uri for linking. Changing this forces a new Datadog Monitor to be created.
    api_key str
    Api key associated to the Datadog organization. Changing this forces a new Datadog Monitor to be created.
    application_key str
    Application key associated to the Datadog organization. Changing this forces a new Datadog Monitor to be created.
    enterprise_app_id str
    The ID of the enterprise_app. Changing this forces a new resource to be created.
    id str
    The ID of the Datadog Monitor.
    linking_auth_code str
    The auth code used to linking to an existing Datadog organization. Changing this forces a new Datadog Monitor to be created.
    linking_client_id str
    The ID of the linking_client. Changing this forces a new Datadog Monitor to be created.
    name str
    The name of the user that will be associated with the Datadog Monitor. Changing this forces a new Datadog Monitor to be created.
    redirect_uri str
    The redirect uri for linking. Changing this forces a new Datadog Monitor to be created.
    apiKey String
    Api key associated to the Datadog organization. Changing this forces a new Datadog Monitor to be created.
    applicationKey String
    Application key associated to the Datadog organization. Changing this forces a new Datadog Monitor to be created.
    enterpriseAppId String
    The ID of the enterprise_app. Changing this forces a new resource to be created.
    id String
    The ID of the Datadog Monitor.
    linkingAuthCode String
    The auth code used to linking to an existing Datadog organization. Changing this forces a new Datadog Monitor to be created.
    linkingClientId String
    The ID of the linking_client. Changing this forces a new Datadog Monitor to be created.
    name String
    The name of the user that will be associated with the Datadog Monitor. Changing this forces a new Datadog Monitor to be created.
    redirectUri String
    The redirect uri for linking. Changing this forces a new Datadog Monitor to be created.

    MonitorIdentity, MonitorIdentityArgs

    Type string

    Specifies the identity type of the Datadog Monitor. At this time the only allowed value is SystemAssigned.

    NOTE: The assigned principal_id and tenant_id can be retrieved after the identity type has been set to SystemAssigned and the Datadog Monitor has been created. More details are available below.

    PrincipalId string
    The Principal ID for the Service Principal associated with the Identity of this Datadog Monitor.
    TenantId string
    The Tenant ID for the Service Principal associated with the Identity of this Datadog Monitor.
    Type string

    Specifies the identity type of the Datadog Monitor. At this time the only allowed value is SystemAssigned.

    NOTE: The assigned principal_id and tenant_id can be retrieved after the identity type has been set to SystemAssigned and the Datadog Monitor has been created. More details are available below.

    PrincipalId string
    The Principal ID for the Service Principal associated with the Identity of this Datadog Monitor.
    TenantId string
    The Tenant ID for the Service Principal associated with the Identity of this Datadog Monitor.
    type String

    Specifies the identity type of the Datadog Monitor. At this time the only allowed value is SystemAssigned.

    NOTE: The assigned principal_id and tenant_id can be retrieved after the identity type has been set to SystemAssigned and the Datadog Monitor has been created. More details are available below.

    principalId String
    The Principal ID for the Service Principal associated with the Identity of this Datadog Monitor.
    tenantId String
    The Tenant ID for the Service Principal associated with the Identity of this Datadog Monitor.
    type string

    Specifies the identity type of the Datadog Monitor. At this time the only allowed value is SystemAssigned.

    NOTE: The assigned principal_id and tenant_id can be retrieved after the identity type has been set to SystemAssigned and the Datadog Monitor has been created. More details are available below.

    principalId string
    The Principal ID for the Service Principal associated with the Identity of this Datadog Monitor.
    tenantId string
    The Tenant ID for the Service Principal associated with the Identity of this Datadog Monitor.
    type str

    Specifies the identity type of the Datadog Monitor. At this time the only allowed value is SystemAssigned.

    NOTE: The assigned principal_id and tenant_id can be retrieved after the identity type has been set to SystemAssigned and the Datadog Monitor has been created. More details are available below.

    principal_id str
    The Principal ID for the Service Principal associated with the Identity of this Datadog Monitor.
    tenant_id str
    The Tenant ID for the Service Principal associated with the Identity of this Datadog Monitor.
    type String

    Specifies the identity type of the Datadog Monitor. At this time the only allowed value is SystemAssigned.

    NOTE: The assigned principal_id and tenant_id can be retrieved after the identity type has been set to SystemAssigned and the Datadog Monitor has been created. More details are available below.

    principalId String
    The Principal ID for the Service Principal associated with the Identity of this Datadog Monitor.
    tenantId String
    The Tenant ID for the Service Principal associated with the Identity of this Datadog Monitor.

    MonitorUser, MonitorUserArgs

    Email string
    Email of the user used by Datadog for contacting them if needed. Changing this forces a new Datadog Monitor to be created.
    Name string
    The name which should be used for this user_info. Changing this forces a new resource to be created.
    PhoneNumber string
    Phone number of the user used by Datadog for contacting them if needed. Changing this forces a new resource to be created.
    Email string
    Email of the user used by Datadog for contacting them if needed. Changing this forces a new Datadog Monitor to be created.
    Name string
    The name which should be used for this user_info. Changing this forces a new resource to be created.
    PhoneNumber string
    Phone number of the user used by Datadog for contacting them if needed. Changing this forces a new resource to be created.
    email String
    Email of the user used by Datadog for contacting them if needed. Changing this forces a new Datadog Monitor to be created.
    name String
    The name which should be used for this user_info. Changing this forces a new resource to be created.
    phoneNumber String
    Phone number of the user used by Datadog for contacting them if needed. Changing this forces a new resource to be created.
    email string
    Email of the user used by Datadog for contacting them if needed. Changing this forces a new Datadog Monitor to be created.
    name string
    The name which should be used for this user_info. Changing this forces a new resource to be created.
    phoneNumber string
    Phone number of the user used by Datadog for contacting them if needed. Changing this forces a new resource to be created.
    email str
    Email of the user used by Datadog for contacting them if needed. Changing this forces a new Datadog Monitor to be created.
    name str
    The name which should be used for this user_info. Changing this forces a new resource to be created.
    phone_number str
    Phone number of the user used by Datadog for contacting them if needed. Changing this forces a new resource to be created.
    email String
    Email of the user used by Datadog for contacting them if needed. Changing this forces a new Datadog Monitor to be created.
    name String
    The name which should be used for this user_info. Changing this forces a new resource to be created.
    phoneNumber String
    Phone number of the user used by Datadog for contacting them if needed. Changing this forces a new resource to be created.

    Import

    Datadog Monitors can be imported using the resource id, e.g.

    $ pulumi import azure:datadog/monitor:Monitor example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Datadog/monitors/monitor1
    

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

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi