Skip to main content

resiliency_policies

Creates, updates, deletes or gets a resiliency_policy resource or lists resiliency_policies in a region

Overview

Nameresiliency_policies
TypeResource
DescriptionResource Type Definition for Resiliency Policy.
Idaws.resiliencehub.resiliency_policies

Fields

NameDatatypeDescription
policy_namestringName of Resiliency Policy.
policy_descriptionstringDescription of Resiliency Policy.
data_location_constraintstringData Location Constraint of the Policy.
tierstringResiliency Policy Tier.
policyobject
policy_arnstringAmazon Resource Name (ARN) of the Resiliency Policy.
tagsobject
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTPolicyName, Tier, Policy, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__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.

/*+ create */
INSERT INTO aws.resiliencehub.resiliency_policies (
PolicyName,
Tier,
Policy,
region
)
SELECT
'{{ PolicyName }}',
'{{ Tier }}',
'{{ Policy }}',
'{{ region }}';

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