UNPKG

aws-cdk-lib

Version:

Version 2 of the AWS Cloud Development Kit library

67 lines (66 loc) 1.92 kB
import type { Construct } from 'constructs'; import * as ec2 from '../../aws-ec2'; import type { IResource, RemovalPolicy } from '../../core'; import { Resource } from '../../core'; import type { aws_rds } from '../../interfaces'; /** * Interface for a subnet group. */ export interface ISubnetGroup extends IResource, aws_rds.IDBSubnetGroupRef { /** * The name of the subnet group. * @attribute */ readonly subnetGroupName: string; } /** * Properties for creating a SubnetGroup. */ export interface SubnetGroupProps { /** * Description of the subnet group. */ readonly description: string; /** * The VPC to place the subnet group in. */ readonly vpc: ec2.IVpc; /** * The name of the subnet group. * * @default - a name is generated */ readonly subnetGroupName?: string; /** * Which subnets within the VPC to associate with this group. * * @default - private subnets */ readonly vpcSubnets?: ec2.SubnetSelection; /** * The removal policy to apply when the subnet group are removed * from the stack or replaced during an update. * * @default RemovalPolicy.DESTROY */ readonly removalPolicy?: RemovalPolicy; } /** * Class for creating a RDS DB subnet group * * @resource AWS::RDS::DBSubnetGroup */ export declare class SubnetGroup extends Resource implements ISubnetGroup { /** Uniquely identifies this class. */ static readonly PROPERTY_INJECTION_ID: string; /** * Imports an existing subnet group by name. */ static fromSubnetGroupName(scope: Construct, id: string, subnetGroupName: string): ISubnetGroup; readonly subnetGroupName: string; /** * A reference to this subnet group */ get dbSubnetGroupRef(): aws_rds.DBSubnetGroupReference; constructor(scope: Construct, id: string, props: SubnetGroupProps); }