
com.pulumi.vault.identity.kotlin.MfaTotpArgs.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.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.MfaTotpArgs.builder
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* Resource for configuring the totp MFA method.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as vault from "@pulumi/vault";
* const example = new vault.identity.MfaTotp("example", {issuer: "issuer1"});
* ```
* ```python
* import pulumi
* import pulumi_vault as vault
* example = vault.identity.MfaTotp("example", issuer="issuer1")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Vault = Pulumi.Vault;
* return await Deployment.RunAsync(() =>
* {
* var example = new Vault.Identity.MfaTotp("example", new()
* {
* Issuer = "issuer1",
* });
* });
* ```
* ```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.NewMfaTotp(ctx, "example", &identity.MfaTotpArgs{
* Issuer: pulumi.String("issuer1"),
* })
* 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.MfaTotp;
* import com.pulumi.vault.identity.MfaTotpArgs;
* 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 example = new MfaTotp("example", MfaTotpArgs.builder()
* .issuer("issuer1")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: vault:identity:MfaTotp
* properties:
* issuer: issuer1
* ```
*
* ## Import
* Resource can be imported using its `uuid` field, e.g.
* ```sh
* $ pulumi import vault:identity/mfaTotp:MfaTotp example 0d89c36a-4ff5-4d70-8749-bb6a5598aeec
* ```
* @property algorithm Specifies the hashing algorithm used to generate the TOTP code. Options include SHA1, SHA256, SHA512.
* @property digits The number of digits in the generated TOTP token. This value can either be 6 or 8
* @property issuer The name of the key's issuing organization.
* @property keySize Specifies the size in bytes of the generated key.
* @property maxValidationAttempts The maximum number of consecutive failed validation attempts allowed.
* @property namespace Target namespace. (requires Enterprise)
* @property period The length of time in seconds used to generate a counter for the TOTP token calculation.
* @property qrSize The pixel size of the generated square QR code.
* @property skew The number of delay periods that are allowed when validating a TOTP token. This value can either be 0 or 1.
*/
public data class MfaTotpArgs(
public val algorithm: Output? = null,
public val digits: Output? = null,
public val issuer: Output? = null,
public val keySize: Output? = null,
public val maxValidationAttempts: Output? = null,
public val namespace: Output? = null,
public val period: Output? = null,
public val qrSize: Output? = null,
public val skew: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.vault.identity.MfaTotpArgs =
com.pulumi.vault.identity.MfaTotpArgs.builder()
.algorithm(algorithm?.applyValue({ args0 -> args0 }))
.digits(digits?.applyValue({ args0 -> args0 }))
.issuer(issuer?.applyValue({ args0 -> args0 }))
.keySize(keySize?.applyValue({ args0 -> args0 }))
.maxValidationAttempts(maxValidationAttempts?.applyValue({ args0 -> args0 }))
.namespace(namespace?.applyValue({ args0 -> args0 }))
.period(period?.applyValue({ args0 -> args0 }))
.qrSize(qrSize?.applyValue({ args0 -> args0 }))
.skew(skew?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [MfaTotpArgs].
*/
@PulumiTagMarker
public class MfaTotpArgsBuilder internal constructor() {
private var algorithm: Output? = null
private var digits: Output? = null
private var issuer: Output? = null
private var keySize: Output? = null
private var maxValidationAttempts: Output? = null
private var namespace: Output? = null
private var period: Output? = null
private var qrSize: Output? = null
private var skew: Output? = null
/**
* @param value Specifies the hashing algorithm used to generate the TOTP code. Options include SHA1, SHA256, SHA512.
*/
@JvmName("wponlbrdacfggjky")
public suspend fun algorithm(`value`: Output) {
this.algorithm = value
}
/**
* @param value The number of digits in the generated TOTP token. This value can either be 6 or 8
*/
@JvmName("luywudkrdgirdwbm")
public suspend fun digits(`value`: Output) {
this.digits = value
}
/**
* @param value The name of the key's issuing organization.
*/
@JvmName("rsodlxpcmesslvqq")
public suspend fun issuer(`value`: Output) {
this.issuer = value
}
/**
* @param value Specifies the size in bytes of the generated key.
*/
@JvmName("fgdlyppduoachnbm")
public suspend fun keySize(`value`: Output) {
this.keySize = value
}
/**
* @param value The maximum number of consecutive failed validation attempts allowed.
*/
@JvmName("iwspdfkbrbpxpbnc")
public suspend fun maxValidationAttempts(`value`: Output) {
this.maxValidationAttempts = value
}
/**
* @param value Target namespace. (requires Enterprise)
*/
@JvmName("dllkbckcdknwqukd")
public suspend fun namespace(`value`: Output) {
this.namespace = value
}
/**
* @param value The length of time in seconds used to generate a counter for the TOTP token calculation.
*/
@JvmName("deyocixdbstjmlni")
public suspend fun period(`value`: Output) {
this.period = value
}
/**
* @param value The pixel size of the generated square QR code.
*/
@JvmName("mqxyytfohdrbabrn")
public suspend fun qrSize(`value`: Output) {
this.qrSize = value
}
/**
* @param value The number of delay periods that are allowed when validating a TOTP token. This value can either be 0 or 1.
*/
@JvmName("luphnlcporijeibf")
public suspend fun skew(`value`: Output) {
this.skew = value
}
/**
* @param value Specifies the hashing algorithm used to generate the TOTP code. Options include SHA1, SHA256, SHA512.
*/
@JvmName("tdlynxfvkfyrwfay")
public suspend fun algorithm(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.algorithm = mapped
}
/**
* @param value The number of digits in the generated TOTP token. This value can either be 6 or 8
*/
@JvmName("vbntdqfifaypscxp")
public suspend fun digits(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.digits = mapped
}
/**
* @param value The name of the key's issuing organization.
*/
@JvmName("slwepfukohspwuyx")
public suspend fun issuer(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.issuer = mapped
}
/**
* @param value Specifies the size in bytes of the generated key.
*/
@JvmName("wukawsooevrcmqbl")
public suspend fun keySize(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.keySize = mapped
}
/**
* @param value The maximum number of consecutive failed validation attempts allowed.
*/
@JvmName("jablmivdlimaabud")
public suspend fun maxValidationAttempts(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.maxValidationAttempts = mapped
}
/**
* @param value Target namespace. (requires Enterprise)
*/
@JvmName("wowkxfjuullavxir")
public suspend fun namespace(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.namespace = mapped
}
/**
* @param value The length of time in seconds used to generate a counter for the TOTP token calculation.
*/
@JvmName("nyxjgicatevslkvi")
public suspend fun period(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.period = mapped
}
/**
* @param value The pixel size of the generated square QR code.
*/
@JvmName("svdiltnbeaqcumpt")
public suspend fun qrSize(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.qrSize = mapped
}
/**
* @param value The number of delay periods that are allowed when validating a TOTP token. This value can either be 0 or 1.
*/
@JvmName("pxjoofwhneircegi")
public suspend fun skew(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.skew = mapped
}
internal fun build(): MfaTotpArgs = MfaTotpArgs(
algorithm = algorithm,
digits = digits,
issuer = issuer,
keySize = keySize,
maxValidationAttempts = maxValidationAttempts,
namespace = namespace,
period = period,
qrSize = qrSize,
skew = skew,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy