# CfnOptionGroupProps

Properties for defining a `CfnOptionGroup`.

Used as props by: [CfnOptionGroup](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_rds.CfnOptionGroup.html)

- Source: Generated at build time
- Type last changed: v2.51.0 · 18 Nov 2022

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_rds as rds } from 'aws-cdk-lib';
const cfnOptionGroupProps: rds.CfnOptionGroupProps = {
  engineName: 'engineName',
  majorEngineVersion: 'majorEngineVersion',
  optionGroupDescription: 'optionGroupDescription',

  // the properties below are optional
  optionConfigurations: [{
    optionName: 'optionName',

    // the properties below are optional
    dbSecurityGroupMemberships: ['dbSecurityGroupMemberships'],
    optionSettings: [{
      name: 'name',
      value: 'value',
    }],
    optionVersion: 'optionVersion',
    port: 123,
    vpcSecurityGroupMemberships: ['vpcSecurityGroupMemberships'],
  }],
  optionGroupName: 'optionGroupName',
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
```

Python:

```python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_rds as rds

cfn_option_group_props = rds.CfnOptionGroupProps(
    engine_name="engineName",
    major_engine_version="majorEngineVersion",
    option_group_description="optionGroupDescription",

    # the properties below are optional
    option_configurations=[rds.CfnOptionGroup.OptionConfigurationProperty(
        option_name="optionName",

        # the properties below are optional
        db_security_group_memberships=["dbSecurityGroupMemberships"],
        option_settings=[rds.CfnOptionGroup.OptionSettingProperty(
            name="name",
            value="value"
        )],
        option_version="optionVersion",
        port=123,
        vpc_security_group_memberships=["vpcSecurityGroupMemberships"]
    )],
    option_group_name="optionGroupName",
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.rds.*;

CfnOptionGroupProps cfnOptionGroupProps = CfnOptionGroupProps.builder()
        .engineName("engineName")
        .majorEngineVersion("majorEngineVersion")
        .optionGroupDescription("optionGroupDescription")

        // the properties below are optional
        .optionConfigurations(List.of(OptionConfigurationProperty.builder()
                .optionName("optionName")

                // the properties below are optional
                .dbSecurityGroupMemberships(List.of("dbSecurityGroupMemberships"))
                .optionSettings(List.of(OptionSettingProperty.builder()
                        .name("name")
                        .value("value")
                        .build()))
                .optionVersion("optionVersion")
                .port(123)
                .vpcSecurityGroupMemberships(List.of("vpcSecurityGroupMemberships"))
                .build()))
        .optionGroupName("optionGroupName")
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.RDS;

var cfnOptionGroupProps = new CfnOptionGroupProps {
    EngineName = "engineName",
    MajorEngineVersion = "majorEngineVersion",
    OptionGroupDescription = "optionGroupDescription",

    // the properties below are optional
    OptionConfigurations = new [] { new OptionConfigurationProperty {
        OptionName = "optionName",

        // the properties below are optional
        DbSecurityGroupMemberships = new [] { "dbSecurityGroupMemberships" },
        OptionSettings = new [] { new OptionSettingProperty {
            Name = "name",
            Value = "value"
        } },
        OptionVersion = "optionVersion",
        Port = 123,
        VpcSecurityGroupMemberships = new [] { "vpcSecurityGroupMemberships" }
    } },
    OptionGroupName = "optionGroupName",
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } }
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnOptionGroupProps := &CfnOptionGroupProps{
	EngineName: jsii.String("engineName"),
	MajorEngineVersion: jsii.String("majorEngineVersion"),
	OptionGroupDescription: jsii.String("optionGroupDescription"),

	// the properties below are optional
	OptionConfigurations: []interface{}{
		&OptionConfigurationProperty{
			OptionName: jsii.String("optionName"),

			// the properties below are optional
			DbSecurityGroupMemberships: []*string{
				jsii.String("dbSecurityGroupMemberships"),
			},
			OptionSettings: []interface{}{
				&OptionSettingProperty{
					Name: jsii.String("name"),
					Value: jsii.String("value"),
				},
			},
			OptionVersion: jsii.String("optionVersion"),
			Port: jsii.Number(123),
			VpcSecurityGroupMemberships: []*string{
				jsii.String("vpcSecurityGroupMemberships"),
			},
		},
	},
	OptionGroupName: jsii.String("optionGroupName"),
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}
```

## Properties

- `engineName`: string (required) — Specifies the name of the engine that this option group should be associated with.

  Valid Values:

  - `mariadb`
  - `mysql`
  - `oracle-ee`
  - `oracle-ee-cdb`
  - `oracle-se2`
  - `oracle-se2-cdb`
  - `postgres`
  - `sqlserver-ee`
  - `sqlserver-se`
  - `sqlserver-ex`
  - `sqlserver-web`

- `majorEngineVersion`: string (required) — Specifies the major version of the engine that this option group should be associated with.

- `optionConfigurations`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnOptionGroup.OptionConfigurationProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_rds.CfnOptionGroup.OptionConfigurationProperty.html)[] — A list of all available options for an option group.

- `optionGroupDescription`: string (required) — The description of the option group.

- `optionGroupName`: string — The name of the option group to be created.

  Constraints:

  - Must be 1 to 255 letters, numbers, or hyphens
  - First character must be a letter
  - Can't end with a hyphen or contain two consecutive hyphens

  Example: `myoptiongroup`

  If you don't specify a value for `OptionGroupName` property, a name is automatically created for the option group.

  > This value is stored as a lowercase string.

- `tags`: [CfnTag](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — Tags to assign to the option group.
