com.pulumi.awsnative.deadline.kotlin.MeteredProduct.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.deadline.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 [MeteredProduct].
*/
@PulumiTagMarker
public class MeteredProductResourceBuilder internal constructor() {
public var name: String? = null
public var args: MeteredProductArgs = MeteredProductArgs()
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 MeteredProductArgsBuilder.() -> Unit) {
val builder = MeteredProductArgsBuilder()
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(): MeteredProduct {
val builtJavaResource = com.pulumi.awsnative.deadline.MeteredProduct(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return MeteredProduct(builtJavaResource)
}
}
/**
* Definition of AWS::Deadline::MeteredProduct Resource Type
*/
public class MeteredProduct internal constructor(
override val javaResource: com.pulumi.awsnative.deadline.MeteredProduct,
) : KotlinCustomResource(javaResource, MeteredProductMapper) {
/**
* The Amazon Resource Name (ARN) of the metered product.
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* The family to which the metered product belongs.
*/
public val family: Output
get() = javaResource.family().applyValue({ args0 -> args0 })
/**
* The Amazon EC2 identifier of the license endpoint.
*/
public val licenseEndpointId: Output?
get() = javaResource.licenseEndpointId().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The port on which the metered product should run.
*/
public val port: Output
get() = javaResource.port().applyValue({ args0 -> args0 })
/**
* The product ID.
*/
public val productId: Output?
get() = javaResource.productId().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* The vendor.
*/
public val vendor: Output
get() = javaResource.vendor().applyValue({ args0 -> args0 })
}
public object MeteredProductMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.deadline.MeteredProduct::class == javaResource::class
override fun map(javaResource: Resource): MeteredProduct = MeteredProduct(
javaResource as
com.pulumi.awsnative.deadline.MeteredProduct,
)
}
/**
* @see [MeteredProduct].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [MeteredProduct].
*/
public suspend fun meteredProduct(
name: String,
block: suspend MeteredProductResourceBuilder.() -> Unit,
): MeteredProduct {
val builder = MeteredProductResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [MeteredProduct].
* @param name The _unique_ name of the resulting resource.
*/
public fun meteredProduct(name: String): MeteredProduct {
val builder = MeteredProductResourceBuilder()
builder.name(name)
return builder.build()
}