resource_sets
Creates, updates, deletes or gets a resource_set resource or lists resource_sets in a region
Overview
| Name | resource_sets |
| Type | Resource |
| Description | Schema for the AWS Route53 Recovery Readiness ResourceSet Resource and API. |
| Id | awscc.route53recoveryreadiness.resource_sets |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
resource_set_name | string | The name of the resource set to create. |
resources | array | A list of resource objects in the resource set. |
resource_set_arn | string | The Amazon Resource Name (ARN) of the resource set. |
resource_set_type | string | The resource type of the resources in the resource set. Enter one of the following values for resource type:AWS: :AutoScaling: :AutoScalingGroup, AWS: :CloudWatch: :Alarm, AWS: :EC2: :CustomerGateway, AWS: :DynamoDB: :Table, AWS: :EC2: :Volume, AWS: :ElasticLoadBalancing: :LoadBalancer, AWS: :ElasticLoadBalancingV2: :LoadBalancer, AWS: :MSK: :Cluster, AWS: :RDS: :DBCluster, AWS: :Route53: :HealthCheck, AWS: :SQS: :Queue, AWS: :SNS: :Topic, AWS: :SNS: :Subscription, AWS: :EC2: :VPC, AWS: :EC2: :VPNConnection, AWS: :EC2: :VPNGateway, AWS::Route53RecoveryReadiness::DNSTargetResource |
tags | array | A tag to associate with the parameters for a resource set. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
resource_set_name | string | The name of the resource set to create. |
region | string | AWS region. |
For more information, see AWS::Route53RecoveryReadiness::ResourceSet.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | resource_sets | INSERT | ResourceSetType, Resources, region |
delete_resource | resource_sets | DELETE | Identifier, region |
update_resource | resource_sets | UPDATE | Identifier, PatchDocument, region |
list_resources | resource_sets_list_only | SELECT | region |
get_resource | resource_sets | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual resource_set.
SELECT
region,
resource_set_name,
resources,
resource_set_arn,
resource_set_type,
tags
FROM awscc.route53recoveryreadiness.resource_sets
WHERE
region = '{{ region }}' AND
Identifier = '{{ resource_set_name }}';
Lists all resource_sets in a region.
SELECT
region,
resource_set_name
FROM awscc.route53recoveryreadiness.resource_sets_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new resource_set resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.route53recoveryreadiness.resource_sets (
Resources,
ResourceSetType,
region
)
SELECT
'{{ resources }}',
'{{ resource_set_type }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.route53recoveryreadiness.resource_sets (
ResourceSetName,
Resources,
ResourceSetType,
Tags,
region
)
SELECT
'{{ resource_set_name }}',
'{{ resources }}',
'{{ resource_set_type }}',
'{{ 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: resource_set
props:
- name: resource_set_name
value: '{{ resource_set_name }}'
- name: resources
value:
- resource_arn: '{{ resource_arn }}'
component_id: '{{ component_id }}'
dns_target_resource:
domain_name: '{{ domain_name }}'
record_set_id: '{{ record_set_id }}'
hosted_zone_arn: '{{ hosted_zone_arn }}'
record_type: '{{ record_type }}'
target_resource:
n_lb_resource:
arn: '{{ arn }}'
r53_resource:
domain_name: '{{ domain_name }}'
record_set_id: '{{ record_set_id }}'
readiness_scopes:
- '{{ readiness_scopes[0] }}'
- name: resource_set_type
value: '{{ resource_set_type }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a resource_set resource, using stack-deploy.
/*+ update */
UPDATE awscc.route53recoveryreadiness.resource_sets
SET PatchDocument = string('{{ {
"Resources": resources,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ resource_set_name }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.route53recoveryreadiness.resource_sets
WHERE
Identifier = '{{ resource_set_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 resource_sets resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
route53-recovery-readiness:CreateResourceSet,
route53-recovery-readiness:GetResourceSet,
route53-recovery-readiness:GetRecoveryGroup,
route53-recovery-readiness:GetCell,
route53-recovery-readiness:ListTagsForResources,
route53-recovery-readiness:TagResource
route53-recovery-readiness:GetResourceSet,
route53-recovery-readiness:ListTagsForResources
route53-recovery-readiness:UpdateResourceSet,
route53-recovery-readiness:GetResourceSet,
route53-recovery-readiness:GetRecoveryGroup,
route53-recovery-readiness:GetCell,
route53-recovery-readiness:ListTagsForResources,
route53-recovery-readiness:TagResource,
route53-recovery-readiness:UntagResource
route53-recovery-readiness:DeleteResourceSet,
route53-recovery-readiness:GetResourceSet
route53-recovery-readiness:ListResourceSets