All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azure.monitoring.kotlin.LogzMonitorArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 6.14.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.monitoring.kotlin

import com.pulumi.azure.monitoring.LogzMonitorArgs.builder
import com.pulumi.azure.monitoring.kotlin.inputs.LogzMonitorPlanArgs
import com.pulumi.azure.monitoring.kotlin.inputs.LogzMonitorPlanArgsBuilder
import com.pulumi.azure.monitoring.kotlin.inputs.LogzMonitorUserArgs
import com.pulumi.azure.monitoring.kotlin.inputs.LogzMonitorUserArgsBuilder
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.Boolean
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Manages a logz Monitor.
 * !> **Note:** Logz REST API is being deprecated by Azure and new resources cannot be created. This resource will be removed in version 4.0 of the provider.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example-logz",
 *     location: "West Europe",
 * });
 * const exampleLogzMonitor = new azure.monitoring.LogzMonitor("example", {
 *     name: "example-monitor",
 *     resourceGroupName: example.name,
 *     location: example.location,
 *     plan: {
 *         billingCycle: "MONTHLY",
 *         effectiveDate: "2022-06-06T00:00:00Z",
 *         usageType: "COMMITTED",
 *     },
 *     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-logz",
 *     location="West Europe")
 * example_logz_monitor = azure.monitoring.LogzMonitor("example",
 *     name="example-monitor",
 *     resource_group_name=example.name,
 *     location=example.location,
 *     plan=azure.monitoring.LogzMonitorPlanArgs(
 *         billing_cycle="MONTHLY",
 *         effective_date="2022-06-06T00:00:00Z",
 *         usage_type="COMMITTED",
 *     ),
 *     user=azure.monitoring.LogzMonitorUserArgs(
 *         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-logz",
 *         Location = "West Europe",
 *     });
 *     var exampleLogzMonitor = new Azure.Monitoring.LogzMonitor("example", new()
 *     {
 *         Name = "example-monitor",
 *         ResourceGroupName = example.Name,
 *         Location = example.Location,
 *         Plan = new Azure.Monitoring.Inputs.LogzMonitorPlanArgs
 *         {
 *             BillingCycle = "MONTHLY",
 *             EffectiveDate = "2022-06-06T00:00:00Z",
 *             UsageType = "COMMITTED",
 *         },
 *         User = new Azure.Monitoring.Inputs.LogzMonitorUserArgs
 *         {
 *             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/monitoring"
 * 	"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-logz"),
 * 			Location: pulumi.String("West Europe"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = monitoring.NewLogzMonitor(ctx, "example", &monitoring.LogzMonitorArgs{
 * 			Name:              pulumi.String("example-monitor"),
 * 			ResourceGroupName: example.Name,
 * 			Location:          example.Location,
 * 			Plan: &monitoring.LogzMonitorPlanArgs{
 * 				BillingCycle:  pulumi.String("MONTHLY"),
 * 				EffectiveDate: pulumi.String("2022-06-06T00:00:00Z"),
 * 				UsageType:     pulumi.String("COMMITTED"),
 * 			},
 * 			User: &monitoring.LogzMonitorUserArgs{
 * 				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.monitoring.LogzMonitor;
 * import com.pulumi.azure.monitoring.LogzMonitorArgs;
 * import com.pulumi.azure.monitoring.inputs.LogzMonitorPlanArgs;
 * import com.pulumi.azure.monitoring.inputs.LogzMonitorUserArgs;
 * 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-logz")
 *             .location("West Europe")
 *             .build());
 *         var exampleLogzMonitor = new LogzMonitor("exampleLogzMonitor", LogzMonitorArgs.builder()
 *             .name("example-monitor")
 *             .resourceGroupName(example.name())
 *             .location(example.location())
 *             .plan(LogzMonitorPlanArgs.builder()
 *                 .billingCycle("MONTHLY")
 *                 .effectiveDate("2022-06-06T00:00:00Z")
 *                 .usageType("COMMITTED")
 *                 .build())
 *             .user(LogzMonitorUserArgs.builder()
 *                 .email("[email protected]")
 *                 .firstName("Example")
 *                 .lastName("User")
 *                 .phoneNumber("+12313803556")
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: example-logz
 *       location: West Europe
 *   exampleLogzMonitor:
 *     type: azure:monitoring:LogzMonitor
 *     name: example
 *     properties:
 *       name: example-monitor
 *       resourceGroupName: ${example.name}
 *       location: ${example.location}
 *       plan:
 *         billingCycle: MONTHLY
 *         effectiveDate: 2022-06-06T00:00:00Z
 *         usageType: COMMITTED
 *       user:
 *         email: [email protected]
 *         firstName: Example
 *         lastName: User
 *         phoneNumber: '+12313803556'
 * ```
 * 
 * ## Import
 * logz Monitors can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:monitoring/logzMonitor:LogzMonitor example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Logz/monitors/monitor1
 * ```
 * @property companyName Name of the Logz organization. Changing this forces a new logz Monitor to be created.
 * @property enabled Whether the resource monitoring is enabled? Defaults to `true`.
 * @property enterpriseAppId The ID of the Enterprise App. Changing this forces a new logz Monitor to be created.
 * > **NOTE** Please follow [Set up Logz.io single sign-on](https://docs.microsoft.com/azure/partner-solutions/logzio/setup-sso) to create the ID of the Enterprise App.
 * @property location The Azure Region where the logz Monitor should exist. Changing this forces a new logz Monitor to be created.
 * @property name The name which should be used for this logz Monitor. Changing this forces a new logz Monitor to be created.
 * @property plan A `plan` block as defined below. Changing this forces a new resource to be created.
 * @property resourceGroupName The name of the Resource Group where the logz Monitor should exist. Changing this forces a new logz Monitor to be created.
 * @property tags A mapping of tags which should be assigned to the logz Monitor.
 * @property user A `user` block as defined below. Changing this forces a new resource to be created.
 */
public data class LogzMonitorArgs(
    public val companyName: Output? = null,
    public val enabled: Output? = null,
    public val enterpriseAppId: Output? = null,
    public val location: Output? = null,
    public val name: Output? = null,
    public val plan: Output? = null,
    public val resourceGroupName: Output? = null,
    public val tags: Output>? = null,
    public val user: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.monitoring.LogzMonitorArgs =
        com.pulumi.azure.monitoring.LogzMonitorArgs.builder()
            .companyName(companyName?.applyValue({ args0 -> args0 }))
            .enabled(enabled?.applyValue({ args0 -> args0 }))
            .enterpriseAppId(enterpriseAppId?.applyValue({ args0 -> args0 }))
            .location(location?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .plan(plan?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .user(user?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [LogzMonitorArgs].
 */
@PulumiTagMarker
public class LogzMonitorArgsBuilder internal constructor() {
    private var companyName: Output? = null

    private var enabled: Output? = null

    private var enterpriseAppId: Output? = null

    private var location: Output? = null

    private var name: Output? = null

    private var plan: Output? = null

    private var resourceGroupName: Output? = null

    private var tags: Output>? = null

    private var user: Output? = null

    /**
     * @param value Name of the Logz organization. Changing this forces a new logz Monitor to be created.
     */
    @JvmName("akihmnmuinfuhbni")
    public suspend fun companyName(`value`: Output) {
        this.companyName = value
    }

    /**
     * @param value Whether the resource monitoring is enabled? Defaults to `true`.
     */
    @JvmName("hipruyrstscdfmkr")
    public suspend fun enabled(`value`: Output) {
        this.enabled = value
    }

    /**
     * @param value The ID of the Enterprise App. Changing this forces a new logz Monitor to be created.
     * > **NOTE** Please follow [Set up Logz.io single sign-on](https://docs.microsoft.com/azure/partner-solutions/logzio/setup-sso) to create the ID of the Enterprise App.
     */
    @JvmName("onfllvmgadxgrpep")
    public suspend fun enterpriseAppId(`value`: Output) {
        this.enterpriseAppId = value
    }

    /**
     * @param value The Azure Region where the logz Monitor should exist. Changing this forces a new logz Monitor to be created.
     */
    @JvmName("ndgfrqkqdwgjdbny")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value The name which should be used for this logz Monitor. Changing this forces a new logz Monitor to be created.
     */
    @JvmName("ixhrhdqxrwekjkds")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value A `plan` block as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("ltwvqxuysixeyqvy")
    public suspend fun plan(`value`: Output) {
        this.plan = value
    }

    /**
     * @param value The name of the Resource Group where the logz Monitor should exist. Changing this forces a new logz Monitor to be created.
     */
    @JvmName("yjbsbeqeykpanqmw")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value A mapping of tags which should be assigned to the logz Monitor.
     */
    @JvmName("yvywisigrxchfwbh")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value A `user` block as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("aerevcblibmstjad")
    public suspend fun user(`value`: Output) {
        this.user = value
    }

    /**
     * @param value Name of the Logz organization. Changing this forces a new logz Monitor to be created.
     */
    @JvmName("vrardkcguovehwsf")
    public suspend fun companyName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.companyName = mapped
    }

    /**
     * @param value Whether the resource monitoring is enabled? Defaults to `true`.
     */
    @JvmName("fqbqjyjuryiqpnxa")
    public suspend fun enabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enabled = mapped
    }

    /**
     * @param value The ID of the Enterprise App. Changing this forces a new logz Monitor to be created.
     * > **NOTE** Please follow [Set up Logz.io single sign-on](https://docs.microsoft.com/azure/partner-solutions/logzio/setup-sso) to create the ID of the Enterprise App.
     */
    @JvmName("phxgrwfhqidvmlyj")
    public suspend fun enterpriseAppId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enterpriseAppId = mapped
    }

    /**
     * @param value The Azure Region where the logz Monitor should exist. Changing this forces a new logz Monitor to be created.
     */
    @JvmName("ckkwcotmrskhsdrl")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value The name which should be used for this logz Monitor. Changing this forces a new logz Monitor to be created.
     */
    @JvmName("jjgdivjljmpvjfoh")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value A `plan` block as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("tuwyrplvxvkamkfu")
    public suspend fun plan(`value`: LogzMonitorPlanArgs?) {
        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 resource to be created.
     */
    @JvmName("dhbtvnwbjidcatow")
    public suspend fun plan(argument: suspend LogzMonitorPlanArgsBuilder.() -> Unit) {
        val toBeMapped = LogzMonitorPlanArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.plan = mapped
    }

    /**
     * @param value The name of the Resource Group where the logz Monitor should exist. Changing this forces a new logz Monitor to be created.
     */
    @JvmName("nnlqpxxqnyeorjyx")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value A mapping of tags which should be assigned to the logz Monitor.
     */
    @JvmName("kftfbekrfhelmawf")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values A mapping of tags which should be assigned to the logz Monitor.
     */
    @JvmName("iopdqbckipoflxmp")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value A `user` block as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("aaoajhypvjbwsour")
    public suspend fun user(`value`: LogzMonitorUserArgs?) {
        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 resource to be created.
     */
    @JvmName("uxrwuvylprfpqshn")
    public suspend fun user(argument: suspend LogzMonitorUserArgsBuilder.() -> Unit) {
        val toBeMapped = LogzMonitorUserArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.user = mapped
    }

    internal fun build(): LogzMonitorArgs = LogzMonitorArgs(
        companyName = companyName,
        enabled = enabled,
        enterpriseAppId = enterpriseAppId,
        location = location,
        name = name,
        plan = plan,
        resourceGroupName = resourceGroupName,
        tags = tags,
        user = user,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy