com.pulumi.awsnative.ivs.kotlin.StreamKey.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.ivs.kotlin
import com.pulumi.awsnative.kotlin.outputs.Tag
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin
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
/**
* Builder for [StreamKey].
*/
@PulumiTagMarker
public class StreamKeyResourceBuilder internal constructor() {
public var name: String? = null
public var args: StreamKeyArgs = StreamKeyArgs()
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 StreamKeyArgsBuilder.() -> Unit) {
val builder = StreamKeyArgsBuilder()
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(): StreamKey {
val builtJavaResource = com.pulumi.awsnative.ivs.StreamKey(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return StreamKey(builtJavaResource)
}
}
/**
* Resource Type definition for AWS::IVS::StreamKey
*/
public class StreamKey internal constructor(
override val javaResource: com.pulumi.awsnative.ivs.StreamKey,
) : KotlinCustomResource(javaResource, StreamKeyMapper) {
/**
* Stream Key ARN is automatically generated on creation and assigned as the unique identifier.
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* Channel ARN for the stream.
*/
public val channelArn: Output
get() = javaResource.channelArn().applyValue({ args0 -> args0 })
/**
* A list of key-value pairs that contain metadata for the asset model.
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> toKotlin(args0) })
})
}).orElse(null)
})
/**
* Stream-key value.
*/
public val `value`: Output
get() = javaResource.`value`().applyValue({ args0 -> args0 })
}
public object StreamKeyMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.ivs.StreamKey::class == javaResource::class
override fun map(javaResource: Resource): StreamKey = StreamKey(
javaResource as
com.pulumi.awsnative.ivs.StreamKey,
)
}
/**
* @see [StreamKey].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [StreamKey].
*/
public suspend fun streamKey(name: String, block: suspend StreamKeyResourceBuilder.() -> Unit): StreamKey {
val builder = StreamKeyResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [StreamKey].
* @param name The _unique_ name of the resulting resource.
*/
public fun streamKey(name: String): StreamKey {
val builder = StreamKeyResourceBuilder()
builder.name(name)
return builder.build()
}