com.pulumi.awsnative.kinesisvideo.kotlin.Stream.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.kinesisvideo.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.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
/**
* Builder for [Stream].
*/
@PulumiTagMarker
public class StreamResourceBuilder internal constructor() {
public var name: String? = null
public var args: StreamArgs = StreamArgs()
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 StreamArgsBuilder.() -> Unit) {
val builder = StreamArgsBuilder()
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(): Stream {
val builtJavaResource = com.pulumi.awsnative.kinesisvideo.Stream(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Stream(builtJavaResource)
}
}
/**
* Resource Type Definition for AWS::KinesisVideo::Stream
*/
public class Stream internal constructor(
override val javaResource: com.pulumi.awsnative.kinesisvideo.Stream,
) : KotlinCustomResource(javaResource, StreamMapper) {
/**
* The Amazon Resource Name (ARN) of the Kinesis Video stream.
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* The number of hours till which Kinesis Video will retain the data in the stream
*/
public val dataRetentionInHours: Output?
get() = javaResource.dataRetentionInHours().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The name of the device that is writing to the stream.
*/
public val deviceName: Output?
get() = javaResource.deviceName().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* AWS KMS key ID that Kinesis Video Streams uses to encrypt stream data.
*/
public val kmsKeyId: Output?
get() = javaResource.kmsKeyId().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* The media type of the stream. Consumers of the stream can use this information when processing the stream.
*/
public val mediaType: Output?
get() = javaResource.mediaType().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* The name of the Kinesis Video stream.
*/
public val name: Output?
get() = javaResource.name().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* An array of key-value pairs associated with the Kinesis Video Stream.
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> toKotlin(args0) })
})
}).orElse(null)
})
}
public object StreamMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.kinesisvideo.Stream::class == javaResource::class
override fun map(javaResource: Resource): Stream = Stream(
javaResource as
com.pulumi.awsnative.kinesisvideo.Stream,
)
}
/**
* @see [Stream].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [Stream].
*/
public suspend fun stream(name: String, block: suspend StreamResourceBuilder.() -> Unit): Stream {
val builder = StreamResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [Stream].
* @param name The _unique_ name of the resulting resource.
*/
public fun stream(name: String): Stream {
val builder = StreamResourceBuilder()
builder.name(name)
return builder.build()
}