class DatabaseClusterBase
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Neptune.DatabaseClusterBase |
Java | software.amazon.awscdk.services.neptune.DatabaseClusterBase |
Python | aws_cdk.aws_neptune.DatabaseClusterBase |
TypeScript (source) | @aws-cdk/aws-neptune » DatabaseClusterBase |
Implements
IConstruct
, IConstruct
, IDependable
, IResource
, IDatabase
, IConnectable
Extends
Resource
Implemented by
Database
A new or imported database cluster.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as ec2 from '@aws-cdk/aws-ec2';
import * as neptune from '@aws-cdk/aws-neptune';
declare const securityGroup: ec2.SecurityGroup;
const databaseClusterBase = neptune.DatabaseClusterBase.fromDatabaseClusterAttributes(this, 'MyDatabaseClusterBase', {
clusterEndpointAddress: 'clusterEndpointAddress',
clusterIdentifier: 'clusterIdentifier',
clusterResourceIdentifier: 'clusterResourceIdentifier',
port: 123,
readerEndpointAddress: 'readerEndpointAddress',
securityGroup: securityGroup,
});
Initializer
new DatabaseClusterBase(scope: Construct, id: string, props?: ResourceProps)
Parameters
- scope
Construct
- id
string
- props
Resource
Props
Properties
Name | Type | Description |
---|---|---|
cluster | Endpoint | The endpoint to use for read/write operations. |
cluster | string | Identifier of the cluster. |
cluster | Endpoint | Endpoint to use for load-balanced read-only operations. |
cluster | string | Resource identifier of the cluster. |
connections | Connections | The connections object to implement IConnectable. |
env | Resource | The environment this resource belongs to. |
node | Construct | The construct tree node associated with this construct. |
stack | Stack | The stack in which this resource is defined. |
enable | boolean |
clusterEndpoint
Type:
Endpoint
The endpoint to use for read/write operations.
clusterIdentifier
Type:
string
Identifier of the cluster.
clusterReadEndpoint
Type:
Endpoint
Endpoint to use for load-balanced read-only operations.
clusterResourceIdentifier
Type:
string
Resource identifier of the cluster.
connections
Type:
Connections
The connections object to implement IConnectable.
env
Type:
Resource
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
node
Type:
Construct
The construct tree node associated with this construct.
stack
Type:
Stack
The stack in which this resource is defined.
enableIamAuthentication?
Type:
boolean
(optional)
Methods
Name | Description |
---|---|
apply | Apply the given removal policy to this resource. |
grant | Grant the given identity connection access to the database. |
to | Returns a string representation of this construct. |
static from | Import an existing DatabaseCluster from properties. |
RemovalPolicy(policy)
applypublic applyRemovalPolicy(policy: RemovalPolicy): void
Parameters
- policy
Removal
Policy
Apply the given removal policy to this resource.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY
), or left in your AWS
account for data recovery and cleanup later (RemovalPolicy.RETAIN
).
Connect(grantee)
grantpublic grantConnect(grantee: IGrantable): Grant
Parameters
- grantee
IGrantable
Returns
Grant the given identity connection access to the database.
String()
topublic toString(): string
Returns
string
Returns a string representation of this construct.
DatabaseClusterAttributes(scope, id, attrs)
static frompublic static fromDatabaseClusterAttributes(scope: Construct, id: string, attrs: DatabaseClusterAttributes): IDatabaseCluster
Parameters
- scope
Construct
- id
string
- attrs
Database
Cluster Attributes
Returns
Import an existing DatabaseCluster from properties.