forked from aws/aws-cdk
/
cluster-ref.ts
75 lines (63 loc) · 1.54 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
import { IConnectable, ISecurityGroup } from '@aws-cdk/aws-ec2';
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 {
/**
* 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[];
}
/**
* 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[];
/**
* Cluster endpoint address
*/
readonly clusterEndpointAddress: string;
/**
* Reader endpoint address
*/
readonly readerEndpointAddress: string;
/**
* Endpoint addresses of individual instances
*/
readonly instanceEndpointAddresses: string[];
}