resiliency_policies
Creates, updates, deletes, gets or lists a resiliency_policies resource.
Overview
| Name | resiliency_policies |
| Type | Resource |
| Id | aws.resiliencehub.resiliency_policies |
Fields
The following fields are returned by SELECT queries:
- describe_resiliency_policy
- list_resiliency_policies
| Name | Datatype | Description |
|---|---|---|
creation_time | string (date-time) | Date and time when the resiliency policy was created. |
data_location_constraint | string | Specifies a high-level geographical location constraint for where your resilience policy data can be stored. (AnyLocation, SameContinent, SameCountry) |
estimated_cost_tier | string | Specifies the estimated cost tier of the resiliency policy. (L1, L2, L3, L4) |
policy | object | The resiliency policy. |
policy_arn | string | Amazon 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_description | string | Description of the resiliency policy. |
policy_name | string | The name of the policy (pattern: <code>^[A-Za-z0-9][A-Za-z0-9_-]{1,59}$</code>) |
tags | object | Tags 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. |
tier | string | The tier for this resiliency policy, ranging from the highest severity (MissionCritical) to lowest (NonCritical). (MissionCritical, Critical, Important, CoreServices, NonCritical, NotApplicable) |
| Name | Datatype | Description |
|---|---|---|
next_token | string | Token for the next set of results, or null if there are no more results. (pattern: <code>^\S{1,2000}$</code>) |
resiliency_policies | array | The resiliency policies for the Resilience Hub applications. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_resiliency_policy | select | region | 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. | |
list_resiliency_policies | select | region | maxResults, nextToken, policyName | Lists the resiliency policies for the Resilience Hub applications. |
create_resiliency_policy | insert | region, policy, policyName, tier | 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. | |
update_resiliency_policy | update | region, policyArn | 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. | |
delete_resiliency_policy | delete | region | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
maxResults | integer | Maximum 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. |
nextToken | string | Null, or the token from a previous call to get the next set of results. |
policyName | string | Name of the resiliency policy. |
SELECT examples
- describe_resiliency_policy
- list_resiliency_policies
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
;
Lists the resiliency policies for the Resilience Hub applications.
SELECT
next_token,
resiliency_policies
FROM aws.resiliencehub.resiliency_policies
WHERE region = '{{ region }}' -- required
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
AND policyName = '{{ policyName }}'
;
INSERT examples
- create_resiliency_policy
- Manifest
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
;
# Description fields are for documentation purposes
- name: resiliency_policies
props:
- name: region
value: "{{ region }}"
description: Required parameter for the resiliency_policies resource.
- name: clientToken
value: "{{ clientToken }}"
- name: dataLocationConstraint
value: "{{ dataLocationConstraint }}"
valid_values: ['AnyLocation', 'SameContinent', 'SameCountry']
- name: policy
value: "{{ policy }}"
- name: policyDescription
value: "{{ policyDescription }}"
- name: policyName
value: "{{ policyName }}"
- name: tags
value: "{{ tags }}"
- name: tier
value: "{{ tier }}"
valid_values: ['MissionCritical', 'Critical', 'Important', 'CoreServices', 'NonCritical', 'NotApplicable']
UPDATE examples
- update_resiliency_policy
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
- delete_resiliency_policy
Deletes a resiliency policy. This is a destructive action that can't be undone.
DELETE FROM aws.resiliencehub.resiliency_policies
WHERE region = '{{ region }}' --required
;