com.pulumi.vault.alicloud.kotlin.AuthBackendRoleArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-vault-kotlin Show documentation
Show all versions of pulumi-vault-kotlin Show documentation
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.alicloud.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.alicloud.AuthBackendRoleArgs.builder
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
* Provides a resource to create a role in an [AliCloud auth backend within Vault](https://www.vaultproject.io/docs/auth/alicloud.html).
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as vault from "@pulumi/vault";
* const alicloud = new vault.AuthBackend("alicloud", {
* type: "alicloud",
* path: "alicloud",
* });
* const alicloudAuthBackendRole = new vault.alicloud.AuthBackendRole("alicloud", {
* backend: alicloud.path,
* role: "example",
* arn: "acs:ram:123456:tf:role/foobar",
* });
* ```
* ```python
* import pulumi
* import pulumi_vault as vault
* alicloud = vault.AuthBackend("alicloud",
* type="alicloud",
* path="alicloud")
* alicloud_auth_backend_role = vault.alicloud.AuthBackendRole("alicloud",
* backend=alicloud.path,
* role="example",
* arn="acs:ram:123456:tf:role/foobar")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Vault = Pulumi.Vault;
* return await Deployment.RunAsync(() =>
* {
* var alicloud = new Vault.AuthBackend("alicloud", new()
* {
* Type = "alicloud",
* Path = "alicloud",
* });
* var alicloudAuthBackendRole = new Vault.AliCloud.AuthBackendRole("alicloud", new()
* {
* Backend = alicloud.Path,
* Role = "example",
* Arn = "acs:ram:123456:tf:role/foobar",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-vault/sdk/v6/go/vault"
* "github.com/pulumi/pulumi-vault/sdk/v6/go/vault/alicloud"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* alicloud, err := vault.NewAuthBackend(ctx, "alicloud", &vault.AuthBackendArgs{
* Type: pulumi.String("alicloud"),
* Path: pulumi.String("alicloud"),
* })
* if err != nil {
* return err
* }
* _, err = alicloud.NewAuthBackendRole(ctx, "alicloud", &alicloud.AuthBackendRoleArgs{
* Backend: alicloud.Path,
* Role: pulumi.String("example"),
* Arn: pulumi.String("acs:ram:123456:tf:role/foobar"),
* })
* 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.AuthBackend;
* import com.pulumi.vault.AuthBackendArgs;
* import com.pulumi.vault.alicloud.AuthBackendRole;
* import com.pulumi.vault.alicloud.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 alicloud = new AuthBackend("alicloud", AuthBackendArgs.builder()
* .type("alicloud")
* .path("alicloud")
* .build());
* var alicloudAuthBackendRole = new AuthBackendRole("alicloudAuthBackendRole", AuthBackendRoleArgs.builder()
* .backend(alicloud.path())
* .role("example")
* .arn("acs:ram:123456:tf:role/foobar")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* alicloud:
* type: vault:AuthBackend
* properties:
* type: alicloud
* path: alicloud
* alicloudAuthBackendRole:
* type: vault:alicloud:AuthBackendRole
* name: alicloud
* properties:
* backend: ${alicloud.path}
* role: example
* arn: acs:ram:123456:tf:role/foobar
* ```
*
* ## Import
* Alicloud authentication roles can be imported using the `path`, e.g.
* ```sh
* $ pulumi import vault:alicloud/authBackendRole:AuthBackendRole my_role auth/alicloud/role/my_role
* ```
* @property arn The role's arn.
* @property backend Path to the mounted AliCloud auth backend.
* Defaults to `alicloud`
* For more details on the usage of each argument consult the [Vault AliCloud API documentation](https://www.vaultproject.io/api-docs/auth/alicloud).
* @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.
* *Available only for Vault Enterprise*.
* @property role Name of the role. Must correspond with the name of
* the role reflected in the arn.
* @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 arn: Output? = null,
public val backend: Output? = null,
public val namespace: Output? = null,
public val role: 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.alicloud.AuthBackendRoleArgs =
com.pulumi.vault.alicloud.AuthBackendRoleArgs.builder()
.arn(arn?.applyValue({ args0 -> args0 }))
.backend(backend?.applyValue({ args0 -> args0 }))
.namespace(namespace?.applyValue({ args0 -> args0 }))
.role(role?.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 arn: Output? = null
private var backend: Output? = null
private var namespace: Output? = null
private var role: 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 The role's arn.
*/
@JvmName("bsnppcevpyoqharl")
public suspend fun arn(`value`: Output) {
this.arn = value
}
/**
* @param value Path to the mounted AliCloud auth backend.
* Defaults to `alicloud`
* For more details on the usage of each argument consult the [Vault AliCloud API documentation](https://www.vaultproject.io/api-docs/auth/alicloud).
*/
@JvmName("jsefkvopjdscyrpn")
public suspend fun backend(`value`: Output) {
this.backend = 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.
* *Available only for Vault Enterprise*.
*/
@JvmName("xwkplthwyekbofgp")
public suspend fun namespace(`value`: Output) {
this.namespace = value
}
/**
* @param value Name of the role. Must correspond with the name of
* the role reflected in the arn.
*/
@JvmName("jjarjypvqxovpdgt")
public suspend fun role(`value`: Output) {
this.role = value
}
/**
* @param value Specifies the blocks of IP addresses which are allowed to use the generated token
*/
@JvmName("gqrtymiqibspxina")
public suspend fun tokenBoundCidrs(`value`: Output>) {
this.tokenBoundCidrs = value
}
@JvmName("gktmflludjrjdnws")
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("ysjyboxiklwacrbf")
public suspend fun tokenBoundCidrs(values: List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy