Table of Contents

Interface CfnSecret.IGenerateSecretStringProperty

Namespace
Amazon.CDK.AWS.SecretsManager
Assembly
Amazon.CDK.AWS.SecretsManager.dll

Generates a random password.

public interface CfnSecret.IGenerateSecretStringProperty

Examples

// The code below shows an example of how to instantiate this type.
             // The values are placeholders you should change.
             using Amazon.CDK.AWS.SecretsManager;

             var generateSecretStringProperty = new GenerateSecretStringProperty {
                 ExcludeCharacters = "excludeCharacters",
                 ExcludeLowercase = false,
                 ExcludeNumbers = false,
                 ExcludePunctuation = false,
                 ExcludeUppercase = false,
                 GenerateStringKey = "generateStringKey",
                 IncludeSpace = false,
                 PasswordLength = 123,
                 RequireEachIncludedType = false,
                 SecretStringTemplate = "secretStringTemplate"
             };

Remarks

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 and Authentication and access control in Secrets Manager .

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-secretsmanager-secret-generatesecretstring.html

ExampleMetadata: fixture=_generated

Properties

ExcludeCharacters

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

string? ExcludeCharacters { get; }

Property Value

string

Remarks

ExcludeLowercase

Specifies whether to exclude lowercase letters from the password.

object? ExcludeLowercase { get; }

Property Value

object

Remarks

ExcludeNumbers

Specifies whether to exclude numbers from the password.

object? ExcludeNumbers { get; }

Property Value

object

Remarks

ExcludePunctuation

Specifies whether to exclude the following punctuation characters from the password: `!

object? ExcludePunctuation { get; }

Property Value

object

Remarks

" # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _ { | } ~ . If you don't include this switch, the password can contain punctuation.

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-secretsmanager-secret-generatesecretstring.html#cfn-secretsmanager-secret-generatesecretstring-excludepunctuation

ExcludeUppercase

Specifies whether to exclude uppercase letters from the password.

object? ExcludeUppercase { get; }

Property Value

object

Remarks

GenerateStringKey

The JSON key name for the key/value pair, where the value is the generated password.

string? GenerateStringKey { get; }

Property Value

string

Remarks

This pair is added to the JSON structure specified by the SecretStringTemplate parameter. If you specify this parameter, then you must also specify SecretStringTemplate .

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-secretsmanager-secret-generatesecretstring.html#cfn-secretsmanager-secret-generatesecretstring-generatestringkey

IncludeSpace

Specifies whether to include the space character.

object? IncludeSpace { get; }

Property Value

object

Remarks

PasswordLength

The length of the password.

double? PasswordLength { get; }

Property Value

double?

Remarks

RequireEachIncludedType

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

object? RequireEachIncludedType { get; }

Property Value

object

Remarks

SecretStringTemplate

A template that the generated string must match.

string? SecretStringTemplate { get; }

Property Value

string

Remarks