import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Manages a datadog Monitor. * * ## Example Usage * * ### Monitor creation with linking to Datadog organization * * ```typescript * 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", * }, * }); * ``` * * ## 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 * * ```typescript * 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, * }); * ``` * * ## API Providers * * * This resource uses the following Azure API Providers: * * * `Microsoft.Datadog` - 2021-03-01 * * ## Import * * Datadog Monitors can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:datadog/monitor:Monitor example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Datadog/monitors/monitor1 * ``` */ export declare class Monitor extends pulumi.CustomResource { /** * Get an existing Monitor resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: MonitorState, opts?: pulumi.CustomResourceOptions): Monitor; /** * Returns true if the given object is an instance of Monitor. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Monitor; /** * A `datadogOrganization` block as defined below. */ readonly datadogOrganization: pulumi.Output; /** * A `identity` block as defined below. */ readonly identity: pulumi.Output; /** * The Azure Region where the Datadog Monitor should exist. Changing this forces a new Datadog Monitor to be created. */ readonly location: pulumi.Output; /** * Flag specifying the Marketplace Subscription Status of the resource. If payment is not made in time, the resource will go in Suspended state. */ readonly marketplaceSubscriptionStatus: pulumi.Output; /** * Is monitoring enabled? Defaults to `true`. */ readonly monitoringEnabled: pulumi.Output; /** * The name of the user that will be associated with the Datadog Monitor. Changing this forces a new Datadog Monitor to be created. */ readonly name: pulumi.Output; /** * The name of the Resource Group where the Datadog Monitor should exist. Changing this forces a new Datadog Monitor to be created. */ readonly resourceGroupName: pulumi.Output; /** * The name which should be used for this sku. */ readonly skuName: pulumi.Output; /** * A mapping of tags which should be assigned to the Datadog Monitor. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * A `user` block as defined below. */ readonly user: pulumi.Output; /** * Create a Monitor resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: MonitorArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Monitor resources. */ export interface MonitorState { /** * A `datadogOrganization` block as defined below. */ datadogOrganization?: pulumi.Input; /** * A `identity` block as defined below. */ identity?: pulumi.Input; /** * The Azure Region where the Datadog Monitor should exist. Changing this forces a new Datadog Monitor to be created. */ location?: pulumi.Input; /** * Flag specifying the Marketplace Subscription Status of the resource. If payment is not made in time, the resource will go in Suspended state. */ marketplaceSubscriptionStatus?: pulumi.Input; /** * Is monitoring enabled? Defaults to `true`. */ monitoringEnabled?: pulumi.Input; /** * The name of the user that will be associated with the Datadog Monitor. Changing this forces a new Datadog Monitor to be created. */ name?: pulumi.Input; /** * The name of the Resource Group where the Datadog Monitor should exist. Changing this forces a new Datadog Monitor to be created. */ resourceGroupName?: pulumi.Input; /** * The name which should be used for this sku. */ skuName?: pulumi.Input; /** * A mapping of tags which should be assigned to the Datadog Monitor. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * A `user` block as defined below. */ user?: pulumi.Input; } /** * The set of arguments for constructing a Monitor resource. */ export interface MonitorArgs { /** * A `datadogOrganization` block as defined below. */ datadogOrganization: pulumi.Input; /** * A `identity` block as defined below. */ identity?: pulumi.Input; /** * The Azure Region where the Datadog Monitor should exist. Changing this forces a new Datadog Monitor to be created. */ location?: pulumi.Input; /** * Is monitoring enabled? Defaults to `true`. */ monitoringEnabled?: pulumi.Input; /** * The name of the user that will be associated with the Datadog Monitor. Changing this forces a new Datadog Monitor to be created. */ name?: pulumi.Input; /** * The name of the Resource Group where the Datadog Monitor should exist. Changing this forces a new Datadog Monitor to be created. */ resourceGroupName: pulumi.Input; /** * The name which should be used for this sku. */ skuName: pulumi.Input; /** * A mapping of tags which should be assigned to the Datadog Monitor. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * A `user` block as defined below. */ user: pulumi.Input; }