Skip to main content

option_groups

Creates, updates, deletes, gets or lists an option_groups resource.

Overview

Nameoption_groups
TypeResource
Idaws.rds.option_groups

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
allows_vpc_and_non_vpc_instance_membershipsbooleanIndicates whether this option group can be applied to both VPC and non-VPC instances. The value true indicates the option group can be applied to both VPC and non-VPC instances.
copy_timestampstringIndicates when the option group was copied.
engine_namestringIndicates the name of the engine that this option group can be applied to.
major_engine_versionstringIndicates the major engine version associated with this option group.
option_group_arnstringSpecifies the Amazon Resource Name (ARN) for the option group.
option_group_descriptionstringProvides a description of the option group.
option_group_namestringSpecifies the name of the option group.
optionsstringIndicates what options are available in the option group.
source_account_idstringSpecifies the Amazon Web Services account ID for the option group from which this option group is copied.
source_option_groupstringSpecifies the name of the option group from which this option group is copied.
vpc_idstringIf AllowsVpcAndNonVpcInstanceMemberships is false, this field is blank. If AllowsVpcAndNonVpcInstanceMemberships is true and this field is blank, then this option group can be applied to both VPC and non-VPC instances. If this field contains a value, then this option group can only be applied to instances that are in the VPC indicated by this field.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_option_groupsselectregionOptionGroupName, Filters, Marker, MaxRecords, EngineName, MajorEngineVersionDescribes the available option groups.
create_option_groupinsertOptionGroupName, EngineName, MajorEngineVersion, OptionGroupDescription, regionTagsCreates a new option group. You can create up to 20 option groups. This command doesn't apply to RDS Custom.
modify_option_groupupdateOptionGroupName, regionOptionsToInclude, OptionsToRemove, ApplyImmediatelyModifies an existing option group.
delete_option_groupdeleteOptionGroupName, regionDeletes an existing option group.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
EngineNamestringThe name of the engine to associate this option group with. Valid Values: db2-ae db2-ce db2-se mariadb mysql oracle-ee oracle-ee-cdb oracle-se2 oracle-se2-cdb postgres sqlserver-ee sqlserver-se sqlserver-ex sqlserver-web
MajorEngineVersionstringSpecifies the major version of the engine that this option group should be associated with.
OptionGroupDescriptionstringThe description of the option group.
OptionGroupNamestringThe name of the option group to be deleted. You can't delete default option groups.
regionstringAWS region (default: us-east-1)
ApplyImmediatelybooleanSpecifies whether to apply the change immediately or during the next maintenance window for each instance associated with the option group.
EngineNamestringA filter to only include option groups associated with this database engine. Valid Values: db2-ae db2-ce db2-se mariadb mysql oracle-ee oracle-ee-cdb oracle-se2 oracle-se2-cdb postgres sqlserver-ee sqlserver-se sqlserver-ex sqlserver-web
FiltersarrayThis parameter isn't currently supported.
MajorEngineVersionstringFilters the list of option groups to only include groups associated with a specific database engine version. If specified, then EngineName must also be specified.
MarkerstringAn optional pagination token provided by a previous DescribeOptionGroups request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords.
MaxRecordsintegerThe maximum number of records to include in the response. If more records exist than the specified MaxRecords value, a pagination token called a marker is included in the response so that you can retrieve the remaining results. Default: 100 Constraints: Minimum 20, maximum 100.
OptionGroupNamestringThe name of the option group to describe. Can't be supplied together with EngineName or MajorEngineVersion.
OptionsToIncludearrayOptions in this list are added to the option group or, if already present, the specified configuration is used to update the existing configuration.
OptionsToRemovearrayOptions in this list are removed from the option group.
TagsarrayTags to assign to the option group.

SELECT examples

Describes the available option groups.

SELECT
allows_vpc_and_non_vpc_instance_memberships,
copy_timestamp,
engine_name,
major_engine_version,
option_group_arn,
option_group_description,
option_group_name,
options,
source_account_id,
source_option_group,
vpc_id
FROM aws.rds.option_groups
WHERE region = '{{ region }}' -- required
AND OptionGroupName = '{{ OptionGroupName }}'
AND Filters = '{{ Filters }}'
AND Marker = '{{ Marker }}'
AND MaxRecords = '{{ MaxRecords }}'
AND EngineName = '{{ EngineName }}'
AND MajorEngineVersion = '{{ MajorEngineVersion }}'
;

INSERT examples

Creates a new option group. You can create up to 20 option groups. This command doesn't apply to RDS Custom.

INSERT INTO aws.rds.option_groups (
OptionGroupName,
EngineName,
MajorEngineVersion,
OptionGroupDescription,
region,
Tags
)
SELECT
'{{ OptionGroupName }}',
'{{ EngineName }}',
'{{ MajorEngineVersion }}',
'{{ OptionGroupDescription }}',
'{{ region }}',
'{{ Tags }}'
RETURNING
allows_vpc_and_non_vpc_instance_memberships,
copy_timestamp,
engine_name,
major_engine_version,
option_group_arn,
option_group_description,
option_group_name,
options,
source_account_id,
source_option_group,
vpc_id
;

UPDATE examples

Modifies an existing option group.

UPDATE aws.rds.option_groups
SET
-- No updatable properties
WHERE
OptionGroupName = '{{ OptionGroupName }}' --required
AND region = '{{ region }}' --required
AND OptionsToInclude = '{{ OptionsToInclude}}'
AND OptionsToRemove = '{{ OptionsToRemove}}'
AND ApplyImmediately = {{ ApplyImmediately}}
RETURNING
allows_vpc_and_non_vpc_instance_memberships,
copy_timestamp,
engine_name,
major_engine_version,
option_group_arn,
option_group_description,
option_group_name,
options,
source_account_id,
source_option_group,
vpc_id;

DELETE examples

Deletes an existing option group.

DELETE FROM aws.rds.option_groups
WHERE OptionGroupName = '{{ OptionGroupName }}' --required
AND region = '{{ region }}' --required
;