@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:41.470Z") @Stability(value=Stable) public class DatabaseSecret extends Secret
Example:
DatabaseInstance instance;
DatabaseSecret myUserSecret = DatabaseSecret.Builder.create(this, "MyUserSecret")
.username("myuser")
.secretName("my-user-secret") // optional, defaults to a CloudFormation-generated name
.masterSecret(instance.getSecret())
.excludeCharacters("{}[]()'\"/\\")
.build();
ISecret myUserSecretAttached = myUserSecret.attach(instance); // Adds DB connections information in the secret
instance.addRotationMultiUser("MyUser", RotationMultiUserOptions.builder() // Add rotation using the multi user scheme
.secret(myUserSecretAttached).build());
| Modifier and Type | Class and Description |
|---|---|
static class |
DatabaseSecret.Builder
A fluent builder for
DatabaseSecret. |
software.amazon.jsii.JsiiObject.InitializationModeISecret.Jsii$Default, ISecret.Jsii$Proxy| Modifier | Constructor and Description |
|---|---|
|
DatabaseSecret(software.constructs.Construct scope,
String id,
DatabaseSecretProps props) |
protected |
DatabaseSecret(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
DatabaseSecret(software.amazon.jsii.JsiiObjectRef objRef) |
addReplicaRegion, addReplicaRegion, addRotationSchedule, addToResourcePolicy, attach, denyAccountRootDelete, fromSecretAttributes, fromSecretCompleteArn, fromSecretNameV2, fromSecretPartialArn, getArnForPolicies, getAutoCreatePolicy, getEncryptionKey, getExcludeCharacters, getSecretArn, getSecretFullArn, getSecretName, getSecretValue, grantRead, grantRead, grantWrite, isSecret, secretValueFromJsonapplyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourcejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitapplyRemovalPolicy, getEnv, getStackprotected DatabaseSecret(software.amazon.jsii.JsiiObjectRef objRef)
protected DatabaseSecret(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public DatabaseSecret(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
DatabaseSecretProps props)
scope - This parameter is required.id - This parameter is required.props - This parameter is required.Copyright © 2022. All rights reserved.