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

com.pulumi.googlenative.apigee.v1.kotlin.NatAddress.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.

The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.googlenative.apigee.v1.kotlin

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

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

    public var args: NatAddressArgs = NatAddressArgs()

    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 NatAddressArgsBuilder.() -> Unit) {
        val builder = NatAddressArgsBuilder()
        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(): NatAddress {
        val builtJavaResource = com.pulumi.googlenative.apigee.v1.NatAddress(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return NatAddress(builtJavaResource)
    }
}

/**
 * Creates a NAT address. The address is created in the RESERVED state and a static external IP address will be provisioned. At this time, the instance will not use this IP address for Internet egress traffic. The address can be activated for use once any required firewall IP whitelisting has been completed. **Note:** Not supported for Apigee hybrid.
 */
public class NatAddress internal constructor(
    override val javaResource: com.pulumi.googlenative.apigee.v1.NatAddress,
) : KotlinCustomResource(javaResource, NatAddressMapper) {
    public val instanceId: Output
        get() = javaResource.instanceId().applyValue({ args0 -> args0 })

    /**
     * The static IPV4 address.
     */
    public val ipAddress: Output
        get() = javaResource.ipAddress().applyValue({ args0 -> args0 })

    /**
     * Resource ID of the NAT address.
     */
    public val name: Output
        get() = javaResource.name().applyValue({ args0 -> args0 })

    public val organizationId: Output
        get() = javaResource.organizationId().applyValue({ args0 -> args0 })

    /**
     * State of the nat address.
     */
    public val state: Output
        get() = javaResource.state().applyValue({ args0 -> args0 })
}

public object NatAddressMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.googlenative.apigee.v1.NatAddress::class == javaResource::class

    override fun map(javaResource: Resource): NatAddress = NatAddress(
        javaResource as
            com.pulumi.googlenative.apigee.v1.NatAddress,
    )
}

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy