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

com.pulumi.azure.workloadssap.kotlin.DiscoveryVirtualInstanceArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azure.workloadssap.kotlin

import com.pulumi.azure.workloadssap.DiscoveryVirtualInstanceArgs.builder
import com.pulumi.azure.workloadssap.kotlin.inputs.DiscoveryVirtualInstanceIdentityArgs
import com.pulumi.azure.workloadssap.kotlin.inputs.DiscoveryVirtualInstanceIdentityArgsBuilder
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

/**
 * Manages an SAP Discovery Virtual Instance.
 * > **Note:** Before using this resource, it's required to submit the request of registering the Resource Provider with Azure CLI `az provider register --namespace "Microsoft.Workloads"`. The Resource Provider can take a while to register, you can check the status by running `az provider show --namespace "Microsoft.Workloads" --query "registrationState"`. Once this outputs "Registered" the Resource Provider is available for use.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example-sapvis",
 *     location: "West Europe",
 * });
 * const exampleDiscoveryVirtualInstance = new azure.workloadssap.DiscoveryVirtualInstance("example", {
 *     name: "X01",
 *     resourceGroupName: example.name,
 *     location: example.location,
 *     environment: "NonProd",
 *     sapProduct: "S4HANA",
 *     centralServerVirtualMachineId: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/csvm1",
 *     managedStorageAccountName: "managedsa",
 *     identity: {
 *         type: "UserAssigned",
 *         identityIds: ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/exampleRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai1"],
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="example-sapvis",
 *     location="West Europe")
 * example_discovery_virtual_instance = azure.workloadssap.DiscoveryVirtualInstance("example",
 *     name="X01",
 *     resource_group_name=example.name,
 *     location=example.location,
 *     environment="NonProd",
 *     sap_product="S4HANA",
 *     central_server_virtual_machine_id="/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/csvm1",
 *     managed_storage_account_name="managedsa",
 *     identity={
 *         "type": "UserAssigned",
 *         "identity_ids": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/exampleRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai1"],
 *     })
 * ```
 * ```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-sapvis",
 *         Location = "West Europe",
 *     });
 *     var exampleDiscoveryVirtualInstance = new Azure.WorkloadsSAP.DiscoveryVirtualInstance("example", new()
 *     {
 *         Name = "X01",
 *         ResourceGroupName = example.Name,
 *         Location = example.Location,
 *         Environment = "NonProd",
 *         SapProduct = "S4HANA",
 *         CentralServerVirtualMachineId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/csvm1",
 *         ManagedStorageAccountName = "managedsa",
 *         Identity = new Azure.WorkloadsSAP.Inputs.DiscoveryVirtualInstanceIdentityArgs
 *         {
 *             Type = "UserAssigned",
 *             IdentityIds = new[]
 *             {
 *                 "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/exampleRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai1",
 *             },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/workloadssap"
 * 	"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-sapvis"),
 * 			Location: pulumi.String("West Europe"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = workloadssap.NewDiscoveryVirtualInstance(ctx, "example", &workloadssap.DiscoveryVirtualInstanceArgs{
 * 			Name:                          pulumi.String("X01"),
 * 			ResourceGroupName:             example.Name,
 * 			Location:                      example.Location,
 * 			Environment:                   pulumi.String("NonProd"),
 * 			SapProduct:                    pulumi.String("S4HANA"),
 * 			CentralServerVirtualMachineId: pulumi.String("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/csvm1"),
 * 			ManagedStorageAccountName:     pulumi.String("managedsa"),
 * 			Identity: &workloadssap.DiscoveryVirtualInstanceIdentityArgs{
 * 				Type: pulumi.String("UserAssigned"),
 * 				IdentityIds: pulumi.StringArray{
 * 					pulumi.String("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/exampleRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai1"),
 * 				},
 * 			},
 * 		})
 * 		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.workloadssap.DiscoveryVirtualInstance;
 * import com.pulumi.azure.workloadssap.DiscoveryVirtualInstanceArgs;
 * import com.pulumi.azure.workloadssap.inputs.DiscoveryVirtualInstanceIdentityArgs;
 * 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-sapvis")
 *             .location("West Europe")
 *             .build());
 *         var exampleDiscoveryVirtualInstance = new DiscoveryVirtualInstance("exampleDiscoveryVirtualInstance", DiscoveryVirtualInstanceArgs.builder()
 *             .name("X01")
 *             .resourceGroupName(example.name())
 *             .location(example.location())
 *             .environment("NonProd")
 *             .sapProduct("S4HANA")
 *             .centralServerVirtualMachineId("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/csvm1")
 *             .managedStorageAccountName("managedsa")
 *             .identity(DiscoveryVirtualInstanceIdentityArgs.builder()
 *                 .type("UserAssigned")
 *                 .identityIds("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/exampleRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai1")
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: example-sapvis
 *       location: West Europe
 *   exampleDiscoveryVirtualInstance:
 *     type: azure:workloadssap:DiscoveryVirtualInstance
 *     name: example
 *     properties:
 *       name: X01
 *       resourceGroupName: ${example.name}
 *       location: ${example.location}
 *       environment: NonProd
 *       sapProduct: S4HANA
 *       centralServerVirtualMachineId: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/csvm1
 *       managedStorageAccountName: managedsa
 *       identity:
 *         type: UserAssigned
 *         identityIds:
 *           - /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/exampleRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai1
 * ```
 * 
 * ## Import
 * SAP Discovery Virtual Instances can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:workloadssap/discoveryVirtualInstance:DiscoveryVirtualInstance example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Workloads/sapVirtualInstances/vis1
 * ```
 * @property centralServerVirtualMachineId The ID of the Virtual Machine of the Central Server. Changing this forces a new resource to be created.
 * @property environment The environment type for the SAP Discovery Virtual Instance. Possible values are `NonProd` and `Prod`. Changing this forces a new resource to be created.
 * @property identity An `identity` block as defined below.
 * @property location The Azure Region where the SAP Discovery Virtual Instance should exist. Changing this forces a new resource to be created.
 * @property managedResourceGroupName The name of the managed Resource Group for the SAP Discovery Virtual Instance. Changing this forces a new resource to be created.
 * @property managedStorageAccountName The name of the custom Storage Account created by the service in the managed Resource Group. Changing this forces a new resource to be created.
 * @property name Specifies the name of the SAP Discovery Virtual Instance. Changing this forces a new resource to be created.
 * @property resourceGroupName The name of the Resource Group where the SAP Discovery Virtual Instance should exist. Changing this forces a new resource to be created.
 * @property sapProduct The SAP Product type for the SAP Discovery Virtual Instance. Possible values are `ECC`, `Other` and `S4HANA`. Changing this forces a new resource to be created.
 * @property tags A mapping of tags which should be assigned to the SAP Discovery Virtual Instance.
 */
public data class DiscoveryVirtualInstanceArgs(
    public val centralServerVirtualMachineId: Output? = null,
    public val environment: Output? = null,
    public val identity: Output? = null,
    public val location: Output? = null,
    public val managedResourceGroupName: Output? = null,
    public val managedStorageAccountName: Output? = null,
    public val name: Output? = null,
    public val resourceGroupName: Output? = null,
    public val sapProduct: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.workloadssap.DiscoveryVirtualInstanceArgs =
        com.pulumi.azure.workloadssap.DiscoveryVirtualInstanceArgs.builder()
            .centralServerVirtualMachineId(centralServerVirtualMachineId?.applyValue({ args0 -> args0 }))
            .environment(environment?.applyValue({ args0 -> args0 }))
            .identity(identity?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .location(location?.applyValue({ args0 -> args0 }))
            .managedResourceGroupName(managedResourceGroupName?.applyValue({ args0 -> args0 }))
            .managedStorageAccountName(managedStorageAccountName?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .sapProduct(sapProduct?.applyValue({ args0 -> args0 }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [DiscoveryVirtualInstanceArgs].
 */
@PulumiTagMarker
public class DiscoveryVirtualInstanceArgsBuilder internal constructor() {
    private var centralServerVirtualMachineId: Output? = null

    private var environment: Output? = null

    private var identity: Output? = null

    private var location: Output? = null

    private var managedResourceGroupName: Output? = null

    private var managedStorageAccountName: Output? = null

    private var name: Output? = null

    private var resourceGroupName: Output? = null

    private var sapProduct: Output? = null

    private var tags: Output>? = null

    /**
     * @param value The ID of the Virtual Machine of the Central Server. Changing this forces a new resource to be created.
     */
    @JvmName("cgcavodpltfvobks")
    public suspend fun centralServerVirtualMachineId(`value`: Output) {
        this.centralServerVirtualMachineId = value
    }

    /**
     * @param value The environment type for the SAP Discovery Virtual Instance. Possible values are `NonProd` and `Prod`. Changing this forces a new resource to be created.
     */
    @JvmName("fwychxhoiiidkdjg")
    public suspend fun environment(`value`: Output) {
        this.environment = value
    }

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

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

    /**
     * @param value The name of the managed Resource Group for the SAP Discovery Virtual Instance. Changing this forces a new resource to be created.
     */
    @JvmName("vohkgtiywrplrcvw")
    public suspend fun managedResourceGroupName(`value`: Output) {
        this.managedResourceGroupName = value
    }

    /**
     * @param value The name of the custom Storage Account created by the service in the managed Resource Group. Changing this forces a new resource to be created.
     */
    @JvmName("thbjkrqcninowjbx")
    public suspend fun managedStorageAccountName(`value`: Output) {
        this.managedStorageAccountName = value
    }

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

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

    /**
     * @param value The SAP Product type for the SAP Discovery Virtual Instance. Possible values are `ECC`, `Other` and `S4HANA`. Changing this forces a new resource to be created.
     */
    @JvmName("hadltfbwrassgcie")
    public suspend fun sapProduct(`value`: Output) {
        this.sapProduct = value
    }

    /**
     * @param value A mapping of tags which should be assigned to the SAP Discovery Virtual Instance.
     */
    @JvmName("tevjqfscnepejqxn")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value The ID of the Virtual Machine of the Central Server. Changing this forces a new resource to be created.
     */
    @JvmName("blvldpqwoqqhxhpc")
    public suspend fun centralServerVirtualMachineId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.centralServerVirtualMachineId = mapped
    }

    /**
     * @param value The environment type for the SAP Discovery Virtual Instance. Possible values are `NonProd` and `Prod`. Changing this forces a new resource to be created.
     */
    @JvmName("ujljubypwyjtmfif")
    public suspend fun environment(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.environment = mapped
    }

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

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

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

    /**
     * @param value The name of the managed Resource Group for the SAP Discovery Virtual Instance. Changing this forces a new resource to be created.
     */
    @JvmName("ivrmptanavhqjuyl")
    public suspend fun managedResourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.managedResourceGroupName = mapped
    }

    /**
     * @param value The name of the custom Storage Account created by the service in the managed Resource Group. Changing this forces a new resource to be created.
     */
    @JvmName("hnkecfoxyqpyeuyg")
    public suspend fun managedStorageAccountName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.managedStorageAccountName = mapped
    }

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

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

    /**
     * @param value The SAP Product type for the SAP Discovery Virtual Instance. Possible values are `ECC`, `Other` and `S4HANA`. Changing this forces a new resource to be created.
     */
    @JvmName("eurcjajorjnickou")
    public suspend fun sapProduct(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sapProduct = mapped
    }

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

    internal fun build(): DiscoveryVirtualInstanceArgs = DiscoveryVirtualInstanceArgs(
        centralServerVirtualMachineId = centralServerVirtualMachineId,
        environment = environment,
        identity = identity,
        location = location,
        managedResourceGroupName = managedResourceGroupName,
        managedStorageAccountName = managedStorageAccountName,
        name = name,
        resourceGroupName = resourceGroupName,
        sapProduct = sapProduct,
        tags = tags,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy