
com.pulumi.vault.aws.kotlin.AuthBackendStsRoleArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.vault.aws.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.aws.AuthBackendStsRoleArgs.builder
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as vault from "@pulumi/vault";
* const aws = new vault.AuthBackend("aws", {type: "aws"});
* const role = new vault.aws.AuthBackendStsRole("role", {
* backend: aws.path,
* accountId: "1234567890",
* stsRole: "arn:aws:iam::1234567890:role/my-role",
* });
* ```
* ```python
* import pulumi
* import pulumi_vault as vault
* aws = vault.AuthBackend("aws", type="aws")
* role = vault.aws.AuthBackendStsRole("role",
* backend=aws.path,
* account_id="1234567890",
* sts_role="arn:aws:iam::1234567890:role/my-role")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Vault = Pulumi.Vault;
* return await Deployment.RunAsync(() =>
* {
* var aws = new Vault.AuthBackend("aws", new()
* {
* Type = "aws",
* });
* var role = new Vault.Aws.AuthBackendStsRole("role", new()
* {
* Backend = aws.Path,
* AccountId = "1234567890",
* StsRole = "arn:aws:iam::1234567890:role/my-role",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-vault/sdk/v6/go/vault"
* "github.com/pulumi/pulumi-vault/sdk/v6/go/vault/aws"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* aws, err := vault.NewAuthBackend(ctx, "aws", &vault.AuthBackendArgs{
* Type: pulumi.String("aws"),
* })
* if err != nil {
* return err
* }
* _, err = aws.NewAuthBackendStsRole(ctx, "role", &aws.AuthBackendStsRoleArgs{
* Backend: aws.Path,
* AccountId: pulumi.String("1234567890"),
* StsRole: pulumi.String("arn:aws:iam::1234567890:role/my-role"),
* })
* 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.aws.AuthBackendStsRole;
* import com.pulumi.vault.aws.AuthBackendStsRoleArgs;
* 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 aws = new AuthBackend("aws", AuthBackendArgs.builder()
* .type("aws")
* .build());
* var role = new AuthBackendStsRole("role", AuthBackendStsRoleArgs.builder()
* .backend(aws.path())
* .accountId("1234567890")
* .stsRole("arn:aws:iam::1234567890:role/my-role")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* aws:
* type: vault:AuthBackend
* properties:
* type: aws
* role:
* type: vault:aws:AuthBackendStsRole
* properties:
* backend: ${aws.path}
* accountId: '1234567890'
* stsRole: arn:aws:iam::1234567890:role/my-role
* ```
*
* ## Import
* AWS auth backend STS roles can be imported using `auth/`, the `backend` path, `/config/sts/`, and the `account_id` e.g.
* ```sh
* $ pulumi import vault:aws/authBackendStsRole:AuthBackendStsRole example auth/aws/config/sts/1234567890
* ```
* @property accountId The AWS account ID to configure the STS role for.
* @property backend The path the AWS auth backend being configured was
* mounted at. Defaults to `aws`.
* @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 stsRole The STS role to assume when verifying requests made
* by EC2 instances in the account specified by `account_id`.
*/
public data class AuthBackendStsRoleArgs(
public val accountId: Output? = null,
public val backend: Output? = null,
public val namespace: Output? = null,
public val stsRole: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.vault.aws.AuthBackendStsRoleArgs =
com.pulumi.vault.aws.AuthBackendStsRoleArgs.builder()
.accountId(accountId?.applyValue({ args0 -> args0 }))
.backend(backend?.applyValue({ args0 -> args0 }))
.namespace(namespace?.applyValue({ args0 -> args0 }))
.stsRole(stsRole?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [AuthBackendStsRoleArgs].
*/
@PulumiTagMarker
public class AuthBackendStsRoleArgsBuilder internal constructor() {
private var accountId: Output? = null
private var backend: Output? = null
private var namespace: Output? = null
private var stsRole: Output? = null
/**
* @param value The AWS account ID to configure the STS role for.
*/
@JvmName("aljchsbwocohcibd")
public suspend fun accountId(`value`: Output) {
this.accountId = value
}
/**
* @param value The path the AWS auth backend being configured was
* mounted at. Defaults to `aws`.
*/
@JvmName("rsyulyjuwjyohmit")
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](https://www.terraform.io/docs/providers/vault/index.html#namespace).
* *Available only for Vault Enterprise*.
*/
@JvmName("wxgasahvmscojybh")
public suspend fun namespace(`value`: Output) {
this.namespace = value
}
/**
* @param value The STS role to assume when verifying requests made
* by EC2 instances in the account specified by `account_id`.
*/
@JvmName("yawhmoytjtusddmx")
public suspend fun stsRole(`value`: Output) {
this.stsRole = value
}
/**
* @param value The AWS account ID to configure the STS role for.
*/
@JvmName("tjqqwdlbsdqnbknk")
public suspend fun accountId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.accountId = mapped
}
/**
* @param value The path the AWS auth backend being configured was
* mounted at. Defaults to `aws`.
*/
@JvmName("vfbyvtibcwxbgbio")
public suspend fun backend(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.backend = 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("sqqhngpiolrgvcoa")
public suspend fun namespace(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.namespace = mapped
}
/**
* @param value The STS role to assume when verifying requests made
* by EC2 instances in the account specified by `account_id`.
*/
@JvmName("hkyhergigfwyyksh")
public suspend fun stsRole(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.stsRole = mapped
}
internal fun build(): AuthBackendStsRoleArgs = AuthBackendStsRoleArgs(
accountId = accountId,
backend = backend,
namespace = namespace,
stsRole = stsRole,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy