
com.pulumi.vault.kotlin.MfaPingidArgs.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.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.MfaPingidArgs.builder
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* Provides a resource to manage [PingID MFA](https://www.vaultproject.io/docs/enterprise/mfa/mfa-pingid).
* **Note** this feature is available only with Vault Enterprise.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as vault from "@pulumi/vault";
* const config = new pulumi.Config();
* const settingsFile = config.requireObject("settingsFile");
* const userpass = new vault.AuthBackend("userpass", {
* type: "userpass",
* path: "userpass",
* });
* const myPingid = new vault.MfaPingid("my_pingid", {
* name: "my_pingid",
* mountAccessor: userpass.accessor,
* usernameFormat: "[email protected]",
* settingsFileBase64: settingsFile,
* });
* ```
* ```python
* import pulumi
* import pulumi_vault as vault
* config = pulumi.Config()
* settings_file = config.require_object("settingsFile")
* userpass = vault.AuthBackend("userpass",
* type="userpass",
* path="userpass")
* my_pingid = vault.MfaPingid("my_pingid",
* name="my_pingid",
* mount_accessor=userpass.accessor,
* username_format="[email protected]",
* settings_file_base64=settings_file)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Vault = Pulumi.Vault;
* return await Deployment.RunAsync(() =>
* {
* var config = new Config();
* var settingsFile = config.RequireObject("settingsFile");
* var userpass = new Vault.AuthBackend("userpass", new()
* {
* Type = "userpass",
* Path = "userpass",
* });
* var myPingid = new Vault.MfaPingid("my_pingid", new()
* {
* Name = "my_pingid",
* MountAccessor = userpass.Accessor,
* UsernameFormat = "[email protected]",
* SettingsFileBase64 = settingsFile,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-vault/sdk/v6/go/vault"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* cfg := config.New(ctx, "")
* settingsFile := cfg.RequireObject("settingsFile")
* userpass, err := vault.NewAuthBackend(ctx, "userpass", &vault.AuthBackendArgs{
* Type: pulumi.String("userpass"),
* Path: pulumi.String("userpass"),
* })
* if err != nil {
* return err
* }
* _, err = vault.NewMfaPingid(ctx, "my_pingid", &vault.MfaPingidArgs{
* Name: pulumi.String("my_pingid"),
* MountAccessor: userpass.Accessor,
* UsernameFormat: pulumi.String("[email protected]"),
* SettingsFileBase64: pulumi.Any(settingsFile),
* })
* 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.MfaPingid;
* import com.pulumi.vault.MfaPingidArgs;
* 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) {
* final var config = ctx.config();
* final var settingsFile = config.get("settingsFile");
* var userpass = new AuthBackend("userpass", AuthBackendArgs.builder()
* .type("userpass")
* .path("userpass")
* .build());
* var myPingid = new MfaPingid("myPingid", MfaPingidArgs.builder()
* .name("my_pingid")
* .mountAccessor(userpass.accessor())
* .usernameFormat("[email protected]")
* .settingsFileBase64(settingsFile)
* .build());
* }
* }
* ```
* ```yaml
* configuration:
* settingsFile:
* type: dynamic
* resources:
* userpass:
* type: vault:AuthBackend
* properties:
* type: userpass
* path: userpass
* myPingid:
* type: vault:MfaPingid
* name: my_pingid
* properties:
* name: my_pingid
* mountAccessor: ${userpass.accessor}
* usernameFormat: [email protected]
* settingsFileBase64: ${settingsFile}
* ```
*
* ## Import
* Mounts can be imported using the `path`, e.g.
* ```sh
* $ pulumi import vault:index/mfaPingid:MfaPingid my_pingid my_pingid
* ```
* @property mountAccessor `(string: )` - The mount to tie this method to for use in automatic mappings.
* The mapping will use the Name field of Aliases associated with this mount as the username in the mapping.
* @property name `(string: )` – Name of the MFA method.
* @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 settingsFileBase64 `(string: )` - A base64-encoded third-party settings file retrieved
* from PingID's configuration page.
* @property usernameFormat `(string)` - A format string for mapping Identity names to MFA method names.
* Values to substitute should be placed in `{{}}`. For example, `"{{alias.name}}@example.com"`.
* If blank, the Alias's Name field will be used as-is. Currently-supported mappings:
* - alias.name: The name returned by the mount configured via the `mount_accessor` parameter
* - entity.name: The name configured for the Entity
* - alias.metadata.``: The value of the Alias's metadata parameter
* - entity.metadata.``: The value of the Entity's metadata parameter
*/
public data class MfaPingidArgs(
public val mountAccessor: Output? = null,
public val name: Output? = null,
public val namespace: Output? = null,
public val settingsFileBase64: Output? = null,
public val usernameFormat: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.vault.MfaPingidArgs = com.pulumi.vault.MfaPingidArgs.builder()
.mountAccessor(mountAccessor?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.namespace(namespace?.applyValue({ args0 -> args0 }))
.settingsFileBase64(settingsFileBase64?.applyValue({ args0 -> args0 }))
.usernameFormat(usernameFormat?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [MfaPingidArgs].
*/
@PulumiTagMarker
public class MfaPingidArgsBuilder internal constructor() {
private var mountAccessor: Output? = null
private var name: Output? = null
private var namespace: Output? = null
private var settingsFileBase64: Output? = null
private var usernameFormat: Output? = null
/**
* @param value `(string: )` - The mount to tie this method to for use in automatic mappings.
* The mapping will use the Name field of Aliases associated with this mount as the username in the mapping.
*/
@JvmName("jlennvdeakikxuir")
public suspend fun mountAccessor(`value`: Output) {
this.mountAccessor = value
}
/**
* @param value `(string: )` – Name of the MFA method.
*/
@JvmName("kbmwythxljcykkwi")
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("hjbreyndyhbyrauc")
public suspend fun namespace(`value`: Output) {
this.namespace = value
}
/**
* @param value `(string: )` - A base64-encoded third-party settings file retrieved
* from PingID's configuration page.
*/
@JvmName("sjptrviyksiexcca")
public suspend fun settingsFileBase64(`value`: Output) {
this.settingsFileBase64 = value
}
/**
* @param value `(string)` - A format string for mapping Identity names to MFA method names.
* Values to substitute should be placed in `{{}}`. For example, `"{{alias.name}}@example.com"`.
* If blank, the Alias's Name field will be used as-is. Currently-supported mappings:
* - alias.name: The name returned by the mount configured via the `mount_accessor` parameter
* - entity.name: The name configured for the Entity
* - alias.metadata.``: The value of the Alias's metadata parameter
* - entity.metadata.``: The value of the Entity's metadata parameter
*/
@JvmName("qhpbqlfjbsxiafwg")
public suspend fun usernameFormat(`value`: Output) {
this.usernameFormat = value
}
/**
* @param value `(string: )` - The mount to tie this method to for use in automatic mappings.
* The mapping will use the Name field of Aliases associated with this mount as the username in the mapping.
*/
@JvmName("bwxkglfhbxiwhnqt")
public suspend fun mountAccessor(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.mountAccessor = mapped
}
/**
* @param value `(string: )` – Name of the MFA method.
*/
@JvmName("xsquhrgdctahtfey")
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("fatelsksrdtnefpf")
public suspend fun namespace(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.namespace = mapped
}
/**
* @param value `(string: )` - A base64-encoded third-party settings file retrieved
* from PingID's configuration page.
*/
@JvmName("tfnkygguyrysfowp")
public suspend fun settingsFileBase64(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.settingsFileBase64 = mapped
}
/**
* @param value `(string)` - A format string for mapping Identity names to MFA method names.
* Values to substitute should be placed in `{{}}`. For example, `"{{alias.name}}@example.com"`.
* If blank, the Alias's Name field will be used as-is. Currently-supported mappings:
* - alias.name: The name returned by the mount configured via the `mount_accessor` parameter
* - entity.name: The name configured for the Entity
* - alias.metadata.``: The value of the Alias's metadata parameter
* - entity.metadata.``: The value of the Entity's metadata parameter
*/
@JvmName("pmirrfdcfifrvbsl")
public suspend fun usernameFormat(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.usernameFormat = mapped
}
internal fun build(): MfaPingidArgs = MfaPingidArgs(
mountAccessor = mountAccessor,
name = name,
namespace = namespace,
settingsFileBase64 = settingsFileBase64,
usernameFormat = usernameFormat,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy