class OptionGroup (construct)
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.RDS.OptionGroup |
Java | software.amazon.awscdk.services.rds.OptionGroup |
Python | aws_cdk.aws_rds.OptionGroup |
TypeScript (source) | @aws-cdk/aws-rds » OptionGroup |
Implements
IConstruct
, IConstruct
, IDependable
, IResource
, IOption
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
Option
Group Props
Construct Props
Name | Type | Description |
---|---|---|
configurations | Option [] | The configurations for this option group. |
engine | IInstance | The database engine that this option group is associated with. |
description? | string | A description of the option group. |
configurations
Type:
Option
[]
The configurations for this option group.
engine
Type:
IInstance
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
Name | Type | Description |
---|---|---|
env | Resource | The environment this resource belongs to. |
node | Construct | The construct tree node associated with this construct. |
option | { [string]: Connections } | The connections object for the options. |
option | string | The name of the option group. |
stack | Stack | The stack in which this resource is defined. |
env
Type:
Resource
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:
Construct
The construct tree node associated with this construct.
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
Name | Description |
---|---|
add | Adds a configuration to this OptionGroup. |
apply | Apply the given removal policy to this resource. |
to | Returns a string representation of this construct. |
static from | Import an existing option group. |
Configuration(configuration)
addpublic addConfiguration(configuration: OptionConfiguration): boolean
Parameters
- configuration
Option
Configuration
Returns
boolean
Adds a configuration to this OptionGroup.
This method is a no-op for an imported OptionGroup.
RemovalPolicy(policy)
applypublic applyRemovalPolicy(policy: RemovalPolicy): void
Parameters
- policy
Removal
Policy
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
).
String()
topublic toString(): string
Returns
string
Returns a string representation of this construct.
OptionGroupName(scope, id, optionGroupName)
static frompublic static fromOptionGroupName(scope: Construct, id: string, optionGroupName: string): IOptionGroup
Parameters
- scope
Construct
- id
string
- optionGroupName
string
Returns
Import an existing option group.