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

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

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 1.24.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.mediatailor.kotlin

import com.pulumi.awsnative.kotlin.outputs.Tag
import com.pulumi.awsnative.mediatailor.kotlin.outputs.PlaybackConfigurationAvailSuppression
import com.pulumi.awsnative.mediatailor.kotlin.outputs.PlaybackConfigurationBumper
import com.pulumi.awsnative.mediatailor.kotlin.outputs.PlaybackConfigurationCdnConfiguration
import com.pulumi.awsnative.mediatailor.kotlin.outputs.PlaybackConfigurationDashConfiguration
import com.pulumi.awsnative.mediatailor.kotlin.outputs.PlaybackConfigurationHlsConfiguration
import com.pulumi.awsnative.mediatailor.kotlin.outputs.PlaybackConfigurationLivePreRollConfiguration
import com.pulumi.awsnative.mediatailor.kotlin.outputs.PlaybackConfigurationManifestProcessingRules
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.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin
import com.pulumi.awsnative.mediatailor.kotlin.outputs.PlaybackConfigurationAvailSuppression.Companion.toKotlin as playbackConfigurationAvailSuppressionToKotlin
import com.pulumi.awsnative.mediatailor.kotlin.outputs.PlaybackConfigurationBumper.Companion.toKotlin as playbackConfigurationBumperToKotlin
import com.pulumi.awsnative.mediatailor.kotlin.outputs.PlaybackConfigurationCdnConfiguration.Companion.toKotlin as playbackConfigurationCdnConfigurationToKotlin
import com.pulumi.awsnative.mediatailor.kotlin.outputs.PlaybackConfigurationDashConfiguration.Companion.toKotlin as playbackConfigurationDashConfigurationToKotlin
import com.pulumi.awsnative.mediatailor.kotlin.outputs.PlaybackConfigurationHlsConfiguration.Companion.toKotlin as playbackConfigurationHlsConfigurationToKotlin
import com.pulumi.awsnative.mediatailor.kotlin.outputs.PlaybackConfigurationLivePreRollConfiguration.Companion.toKotlin as playbackConfigurationLivePreRollConfigurationToKotlin
import com.pulumi.awsnative.mediatailor.kotlin.outputs.PlaybackConfigurationManifestProcessingRules.Companion.toKotlin as playbackConfigurationManifestProcessingRulesToKotlin

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

    public var args: PlaybackConfigurationArgs = PlaybackConfigurationArgs()

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

/**
 * Resource schema for AWS::MediaTailor::PlaybackConfiguration
 */
public class PlaybackConfiguration internal constructor(
    override val javaResource: com.pulumi.awsnative.mediatailor.PlaybackConfiguration,
) : KotlinCustomResource(javaResource, PlaybackConfigurationMapper) {
    /**
     * The URL for the ad decision server (ADS). This includes the specification of static parameters and placeholders for dynamic parameters. AWS Elemental MediaTailor substitutes player-specific and session-specific parameters as needed when calling the ADS. Alternately, for testing you can provide a static VAST URL. The maximum length is 25,000 characters.
     */
    public val adDecisionServerUrl: Output
        get() = javaResource.adDecisionServerUrl().applyValue({ args0 -> args0 })

    /**
     * The configuration for avail suppression, also known as ad suppression. For more information about ad suppression, see Ad Suppression (https://docs.aws.amazon.com/mediatailor/latest/ug/ad-behavior.html).
     */
    public val availSuppression: Output?
        get() = javaResource.availSuppression().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> playbackConfigurationAvailSuppressionToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * The configuration for bumpers. Bumpers are short audio or video clips that play at the start or before the end of an ad break. To learn more about bumpers, see Bumpers (https://docs.aws.amazon.com/mediatailor/latest/ug/bumpers.html).
     */
    public val bumper: Output?
        get() = javaResource.bumper().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    playbackConfigurationBumperToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * The configuration for using a content delivery network (CDN), like Amazon CloudFront, for content and ad segment management.
     */
    public val cdnConfiguration: Output?
        get() = javaResource.cdnConfiguration().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> playbackConfigurationCdnConfigurationToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * The player parameters and aliases used as dynamic variables during session initialization. For more information, see Domain Variables.
     */
    public val configurationAliases: Output>?
        get() = javaResource.configurationAliases().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 -> args0.key.to(args0.value) }).toMap()
            }).orElse(null)
        })

    /**
     * The configuration for DASH content.
     */
    public val dashConfiguration: Output?
        get() = javaResource.dashConfiguration().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> playbackConfigurationDashConfigurationToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * The configuration for HLS content.
     */
    public val hlsConfiguration: Output?
        get() = javaResource.hlsConfiguration().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> playbackConfigurationHlsConfigurationToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * The configuration for pre-roll ad insertion.
     */
    public val livePreRollConfiguration: Output?
        get() = javaResource.livePreRollConfiguration().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    playbackConfigurationLivePreRollConfigurationToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * The configuration for manifest processing rules. Manifest processing rules enable customization of the personalized manifests created by MediaTailor.
     */
    public val manifestProcessingRules: Output?
        get() = javaResource.manifestProcessingRules().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    playbackConfigurationManifestProcessingRulesToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * The identifier for the playback configuration.
     */
    public val name: Output
        get() = javaResource.name().applyValue({ args0 -> args0 })

    /**
     * Defines the maximum duration of underfilled ad time (in seconds) allowed in an ad break. If the duration of underfilled ad time exceeds the personalization threshold, then the personalization of the ad break is abandoned and the underlying content is shown. This feature applies to ad replacement in live and VOD streams, rather than ad insertion, because it relies on an underlying content stream. For more information about ad break behavior, including ad replacement and insertion, see Ad Behavior in AWS Elemental MediaTailor (https://docs.aws.amazon.com/mediatailor/latest/ug/ad-behavior.html).
     */
    public val personalizationThresholdSeconds: Output?
        get() = javaResource.personalizationThresholdSeconds().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The Amazon Resource Name (ARN) for the playback configuration.
     */
    public val playbackConfigurationArn: Output
        get() = javaResource.playbackConfigurationArn().applyValue({ args0 -> args0 })

    /**
     * The URL that the player accesses to get a manifest from MediaTailor. This session will use server-side reporting.
     */
    public val playbackEndpointPrefix: Output
        get() = javaResource.playbackEndpointPrefix().applyValue({ args0 -> args0 })

    /**
     * The URL that the player uses to initialize a session that uses client-side reporting.
     */
    public val sessionInitializationEndpointPrefix: Output
        get() = javaResource.sessionInitializationEndpointPrefix().applyValue({ args0 -> args0 })

    /**
     * The URL for a high-quality video asset to transcode and use to fill in time that's not used by ads. AWS Elemental MediaTailor shows the slate to fill in gaps in media content. Configuring the slate is optional for non-VPAID configurations. For VPAID, the slate is required because MediaTailor provides it in the slots that are designated for dynamic ad content. The slate must be a high-quality asset that contains both audio and video.
     */
    public val slateAdUrl: Output?
        get() = javaResource.slateAdUrl().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The tags to assign to the playback configuration.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> tagToKotlin(args0) })
                })
            }).orElse(null)
        })

    /**
     * The name that is used to associate this playback configuration with a custom transcode profile. This overrides the dynamic transcoding defaults of MediaTailor. Use this only if you have already set up custom profiles with the help of AWS Support.
     */
    public val transcodeProfileName: Output?
        get() = javaResource.transcodeProfileName().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The URL prefix for the parent manifest for the stream, minus the asset ID. The maximum length is 512 characters.
     */
    public val videoContentSourceUrl: Output
        get() = javaResource.videoContentSourceUrl().applyValue({ args0 -> args0 })
}

public object PlaybackConfigurationMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.mediatailor.PlaybackConfiguration::class == javaResource::class

    override fun map(javaResource: Resource): PlaybackConfiguration =
        PlaybackConfiguration(javaResource as com.pulumi.awsnative.mediatailor.PlaybackConfiguration)
}

/**
 * @see [PlaybackConfiguration].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [PlaybackConfiguration].
 */
public suspend fun playbackConfiguration(
    name: String,
    block: suspend PlaybackConfigurationResourceBuilder.() -> Unit,
): PlaybackConfiguration {
    val builder = PlaybackConfigurationResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [PlaybackConfiguration].
 * @param name The _unique_ name of the resulting resource.
 */
public fun playbackConfiguration(name: String): PlaybackConfiguration {
    val builder = PlaybackConfigurationResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy