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

com.pulumi.vault.okta.kotlin.AuthBackendUserArgs.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.6.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.vault.okta.AuthBackendUserArgs.builder
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Provides a resource to create a user in 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", {
 *     path: "user_okta",
 *     organization: "dummy",
 * });
 * const foo = new vault.okta.AuthBackendUser("foo", {
 *     path: example.path,
 *     username: "foo",
 *     groups: [
 *         "one",
 *         "two",
 *     ],
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_vault as vault
 * example = vault.okta.AuthBackend("example",
 *     path="user_okta",
 *     organization="dummy")
 * foo = vault.okta.AuthBackendUser("foo",
 *     path=example.path,
 *     username="foo",
 *     groups=[
 *         "one",
 *         "two",
 *     ])
 * ```
 * ```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()
 *     {
 *         Path = "user_okta",
 *         Organization = "dummy",
 *     });
 *     var foo = new Vault.Okta.AuthBackendUser("foo", new()
 *     {
 *         Path = example.Path,
 *         Username = "foo",
 *         Groups = new[]
 *         {
 *             "one",
 *             "two",
 *         },
 *     });
 * });
 * ```
 * ```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 {
 * 		example, err := okta.NewAuthBackend(ctx, "example", &okta.AuthBackendArgs{
 * 			Path:         pulumi.String("user_okta"),
 * 			Organization: pulumi.String("dummy"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = okta.NewAuthBackendUser(ctx, "foo", &okta.AuthBackendUserArgs{
 * 			Path:     example.Path,
 * 			Username: pulumi.String("foo"),
 * 			Groups: pulumi.StringArray{
 * 				pulumi.String("one"),
 * 				pulumi.String("two"),
 * 			},
 * 		})
 * 		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.AuthBackendUser;
 * import com.pulumi.vault.okta.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()
 *             .path("user_okta")
 *             .organization("dummy")
 *             .build());
 *         var foo = new AuthBackendUser("foo", AuthBackendUserArgs.builder()
 *             .path(example.path())
 *             .username("foo")
 *             .groups(
 *                 "one",
 *                 "two")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: vault:okta:AuthBackend
 *     properties:
 *       path: user_okta
 *       organization: dummy
 *   foo:
 *     type: vault:okta:AuthBackendUser
 *     properties:
 *       path: ${example.path}
 *       username: foo
 *       groups:
 *         - one
 *         - two
 * ```
 * 
 * ## Import
 * Okta authentication backend users can be imported using its `path/user` ID format, e.g.
 * ```sh
 * $ pulumi import vault:okta/authBackendUser:AuthBackendUser example okta/foo
 * ```
 * @property groups List of Okta groups to associate with this user
 * @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 path The path where the Okta auth backend is mounted
 * @property policies List of Vault policies to associate with this user
 * @property username Name of the user within Okta
 */
public data class AuthBackendUserArgs(
    public val groups: Output>? = null,
    public val namespace: Output? = null,
    public val path: Output? = null,
    public val policies: Output>? = null,
    public val username: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.vault.okta.AuthBackendUserArgs =
        com.pulumi.vault.okta.AuthBackendUserArgs.builder()
            .groups(groups?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .namespace(namespace?.applyValue({ args0 -> args0 }))
            .path(path?.applyValue({ args0 -> args0 }))
            .policies(policies?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .username(username?.applyValue({ args0 -> args0 })).build()
}

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

    private var namespace: Output? = null

    private var path: Output? = null

    private var policies: Output>? = null

    private var username: Output? = null

    /**
     * @param value List of Okta groups to associate with this user
     */
    @JvmName("bsvtaknikayhdluf")
    public suspend fun groups(`value`: Output>) {
        this.groups = value
    }

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

    /**
     * @param values List of Okta groups to associate with this user
     */
    @JvmName("nlfkmyngvvccyrax")
    public suspend fun groups(values: List>) {
        this.groups = 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("oexfonqyiklbmauj")
    public suspend fun namespace(`value`: Output) {
        this.namespace = value
    }

    /**
     * @param value The path where the Okta auth backend is mounted
     */
    @JvmName("gdcfgdgtiinixrsb")
    public suspend fun path(`value`: Output) {
        this.path = value
    }

    /**
     * @param value List of Vault policies to associate with this user
     */
    @JvmName("cmjjkrbfrimhoxmw")
    public suspend fun policies(`value`: Output>) {
        this.policies = value
    }

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

    /**
     * @param values List of Vault policies to associate with this user
     */
    @JvmName("fiqjcvwryucrlhoa")
    public suspend fun policies(values: List>) {
        this.policies = Output.all(values)
    }

    /**
     * @param value Name of the user within Okta
     */
    @JvmName("dxbqpitwyioggvqf")
    public suspend fun username(`value`: Output) {
        this.username = value
    }

    /**
     * @param value List of Okta groups to associate with this user
     */
    @JvmName("jdpfdyjongpjfguj")
    public suspend fun groups(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.groups = mapped
    }

    /**
     * @param values List of Okta groups to associate with this user
     */
    @JvmName("wdwcgfyjybejulwq")
    public suspend fun groups(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.groups = 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("bhjbslnpkiliojsv")
    public suspend fun namespace(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.namespace = mapped
    }

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

    /**
     * @param value List of Vault policies to associate with this user
     */
    @JvmName("idvwqwcfxnulbqmx")
    public suspend fun policies(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.policies = mapped
    }

    /**
     * @param values List of Vault policies to associate with this user
     */
    @JvmName("isukwxluolyvbnos")
    public suspend fun policies(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.policies = mapped
    }

    /**
     * @param value Name of the user within Okta
     */
    @JvmName("moupmaeksyisicpe")
    public suspend fun username(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.username = mapped
    }

    internal fun build(): AuthBackendUserArgs = AuthBackendUserArgs(
        groups = groups,
        namespace = namespace,
        path = path,
        policies = policies,
        username = username,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy