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

com.pulumi.vault.okta.kotlin.AuthBackendArgs.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.4.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.vault.okta.kotlin

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 com.pulumi.vault.okta.AuthBackendArgs.builder
import com.pulumi.vault.okta.kotlin.inputs.AuthBackendGroupArgs
import com.pulumi.vault.okta.kotlin.inputs.AuthBackendGroupArgsBuilder
import com.pulumi.vault.okta.kotlin.inputs.AuthBackendUserArgs
import com.pulumi.vault.okta.kotlin.inputs.AuthBackendUserArgsBuilder
import kotlin.Boolean
import kotlin.Deprecated
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Provides a resource for managing an
 * [Okta auth backend within Vault](https://www.vaultproject.io/docs/auth/okta.html).
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as vault from "@pulumi/vault";
 * const example = new vault.okta.AuthBackend("example", {
 *     description: "Demonstration of the Terraform Okta auth backend",
 *     organization: "example",
 *     token: "something that should be kept secret",
 *     groups: [{
 *         groupName: "foo",
 *         policies: [
 *             "one",
 *             "two",
 *         ],
 *     }],
 *     users: [{
 *         username: "bar",
 *         groups: ["foo"],
 *     }],
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_vault as vault
 * example = vault.okta.AuthBackend("example",
 *     description="Demonstration of the Terraform Okta auth backend",
 *     organization="example",
 *     token="something that should be kept secret",
 *     groups=[vault.okta.AuthBackendGroupArgs(
 *         group_name="foo",
 *         policies=[
 *             "one",
 *             "two",
 *         ],
 *     )],
 *     users=[vault.okta.AuthBackendUserArgs(
 *         username="bar",
 *         groups=["foo"],
 *     )])
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Vault = Pulumi.Vault;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Vault.Okta.AuthBackend("example", new()
 *     {
 *         Description = "Demonstration of the Terraform Okta auth backend",
 *         Organization = "example",
 *         Token = "something that should be kept secret",
 *         Groups = new[]
 *         {
 *             new Vault.Okta.Inputs.AuthBackendGroupArgs
 *             {
 *                 GroupName = "foo",
 *                 Policies = new[]
 *                 {
 *                     "one",
 *                     "two",
 *                 },
 *             },
 *         },
 *         Users = new[]
 *         {
 *             new Vault.Okta.Inputs.AuthBackendUserArgs
 *             {
 *                 Username = "bar",
 *                 Groups = new[]
 *                 {
 *                     "foo",
 *                 },
 *             },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-vault/sdk/v6/go/vault/okta"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := okta.NewAuthBackend(ctx, "example", &okta.AuthBackendArgs{
 * 			Description:  pulumi.String("Demonstration of the Terraform Okta auth backend"),
 * 			Organization: pulumi.String("example"),
 * 			Token:        pulumi.String("something that should be kept secret"),
 * 			Groups: okta.AuthBackendGroupTypeArray{
 * 				&okta.AuthBackendGroupTypeArgs{
 * 					GroupName: pulumi.String("foo"),
 * 					Policies: pulumi.StringArray{
 * 						pulumi.String("one"),
 * 						pulumi.String("two"),
 * 					},
 * 				},
 * 			},
 * 			Users: okta.AuthBackendUserTypeArray{
 * 				&okta.AuthBackendUserTypeArgs{
 * 					Username: pulumi.String("bar"),
 * 					Groups: pulumi.StringArray{
 * 						pulumi.String("foo"),
 * 					},
 * 				},
 * 			},
 * 		})
 * 		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.vault.okta.AuthBackend;
 * import com.pulumi.vault.okta.AuthBackendArgs;
 * import com.pulumi.vault.okta.inputs.AuthBackendGroupArgs;
 * import com.pulumi.vault.okta.inputs.AuthBackendUserArgs;
 * 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 AuthBackend("example", AuthBackendArgs.builder()
 *             .description("Demonstration of the Terraform Okta auth backend")
 *             .organization("example")
 *             .token("something that should be kept secret")
 *             .groups(AuthBackendGroupArgs.builder()
 *                 .groupName("foo")
 *                 .policies(
 *                     "one",
 *                     "two")
 *                 .build())
 *             .users(AuthBackendUserArgs.builder()
 *                 .username("bar")
 *                 .groups("foo")
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: vault:okta:AuthBackend
 *     properties:
 *       description: Demonstration of the Terraform Okta auth backend
 *       organization: example
 *       token: something that should be kept secret
 *       groups:
 *         - groupName: foo
 *           policies:
 *             - one
 *             - two
 *       users:
 *         - username: bar
 *           groups:
 *             - foo
 * ```
 * 
 * ## Import
 * Okta authentication backends can be imported using its `path`, e.g.
 * ```sh
 * $ pulumi import vault:okta/authBackend:AuthBackend example okta
 * ```
 * @property baseUrl The Okta url. Examples: oktapreview.com, okta.com
 * @property bypassOktaMfa When true, requests by Okta for a MFA check will be bypassed. This also disallows certain status checks on the account, such as whether the password is expired.
 * @property description The description of the auth backend
 * @property disableRemount If set, opts out of mount migration on path updates.
 * See here for more info on [Mount Migration](https://www.vaultproject.io/docs/concepts/mount-migration)
 * @property groups Associate Okta groups with policies within Vault.
 * See below for more details.
 * @property maxTtl Maximum duration after which authentication will be expired
 * [See the documentation for info on valid duration formats](https://golang.org/pkg/time/#ParseDuration).
 * @property namespace The namespace to provision the resource in.
 * The value should not contain leading or trailing forward slashes.
 * The `namespace` is always relative to the provider's configured [namespace](https://www.terraform.io/docs/providers/vault/index.html#namespace).
 * *Available only for Vault Enterprise*.
 * @property organization The Okta organization. This will be the first part of the url `https://XXX.okta.com`
 * @property path Path to mount the Okta auth backend. Default to path `okta`.
 * @property token The Okta API token. This is required to query Okta for user group membership.
 * If this is not supplied only locally configured groups will be enabled.
 * @property tokenBoundCidrs Specifies the blocks of IP addresses which are allowed to use the generated token
 * @property tokenExplicitMaxTtl Generated Token's Explicit Maximum TTL in seconds
 * @property tokenMaxTtl The maximum lifetime of the generated token
 * @property tokenNoDefaultPolicy If true, the 'default' policy will not automatically be added to generated tokens
 * @property tokenNumUses The maximum number of times a token may be used, a value of zero means unlimited
 * @property tokenPeriod Generated Token's Period
 * @property tokenPolicies Generated Token's Policies
 * @property tokenTtl The initial ttl of the token to generate in seconds
 * @property tokenType The type of token to generate, service or batch
 * @property ttl Duration after which authentication will be expired.
 * [See the documentation for info on valid duration formats](https://golang.org/pkg/time/#ParseDuration).
 * @property users Associate Okta users with groups or policies within Vault.
 * See below for more details.
 */
public data class AuthBackendArgs(
    public val baseUrl: Output? = null,
    public val bypassOktaMfa: Output? = null,
    public val description: Output? = null,
    public val disableRemount: Output? = null,
    public val groups: Output>? = null,
    @Deprecated(
        message = """
  Deprecated. Please use `token_max_ttl` instead.
  """,
    )
    public val maxTtl: Output? = null,
    public val namespace: Output? = null,
    public val organization: Output? = null,
    public val path: Output? = null,
    public val token: Output? = null,
    public val tokenBoundCidrs: Output>? = null,
    public val tokenExplicitMaxTtl: Output? = null,
    public val tokenMaxTtl: Output? = null,
    public val tokenNoDefaultPolicy: Output? = null,
    public val tokenNumUses: Output? = null,
    public val tokenPeriod: Output? = null,
    public val tokenPolicies: Output>? = null,
    public val tokenTtl: Output? = null,
    public val tokenType: Output? = null,
    @Deprecated(
        message = """
  Deprecated. Please use `token_ttl` instead.
  """,
    )
    public val ttl: Output? = null,
    public val users: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.vault.okta.AuthBackendArgs =
        com.pulumi.vault.okta.AuthBackendArgs.builder()
            .baseUrl(baseUrl?.applyValue({ args0 -> args0 }))
            .bypassOktaMfa(bypassOktaMfa?.applyValue({ args0 -> args0 }))
            .description(description?.applyValue({ args0 -> args0 }))
            .disableRemount(disableRemount?.applyValue({ args0 -> args0 }))
            .groups(groups?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .maxTtl(maxTtl?.applyValue({ args0 -> args0 }))
            .namespace(namespace?.applyValue({ args0 -> args0 }))
            .organization(organization?.applyValue({ args0 -> args0 }))
            .path(path?.applyValue({ args0 -> args0 }))
            .token(token?.applyValue({ args0 -> args0 }))
            .tokenBoundCidrs(tokenBoundCidrs?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .tokenExplicitMaxTtl(tokenExplicitMaxTtl?.applyValue({ args0 -> args0 }))
            .tokenMaxTtl(tokenMaxTtl?.applyValue({ args0 -> args0 }))
            .tokenNoDefaultPolicy(tokenNoDefaultPolicy?.applyValue({ args0 -> args0 }))
            .tokenNumUses(tokenNumUses?.applyValue({ args0 -> args0 }))
            .tokenPeriod(tokenPeriod?.applyValue({ args0 -> args0 }))
            .tokenPolicies(tokenPolicies?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .tokenTtl(tokenTtl?.applyValue({ args0 -> args0 }))
            .tokenType(tokenType?.applyValue({ args0 -> args0 }))
            .ttl(ttl?.applyValue({ args0 -> args0 }))
            .users(
                users?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [AuthBackendArgs].
 */
@PulumiTagMarker
public class AuthBackendArgsBuilder internal constructor() {
    private var baseUrl: Output? = null

    private var bypassOktaMfa: Output? = null

    private var description: Output? = null

    private var disableRemount: Output? = null

    private var groups: Output>? = null

    private var maxTtl: Output? = null

    private var namespace: Output? = null

    private var organization: Output? = null

    private var path: Output? = null

    private var token: Output? = null

    private var tokenBoundCidrs: Output>? = null

    private var tokenExplicitMaxTtl: Output? = null

    private var tokenMaxTtl: Output? = null

    private var tokenNoDefaultPolicy: Output? = null

    private var tokenNumUses: Output? = null

    private var tokenPeriod: Output? = null

    private var tokenPolicies: Output>? = null

    private var tokenTtl: Output? = null

    private var tokenType: Output? = null

    private var ttl: Output? = null

    private var users: Output>? = null

    /**
     * @param value The Okta url. Examples: oktapreview.com, okta.com
     */
    @JvmName("dplplnsafbebqxog")
    public suspend fun baseUrl(`value`: Output) {
        this.baseUrl = value
    }

    /**
     * @param value When true, requests by Okta for a MFA check will be bypassed. This also disallows certain status checks on the account, such as whether the password is expired.
     */
    @JvmName("rgxsjulntfcuybif")
    public suspend fun bypassOktaMfa(`value`: Output) {
        this.bypassOktaMfa = value
    }

    /**
     * @param value The description of the auth backend
     */
    @JvmName("gwdfcorpatrchxsn")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value If set, opts out of mount migration on path updates.
     * See here for more info on [Mount Migration](https://www.vaultproject.io/docs/concepts/mount-migration)
     */
    @JvmName("ikilixfqphtghhyx")
    public suspend fun disableRemount(`value`: Output) {
        this.disableRemount = value
    }

    /**
     * @param value Associate Okta groups with policies within Vault.
     * See below for more details.
     */
    @JvmName("ccqtnolducihtrhj")
    public suspend fun groups(`value`: Output>) {
        this.groups = value
    }

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

    /**
     * @param values Associate Okta groups with policies within Vault.
     * See below for more details.
     */
    @JvmName("anvmtjxdupnebldt")
    public suspend fun groups(values: List>) {
        this.groups = Output.all(values)
    }

    /**
     * @param value Maximum duration after which authentication will be expired
     * [See the documentation for info on valid duration formats](https://golang.org/pkg/time/#ParseDuration).
     */
    @Deprecated(
        message = """
  Deprecated. Please use `token_max_ttl` instead.
  """,
    )
    @JvmName("yxyjadghacuxuqvs")
    public suspend fun maxTtl(`value`: Output) {
        this.maxTtl = value
    }

    /**
     * @param value The namespace to provision the resource in.
     * The value should not contain leading or trailing forward slashes.
     * The `namespace` is always relative to the provider's configured [namespace](https://www.terraform.io/docs/providers/vault/index.html#namespace).
     * *Available only for Vault Enterprise*.
     */
    @JvmName("mcxxusllwcxlkvrd")
    public suspend fun namespace(`value`: Output) {
        this.namespace = value
    }

    /**
     * @param value The Okta organization. This will be the first part of the url `https://XXX.okta.com`
     */
    @JvmName("epichamqgrsbxory")
    public suspend fun organization(`value`: Output) {
        this.organization = value
    }

    /**
     * @param value Path to mount the Okta auth backend. Default to path `okta`.
     */
    @JvmName("ywmkybkcaessrdux")
    public suspend fun path(`value`: Output) {
        this.path = value
    }

    /**
     * @param value The Okta API token. This is required to query Okta for user group membership.
     * If this is not supplied only locally configured groups will be enabled.
     */
    @JvmName("nwjblbbpimtgnrsw")
    public suspend fun token(`value`: Output) {
        this.token = value
    }

    /**
     * @param value Specifies the blocks of IP addresses which are allowed to use the generated token
     */
    @JvmName("aebbndlshwtgnpeq")
    public suspend fun tokenBoundCidrs(`value`: Output>) {
        this.tokenBoundCidrs = value
    }

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

    /**
     * @param values Specifies the blocks of IP addresses which are allowed to use the generated token
     */
    @JvmName("msrikwtabptgxsap")
    public suspend fun tokenBoundCidrs(values: List>) {
        this.tokenBoundCidrs = Output.all(values)
    }

    /**
     * @param value Generated Token's Explicit Maximum TTL in seconds
     */
    @JvmName("vmgobciawdpqoifk")
    public suspend fun tokenExplicitMaxTtl(`value`: Output) {
        this.tokenExplicitMaxTtl = value
    }

    /**
     * @param value The maximum lifetime of the generated token
     */
    @JvmName("fyrylrstyadxncne")
    public suspend fun tokenMaxTtl(`value`: Output) {
        this.tokenMaxTtl = value
    }

    /**
     * @param value If true, the 'default' policy will not automatically be added to generated tokens
     */
    @JvmName("htiwllsrhqqeiepp")
    public suspend fun tokenNoDefaultPolicy(`value`: Output) {
        this.tokenNoDefaultPolicy = value
    }

    /**
     * @param value The maximum number of times a token may be used, a value of zero means unlimited
     */
    @JvmName("vmqmwbppyelwsdmh")
    public suspend fun tokenNumUses(`value`: Output) {
        this.tokenNumUses = value
    }

    /**
     * @param value Generated Token's Period
     */
    @JvmName("ydcoulqpwrjfcwpw")
    public suspend fun tokenPeriod(`value`: Output) {
        this.tokenPeriod = value
    }

    /**
     * @param value Generated Token's Policies
     */
    @JvmName("liqtdbcgegvstsfq")
    public suspend fun tokenPolicies(`value`: Output>) {
        this.tokenPolicies = value
    }

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

    /**
     * @param values Generated Token's Policies
     */
    @JvmName("ejbvvcjpbjbesyuj")
    public suspend fun tokenPolicies(values: List>) {
        this.tokenPolicies = Output.all(values)
    }

    /**
     * @param value The initial ttl of the token to generate in seconds
     */
    @JvmName("ugrsqbckimxdgwce")
    public suspend fun tokenTtl(`value`: Output) {
        this.tokenTtl = value
    }

    /**
     * @param value The type of token to generate, service or batch
     */
    @JvmName("svhdklkciakgxalf")
    public suspend fun tokenType(`value`: Output) {
        this.tokenType = value
    }

    /**
     * @param value Duration after which authentication will be expired.
     * [See the documentation for info on valid duration formats](https://golang.org/pkg/time/#ParseDuration).
     */
    @Deprecated(
        message = """
  Deprecated. Please use `token_ttl` instead.
  """,
    )
    @JvmName("rmqqxgjqoowfwobd")
    public suspend fun ttl(`value`: Output) {
        this.ttl = value
    }

    /**
     * @param value Associate Okta users with groups or policies within Vault.
     * See below for more details.
     */
    @JvmName("ihvfmqilgvrxjngk")
    public suspend fun users(`value`: Output>) {
        this.users = value
    }

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

    /**
     * @param values Associate Okta users with groups or policies within Vault.
     * See below for more details.
     */
    @JvmName("tnwumgfhycjnmmvr")
    public suspend fun users(values: List>) {
        this.users = Output.all(values)
    }

    /**
     * @param value The Okta url. Examples: oktapreview.com, okta.com
     */
    @JvmName("vskluidrjrbfxsoj")
    public suspend fun baseUrl(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.baseUrl = mapped
    }

    /**
     * @param value When true, requests by Okta for a MFA check will be bypassed. This also disallows certain status checks on the account, such as whether the password is expired.
     */
    @JvmName("ebsyqdyafjiqvtva")
    public suspend fun bypassOktaMfa(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.bypassOktaMfa = mapped
    }

    /**
     * @param value The description of the auth backend
     */
    @JvmName("ebaacitwjtojdvgr")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value If set, opts out of mount migration on path updates.
     * See here for more info on [Mount Migration](https://www.vaultproject.io/docs/concepts/mount-migration)
     */
    @JvmName("iftiltgsdouvwmni")
    public suspend fun disableRemount(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.disableRemount = mapped
    }

    /**
     * @param value Associate Okta groups with policies within Vault.
     * See below for more details.
     */
    @JvmName("vvvudslciddvfrbc")
    public suspend fun groups(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.groups = mapped
    }

    /**
     * @param argument Associate Okta groups with policies within Vault.
     * See below for more details.
     */
    @JvmName("vuldclealttshyag")
    public suspend fun groups(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            AuthBackendGroupArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.groups = mapped
    }

    /**
     * @param argument Associate Okta groups with policies within Vault.
     * See below for more details.
     */
    @JvmName("udpnrchebakvwkaj")
    public suspend fun groups(vararg argument: suspend AuthBackendGroupArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            AuthBackendGroupArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.groups = mapped
    }

    /**
     * @param argument Associate Okta groups with policies within Vault.
     * See below for more details.
     */
    @JvmName("kspailjeylsrfbkd")
    public suspend fun groups(argument: suspend AuthBackendGroupArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(AuthBackendGroupArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.groups = mapped
    }

    /**
     * @param values Associate Okta groups with policies within Vault.
     * See below for more details.
     */
    @JvmName("xbfcxqfreopfdiqb")
    public suspend fun groups(vararg values: AuthBackendGroupArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.groups = mapped
    }

    /**
     * @param value Maximum duration after which authentication will be expired
     * [See the documentation for info on valid duration formats](https://golang.org/pkg/time/#ParseDuration).
     */
    @Deprecated(
        message = """
  Deprecated. Please use `token_max_ttl` instead.
  """,
    )
    @JvmName("pocutclmoklfagns")
    public suspend fun maxTtl(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maxTtl = mapped
    }

    /**
     * @param value The namespace to provision the resource in.
     * The value should not contain leading or trailing forward slashes.
     * The `namespace` is always relative to the provider's configured [namespace](https://www.terraform.io/docs/providers/vault/index.html#namespace).
     * *Available only for Vault Enterprise*.
     */
    @JvmName("bvolxiylcpokjcmy")
    public suspend fun namespace(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.namespace = mapped
    }

    /**
     * @param value The Okta organization. This will be the first part of the url `https://XXX.okta.com`
     */
    @JvmName("fcdmqnrhgqttqjjg")
    public suspend fun organization(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.organization = mapped
    }

    /**
     * @param value Path to mount the Okta auth backend. Default to path `okta`.
     */
    @JvmName("saoxchqtpwnifycx")
    public suspend fun path(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.path = mapped
    }

    /**
     * @param value The Okta API token. This is required to query Okta for user group membership.
     * If this is not supplied only locally configured groups will be enabled.
     */
    @JvmName("shunphwojqlhdvgo")
    public suspend fun token(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.token = mapped
    }

    /**
     * @param value Specifies the blocks of IP addresses which are allowed to use the generated token
     */
    @JvmName("hhlwbmyudiasvvlf")
    public suspend fun tokenBoundCidrs(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tokenBoundCidrs = mapped
    }

    /**
     * @param values Specifies the blocks of IP addresses which are allowed to use the generated token
     */
    @JvmName("axigabndkmjffgfk")
    public suspend fun tokenBoundCidrs(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tokenBoundCidrs = mapped
    }

    /**
     * @param value Generated Token's Explicit Maximum TTL in seconds
     */
    @JvmName("gcptyksrlcockbpu")
    public suspend fun tokenExplicitMaxTtl(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tokenExplicitMaxTtl = mapped
    }

    /**
     * @param value The maximum lifetime of the generated token
     */
    @JvmName("wpacsvgtuyisinvj")
    public suspend fun tokenMaxTtl(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tokenMaxTtl = mapped
    }

    /**
     * @param value If true, the 'default' policy will not automatically be added to generated tokens
     */
    @JvmName("jgojgkwjfkchuswr")
    public suspend fun tokenNoDefaultPolicy(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tokenNoDefaultPolicy = mapped
    }

    /**
     * @param value The maximum number of times a token may be used, a value of zero means unlimited
     */
    @JvmName("gasyvejuebnlvrnl")
    public suspend fun tokenNumUses(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tokenNumUses = mapped
    }

    /**
     * @param value Generated Token's Period
     */
    @JvmName("omprlvmkjogjnucp")
    public suspend fun tokenPeriod(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tokenPeriod = mapped
    }

    /**
     * @param value Generated Token's Policies
     */
    @JvmName("fwtxvwkqysukwsxm")
    public suspend fun tokenPolicies(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tokenPolicies = mapped
    }

    /**
     * @param values Generated Token's Policies
     */
    @JvmName("pcvdbredogjmrrpa")
    public suspend fun tokenPolicies(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tokenPolicies = mapped
    }

    /**
     * @param value The initial ttl of the token to generate in seconds
     */
    @JvmName("yqngmxbqvylejvyw")
    public suspend fun tokenTtl(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tokenTtl = mapped
    }

    /**
     * @param value The type of token to generate, service or batch
     */
    @JvmName("oexmvxpmgeajjmxo")
    public suspend fun tokenType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tokenType = mapped
    }

    /**
     * @param value Duration after which authentication will be expired.
     * [See the documentation for info on valid duration formats](https://golang.org/pkg/time/#ParseDuration).
     */
    @Deprecated(
        message = """
  Deprecated. Please use `token_ttl` instead.
  """,
    )
    @JvmName("dtwcvkuxebhqurrq")
    public suspend fun ttl(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ttl = mapped
    }

    /**
     * @param value Associate Okta users with groups or policies within Vault.
     * See below for more details.
     */
    @JvmName("gdsqvrrcglxlbagj")
    public suspend fun users(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.users = mapped
    }

    /**
     * @param argument Associate Okta users with groups or policies within Vault.
     * See below for more details.
     */
    @JvmName("hydufmlppfqhfrng")
    public suspend fun users(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            AuthBackendUserArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.users = mapped
    }

    /**
     * @param argument Associate Okta users with groups or policies within Vault.
     * See below for more details.
     */
    @JvmName("uklioalpltimdwwt")
    public suspend fun users(vararg argument: suspend AuthBackendUserArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            AuthBackendUserArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.users = mapped
    }

    /**
     * @param argument Associate Okta users with groups or policies within Vault.
     * See below for more details.
     */
    @JvmName("njhjqcwgeasqotkf")
    public suspend fun users(argument: suspend AuthBackendUserArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(AuthBackendUserArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.users = mapped
    }

    /**
     * @param values Associate Okta users with groups or policies within Vault.
     * See below for more details.
     */
    @JvmName("vomseyvmpaluvucf")
    public suspend fun users(vararg values: AuthBackendUserArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.users = mapped
    }

    internal fun build(): AuthBackendArgs = AuthBackendArgs(
        baseUrl = baseUrl,
        bypassOktaMfa = bypassOktaMfa,
        description = description,
        disableRemount = disableRemount,
        groups = groups,
        maxTtl = maxTtl,
        namespace = namespace,
        organization = organization,
        path = path,
        token = token,
        tokenBoundCidrs = tokenBoundCidrs,
        tokenExplicitMaxTtl = tokenExplicitMaxTtl,
        tokenMaxTtl = tokenMaxTtl,
        tokenNoDefaultPolicy = tokenNoDefaultPolicy,
        tokenNumUses = tokenNumUses,
        tokenPeriod = tokenPeriod,
        tokenPolicies = tokenPolicies,
        tokenTtl = tokenTtl,
        tokenType = tokenType,
        ttl = ttl,
        users = users,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy