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

com.pulumi.vault.identity.kotlin.EntityAliasArgs.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.identity.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.identity.EntityAliasArgs.builder
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as vault from "@pulumi/vault";
 * const test = new vault.identity.EntityAlias("test", {
 *     name: "user_1",
 *     mountAccessor: "token_1f2bd5",
 *     canonicalId: "49877D63-07AD-4B85-BDA8-B61626C477E8",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_vault as vault
 * test = vault.identity.EntityAlias("test",
 *     name="user_1",
 *     mount_accessor="token_1f2bd5",
 *     canonical_id="49877D63-07AD-4B85-BDA8-B61626C477E8")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Vault = Pulumi.Vault;
 * return await Deployment.RunAsync(() =>
 * {
 *     var test = new Vault.Identity.EntityAlias("test", new()
 *     {
 *         Name = "user_1",
 *         MountAccessor = "token_1f2bd5",
 *         CanonicalId = "49877D63-07AD-4B85-BDA8-B61626C477E8",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-vault/sdk/v6/go/vault/identity"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := identity.NewEntityAlias(ctx, "test", &identity.EntityAliasArgs{
 * 			Name:          pulumi.String("user_1"),
 * 			MountAccessor: pulumi.String("token_1f2bd5"),
 * 			CanonicalId:   pulumi.String("49877D63-07AD-4B85-BDA8-B61626C477E8"),
 * 		})
 * 		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.identity.EntityAlias;
 * import com.pulumi.vault.identity.EntityAliasArgs;
 * 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 test = new EntityAlias("test", EntityAliasArgs.builder()
 *             .name("user_1")
 *             .mountAccessor("token_1f2bd5")
 *             .canonicalId("49877D63-07AD-4B85-BDA8-B61626C477E8")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   test:
 *     type: vault:identity:EntityAlias
 *     properties:
 *       name: user_1
 *       mountAccessor: token_1f2bd5
 *       canonicalId: 49877D63-07AD-4B85-BDA8-B61626C477E8
 * ```
 * 
 * ## Import
 * Identity entity alias can be imported using the `id`, e.g.
 * ```sh
 * $ pulumi import vault:identity/entityAlias:EntityAlias test "3856fb4d-3c91-dcaf-2401-68f446796bfb"
 * ```
 * @property canonicalId Entity ID to which this alias belongs to.
 * @property customMetadata Custom metadata to be associated with this alias.
 * @property mountAccessor Accessor of the mount to which the alias should belong to.
 * @property name Name of the alias. Name should be the identifier of the client in the authentication source. For example, if the alias belongs to userpass backend, the name should be a valid username within userpass backend. If alias belongs to GitHub, it should be the GitHub username.
 * @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*.
 */
public data class EntityAliasArgs(
    public val canonicalId: Output? = null,
    public val customMetadata: Output>? = null,
    public val mountAccessor: Output? = null,
    public val name: Output? = null,
    public val namespace: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.vault.identity.EntityAliasArgs =
        com.pulumi.vault.identity.EntityAliasArgs.builder()
            .canonicalId(canonicalId?.applyValue({ args0 -> args0 }))
            .customMetadata(
                customMetadata?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .mountAccessor(mountAccessor?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .namespace(namespace?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [EntityAliasArgs].
 */
@PulumiTagMarker
public class EntityAliasArgsBuilder internal constructor() {
    private var canonicalId: Output? = null

    private var customMetadata: Output>? = null

    private var mountAccessor: Output? = null

    private var name: Output? = null

    private var namespace: Output? = null

    /**
     * @param value Entity ID to which this alias belongs to.
     */
    @JvmName("ifypwmsfuxjtpjsd")
    public suspend fun canonicalId(`value`: Output) {
        this.canonicalId = value
    }

    /**
     * @param value Custom metadata to be associated with this alias.
     */
    @JvmName("cklljliwiaqngaol")
    public suspend fun customMetadata(`value`: Output>) {
        this.customMetadata = value
    }

    /**
     * @param value Accessor of the mount to which the alias should belong to.
     */
    @JvmName("manvpujntaguxubb")
    public suspend fun mountAccessor(`value`: Output) {
        this.mountAccessor = value
    }

    /**
     * @param value Name of the alias. Name should be the identifier of the client in the authentication source. For example, if the alias belongs to userpass backend, the name should be a valid username within userpass backend. If alias belongs to GitHub, it should be the GitHub username.
     */
    @JvmName("vhiuaflhrhhshbjl")
    public suspend fun name(`value`: Output) {
        this.name = 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("wjicnihwhgdglqfl")
    public suspend fun namespace(`value`: Output) {
        this.namespace = value
    }

    /**
     * @param value Entity ID to which this alias belongs to.
     */
    @JvmName("ffsewafoiacdyerf")
    public suspend fun canonicalId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.canonicalId = mapped
    }

    /**
     * @param value Custom metadata to be associated with this alias.
     */
    @JvmName("yspgrspwkpfnowgl")
    public suspend fun customMetadata(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.customMetadata = mapped
    }

    /**
     * @param values Custom metadata to be associated with this alias.
     */
    @JvmName("nbkswupcojcevcuw")
    public fun customMetadata(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.customMetadata = mapped
    }

    /**
     * @param value Accessor of the mount to which the alias should belong to.
     */
    @JvmName("urtlkqhdsbdtyxwf")
    public suspend fun mountAccessor(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.mountAccessor = mapped
    }

    /**
     * @param value Name of the alias. Name should be the identifier of the client in the authentication source. For example, if the alias belongs to userpass backend, the name should be a valid username within userpass backend. If alias belongs to GitHub, it should be the GitHub username.
     */
    @JvmName("ymfcgkeedqprwvsb")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = 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("kiwuisdtlojxwfxl")
    public suspend fun namespace(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.namespace = mapped
    }

    internal fun build(): EntityAliasArgs = EntityAliasArgs(
        canonicalId = canonicalId,
        customMetadata = customMetadata,
        mountAccessor = mountAccessor,
        name = name,
        namespace = namespace,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy