All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.awsnative.secretsmanager.kotlin.inputs.SecretGenerateSecretStringArgs.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.

There is a newer version: 0.122.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.secretsmanager.kotlin.inputs

import com.pulumi.awsnative.secretsmanager.inputs.SecretGenerateSecretStringArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * Generates a random password. We recommend that you specify the maximum length and include every character type that the system you are generating a password for can support.
 *   *Required permissions:* ``secretsmanager:GetRandomPassword``. For more information, see [IAM policy actions for Secrets Manager](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssecretsmanager.html#awssecretsmanager-actions-as-permissions) and [Authentication and access control in Secrets Manager](https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html).
 * @property excludeCharacters A string of the characters that you don't want in the password.
 * @property excludeLowercase Specifies whether to exclude lowercase letters from the password. If you don't include this switch, the password can contain lowercase letters.
 * @property excludeNumbers Specifies whether to exclude numbers from the password. If you don't include this switch, the password can contain numbers.
 * @property excludePunctuation Specifies whether to exclude the following punctuation characters from the password: ``! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _ ` { | } ~``. If you don't include this switch, the password can contain punctuation.
 * @property excludeUppercase Specifies whether to exclude uppercase letters from the password. If you don't include this switch, the password can contain uppercase letters.
 * @property generateStringKey The JSON key name for the key/value pair, where the value is the generated password. This pair is added to the JSON structure specified by the ``SecretStringTemplate`` parameter. If you specify this parameter, then you must also specify ``SecretStringTemplate``.
 * @property includeSpace Specifies whether to include the space character. If you include this switch, the password can contain space characters.
 * @property passwordLength The length of the password. If you don't include this parameter, the default length is 32 characters.
 * @property requireEachIncludedType Specifies whether to include at least one upper and lowercase letter, one number, and one punctuation. If you don't include this switch, the password contains at least one of every character type.
 * @property secretStringTemplate A template that the generated string must match. When you make a change to this property, a new secret version is created.
 */
public data class SecretGenerateSecretStringArgs(
    public val excludeCharacters: Output? = null,
    public val excludeLowercase: Output? = null,
    public val excludeNumbers: Output? = null,
    public val excludePunctuation: Output? = null,
    public val excludeUppercase: Output? = null,
    public val generateStringKey: Output? = null,
    public val includeSpace: Output? = null,
    public val passwordLength: Output? = null,
    public val requireEachIncludedType: Output? = null,
    public val secretStringTemplate: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.secretsmanager.inputs.SecretGenerateSecretStringArgs =
        com.pulumi.awsnative.secretsmanager.inputs.SecretGenerateSecretStringArgs.builder()
            .excludeCharacters(excludeCharacters?.applyValue({ args0 -> args0 }))
            .excludeLowercase(excludeLowercase?.applyValue({ args0 -> args0 }))
            .excludeNumbers(excludeNumbers?.applyValue({ args0 -> args0 }))
            .excludePunctuation(excludePunctuation?.applyValue({ args0 -> args0 }))
            .excludeUppercase(excludeUppercase?.applyValue({ args0 -> args0 }))
            .generateStringKey(generateStringKey?.applyValue({ args0 -> args0 }))
            .includeSpace(includeSpace?.applyValue({ args0 -> args0 }))
            .passwordLength(passwordLength?.applyValue({ args0 -> args0 }))
            .requireEachIncludedType(requireEachIncludedType?.applyValue({ args0 -> args0 }))
            .secretStringTemplate(secretStringTemplate?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [SecretGenerateSecretStringArgs].
 */
@PulumiTagMarker
public class SecretGenerateSecretStringArgsBuilder internal constructor() {
    private var excludeCharacters: Output? = null

    private var excludeLowercase: Output? = null

    private var excludeNumbers: Output? = null

    private var excludePunctuation: Output? = null

    private var excludeUppercase: Output? = null

    private var generateStringKey: Output? = null

    private var includeSpace: Output? = null

    private var passwordLength: Output? = null

    private var requireEachIncludedType: Output? = null

    private var secretStringTemplate: Output? = null

    /**
     * @param value A string of the characters that you don't want in the password.
     */
    @JvmName("aqtrkrkcogieqpqi")
    public suspend fun excludeCharacters(`value`: Output) {
        this.excludeCharacters = value
    }

    /**
     * @param value Specifies whether to exclude lowercase letters from the password. If you don't include this switch, the password can contain lowercase letters.
     */
    @JvmName("ukdbukbbpafdgmlw")
    public suspend fun excludeLowercase(`value`: Output) {
        this.excludeLowercase = value
    }

    /**
     * @param value Specifies whether to exclude numbers from the password. If you don't include this switch, the password can contain numbers.
     */
    @JvmName("wfucobnfjjwgoxqy")
    public suspend fun excludeNumbers(`value`: Output) {
        this.excludeNumbers = value
    }

    /**
     * @param value Specifies whether to exclude the following punctuation characters from the password: ``! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _ ` { | } ~``. If you don't include this switch, the password can contain punctuation.
     */
    @JvmName("eqcxskdihtbgofvn")
    public suspend fun excludePunctuation(`value`: Output) {
        this.excludePunctuation = value
    }

    /**
     * @param value Specifies whether to exclude uppercase letters from the password. If you don't include this switch, the password can contain uppercase letters.
     */
    @JvmName("dsqlfmgkyxtkcjyj")
    public suspend fun excludeUppercase(`value`: Output) {
        this.excludeUppercase = value
    }

    /**
     * @param value The JSON key name for the key/value pair, where the value is the generated password. This pair is added to the JSON structure specified by the ``SecretStringTemplate`` parameter. If you specify this parameter, then you must also specify ``SecretStringTemplate``.
     */
    @JvmName("djxdjwiqeatcrson")
    public suspend fun generateStringKey(`value`: Output) {
        this.generateStringKey = value
    }

    /**
     * @param value Specifies whether to include the space character. If you include this switch, the password can contain space characters.
     */
    @JvmName("kstaahomexpptckd")
    public suspend fun includeSpace(`value`: Output) {
        this.includeSpace = value
    }

    /**
     * @param value The length of the password. If you don't include this parameter, the default length is 32 characters.
     */
    @JvmName("kgflixmifutlfupi")
    public suspend fun passwordLength(`value`: Output) {
        this.passwordLength = value
    }

    /**
     * @param value Specifies whether to include at least one upper and lowercase letter, one number, and one punctuation. If you don't include this switch, the password contains at least one of every character type.
     */
    @JvmName("wuavucajceuitiln")
    public suspend fun requireEachIncludedType(`value`: Output) {
        this.requireEachIncludedType = value
    }

    /**
     * @param value A template that the generated string must match. When you make a change to this property, a new secret version is created.
     */
    @JvmName("rvxkygjtfsinxnxg")
    public suspend fun secretStringTemplate(`value`: Output) {
        this.secretStringTemplate = value
    }

    /**
     * @param value A string of the characters that you don't want in the password.
     */
    @JvmName("patubejxsnyifilo")
    public suspend fun excludeCharacters(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.excludeCharacters = mapped
    }

    /**
     * @param value Specifies whether to exclude lowercase letters from the password. If you don't include this switch, the password can contain lowercase letters.
     */
    @JvmName("siombcowpqsgcwne")
    public suspend fun excludeLowercase(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.excludeLowercase = mapped
    }

    /**
     * @param value Specifies whether to exclude numbers from the password. If you don't include this switch, the password can contain numbers.
     */
    @JvmName("unlvkwwydwcxcdrg")
    public suspend fun excludeNumbers(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.excludeNumbers = mapped
    }

    /**
     * @param value Specifies whether to exclude the following punctuation characters from the password: ``! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _ ` { | } ~``. If you don't include this switch, the password can contain punctuation.
     */
    @JvmName("gqgmaivtuvuybfav")
    public suspend fun excludePunctuation(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.excludePunctuation = mapped
    }

    /**
     * @param value Specifies whether to exclude uppercase letters from the password. If you don't include this switch, the password can contain uppercase letters.
     */
    @JvmName("djepvdaxenthiljp")
    public suspend fun excludeUppercase(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.excludeUppercase = mapped
    }

    /**
     * @param value The JSON key name for the key/value pair, where the value is the generated password. This pair is added to the JSON structure specified by the ``SecretStringTemplate`` parameter. If you specify this parameter, then you must also specify ``SecretStringTemplate``.
     */
    @JvmName("xqnrcrroldtefvry")
    public suspend fun generateStringKey(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.generateStringKey = mapped
    }

    /**
     * @param value Specifies whether to include the space character. If you include this switch, the password can contain space characters.
     */
    @JvmName("fdqonfiivovpiwuk")
    public suspend fun includeSpace(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.includeSpace = mapped
    }

    /**
     * @param value The length of the password. If you don't include this parameter, the default length is 32 characters.
     */
    @JvmName("ndutaayiadpnmknf")
    public suspend fun passwordLength(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.passwordLength = mapped
    }

    /**
     * @param value Specifies whether to include at least one upper and lowercase letter, one number, and one punctuation. If you don't include this switch, the password contains at least one of every character type.
     */
    @JvmName("hoappvoanknmouwg")
    public suspend fun requireEachIncludedType(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.requireEachIncludedType = mapped
    }

    /**
     * @param value A template that the generated string must match. When you make a change to this property, a new secret version is created.
     */
    @JvmName("kwvsfcdypobqybqm")
    public suspend fun secretStringTemplate(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.secretStringTemplate = mapped
    }

    internal fun build(): SecretGenerateSecretStringArgs = SecretGenerateSecretStringArgs(
        excludeCharacters = excludeCharacters,
        excludeLowercase = excludeLowercase,
        excludeNumbers = excludeNumbers,
        excludePunctuation = excludePunctuation,
        excludeUppercase = excludeUppercase,
        generateStringKey = generateStringKey,
        includeSpace = includeSpace,
        passwordLength = passwordLength,
        requireEachIncludedType = requireEachIncludedType,
        secretStringTemplate = secretStringTemplate,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy