Interface SecretStringGenerator
- All Superinterfaces:
- software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
- SecretStringGenerator.Jsii$Proxy
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
           date="2023-06-19T16:30:41.314Z")
@Stability(Stable)
public interface SecretStringGenerator
extends software.amazon.jsii.JsiiSerializable
Configuration to generate secrets such as passwords automatically.
 
Example:
 // Default secret
 Secret secret = new Secret(this, "Secret");
 // Using the default secret
 // Using the default secret
 User.Builder.create(this, "User")
         .password(secret.getSecretValue())
         .build();
 // Templated secret
 Secret templatedSecret = Secret.Builder.create(this, "TemplatedSecret")
         .generateSecretString(SecretStringGenerator.builder()
                 .secretStringTemplate(JSON.stringify(Map.of("username", "user")))
                 .generateStringKey("password")
                 .build())
         .build();
 // Using the templated secret
 // Using the templated secret
 User.Builder.create(this, "OtherUser")
         .userName(templatedSecret.secretValueFromJson("username").toString())
         .password(templatedSecret.secretValueFromJson("password"))
         .build();
 - 
Nested Class SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forSecretStringGeneratorstatic final classAn implementation forSecretStringGenerator
- 
Method SummaryModifier and TypeMethodDescriptionbuilder()default StringA string that includes characters that shouldn't be included in the generated password.default BooleanSpecifies that the generated password shouldn't include lowercase letters.default BooleanSpecifies that the generated password shouldn't include digits.default BooleanSpecifies that the generated password shouldn't include punctuation characters.default BooleanSpecifies that the generated password shouldn't include uppercase letters.default StringThe JSON key name that's used to add the generated password to the JSON structure specified by thesecretStringTemplateparameter.default BooleanSpecifies that the generated password can include the space character.default NumberThe desired length of the generated password.default BooleanSpecifies whether the generated password must include at least one of every allowed character type.default StringA properly structured JSON string that the generated password can be added to.Methods inherited from interface software.amazon.jsii.JsiiSerializable$jsii$toJson
- 
Method Details- 
getExcludeCharactersA string that includes characters that shouldn't be included in the generated password.The string can be a minimum of 0and a maximum of4096characters long.Default: no exclusions 
- 
getExcludeLowercaseSpecifies that the generated password shouldn't include lowercase letters.Default: false 
- 
getExcludeNumbersSpecifies that the generated password shouldn't include digits.Default: false 
- 
getExcludePunctuationSpecifies that the generated password shouldn't include punctuation characters.Default: false 
- 
getExcludeUppercaseSpecifies that the generated password shouldn't include uppercase letters.Default: false 
- 
getGenerateStringKeyThe JSON key name that's used to add the generated password to the JSON structure specified by thesecretStringTemplateparameter.If you specify generateStringKeythensecretStringTemplatemust be also be specified.
- 
getIncludeSpaceSpecifies that the generated password can include the space character.Default: false 
- 
getPasswordLengthThe desired length of the generated password.Default: 32 
- 
getRequireEachIncludedTypeSpecifies whether the generated password must include at least one of every allowed character type.Default: true 
- 
getSecretStringTemplateA properly structured JSON string that the generated password can be added to.The generateStringKeyis combined with the generated random string and inserted into the JSON structure that's specified by this parameter. The merged JSON string is returned as the completed SecretString of the secret. If you specifysecretStringTemplatethengenerateStringKeymust be also be specified.
- 
builder- Returns:
- a SecretStringGenerator.BuilderofSecretStringGenerator
 
 
-