@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)",
date="2023-03-22T19:35:44.627Z")
public interface SecretStringGenerator
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();
Modifier and Type | Interface and Description |
---|---|
static class |
SecretStringGenerator.Builder
A builder for
SecretStringGenerator |
static class |
SecretStringGenerator.Jsii$Proxy
An implementation for
SecretStringGenerator |
Modifier and Type | Method and Description |
---|---|
static SecretStringGenerator.Builder |
builder() |
default java.lang.String |
getExcludeCharacters()
A string that includes characters that shouldn't be included in the generated password.
|
default java.lang.Boolean |
getExcludeLowercase()
Specifies that the generated password shouldn't include lowercase letters.
|
default java.lang.Boolean |
getExcludeNumbers()
Specifies that the generated password shouldn't include digits.
|
default java.lang.Boolean |
getExcludePunctuation()
Specifies that the generated password shouldn't include punctuation characters.
|
default java.lang.Boolean |
getExcludeUppercase()
Specifies that the generated password shouldn't include uppercase letters.
|
default java.lang.String |
getGenerateStringKey()
The JSON key name that's used to add the generated password to the JSON structure specified by the ``secretStringTemplate`` parameter.
|
default java.lang.Boolean |
getIncludeSpace()
Specifies that the generated password can include the space character.
|
default java.lang.Number |
getPasswordLength()
The desired length of the generated password.
|
default java.lang.Boolean |
getRequireEachIncludedType()
Specifies whether the generated password must include at least one of every allowed character type.
|
default java.lang.String |
getSecretStringTemplate()
A properly structured JSON string that the generated password can be added to.
|
default java.lang.String getExcludeCharacters()
The string can be a minimum
of 0
and a maximum of 4096
characters long.
Default: no exclusions
default java.lang.Boolean getExcludeLowercase()
Default: false
default java.lang.Boolean getExcludeNumbers()
Default: false
default java.lang.Boolean getExcludePunctuation()
Default: false
default java.lang.Boolean getExcludeUppercase()
Default: false
default java.lang.String getGenerateStringKey()
If you specify generateStringKey
then secretStringTemplate
must be also be specified.
default java.lang.Boolean getIncludeSpace()
Default: false
default java.lang.Number getPasswordLength()
Default: 32
default java.lang.Boolean getRequireEachIncludedType()
Default: true
default java.lang.String getSecretStringTemplate()
The generateStringKey
is
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 specify secretStringTemplate
then generateStringKey
must be also be specified.
static SecretStringGenerator.Builder builder()
SecretStringGenerator.Builder
of SecretStringGenerator