UNPKG

aws-cdk-lib

Version:

Version 2 of the AWS Cloud Development Kit library

112 lines (111 loc) 3.06 kB
import { Construct } from 'constructs'; import { IInstanceEngine } from './instance-engine'; import * as ec2 from '../../aws-ec2'; import { IResource, Resource } from '../../core'; /** * An option group */ export interface IOptionGroup extends IResource { /** * The name of the option group. * * @attribute */ readonly optionGroupName: string; /** * Adds a configuration to this OptionGroup. * This method is a no-op for an imported OptionGroup. * * @returns true if the OptionConfiguration was successfully added. */ addConfiguration(configuration: OptionConfiguration): boolean; } /** * Configuration properties for an option. */ export interface OptionConfiguration { /** * The name of the option. */ readonly name: string; /** * The settings for the option. * * @default - no settings */ readonly settings?: { [name: string]: string; }; /** * The version for the option. * * @default - no version */ readonly version?: string; /** * The port number that this option uses. If `port` is specified then `vpc` * must also be specified. * * @default - no port */ readonly port?: number; /** * The VPC where a security group should be created for this option. If `vpc` * is specified then `port` must also be specified. * * @default - no VPC */ readonly vpc?: ec2.IVpc; /** * Optional list of security groups to use for this option, if `vpc` is specified. * If no groups are provided, a default one will be created. * * @default - a default group will be created if `port` or `vpc` are specified. */ readonly securityGroups?: ec2.ISecurityGroup[]; } /** * Construction properties for an OptionGroup. */ export interface OptionGroupProps { /** * The database engine that this option group is associated with. */ readonly engine: IInstanceEngine; /** * A description of the option group. * * @default a CDK generated description */ readonly description?: string; /** * The configurations for this option group. */ readonly configurations: OptionConfiguration[]; } /** * An option group */ export declare class OptionGroup extends Resource implements IOptionGroup { /** * Import an existing option group. */ static fromOptionGroupName(scope: Construct, id: string, optionGroupName: string): IOptionGroup; /** * The name of the option group. */ readonly optionGroupName: string; /** * The connections object for the options. */ readonly optionConnections: { [key: string]: ec2.Connections; }; private readonly configurations; constructor(scope: Construct, id: string, props: OptionGroupProps); addConfiguration(configuration: OptionConfiguration): boolean; /** * Renders the option configurations specifications. */ private renderConfigurations; }