@Generated(value="jsii-pacmak/1.24.0 (build b722f66)", date="2021-03-11T13:46:51.507Z") @Stability(value=Stable) public abstract class Credentials extends software.amazon.jsii.JsiiObject
| Modifier | Constructor and Description |
|---|---|
protected |
Credentials() |
protected |
Credentials(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
Credentials(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
static Credentials |
fromGeneratedSecret(String username)
Creates Credentials with a password generated and stored in Secrets Manager.
|
static Credentials |
fromGeneratedSecret(String username,
CredentialsBaseOptions options)
Creates Credentials with a password generated and stored in Secrets Manager.
|
static Credentials |
fromPassword(String username,
SecretValue password)
Creates Credentials from a password.
|
static Credentials |
fromSecret(ISecret secret)
Creates Credentials from an existing Secrets Manager ``Secret`` (or ``DatabaseSecret``).
|
static Credentials |
fromSecret(ISecret secret,
String username)
Creates Credentials from an existing Secrets Manager ``Secret`` (or ``DatabaseSecret``).
|
static Credentials |
fromUsername(String username)
Deprecated.
use `fromGeneratedSecret()` or `fromPassword()` for new Clusters and Instances.
Note that switching from `fromUsername()` to `fromGeneratedSecret()` or `fromPassword()` for already deployed
Clusters or Instances will result in their replacement!
|
static Credentials |
fromUsername(String username,
CredentialsFromUsernameOptions options)
Deprecated.
use `fromGeneratedSecret()` or `fromPassword()` for new Clusters and Instances.
Note that switching from `fromUsername()` to `fromGeneratedSecret()` or `fromPassword()` for already deployed
Clusters or Instances will result in their replacement!
|
abstract IKey |
getEncryptionKey()
KMS encryption key to encrypt the generated secret.
|
abstract String |
getExcludeCharacters()
The characters to exclude from the generated password.
|
abstract SecretValue |
getPassword()
Password.
|
abstract ISecret |
getSecret()
Secret used to instantiate this Login.
|
abstract String |
getUsername()
Username.
|
abstract Boolean |
getUsernameAsString()
Whether the username should be referenced as a string and not as a dynamic reference to the username in the secret.
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected Credentials(software.amazon.jsii.JsiiObjectRef objRef)
protected Credentials(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable) protected Credentials()
@Stability(value=Stable) @NotNull public static Credentials fromGeneratedSecret(@NotNull String username, @Nullable CredentialsBaseOptions options)
username - This parameter is required.options - @Stability(value=Stable) @NotNull public static Credentials fromGeneratedSecret(@NotNull String username)
username - This parameter is required.@Stability(value=Stable) @NotNull public static Credentials fromPassword(@NotNull String username, @NotNull SecretValue password)
Do not put passwords in your CDK code directly.
username - This parameter is required.password - This parameter is required.@Stability(value=Stable) @NotNull public static Credentials fromSecret(@NotNull ISecret secret, @Nullable String username)
The Secret must be a JSON string with a username and password field:
{
...
"username": <required: username>,
"password": <required: password>,
}
secret - The secret where the credentials are stored. This parameter is required.username - The username defined in the secret.@Stability(value=Stable) @NotNull public static Credentials fromSecret(@NotNull ISecret secret)
The Secret must be a JSON string with a username and password field:
{
...
"username": <required: username>,
"password": <required: password>,
}
secret - The secret where the credentials are stored. This parameter is required.@Stability(value=Deprecated) @Deprecated @NotNull public static Credentials fromUsername(@NotNull String username, @Nullable CredentialsFromUsernameOptions options)
If no password is provided, one will be generated and stored in Secrets Manager.
username - This parameter is required.options - @Stability(value=Deprecated) @Deprecated @NotNull public static Credentials fromUsername(@NotNull String username)
If no password is provided, one will be generated and stored in Secrets Manager.
username - This parameter is required.@Stability(value=Stable) @NotNull public abstract String getUsername()
@Stability(value=Stable) @Nullable public abstract IKey getEncryptionKey()
Default: - default master key
@Stability(value=Stable) @Nullable public abstract String getExcludeCharacters()
Only used if {@link password} has not been set.
Default: - the DatabaseSecret default exclude character set (" %+~`#$&*()|[]{}:;<>?!'/
@Stability(value=Stable) @Nullable public abstract SecretValue getPassword()
Do not put passwords in your CDK code directly.
Default: - a Secrets Manager generated password
@Stability(value=Stable) @Nullable public abstract ISecret getSecret()
Default: - none
@Stability(value=Stable) @Nullable public abstract Boolean getUsernameAsString()
Default: false
Copyright © 2021. All rights reserved.