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

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

package com.pulumi.azure.workloadssap.kotlin

import com.pulumi.azure.workloadssap.kotlin.outputs.SingleNodeVirtualInstanceIdentity
import com.pulumi.azure.workloadssap.kotlin.outputs.SingleNodeVirtualInstanceSingleServerConfiguration
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import com.pulumi.azure.workloadssap.kotlin.outputs.SingleNodeVirtualInstanceIdentity.Companion.toKotlin as singleNodeVirtualInstanceIdentityToKotlin
import com.pulumi.azure.workloadssap.kotlin.outputs.SingleNodeVirtualInstanceSingleServerConfiguration.Companion.toKotlin as singleNodeVirtualInstanceSingleServerConfigurationToKotlin

/**
 * Builder for [SingleNodeVirtualInstance].
 */
@PulumiTagMarker
public class SingleNodeVirtualInstanceResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: SingleNodeVirtualInstanceArgs = SingleNodeVirtualInstanceArgs()

    public var opts: CustomResourceOptions = CustomResourceOptions()

    /**
     * @param name The _unique_ name of the resulting resource.
     */
    public fun name(`value`: String) {
        this.name = value
    }

    /**
     * @param block The arguments to use to populate this resource's properties.
     */
    public suspend fun args(block: suspend SingleNodeVirtualInstanceArgsBuilder.() -> Unit) {
        val builder = SingleNodeVirtualInstanceArgsBuilder()
        block(builder)
        this.args = builder.build()
    }

    /**
     * @param block A bag of options that control this resource's behavior.
     */
    public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
        this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
    }

    internal fun build(): SingleNodeVirtualInstance {
        val builtJavaResource =
            com.pulumi.azure.workloadssap.SingleNodeVirtualInstance(
                this.name,
                this.args.toJava(),
                this.opts.toJava(),
            )
        return SingleNodeVirtualInstance(builtJavaResource)
    }
}

/**
 * Manages an SAP Single Node Virtual Instance with new SAP System.
 * > **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.
 * ## Import
 * SAP Single Node Virtual Instances with new SAP Systems can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:workloadssap/singleNodeVirtualInstance:SingleNodeVirtualInstance example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Workloads/sapVirtualInstances/vis1
 * ```
 */
public class SingleNodeVirtualInstance internal constructor(
    override val javaResource: com.pulumi.azure.workloadssap.SingleNodeVirtualInstance,
) : KotlinCustomResource(javaResource, SingleNodeVirtualInstanceMapper) {
    /**
     * The Geo-Location where the SAP system is to be created. Changing this forces a new resource to be created.
     */
    public val appLocation: Output
        get() = javaResource.appLocation().applyValue({ args0 -> args0 })

    /**
     * The environment type for the SAP Single Node Virtual Instance. Possible values are `NonProd` and `Prod`. Changing this forces a new resource to be created.
     */
    public val environment: Output
        get() = javaResource.environment().applyValue({ args0 -> args0 })

    /**
     * An `identity` block as defined below.
     */
    public val identity: Output?
        get() = javaResource.identity().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    singleNodeVirtualInstanceIdentityToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * The Azure Region where the SAP Single Node Virtual Instance should exist. Changing this forces a new resource to be created.
     */
    public val location: Output
        get() = javaResource.location().applyValue({ args0 -> args0 })

    /**
     * The name of the managed Resource Group for the SAP Single Node Virtual Instance. Changing this forces a new resource to be created.
     */
    public val managedResourceGroupName: Output?
        get() = javaResource.managedResourceGroupName().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Specifies the name of this SAP Single Node Virtual Instance. Changing this forces a new resource to be created.
     */
    public val name: Output
        get() = javaResource.name().applyValue({ args0 -> args0 })

    /**
     * The name of the Resource Group where the SAP Single Node Virtual Instance should exist. Changing this forces a new resource to be created.
     */
    public val resourceGroupName: Output
        get() = javaResource.resourceGroupName().applyValue({ args0 -> args0 })

    /**
     * The fully qualified domain name for the SAP system. Changing this forces a new resource to be created.
     */
    public val sapFqdn: Output
        get() = javaResource.sapFqdn().applyValue({ args0 -> args0 })

    /**
     * The SAP Product type for the SAP Single Node Virtual Instance. Possible values are `ECC`, `Other` and `S4HANA`. Changing this forces a new resource to be created.
     */
    public val sapProduct: Output
        get() = javaResource.sapProduct().applyValue({ args0 -> args0 })

    /**
     * A `single_server_configuration` block as defined below. Changing this forces a new resource to be created.
     */
    public val singleServerConfiguration: Output
        get() = javaResource.singleServerConfiguration().applyValue({ args0 ->
            args0.let({ args0 ->
                singleNodeVirtualInstanceSingleServerConfigurationToKotlin(args0)
            })
        })

    /**
     * A mapping of tags which should be assigned to the SAP Single Node Virtual Instance.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.key.to(args0.value)
                }).toMap()
            }).orElse(null)
        })
}

public object SingleNodeVirtualInstanceMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.azure.workloadssap.SingleNodeVirtualInstance::class == javaResource::class

    override fun map(javaResource: Resource): SingleNodeVirtualInstance =
        SingleNodeVirtualInstance(
            javaResource as
                com.pulumi.azure.workloadssap.SingleNodeVirtualInstance,
        )
}

/**
 * @see [SingleNodeVirtualInstance].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [SingleNodeVirtualInstance].
 */
public suspend fun singleNodeVirtualInstance(
    name: String,
    block: suspend SingleNodeVirtualInstanceResourceBuilder.() -> Unit,
): SingleNodeVirtualInstance {
    val builder = SingleNodeVirtualInstanceResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [SingleNodeVirtualInstance].
 * @param name The _unique_ name of the resulting resource.
 */
public fun singleNodeVirtualInstance(name: String): SingleNodeVirtualInstance {
    val builder = SingleNodeVirtualInstanceResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy