aws-cdk-lib.aws_rds.OptionGroup

class OptionGroup (construct)

LanguageType name
.NETAmazon.CDK.AWS.RDS.OptionGroup
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsrds#OptionGroup
Javasoftware.amazon.awscdk.services.rds.OptionGroup
Pythonaws_cdk.aws_rds.OptionGroup
TypeScript (source)aws-cdk-lib » aws_rds » OptionGroup

Implements IConstruct, IDependable, IResource, IOptionGroup

An option group.

Example

    // Set open cursors with parameter group
    const parameterGroup = new rds.ParameterGroup(this, 'ParameterGroup', {
      engine: rds.DatabaseInstanceEngine.oracleSe2({ version: rds.OracleEngineVersion.VER_19_0_0_0_2020_04_R1 }),
      parameters: {
        open_cursors: '2500',
      },
    });

Initializer

new OptionGroup(scope: Construct, id: string, props: OptionGroupProps)

Parameters

  • scope Construct
  • id string
  • props OptionGroupProps

Construct Props

NameTypeDescription
configurationsOptionConfiguration[]The configurations for this option group.
engineIInstanceEngineThe database engine that this option group is associated with.
description?stringA description of the option group.

configurations

Type: OptionConfiguration[]

The configurations for this option group.


engine

Type: IInstanceEngine

The database engine that this option group is associated with.


description?

Type: string (optional, default: a CDK generated description)

A description of the option group.

Properties

NameTypeDescription
envResourceEnvironmentThe environment this resource belongs to.
nodeNodeThe tree node.
optionConnections{ [string]: Connections }The connections object for the options.
optionGroupNamestringThe name of the option group.
stackStackThe stack in which this resource is defined.

env

Type: ResourceEnvironment

The environment this resource belongs to.

For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.


node

Type: Node

The tree node.


optionConnections

Type: { [string]: Connections }

The connections object for the options.


optionGroupName

Type: string

The name of the option group.


stack

Type: Stack

The stack in which this resource is defined.

Methods

NameDescription
addConfiguration(configuration)Adds a configuration to this OptionGroup.
applyRemovalPolicy(policy)Apply the given removal policy to this resource.
toString()Returns a string representation of this construct.
static fromOptionGroupName(scope, id, optionGroupName)Import an existing option group.

addConfiguration(configuration)

public addConfiguration(configuration: OptionConfiguration): boolean

Parameters

  • configuration OptionConfiguration

Returns

  • boolean

Adds a configuration to this OptionGroup.

This method is a no-op for an imported OptionGroup.


applyRemovalPolicy(policy)

public applyRemovalPolicy(policy: RemovalPolicy): void

Parameters

  • policy RemovalPolicy

Apply the given removal policy to this resource.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).


toString()

public toString(): string

Returns

  • string

Returns a string representation of this construct.


static fromOptionGroupName(scope, id, optionGroupName)

public static fromOptionGroupName(scope: Construct, id: string, optionGroupName: string): IOptionGroup

Parameters

  • scope Construct
  • id string
  • optionGroupName string

Returns

  • IOptionGroup

Import an existing option group.