com.pulumi.awsnative.mediapackage.kotlin.Channel.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.mediapackage.kotlin
import com.pulumi.awsnative.kotlin.outputs.CreateOnlyTag
import com.pulumi.awsnative.mediapackage.kotlin.outputs.ChannelHlsIngest
import com.pulumi.awsnative.mediapackage.kotlin.outputs.ChannelLogConfiguration
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.kotlin.outputs.CreateOnlyTag.Companion.toKotlin as createOnlyTagToKotlin
import com.pulumi.awsnative.mediapackage.kotlin.outputs.ChannelHlsIngest.Companion.toKotlin as channelHlsIngestToKotlin
import com.pulumi.awsnative.mediapackage.kotlin.outputs.ChannelLogConfiguration.Companion.toKotlin as channelLogConfigurationToKotlin
/**
* Builder for [Channel].
*/
@PulumiTagMarker
public class ChannelResourceBuilder internal constructor() {
public var name: String? = null
public var args: ChannelArgs = ChannelArgs()
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 ChannelArgsBuilder.() -> Unit) {
val builder = ChannelArgsBuilder()
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(): Channel {
val builtJavaResource = com.pulumi.awsnative.mediapackage.Channel(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Channel(builtJavaResource)
}
}
/**
* Resource schema for AWS::MediaPackage::Channel
*/
public class Channel internal constructor(
override val javaResource: com.pulumi.awsnative.mediapackage.Channel,
) : KotlinCustomResource(javaResource, ChannelMapper) {
/**
* The Amazon Resource Name (ARN) assigned to the Channel.
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* The ID of the Channel.
*/
public val awsId: Output
get() = javaResource.awsId().applyValue({ args0 -> args0 })
/**
* A short text description of the Channel.
*/
public val description: Output?
get() = javaResource.description().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The configuration parameters for egress access logging.
*/
public val egressAccessLogs: Output?
get() = javaResource.egressAccessLogs().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> channelLogConfigurationToKotlin(args0) })
}).orElse(null)
})
/**
* An HTTP Live Streaming (HLS) ingest resource configuration.
*/
public val hlsIngest: Output?
get() = javaResource.hlsIngest().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
channelHlsIngestToKotlin(args0)
})
}).orElse(null)
})
/**
* The configuration parameters for egress access logging.
*/
public val ingressAccessLogs: Output?
get() = javaResource.ingressAccessLogs().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> channelLogConfigurationToKotlin(args0) })
}).orElse(null)
})
/**
* A collection of tags associated with a resource
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> createOnlyTagToKotlin(args0) })
})
}).orElse(null)
})
}
public object ChannelMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.mediapackage.Channel::class == javaResource::class
override fun map(javaResource: Resource): Channel = Channel(
javaResource as
com.pulumi.awsnative.mediapackage.Channel,
)
}
/**
* @see [Channel].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [Channel].
*/
public suspend fun channel(name: String, block: suspend ChannelResourceBuilder.() -> Unit): Channel {
val builder = ChannelResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [Channel].
* @param name The _unique_ name of the resulting resource.
*/
public fun channel(name: String): Channel {
val builder = ChannelResourceBuilder()
builder.name(name)
return builder.build()
}