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

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

package com.pulumi.awsnative.apprunner.kotlin

import com.pulumi.awsnative.apprunner.kotlin.enums.VpcIngressConnectionStatus
import com.pulumi.awsnative.apprunner.kotlin.outputs.VpcIngressConnectionIngressVpcConfiguration
import com.pulumi.awsnative.kotlin.outputs.CreateOnlyTag
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.apprunner.kotlin.enums.VpcIngressConnectionStatus.Companion.toKotlin as vpcIngressConnectionStatusToKotlin
import com.pulumi.awsnative.apprunner.kotlin.outputs.VpcIngressConnectionIngressVpcConfiguration.Companion.toKotlin as vpcIngressConnectionIngressVpcConfigurationToKotlin
import com.pulumi.awsnative.kotlin.outputs.CreateOnlyTag.Companion.toKotlin as createOnlyTagToKotlin

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

    public var args: VpcIngressConnectionArgs = VpcIngressConnectionArgs()

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

/**
 * The AWS::AppRunner::VpcIngressConnection resource is an App Runner resource that specifies an App Runner VpcIngressConnection.
 */
public class VpcIngressConnection internal constructor(
    override val javaResource: com.pulumi.awsnative.apprunner.VpcIngressConnection,
) : KotlinCustomResource(javaResource, VpcIngressConnectionMapper) {
    /**
     * The Domain name associated with the VPC Ingress Connection.
     */
    public val domainName: Output
        get() = javaResource.domainName().applyValue({ args0 -> args0 })

    /**
     * Specifications for the customer’s Amazon VPC and the related AWS PrivateLink VPC endpoint that are used to create the VPC Ingress Connection resource.
     */
    public val ingressVpcConfiguration: Output
        get() = javaResource.ingressVpcConfiguration().applyValue({ args0 ->
            args0.let({ args0 ->
                vpcIngressConnectionIngressVpcConfigurationToKotlin(args0)
            })
        })

    /**
     * The Amazon Resource Name (ARN) of the service.
     */
    public val serviceArn: Output
        get() = javaResource.serviceArn().applyValue({ args0 -> args0 })

    /**
     * The current status of the VpcIngressConnection.
     */
    public val status: Output
        get() = javaResource.status().applyValue({ args0 ->
            args0.let({ args0 ->
                vpcIngressConnectionStatusToKotlin(args0)
            })
        })

    /**
     * An optional list of metadata items that you can associate with the VPC Ingress Connection 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 -> createOnlyTagToKotlin(args0) })
                })
            }).orElse(null)
        })

    /**
     * The Amazon Resource Name (ARN) of the VpcIngressConnection.
     */
    public val vpcIngressConnectionArn: Output
        get() = javaResource.vpcIngressConnectionArn().applyValue({ args0 -> args0 })

    /**
     * The customer-provided Vpc Ingress Connection name.
     */
    public val vpcIngressConnectionName: Output?
        get() = javaResource.vpcIngressConnectionName().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })
}

public object VpcIngressConnectionMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.apprunner.VpcIngressConnection::class == javaResource::class

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy