aws-cdk-lib
Version:
Version 2 of the AWS Cloud Development Kit library
143 lines (142 loc) • 3.81 kB
TypeScript
import { Construct } from 'constructs';
import { IDatabaseProxy } from './proxy';
import * as ec2 from '../../aws-ec2';
import { IResource, Resource } from '../../core';
/**
* A DB proxy endpoint.
*/
export interface IDatabaseProxyEndpoint extends IResource {
/**
* 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: IDatabaseProxy;
}
/**
* 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;
}
/**
* 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 {};