apps
Creates, updates, deletes, gets or lists an apps resource.
Overview
| Name | apps |
| Type | Resource |
| Id | aws.resiliencehub.apps |
Fields
The following fields are returned by SELECT queries:
- describe_app
- list_apps
| Name | Datatype | Description |
|---|---|---|
name | string | Name for the application. (pattern: <code>^[A-Za-z0-9][A-Za-z0-9_-]{1,59}$</code>) |
app_arn | string | Amazon Resource Name (ARN) of the Resilience Hub application. The format for this ARN is: arn:partition:resiliencehub:region:account:app/app-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>) |
assessment_schedule | string | Assessment execution schedule with 'Daily' or 'Disabled' values. (Disabled, Daily) |
aws_application_arn | string | Amazon Resource Name (ARN) of Resource Groups group that is integrated with an AppRegistry application. 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>) |
compliance_status | string | Current status of compliance for the resiliency policy. (PolicyBreached, PolicyMet, NotAssessed, ChangesDetected, NotApplicable, MissingPolicy) |
creation_time | string (date-time) | Date and time when the application was created. |
description | string | Optional description for an application. |
drift_status | string | Indicates if compliance drifts (deviations) were detected while running an assessment for your application. (NotChecked, NotDetected, Detected) |
event_subscriptions | array | The list of events you would like to subscribe and get notification for. Currently, Resilience Hub supports notifications only for Drift detected and Scheduled assessment failure events. |
last_app_compliance_evaluation_time | string (date-time) | Date and time the most recent compliance evaluation. |
last_drift_evaluation_time | string (date-time) | Indicates the last time that a drift was evaluated. |
last_resiliency_score_evaluation_time | string (date-time) | Date and time the most recent resiliency score evaluation. |
permission_model | object | Defines the roles and credentials that Resilience Hub would use while creating the application, importing its resources, and running an assessment. |
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>) |
resiliency_score | number (double) | Current resiliency score for the application. |
rpo_in_secs | integer | Recovery Point Objective (RPO) in seconds. |
rto_in_secs | integer | Recovery Time Objective (RTO) in seconds. |
status | string | Status of the application. (Active, Deleting) |
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. |
| Name | Datatype | Description |
|---|---|---|
app_summaries | array | Summaries for the Resilience Hub application. |
next_token | string | Token for the next set of results, or null if there are no more results. (pattern: <code>^\S{1,2000}$</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_app | select | region | Describes an Resilience Hub application. | |
list_apps | select | region | appArn, awsApplicationArn, fromLastAssessmentTime, maxResults, name, nextToken, reverseOrder, toLastAssessmentTime | Lists your Resilience Hub applications. You can filter applications using only one filter at a time or without using any filter. If you try to filter applications using multiple filters, you will get the following error: An error occurred (ValidationException) when calling the ListApps operation: Only one filter is supported for this operation. |
create_app | insert | region, name | Creates an Resilience Hub application. An Resilience Hub application is a collection of Amazon Web Services resources structured to prevent and recover Amazon Web Services application disruptions. To describe a Resilience Hub application, you provide an application name, resources from one or more CloudFormation stacks, Resource Groups, Terraform state files, AppRegistry applications, and an appropriate resiliency policy. In addition, you can also add resources that are located on Amazon Elastic Kubernetes Service (Amazon EKS) clusters as optional resources. For more information about the number of resources supported per application, see Service quotas. After you create an Resilience Hub application, you publish it so that you can run a resiliency assessment on it. You can then use recommendations from the assessment to improve resiliency by running another assessment, comparing results, and then iterating the process until you achieve your goals for recovery time objective (RTO) and recovery point objective (RPO). | |
update_app | update | region, appArn | Updates an application. | |
delete_app | delete | region | Deletes an Resilience Hub application. This is a destructive action that can't be undone. | |
batch_update_recommendation_status | exec | region, appArn, requestEntries | Enables you to include or exclude one or more operational recommendations. | |
import_resources_to_draft_app_version | exec | region, appArn | Imports resources to Resilience Hub application draft version from different input sources. For more information about the input sources supported by Resilience Hub, see Discover the structure and describe your Resilience Hub application. | |
publish_app_version | exec | region, appArn | Publishes a new version of a specific Resilience Hub application. | |
start_app_assessment | exec | region, appArn, appVersion, assessmentName | Creates a new application assessment for an application. |
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) |
appArn | string | Amazon Resource Name (ARN) of the Resilience Hub application. The format for this ARN is: arn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference guide. |
awsApplicationArn | string | Amazon Resource Name (ARN) of Resource Groups group that is integrated with an AppRegistry application. For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference guide. |
fromLastAssessmentTime | string (date-time) | Lower limit of the range that is used to filter applications based on their last assessment times. |
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. |
name | string | The name for the one of the listed applications. |
nextToken | string | Null, or the token from a previous call to get the next set of results. |
reverseOrder | boolean | The application list is sorted based on the values of lastAppComplianceEvaluationTime field. By default, application list is sorted in ascending order. To sort the application list in descending order, set this field to True. |
toLastAssessmentTime | string (date-time) | Upper limit of the range that is used to filter the applications based on their last assessment times. |
SELECT examples
- describe_app
- list_apps
Describes an Resilience Hub application.
SELECT
name,
app_arn,
assessment_schedule,
aws_application_arn,
compliance_status,
creation_time,
description,
drift_status,
event_subscriptions,
last_app_compliance_evaluation_time,
last_drift_evaluation_time,
last_resiliency_score_evaluation_time,
permission_model,
policy_arn,
resiliency_score,
rpo_in_secs,
rto_in_secs,
status,
tags
FROM aws.resiliencehub.apps
WHERE region = '{{ region }}' -- required
;
Lists your Resilience Hub applications. You can filter applications using only one filter at a time or without using any filter. If you try to filter applications using multiple filters, you will get the following error: An error occurred (ValidationException) when calling the ListApps operation: Only one filter is supported for this operation.
SELECT
app_summaries,
next_token
FROM aws.resiliencehub.apps
WHERE region = '{{ region }}' -- required
AND appArn = '{{ appArn }}'
AND awsApplicationArn = '{{ awsApplicationArn }}'
AND fromLastAssessmentTime = '{{ fromLastAssessmentTime }}'
AND maxResults = '{{ maxResults }}'
AND name = '{{ name }}'
AND nextToken = '{{ nextToken }}'
AND reverseOrder = '{{ reverseOrder }}'
AND toLastAssessmentTime = '{{ toLastAssessmentTime }}'
;
INSERT examples
- create_app
- Manifest
Creates an Resilience Hub application. An Resilience Hub application is a collection of Amazon Web Services resources structured to prevent and recover Amazon Web Services application disruptions. To describe a Resilience Hub application, you provide an application name, resources from one or more CloudFormation stacks, Resource Groups, Terraform state files, AppRegistry applications, and an appropriate resiliency policy. In addition, you can also add resources that are located on Amazon Elastic Kubernetes Service (Amazon EKS) clusters as optional resources. For more information about the number of resources supported per application, see Service quotas. After you create an Resilience Hub application, you publish it so that you can run a resiliency assessment on it. You can then use recommendations from the assessment to improve resiliency by running another assessment, comparing results, and then iterating the process until you achieve your goals for recovery time objective (RTO) and recovery point objective (RPO).
INSERT INTO aws.resiliencehub.apps (
assessmentSchedule,
awsApplicationArn,
clientToken,
description,
eventSubscriptions,
name,
permissionModel,
policyArn,
tags,
region
)
SELECT
'{{ assessmentSchedule }}',
'{{ awsApplicationArn }}',
'{{ clientToken }}',
'{{ description }}',
'{{ eventSubscriptions }}',
'{{ name }}' /* required */,
'{{ permissionModel }}',
'{{ policyArn }}',
'{{ tags }}',
'{{ region }}'
RETURNING
app
;
# Description fields are for documentation purposes
- name: apps
props:
- name: region
value: "{{ region }}"
description: Required parameter for the apps resource.
- name: assessmentSchedule
value: "{{ assessmentSchedule }}"
valid_values: ['Disabled', 'Daily']
- name: awsApplicationArn
value: "{{ awsApplicationArn }}"
- name: clientToken
value: "{{ clientToken }}"
- name: description
value: "{{ description }}"
- name: eventSubscriptions
value:
- eventType: "{{ eventType }}"
name: "{{ name }}"
snsTopicArn: "{{ snsTopicArn }}"
- name: name
value: "{{ name }}"
- name: permissionModel
description: |
Defines the roles and credentials that Resilience Hub would use while creating the application, importing its resources, and running an assessment.
value:
crossAccountRoleArns:
- "{{ crossAccountRoleArns }}"
invokerRoleName: "{{ invokerRoleName }}"
type_: "{{ type_ }}"
- name: policyArn
value: "{{ policyArn }}"
- name: tags
value: "{{ tags }}"
UPDATE examples
- update_app
Updates an application.
UPDATE aws.resiliencehub.apps
SET
appArn = '{{ appArn }}',
assessmentSchedule = '{{ assessmentSchedule }}',
clearResiliencyPolicyArn = {{ clearResiliencyPolicyArn }},
description = '{{ description }}',
eventSubscriptions = '{{ eventSubscriptions }}',
permissionModel = '{{ permissionModel }}',
policyArn = '{{ policyArn }}'
WHERE
region = '{{ region }}' --required
AND appArn = '{{ appArn }}' --required
RETURNING
app;
DELETE examples
- delete_app
Deletes an Resilience Hub application. This is a destructive action that can't be undone.
DELETE FROM aws.resiliencehub.apps
WHERE region = '{{ region }}' --required
;
Lifecycle Methods
- batch_update_recommendation_status
- import_resources_to_draft_app_version
- publish_app_version
- start_app_assessment
Enables you to include or exclude one or more operational recommendations.
EXEC aws.resiliencehub.apps.batch_update_recommendation_status
@region='{{ region }}' --required
@@json=
'{
"appArn": "{{ appArn }}",
"requestEntries": "{{ requestEntries }}"
}'
;
Imports resources to Resilience Hub application draft version from different input sources. For more information about the input sources supported by Resilience Hub, see Discover the structure and describe your Resilience Hub application.
EXEC aws.resiliencehub.apps.import_resources_to_draft_app_version
@region='{{ region }}' --required
@@json=
'{
"appArn": "{{ appArn }}",
"eksSources": "{{ eksSources }}",
"importStrategy": "{{ importStrategy }}",
"sourceArns": "{{ sourceArns }}",
"terraformSources": "{{ terraformSources }}"
}'
;
Publishes a new version of a specific Resilience Hub application.
EXEC aws.resiliencehub.apps.publish_app_version
@region='{{ region }}' --required
@@json=
'{
"appArn": "{{ appArn }}",
"versionName": "{{ versionName }}"
}'
;
Creates a new application assessment for an application.
EXEC aws.resiliencehub.apps.start_app_assessment
@region='{{ region }}' --required
@@json=
'{
"appArn": "{{ appArn }}",
"appVersion": "{{ appVersion }}",
"assessmentName": "{{ assessmentName }}",
"clientToken": "{{ clientToken }}",
"tags": "{{ tags }}"
}'
;