Class DatabaseInstanceFromSnapshot
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.rds.DatabaseInstanceBase
software.amazon.awscdk.services.rds.DatabaseInstanceFromSnapshot
- All Implemented Interfaces:
IResource
,IConnectable
,IDatabaseInstance
,ISecretAttachmentTarget
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)",
date="2024-10-04T00:39:38.686Z")
@Stability(Stable)
public class DatabaseInstanceFromSnapshot
extends DatabaseInstanceBase
implements IDatabaseInstance
A database instance restored from a snapshot.
Example:
Vpc vpc; DatabaseInstance sourceInstance; DatabaseInstanceFromSnapshot.Builder.create(this, "Instance") .snapshotIdentifier("my-snapshot") .engine(DatabaseInstanceEngine.postgres(PostgresInstanceEngineProps.builder().version(PostgresEngineVersion.VER_16_3).build())) // optional, defaults to m5.large .instanceType(InstanceType.of(InstanceClass.BURSTABLE2, InstanceSize.LARGE)) .vpc(vpc) .build(); DatabaseInstanceReadReplica.Builder.create(this, "ReadReplica") .sourceDatabaseInstance(sourceInstance) .instanceType(InstanceType.of(InstanceClass.BURSTABLE2, InstanceSize.LARGE)) .vpc(vpc) .build();
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
A fluent builder forDatabaseInstanceFromSnapshot
.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.rds.IDatabaseInstance
IDatabaseInstance.Jsii$Default, IDatabaseInstance.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default
-
Constructor Summary
ModifierConstructorDescriptionprotected
DatabaseInstanceFromSnapshot
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
DatabaseInstanceFromSnapshot
(software.amazon.jsii.JsiiObjectRef objRef) DatabaseInstanceFromSnapshot
(software.constructs.Construct scope, String id, DatabaseInstanceFromSnapshotProps props) -
Method Summary
Modifier and TypeMethodDescriptionaddRotationMultiUser
(String id, RotationMultiUserOptions options) Adds the multi user rotation to this instance.Adds the single user rotation of the master password to this instance.Adds the single user rotation of the master password to this instance.The log group is created whencloudwatchLogsExports
is set.Access to network connections.The instance endpoint address.The instance endpoint port.protected Boolean
The engine of this database Instance.The instance endpoint.The instance identifier.The AWS Region-unique, immutable identifier for the DB instance.protected InstanceType
protected CfnDBInstanceProps
The AWS Secrets Manager secret attached to the instance.protected CfnDBInstanceProps
getVpc()
The VPC where this database instance is deployed.protected SubnetSelection
grantConnect
(IGrantable grantee) Grant the given identity connection access to the database.grantConnect
(IGrantable grantee, String dbUser) Grant the given identity connection access to the database.protected void
protected void
Methods inherited from class software.amazon.awscdk.services.rds.DatabaseInstanceBase
addProxy, asSecretAttachmentTarget, fromDatabaseInstanceAttributes, getInstanceArn, metric, metric, metricCPUUtilization, metricCPUUtilization, metricDatabaseConnections, metricDatabaseConnections, metricFreeableMemory, metricFreeableMemory, metricFreeStorageSpace, metricFreeStorageSpace, metricReadIOPS, metricReadIOPS, metricWriteIOPS, metricWriteIOPS, onEvent, onEvent
Methods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResource
Methods inherited from class software.constructs.Construct
getNode, isConstruct, toString
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.constructs.IConstruct
getNode
Methods inherited from interface software.amazon.awscdk.services.rds.IDatabaseInstance
addProxy, getInstanceArn, metric, metric, metricCPUUtilization, metricCPUUtilization, metricDatabaseConnections, metricDatabaseConnections, metricFreeableMemory, metricFreeableMemory, metricFreeStorageSpace, metricFreeStorageSpace, metricReadIOPS, metricReadIOPS, metricWriteIOPS, metricWriteIOPS, onEvent, onEvent
Methods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getEnv, getStack
Methods inherited from interface software.amazon.awscdk.services.secretsmanager.ISecretAttachmentTarget
asSecretAttachmentTarget
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
DatabaseInstanceFromSnapshot
protected DatabaseInstanceFromSnapshot(software.amazon.jsii.JsiiObjectRef objRef) -
DatabaseInstanceFromSnapshot
protected DatabaseInstanceFromSnapshot(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
DatabaseInstanceFromSnapshot
@Stability(Stable) public DatabaseInstanceFromSnapshot(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull DatabaseInstanceFromSnapshotProps props) - Parameters:
scope
- This parameter is required.id
- This parameter is required.props
- This parameter is required.
-
-
Method Details
-
addRotationMultiUser
@Stability(Stable) @NotNull public SecretRotation addRotationMultiUser(@NotNull String id, @NotNull RotationMultiUserOptions options) Adds the multi user rotation to this instance.- Parameters:
id
- This parameter is required.options
- This parameter is required.
-
addRotationSingleUser
@Stability(Stable) @NotNull public SecretRotation addRotationSingleUser(@Nullable RotationSingleUserOptions options) Adds the single user rotation of the master password to this instance.- Parameters:
options
- the options for the rotation, if you want to override the defaults.
-
addRotationSingleUser
Adds the single user rotation of the master password to this instance. -
grantConnect
@Stability(Stable) @NotNull public Grant grantConnect(@NotNull IGrantable grantee, @Nullable String dbUser) Grant the given identity connection access to the database.- Specified by:
grantConnect
in interfaceIDatabaseInstance
- Overrides:
grantConnect
in classDatabaseInstanceBase
- Parameters:
grantee
- the Principal to grant the permissions to. This parameter is required.dbUser
- the name of the database user to allow connecting as to the db instance, or the default database user, obtained from the Secret, if not specified.
-
grantConnect
Grant the given identity connection access to the database.- Specified by:
grantConnect
in interfaceIDatabaseInstance
- Overrides:
grantConnect
in classDatabaseInstanceBase
- Parameters:
grantee
- the Principal to grant the permissions to. This parameter is required.
-
setLogRetention
@Stability(Stable) protected void setLogRetention() -
getCloudwatchLogGroups
The log group is created whencloudwatchLogsExports
is set.Each export value will create a separate log group.
-
getConnections
Access to network connections.- Specified by:
getConnections
in interfaceIConnectable
- Specified by:
getConnections
in classDatabaseInstanceBase
-
getDbInstanceEndpointAddress
The instance endpoint address.- Specified by:
getDbInstanceEndpointAddress
in interfaceIDatabaseInstance
- Specified by:
getDbInstanceEndpointAddress
in classDatabaseInstanceBase
-
getDbInstanceEndpointPort
The instance endpoint port.- Specified by:
getDbInstanceEndpointPort
in interfaceIDatabaseInstance
- Specified by:
getDbInstanceEndpointPort
in classDatabaseInstanceBase
-
getInstanceEndpoint
The instance endpoint.- Specified by:
getInstanceEndpoint
in interfaceIDatabaseInstance
- Specified by:
getInstanceEndpoint
in classDatabaseInstanceBase
-
getInstanceIdentifier
The instance identifier.- Specified by:
getInstanceIdentifier
in interfaceIDatabaseInstance
- Specified by:
getInstanceIdentifier
in classDatabaseInstanceBase
-
getInstanceType
-
getNewCfnProps
-
getSourceCfnProps
-
getVpc
The VPC where this database instance is deployed. -
getEngine
The engine of this database Instance.May be not known for imported Instances if it wasn't provided explicitly, or for read replicas.
- Specified by:
getEngine
in interfaceIDatabaseInstance
- Specified by:
getEngine
in classDatabaseInstanceBase
-
getInstanceResourceId
The AWS Region-unique, immutable identifier for the DB instance.This identifier is found in AWS CloudTrail log entries whenever the AWS KMS key for the DB instance is accessed.
- Specified by:
getInstanceResourceId
in interfaceIDatabaseInstance
- Specified by:
getInstanceResourceId
in classDatabaseInstanceBase
- See Also:
-
getSecret
The AWS Secrets Manager secret attached to the instance. -
getVpcPlacement
-
getEnableIamAuthentication
- Specified by:
getEnableIamAuthentication
in classDatabaseInstanceBase
-
setEnableIamAuthentication
- Specified by:
setEnableIamAuthentication
in classDatabaseInstanceBase
-