148 lines
3.9 KiB
TypeScript
148 lines
3.9 KiB
TypeScript
import type { Construct } from 'constructs';
|
|
import type * as ec2 from '../../aws-ec2';
|
|
import type { IResource } from '../../core';
|
|
import { Resource } from '../../core';
|
|
import type { aws_rds } from '../../interfaces';
|
|
/**
|
|
* A DB proxy endpoint.
|
|
*/
|
|
export interface IDatabaseProxyEndpoint extends IResource, aws_rds.IDBProxyEndpointRef {
|
|
/**
|
|
* DB Proxy Endpoint Name
|
|
*
|
|
* @attribute
|
|
*/
|
|
readonly dbProxyEndpointName: string;
|
|
/**
|
|
* DB Proxy Endpoint ARN
|
|
*
|
|
* @attribute
|
|
*/
|
|
readonly dbProxyEndpointArn: string;
|
|
/**
|
|
* Endpoint
|
|
*
|
|
* @attribute
|
|
*/
|
|
readonly endpoint: string;
|
|
}
|
|
/**
|
|
* Options for a new DatabaseProxyEndpoint
|
|
*/
|
|
export interface DatabaseProxyEndpointOptions {
|
|
/**
|
|
* The name of the DB proxy endpoint
|
|
*
|
|
* @default - a CDK generated name
|
|
*/
|
|
readonly dbProxyEndpointName?: string;
|
|
/**
|
|
* The VPC of the DB proxy endpoint.
|
|
*/
|
|
readonly vpc: ec2.IVpc;
|
|
/**
|
|
* The VPC security groups to associate with the new proxy endpoint.
|
|
*
|
|
* @default - Default security group for the VPC
|
|
*/
|
|
readonly securityGroups?: ec2.ISecurityGroup[];
|
|
/**
|
|
* The subnets of DB proxy endpoint.
|
|
*
|
|
* @default - the VPC default strategy if not specified.
|
|
*/
|
|
readonly vpcSubnets?: ec2.SubnetSelection;
|
|
/**
|
|
* A value that indicates whether the DB proxy endpoint can be used for read/write or read-only operations.
|
|
*
|
|
* @default - ProxyEndpointTargetRole.READ_WRITE
|
|
*/
|
|
readonly targetRole?: ProxyEndpointTargetRole;
|
|
}
|
|
/**
|
|
* Construction properties for a DatabaseProxyEndpoint
|
|
*/
|
|
export interface DatabaseProxyEndpointProps extends DatabaseProxyEndpointOptions {
|
|
/**
|
|
* The DB proxy associated with the DB proxy endpoint.
|
|
*/
|
|
readonly dbProxy: aws_rds.IDBProxyRef;
|
|
}
|
|
/**
|
|
* Properties that describe an existing DB Proxy Endpoint
|
|
*/
|
|
export interface DatabaseProxyEndpointAttributes {
|
|
/**
|
|
* DB Proxy Endpoint Name
|
|
*/
|
|
readonly dbProxyEndpointName: string;
|
|
/**
|
|
* DB Proxy Endpoint ARN
|
|
*/
|
|
readonly dbProxyEndpointArn: string;
|
|
/**
|
|
* The endpoint that you can use to connect to the DB proxy
|
|
*/
|
|
readonly endpoint: string;
|
|
}
|
|
/**
|
|
* A value that indicates whether the DB proxy endpoint can be used for read/write or read-only operations.
|
|
*/
|
|
export declare enum ProxyEndpointTargetRole {
|
|
/**
|
|
* The proxy endpoint can be used for both read and write operations.
|
|
*/
|
|
READ_WRITE = "READ_WRITE",
|
|
/**
|
|
* The proxy endpoint can be used only for read operations.
|
|
*/
|
|
READ_ONLY = "READ_ONLY"
|
|
}
|
|
/**
|
|
* Represents an RDS Database Proxy Endpoint.
|
|
*/
|
|
declare abstract class DatabaseProxyEndpointBase extends Resource implements IDatabaseProxyEndpoint {
|
|
abstract readonly dbProxyEndpointName: string;
|
|
abstract readonly dbProxyEndpointArn: string;
|
|
abstract readonly endpoint: string;
|
|
/**
|
|
* A reference to this database proxy endpoint
|
|
*/
|
|
get dbProxyEndpointRef(): aws_rds.DBProxyEndpointReference;
|
|
}
|
|
/**
|
|
* RDS Database Proxy Endpoint
|
|
*
|
|
* @resource AWS::RDS::DBProxyEndpoint
|
|
*/
|
|
export declare class DatabaseProxyEndpoint extends DatabaseProxyEndpointBase {
|
|
/**
|
|
* Uniquely identifies this class.
|
|
*/
|
|
static readonly PROPERTY_INJECTION_ID: string;
|
|
/**
|
|
* Import an existing database proxy endpoint.
|
|
*/
|
|
static fromDatabaseProxyEndpointAttributes(scope: Construct, id: string, attrs: DatabaseProxyEndpointAttributes): IDatabaseProxyEndpoint;
|
|
/**
|
|
* DB Proxy Endpoint Name
|
|
*
|
|
* @attribute
|
|
*/
|
|
readonly dbProxyEndpointName: string;
|
|
/**
|
|
* DB Proxy Endpoint ARN
|
|
*
|
|
* @attribute
|
|
*/
|
|
readonly dbProxyEndpointArn: string;
|
|
/**
|
|
* The endpoint that you can use to connect to the DB proxy
|
|
*
|
|
* @attribute
|
|
*/
|
|
readonly endpoint: string;
|
|
constructor(scope: Construct, id: string, props: DatabaseProxyEndpointProps);
|
|
}
|
|
export {};
|