All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.awsnative.mediatailor.kotlin.ChannelPolicy.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.mediatailor.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.Any
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit

/**
 * Builder for [ChannelPolicy].
 */
@PulumiTagMarker
public class ChannelPolicyResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: ChannelPolicyArgs = ChannelPolicyArgs()

    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 ChannelPolicyArgsBuilder.() -> Unit) {
        val builder = ChannelPolicyArgsBuilder()
        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(): ChannelPolicy {
        val builtJavaResource = com.pulumi.awsnative.mediatailor.ChannelPolicy(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return ChannelPolicy(builtJavaResource)
    }
}

/**
 * Definition of AWS::MediaTailor::ChannelPolicy Resource Type
 */
public class ChannelPolicy internal constructor(
    override val javaResource: com.pulumi.awsnative.mediatailor.ChannelPolicy,
) : KotlinCustomResource(javaResource, ChannelPolicyMapper) {
    /**
     * The name of the channel associated with this Channel Policy.
     */
    public val channelName: Output
        get() = javaResource.channelName().applyValue({ args0 -> args0 })

    /**
     * 

The IAM policy for the channel. IAM policies are used to control access to your channel.

* Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::MediaTailor::ChannelPolicy` for more information about the expected schema for this property. */ public val policy: Output get() = javaResource.policy().applyValue({ args0 -> args0 }) } public object ChannelPolicyMapper : ResourceMapper { override fun supportsMappingOfType(javaResource: Resource): Boolean = com.pulumi.awsnative.mediatailor.ChannelPolicy::class == javaResource::class override fun map(javaResource: Resource): ChannelPolicy = ChannelPolicy( javaResource as com.pulumi.awsnative.mediatailor.ChannelPolicy, ) } /** * @see [ChannelPolicy]. * @param name The _unique_ name of the resulting resource. * @param block Builder for [ChannelPolicy]. */ public suspend fun channelPolicy( name: String, block: suspend ChannelPolicyResourceBuilder.() -> Unit, ): ChannelPolicy { val builder = ChannelPolicyResourceBuilder() builder.name(name) block(builder) return builder.build() } /** * @see [ChannelPolicy]. * @param name The _unique_ name of the resulting resource. */ public fun channelPolicy(name: String): ChannelPolicy { val builder = ChannelPolicyResourceBuilder() builder.name(name) return builder.build() }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy