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.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 OptionGroupName property, a name is automatically created for the option group.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.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_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.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 OptionGroupName property, a name is automatically created for the option group.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 = '{{ region }}' 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 = '{{ region }}';
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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ 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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
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 }}'
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:
| Parameter | Description |
|---|---|
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:
- 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