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

com.pulumi.awsnative.secretsmanager.kotlin.outputs.SecretGenerateSecretString.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: 1.24.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.secretsmanager.kotlin.outputs

import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress

/**
 * 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 SecretGenerateSecretString(
    public val excludeCharacters: String? = null,
    public val excludeLowercase: Boolean? = null,
    public val excludeNumbers: Boolean? = null,
    public val excludePunctuation: Boolean? = null,
    public val excludeUppercase: Boolean? = null,
    public val generateStringKey: String? = null,
    public val includeSpace: Boolean? = null,
    public val passwordLength: Int? = null,
    public val requireEachIncludedType: Boolean? = null,
    public val secretStringTemplate: String? = null,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.awsnative.secretsmanager.outputs.SecretGenerateSecretString): SecretGenerateSecretString = SecretGenerateSecretString(
            excludeCharacters = javaType.excludeCharacters().map({ args0 -> args0 }).orElse(null),
            excludeLowercase = javaType.excludeLowercase().map({ args0 -> args0 }).orElse(null),
            excludeNumbers = javaType.excludeNumbers().map({ args0 -> args0 }).orElse(null),
            excludePunctuation = javaType.excludePunctuation().map({ args0 -> args0 }).orElse(null),
            excludeUppercase = javaType.excludeUppercase().map({ args0 -> args0 }).orElse(null),
            generateStringKey = javaType.generateStringKey().map({ args0 -> args0 }).orElse(null),
            includeSpace = javaType.includeSpace().map({ args0 -> args0 }).orElse(null),
            passwordLength = javaType.passwordLength().map({ args0 -> args0 }).orElse(null),
            requireEachIncludedType = javaType.requireEachIncludedType().map({ args0 -> args0 }).orElse(null),
            secretStringTemplate = javaType.secretStringTemplate().map({ args0 -> args0 }).orElse(null),
        )
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy