Skip to main content

option_groups

Creates, updates, deletes or gets an option_group resource or lists option_groups in a region

Overview

Nameoption_groups
TypeResource
DescriptionThe AWS::RDS::OptionGroup resource creates or updates an option group, to enable and configure features that are specific to a particular DB engine.
Idawscc.rds.option_groups

Fields

NameDatatypeDescription
option_group_namestring
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.
option_group_descriptionstringThe description of the option group.
engine_namestring
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
major_engine_versionstringSpecifies the major version of the engine that this option group should be associated with.
option_configurationsarrayA list of all available options for an option group.
tagsarrayTags to assign to the option group.
regionstringAWS region.

For more information, see AWS::RDS::OptionGroup.

Methods

NameResourceAccessible byRequired Params
create_resourceoption_groupsINSERTEngineName, MajorEngineVersion, OptionGroupDescription, region
delete_resourceoption_groupsDELETEIdentifier, region
update_resourceoption_groupsUPDATEIdentifier, PatchDocument, region
list_resourcesoption_groups_list_onlySELECTregion
get_resourceoption_groupsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual option_group.

SELECT
region,
option_group_name,
option_group_description,
engine_name,
major_engine_version,
option_configurations,
tags
FROM awscc.rds.option_groups
WHERE
region = '{{ region }}' AND
Identifier = '{{ option_group_name }}';

INSERT example

Use the following StackQL query and manifest file to create a new option_group resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.rds.option_groups (
OptionGroupDescription,
EngineName,
MajorEngineVersion,
region
)
SELECT
'{{ option_group_description }}',
'{{ engine_name }}',
'{{ major_engine_version }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

UPDATE example

Use the following StackQL query and manifest file to update a option_group resource, using stack-deploy.

/*+ update */
UPDATE awscc.rds.option_groups
SET PatchDocument = string('{{ {
"OptionConfigurations": option_configurations,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ option_group_name }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.rds.option_groups
WHERE
Identifier = '{{ option_group_name }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

To operate on the option_groups resource, the following permissions are required:

iam:CreateServiceLinkedRole,
rds:AddTagsToResource,
rds:CreateOptionGroup,
rds:DescribeOptionGroups,
rds:ListTagsForResource,
rds:ModifyOptionGroup,
rds:RemoveTagsFromResource