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

com.pulumi.azurenative.logz.kotlin.MetricsSourceArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.logz.kotlin

import com.pulumi.azurenative.logz.MetricsSourceArgs.builder
import com.pulumi.azurenative.logz.kotlin.inputs.IdentityPropertiesArgs
import com.pulumi.azurenative.logz.kotlin.inputs.IdentityPropertiesArgsBuilder
import com.pulumi.azurenative.logz.kotlin.inputs.MonitorPropertiesArgs
import com.pulumi.azurenative.logz.kotlin.inputs.MonitorPropertiesArgsBuilder
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.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 *
 * Azure REST API version: 2022-01-01-preview. Prior API version in Azure Native 1.x: 2022-01-01-preview.
 * ## Example Usage
 * ### metricsSource_Create
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var metricsSource = new AzureNative.Logz.MetricsSource("metricsSource", new()
 *     {
 *         MetricsSourceName = "MetricsSource1",
 *         MonitorName = "myMonitor",
 *         ResourceGroupName = "myResourceGroup",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	logz "github.com/pulumi/pulumi-azure-native-sdk/logz/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := logz.NewMetricsSource(ctx, "metricsSource", &logz.MetricsSourceArgs{
 * 			MetricsSourceName: pulumi.String("MetricsSource1"),
 * 			MonitorName:       pulumi.String("myMonitor"),
 * 			ResourceGroupName: pulumi.String("myResourceGroup"),
 * 		})
 * 		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.azurenative.logz.MetricsSource;
 * import com.pulumi.azurenative.logz.MetricsSourceArgs;
 * 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 metricsSource = new MetricsSource("metricsSource", MetricsSourceArgs.builder()
 *             .metricsSourceName("MetricsSource1")
 *             .monitorName("myMonitor")
 *             .resourceGroupName("myResourceGroup")
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:logz:MetricsSource myMonitor /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}/metricsSource/{metricsSourceName}
 * ```
 * @property identity
 * @property location
 * @property metricsSourceName Metrics Account resource name
 * @property monitorName Monitor resource name
 * @property properties Properties specific to the monitor resource.
 * @property resourceGroupName The name of the resource group. The name is case insensitive.
 * @property tags
 */
public data class MetricsSourceArgs(
    public val identity: Output? = null,
    public val location: Output? = null,
    public val metricsSourceName: Output? = null,
    public val monitorName: Output? = null,
    public val properties: Output? = null,
    public val resourceGroupName: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.logz.MetricsSourceArgs =
        com.pulumi.azurenative.logz.MetricsSourceArgs.builder()
            .identity(identity?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .location(location?.applyValue({ args0 -> args0 }))
            .metricsSourceName(metricsSourceName?.applyValue({ args0 -> args0 }))
            .monitorName(monitorName?.applyValue({ args0 -> args0 }))
            .properties(properties?.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()
                }),
            ).build()
}

/**
 * Builder for [MetricsSourceArgs].
 */
@PulumiTagMarker
public class MetricsSourceArgsBuilder internal constructor() {
    private var identity: Output? = null

    private var location: Output? = null

    private var metricsSourceName: Output? = null

    private var monitorName: Output? = null

    private var properties: Output? = null

    private var resourceGroupName: Output? = null

    private var tags: Output>? = null

    /**
     * @param value
     */
    @JvmName("kllvakcuubrqmivu")
    public suspend fun identity(`value`: Output) {
        this.identity = value
    }

    /**
     * @param value
     */
    @JvmName("bnbbwgbeqoogexjc")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value Metrics Account resource name
     */
    @JvmName("eoldmiemwfkbrqgq")
    public suspend fun metricsSourceName(`value`: Output) {
        this.metricsSourceName = value
    }

    /**
     * @param value Monitor resource name
     */
    @JvmName("vdllvhnvuegmxynf")
    public suspend fun monitorName(`value`: Output) {
        this.monitorName = value
    }

    /**
     * @param value Properties specific to the monitor resource.
     */
    @JvmName("gslknyhqusyukytm")
    public suspend fun properties(`value`: Output) {
        this.properties = value
    }

    /**
     * @param value The name of the resource group. The name is case insensitive.
     */
    @JvmName("jpjvyuscuxkjckax")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value
     */
    @JvmName("fhnndbhulmjeauwh")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value
     */
    @JvmName("mpsyfhhbaxctjglv")
    public suspend fun identity(`value`: IdentityPropertiesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.identity = mapped
    }

    /**
     * @param argument
     */
    @JvmName("xhayqbpybuwsyijt")
    public suspend fun identity(argument: suspend IdentityPropertiesArgsBuilder.() -> Unit) {
        val toBeMapped = IdentityPropertiesArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.identity = mapped
    }

    /**
     * @param value
     */
    @JvmName("fgbitinsswpkwcfi")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value Metrics Account resource name
     */
    @JvmName("bhkdljalvbvklvnp")
    public suspend fun metricsSourceName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.metricsSourceName = mapped
    }

    /**
     * @param value Monitor resource name
     */
    @JvmName("pshyxtnksjximryn")
    public suspend fun monitorName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.monitorName = mapped
    }

    /**
     * @param value Properties specific to the monitor resource.
     */
    @JvmName("nmuufvokledsbvqo")
    public suspend fun properties(`value`: MonitorPropertiesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.properties = mapped
    }

    /**
     * @param argument Properties specific to the monitor resource.
     */
    @JvmName("xmokmixgkjsuotpy")
    public suspend fun properties(argument: suspend MonitorPropertiesArgsBuilder.() -> Unit) {
        val toBeMapped = MonitorPropertiesArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.properties = mapped
    }

    /**
     * @param value The name of the resource group. The name is case insensitive.
     */
    @JvmName("mmdeusjttwhmiaxd")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value
     */
    @JvmName("lsrbbhbayvaqqefm")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values
     */
    @JvmName("hkctwwckywrvegls")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): MetricsSourceArgs = MetricsSourceArgs(
        identity = identity,
        location = location,
        metricsSourceName = metricsSourceName,
        monitorName = monitorName,
        properties = properties,
        resourceGroupName = resourceGroupName,
        tags = tags,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy