AWS::RDS::OptionGroup
The AWS::RDS::OptionGroup resource creates or updates an option group, to enable and
configure features that are specific to a particular DB engine.
Syntax
To declare this entity in your Amazon CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::RDS::OptionGroup", "Properties" : { "EngineName" :String, "MajorEngineVersion" :String, "OptionConfigurations" :[ OptionConfiguration, ... ], "OptionGroupDescription" :String, "OptionGroupName" :String, "Tags" :[ Tag, ... ]} }
YAML
Type: AWS::RDS::OptionGroup Properties: EngineName:StringMajorEngineVersion:StringOptionConfigurations:- OptionConfigurationOptionGroupDescription:StringOptionGroupName:StringTags:- Tag
Properties
EngineName-
Specifies the name of the engine that this option group should be associated with.
Valid Values:
mariadbmysqloracle-eeoracle-ee-cdboracle-se2oracle-se2-cdbpostgressqlserver-eesqlserver-sesqlserver-exsqlserver-web
Required: Yes
Type: String
Update requires: Replacement
MajorEngineVersion-
Specifies the major version of the engine that this option group should be associated with.
Required: Yes
Type: String
Update requires: Replacement
OptionConfigurations-
A list of options and the settings for each option.
Required: Conditional
Type: List of OptionConfiguration
Update requires: No interruption
OptionGroupDescription-
The description of the option group.
Required: Yes
Type: String
Update requires: Replacement
OptionGroupName-
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:
myoptiongroupIf you don't specify a value for
OptionGroupNameproperty, a name is automatically created for the option group.Note
This value is stored as a lowercase string.
Required: No
Type: String
Update requires: Replacement
-
Tags-
An optional array of key-value pairs to apply to this option group.
Required: No
Type: List of Tag
Update requires: No interruption
Return values
Ref
When you pass the logical ID of this resource to the intrinsic Reffunction, Refreturns the name of the option group.
For more information about using the Reffunction, see Ref.
Examples
Creating an option group with multiple option configurations
The following example creates an option group with two option configurations
(OEM and APEX). For more information about these
options, see Options for
Oracle DB Instances in the Amazon RDS User
Guide.
JSON
{ "OracleOptionGroup": { "Type": "AWS::RDS::OptionGroup", "Properties": { "EngineName": "oracle-ee", "MajorEngineVersion": "12.1", "OptionGroupDescription": "A test option group", "OptionConfigurations": [ { "OptionName": "OEM", "DBSecurityGroupMemberships": [ "default" ], "Port": "5500" }, { "OptionName": "APEX" } ] } } }
YAML
--- OracleOptionGroup: Properties: EngineName: oracle-ee MajorEngineVersion: "12.1" OptionConfigurations: - DBSecurityGroupMemberships: - default OptionName: OEM Port: "5500" - OptionName: APEX OptionGroupDescription: "A test option group" Type: "AWS::RDS::OptionGroup"
Multiple Settings
The following snippet creates an option group that specifies two option
settings for the MEMCACHED option. For more information about this
option, see
MySQL memcached Support in the Amazon RDS User
Guide.
JSON
{ "SQLOptionGroup": { "Type": "AWS::RDS::OptionGroup", "Properties": { "EngineName": "mysql", "MajorEngineVersion": "5.6", "OptionGroupDescription": "A test option group", "OptionConfigurations": [ { "OptionName": "MEMCACHED", "VpcSecurityGroupMemberships": [ "sg-a1238db7" ], "Port": "1234", "OptionSettings": [ { "Name": "CHUNK_SIZE", "Value": "32" }, { "Name": "BINDING_PROTOCOL", "Value": "ascii" } ] } ] } } }
YAML
--- SQLOptionGroup: Properties: EngineName: mysql MajorEngineVersion: "5.6" OptionConfigurations: - OptionName: MEMCACHED OptionSettings: - Name: CHUNK_SIZE Value: "32" - Name: BINDING_PROTOCOL Value: ascii Port: "1234" VpcSecurityGroupMemberships: - sg-a1238db7 OptionGroupDescription: "A test option group" Type: "AWS::RDS::OptionGroup"
Microsoft SQL Server Native Backup and Restore Option
The following snippet creates an option group that specifies the Microsoft SQL Server native backup and restore option. For more information about this option, see Support for Native Backup and Restore in SQL Server in the Amazon RDS User Guide.
JSON
{ "myOptionGroup": { "Type": "AWS::RDS::OptionGroup", "Properties": { "EngineName": "sqlserver-se", "MajorEngineVersion": "12.00", "OptionGroupDescription": "SQL Server Native Backup and Restore", "OptionConfigurations": [ { "OptionName": "SQLSERVER_BACKUP_RESTORE", "OptionSettings": [ { "Name": "IAM_ROLE_ARN", "Value": "arn:aws:iam::333333333333333:role/service-role/sqlserverrestore" } ] } ] } } }
YAML
--- myOptionGroup: Type: 'AWS::RDS::OptionGroup' Properties: EngineName: sqlserver-se MajorEngineVersion: '12.00' OptionGroupDescription: SQL Server Native Backup and Restore OptionConfigurations: - OptionName: SQLSERVER_BACKUP_RESTORE OptionSettings: - Name: IAM_ROLE_ARN Value: 'arn:aws:iam::333333333333333:role/service-role/sqlserverrestore'