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

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

/**
 *
 * ## Import
 * Namespaces can be imported using its `name` as accessor id
 * ```sh
 * $ pulumi import vault:index/namespace:Namespace example 
 * ```
 * If the declared resource is imported and intends to support namespaces using a provider alias, then the name is relative to the namespace path.
 * hcl
 * provider "vault" {
 *   # Configuration options
 *   namespace = "example"
 *   alias     = "example"
 * }
 * resource "vault_namespace" "example2" {
 *   provider = vault.example
 *   path     = "example2"
 * }
 * ```sh
 * $ pulumi import vault:index/namespace:Namespace example2 example2
 * ```
 * $ terraform state show vault_namespace.example2
 * vault_namespace.example2:
 * resource "vault_namespace" "example2" {
 *     id           = "example/example2/"
 *     namespace_id = 
 *     path         = "example2"
 *     path_fq      = "example2"
 * }
 * @property customMetadata Custom metadata describing this namespace. Value type
 * is `map[string]string`. Requires Vault version 1.12+.
 * @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 of the namespace. Must not have a trailing `/`.
 * @property pathFq The fully qualified path to the namespace. Useful when provisioning resources in a child `namespace`.
 * The path is relative to the provider's `namespace` argument.
 */
public data class NamespaceArgs(
    public val customMetadata: Output>? = null,
    public val namespace: Output? = null,
    public val path: Output? = null,
    public val pathFq: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.vault.NamespaceArgs = com.pulumi.vault.NamespaceArgs.builder()
        .customMetadata(
            customMetadata?.applyValue({ args0 ->
                args0.map({ args0 ->
                    args0.key.to(args0.value)
                }).toMap()
            }),
        )
        .namespace(namespace?.applyValue({ args0 -> args0 }))
        .path(path?.applyValue({ args0 -> args0 }))
        .pathFq(pathFq?.applyValue({ args0 -> args0 })).build()
}

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

    private var namespace: Output? = null

    private var path: Output? = null

    private var pathFq: Output? = null

    /**
     * @param value Custom metadata describing this namespace. Value type
     * is `map[string]string`. Requires Vault version 1.12+.
     */
    @JvmName("hxkmatqonnwmvhsc")
    public suspend fun customMetadata(`value`: Output>) {
        this.customMetadata = 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("mgvkrweykjjbutwo")
    public suspend fun namespace(`value`: Output) {
        this.namespace = value
    }

    /**
     * @param value The path of the namespace. Must not have a trailing `/`.
     */
    @JvmName("qkwqgbksjhqcbjek")
    public suspend fun path(`value`: Output) {
        this.path = value
    }

    /**
     * @param value The fully qualified path to the namespace. Useful when provisioning resources in a child `namespace`.
     * The path is relative to the provider's `namespace` argument.
     */
    @JvmName("lmxtgihveagfnelr")
    public suspend fun pathFq(`value`: Output) {
        this.pathFq = value
    }

    /**
     * @param value Custom metadata describing this namespace. Value type
     * is `map[string]string`. Requires Vault version 1.12+.
     */
    @JvmName("vykoqktkenkprxcf")
    public suspend fun customMetadata(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.customMetadata = mapped
    }

    /**
     * @param values Custom metadata describing this namespace. Value type
     * is `map[string]string`. Requires Vault version 1.12+.
     */
    @JvmName("pjqujvjwqngsdwyn")
    public fun customMetadata(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.customMetadata = 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("lxskvksusjoewsgv")
    public suspend fun namespace(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.namespace = mapped
    }

    /**
     * @param value The path of the namespace. Must not have a trailing `/`.
     */
    @JvmName("lrpvbbilybbkdxie")
    public suspend fun path(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.path = mapped
    }

    /**
     * @param value The fully qualified path to the namespace. Useful when provisioning resources in a child `namespace`.
     * The path is relative to the provider's `namespace` argument.
     */
    @JvmName("ukqhckbtubnqaqjk")
    public suspend fun pathFq(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.pathFq = mapped
    }

    internal fun build(): NamespaceArgs = NamespaceArgs(
        customMetadata = customMetadata,
        namespace = namespace,
        path = path,
        pathFq = pathFq,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy