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

com.pulumi.awsnative.workspacesweb.kotlin.NetworkSettings.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.workspacesweb.kotlin

import com.pulumi.awsnative.kotlin.outputs.Tag
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin
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

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

    public var args: NetworkSettingsArgs = NetworkSettingsArgs()

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

/**
 * Definition of AWS::WorkSpacesWeb::NetworkSettings Resource Type
 */
public class NetworkSettings internal constructor(
    override val javaResource: com.pulumi.awsnative.workspacesweb.NetworkSettings,
) : KotlinCustomResource(javaResource, NetworkSettingsMapper) {
    /**
     * A list of web portal ARNs that this network settings is associated with.
     */
    public val associatedPortalArns: Output>
        get() = javaResource.associatedPortalArns().applyValue({ args0 -> args0.map({ args0 -> args0 }) })

    /**
     * The ARN of the network settings.
     */
    public val networkSettingsArn: Output
        get() = javaResource.networkSettingsArn().applyValue({ args0 -> args0 })

    /**
     * One or more security groups used to control access from streaming instances to your VPC.
     * *Pattern* : `^[\w+\-]+$`
     */
    public val securityGroupIds: Output>
        get() = javaResource.securityGroupIds().applyValue({ args0 -> args0.map({ args0 -> args0 }) })

    /**
     * The subnets in which network interfaces are created to connect streaming instances to your VPC. At least two of these subnets must be in different availability zones.
     * *Pattern* : `^subnet-([0-9a-f]{8}|[0-9a-f]{17})$`
     */
    public val subnetIds: Output>
        get() = javaResource.subnetIds().applyValue({ args0 -> args0.map({ args0 -> args0 }) })

    /**
     * The tags to add to the network settings resource. A tag is a key-value pair.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> toKotlin(args0) })
                })
            }).orElse(null)
        })

    /**
     * The VPC that streaming instances will connect to.
     * *Pattern* : `^vpc-[0-9a-z]*$`
     */
    public val vpcId: Output
        get() = javaResource.vpcId().applyValue({ args0 -> args0 })
}

public object NetworkSettingsMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.workspacesweb.NetworkSettings::class == javaResource::class

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy