Skip to main content

resiliency_policies

Creates, updates, deletes, gets or lists a resiliency_policies resource.

Overview

Nameresiliency_policies
TypeResource
Idaws.resiliencehub.resiliency_policies

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
creation_timestring (date-time)Date and time when the resiliency policy was created.
data_location_constraintstringSpecifies a high-level geographical location constraint for where your resilience policy data can be stored. (AnyLocation, SameContinent, SameCountry)
estimated_cost_tierstringSpecifies the estimated cost tier of the resiliency policy. (L1, L2, L3, L4)
policyobjectThe resiliency policy.
policy_arnstringAmazon Resource Name (ARN) of the resiliency policy. The format for this ARN is: arn:partition:resiliencehub:region:account:resiliency-policy/policy-id. For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference guide. (pattern: <code>^arn:(aws|aws-cn|aws-iso|aws-iso-[a-z]{1}|aws-us-gov):[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:([a-z]{2}-((iso[a-z]{0,1}-)|(gov-)){0,1}[a-z]+-[0-9]):[0-9]{12}:[A-Za-z0-9/][A-Za-z0-9:_/+.-]{0,1023}$</code>)
policy_descriptionstringDescription of the resiliency policy.
policy_namestringThe name of the policy (pattern: <code>^[A-Za-z0-9][A-Za-z0-9_-]{1,59}$</code>)
tagsobjectTags assigned to the resource. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key/value pair.
tierstringThe tier for this resiliency policy, ranging from the highest severity (MissionCritical) to lowest (NonCritical). (MissionCritical, Critical, Important, CoreServices, NonCritical, NotApplicable)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_resiliency_policyselectregionDescribes a specified resiliency policy for an Resilience Hub application. The returned policy object includes creation time, data location constraints, the Amazon Resource Name (ARN) for the policy, tags, tier, and more.
list_resiliency_policiesselectregionmaxResults, nextToken, policyNameLists the resiliency policies for the Resilience Hub applications.
create_resiliency_policyinsertregion, policy, policyName, tierCreates a resiliency policy for an application. Resilience Hub allows you to provide a value of zero for rtoInSecs and rpoInSecs of your resiliency policy. But, while assessing your application, the lowest possible assessment result is near zero. Hence, if you provide value zero for rtoInSecs and rpoInSecs, the estimated workload RTO and estimated workload RPO result will be near zero and the Compliance status for your application will be set to Policy breached.
update_resiliency_policyupdateregion, policyArnUpdates a resiliency policy. Resilience Hub allows you to provide a value of zero for rtoInSecs and rpoInSecs of your resiliency policy. But, while assessing your application, the lowest possible assessment result is near zero. Hence, if you provide value zero for rtoInSecs and rpoInSecs, the estimated workload RTO and estimated workload RPO result will be near zero and the Compliance status for your application will be set to Policy breached.
delete_resiliency_policydeleteregionDeletes a resiliency policy. This is a destructive action that can't be undone.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)
maxResultsintegerMaximum number of results to include in the response. If more results exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved.
nextTokenstringNull, or the token from a previous call to get the next set of results.
policyNamestringName of the resiliency policy.

SELECT examples

Describes a specified resiliency policy for an Resilience Hub application. The returned policy object includes creation time, data location constraints, the Amazon Resource Name (ARN) for the policy, tags, tier, and more.

SELECT
creation_time,
data_location_constraint,
estimated_cost_tier,
policy,
policy_arn,
policy_description,
policy_name,
tags,
tier
FROM aws.resiliencehub.resiliency_policies
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a resiliency policy for an application. Resilience Hub allows you to provide a value of zero for rtoInSecs and rpoInSecs of your resiliency policy. But, while assessing your application, the lowest possible assessment result is near zero. Hence, if you provide value zero for rtoInSecs and rpoInSecs, the estimated workload RTO and estimated workload RPO result will be near zero and the Compliance status for your application will be set to Policy breached.

INSERT INTO aws.resiliencehub.resiliency_policies (
clientToken,
dataLocationConstraint,
policy,
policyDescription,
policyName,
tags,
tier,
region
)
SELECT
'{{ clientToken }}',
'{{ dataLocationConstraint }}',
'{{ policy }}' /* required */,
'{{ policyDescription }}',
'{{ policyName }}' /* required */,
'{{ tags }}',
'{{ tier }}' /* required */,
'{{ region }}'
RETURNING
policy
;

UPDATE examples

Updates a resiliency policy. Resilience Hub allows you to provide a value of zero for rtoInSecs and rpoInSecs of your resiliency policy. But, while assessing your application, the lowest possible assessment result is near zero. Hence, if you provide value zero for rtoInSecs and rpoInSecs, the estimated workload RTO and estimated workload RPO result will be near zero and the Compliance status for your application will be set to Policy breached.

UPDATE aws.resiliencehub.resiliency_policies
SET
dataLocationConstraint = '{{ dataLocationConstraint }}',
policy = '{{ policy }}',
policyArn = '{{ policyArn }}',
policyDescription = '{{ policyDescription }}',
policyName = '{{ policyName }}',
tier = '{{ tier }}'
WHERE
region = '{{ region }}' --required
AND policyArn = '{{ policyArn }}' --required
RETURNING
policy;

DELETE examples

Deletes a resiliency policy. This is a destructive action that can't be undone.

DELETE FROM aws.resiliencehub.resiliency_policies
WHERE region = '{{ region }}' --required
;