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

com.pulumi.awsnative.ec2.kotlin.SubnetCidrBlock.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.ec2.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.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit

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

    public var args: SubnetCidrBlockArgs = SubnetCidrBlockArgs()

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

/**
 * The AWS::EC2::SubnetCidrBlock resource creates association between subnet and IPv6 CIDR
 */
public class SubnetCidrBlock internal constructor(
    override val javaResource: com.pulumi.awsnative.ec2.SubnetCidrBlock,
) : KotlinCustomResource(javaResource, SubnetCidrBlockMapper) {
    /**
     * Information about the IPv6 association.
     */
    public val awsId: Output
        get() = javaResource.awsId().applyValue({ args0 -> args0 })

    /**
     * The IP Source of an IPv6 Subnet CIDR Block.
     */
    public val ipSource: Output
        get() = javaResource.ipSource().applyValue({ args0 -> args0 })

    /**
     * The value denoting whether an IPv6 Subnet CIDR Block is public or private.
     */
    public val ipv6AddressAttribute: Output
        get() = javaResource.ipv6AddressAttribute().applyValue({ args0 -> args0 })

    /**
     * The IPv6 network range for the subnet, in CIDR notation. The subnet size must use a /64 prefix length
     */
    public val ipv6CidrBlock: Output?
        get() = javaResource.ipv6CidrBlock().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The ID of an IPv6 Amazon VPC IP Address Manager (IPAM) pool from which to allocate, to get the subnet's CIDR
     */
    public val ipv6IpamPoolId: Output?
        get() = javaResource.ipv6IpamPoolId().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The netmask length of the IPv6 CIDR to allocate to the subnet from an IPAM pool
     */
    public val ipv6NetmaskLength: Output?
        get() = javaResource.ipv6NetmaskLength().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The ID of the subnet
     */
    public val subnetId: Output
        get() = javaResource.subnetId().applyValue({ args0 -> args0 })
}

public object SubnetCidrBlockMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.ec2.SubnetCidrBlock::class == javaResource::class

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy