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.
Idawscc.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.

For more information, see AWS::ResilienceHub::ResiliencyPolicy.

Methods

NameResourceAccessible byRequired Params
create_resourceresiliency_policiesINSERTPolicyName, Tier, Policy, region
delete_resourceresiliency_policiesDELETEIdentifier, region
update_resourceresiliency_policiesUPDATEIdentifier, PatchDocument, region
list_resourcesresiliency_policies_list_onlySELECTregion
get_resourceresiliency_policiesSELECTIdentifier, region

SELECT examples

Gets all properties from an individual resiliency_policy.

SELECT
region,
policy_name,
policy_description,
data_location_constraint,
tier,
policy,
policy_arn,
tags
FROM awscc.resiliencehub.resiliency_policies
WHERE
region = '{{ region }}' AND
Identifier = '{{ policy_arn }}';

INSERT example

Use the following StackQL query and manifest file to create a new resiliency_policy resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.resiliencehub.resiliency_policies (
PolicyName,
Tier,
Policy,
region
)
SELECT
'{{ policy_name }}',
'{{ tier }}',
'{{ policy }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

UPDATE example

Use the following StackQL query and manifest file to update a resiliency_policy resource, using stack-deploy.

/*+ update */
UPDATE awscc.resiliencehub.resiliency_policies
SET PatchDocument = string('{{ {
"PolicyName": policy_name,
"PolicyDescription": policy_description,
"DataLocationConstraint": data_location_constraint,
"Tier": tier,
"Policy": policy,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ policy_arn }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.resiliencehub.resiliency_policies
WHERE
Identifier = '{{ policy_arn }}' 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:

ParameterDescription
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 resiliency_policies resource, the following permissions are required:

resiliencehub:CreateResiliencyPolicy,
resiliencehub:DescribeResiliencyPolicy,
resiliencehub:TagResource