option_groups
Creates, updates, deletes or gets an option_group resource or lists option_groups in a region
Overview
| Name | option_groups |
| Type | Resource |
| Description | The ``AWS::RDS::OptionGroup`` resource creates or updates an option group, to enable and configure features that are specific to a particular DB engine. |
| Id | awscc.rds.option_groups |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
option_group_name | string | The name of the option group to be created.<br />Constraints:<br />+ Must be 1 to 255 letters, numbers, or hyphens<br />+ First character must be a letter<br />+ Can't end with a hyphen or contain two consecutive hyphens<br /><br />Example: ``myoptiongroup``<br />If you don't specify a value for ``OptionGroupName`` property, a name is automatically created for the option group.<br />This value is stored as a lowercase string. |
option_group_description | string | The description of the option group. |
engine_name | string | Specifies the name of the engine that this option group should be associated with.<br />Valid Values: <br />+ ``mariadb`` <br />+ ``mysql`` <br />+ ``oracle-ee`` <br />+ ``oracle-ee-cdb`` <br />+ ``oracle-se2`` <br />+ ``oracle-se2-cdb`` <br />+ ``postgres`` <br />+ ``sqlserver-ee`` <br />+ ``sqlserver-se`` <br />+ ``sqlserver-ex`` <br />+ ``sqlserver-web`` |
major_engine_version | string | Specifies the major version of the engine that this option group should be associated with. |
option_configurations | array | A list of all available options for an option group. |
tags | array | Tags to assign to the option group. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
option_group_name | string | The name of the option group to be created.<br />Constraints:<br />+ Must be 1 to 255 letters, numbers, or hyphens<br />+ First character must be a letter<br />+ Can't end with a hyphen or contain two consecutive hyphens<br /><br />Example: ``myoptiongroup``<br />If you don't specify a value for ``OptionGroupName`` property, a name is automatically created for the option group.<br />This value is stored as a lowercase string. |
region | string | AWS region. |
For more information, see AWS::RDS::OptionGroup.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | option_groups | INSERT | EngineName, MajorEngineVersion, OptionGroupDescription, region |
delete_resource | option_groups | DELETE | Identifier, region |
update_resource | option_groups | UPDATE | Identifier, PatchDocument, region |
list_resources | option_groups_list_only | SELECT | region |
get_resource | option_groups | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
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 = 'us-east-1' AND
Identifier = '{{ option_group_name }}';
Lists all option_groups in a region.
SELECT
region,
option_group_name
FROM awscc.rds.option_groups_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new option_group resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.rds.option_groups (
OptionGroupDescription,
EngineName,
MajorEngineVersion,
region
)
SELECT
'{{ option_group_description }}',
'{{ engine_name }}',
'{{ major_engine_version }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.rds.option_groups (
OptionGroupName,
OptionGroupDescription,
EngineName,
MajorEngineVersion,
OptionConfigurations,
Tags,
region
)
SELECT
'{{ option_group_name }}',
'{{ option_group_description }}',
'{{ engine_name }}',
'{{ major_engine_version }}',
'{{ option_configurations }}',
'{{ tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: option_group
props:
- name: option_group_name
value: '{{ option_group_name }}'
- name: option_group_description
value: '{{ option_group_description }}'
- name: engine_name
value: '{{ engine_name }}'
- name: major_engine_version
value: '{{ major_engine_version }}'
- name: option_configurations
value:
- db_security_group_memberships:
- '{{ db_security_group_memberships[0] }}'
option_name: '{{ option_name }}'
option_settings:
- name: '{{ name }}'
value: '{{ value }}'
option_version: '{{ option_version }}'
port: '{{ port }}'
vpc_security_group_memberships:
- '{{ vpc_security_group_memberships[0] }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
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 }}';
DELETE example
/*+ delete */
DELETE FROM awscc.rds.option_groups
WHERE
Identifier = '{{ option_group_name }}' AND
region = 'us-east-1';
Permissions
To operate on the option_groups resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
iam:CreateServiceLinkedRole,
rds:AddTagsToResource,
rds:CreateOptionGroup,
rds:DescribeOptionGroups,
rds:ListTagsForResource,
rds:ModifyOptionGroup,
rds:RemoveTagsFromResource
rds:DescribeOptionGroups,
rds:ListTagsForResource
rds:AddTagsToResource,
rds:DescribeOptionGroups,
rds:ListTagsForResource,
rds:ModifyOptionGroup,
rds:RemoveTagsFromResource
rds:DeleteOptionGroup,
rds:DescribeOptionGroups,
rds:ListTagsForResource,
rds:RemoveTagsFromResource
rds:DescribeOptionGroups