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

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

package com.pulumi.azure.appservice.kotlin.inputs

import com.pulumi.azure.appservice.inputs.WindowsFunctionAppAuthSettingsArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Double
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 *
 * @property activeDirectory An `active_directory` block as defined above.
 * @property additionalLoginParameters Specifies a map of login Parameters to send to the OpenID Connect authorization endpoint when a user logs in.
 * @property allowedExternalRedirectUrls Specifies a list of External URLs that can be redirected to as part of logging in or logging out of the Windows Function App.
 * @property defaultProvider The default authentication provider to use when multiple providers are configured. Possible values include: `AzureActiveDirectory`, `Facebook`, `Google`, `MicrosoftAccount`, `Twitter`, `Github`
 * > **NOTE:** This setting is only needed if multiple providers are configured, and the `unauthenticated_client_action` is set to "RedirectToLoginPage".
 * @property enabled Should the Authentication / Authorization feature be enabled for the Windows Function App?
 * @property facebook A `facebook` block as defined below.
 * @property github A `github` block as defined below.
 * @property google A `google` block as defined below.
 * @property issuer The OpenID Connect Issuer URI that represents the entity which issues access tokens for this Windows Function App.
 * > **NOTE:** When using Azure Active Directory, this value is the URI of the directory tenant, e.g. .
 * @property microsoft A `microsoft` block as defined below.
 * @property runtimeVersion The Runtime Version of the Authentication / Authorization feature in use for the Windows Function App.
 * @property tokenRefreshExtensionHours The number of hours after session token expiration that a session token can be used to call the token refresh API. Defaults to `72` hours.
 * @property tokenStoreEnabled Should the Windows Function App durably store platform-specific security tokens that are obtained during login flows? Defaults to `false`.
 * @property twitter A `twitter` block as defined below.
 * @property unauthenticatedClientAction The action to take when an unauthenticated client attempts to access the app. Possible values include: `RedirectToLoginPage`, `AllowAnonymous`.
 */
public data class WindowsFunctionAppAuthSettingsArgs(
    public val activeDirectory: Output? = null,
    public val additionalLoginParameters: Output>? = null,
    public val allowedExternalRedirectUrls: Output>? = null,
    public val defaultProvider: Output? = null,
    public val enabled: Output,
    public val facebook: Output? = null,
    public val github: Output? = null,
    public val google: Output? = null,
    public val issuer: Output? = null,
    public val microsoft: Output? = null,
    public val runtimeVersion: Output? = null,
    public val tokenRefreshExtensionHours: Output? = null,
    public val tokenStoreEnabled: Output? = null,
    public val twitter: Output? = null,
    public val unauthenticatedClientAction: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.appservice.inputs.WindowsFunctionAppAuthSettingsArgs =
        com.pulumi.azure.appservice.inputs.WindowsFunctionAppAuthSettingsArgs.builder()
            .activeDirectory(activeDirectory?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .additionalLoginParameters(
                additionalLoginParameters?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .allowedExternalRedirectUrls(
                allowedExternalRedirectUrls?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0
                    })
                }),
            )
            .defaultProvider(defaultProvider?.applyValue({ args0 -> args0 }))
            .enabled(enabled.applyValue({ args0 -> args0 }))
            .facebook(facebook?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .github(github?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .google(google?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .issuer(issuer?.applyValue({ args0 -> args0 }))
            .microsoft(microsoft?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .runtimeVersion(runtimeVersion?.applyValue({ args0 -> args0 }))
            .tokenRefreshExtensionHours(tokenRefreshExtensionHours?.applyValue({ args0 -> args0 }))
            .tokenStoreEnabled(tokenStoreEnabled?.applyValue({ args0 -> args0 }))
            .twitter(twitter?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .unauthenticatedClientAction(unauthenticatedClientAction?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [WindowsFunctionAppAuthSettingsArgs].
 */
@PulumiTagMarker
public class WindowsFunctionAppAuthSettingsArgsBuilder internal constructor() {
    private var activeDirectory: Output? = null

    private var additionalLoginParameters: Output>? = null

    private var allowedExternalRedirectUrls: Output>? = null

    private var defaultProvider: Output? = null

    private var enabled: Output? = null

    private var facebook: Output? = null

    private var github: Output? = null

    private var google: Output? = null

    private var issuer: Output? = null

    private var microsoft: Output? = null

    private var runtimeVersion: Output? = null

    private var tokenRefreshExtensionHours: Output? = null

    private var tokenStoreEnabled: Output? = null

    private var twitter: Output? = null

    private var unauthenticatedClientAction: Output? = null

    /**
     * @param value An `active_directory` block as defined above.
     */
    @JvmName("qfbmtdaumkgmryqe")
    public suspend
    fun activeDirectory(`value`: Output) {
        this.activeDirectory = value
    }

    /**
     * @param value Specifies a map of login Parameters to send to the OpenID Connect authorization endpoint when a user logs in.
     */
    @JvmName("obnwovhriimduoob")
    public suspend fun additionalLoginParameters(`value`: Output>) {
        this.additionalLoginParameters = value
    }

    /**
     * @param value Specifies a list of External URLs that can be redirected to as part of logging in or logging out of the Windows Function App.
     */
    @JvmName("nxctsajcjeyctavm")
    public suspend fun allowedExternalRedirectUrls(`value`: Output>) {
        this.allowedExternalRedirectUrls = value
    }

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

    /**
     * @param values Specifies a list of External URLs that can be redirected to as part of logging in or logging out of the Windows Function App.
     */
    @JvmName("iryusidoyqvlqfby")
    public suspend fun allowedExternalRedirectUrls(values: List>) {
        this.allowedExternalRedirectUrls = Output.all(values)
    }

    /**
     * @param value The default authentication provider to use when multiple providers are configured. Possible values include: `AzureActiveDirectory`, `Facebook`, `Google`, `MicrosoftAccount`, `Twitter`, `Github`
     * > **NOTE:** This setting is only needed if multiple providers are configured, and the `unauthenticated_client_action` is set to "RedirectToLoginPage".
     */
    @JvmName("rejjutfykxxtxpjm")
    public suspend fun defaultProvider(`value`: Output) {
        this.defaultProvider = value
    }

    /**
     * @param value Should the Authentication / Authorization feature be enabled for the Windows Function App?
     */
    @JvmName("vnyrvvtbdgctdcdd")
    public suspend fun enabled(`value`: Output) {
        this.enabled = value
    }

    /**
     * @param value A `facebook` block as defined below.
     */
    @JvmName("umfocfmbdqpinejt")
    public suspend fun facebook(`value`: Output) {
        this.facebook = value
    }

    /**
     * @param value A `github` block as defined below.
     */
    @JvmName("xmehtdpvfsnhjnhq")
    public suspend fun github(`value`: Output) {
        this.github = value
    }

    /**
     * @param value A `google` block as defined below.
     */
    @JvmName("nlpgunqbgmqvualu")
    public suspend fun google(`value`: Output) {
        this.google = value
    }

    /**
     * @param value The OpenID Connect Issuer URI that represents the entity which issues access tokens for this Windows Function App.
     * > **NOTE:** When using Azure Active Directory, this value is the URI of the directory tenant, e.g. .
     */
    @JvmName("iyntdpwttrytmekn")
    public suspend fun issuer(`value`: Output) {
        this.issuer = value
    }

    /**
     * @param value A `microsoft` block as defined below.
     */
    @JvmName("ykgqmbnqvjpsknbk")
    public suspend fun microsoft(`value`: Output) {
        this.microsoft = value
    }

    /**
     * @param value The Runtime Version of the Authentication / Authorization feature in use for the Windows Function App.
     */
    @JvmName("bwnoervmfqqgoslk")
    public suspend fun runtimeVersion(`value`: Output) {
        this.runtimeVersion = value
    }

    /**
     * @param value The number of hours after session token expiration that a session token can be used to call the token refresh API. Defaults to `72` hours.
     */
    @JvmName("ufepqngmgvvmoqor")
    public suspend fun tokenRefreshExtensionHours(`value`: Output) {
        this.tokenRefreshExtensionHours = value
    }

    /**
     * @param value Should the Windows Function App durably store platform-specific security tokens that are obtained during login flows? Defaults to `false`.
     */
    @JvmName("nxetcainyjkreqdh")
    public suspend fun tokenStoreEnabled(`value`: Output) {
        this.tokenStoreEnabled = value
    }

    /**
     * @param value A `twitter` block as defined below.
     */
    @JvmName("ihpjuomvjgmrjnjf")
    public suspend fun twitter(`value`: Output) {
        this.twitter = value
    }

    /**
     * @param value The action to take when an unauthenticated client attempts to access the app. Possible values include: `RedirectToLoginPage`, `AllowAnonymous`.
     */
    @JvmName("jwnvxtlrcqaohvgd")
    public suspend fun unauthenticatedClientAction(`value`: Output) {
        this.unauthenticatedClientAction = value
    }

    /**
     * @param value An `active_directory` block as defined above.
     */
    @JvmName("ywmqewjwfgogexvq")
    public suspend fun activeDirectory(`value`: WindowsFunctionAppAuthSettingsActiveDirectoryArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.activeDirectory = mapped
    }

    /**
     * @param argument An `active_directory` block as defined above.
     */
    @JvmName("odjcyenaapmflayw")
    public suspend
    fun activeDirectory(argument: suspend WindowsFunctionAppAuthSettingsActiveDirectoryArgsBuilder.() -> Unit) {
        val toBeMapped = WindowsFunctionAppAuthSettingsActiveDirectoryArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.activeDirectory = mapped
    }

    /**
     * @param value Specifies a map of login Parameters to send to the OpenID Connect authorization endpoint when a user logs in.
     */
    @JvmName("bjimtesvvlrfcign")
    public suspend fun additionalLoginParameters(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.additionalLoginParameters = mapped
    }

    /**
     * @param values Specifies a map of login Parameters to send to the OpenID Connect authorization endpoint when a user logs in.
     */
    @JvmName("mwacbshqvxvookfa")
    public fun additionalLoginParameters(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.additionalLoginParameters = mapped
    }

    /**
     * @param value Specifies a list of External URLs that can be redirected to as part of logging in or logging out of the Windows Function App.
     */
    @JvmName("ccmvwxqkynjhtqbu")
    public suspend fun allowedExternalRedirectUrls(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.allowedExternalRedirectUrls = mapped
    }

    /**
     * @param values Specifies a list of External URLs that can be redirected to as part of logging in or logging out of the Windows Function App.
     */
    @JvmName("fbgpicoqsxlewmip")
    public suspend fun allowedExternalRedirectUrls(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.allowedExternalRedirectUrls = mapped
    }

    /**
     * @param value The default authentication provider to use when multiple providers are configured. Possible values include: `AzureActiveDirectory`, `Facebook`, `Google`, `MicrosoftAccount`, `Twitter`, `Github`
     * > **NOTE:** This setting is only needed if multiple providers are configured, and the `unauthenticated_client_action` is set to "RedirectToLoginPage".
     */
    @JvmName("djovahgieemjmypq")
    public suspend fun defaultProvider(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.defaultProvider = mapped
    }

    /**
     * @param value Should the Authentication / Authorization feature be enabled for the Windows Function App?
     */
    @JvmName("ckkminlwhktxvstu")
    public suspend fun enabled(`value`: Boolean) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.enabled = mapped
    }

    /**
     * @param value A `facebook` block as defined below.
     */
    @JvmName("ubmxoslqvyfhjegm")
    public suspend fun facebook(`value`: WindowsFunctionAppAuthSettingsFacebookArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.facebook = mapped
    }

    /**
     * @param argument A `facebook` block as defined below.
     */
    @JvmName("molqegsjjjpdcwdd")
    public suspend
    fun facebook(argument: suspend WindowsFunctionAppAuthSettingsFacebookArgsBuilder.() -> Unit) {
        val toBeMapped = WindowsFunctionAppAuthSettingsFacebookArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.facebook = mapped
    }

    /**
     * @param value A `github` block as defined below.
     */
    @JvmName("uacmwdiwhgsvpbrm")
    public suspend fun github(`value`: WindowsFunctionAppAuthSettingsGithubArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.github = mapped
    }

    /**
     * @param argument A `github` block as defined below.
     */
    @JvmName("joqpbpixukjspeps")
    public suspend
    fun github(argument: suspend WindowsFunctionAppAuthSettingsGithubArgsBuilder.() -> Unit) {
        val toBeMapped = WindowsFunctionAppAuthSettingsGithubArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.github = mapped
    }

    /**
     * @param value A `google` block as defined below.
     */
    @JvmName("urgywvhrfktvjstk")
    public suspend fun google(`value`: WindowsFunctionAppAuthSettingsGoogleArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.google = mapped
    }

    /**
     * @param argument A `google` block as defined below.
     */
    @JvmName("vwxxokjevgltqxhy")
    public suspend
    fun google(argument: suspend WindowsFunctionAppAuthSettingsGoogleArgsBuilder.() -> Unit) {
        val toBeMapped = WindowsFunctionAppAuthSettingsGoogleArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.google = mapped
    }

    /**
     * @param value The OpenID Connect Issuer URI that represents the entity which issues access tokens for this Windows Function App.
     * > **NOTE:** When using Azure Active Directory, this value is the URI of the directory tenant, e.g. .
     */
    @JvmName("ptgoclhjrsppydkl")
    public suspend fun issuer(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.issuer = mapped
    }

    /**
     * @param value A `microsoft` block as defined below.
     */
    @JvmName("ygtxyosgdyxuisel")
    public suspend fun microsoft(`value`: WindowsFunctionAppAuthSettingsMicrosoftArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.microsoft = mapped
    }

    /**
     * @param argument A `microsoft` block as defined below.
     */
    @JvmName("nylqxxvctttfocxi")
    public suspend
    fun microsoft(argument: suspend WindowsFunctionAppAuthSettingsMicrosoftArgsBuilder.() -> Unit) {
        val toBeMapped = WindowsFunctionAppAuthSettingsMicrosoftArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.microsoft = mapped
    }

    /**
     * @param value The Runtime Version of the Authentication / Authorization feature in use for the Windows Function App.
     */
    @JvmName("mrptivyhhxtysngw")
    public suspend fun runtimeVersion(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.runtimeVersion = mapped
    }

    /**
     * @param value The number of hours after session token expiration that a session token can be used to call the token refresh API. Defaults to `72` hours.
     */
    @JvmName("oohwsvbguxwpmrup")
    public suspend fun tokenRefreshExtensionHours(`value`: Double?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tokenRefreshExtensionHours = mapped
    }

    /**
     * @param value Should the Windows Function App durably store platform-specific security tokens that are obtained during login flows? Defaults to `false`.
     */
    @JvmName("rkdntbhyjfqemtgh")
    public suspend fun tokenStoreEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tokenStoreEnabled = mapped
    }

    /**
     * @param value A `twitter` block as defined below.
     */
    @JvmName("rwmkbaspgemfmxgf")
    public suspend fun twitter(`value`: WindowsFunctionAppAuthSettingsTwitterArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.twitter = mapped
    }

    /**
     * @param argument A `twitter` block as defined below.
     */
    @JvmName("ipwwvgxselyluppf")
    public suspend
    fun twitter(argument: suspend WindowsFunctionAppAuthSettingsTwitterArgsBuilder.() -> Unit) {
        val toBeMapped = WindowsFunctionAppAuthSettingsTwitterArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.twitter = mapped
    }

    /**
     * @param value The action to take when an unauthenticated client attempts to access the app. Possible values include: `RedirectToLoginPage`, `AllowAnonymous`.
     */
    @JvmName("rnfphvkexjkvfywx")
    public suspend fun unauthenticatedClientAction(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.unauthenticatedClientAction = mapped
    }

    internal fun build(): WindowsFunctionAppAuthSettingsArgs = WindowsFunctionAppAuthSettingsArgs(
        activeDirectory = activeDirectory,
        additionalLoginParameters = additionalLoginParameters,
        allowedExternalRedirectUrls = allowedExternalRedirectUrls,
        defaultProvider = defaultProvider,
        enabled = enabled ?: throw PulumiNullFieldException("enabled"),
        facebook = facebook,
        github = github,
        google = google,
        issuer = issuer,
        microsoft = microsoft,
        runtimeVersion = runtimeVersion,
        tokenRefreshExtensionHours = tokenRefreshExtensionHours,
        tokenStoreEnabled = tokenStoreEnabled,
        twitter = twitter,
        unauthenticatedClientAction = unauthenticatedClientAction,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy