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

com.pulumi.azure.media.kotlin.inputs.ContentKeyPolicyPolicyOptionTokenRestrictionArgs.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: 6.15.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.media.kotlin.inputs

import com.pulumi.azure.media.inputs.ContentKeyPolicyPolicyOptionTokenRestrictionArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property alternateKeys One or more `alternate_key` block as defined above.
 * @property audience The audience for the token.
 * @property issuer The token issuer.
 * @property openIdConnectDiscoveryDocument The OpenID connect discovery document.
 * @property primaryRsaTokenKeyExponent The RSA parameter exponent.
 * @property primaryRsaTokenKeyModulus The RSA parameter modulus.
 * @property primarySymmetricTokenKey The key value of the key. Specifies a symmetric key for token validation.
 * @property primaryX509TokenKeyRaw The raw data field of a certificate in PKCS 12 format (X509Certificate2 in .NET). Specifies a certificate for token validation.
 * @property requiredClaims One or more `required_claim` blocks as defined above.
 * @property tokenType The type of token. Supported values are `Jwt` or `Swt`.
 * > **NOTE:** Each token_restriction can only have one type of primary verification key: if you want to use RSA you must provide `primary_rsa_token_key_exponent` and `primary_rsa_token_key_modulus`, if you want to use symmetric you need to provide `primary_symmetric_token_key` and for x509 you must provide `primary_x509_token_key_raw`. For more information about Token access please refer to 
 */
public data class ContentKeyPolicyPolicyOptionTokenRestrictionArgs(
    public val alternateKeys: Output>? = null,
    public val audience: Output? = null,
    public val issuer: Output? = null,
    public val openIdConnectDiscoveryDocument: Output? = null,
    public val primaryRsaTokenKeyExponent: Output? = null,
    public val primaryRsaTokenKeyModulus: Output? = null,
    public val primarySymmetricTokenKey: Output? = null,
    public val primaryX509TokenKeyRaw: Output? = null,
    public val requiredClaims: Output>? = null,
    public val tokenType: Output? = null,
) :
    ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.media.inputs.ContentKeyPolicyPolicyOptionTokenRestrictionArgs =
        com.pulumi.azure.media.inputs.ContentKeyPolicyPolicyOptionTokenRestrictionArgs.builder()
            .alternateKeys(
                alternateKeys?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .audience(audience?.applyValue({ args0 -> args0 }))
            .issuer(issuer?.applyValue({ args0 -> args0 }))
            .openIdConnectDiscoveryDocument(openIdConnectDiscoveryDocument?.applyValue({ args0 -> args0 }))
            .primaryRsaTokenKeyExponent(primaryRsaTokenKeyExponent?.applyValue({ args0 -> args0 }))
            .primaryRsaTokenKeyModulus(primaryRsaTokenKeyModulus?.applyValue({ args0 -> args0 }))
            .primarySymmetricTokenKey(primarySymmetricTokenKey?.applyValue({ args0 -> args0 }))
            .primaryX509TokenKeyRaw(primaryX509TokenKeyRaw?.applyValue({ args0 -> args0 }))
            .requiredClaims(
                requiredClaims?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .tokenType(tokenType?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ContentKeyPolicyPolicyOptionTokenRestrictionArgs].
 */
@PulumiTagMarker
public class ContentKeyPolicyPolicyOptionTokenRestrictionArgsBuilder internal constructor() {
    private var alternateKeys:
        Output>? = null

    private var audience: Output? = null

    private var issuer: Output? = null

    private var openIdConnectDiscoveryDocument: Output? = null

    private var primaryRsaTokenKeyExponent: Output? = null

    private var primaryRsaTokenKeyModulus: Output? = null

    private var primarySymmetricTokenKey: Output? = null

    private var primaryX509TokenKeyRaw: Output? = null

    private var requiredClaims:
        Output>? = null

    private var tokenType: Output? = null

    /**
     * @param value One or more `alternate_key` block as defined above.
     */
    @JvmName("ydnnxnfsslxymrym")
    public suspend fun alternateKeys(`value`: Output>) {
        this.alternateKeys = value
    }

    @JvmName("iknvpoatcimcvira")
    public suspend fun alternateKeys(vararg values: Output) {
        this.alternateKeys = Output.all(values.asList())
    }

    /**
     * @param values One or more `alternate_key` block as defined above.
     */
    @JvmName("tfxdwforitpcmjvq")
    public suspend fun alternateKeys(values: List>) {
        this.alternateKeys = Output.all(values)
    }

    /**
     * @param value The audience for the token.
     */
    @JvmName("qsvyttypnoemaerl")
    public suspend fun audience(`value`: Output) {
        this.audience = value
    }

    /**
     * @param value The token issuer.
     */
    @JvmName("cpurndbgxkvcetkl")
    public suspend fun issuer(`value`: Output) {
        this.issuer = value
    }

    /**
     * @param value The OpenID connect discovery document.
     */
    @JvmName("eyrianxeexuldgqu")
    public suspend fun openIdConnectDiscoveryDocument(`value`: Output) {
        this.openIdConnectDiscoveryDocument = value
    }

    /**
     * @param value The RSA parameter exponent.
     */
    @JvmName("qtkxxaoqyiyyofax")
    public suspend fun primaryRsaTokenKeyExponent(`value`: Output) {
        this.primaryRsaTokenKeyExponent = value
    }

    /**
     * @param value The RSA parameter modulus.
     */
    @JvmName("dbrwidefetcqwuil")
    public suspend fun primaryRsaTokenKeyModulus(`value`: Output) {
        this.primaryRsaTokenKeyModulus = value
    }

    /**
     * @param value The key value of the key. Specifies a symmetric key for token validation.
     */
    @JvmName("yopulgkwhsuqyryi")
    public suspend fun primarySymmetricTokenKey(`value`: Output) {
        this.primarySymmetricTokenKey = value
    }

    /**
     * @param value The raw data field of a certificate in PKCS 12 format (X509Certificate2 in .NET). Specifies a certificate for token validation.
     */
    @JvmName("moekfdywnqcdpdtd")
    public suspend fun primaryX509TokenKeyRaw(`value`: Output) {
        this.primaryX509TokenKeyRaw = value
    }

    /**
     * @param value One or more `required_claim` blocks as defined above.
     */
    @JvmName("seyxrqvtofqdmwul")
    public suspend fun requiredClaims(`value`: Output>) {
        this.requiredClaims = value
    }

    @JvmName("mkulvxpbswolxggt")
    public suspend fun requiredClaims(vararg values: Output) {
        this.requiredClaims = Output.all(values.asList())
    }

    /**
     * @param values One or more `required_claim` blocks as defined above.
     */
    @JvmName("wmwkpbwtmxthwguw")
    public suspend fun requiredClaims(values: List>) {
        this.requiredClaims = Output.all(values)
    }

    /**
     * @param value The type of token. Supported values are `Jwt` or `Swt`.
     * > **NOTE:** Each token_restriction can only have one type of primary verification key: if you want to use RSA you must provide `primary_rsa_token_key_exponent` and `primary_rsa_token_key_modulus`, if you want to use symmetric you need to provide `primary_symmetric_token_key` and for x509 you must provide `primary_x509_token_key_raw`. For more information about Token access please refer to 
     */
    @JvmName("jutchjtlpracwyyy")
    public suspend fun tokenType(`value`: Output) {
        this.tokenType = value
    }

    /**
     * @param value One or more `alternate_key` block as defined above.
     */
    @JvmName("ytbfiiodtqwjttow")
    public suspend fun alternateKeys(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.alternateKeys = mapped
    }

    /**
     * @param argument One or more `alternate_key` block as defined above.
     */
    @JvmName("gqdkuvigmaxvwdym")
    public suspend fun alternateKeys(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ContentKeyPolicyPolicyOptionTokenRestrictionAlternateKeyArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.alternateKeys = mapped
    }

    /**
     * @param argument One or more `alternate_key` block as defined above.
     */
    @JvmName("huxhoofkuqxxkrdo")
    public suspend fun alternateKeys(vararg argument: suspend ContentKeyPolicyPolicyOptionTokenRestrictionAlternateKeyArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ContentKeyPolicyPolicyOptionTokenRestrictionAlternateKeyArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.alternateKeys = mapped
    }

    /**
     * @param argument One or more `alternate_key` block as defined above.
     */
    @JvmName("dxcemdgeshuvndcf")
    public suspend fun alternateKeys(argument: suspend ContentKeyPolicyPolicyOptionTokenRestrictionAlternateKeyArgsBuilder.() -> Unit) {
        val toBeMapped =
            listOf(
                ContentKeyPolicyPolicyOptionTokenRestrictionAlternateKeyArgsBuilder().applySuspend {
                    argument()
                }.build(),
            )
        val mapped = of(toBeMapped)
        this.alternateKeys = mapped
    }

    /**
     * @param values One or more `alternate_key` block as defined above.
     */
    @JvmName("sylxvvuwascqvsqu")
    public suspend fun alternateKeys(vararg values: ContentKeyPolicyPolicyOptionTokenRestrictionAlternateKeyArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.alternateKeys = mapped
    }

    /**
     * @param value The audience for the token.
     */
    @JvmName("bnghniporyhksofm")
    public suspend fun audience(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.audience = mapped
    }

    /**
     * @param value The token issuer.
     */
    @JvmName("bgsmtqhedugdoojk")
    public suspend fun issuer(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.issuer = mapped
    }

    /**
     * @param value The OpenID connect discovery document.
     */
    @JvmName("scrlxaevwffhpbgj")
    public suspend fun openIdConnectDiscoveryDocument(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.openIdConnectDiscoveryDocument = mapped
    }

    /**
     * @param value The RSA parameter exponent.
     */
    @JvmName("kxqtjredcnvueguu")
    public suspend fun primaryRsaTokenKeyExponent(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.primaryRsaTokenKeyExponent = mapped
    }

    /**
     * @param value The RSA parameter modulus.
     */
    @JvmName("uiduxirorfoxwcce")
    public suspend fun primaryRsaTokenKeyModulus(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.primaryRsaTokenKeyModulus = mapped
    }

    /**
     * @param value The key value of the key. Specifies a symmetric key for token validation.
     */
    @JvmName("ltjkllcimggaugou")
    public suspend fun primarySymmetricTokenKey(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.primarySymmetricTokenKey = mapped
    }

    /**
     * @param value The raw data field of a certificate in PKCS 12 format (X509Certificate2 in .NET). Specifies a certificate for token validation.
     */
    @JvmName("rtwpxfkhmpowofru")
    public suspend fun primaryX509TokenKeyRaw(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.primaryX509TokenKeyRaw = mapped
    }

    /**
     * @param value One or more `required_claim` blocks as defined above.
     */
    @JvmName("wjiediaetpitbnne")
    public suspend fun requiredClaims(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.requiredClaims = mapped
    }

    /**
     * @param argument One or more `required_claim` blocks as defined above.
     */
    @JvmName("bowbwaafnoklahvy")
    public suspend fun requiredClaims(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ContentKeyPolicyPolicyOptionTokenRestrictionRequiredClaimArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.requiredClaims = mapped
    }

    /**
     * @param argument One or more `required_claim` blocks as defined above.
     */
    @JvmName("gpckrrpkayvydbvo")
    public suspend fun requiredClaims(vararg argument: suspend ContentKeyPolicyPolicyOptionTokenRestrictionRequiredClaimArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ContentKeyPolicyPolicyOptionTokenRestrictionRequiredClaimArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.requiredClaims = mapped
    }

    /**
     * @param argument One or more `required_claim` blocks as defined above.
     */
    @JvmName("vaaasapcnomqywfc")
    public suspend fun requiredClaims(argument: suspend ContentKeyPolicyPolicyOptionTokenRestrictionRequiredClaimArgsBuilder.() -> Unit) {
        val toBeMapped =
            listOf(
                ContentKeyPolicyPolicyOptionTokenRestrictionRequiredClaimArgsBuilder().applySuspend {
                    argument()
                }.build(),
            )
        val mapped = of(toBeMapped)
        this.requiredClaims = mapped
    }

    /**
     * @param values One or more `required_claim` blocks as defined above.
     */
    @JvmName("bjqfekixdfnswvhc")
    public suspend fun requiredClaims(vararg values: ContentKeyPolicyPolicyOptionTokenRestrictionRequiredClaimArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.requiredClaims = mapped
    }

    /**
     * @param value The type of token. Supported values are `Jwt` or `Swt`.
     * > **NOTE:** Each token_restriction can only have one type of primary verification key: if you want to use RSA you must provide `primary_rsa_token_key_exponent` and `primary_rsa_token_key_modulus`, if you want to use symmetric you need to provide `primary_symmetric_token_key` and for x509 you must provide `primary_x509_token_key_raw`. For more information about Token access please refer to 
     */
    @JvmName("yxejenefqhiylhhl")
    public suspend fun tokenType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tokenType = mapped
    }

    internal fun build(): ContentKeyPolicyPolicyOptionTokenRestrictionArgs =
        ContentKeyPolicyPolicyOptionTokenRestrictionArgs(
            alternateKeys = alternateKeys,
            audience = audience,
            issuer = issuer,
            openIdConnectDiscoveryDocument = openIdConnectDiscoveryDocument,
            primaryRsaTokenKeyExponent = primaryRsaTokenKeyExponent,
            primaryRsaTokenKeyModulus = primaryRsaTokenKeyModulus,
            primarySymmetricTokenKey = primarySymmetricTokenKey,
            primaryX509TokenKeyRaw = primaryX509TokenKeyRaw,
            requiredClaims = requiredClaims,
            tokenType = tokenType,
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy