getRandomPassword

Generate a random password.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const test = aws.secretsmanager.getRandomPassword({
passwordLength: 50,
excludeNumbers: true,
});
import pulumi
import pulumi_aws as aws
test = aws.secretsmanager.get_random_password(password_length=50,
exclude_numbers=True)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var test = Aws.SecretsManager.GetRandomPassword.Invoke(new()
{
PasswordLength = 50,
ExcludeNumbers = true,
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/secretsmanager"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := secretsmanager.GetRandomPassword(ctx, &secretsmanager.GetRandomPasswordArgs{
PasswordLength: pulumi.IntRef(50),
ExcludeNumbers: pulumi.BoolRef(true),
}, nil)
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.secretsmanager.SecretsmanagerFunctions;
import com.pulumi.aws.secretsmanager.inputs.GetRandomPasswordArgs;
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 test = SecretsmanagerFunctions.getRandomPassword(GetRandomPasswordArgs.builder()
.passwordLength(50)
.excludeNumbers(true)
.build());
}
}
variables:
test:
fn::invoke:
function: aws:secretsmanager:getRandomPassword
arguments:
passwordLength: 50
excludeNumbers: true

Return

A collection of values returned by getRandomPassword.

Parameters

argument

A collection of arguments for invoking getRandomPassword.


suspend fun getRandomPassword(excludeCharacters: String? = null, excludeLowercase: Boolean? = null, excludeNumbers: Boolean? = null, excludePunctuation: Boolean? = null, excludeUppercase: Boolean? = null, includeSpace: Boolean? = null, passwordLength: Int? = null, requireEachIncludedType: Boolean? = null): GetRandomPasswordResult

Return

A collection of values returned by getRandomPassword.

Parameters

excludeCharacters

String of the characters that you don't want in the password.

excludeLowercase

Specifies whether to exclude lowercase letters from the password.

excludeNumbers

Specifies whether to exclude numbers from the password.

excludePunctuation

Specifies whether to exclude the following punctuation characters from the password: `! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _ ` { | } ~ .`

excludeUppercase

Specifies whether to exclude uppercase letters from the password.

includeSpace

Specifies whether to include the space character.

passwordLength

Length of the password.

requireEachIncludedType

Specifies whether to include at least one upper and lowercase letter, one number, and one punctuation.

See also


Return

A collection of values returned by getRandomPassword.

Parameters

argument

Builder for com.pulumi.aws.secretsmanager.kotlin.inputs.GetRandomPasswordPlainArgs.

See also