Class DatabaseInstance
A database instance.
Inherited Members
Namespace: Amazon.CDK.AWS.DocDB
Assembly: Amazon.CDK.AWS.DocDB.dll
Syntax (csharp)
public class DatabaseInstance : Resource, IDatabaseInstance, IResource, IConstruct, IDependable
Syntax (vb)
Public Class DatabaseInstance
Inherits Resource
Implements IDatabaseInstance, IResource, IConstruct, IDependable
Remarks
Resource: AWS::DocDB::DBInstance
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.DocDB;
using Amazon.CDK.AWS.EC2;
using Amazon.CDK;
DatabaseCluster databaseCluster;
InstanceType instanceType;
var databaseInstance = new DatabaseInstance(this, "MyDatabaseInstance", new DatabaseInstanceProps {
Cluster = databaseCluster,
InstanceType = instanceType,
// the properties below are optional
AutoMinorVersionUpgrade = false,
AvailabilityZone = "availabilityZone",
DbInstanceName = "dbInstanceName",
PreferredMaintenanceWindow = "preferredMaintenanceWindow",
RemovalPolicy = RemovalPolicy.DESTROY
});
Synopsis
Constructors
DatabaseInstance(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
DatabaseInstance(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
DatabaseInstance(Construct, String, IDatabaseInstanceProps) |
Properties
Cluster | The instance's database cluster. |
DbInstanceEndpointAddress | The instance endpoint address. |
DbInstanceEndpointPort | The instance endpoint port. |
InstanceArn | The instance arn. |
InstanceEndpoint | The instance endpoint. |
InstanceIdentifier | The instance identifier. |
Methods
FromDatabaseInstanceAttributes(Construct, String, IDatabaseInstanceAttributes) | Import an existing database instance. |
Constructors
DatabaseInstance(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected DatabaseInstance(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
DatabaseInstance(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected DatabaseInstance(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
DatabaseInstance(Construct, String, IDatabaseInstanceProps)
public DatabaseInstance(Construct scope, string id, IDatabaseInstanceProps props)
Parameters
- scope Constructs.Construct
- id System.String
- props IDatabaseInstanceProps
Properties
Cluster
The instance's database cluster.
public virtual IDatabaseCluster Cluster { get; }
Property Value
DbInstanceEndpointAddress
The instance endpoint address.
public virtual string DbInstanceEndpointAddress { get; }
Property Value
System.String
Remarks
Inheritdoc: true
DbInstanceEndpointPort
The instance endpoint port.
public virtual string DbInstanceEndpointPort { get; }
Property Value
System.String
Remarks
Inheritdoc: true
InstanceArn
The instance arn.
public virtual string InstanceArn { get; }
Property Value
System.String
InstanceEndpoint
The instance endpoint.
public virtual Endpoint InstanceEndpoint { get; }
Property Value
Remarks
Inheritdoc: true
InstanceIdentifier
The instance identifier.
public virtual string InstanceIdentifier { get; }
Property Value
System.String
Remarks
Inheritdoc: true
Methods
FromDatabaseInstanceAttributes(Construct, String, IDatabaseInstanceAttributes)
Import an existing database instance.
public static IDatabaseInstance FromDatabaseInstanceAttributes(Construct scope, string id, IDatabaseInstanceAttributes attrs)
Parameters
- scope Constructs.Construct
- id System.String
- attrs IDatabaseInstanceAttributes
Returns