Class DatabaseInstanceFromSnapshot
A database instance restored from a snapshot.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.RDS
Assembly: Amazon.CDK.AWS.RDS.dll
Syntax (csharp)
public class DatabaseInstanceFromSnapshot : DatabaseInstanceBase, IDatabaseInstance, IResource, IConstruct, IDependable, IConnectable, ISecretAttachmentTarget
Syntax (vb)
Public Class DatabaseInstanceFromSnapshot
Inherits DatabaseInstanceBase
Implements IDatabaseInstance, IResource, IConstruct, IDependable, IConnectable, ISecretAttachmentTarget
Remarks
Resource: AWS::RDS::DBInstance
ExampleMetadata: infused
Examples
Vpc vpc;
DatabaseInstance sourceInstance;
new DatabaseInstanceFromSnapshot(this, "Instance", new DatabaseInstanceFromSnapshotProps {
SnapshotIdentifier = "my-snapshot",
Engine = DatabaseInstanceEngine.Postgres(new PostgresInstanceEngineProps { Version = PostgresEngineVersion.VER_12_3 }),
// optional, defaults to m5.large
InstanceType = InstanceType.Of(InstanceClass.BURSTABLE2, InstanceSize.LARGE),
Vpc = vpc
});
new DatabaseInstanceReadReplica(this, "ReadReplica", new DatabaseInstanceReadReplicaProps {
SourceDatabaseInstance = sourceInstance,
InstanceType = InstanceType.Of(InstanceClass.BURSTABLE2, InstanceSize.LARGE),
Vpc = vpc
});
Synopsis
Constructors
DatabaseInstanceFromSnapshot(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
DatabaseInstanceFromSnapshot(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
DatabaseInstanceFromSnapshot(Construct, String, IDatabaseInstanceFromSnapshotProps) |
Properties
Connections | Access to network connections. |
DbInstanceEndpointAddress | The instance endpoint address. |
DbInstanceEndpointPort | The instance endpoint port. |
EnableIamAuthentication | |
Engine | The engine of this database Instance. |
InstanceEndpoint | The instance endpoint. |
InstanceIdentifier | The instance identifier. |
InstanceType | |
NewCfnProps | |
Secret | The AWS Secrets Manager secret attached to the instance. |
SourceCfnProps | |
Vpc | The VPC where this database instance is deployed. |
VpcPlacement |
Methods
AddRotationMultiUser(String, IRotationMultiUserOptions) | Adds the multi user rotation to this instance. |
AddRotationSingleUser(IRotationSingleUserOptions) | Adds the single user rotation of the master password to this instance. |
SetLogRetention() |
Constructors
DatabaseInstanceFromSnapshot(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected DatabaseInstanceFromSnapshot(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
DatabaseInstanceFromSnapshot(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected DatabaseInstanceFromSnapshot(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
DatabaseInstanceFromSnapshot(Construct, String, IDatabaseInstanceFromSnapshotProps)
public DatabaseInstanceFromSnapshot(Construct scope, string id, IDatabaseInstanceFromSnapshotProps props)
Parameters
- scope Constructs.Construct
- id System.String
- props IDatabaseInstanceFromSnapshotProps
Properties
Connections
Access to network connections.
public override Connections_ Connections { get; }
Property Value
Overrides
DbInstanceEndpointAddress
The instance endpoint address.
public override string DbInstanceEndpointAddress { get; }
Property Value
System.String
Overrides
DbInstanceEndpointPort
The instance endpoint port.
public override string DbInstanceEndpointPort { get; }
Property Value
System.String
Overrides
EnableIamAuthentication
protected override Nullable<bool> EnableIamAuthentication { get; set; }
Property Value
System.Nullable<System.Boolean>
Overrides
Engine
The engine of this database Instance.
public override IInstanceEngine Engine { get; }
Property Value
Overrides
Remarks
May be not known for imported Instances if it wasn't provided explicitly, or for read replicas.
InstanceEndpoint
The instance endpoint.
public override Endpoint InstanceEndpoint { get; }
Property Value
Overrides
InstanceIdentifier
The instance identifier.
public override string InstanceIdentifier { get; }
Property Value
System.String
Overrides
InstanceType
NewCfnProps
Secret
The AWS Secrets Manager secret attached to the instance.
public virtual ISecret Secret { get; }
Property Value
SourceCfnProps
Vpc
The VPC where this database instance is deployed.
public virtual IVpc Vpc { get; }
Property Value
VpcPlacement
Methods
AddRotationMultiUser(String, IRotationMultiUserOptions)
Adds the multi user rotation to this instance.
public virtual SecretRotation AddRotationMultiUser(string id, IRotationMultiUserOptions options)
Parameters
- id System.String
- options IRotationMultiUserOptions
Returns
AddRotationSingleUser(IRotationSingleUserOptions)
Adds the single user rotation of the master password to this instance.
public virtual SecretRotation AddRotationSingleUser(IRotationSingleUserOptions options = null)
Parameters
- options IRotationSingleUserOptions
the options for the rotation, if you want to override the defaults.
Returns
SetLogRetention()
protected virtual void SetLogRetention()