forked from aws/aws-cdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcluster-ref.ts
82 lines (69 loc) · 1.84 KB
/
cluster-ref.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
import * as ec2 from '@aws-cdk/aws-ec2';
import * as secretsmanager 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, ec2.IConnectable, secretsmanager.ISecretAttachmentTarget {
/**
* Identifier of the cluster
*/
readonly clusterIdentifier: string;
/**
* Identifiers of the replicas
*/
readonly instanceIdentifiers: string[];
/**
* The endpoint to use for read/write operations
* @attribute EndpointAddress,EndpointPort
*/
readonly clusterEndpoint: Endpoint;
/**
* Endpoint to use for load-balanced read-only operations.
* @attribute ReadEndpointAddress
*/
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: ec2.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[];
}