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

com.pulumi.azurenative.elasticsan.kotlin.VolumeGroupArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.elasticsan.kotlin

import com.pulumi.azurenative.elasticsan.VolumeGroupArgs.builder
import com.pulumi.azurenative.elasticsan.kotlin.enums.EncryptionType
import com.pulumi.azurenative.elasticsan.kotlin.enums.StorageTargetType
import com.pulumi.azurenative.elasticsan.kotlin.inputs.NetworkRuleSetArgs
import com.pulumi.azurenative.elasticsan.kotlin.inputs.NetworkRuleSetArgsBuilder
import com.pulumi.core.Either
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

/**
 * Response for Volume Group request.
 * Azure REST API version: 2021-11-20-preview. Prior API version in Azure Native 1.x: 2021-11-20-preview.
 * Other available API versions: 2022-12-01-preview, 2023-01-01, 2024-05-01.
 * ## Example Usage
 * ### VolumeGroups_Create_MaximumSet_Gen
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var volumeGroup = new AzureNative.ElasticSan.VolumeGroup("volumeGroup", new()
 *     {
 *         ElasticSanName = "ti7q-k952-1qB3J_5",
 *         Encryption = AzureNative.ElasticSan.EncryptionType.EncryptionAtRestWithPlatformKey,
 *         NetworkAcls = new AzureNative.ElasticSan.Inputs.NetworkRuleSetArgs
 *         {
 *             VirtualNetworkRules = new[]
 *             {
 *                 new AzureNative.ElasticSan.Inputs.VirtualNetworkRuleArgs
 *                 {
 *                     Action = AzureNative.ElasticSan.Action.Allow,
 *                     VirtualNetworkResourceId = "aaaaaaaaaaaaaaaa",
 *                 },
 *             },
 *         },
 *         ProtocolType = AzureNative.ElasticSan.StorageTargetType.Iscsi,
 *         ResourceGroupName = "rgelasticsan",
 *         Tags =
 *         {
 *             { "key5933", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa" },
 *         },
 *         VolumeGroupName = "u_5I_1j4t3",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	elasticsan "github.com/pulumi/pulumi-azure-native-sdk/elasticsan/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := elasticsan.NewVolumeGroup(ctx, "volumeGroup", &elasticsan.VolumeGroupArgs{
 * 			ElasticSanName: pulumi.String("ti7q-k952-1qB3J_5"),
 * 			Encryption:     pulumi.String(elasticsan.EncryptionTypeEncryptionAtRestWithPlatformKey),
 * 			NetworkAcls: &elasticsan.NetworkRuleSetArgs{
 * 				VirtualNetworkRules: elasticsan.VirtualNetworkRuleArray{
 * 					&elasticsan.VirtualNetworkRuleArgs{
 * 						Action:                   elasticsan.ActionAllow,
 * 						VirtualNetworkResourceId: pulumi.String("aaaaaaaaaaaaaaaa"),
 * 					},
 * 				},
 * 			},
 * 			ProtocolType:      pulumi.String(elasticsan.StorageTargetTypeIscsi),
 * 			ResourceGroupName: pulumi.String("rgelasticsan"),
 * 			Tags: pulumi.StringMap{
 * 				"key5933": pulumi.String("aaaaaaaaaaaaaaaaaaaaaaaaaaaaa"),
 * 			},
 * 			VolumeGroupName: pulumi.String("u_5I_1j4t3"),
 * 		})
 * 		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.elasticsan.VolumeGroup;
 * import com.pulumi.azurenative.elasticsan.VolumeGroupArgs;
 * import com.pulumi.azurenative.elasticsan.inputs.NetworkRuleSetArgs;
 * 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 volumeGroup = new VolumeGroup("volumeGroup", VolumeGroupArgs.builder()
 *             .elasticSanName("ti7q-k952-1qB3J_5")
 *             .encryption("EncryptionAtRestWithPlatformKey")
 *             .networkAcls(NetworkRuleSetArgs.builder()
 *                 .virtualNetworkRules(VirtualNetworkRuleArgs.builder()
 *                     .action("Allow")
 *                     .virtualNetworkResourceId("aaaaaaaaaaaaaaaa")
 *                     .build())
 *                 .build())
 *             .protocolType("Iscsi")
 *             .resourceGroupName("rgelasticsan")
 *             .tags(Map.of("key5933", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
 *             .volumeGroupName("u_5I_1j4t3")
 *             .build());
 *     }
 * }
 * ```
 * ### VolumeGroups_Create_MinimumSet_Gen
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var volumeGroup = new AzureNative.ElasticSan.VolumeGroup("volumeGroup", new()
 *     {
 *         ElasticSanName = "ti7q-k952-1qB3J_5",
 *         ResourceGroupName = "rgelasticsan",
 *         VolumeGroupName = "u_5I_1j4t3",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	elasticsan "github.com/pulumi/pulumi-azure-native-sdk/elasticsan/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := elasticsan.NewVolumeGroup(ctx, "volumeGroup", &elasticsan.VolumeGroupArgs{
 * 			ElasticSanName:    pulumi.String("ti7q-k952-1qB3J_5"),
 * 			ResourceGroupName: pulumi.String("rgelasticsan"),
 * 			VolumeGroupName:   pulumi.String("u_5I_1j4t3"),
 * 		})
 * 		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.elasticsan.VolumeGroup;
 * import com.pulumi.azurenative.elasticsan.VolumeGroupArgs;
 * 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 volumeGroup = new VolumeGroup("volumeGroup", VolumeGroupArgs.builder()
 *             .elasticSanName("ti7q-k952-1qB3J_5")
 *             .resourceGroupName("rgelasticsan")
 *             .volumeGroupName("u_5I_1j4t3")
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:elasticsan:VolumeGroup aaaaaaaaaaaaaaaaaaaaaa /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}
 * ```
 * @property elasticSanName The name of the ElasticSan.
 * @property encryption Type of encryption
 * @property networkAcls A collection of rules governing the accessibility from specific network locations.
 * @property protocolType Type of storage target
 * @property resourceGroupName The name of the resource group. The name is case insensitive.
 * @property tags Azure resource tags.
 * @property volumeGroupName The name of the VolumeGroup.
 */
public data class VolumeGroupArgs(
    public val elasticSanName: Output? = null,
    public val encryption: Output>? = null,
    public val networkAcls: Output? = null,
    public val protocolType: Output>? = null,
    public val resourceGroupName: Output? = null,
    public val tags: Output>? = null,
    public val volumeGroupName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.elasticsan.VolumeGroupArgs =
        com.pulumi.azurenative.elasticsan.VolumeGroupArgs.builder()
            .elasticSanName(elasticSanName?.applyValue({ args0 -> args0 }))
            .encryption(
                encryption?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .networkAcls(networkAcls?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .protocolType(
                protocolType?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .volumeGroupName(volumeGroupName?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [VolumeGroupArgs].
 */
@PulumiTagMarker
public class VolumeGroupArgsBuilder internal constructor() {
    private var elasticSanName: Output? = null

    private var encryption: Output>? = null

    private var networkAcls: Output? = null

    private var protocolType: Output>? = null

    private var resourceGroupName: Output? = null

    private var tags: Output>? = null

    private var volumeGroupName: Output? = null

    /**
     * @param value The name of the ElasticSan.
     */
    @JvmName("duqeterqppghxhgs")
    public suspend fun elasticSanName(`value`: Output) {
        this.elasticSanName = value
    }

    /**
     * @param value Type of encryption
     */
    @JvmName("sfjmuukwqgnoybmj")
    public suspend fun encryption(`value`: Output>) {
        this.encryption = value
    }

    /**
     * @param value A collection of rules governing the accessibility from specific network locations.
     */
    @JvmName("xugghgumrtammixr")
    public suspend fun networkAcls(`value`: Output) {
        this.networkAcls = value
    }

    /**
     * @param value Type of storage target
     */
    @JvmName("rpqfmrjmbgekfsoa")
    public suspend fun protocolType(`value`: Output>) {
        this.protocolType = value
    }

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

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

    /**
     * @param value The name of the VolumeGroup.
     */
    @JvmName("bsckolhrpxrakaxk")
    public suspend fun volumeGroupName(`value`: Output) {
        this.volumeGroupName = value
    }

    /**
     * @param value The name of the ElasticSan.
     */
    @JvmName("bfwqbxabvywdagnl")
    public suspend fun elasticSanName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.elasticSanName = mapped
    }

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

    /**
     * @param value Type of encryption
     */
    @JvmName("ajuhcdhqvvxenoai")
    public fun encryption(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.encryption = mapped
    }

    /**
     * @param value Type of encryption
     */
    @JvmName("wqeselpvbelpygoi")
    public fun encryption(`value`: EncryptionType) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.encryption = mapped
    }

    /**
     * @param value A collection of rules governing the accessibility from specific network locations.
     */
    @JvmName("jxxkdhvsaiupngaa")
    public suspend fun networkAcls(`value`: NetworkRuleSetArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.networkAcls = mapped
    }

    /**
     * @param argument A collection of rules governing the accessibility from specific network locations.
     */
    @JvmName("tntgujawjlpiehau")
    public suspend fun networkAcls(argument: suspend NetworkRuleSetArgsBuilder.() -> Unit) {
        val toBeMapped = NetworkRuleSetArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.networkAcls = mapped
    }

    /**
     * @param value Type of storage target
     */
    @JvmName("snssnbtekgmgxgvl")
    public suspend fun protocolType(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.protocolType = mapped
    }

    /**
     * @param value Type of storage target
     */
    @JvmName("jabnmepriydafrxy")
    public fun protocolType(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.protocolType = mapped
    }

    /**
     * @param value Type of storage target
     */
    @JvmName("nnspgpdjmqvljvrm")
    public fun protocolType(`value`: StorageTargetType) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.protocolType = mapped
    }

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

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

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

    /**
     * @param value The name of the VolumeGroup.
     */
    @JvmName("snkntujqasgsmegj")
    public suspend fun volumeGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.volumeGroupName = mapped
    }

    internal fun build(): VolumeGroupArgs = VolumeGroupArgs(
        elasticSanName = elasticSanName,
        encryption = encryption,
        networkAcls = networkAcls,
        protocolType = protocolType,
        resourceGroupName = resourceGroupName,
        tags = tags,
        volumeGroupName = volumeGroupName,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy