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

com.pulumi.vault.tokenauth.kotlin.AuthBackendRoleArgs.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.tokenauth.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.vault.tokenauth.AuthBackendRoleArgs.builder
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Manages Token auth backend role in a Vault server. See the [Vault
 * documentation](https://www.vaultproject.io/docs/auth/token.html) for more
 * information.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as vault from "@pulumi/vault";
 * const example = new vault.tokenauth.AuthBackendRole("example", {
 *     roleName: "my-role",
 *     allowedPolicies: [
 *         "dev",
 *         "test",
 *     ],
 *     disallowedPolicies: ["default"],
 *     allowedEntityAliases: ["test_entity"],
 *     orphan: true,
 *     tokenPeriod: 86400,
 *     renewable: true,
 *     tokenExplicitMaxTtl: 115200,
 *     pathSuffix: "path-suffix",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_vault as vault
 * example = vault.tokenauth.AuthBackendRole("example",
 *     role_name="my-role",
 *     allowed_policies=[
 *         "dev",
 *         "test",
 *     ],
 *     disallowed_policies=["default"],
 *     allowed_entity_aliases=["test_entity"],
 *     orphan=True,
 *     token_period=86400,
 *     renewable=True,
 *     token_explicit_max_ttl=115200,
 *     path_suffix="path-suffix")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Vault = Pulumi.Vault;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Vault.TokenAuth.AuthBackendRole("example", new()
 *     {
 *         RoleName = "my-role",
 *         AllowedPolicies = new[]
 *         {
 *             "dev",
 *             "test",
 *         },
 *         DisallowedPolicies = new[]
 *         {
 *             "default",
 *         },
 *         AllowedEntityAliases = new[]
 *         {
 *             "test_entity",
 *         },
 *         Orphan = true,
 *         TokenPeriod = 86400,
 *         Renewable = true,
 *         TokenExplicitMaxTtl = 115200,
 *         PathSuffix = "path-suffix",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-vault/sdk/v6/go/vault/tokenauth"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := tokenauth.NewAuthBackendRole(ctx, "example", &tokenauth.AuthBackendRoleArgs{
 * 			RoleName: pulumi.String("my-role"),
 * 			AllowedPolicies: pulumi.StringArray{
 * 				pulumi.String("dev"),
 * 				pulumi.String("test"),
 * 			},
 * 			DisallowedPolicies: pulumi.StringArray{
 * 				pulumi.String("default"),
 * 			},
 * 			AllowedEntityAliases: pulumi.StringArray{
 * 				pulumi.String("test_entity"),
 * 			},
 * 			Orphan:              pulumi.Bool(true),
 * 			TokenPeriod:         pulumi.Int(86400),
 * 			Renewable:           pulumi.Bool(true),
 * 			TokenExplicitMaxTtl: pulumi.Int(115200),
 * 			PathSuffix:          pulumi.String("path-suffix"),
 * 		})
 * 		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.tokenauth.AuthBackendRole;
 * import com.pulumi.vault.tokenauth.AuthBackendRoleArgs;
 * 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 AuthBackendRole("example", AuthBackendRoleArgs.builder()
 *             .roleName("my-role")
 *             .allowedPolicies(
 *                 "dev",
 *                 "test")
 *             .disallowedPolicies("default")
 *             .allowedEntityAliases("test_entity")
 *             .orphan(true)
 *             .tokenPeriod("86400")
 *             .renewable(true)
 *             .tokenExplicitMaxTtl("115200")
 *             .pathSuffix("path-suffix")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: vault:tokenauth:AuthBackendRole
 *     properties:
 *       roleName: my-role
 *       allowedPolicies:
 *         - dev
 *         - test
 *       disallowedPolicies:
 *         - default
 *       allowedEntityAliases:
 *         - test_entity
 *       orphan: true
 *       tokenPeriod: '86400'
 *       renewable: true
 *       tokenExplicitMaxTtl: '115200'
 *       pathSuffix: path-suffix
 * ```
 * 
 * ## Import
 * Token auth backend roles can be imported with `auth/token/roles/` followed by the `role_name`, e.g.
 * ```sh
 * $ pulumi import vault:tokenauth/authBackendRole:AuthBackendRole example auth/token/roles/my-role
 * ```
 * @property allowedEntityAliases List of allowed entity aliases.
 * @property allowedPolicies List of allowed policies for given role.
 * @property allowedPoliciesGlobs Set of allowed policies with glob match for given role.
 * @property disallowedPolicies List of disallowed policies for given role.
 * @property disallowedPoliciesGlobs Set of disallowed policies with glob match for given role.
 * @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 orphan If true, tokens created against this policy will be orphan tokens.
 * @property pathSuffix Tokens created against this role will have the given suffix as part of their path in addition to the role name.
 * > Due to a bug the resource. This *will* cause all existing tokens issued by this role to be revoked.
 * @property renewable Whether to disable the ability of the token to be renewed past its initial TTL.
 * @property roleName The name of the role.
 * @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
 */
public data class AuthBackendRoleArgs(
    public val allowedEntityAliases: Output>? = null,
    public val allowedPolicies: Output>? = null,
    public val allowedPoliciesGlobs: Output>? = null,
    public val disallowedPolicies: Output>? = null,
    public val disallowedPoliciesGlobs: Output>? = null,
    public val namespace: Output? = null,
    public val orphan: Output? = null,
    public val pathSuffix: Output? = null,
    public val renewable: Output? = null,
    public val roleName: 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,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.vault.tokenauth.AuthBackendRoleArgs =
        com.pulumi.vault.tokenauth.AuthBackendRoleArgs.builder()
            .allowedEntityAliases(allowedEntityAliases?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .allowedPolicies(allowedPolicies?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .allowedPoliciesGlobs(allowedPoliciesGlobs?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .disallowedPolicies(disallowedPolicies?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .disallowedPoliciesGlobs(
                disallowedPoliciesGlobs?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0
                    })
                }),
            )
            .namespace(namespace?.applyValue({ args0 -> args0 }))
            .orphan(orphan?.applyValue({ args0 -> args0 }))
            .pathSuffix(pathSuffix?.applyValue({ args0 -> args0 }))
            .renewable(renewable?.applyValue({ args0 -> args0 }))
            .roleName(roleName?.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 })).build()
}

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

    private var allowedPolicies: Output>? = null

    private var allowedPoliciesGlobs: Output>? = null

    private var disallowedPolicies: Output>? = null

    private var disallowedPoliciesGlobs: Output>? = null

    private var namespace: Output? = null

    private var orphan: Output? = null

    private var pathSuffix: Output? = null

    private var renewable: Output? = null

    private var roleName: 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

    /**
     * @param value List of allowed entity aliases.
     */
    @JvmName("ypaxqshibseghcnk")
    public suspend fun allowedEntityAliases(`value`: Output>) {
        this.allowedEntityAliases = value
    }

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

    /**
     * @param values List of allowed entity aliases.
     */
    @JvmName("olbelgalpeibscbe")
    public suspend fun allowedEntityAliases(values: List>) {
        this.allowedEntityAliases = Output.all(values)
    }

    /**
     * @param value List of allowed policies for given role.
     */
    @JvmName("vybggwivryrrnjiw")
    public suspend fun allowedPolicies(`value`: Output>) {
        this.allowedPolicies = value
    }

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

    /**
     * @param values List of allowed policies for given role.
     */
    @JvmName("pwhcyxaqluirmfej")
    public suspend fun allowedPolicies(values: List>) {
        this.allowedPolicies = Output.all(values)
    }

    /**
     * @param value Set of allowed policies with glob match for given role.
     */
    @JvmName("skolslatfftwpdir")
    public suspend fun allowedPoliciesGlobs(`value`: Output>) {
        this.allowedPoliciesGlobs = value
    }

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

    /**
     * @param values Set of allowed policies with glob match for given role.
     */
    @JvmName("sfayjdoymmjvdtwa")
    public suspend fun allowedPoliciesGlobs(values: List>) {
        this.allowedPoliciesGlobs = Output.all(values)
    }

    /**
     * @param value List of disallowed policies for given role.
     */
    @JvmName("ivftjfkixlaohfte")
    public suspend fun disallowedPolicies(`value`: Output>) {
        this.disallowedPolicies = value
    }

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

    /**
     * @param values List of disallowed policies for given role.
     */
    @JvmName("meboclbfgmaekkir")
    public suspend fun disallowedPolicies(values: List>) {
        this.disallowedPolicies = Output.all(values)
    }

    /**
     * @param value Set of disallowed policies with glob match for given role.
     */
    @JvmName("etvdvcshuitpapdu")
    public suspend fun disallowedPoliciesGlobs(`value`: Output>) {
        this.disallowedPoliciesGlobs = value
    }

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

    /**
     * @param values Set of disallowed policies with glob match for given role.
     */
    @JvmName("xjerxxbaagrcalws")
    public suspend fun disallowedPoliciesGlobs(values: List>) {
        this.disallowedPoliciesGlobs = Output.all(values)
    }

    /**
     * @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("uhesclapkrpfhxeq")
    public suspend fun namespace(`value`: Output) {
        this.namespace = value
    }

    /**
     * @param value If true, tokens created against this policy will be orphan tokens.
     */
    @JvmName("layvdyyxwpfoaghb")
    public suspend fun orphan(`value`: Output) {
        this.orphan = value
    }

    /**
     * @param value Tokens created against this role will have the given suffix as part of their path in addition to the role name.
     * > Due to a bug the resource. This *will* cause all existing tokens issued by this role to be revoked.
     */
    @JvmName("hwvpfygtedwbdlpx")
    public suspend fun pathSuffix(`value`: Output) {
        this.pathSuffix = value
    }

    /**
     * @param value Whether to disable the ability of the token to be renewed past its initial TTL.
     */
    @JvmName("faprabvjjgkwmswl")
    public suspend fun renewable(`value`: Output) {
        this.renewable = value
    }

    /**
     * @param value The name of the role.
     */
    @JvmName("usohmifidfbhjrbq")
    public suspend fun roleName(`value`: Output) {
        this.roleName = value
    }

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

    @JvmName("klloycwghytretvx")
    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("dmjbjysmcjdqftpp")
    public suspend fun tokenBoundCidrs(values: List>) {
        this.tokenBoundCidrs = Output.all(values)
    }

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

    /**
     * @param value The maximum lifetime of the generated token
     */
    @JvmName("raiutueqxfhxhnjp")
    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("fblxpjcsbivnqlbg")
    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("hdqjpfhlrobbeljr")
    public suspend fun tokenNumUses(`value`: Output) {
        this.tokenNumUses = value
    }

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

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

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

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

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

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

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

    /**
     * @param values List of allowed entity aliases.
     */
    @JvmName("bqjoefrxmsogfliv")
    public suspend fun allowedEntityAliases(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.allowedEntityAliases = mapped
    }

    /**
     * @param value List of allowed policies for given role.
     */
    @JvmName("wxhytyhwbghurlmm")
    public suspend fun allowedPolicies(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.allowedPolicies = mapped
    }

    /**
     * @param values List of allowed policies for given role.
     */
    @JvmName("pesglutuveakyebr")
    public suspend fun allowedPolicies(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.allowedPolicies = mapped
    }

    /**
     * @param value Set of allowed policies with glob match for given role.
     */
    @JvmName("ifwwotqadmqspkdl")
    public suspend fun allowedPoliciesGlobs(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.allowedPoliciesGlobs = mapped
    }

    /**
     * @param values Set of allowed policies with glob match for given role.
     */
    @JvmName("xrjfkviihutsabig")
    public suspend fun allowedPoliciesGlobs(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.allowedPoliciesGlobs = mapped
    }

    /**
     * @param value List of disallowed policies for given role.
     */
    @JvmName("dkyuwiutkgottabt")
    public suspend fun disallowedPolicies(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.disallowedPolicies = mapped
    }

    /**
     * @param values List of disallowed policies for given role.
     */
    @JvmName("ducinjwnbkttstjp")
    public suspend fun disallowedPolicies(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.disallowedPolicies = mapped
    }

    /**
     * @param value Set of disallowed policies with glob match for given role.
     */
    @JvmName("dxtncaxcbvjhvkxm")
    public suspend fun disallowedPoliciesGlobs(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.disallowedPoliciesGlobs = mapped
    }

    /**
     * @param values Set of disallowed policies with glob match for given role.
     */
    @JvmName("ykoqbqdccogcgxih")
    public suspend fun disallowedPoliciesGlobs(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.disallowedPoliciesGlobs = 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("dmgfdbgjuvpobyox")
    public suspend fun namespace(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.namespace = mapped
    }

    /**
     * @param value If true, tokens created against this policy will be orphan tokens.
     */
    @JvmName("smgnwabhcpqeqrma")
    public suspend fun orphan(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.orphan = mapped
    }

    /**
     * @param value Tokens created against this role will have the given suffix as part of their path in addition to the role name.
     * > Due to a bug the resource. This *will* cause all existing tokens issued by this role to be revoked.
     */
    @JvmName("gnmcpadfmetklgfq")
    public suspend fun pathSuffix(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.pathSuffix = mapped
    }

    /**
     * @param value Whether to disable the ability of the token to be renewed past its initial TTL.
     */
    @JvmName("swmanufctifirabn")
    public suspend fun renewable(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.renewable = mapped
    }

    /**
     * @param value The name of the role.
     */
    @JvmName("evlahxertcvqykpj")
    public suspend fun roleName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.roleName = mapped
    }

    /**
     * @param value Specifies the blocks of IP addresses which are allowed to use the generated token
     */
    @JvmName("hepujiopnahayaog")
    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("dryukqxyehqgmach")
    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("ktwkmpnyojjjuvpj")
    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("igeabfoowenkfqkb")
    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("iuffvrfqyhivewve")
    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("kbmyjxkfkadjpmxl")
    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("mkncbbfuepvnkgcs")
    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("epjjwrdvsmrhgujb")
    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("dnpqhbagjuwqlajc")
    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("erasmhmvxxwjusyb")
    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("ixevrvasdccvnlel")
    public suspend fun tokenType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tokenType = mapped
    }

    internal fun build(): AuthBackendRoleArgs = AuthBackendRoleArgs(
        allowedEntityAliases = allowedEntityAliases,
        allowedPolicies = allowedPolicies,
        allowedPoliciesGlobs = allowedPoliciesGlobs,
        disallowedPolicies = disallowedPolicies,
        disallowedPoliciesGlobs = disallowedPoliciesGlobs,
        namespace = namespace,
        orphan = orphan,
        pathSuffix = pathSuffix,
        renewable = renewable,
        roleName = roleName,
        tokenBoundCidrs = tokenBoundCidrs,
        tokenExplicitMaxTtl = tokenExplicitMaxTtl,
        tokenMaxTtl = tokenMaxTtl,
        tokenNoDefaultPolicy = tokenNoDefaultPolicy,
        tokenNumUses = tokenNumUses,
        tokenPeriod = tokenPeriod,
        tokenPolicies = tokenPolicies,
        tokenTtl = tokenTtl,
        tokenType = tokenType,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy