
com.pulumi.azure.newrelic.kotlin.MonitorArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.newrelic.kotlin
import com.pulumi.azure.newrelic.MonitorArgs.builder
import com.pulumi.azure.newrelic.kotlin.inputs.MonitorPlanArgs
import com.pulumi.azure.newrelic.kotlin.inputs.MonitorPlanArgsBuilder
import com.pulumi.azure.newrelic.kotlin.inputs.MonitorUserArgs
import com.pulumi.azure.newrelic.kotlin.inputs.MonitorUserArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
* 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: "[email protected]",
* firstName: "Example",
* lastName: "User",
* phoneNumber: "+12313803556",
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.core.ResourceGroup("example",
* name="example-resources",
* location="East US")
* example_monitor = azure.newrelic.Monitor("example",
* name="example-nrm",
* resource_group_name=example.name,
* location=example.location,
* plan=azure.newrelic.MonitorPlanArgs(
* effective_date="2023-06-06T00:00:00Z",
* ),
* user=azure.newrelic.MonitorUserArgs(
* email="[email protected]",
* first_name="Example",
* last_name="User",
* phone_number="+12313803556",
* ))
* ```
* ```csharp
* 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-resources",
* Location = "East US",
* });
* var exampleMonitor = new Azure.NewRelic.Monitor("example", new()
* {
* Name = "example-nrm",
* ResourceGroupName = example.Name,
* Location = example.Location,
* Plan = new Azure.NewRelic.Inputs.MonitorPlanArgs
* {
* EffectiveDate = "2023-06-06T00:00:00Z",
* },
* User = new Azure.NewRelic.Inputs.MonitorUserArgs
* {
* Email = "[email protected]",
* FirstName = "Example",
* LastName = "User",
* PhoneNumber = "+12313803556",
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/newrelic"
* "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-resources"),
* Location: pulumi.String("East US"),
* })
* if err != nil {
* return err
* }
* _, err = newrelic.NewMonitor(ctx, "example", &newrelic.MonitorArgs{
* Name: pulumi.String("example-nrm"),
* ResourceGroupName: example.Name,
* Location: example.Location,
* Plan: &newrelic.MonitorPlanArgs{
* EffectiveDate: pulumi.String("2023-06-06T00:00:00Z"),
* },
* User: &newrelic.MonitorUserArgs{
* Email: pulumi.String("[email protected]"),
* FirstName: pulumi.String("Example"),
* LastName: pulumi.String("User"),
* PhoneNumber: pulumi.String("+12313803556"),
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* 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.newrelic.Monitor;
* import com.pulumi.azure.newrelic.MonitorArgs;
* import com.pulumi.azure.newrelic.inputs.MonitorPlanArgs;
* import com.pulumi.azure.newrelic.inputs.MonitorUserArgs;
* 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-resources")
* .location("East US")
* .build());
* var exampleMonitor = new Monitor("exampleMonitor", MonitorArgs.builder()
* .name("example-nrm")
* .resourceGroupName(example.name())
* .location(example.location())
* .plan(MonitorPlanArgs.builder()
* .effectiveDate("2023-06-06T00:00:00Z")
* .build())
* .user(MonitorUserArgs.builder()
* .email("[email protected]")
* .firstName("Example")
* .lastName("User")
* .phoneNumber("+12313803556")
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:core:ResourceGroup
* properties:
* name: example-resources
* location: East US
* exampleMonitor:
* type: azure:newrelic:Monitor
* name: example
* properties:
* name: example-nrm
* resourceGroupName: ${example.name}
* location: ${example.location}
* plan:
* effectiveDate: 2023-06-06T00:00:00Z
* user:
* email: [email protected]
* firstName: Example
* lastName: User
* phoneNumber: '+12313803556'
* ```
*
* ## 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
* ```
* @property accountCreationSource 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.
* @property accountId Specifies the account id. Changing this forces a new Azure Native New Relic Monitor to be created.
* > **NOTE:** The value of `account_id` must come from an Azure Native New Relic Monitor instance of another different subscription.
* @property ingestionKey Specifies the ingestion key of account. Changing this forces a new Azure Native New Relic Monitor to be created.
* @property location 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.
* @property name 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.
* @property orgCreationSource 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.
* @property organizationId Specifies the organization id. Changing this forces a new Azure Native New Relic Monitor to be created.
* > **NOTE:** The value of `organization_id` must come from an Azure Native New Relic Monitor instance of another different subscription.
* @property plan A `plan` block as defined below. Changing this forces a new Azure Native New Relic Monitor to be created.
* @property resourceGroupName 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.
* @property user A `user` block as defined below. Changing this forces a new Azure Native New Relic Monitor to be created.
* @property userId Specifies the user id. Changing this forces a new Azure Native New Relic Monitor to be created.
*/
public data class MonitorArgs(
public val accountCreationSource: Output? = null,
public val accountId: Output? = null,
public val ingestionKey: Output? = null,
public val location: Output? = null,
public val name: Output? = null,
public val orgCreationSource: Output? = null,
public val organizationId: Output? = null,
public val plan: Output? = null,
public val resourceGroupName: Output? = null,
public val user: Output? = null,
public val userId: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azure.newrelic.MonitorArgs =
com.pulumi.azure.newrelic.MonitorArgs.builder()
.accountCreationSource(accountCreationSource?.applyValue({ args0 -> args0 }))
.accountId(accountId?.applyValue({ args0 -> args0 }))
.ingestionKey(ingestionKey?.applyValue({ args0 -> args0 }))
.location(location?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.orgCreationSource(orgCreationSource?.applyValue({ args0 -> args0 }))
.organizationId(organizationId?.applyValue({ args0 -> args0 }))
.plan(plan?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.user(user?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.userId(userId?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [MonitorArgs].
*/
@PulumiTagMarker
public class MonitorArgsBuilder internal constructor() {
private var accountCreationSource: Output? = null
private var accountId: Output? = null
private var ingestionKey: Output? = null
private var location: Output? = null
private var name: Output? = null
private var orgCreationSource: Output? = null
private var organizationId: Output? = null
private var plan: Output? = null
private var resourceGroupName: Output? = null
private var user: Output? = null
private var userId: Output? = null
/**
* @param value 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.
*/
@JvmName("loqloeynxhckhmku")
public suspend fun accountCreationSource(`value`: Output) {
this.accountCreationSource = value
}
/**
* @param value Specifies the account id. Changing this forces a new Azure Native New Relic Monitor to be created.
* > **NOTE:** The value of `account_id` must come from an Azure Native New Relic Monitor instance of another different subscription.
*/
@JvmName("djxqrxxopgmojptr")
public suspend fun accountId(`value`: Output) {
this.accountId = value
}
/**
* @param value Specifies the ingestion key of account. Changing this forces a new Azure Native New Relic Monitor to be created.
*/
@JvmName("pqibrtqmixqsgqcb")
public suspend fun ingestionKey(`value`: Output) {
this.ingestionKey = value
}
/**
* @param value 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.
*/
@JvmName("mbsjbliddygltckh")
public suspend fun location(`value`: Output) {
this.location = value
}
/**
* @param value 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.
*/
@JvmName("yfdpkqjuwgwuhfsd")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value 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.
*/
@JvmName("nkjilafphwoldoia")
public suspend fun orgCreationSource(`value`: Output) {
this.orgCreationSource = value
}
/**
* @param value Specifies the organization id. Changing this forces a new Azure Native New Relic Monitor to be created.
* > **NOTE:** The value of `organization_id` must come from an Azure Native New Relic Monitor instance of another different subscription.
*/
@JvmName("tfhjpqrnlqwxpjfy")
public suspend fun organizationId(`value`: Output) {
this.organizationId = value
}
/**
* @param value A `plan` block as defined below. Changing this forces a new Azure Native New Relic Monitor to be created.
*/
@JvmName("wcelgnvkigprnmnd")
public suspend fun plan(`value`: Output) {
this.plan = value
}
/**
* @param value 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.
*/
@JvmName("sfuerkktygurunjf")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value A `user` block as defined below. Changing this forces a new Azure Native New Relic Monitor to be created.
*/
@JvmName("yrgkusytahhcxgus")
public suspend fun user(`value`: Output) {
this.user = value
}
/**
* @param value Specifies the user id. Changing this forces a new Azure Native New Relic Monitor to be created.
*/
@JvmName("ehfkuacjyncmoahw")
public suspend fun userId(`value`: Output) {
this.userId = value
}
/**
* @param value 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.
*/
@JvmName("lqfkqdkiywafrpho")
public suspend fun accountCreationSource(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.accountCreationSource = mapped
}
/**
* @param value Specifies the account id. Changing this forces a new Azure Native New Relic Monitor to be created.
* > **NOTE:** The value of `account_id` must come from an Azure Native New Relic Monitor instance of another different subscription.
*/
@JvmName("rvcscpyqpyjeuuwn")
public suspend fun accountId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.accountId = mapped
}
/**
* @param value Specifies the ingestion key of account. Changing this forces a new Azure Native New Relic Monitor to be created.
*/
@JvmName("vsvhyjjkbraoaqkw")
public suspend fun ingestionKey(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.ingestionKey = mapped
}
/**
* @param value 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.
*/
@JvmName("xeafcfetniymygmi")
public suspend fun location(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.location = mapped
}
/**
* @param value 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.
*/
@JvmName("aobxyfefxgwrxheh")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value 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.
*/
@JvmName("kgcqwcskvakacete")
public suspend fun orgCreationSource(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.orgCreationSource = mapped
}
/**
* @param value Specifies the organization id. Changing this forces a new Azure Native New Relic Monitor to be created.
* > **NOTE:** The value of `organization_id` must come from an Azure Native New Relic Monitor instance of another different subscription.
*/
@JvmName("dpgwdrwrihcdxhoh")
public suspend fun organizationId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.organizationId = mapped
}
/**
* @param value A `plan` block as defined below. Changing this forces a new Azure Native New Relic Monitor to be created.
*/
@JvmName("skaxphwkebqvnjix")
public suspend fun plan(`value`: MonitorPlanArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.plan = mapped
}
/**
* @param argument A `plan` block as defined below. Changing this forces a new Azure Native New Relic Monitor to be created.
*/
@JvmName("lyffphbehyroehsq")
public suspend fun plan(argument: suspend MonitorPlanArgsBuilder.() -> Unit) {
val toBeMapped = MonitorPlanArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.plan = mapped
}
/**
* @param value 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.
*/
@JvmName("phpdlvraedpehfxf")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value A `user` block as defined below. Changing this forces a new Azure Native New Relic Monitor to be created.
*/
@JvmName("kfplqlcahgxxwuss")
public suspend fun user(`value`: MonitorUserArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.user = mapped
}
/**
* @param argument A `user` block as defined below. Changing this forces a new Azure Native New Relic Monitor to be created.
*/
@JvmName("rphqbjdabadqbbks")
public suspend fun user(argument: suspend MonitorUserArgsBuilder.() -> Unit) {
val toBeMapped = MonitorUserArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.user = mapped
}
/**
* @param value Specifies the user id. Changing this forces a new Azure Native New Relic Monitor to be created.
*/
@JvmName("dmuugqgtbsefqobs")
public suspend fun userId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.userId = mapped
}
internal fun build(): MonitorArgs = MonitorArgs(
accountCreationSource = accountCreationSource,
accountId = accountId,
ingestionKey = ingestionKey,
location = location,
name = name,
orgCreationSource = orgCreationSource,
organizationId = organizationId,
plan = plan,
resourceGroupName = resourceGroupName,
user = user,
userId = userId,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy