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

com.pulumi.awsnative.workspacesthinclient.kotlin.Environment.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: 1.11.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.workspacesthinclient.kotlin

import com.pulumi.awsnative.kotlin.outputs.Tag
import com.pulumi.awsnative.workspacesthinclient.kotlin.enums.EnvironmentDesktopType
import com.pulumi.awsnative.workspacesthinclient.kotlin.enums.EnvironmentSoftwareSetComplianceStatus
import com.pulumi.awsnative.workspacesthinclient.kotlin.enums.EnvironmentSoftwareSetUpdateMode
import com.pulumi.awsnative.workspacesthinclient.kotlin.enums.EnvironmentSoftwareSetUpdateSchedule
import com.pulumi.awsnative.workspacesthinclient.kotlin.outputs.EnvironmentMaintenanceWindow
import com.pulumi.awsnative.workspacesthinclient.kotlin.outputs.EnvironmentTag
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.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin
import com.pulumi.awsnative.workspacesthinclient.kotlin.enums.EnvironmentDesktopType.Companion.toKotlin as environmentDesktopTypeToKotlin
import com.pulumi.awsnative.workspacesthinclient.kotlin.enums.EnvironmentSoftwareSetComplianceStatus.Companion.toKotlin as environmentSoftwareSetComplianceStatusToKotlin
import com.pulumi.awsnative.workspacesthinclient.kotlin.enums.EnvironmentSoftwareSetUpdateMode.Companion.toKotlin as environmentSoftwareSetUpdateModeToKotlin
import com.pulumi.awsnative.workspacesthinclient.kotlin.enums.EnvironmentSoftwareSetUpdateSchedule.Companion.toKotlin as environmentSoftwareSetUpdateScheduleToKotlin
import com.pulumi.awsnative.workspacesthinclient.kotlin.outputs.EnvironmentMaintenanceWindow.Companion.toKotlin as environmentMaintenanceWindowToKotlin
import com.pulumi.awsnative.workspacesthinclient.kotlin.outputs.EnvironmentTag.Companion.toKotlin as environmentTagToKotlin

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

    public var args: EnvironmentArgs = EnvironmentArgs()

    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 EnvironmentArgsBuilder.() -> Unit) {
        val builder = EnvironmentArgsBuilder()
        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(): Environment {
        val builtJavaResource =
            com.pulumi.awsnative.workspacesthinclient.Environment(
                this.name,
                this.args.toJava(),
                this.opts.toJava(),
            )
        return Environment(builtJavaResource)
    }
}

/**
 * Resource type definition for AWS::WorkSpacesThinClient::Environment.
 */
public class Environment internal constructor(
    override val javaResource: com.pulumi.awsnative.workspacesthinclient.Environment,
) : KotlinCustomResource(javaResource, EnvironmentMapper) {
    /**
     * Activation code for devices associated with environment.
     */
    public val activationCode: Output
        get() = javaResource.activationCode().applyValue({ args0 -> args0 })

    /**
     * The environment ARN.
     */
    public val arn: Output
        get() = javaResource.arn().applyValue({ args0 -> args0 })

    /**
     * Unique identifier of the environment.
     */
    public val awsId: Output
        get() = javaResource.awsId().applyValue({ args0 -> args0 })

    /**
     * The timestamp in unix epoch format when environment was created.
     */
    public val createdAt: Output
        get() = javaResource.createdAt().applyValue({ args0 -> args0 })

    /**
     * The ID of the software set to apply.
     */
    public val desiredSoftwareSetId: Output?
        get() = javaResource.desiredSoftwareSetId().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The Amazon Resource Name (ARN) of the desktop to stream from Amazon WorkSpaces, WorkSpaces Web, or AppStream 2.0.
     */
    public val desktopArn: Output
        get() = javaResource.desktopArn().applyValue({ args0 -> args0 })

    /**
     * The URL for the identity provider login (only for environments that use AppStream 2.0).
     */
    public val desktopEndpoint: Output?
        get() = javaResource.desktopEndpoint().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The type of VDI.
     */
    public val desktopType: Output
        get() = javaResource.desktopType().applyValue({ args0 ->
            args0.let({ args0 ->
                environmentDesktopTypeToKotlin(args0)
            })
        })

    /**
     * An array of key-value pairs to apply to the newly created devices for this environment.
     */
    public val deviceCreationTags: Output>?
        get() = javaResource.deviceCreationTags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 -> args0.let({ args0 -> environmentTagToKotlin(args0) }) })
            }).orElse(null)
        })

    /**
     * The Amazon Resource Name (ARN) of the AWS Key Management Service key used to encrypt the environment.
     */
    public val kmsKeyArn: Output?
        get() = javaResource.kmsKeyArn().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * A specification for a time window to apply software updates.
     */
    public val maintenanceWindow: Output?
        get() = javaResource.maintenanceWindow().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> environmentMaintenanceWindowToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * The name of the environment.
     */
    public val name: Output?
        get() = javaResource.name().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * The ID of the software set that is pending to be installed.
     */
    public val pendingSoftwareSetId: Output
        get() = javaResource.pendingSoftwareSetId().applyValue({ args0 -> args0 })

    /**
     * The version of the software set that is pending to be installed.
     */
    public val pendingSoftwareSetVersion: Output
        get() = javaResource.pendingSoftwareSetVersion().applyValue({ args0 -> args0 })

    /**
     * Number of devices registered to the environment.
     */
    public val registeredDevicesCount: Output
        get() = javaResource.registeredDevicesCount().applyValue({ args0 -> args0 })

    /**
     * Describes if the software currently installed on all devices in the environment is a supported version.
     */
    public val softwareSetComplianceStatus: Output
        get() = javaResource.softwareSetComplianceStatus().applyValue({ args0 ->
            args0.let({ args0 ->
                environmentSoftwareSetComplianceStatusToKotlin(args0)
            })
        })

    /**
     * An option to define which software updates to apply.
     */
    public val softwareSetUpdateMode: Output?
        get() = javaResource.softwareSetUpdateMode().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> environmentSoftwareSetUpdateModeToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * An option to define if software updates should be applied within a maintenance window.
     */
    public val softwareSetUpdateSchedule: Output?
        get() = javaResource.softwareSetUpdateSchedule().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> environmentSoftwareSetUpdateScheduleToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * An array of key-value pairs to apply to this resource.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> tagToKotlin(args0) })
                })
            }).orElse(null)
        })

    /**
     * The timestamp in unix epoch format when environment was last updated.
     */
    public val updatedAt: Output
        get() = javaResource.updatedAt().applyValue({ args0 -> args0 })
}

public object EnvironmentMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.workspacesthinclient.Environment::class == javaResource::class

    override fun map(javaResource: Resource): Environment = Environment(
        javaResource as
            com.pulumi.awsnative.workspacesthinclient.Environment,
    )
}

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy