resiliency_policies
Creates, updates, deletes or gets a resiliency_policy
resource or lists resiliency_policies
in a region
Overview
Name | resiliency_policies |
Type | Resource |
Description | Resource Type Definition for Resiliency Policy. |
Id | aws.resiliencehub.resiliency_policies |
Fields
Name | Datatype | Description |
---|---|---|
policy_name | string | Name of Resiliency Policy. |
policy_description | string | Description of Resiliency Policy. |
data_location_constraint | string | Data Location Constraint of the Policy. |
tier | string | Resiliency Policy Tier. |
policy | object | |
policy_arn | string | Amazon Resource Name (ARN) of the Resiliency Policy. |
tags | object | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | PolicyName, Tier, Policy, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all resiliency_policies
in a region.
SELECT
region,
policy_name,
policy_description,
data_location_constraint,
tier,
policy,
policy_arn,
tags
FROM aws.resiliencehub.resiliency_policies
WHERE region = 'us-east-1';
Gets all properties from an individual resiliency_policy
.
SELECT
region,
policy_name,
policy_description,
data_location_constraint,
tier,
policy,
policy_arn,
tags
FROM aws.resiliencehub.resiliency_policies
WHERE region = 'us-east-1' AND data__Identifier = '<PolicyArn>';
INSERT
example
Use the following StackQL query and manifest file to create a new resiliency_policy
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.resiliencehub.resiliency_policies (
PolicyName,
Tier,
Policy,
region
)
SELECT
'{{ PolicyName }}',
'{{ Tier }}',
'{{ Policy }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.resiliencehub.resiliency_policies (
PolicyName,
PolicyDescription,
DataLocationConstraint,
Tier,
Policy,
Tags,
region
)
SELECT
'{{ PolicyName }}',
'{{ PolicyDescription }}',
'{{ DataLocationConstraint }}',
'{{ Tier }}',
'{{ Policy }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: resiliency_policy
props:
- name: PolicyName
value: '{{ PolicyName }}'
- name: PolicyDescription
value: '{{ PolicyDescription }}'
- name: DataLocationConstraint
value: '{{ DataLocationConstraint }}'
- name: Tier
value: '{{ Tier }}'
- name: Policy
value:
AZ:
RtoInSecs: '{{ RtoInSecs }}'
RpoInSecs: '{{ RpoInSecs }}'
Hardware: null
Software: null
Region: null
- name: Tags
value: {}
DELETE
example
/*+ delete */
DELETE FROM aws.resiliencehub.resiliency_policies
WHERE data__Identifier = '<PolicyArn>'
AND region = 'us-east-1';
Permissions
To operate on the resiliency_policies
resource, the following permissions are required:
Create
resiliencehub:CreateResiliencyPolicy,
resiliencehub:DescribeResiliencyPolicy,
resiliencehub:TagResource
Update
resiliencehub:DescribeResiliencyPolicy,
resiliencehub:UpdateResiliencyPolicy,
resiliencehub:TagResource,
resiliencehub:UntagResource,
resiliencehub:ListTagsForResource
Read
resiliencehub:DescribeResiliencyPolicy,
resiliencehub:ListTagsForResource
Delete
resiliencehub:DeleteResiliencyPolicy,
resiliencehub:UntagResource
List
resiliencehub:ListResiliencyPolicies