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

com.pulumi.azure.elasticsan.kotlin.ElasticSanArgs.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.15.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.elasticsan.kotlin

import com.pulumi.azure.elasticsan.ElasticSanArgs.builder
import com.pulumi.azure.elasticsan.kotlin.inputs.ElasticSanSkuArgs
import com.pulumi.azure.elasticsan.kotlin.inputs.ElasticSanSkuArgsBuilder
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.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Manages an Elastic SAN resource.
 * ## 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: "West Europe",
 * });
 * const exampleElasticSan = new azure.elasticsan.ElasticSan("example", {
 *     name: "example",
 *     resourceGroupName: example.name,
 *     location: example.location,
 *     baseSizeInTib: 1,
 *     extendedSizeInTib: 2,
 *     sku: {
 *         name: "example-value",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="example-resources",
 *     location="West Europe")
 * example_elastic_san = azure.elasticsan.ElasticSan("example",
 *     name="example",
 *     resource_group_name=example.name,
 *     location=example.location,
 *     base_size_in_tib=1,
 *     extended_size_in_tib=2,
 *     sku={
 *         "name": "example-value",
 *     })
 * ```
 * ```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 = "West Europe",
 *     });
 *     var exampleElasticSan = new Azure.ElasticSan.ElasticSan("example", new()
 *     {
 *         Name = "example",
 *         ResourceGroupName = example.Name,
 *         Location = example.Location,
 *         BaseSizeInTib = 1,
 *         ExtendedSizeInTib = 2,
 *         Sku = new Azure.ElasticSan.Inputs.ElasticSanSkuArgs
 *         {
 *             Name = "example-value",
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/elasticsan"
 * 	"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("West Europe"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = elasticsan.NewElasticSan(ctx, "example", &elasticsan.ElasticSanArgs{
 * 			Name:              pulumi.String("example"),
 * 			ResourceGroupName: example.Name,
 * 			Location:          example.Location,
 * 			BaseSizeInTib:     pulumi.Int(1),
 * 			ExtendedSizeInTib: pulumi.Int(2),
 * 			Sku: &elasticsan.ElasticSanSkuArgs{
 * 				Name: pulumi.String("example-value"),
 * 			},
 * 		})
 * 		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.elasticsan.ElasticSan;
 * import com.pulumi.azure.elasticsan.ElasticSanArgs;
 * import com.pulumi.azure.elasticsan.inputs.ElasticSanSkuArgs;
 * 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("West Europe")
 *             .build());
 *         var exampleElasticSan = new ElasticSan("exampleElasticSan", ElasticSanArgs.builder()
 *             .name("example")
 *             .resourceGroupName(example.name())
 *             .location(example.location())
 *             .baseSizeInTib(1)
 *             .extendedSizeInTib(2)
 *             .sku(ElasticSanSkuArgs.builder()
 *                 .name("example-value")
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: example-resources
 *       location: West Europe
 *   exampleElasticSan:
 *     type: azure:elasticsan:ElasticSan
 *     name: example
 *     properties:
 *       name: example
 *       resourceGroupName: ${example.name}
 *       location: ${example.location}
 *       baseSizeInTib: 1
 *       extendedSizeInTib: 2
 *       sku:
 *         name: example-value
 * ```
 * 
 * ## Import
 * An existing Elastic SAN can be imported into Terraform using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:elasticsan/elasticSan:ElasticSan example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ElasticSan/elasticSans/esan1
 * ```
 * @property baseSizeInTib Specifies the base size of the Elastic SAN resource in TiB. Possible values are between `1` and `100`.
 * > **NOTE** When updating `base_size_in_tib`, the new value should be greater than the existing one.
 * @property extendedSizeInTib Specifies the extended size of the Elastic SAN resource in TiB. Possible values are between `1` and `100`.
 * > **NOTE** `extended_size_in_tib` cannot be removed and when updating, the new value should be greater than the existing one.
 * @property location The Azure Region where the Elastic SAN resource should exist. Changing this forces a new resource to be created.
 * @property name Specifies the name of this Elastic SAN resource. Changing this forces a new resource to be created.
 * @property resourceGroupName Specifies the name of the Resource Group within which this Elastic SAN resource should exist. Changing this forces a new resource to be created.
 * @property sku A `sku` block as defined below.
 * @property tags A mapping of tags which should be assigned to the Elastic SAN resource.
 * @property zones Logical zone for the Elastic SAN resource. Changing this forces a new resource to be created.
 * > **NOTE** `zones` cannot be specified if `sku.name` is set to `Premium_ZRS`.
 */
public data class ElasticSanArgs(
    public val baseSizeInTib: Output? = null,
    public val extendedSizeInTib: Output? = null,
    public val location: Output? = null,
    public val name: Output? = null,
    public val resourceGroupName: Output? = null,
    public val sku: Output? = null,
    public val tags: Output>? = null,
    public val zones: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.elasticsan.ElasticSanArgs =
        com.pulumi.azure.elasticsan.ElasticSanArgs.builder()
            .baseSizeInTib(baseSizeInTib?.applyValue({ args0 -> args0 }))
            .extendedSizeInTib(extendedSizeInTib?.applyValue({ args0 -> args0 }))
            .location(location?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .sku(sku?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .zones(zones?.applyValue({ args0 -> args0.map({ args0 -> args0 }) })).build()
}

/**
 * Builder for [ElasticSanArgs].
 */
@PulumiTagMarker
public class ElasticSanArgsBuilder internal constructor() {
    private var baseSizeInTib: Output? = null

    private var extendedSizeInTib: Output? = null

    private var location: Output? = null

    private var name: Output? = null

    private var resourceGroupName: Output? = null

    private var sku: Output? = null

    private var tags: Output>? = null

    private var zones: Output>? = null

    /**
     * @param value Specifies the base size of the Elastic SAN resource in TiB. Possible values are between `1` and `100`.
     * > **NOTE** When updating `base_size_in_tib`, the new value should be greater than the existing one.
     */
    @JvmName("cscookdmicubgtvm")
    public suspend fun baseSizeInTib(`value`: Output) {
        this.baseSizeInTib = value
    }

    /**
     * @param value Specifies the extended size of the Elastic SAN resource in TiB. Possible values are between `1` and `100`.
     * > **NOTE** `extended_size_in_tib` cannot be removed and when updating, the new value should be greater than the existing one.
     */
    @JvmName("kuxdoejcfabtoahg")
    public suspend fun extendedSizeInTib(`value`: Output) {
        this.extendedSizeInTib = value
    }

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

    /**
     * @param value Specifies the name of this Elastic SAN resource. Changing this forces a new resource to be created.
     */
    @JvmName("kwmyiunvvydadhjs")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Specifies the name of the Resource Group within which this Elastic SAN resource should exist. Changing this forces a new resource to be created.
     */
    @JvmName("owmujkvnmksijmhk")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value A `sku` block as defined below.
     */
    @JvmName("xfhahvynksnenocx")
    public suspend fun sku(`value`: Output) {
        this.sku = value
    }

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

    /**
     * @param value Logical zone for the Elastic SAN resource. Changing this forces a new resource to be created.
     * > **NOTE** `zones` cannot be specified if `sku.name` is set to `Premium_ZRS`.
     */
    @JvmName("uyypimtmpbwdovki")
    public suspend fun zones(`value`: Output>) {
        this.zones = value
    }

    @JvmName("rygpueqapbehojcp")
    public suspend fun zones(vararg values: Output) {
        this.zones = Output.all(values.asList())
    }

    /**
     * @param values Logical zone for the Elastic SAN resource. Changing this forces a new resource to be created.
     * > **NOTE** `zones` cannot be specified if `sku.name` is set to `Premium_ZRS`.
     */
    @JvmName("didrgiodtdsrrdji")
    public suspend fun zones(values: List>) {
        this.zones = Output.all(values)
    }

    /**
     * @param value Specifies the base size of the Elastic SAN resource in TiB. Possible values are between `1` and `100`.
     * > **NOTE** When updating `base_size_in_tib`, the new value should be greater than the existing one.
     */
    @JvmName("wobmrcmebngqgxpm")
    public suspend fun baseSizeInTib(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.baseSizeInTib = mapped
    }

    /**
     * @param value Specifies the extended size of the Elastic SAN resource in TiB. Possible values are between `1` and `100`.
     * > **NOTE** `extended_size_in_tib` cannot be removed and when updating, the new value should be greater than the existing one.
     */
    @JvmName("osfoqrpvjvavxibm")
    public suspend fun extendedSizeInTib(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.extendedSizeInTib = mapped
    }

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

    /**
     * @param value Specifies the name of this Elastic SAN resource. Changing this forces a new resource to be created.
     */
    @JvmName("smkaptnvsnponnln")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Specifies the name of the Resource Group within which this Elastic SAN resource should exist. Changing this forces a new resource to be created.
     */
    @JvmName("rsctwgafeikdjuif")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value A `sku` block as defined below.
     */
    @JvmName("anigeyrexhbocrte")
    public suspend fun sku(`value`: ElasticSanSkuArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sku = mapped
    }

    /**
     * @param argument A `sku` block as defined below.
     */
    @JvmName("ijosylygrhbnfevm")
    public suspend fun sku(argument: suspend ElasticSanSkuArgsBuilder.() -> Unit) {
        val toBeMapped = ElasticSanSkuArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.sku = mapped
    }

    /**
     * @param value A mapping of tags which should be assigned to the Elastic SAN resource.
     */
    @JvmName("xlbvrcophsqaqsac")
    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 Elastic SAN resource.
     */
    @JvmName("wpyiqgdwgfsrumdj")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value Logical zone for the Elastic SAN resource. Changing this forces a new resource to be created.
     * > **NOTE** `zones` cannot be specified if `sku.name` is set to `Premium_ZRS`.
     */
    @JvmName("jkppdmndagdtiblk")
    public suspend fun zones(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.zones = mapped
    }

    /**
     * @param values Logical zone for the Elastic SAN resource. Changing this forces a new resource to be created.
     * > **NOTE** `zones` cannot be specified if `sku.name` is set to `Premium_ZRS`.
     */
    @JvmName("rwgwowerwjmipass")
    public suspend fun zones(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.zones = mapped
    }

    internal fun build(): ElasticSanArgs = ElasticSanArgs(
        baseSizeInTib = baseSizeInTib,
        extendedSizeInTib = extendedSizeInTib,
        location = location,
        name = name,
        resourceGroupName = resourceGroupName,
        sku = sku,
        tags = tags,
        zones = zones,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy