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

com.pulumi.cloudflare.kotlin.AccessOrganizationArgs.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.

The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.cloudflare.kotlin

import com.pulumi.cloudflare.AccessOrganizationArgs.builder
import com.pulumi.cloudflare.kotlin.inputs.AccessOrganizationCustomPageArgs
import com.pulumi.cloudflare.kotlin.inputs.AccessOrganizationCustomPageArgsBuilder
import com.pulumi.cloudflare.kotlin.inputs.AccessOrganizationLoginDesignArgs
import com.pulumi.cloudflare.kotlin.inputs.AccessOrganizationLoginDesignArgsBuilder
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.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * A Zero Trust organization defines the user login experience.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as cloudflare from "@pulumi/cloudflare";
 * const example = new cloudflare.AccessOrganization("example", {
 *     accountId: "f037e56e89293a057740de681ac9abbe",
 *     name: "example.cloudflareaccess.com",
 *     authDomain: "example.cloudflareaccess.com",
 *     isUiReadOnly: false,
 *     userSeatExpirationInactiveTime: "720h",
 *     autoRedirectToIdentity: false,
 *     loginDesigns: [{
 *         backgroundColor: "#ffffff",
 *         textColor: "#000000",
 *         logoPath: "https://example.com/logo.png",
 *         headerText: "My header text",
 *         footerText: "My footer text",
 *     }],
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_cloudflare as cloudflare
 * example = cloudflare.AccessOrganization("example",
 *     account_id="f037e56e89293a057740de681ac9abbe",
 *     name="example.cloudflareaccess.com",
 *     auth_domain="example.cloudflareaccess.com",
 *     is_ui_read_only=False,
 *     user_seat_expiration_inactive_time="720h",
 *     auto_redirect_to_identity=False,
 *     login_designs=[{
 *         "background_color": "#ffffff",
 *         "text_color": "#000000",
 *         "logo_path": "https://example.com/logo.png",
 *         "header_text": "My header text",
 *         "footer_text": "My footer text",
 *     }])
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Cloudflare = Pulumi.Cloudflare;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Cloudflare.AccessOrganization("example", new()
 *     {
 *         AccountId = "f037e56e89293a057740de681ac9abbe",
 *         Name = "example.cloudflareaccess.com",
 *         AuthDomain = "example.cloudflareaccess.com",
 *         IsUiReadOnly = false,
 *         UserSeatExpirationInactiveTime = "720h",
 *         AutoRedirectToIdentity = false,
 *         LoginDesigns = new[]
 *         {
 *             new Cloudflare.Inputs.AccessOrganizationLoginDesignArgs
 *             {
 *                 BackgroundColor = "#ffffff",
 *                 TextColor = "#000000",
 *                 LogoPath = "https://example.com/logo.png",
 *                 HeaderText = "My header text",
 *                 FooterText = "My footer text",
 *             },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := cloudflare.NewAccessOrganization(ctx, "example", &cloudflare.AccessOrganizationArgs{
 * 			AccountId:                      pulumi.String("f037e56e89293a057740de681ac9abbe"),
 * 			Name:                           pulumi.String("example.cloudflareaccess.com"),
 * 			AuthDomain:                     pulumi.String("example.cloudflareaccess.com"),
 * 			IsUiReadOnly:                   pulumi.Bool(false),
 * 			UserSeatExpirationInactiveTime: pulumi.String("720h"),
 * 			AutoRedirectToIdentity:         pulumi.Bool(false),
 * 			LoginDesigns: cloudflare.AccessOrganizationLoginDesignArray{
 * 				&cloudflare.AccessOrganizationLoginDesignArgs{
 * 					BackgroundColor: pulumi.String("#ffffff"),
 * 					TextColor:       pulumi.String("#000000"),
 * 					LogoPath:        pulumi.String("https://example.com/logo.png"),
 * 					HeaderText:      pulumi.String("My header text"),
 * 					FooterText:      pulumi.String("My footer text"),
 * 				},
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.cloudflare.AccessOrganization;
 * import com.pulumi.cloudflare.AccessOrganizationArgs;
 * import com.pulumi.cloudflare.inputs.AccessOrganizationLoginDesignArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var example = new AccessOrganization("example", AccessOrganizationArgs.builder()
 *             .accountId("f037e56e89293a057740de681ac9abbe")
 *             .name("example.cloudflareaccess.com")
 *             .authDomain("example.cloudflareaccess.com")
 *             .isUiReadOnly(false)
 *             .userSeatExpirationInactiveTime("720h")
 *             .autoRedirectToIdentity(false)
 *             .loginDesigns(AccessOrganizationLoginDesignArgs.builder()
 *                 .backgroundColor("#ffffff")
 *                 .textColor("#000000")
 *                 .logoPath("https://example.com/logo.png")
 *                 .headerText("My header text")
 *                 .footerText("My footer text")
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: cloudflare:AccessOrganization
 *     properties:
 *       accountId: f037e56e89293a057740de681ac9abbe
 *       name: example.cloudflareaccess.com
 *       authDomain: example.cloudflareaccess.com
 *       isUiReadOnly: false
 *       userSeatExpirationInactiveTime: 720h
 *       autoRedirectToIdentity: false
 *       loginDesigns:
 *         - backgroundColor: '#ffffff'
 *           textColor: '#000000'
 *           logoPath: https://example.com/logo.png
 *           headerText: My header text
 *           footerText: My footer text
 * ```
 * 
 * ## Import
 * ```sh
 * $ pulumi import cloudflare:index/accessOrganization:AccessOrganization example 
 * ```
 * @property accountId The account identifier to target for the resource. Conflicts with `zone_id`.
 * @property allowAuthenticateViaWarp When set to true, users can authenticate via WARP for any application in your organization. Application settings will take precedence over this value.
 * @property authDomain The unique subdomain assigned to your Zero Trust organization.
 * @property autoRedirectToIdentity When set to true, users skip the identity provider selection step during login.
 * @property customPages Custom pages for your Zero Trust organization.
 * @property isUiReadOnly When set to true, this will disable all editing of Access resources via the Zero Trust Dashboard.
 * @property loginDesigns
 * @property name The name of your Zero Trust organization.
 * @property sessionDuration How often a user will be forced to re-authorise. Must be in the format `48h` or `2h45m`.
 * @property uiReadOnlyToggleReason A description of the reason why the UI read only field is being toggled.
 * @property userSeatExpirationInactiveTime The amount of time a user seat is inactive before it expires. When the user seat exceeds the set time of inactivity, the user is removed as an active seat and no longer counts against your Teams seat count. Must be in the format `300ms` or `2h45m`.
 * @property warpAuthSessionDuration The amount of time that tokens issued for applications will be valid. Must be in the format 30m or 2h45m. Valid time units are: m, h.
 * @property zoneId The zone identifier to target for the resource. Conflicts with `account_id`.
 */
public data class AccessOrganizationArgs(
    public val accountId: Output? = null,
    public val allowAuthenticateViaWarp: Output? = null,
    public val authDomain: Output? = null,
    public val autoRedirectToIdentity: Output? = null,
    public val customPages: Output>? = null,
    public val isUiReadOnly: Output? = null,
    public val loginDesigns: Output>? = null,
    public val name: Output? = null,
    public val sessionDuration: Output? = null,
    public val uiReadOnlyToggleReason: Output? = null,
    public val userSeatExpirationInactiveTime: Output? = null,
    public val warpAuthSessionDuration: Output? = null,
    public val zoneId: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.cloudflare.AccessOrganizationArgs =
        com.pulumi.cloudflare.AccessOrganizationArgs.builder()
            .accountId(accountId?.applyValue({ args0 -> args0 }))
            .allowAuthenticateViaWarp(allowAuthenticateViaWarp?.applyValue({ args0 -> args0 }))
            .authDomain(authDomain?.applyValue({ args0 -> args0 }))
            .autoRedirectToIdentity(autoRedirectToIdentity?.applyValue({ args0 -> args0 }))
            .customPages(
                customPages?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .isUiReadOnly(isUiReadOnly?.applyValue({ args0 -> args0 }))
            .loginDesigns(
                loginDesigns?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .name(name?.applyValue({ args0 -> args0 }))
            .sessionDuration(sessionDuration?.applyValue({ args0 -> args0 }))
            .uiReadOnlyToggleReason(uiReadOnlyToggleReason?.applyValue({ args0 -> args0 }))
            .userSeatExpirationInactiveTime(userSeatExpirationInactiveTime?.applyValue({ args0 -> args0 }))
            .warpAuthSessionDuration(warpAuthSessionDuration?.applyValue({ args0 -> args0 }))
            .zoneId(zoneId?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [AccessOrganizationArgs].
 */
@PulumiTagMarker
public class AccessOrganizationArgsBuilder internal constructor() {
    private var accountId: Output? = null

    private var allowAuthenticateViaWarp: Output? = null

    private var authDomain: Output? = null

    private var autoRedirectToIdentity: Output? = null

    private var customPages: Output>? = null

    private var isUiReadOnly: Output? = null

    private var loginDesigns: Output>? = null

    private var name: Output? = null

    private var sessionDuration: Output? = null

    private var uiReadOnlyToggleReason: Output? = null

    private var userSeatExpirationInactiveTime: Output? = null

    private var warpAuthSessionDuration: Output? = null

    private var zoneId: Output? = null

    /**
     * @param value The account identifier to target for the resource. Conflicts with `zone_id`.
     */
    @JvmName("hgwecliqiwtxfsam")
    public suspend fun accountId(`value`: Output) {
        this.accountId = value
    }

    /**
     * @param value When set to true, users can authenticate via WARP for any application in your organization. Application settings will take precedence over this value.
     */
    @JvmName("ipbxausytrlrunpj")
    public suspend fun allowAuthenticateViaWarp(`value`: Output) {
        this.allowAuthenticateViaWarp = value
    }

    /**
     * @param value The unique subdomain assigned to your Zero Trust organization.
     */
    @JvmName("cbwjslexkmlvrddh")
    public suspend fun authDomain(`value`: Output) {
        this.authDomain = value
    }

    /**
     * @param value When set to true, users skip the identity provider selection step during login.
     */
    @JvmName("fkroaqotvlqofleu")
    public suspend fun autoRedirectToIdentity(`value`: Output) {
        this.autoRedirectToIdentity = value
    }

    /**
     * @param value Custom pages for your Zero Trust organization.
     */
    @JvmName("sekiudmcefxlxwju")
    public suspend fun customPages(`value`: Output>) {
        this.customPages = value
    }

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

    /**
     * @param values Custom pages for your Zero Trust organization.
     */
    @JvmName("kyqhyevioercotli")
    public suspend fun customPages(values: List>) {
        this.customPages = Output.all(values)
    }

    /**
     * @param value When set to true, this will disable all editing of Access resources via the Zero Trust Dashboard.
     */
    @JvmName("pmgjarvptlylwxmn")
    public suspend fun isUiReadOnly(`value`: Output) {
        this.isUiReadOnly = value
    }

    /**
     * @param value
     */
    @JvmName("nwgxagywwvagjpjs")
    public suspend fun loginDesigns(`value`: Output>) {
        this.loginDesigns = value
    }

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

    /**
     * @param values
     */
    @JvmName("plwxycucwvjokfrn")
    public suspend fun loginDesigns(values: List>) {
        this.loginDesigns = Output.all(values)
    }

    /**
     * @param value The name of your Zero Trust organization.
     */
    @JvmName("atonwkthqkchhywj")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value How often a user will be forced to re-authorise. Must be in the format `48h` or `2h45m`.
     */
    @JvmName("wxkvfcuxeqtajswk")
    public suspend fun sessionDuration(`value`: Output) {
        this.sessionDuration = value
    }

    /**
     * @param value A description of the reason why the UI read only field is being toggled.
     */
    @JvmName("xufgcbuacfdvfxnu")
    public suspend fun uiReadOnlyToggleReason(`value`: Output) {
        this.uiReadOnlyToggleReason = value
    }

    /**
     * @param value The amount of time a user seat is inactive before it expires. When the user seat exceeds the set time of inactivity, the user is removed as an active seat and no longer counts against your Teams seat count. Must be in the format `300ms` or `2h45m`.
     */
    @JvmName("kppbsxkoctaaekyp")
    public suspend fun userSeatExpirationInactiveTime(`value`: Output) {
        this.userSeatExpirationInactiveTime = value
    }

    /**
     * @param value The amount of time that tokens issued for applications will be valid. Must be in the format 30m or 2h45m. Valid time units are: m, h.
     */
    @JvmName("cslvbkvlmlwsvtqy")
    public suspend fun warpAuthSessionDuration(`value`: Output) {
        this.warpAuthSessionDuration = value
    }

    /**
     * @param value The zone identifier to target for the resource. Conflicts with `account_id`.
     */
    @JvmName("xsfcegmiigsseogx")
    public suspend fun zoneId(`value`: Output) {
        this.zoneId = value
    }

    /**
     * @param value The account identifier to target for the resource. Conflicts with `zone_id`.
     */
    @JvmName("spyiarlvwvsubkem")
    public suspend fun accountId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.accountId = mapped
    }

    /**
     * @param value When set to true, users can authenticate via WARP for any application in your organization. Application settings will take precedence over this value.
     */
    @JvmName("eqcdubbqrpxltldv")
    public suspend fun allowAuthenticateViaWarp(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.allowAuthenticateViaWarp = mapped
    }

    /**
     * @param value The unique subdomain assigned to your Zero Trust organization.
     */
    @JvmName("cfbvplpkkawiavgl")
    public suspend fun authDomain(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.authDomain = mapped
    }

    /**
     * @param value When set to true, users skip the identity provider selection step during login.
     */
    @JvmName("gytlxwlffusdtven")
    public suspend fun autoRedirectToIdentity(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.autoRedirectToIdentity = mapped
    }

    /**
     * @param value Custom pages for your Zero Trust organization.
     */
    @JvmName("wbhgjuhmyuqfqieg")
    public suspend fun customPages(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.customPages = mapped
    }

    /**
     * @param argument Custom pages for your Zero Trust organization.
     */
    @JvmName("bxttqvydurlyrxwi")
    public suspend fun customPages(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            AccessOrganizationCustomPageArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.customPages = mapped
    }

    /**
     * @param argument Custom pages for your Zero Trust organization.
     */
    @JvmName("seyfgsdjtgoloxvq")
    public suspend fun customPages(vararg argument: suspend AccessOrganizationCustomPageArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            AccessOrganizationCustomPageArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.customPages = mapped
    }

    /**
     * @param argument Custom pages for your Zero Trust organization.
     */
    @JvmName("oiksugxmcmchchyb")
    public suspend fun customPages(argument: suspend AccessOrganizationCustomPageArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            AccessOrganizationCustomPageArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.customPages = mapped
    }

    /**
     * @param values Custom pages for your Zero Trust organization.
     */
    @JvmName("xxayrqcwvkmkljuo")
    public suspend fun customPages(vararg values: AccessOrganizationCustomPageArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.customPages = mapped
    }

    /**
     * @param value When set to true, this will disable all editing of Access resources via the Zero Trust Dashboard.
     */
    @JvmName("bdfueeoqsbmnmcmw")
    public suspend fun isUiReadOnly(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.isUiReadOnly = mapped
    }

    /**
     * @param value
     */
    @JvmName("vnufuluphpoeqsku")
    public suspend fun loginDesigns(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.loginDesigns = mapped
    }

    /**
     * @param argument
     */
    @JvmName("tvqnmuehtyexbsci")
    public suspend fun loginDesigns(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            AccessOrganizationLoginDesignArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.loginDesigns = mapped
    }

    /**
     * @param argument
     */
    @JvmName("evxygqerylchlrdr")
    public suspend fun loginDesigns(vararg argument: suspend AccessOrganizationLoginDesignArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            AccessOrganizationLoginDesignArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.loginDesigns = mapped
    }

    /**
     * @param argument
     */
    @JvmName("rnpsnxpfvcwhqxip")
    public suspend fun loginDesigns(argument: suspend AccessOrganizationLoginDesignArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            AccessOrganizationLoginDesignArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.loginDesigns = mapped
    }

    /**
     * @param values
     */
    @JvmName("rmuqfrqufsoccmsy")
    public suspend fun loginDesigns(vararg values: AccessOrganizationLoginDesignArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.loginDesigns = mapped
    }

    /**
     * @param value The name of your Zero Trust organization.
     */
    @JvmName("ancskbdgggadjsrp")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value How often a user will be forced to re-authorise. Must be in the format `48h` or `2h45m`.
     */
    @JvmName("scninsxxjrqcvmrx")
    public suspend fun sessionDuration(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sessionDuration = mapped
    }

    /**
     * @param value A description of the reason why the UI read only field is being toggled.
     */
    @JvmName("xkkjxsbkpohvpavs")
    public suspend fun uiReadOnlyToggleReason(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.uiReadOnlyToggleReason = mapped
    }

    /**
     * @param value The amount of time a user seat is inactive before it expires. When the user seat exceeds the set time of inactivity, the user is removed as an active seat and no longer counts against your Teams seat count. Must be in the format `300ms` or `2h45m`.
     */
    @JvmName("voxhuhdubqfuswyo")
    public suspend fun userSeatExpirationInactiveTime(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.userSeatExpirationInactiveTime = mapped
    }

    /**
     * @param value The amount of time that tokens issued for applications will be valid. Must be in the format 30m or 2h45m. Valid time units are: m, h.
     */
    @JvmName("itsycyontdqoniso")
    public suspend fun warpAuthSessionDuration(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.warpAuthSessionDuration = mapped
    }

    /**
     * @param value The zone identifier to target for the resource. Conflicts with `account_id`.
     */
    @JvmName("eceyofgsclxhudhi")
    public suspend fun zoneId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.zoneId = mapped
    }

    internal fun build(): AccessOrganizationArgs = AccessOrganizationArgs(
        accountId = accountId,
        allowAuthenticateViaWarp = allowAuthenticateViaWarp,
        authDomain = authDomain,
        autoRedirectToIdentity = autoRedirectToIdentity,
        customPages = customPages,
        isUiReadOnly = isUiReadOnly,
        loginDesigns = loginDesigns,
        name = name,
        sessionDuration = sessionDuration,
        uiReadOnlyToggleReason = uiReadOnlyToggleReason,
        userSeatExpirationInactiveTime = userSeatExpirationInactiveTime,
        warpAuthSessionDuration = warpAuthSessionDuration,
        zoneId = zoneId,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy