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

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

package com.pulumi.awsnative.appstream.kotlin

import com.pulumi.awsnative.appstream.kotlin.outputs.DirectoryConfigCertificateBasedAuthProperties
import com.pulumi.awsnative.appstream.kotlin.outputs.DirectoryConfigServiceAccountCredentials
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.List
import com.pulumi.awsnative.appstream.kotlin.outputs.DirectoryConfigCertificateBasedAuthProperties.Companion.toKotlin as directoryConfigCertificateBasedAuthPropertiesToKotlin
import com.pulumi.awsnative.appstream.kotlin.outputs.DirectoryConfigServiceAccountCredentials.Companion.toKotlin as directoryConfigServiceAccountCredentialsToKotlin

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

    public var args: DirectoryConfigArgs = DirectoryConfigArgs()

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

/**
 * Resource Type definition for AWS::AppStream::DirectoryConfig
 */
public class DirectoryConfig internal constructor(
    override val javaResource: com.pulumi.awsnative.appstream.DirectoryConfig,
) : KotlinCustomResource(javaResource, DirectoryConfigMapper) {
    /**
     * The certificate-based authentication properties used to authenticate SAML 2.0 Identity Provider (IdP) user identities to Active Directory domain-joined streaming instances.
     */
    public val certificateBasedAuthProperties: Output?
        get() = javaResource.certificateBasedAuthProperties().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    directoryConfigCertificateBasedAuthPropertiesToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * The fully qualified name of the directory (for example, corp.example.com).
     */
    public val directoryName: Output
        get() = javaResource.directoryName().applyValue({ args0 -> args0 })

    /**
     * The distinguished names of the organizational units for computer accounts.
     */
    public val organizationalUnitDistinguishedNames: Output>
        get() = javaResource.organizationalUnitDistinguishedNames().applyValue({ args0 ->
            args0.map({ args0 -> args0 })
        })

    /**
     * The credentials for the service account used by the streaming instance to connect to the directory. Do not use this parameter directly. Use `ServiceAccountCredentials` as an input parameter with `noEcho` as shown in the [Parameters](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/parameters-section-structure.html) . For best practices information, see [Do Not Embed Credentials in Your Templates](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/best-practices.html#creds) .
     */
    public val serviceAccountCredentials: Output
        get() = javaResource.serviceAccountCredentials().applyValue({ args0 ->
            args0.let({ args0 ->
                directoryConfigServiceAccountCredentialsToKotlin(args0)
            })
        })
}

public object DirectoryConfigMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.appstream.DirectoryConfig::class == javaResource::class

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy