com.pulumi.awsnative.mediaconnect.kotlin.Gateway.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-native-kotlin Show documentation
Show all versions of pulumi-aws-native-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.mediaconnect.kotlin
import com.pulumi.awsnative.mediaconnect.kotlin.enums.GatewayState
import com.pulumi.awsnative.mediaconnect.kotlin.outputs.GatewayNetwork
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.mediaconnect.kotlin.enums.GatewayState.Companion.toKotlin as gatewayStateToKotlin
import com.pulumi.awsnative.mediaconnect.kotlin.outputs.GatewayNetwork.Companion.toKotlin as gatewayNetworkToKotlin
/**
* Builder for [Gateway].
*/
@PulumiTagMarker
public class GatewayResourceBuilder internal constructor() {
public var name: String? = null
public var args: GatewayArgs = GatewayArgs()
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 GatewayArgsBuilder.() -> Unit) {
val builder = GatewayArgsBuilder()
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(): Gateway {
val builtJavaResource = com.pulumi.awsnative.mediaconnect.Gateway(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Gateway(builtJavaResource)
}
}
/**
* Resource schema for AWS::MediaConnect::Gateway
*/
public class Gateway internal constructor(
override val javaResource: com.pulumi.awsnative.mediaconnect.Gateway,
) : KotlinCustomResource(javaResource, GatewayMapper) {
/**
* The range of IP addresses that contribute content or initiate output requests for flows communicating with this gateway. These IP addresses should be in the form of a Classless Inter-Domain Routing (CIDR) block; for example, 10.0.0.0/16.
*/
public val egressCidrBlocks: Output>
get() = javaResource.egressCidrBlocks().applyValue({ args0 -> args0.map({ args0 -> args0 }) })
/**
* The Amazon Resource Name (ARN) of the gateway.
*/
public val gatewayArn: Output
get() = javaResource.gatewayArn().applyValue({ args0 -> args0 })
/**
* The current status of the gateway.
*/
public val gatewayState: Output
get() = javaResource.gatewayState().applyValue({ args0 ->
args0.let({ args0 ->
gatewayStateToKotlin(args0)
})
})
/**
* The name of the gateway. This name can not be modified after the gateway is created.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* The list of networks in the gateway.
*/
public val networks: Output>
get() = javaResource.networks().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
gatewayNetworkToKotlin(args0)
})
})
})
}
public object GatewayMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.mediaconnect.Gateway::class == javaResource::class
override fun map(javaResource: Resource): Gateway = Gateway(
javaResource as
com.pulumi.awsnative.mediaconnect.Gateway,
)
}
/**
* @see [Gateway].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [Gateway].
*/
public suspend fun gateway(name: String, block: suspend GatewayResourceBuilder.() -> Unit): Gateway {
val builder = GatewayResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [Gateway].
* @param name The _unique_ name of the resulting resource.
*/
public fun gateway(name: String): Gateway {
val builder = GatewayResourceBuilder()
builder.name(name)
return builder.build()
}