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

com.pulumi.azurenative.iotoperations.kotlin.InstanceArgs.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: 2.82.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.iotoperations.kotlin

import com.pulumi.azurenative.iotoperations.InstanceArgs.builder
import com.pulumi.azurenative.iotoperations.kotlin.inputs.ExtendedLocationArgs
import com.pulumi.azurenative.iotoperations.kotlin.inputs.ExtendedLocationArgsBuilder
import com.pulumi.azurenative.iotoperations.kotlin.inputs.InstancePropertiesArgs
import com.pulumi.azurenative.iotoperations.kotlin.inputs.InstancePropertiesArgsBuilder
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

/**
 * A Instance resource is a logical container for a set of child resources.
 * Azure REST API version: 2024-07-01-preview.
 * Other available API versions: 2024-08-15-preview.
 * ## Example Usage
 * ### Instance_CreateOrUpdate
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var instance = new AzureNative.IoTOperations.Instance("instance", new()
 *     {
 *         ExtendedLocation = new AzureNative.IoTOperations.Inputs.ExtendedLocationArgs
 *         {
 *             Name = "ycsyubcxttlusbhfdqaynmkaatnbyv",
 *             Type = AzureNative.IoTOperations.ExtendedLocationType.CustomLocation,
 *         },
 *         InstanceName = "aio-instance",
 *         Location = "czsmfboasaojyvzyujdk",
 *         Properties = new AzureNative.IoTOperations.Inputs.InstancePropertiesArgs
 *         {
 *             Description = "ferqjhhlqtx",
 *         },
 *         ResourceGroupName = "rgiotoperations",
 *         Tags =
 *         {
 *             { "key1055", "edezherbbf" },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	iotoperations "github.com/pulumi/pulumi-azure-native-sdk/iotoperations/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := iotoperations.NewInstance(ctx, "instance", &iotoperations.InstanceArgs{
 * 			ExtendedLocation: &iotoperations.ExtendedLocationArgs{
 * 				Name: pulumi.String("ycsyubcxttlusbhfdqaynmkaatnbyv"),
 * 				Type: pulumi.String(iotoperations.ExtendedLocationTypeCustomLocation),
 * 			},
 * 			InstanceName: pulumi.String("aio-instance"),
 * 			Location:     pulumi.String("czsmfboasaojyvzyujdk"),
 * 			Properties: &iotoperations.InstancePropertiesArgs{
 * 				Description: pulumi.String("ferqjhhlqtx"),
 * 			},
 * 			ResourceGroupName: pulumi.String("rgiotoperations"),
 * 			Tags: pulumi.StringMap{
 * 				"key1055": pulumi.String("edezherbbf"),
 * 			},
 * 		})
 * 		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.iotoperations.Instance;
 * import com.pulumi.azurenative.iotoperations.InstanceArgs;
 * import com.pulumi.azurenative.iotoperations.inputs.ExtendedLocationArgs;
 * import com.pulumi.azurenative.iotoperations.inputs.InstancePropertiesArgs;
 * 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 instance = new Instance("instance", InstanceArgs.builder()
 *             .extendedLocation(ExtendedLocationArgs.builder()
 *                 .name("ycsyubcxttlusbhfdqaynmkaatnbyv")
 *                 .type("CustomLocation")
 *                 .build())
 *             .instanceName("aio-instance")
 *             .location("czsmfboasaojyvzyujdk")
 *             .properties(InstancePropertiesArgs.builder()
 *                 .description("ferqjhhlqtx")
 *                 .build())
 *             .resourceGroupName("rgiotoperations")
 *             .tags(Map.of("key1055", "edezherbbf"))
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:iotoperations:Instance jvxyquuoyhdawdumes /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}
 * ```
 * @property extendedLocation Edge location of the resource.
 * @property instanceName Name of instance.
 * @property location The geo-location where the resource lives
 * @property properties The resource-specific properties for this resource.
 * @property resourceGroupName The name of the resource group. The name is case insensitive.
 * @property tags Resource tags.
 */
public data class InstanceArgs(
    public val extendedLocation: Output? = null,
    public val instanceName: Output? = null,
    public val location: Output? = null,
    public val properties: Output? = null,
    public val resourceGroupName: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.iotoperations.InstanceArgs =
        com.pulumi.azurenative.iotoperations.InstanceArgs.builder()
            .extendedLocation(extendedLocation?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .instanceName(instanceName?.applyValue({ args0 -> args0 }))
            .location(location?.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 [InstanceArgs].
 */
@PulumiTagMarker
public class InstanceArgsBuilder internal constructor() {
    private var extendedLocation: Output? = null

    private var instanceName: Output? = null

    private var location: Output? = null

    private var properties: Output? = null

    private var resourceGroupName: Output? = null

    private var tags: Output>? = null

    /**
     * @param value Edge location of the resource.
     */
    @JvmName("aqmlibmvtwbxdpum")
    public suspend fun extendedLocation(`value`: Output) {
        this.extendedLocation = value
    }

    /**
     * @param value Name of instance.
     */
    @JvmName("wqtkyqtowdaawdmh")
    public suspend fun instanceName(`value`: Output) {
        this.instanceName = value
    }

    /**
     * @param value The geo-location where the resource lives
     */
    @JvmName("ndwdiluxrpwlffbd")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value The resource-specific properties for this resource.
     */
    @JvmName("xjhgvypdmfkwdmtj")
    public suspend fun properties(`value`: Output) {
        this.properties = value
    }

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

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

    /**
     * @param value Edge location of the resource.
     */
    @JvmName("yhqxnifqwoihmird")
    public suspend fun extendedLocation(`value`: ExtendedLocationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.extendedLocation = mapped
    }

    /**
     * @param argument Edge location of the resource.
     */
    @JvmName("cfbooadhrronming")
    public suspend fun extendedLocation(argument: suspend ExtendedLocationArgsBuilder.() -> Unit) {
        val toBeMapped = ExtendedLocationArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.extendedLocation = mapped
    }

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

    /**
     * @param value The geo-location where the resource lives
     */
    @JvmName("wmdtgfefegjrwckp")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value The resource-specific properties for this resource.
     */
    @JvmName("bwkpbdapfkjuanfc")
    public suspend fun properties(`value`: InstancePropertiesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.properties = mapped
    }

    /**
     * @param argument The resource-specific properties for this resource.
     */
    @JvmName("gwetvgaawdbjevyo")
    public suspend fun properties(argument: suspend InstancePropertiesArgsBuilder.() -> Unit) {
        val toBeMapped = InstancePropertiesArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.properties = mapped
    }

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

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

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

    internal fun build(): InstanceArgs = InstanceArgs(
        extendedLocation = extendedLocation,
        instanceName = instanceName,
        location = location,
        properties = properties,
        resourceGroupName = resourceGroupName,
        tags = tags,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy