com.pulumi.awsnative.ec2.kotlin.VpcCidrBlock.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 [VpcCidrBlock].
*/
@PulumiTagMarker
public class VpcCidrBlockResourceBuilder internal constructor() {
public var name: String? = null
public var args: VpcCidrBlockArgs = VpcCidrBlockArgs()
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 VpcCidrBlockArgsBuilder.() -> Unit) {
val builder = VpcCidrBlockArgsBuilder()
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(): VpcCidrBlock {
val builtJavaResource = com.pulumi.awsnative.ec2.VpcCidrBlock(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return VpcCidrBlock(builtJavaResource)
}
}
/**
* Resource Type definition for AWS::EC2::VPCCidrBlock
*/
public class VpcCidrBlock internal constructor(
override val javaResource: com.pulumi.awsnative.ec2.VpcCidrBlock,
) : KotlinCustomResource(javaResource, VpcCidrBlockMapper) {
/**
* Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC. You cannot specify the range of IPv6 addresses, or the size of the CIDR block.
*/
public val amazonProvidedIpv6CidrBlock: Output?
get() = javaResource.amazonProvidedIpv6CidrBlock().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The Id of the VPC associated CIDR Block.
*/
public val awsId: Output
get() = javaResource.awsId().applyValue({ args0 -> args0 })
/**
* An IPv4 CIDR block to associate with the VPC.
*/
public val cidrBlock: Output?
get() = javaResource.cidrBlock().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* The IP Source of an IPv6 VPC CIDR Block.
*/
public val ipSource: Output
get() = javaResource.ipSource().applyValue({ args0 -> args0 })
/**
* The ID of the IPv4 IPAM pool to Associate a CIDR from to a VPC.
*/
public val ipv4IpamPoolId: Output?
get() = javaResource.ipv4IpamPoolId().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The netmask length of the IPv4 CIDR you would like to associate from an Amazon VPC IP Address Manager (IPAM) pool.
*/
public val ipv4NetmaskLength: Output?
get() = javaResource.ipv4NetmaskLength().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The value denoting whether an IPv6 VPC CIDR Block is public or private.
*/
public val ipv6AddressAttribute: Output
get() = javaResource.ipv6AddressAttribute().applyValue({ args0 -> args0 })
/**
* An IPv6 CIDR block from the IPv6 address pool.
*/
public val ipv6CidrBlock: Output?
get() = javaResource.ipv6CidrBlock().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The ID of the IPv6 IPAM pool to Associate a CIDR from to a VPC.
*/
public val ipv6IpamPoolId: Output?
get() = javaResource.ipv6IpamPoolId().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The netmask length of the IPv6 CIDR you would like to associate from an Amazon VPC IP Address Manager (IPAM) pool.
*/
public val ipv6NetmaskLength: Output?
get() = javaResource.ipv6NetmaskLength().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The ID of an IPv6 address pool from which to allocate the IPv6 CIDR block.
*/
public val ipv6Pool: Output?
get() = javaResource.ipv6Pool().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* The ID of the VPC.
*/
public val vpcId: Output
get() = javaResource.vpcId().applyValue({ args0 -> args0 })
}
public object VpcCidrBlockMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.ec2.VpcCidrBlock::class == javaResource::class
override fun map(javaResource: Resource): VpcCidrBlock = VpcCidrBlock(
javaResource as
com.pulumi.awsnative.ec2.VpcCidrBlock,
)
}
/**
* @see [VpcCidrBlock].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [VpcCidrBlock].
*/
public suspend fun vpcCidrBlock(
name: String,
block: suspend VpcCidrBlockResourceBuilder.() -> Unit,
): VpcCidrBlock {
val builder = VpcCidrBlockResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [VpcCidrBlock].
* @param name The _unique_ name of the resulting resource.
*/
public fun vpcCidrBlock(name: String): VpcCidrBlock {
val builder = VpcCidrBlockResourceBuilder()
builder.name(name)
return builder.build()
}