@Generated(value="jsii-pacmak/1.57.0 (build f614666)", date="2022-04-22T22:36:24.516Z") @Stability(value=Stable) public abstract class SnapshotCredentials extends software.amazon.jsii.JsiiObject
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.kms.*;
import software.amazon.awscdk.services.rds.*;
Key key;
SnapshotCredentials snapshotCredentials = SnapshotCredentials.fromGeneratedPassword("username", SnapshotCredentialsFromGeneratedPasswordOptions.builder()
.encryptionKey(key)
.excludeCharacters("excludeCharacters")
.replicaRegions(List.of(ReplicaRegion.builder()
.region("region")
// the properties below are optional
.encryptionKey(key)
.build()))
.build());
| Modifier | Constructor and Description |
|---|---|
protected |
SnapshotCredentials() |
protected |
SnapshotCredentials(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
SnapshotCredentials(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
static SnapshotCredentials |
fromGeneratedPassword(String username)
Generate a new password for the snapshot, using the existing username and an optional encryption key.
|
static SnapshotCredentials |
fromGeneratedPassword(String username,
SnapshotCredentialsFromGeneratedPasswordOptions options)
Generate a new password for the snapshot, using the existing username and an optional encryption key.
|
static SnapshotCredentials |
fromGeneratedSecret(String username)
Generate a new password for the snapshot, using the existing username and an optional encryption key.
|
static SnapshotCredentials |
fromGeneratedSecret(String username,
SnapshotCredentialsFromGeneratedPasswordOptions options)
Generate a new password for the snapshot, using the existing username and an optional encryption key.
|
static SnapshotCredentials |
fromPassword(SecretValue password)
Update the snapshot login with an existing password.
|
static SnapshotCredentials |
fromSecret(ISecret secret)
Update the snapshot login with an existing password from a Secret.
|
abstract IKey |
getEncryptionKey()
KMS encryption key to encrypt the generated secret.
|
abstract String |
getExcludeCharacters()
The characters to exclude from the generated password.
|
abstract Boolean |
getGeneratePassword()
Whether a new password should be generated.
|
abstract SecretValue |
getPassword()
The master user password.
|
abstract Boolean |
getReplaceOnPasswordCriteriaChanges()
Whether to replace the generated secret when the criteria for the password change.
|
abstract List<ReplicaRegion> |
getReplicaRegions()
A list of regions where to replicate the generated secret.
|
abstract ISecret |
getSecret()
Secret used to instantiate this Login.
|
abstract String |
getUsername()
The master user name.
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected SnapshotCredentials(software.amazon.jsii.JsiiObjectRef objRef)
protected SnapshotCredentials(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable) protected SnapshotCredentials()
@Stability(value=Stable) @NotNull public static SnapshotCredentials fromGeneratedPassword(@NotNull String username, @Nullable SnapshotCredentialsFromGeneratedPasswordOptions options)
Note - The username must match the existing master username of the snapshot.
NOTE: use fromGeneratedSecret() for new Clusters and Instances.
username - This parameter is required.options - @Stability(value=Stable) @NotNull public static SnapshotCredentials fromGeneratedPassword(@NotNull String username)
Note - The username must match the existing master username of the snapshot.
NOTE: use fromGeneratedSecret() for new Clusters and Instances.
username - This parameter is required.@Stability(value=Stable) @NotNull public static SnapshotCredentials fromGeneratedSecret(@NotNull String username, @Nullable SnapshotCredentialsFromGeneratedPasswordOptions options)
The new credentials are stored in Secrets Manager.
Note - The username must match the existing master username of the snapshot.
username - This parameter is required.options - @Stability(value=Stable) @NotNull public static SnapshotCredentials fromGeneratedSecret(@NotNull String username)
The new credentials are stored in Secrets Manager.
Note - The username must match the existing master username of the snapshot.
username - This parameter is required.@Stability(value=Stable) @NotNull public static SnapshotCredentials fromPassword(@NotNull SecretValue password)
password - This parameter is required.@Stability(value=Stable) @NotNull public static SnapshotCredentials fromSecret(@NotNull ISecret secret)
The Secret must be a JSON string with a password field:
{
...
"password": <required: password>,
}
secret - This parameter is required.@Stability(value=Stable) @NotNull public abstract Boolean getGeneratePassword()
@Stability(value=Stable) @Nullable public abstract IKey getEncryptionKey()
Default: - default master key
@Stability(value=Stable) @Nullable public abstract String getExcludeCharacters()
Only used if {@link generatePassword} if true.
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: - the existing password from the snapshot
@Stability(value=Stable) @Nullable public abstract Boolean getReplaceOnPasswordCriteriaChanges()
Default: false
@Stability(value=Stable) @Nullable public abstract List<ReplicaRegion> getReplicaRegions()
Default: - Secret is not replicated
@Stability(value=Stable) @Nullable public abstract ISecret getSecret()
Default: - none
@Stability(value=Stable) @Nullable public abstract String getUsername()
Must be the current master user name of the snapshot. It is not possible to change the master user name of a RDS instance.
Default: - the existing username from the snapshot
Copyright © 2022. All rights reserved.