-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(docdb): high level constrcuts for db clusters and instances (#6511)
- CDK users who want to want to use Amazon DocumentDB previously had to use the low-level auto-generated constructs (CFN Resources) - Adds higher-level constructs for - `AWS::DocDB::DBCluster` - `AWS::DocDB::DBInstance` - `AWS::DocDB::DBClusterParameterGroup` fixes #6511
- Loading branch information
Showing
19 changed files
with
3,728 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
import { IConnectable, ISecurityGroup } from '@aws-cdk/aws-ec2'; | ||
import { ISecretAttachmentTarget } from '@aws-cdk/aws-secretsmanager'; | ||
import { IResource } from '@aws-cdk/core'; | ||
import { Endpoint } from './endpoint'; | ||
|
||
/** | ||
* Create a clustered database with a given number of instances. | ||
*/ | ||
export interface IDatabaseCluster extends IResource, IConnectable, ISecretAttachmentTarget { | ||
/** | ||
* Identifier of the cluster | ||
*/ | ||
readonly clusterIdentifier: string; | ||
|
||
/** | ||
* Identifiers of the replicas | ||
*/ | ||
readonly instanceIdentifiers: string[]; | ||
|
||
/** | ||
* The endpoint to use for read/write operations | ||
* @attribute Endpoint,Port | ||
*/ | ||
readonly clusterEndpoint: Endpoint; | ||
|
||
/** | ||
* Endpoint to use for load-balanced read-only operations. | ||
* @attribute ReadEndpoint | ||
*/ | ||
readonly clusterReadEndpoint: Endpoint; | ||
|
||
/** | ||
* Endpoints which address each individual replica. | ||
*/ | ||
readonly instanceEndpoints: Endpoint[]; | ||
|
||
/** | ||
* The security group for this database cluster | ||
*/ | ||
readonly securityGroupId: string; | ||
} | ||
|
||
/** | ||
* Properties that describe an existing cluster instance | ||
*/ | ||
export interface DatabaseClusterAttributes { | ||
/** | ||
* The database port | ||
*/ | ||
readonly port: number; | ||
|
||
/** | ||
* The security group of the database cluster | ||
*/ | ||
readonly securityGroup: ISecurityGroup; | ||
|
||
/** | ||
* Identifier for the cluster | ||
*/ | ||
readonly clusterIdentifier: string; | ||
|
||
/** | ||
* Identifier for the instances | ||
*/ | ||
readonly instanceIdentifiers: string[]; | ||
// Actual underlying type: DBInstanceId[], but we have to type it more loosely for Java's benefit. | ||
|
||
/** | ||
* Cluster endpoint address | ||
*/ | ||
readonly clusterEndpointAddress: string; | ||
|
||
/** | ||
* Reader endpoint address | ||
*/ | ||
readonly readerEndpointAddress: string; | ||
|
||
/** | ||
* Endpoint addresses of individual instances | ||
*/ | ||
readonly instanceEndpointAddresses: string[]; | ||
} |
Oops, something went wrong.