import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Manages an Azure Native New Relic Monitor. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azure from "@pulumi/azure"; * * const example = new azure.core.ResourceGroup("example", { * name: "example-resources", * location: "East US", * }); * const exampleMonitor = new azure.newrelic.Monitor("example", { * name: "example-nrm", * resourceGroupName: example.name, * location: example.location, * plan: { * effectiveDate: "2023-06-06T00:00:00Z", * }, * user: { * email: "user@example.com", * firstName: "Example", * lastName: "User", * phoneNumber: "+12313803556", * }, * 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: Promise.all([primary, monitoringReader]).then(([primary, monitoringReader]) => `${primary.id}${monitoringReader.id}`), * principalId: exampleAzurermNewRelicMonitor.identity[0].principalId, * }); * ``` * * ## API Providers * * * This resource uses the following Azure API Providers: * * * `NewRelic.Observability` - 2024-03-01 * * ## Import * * Azure Native New Relic Monitor can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:newrelic/monitor:Monitor example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/NewRelic.Observability/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; /** * Specifies the source of account creation. Possible values are `LIFTR` and `NEWRELIC`. Defaults to `LIFTR`. Changing this forces a new Azure Native New Relic Monitor to be created. */ readonly accountCreationSource: pulumi.Output; /** * Specifies the account id. Changing this forces a new Azure Native New Relic Monitor to be created. * * > **Note:** The value of `accountId` must come from an Azure Native New Relic Monitor instance of another different subscription. */ readonly accountId: pulumi.Output; /** * An `identity` block as defined below. Changing this forces a new Azure Native New Relic Monitor to be created. */ readonly identity: pulumi.Output; /** * Specifies the ingestion key of account. Changing this forces a new Azure Native New Relic Monitor to be created. */ readonly ingestionKey: pulumi.Output; /** * Specifies the Azure Region where the Azure Native New Relic Monitor should exist. Changing this forces a new Azure Native New Relic Monitor to be created. */ readonly location: pulumi.Output; /** * Specifies the name which should be used for this Azure Native New Relic Monitor. Changing this forces a new Azure Native New Relic Monitor to be created. */ readonly name: pulumi.Output; /** * Specifies the source of org creation. Possible values are `LIFTR` and `NEWRELIC`. Defaults to `LIFTR`. Changing this forces a new Azure Native New Relic Monitor to be created. */ readonly orgCreationSource: pulumi.Output; /** * Specifies the organization id. Changing this forces a new Azure Native New Relic Monitor to be created. * * > **Note:** The value of `organizationId` must come from an Azure Native New Relic Monitor instance of another different subscription. */ readonly organizationId: pulumi.Output; /** * A `plan` block as defined below. Changing this forces a new Azure Native New Relic Monitor to be created. */ readonly plan: pulumi.Output; /** * Specifies the name of the Resource Group where the Azure Native New Relic Monitor should exist. Changing this forces a new Azure Native New Relic Monitor to be created. */ readonly resourceGroupName: pulumi.Output; /** * A `user` block as defined below. Changing this forces a new Azure Native New Relic Monitor to be created. */ readonly user: pulumi.Output; /** * Specifies the user id. Changing this forces a new Azure Native New Relic Monitor to be created. */ readonly userId: 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 { /** * Specifies the source of account creation. Possible values are `LIFTR` and `NEWRELIC`. Defaults to `LIFTR`. Changing this forces a new Azure Native New Relic Monitor to be created. */ accountCreationSource?: pulumi.Input; /** * Specifies the account id. Changing this forces a new Azure Native New Relic Monitor to be created. * * > **Note:** The value of `accountId` must come from an Azure Native New Relic Monitor instance of another different subscription. */ accountId?: pulumi.Input; /** * An `identity` block as defined below. Changing this forces a new Azure Native New Relic Monitor to be created. */ identity?: pulumi.Input; /** * Specifies the ingestion key of account. Changing this forces a new Azure Native New Relic Monitor to be created. */ ingestionKey?: pulumi.Input; /** * Specifies the Azure Region where the Azure Native New Relic Monitor should exist. Changing this forces a new Azure Native New Relic Monitor to be created. */ location?: pulumi.Input; /** * Specifies the name which should be used for this Azure Native New Relic Monitor. Changing this forces a new Azure Native New Relic Monitor to be created. */ name?: pulumi.Input; /** * Specifies the source of org creation. Possible values are `LIFTR` and `NEWRELIC`. Defaults to `LIFTR`. Changing this forces a new Azure Native New Relic Monitor to be created. */ orgCreationSource?: pulumi.Input; /** * Specifies the organization id. Changing this forces a new Azure Native New Relic Monitor to be created. * * > **Note:** The value of `organizationId` must come from an Azure Native New Relic Monitor instance of another different subscription. */ organizationId?: pulumi.Input; /** * A `plan` block as defined below. Changing this forces a new Azure Native New Relic Monitor to be created. */ plan?: pulumi.Input; /** * Specifies the name of the Resource Group where the Azure Native New Relic Monitor should exist. Changing this forces a new Azure Native New Relic Monitor to be created. */ resourceGroupName?: pulumi.Input; /** * A `user` block as defined below. Changing this forces a new Azure Native New Relic Monitor to be created. */ user?: pulumi.Input; /** * Specifies the user id. Changing this forces a new Azure Native New Relic Monitor to be created. */ userId?: pulumi.Input; } /** * The set of arguments for constructing a Monitor resource. */ export interface MonitorArgs { /** * Specifies the source of account creation. Possible values are `LIFTR` and `NEWRELIC`. Defaults to `LIFTR`. Changing this forces a new Azure Native New Relic Monitor to be created. */ accountCreationSource?: pulumi.Input; /** * Specifies the account id. Changing this forces a new Azure Native New Relic Monitor to be created. * * > **Note:** The value of `accountId` must come from an Azure Native New Relic Monitor instance of another different subscription. */ accountId?: pulumi.Input; /** * An `identity` block as defined below. Changing this forces a new Azure Native New Relic Monitor to be created. */ identity?: pulumi.Input; /** * Specifies the ingestion key of account. Changing this forces a new Azure Native New Relic Monitor to be created. */ ingestionKey?: pulumi.Input; /** * Specifies the Azure Region where the Azure Native New Relic Monitor should exist. Changing this forces a new Azure Native New Relic Monitor to be created. */ location?: pulumi.Input; /** * Specifies the name which should be used for this Azure Native New Relic Monitor. Changing this forces a new Azure Native New Relic Monitor to be created. */ name?: pulumi.Input; /** * Specifies the source of org creation. Possible values are `LIFTR` and `NEWRELIC`. Defaults to `LIFTR`. Changing this forces a new Azure Native New Relic Monitor to be created. */ orgCreationSource?: pulumi.Input; /** * Specifies the organization id. Changing this forces a new Azure Native New Relic Monitor to be created. * * > **Note:** The value of `organizationId` must come from an Azure Native New Relic Monitor instance of another different subscription. */ organizationId?: pulumi.Input; /** * A `plan` block as defined below. Changing this forces a new Azure Native New Relic Monitor to be created. */ plan: pulumi.Input; /** * Specifies the name of the Resource Group where the Azure Native New Relic Monitor should exist. Changing this forces a new Azure Native New Relic Monitor to be created. */ resourceGroupName: pulumi.Input; /** * A `user` block as defined below. Changing this forces a new Azure Native New Relic Monitor to be created. */ user: pulumi.Input; /** * Specifies the user id. Changing this forces a new Azure Native New Relic Monitor to be created. */ userId?: pulumi.Input; }