@aws-cdk_aws-neptune-alpha.DatabaseClusterBase

class DatabaseClusterBase ๐Ÿ”น

LanguageType name
.NETAmazon.CDK.AWS.Neptune.Alpha.DatabaseClusterBase
Gogithub.com/aws/aws-cdk-go/awscdkneptunealpha/v2#DatabaseClusterBase
Javasoftware.amazon.awscdk.services.neptune.alpha.DatabaseClusterBase
Pythonaws_cdk.aws_neptune_alpha.DatabaseClusterBase
TypeScript (source)@aws-cdk/aws-neptune-alpha ยป DatabaseClusterBase

Implements IConstruct, IDependable, IResource, IDatabaseCluster, IConnectable

Extends Resource

Implemented by DatabaseCluster

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 neptune_alpha from '@aws-cdk/aws-neptune-alpha';
import { aws_ec2 as ec2 } from 'aws-cdk-lib';

declare const securityGroup: ec2.SecurityGroup;
const databaseClusterBase = neptune_alpha.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 ResourceProps

Properties

NameTypeDescription
clusterEndpoint๐Ÿ”นEndpointThe endpoint to use for read/write operations.
clusterIdentifier๐Ÿ”นstringIdentifier of the cluster.
clusterReadEndpoint๐Ÿ”นEndpointEndpoint to use for load-balanced read-only operations.
clusterResourceIdentifier๐Ÿ”นstringResource identifier of the cluster.
connections๐Ÿ”นConnectionsThe connections object to implement IConnectable.
env๐Ÿ”นResourceEnvironmentThe environment this resource belongs to.
node๐Ÿ”นNodeThe tree node.
stack๐Ÿ”นStackThe stack in which this resource is defined.
enableIamAuthentication?๐Ÿ”น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: ResourceEnvironment

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: Node

The tree node.


stack๐Ÿ”น

Type: Stack

The stack in which this resource is defined.


enableIamAuthentication?๐Ÿ”น

Type: boolean (optional)

Methods

NameDescription
applyRemovalPolicy(policy)๐Ÿ”นApply the given removal policy to this resource.
grant(grantee, ...actions)๐Ÿ”นGrant the given identity the specified actions.
grantConnect(grantee)๐Ÿ”นGrant the given identity connection access to the database.
metric(metricName, props?)๐Ÿ”นReturn the given named metric associated with this DatabaseCluster instance.
toString()๐Ÿ”นReturns a string representation of this construct.
static fromDatabaseClusterAttributes(scope, id, attrs)๐Ÿ”นImport an existing DatabaseCluster from properties.

applyRemovalPolicy(policy)๐Ÿ”น

public applyRemovalPolicy(policy: RemovalPolicy): void

Parameters

  • policy RemovalPolicy

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).


grant(grantee, ...actions)๐Ÿ”น

public grant(grantee: IGrantable, ...actions: string[]): Grant

Parameters

  • grantee IGrantable
  • actions string

Returns

  • Grant

Grant the given identity the specified actions.


grantConnect(grantee)๐Ÿ”น

public grantConnect(grantee: IGrantable): Grant

Parameters

  • grantee IGrantable

Returns

  • Grant

Grant the given identity connection access to the database.


metric(metricName, props?)๐Ÿ”น

public metric(metricName: string, props?: MetricOptions): Metric

Parameters

  • metricName string
  • props MetricOptions

Returns

  • Metric

Return the given named metric associated with this DatabaseCluster instance.


toString()๐Ÿ”น

public toString(): string

Returns

  • string

Returns a string representation of this construct.


static fromDatabaseClusterAttributes(scope, id, attrs)๐Ÿ”น

public static fromDatabaseClusterAttributes(scope: Construct, id: string, attrs: DatabaseClusterAttributes): IDatabaseCluster

Parameters

  • scope Construct
  • id string
  • attrs DatabaseClusterAttributes

Returns

  • IDatabaseCluster

Import an existing DatabaseCluster from properties.