Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.vault.identity.kotlin.EntityArgs.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.
@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.EntityArgs.builder
import kotlin.Boolean
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
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.Entity("test", {
* name: "tester1",
* policies: ["test"],
* metadata: {
* foo: "bar",
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_vault as vault
* test = vault.identity.Entity("test",
* name="tester1",
* policies=["test"],
* metadata={
* "foo": "bar",
* })
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Vault = Pulumi.Vault;
* return await Deployment.RunAsync(() =>
* {
* var test = new Vault.Identity.Entity("test", new()
* {
* Name = "tester1",
* Policies = new[]
* {
* "test",
* },
* Metadata =
* {
* { "foo", "bar" },
* },
* });
* });
* ```
* ```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.NewEntity(ctx, "test", &identity.EntityArgs{
* Name: pulumi.String("tester1"),
* Policies: pulumi.StringArray{
* pulumi.String("test"),
* },
* Metadata: pulumi.StringMap{
* "foo": pulumi.String("bar"),
* },
* })
* 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.Entity;
* import com.pulumi.vault.identity.EntityArgs;
* 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 Entity("test", EntityArgs.builder()
* .name("tester1")
* .policies("test")
* .metadata(Map.of("foo", "bar"))
* .build());
* }
* }
* ```
* ```yaml
* resources:
* test:
* type: vault:identity:Entity
* properties:
* name: tester1
* policies:
* - test
* metadata:
* foo: bar
* ```
*
* ## Import
* Identity entity can be imported using the `id`, e.g.
* ```sh
* $ pulumi import vault:identity/entity:Entity test "ae6f8ued-0f1a-9f6b-2915-1a2be20dc053"
* ```
* @property disabled True/false Is this entity currently disabled. Defaults to `false`
* @property externalPolicies `false` by default. If set to `true`, this resource will ignore any policies return from Vault or specified in the resource. You can use `vault.identity.EntityPolicies` to manage policies for this entity in a decoupled manner.
* @property metadata A Map of additional metadata to associate with the user.
* @property name Name of the identity entity to create.
* @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 policies A list of policies to apply to the entity.
*/
public data class EntityArgs(
public val disabled: Output? = null,
public val externalPolicies: Output? = null,
public val metadata: Output>? = null,
public val name: Output? = null,
public val namespace: Output? = null,
public val policies: Output>? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.vault.identity.EntityArgs =
com.pulumi.vault.identity.EntityArgs.builder()
.disabled(disabled?.applyValue({ args0 -> args0 }))
.externalPolicies(externalPolicies?.applyValue({ args0 -> args0 }))
.metadata(
metadata?.applyValue({ args0 ->
args0.map({ args0 ->
args0.key.to(args0.value)
}).toMap()
}),
)
.name(name?.applyValue({ args0 -> args0 }))
.namespace(namespace?.applyValue({ args0 -> args0 }))
.policies(policies?.applyValue({ args0 -> args0.map({ args0 -> args0 }) })).build()
}
/**
* Builder for [EntityArgs].
*/
@PulumiTagMarker
public class EntityArgsBuilder internal constructor() {
private var disabled: Output? = null
private var externalPolicies: Output? = null
private var metadata: Output>? = null
private var name: Output? = null
private var namespace: Output? = null
private var policies: Output>? = null
/**
* @param value True/false Is this entity currently disabled. Defaults to `false`
*/
@JvmName("wkxgvmpceifjlamd")
public suspend fun disabled(`value`: Output) {
this.disabled = value
}
/**
* @param value `false` by default. If set to `true`, this resource will ignore any policies return from Vault or specified in the resource. You can use `vault.identity.EntityPolicies` to manage policies for this entity in a decoupled manner.
*/
@JvmName("ltwuxeagvvoumrua")
public suspend fun externalPolicies(`value`: Output) {
this.externalPolicies = value
}
/**
* @param value A Map of additional metadata to associate with the user.
*/
@JvmName("polaxoapgakpjfwf")
public suspend fun metadata(`value`: Output>) {
this.metadata = value
}
/**
* @param value Name of the identity entity to create.
*/
@JvmName("pqcsgevmsoasxewd")
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("oanlyvqnvcjqddjw")
public suspend fun namespace(`value`: Output) {
this.namespace = value
}
/**
* @param value A list of policies to apply to the entity.
*/
@JvmName("vdyieopcwshubgbc")
public suspend fun policies(`value`: Output>) {
this.policies = value
}
@JvmName("jgmvfalqlluycqij")
public suspend fun policies(vararg values: Output) {
this.policies = Output.all(values.asList())
}
/**
* @param values A list of policies to apply to the entity.
*/
@JvmName("bubjixycfqvficdk")
public suspend fun policies(values: List>) {
this.policies = Output.all(values)
}
/**
* @param value True/false Is this entity currently disabled. Defaults to `false`
*/
@JvmName("mtkujckhsygabffb")
public suspend fun disabled(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.disabled = mapped
}
/**
* @param value `false` by default. If set to `true`, this resource will ignore any policies return from Vault or specified in the resource. You can use `vault.identity.EntityPolicies` to manage policies for this entity in a decoupled manner.
*/
@JvmName("mqpsqnbunauiaqnp")
public suspend fun externalPolicies(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.externalPolicies = mapped
}
/**
* @param value A Map of additional metadata to associate with the user.
*/
@JvmName("aqsmepjspcdphvos")
public suspend fun metadata(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.metadata = mapped
}
/**
* @param values A Map of additional metadata to associate with the user.
*/
@JvmName("hhmocitiloufsjnx")
public fun metadata(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.metadata = mapped
}
/**
* @param value Name of the identity entity to create.
*/
@JvmName("qhyjcyvkcjjxiesq")
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("ksmjwemblrluvgcm")
public suspend fun namespace(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.namespace = mapped
}
/**
* @param value A list of policies to apply to the entity.
*/
@JvmName("ngxtvycafiddjiwh")
public suspend fun policies(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.policies = mapped
}
/**
* @param values A list of policies to apply to the entity.
*/
@JvmName("yykebclmsqhocuyh")
public suspend fun policies(vararg values: String) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.policies = mapped
}
internal fun build(): EntityArgs = EntityArgs(
disabled = disabled,
externalPolicies = externalPolicies,
metadata = metadata,
name = name,
namespace = namespace,
policies = policies,
)
}