Skip to main content

apps

Creates, updates, deletes, gets or lists an apps resource.

Overview

Nameapps
TypeResource
Idaws.resiliencehub.apps

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringName for the application. (pattern: <code>^[A-Za-z0-9][A-Za-z0-9_-]{1,59}$</code>)
app_arnstringAmazon 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_schedulestringAssessment execution schedule with 'Daily' or 'Disabled' values. (Disabled, Daily)
aws_application_arnstringAmazon 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_statusstringCurrent status of compliance for the resiliency policy. (PolicyBreached, PolicyMet, NotAssessed, ChangesDetected, NotApplicable, MissingPolicy)
creation_timestring (date-time)Date and time when the application was created.
descriptionstringOptional description for an application.
drift_statusstringIndicates if compliance drifts (deviations) were detected while running an assessment for your application. (NotChecked, NotDetected, Detected)
event_subscriptionsarrayThe 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_timestring (date-time)Date and time the most recent compliance evaluation.
last_drift_evaluation_timestring (date-time)Indicates the last time that a drift was evaluated.
last_resiliency_score_evaluation_timestring (date-time)Date and time the most recent resiliency score evaluation.
permission_modelobjectDefines the roles and credentials that Resilience Hub would use while creating the application, importing its resources, and running an assessment.
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>)
resiliency_scorenumber (double)Current resiliency score for the application.
rpo_in_secsintegerRecovery Point Objective (RPO) in seconds.
rto_in_secsintegerRecovery Time Objective (RTO) in seconds.
statusstringStatus of the application. (Active, Deleting)
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.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_appselectregionDescribes an Resilience Hub application.
list_appsselectregionappArn, awsApplicationArn, fromLastAssessmentTime, maxResults, name, nextToken, reverseOrder, toLastAssessmentTimeLists 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_appinsertregion, nameCreates 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_appupdateregion, appArnUpdates an application.
delete_appdeleteregionDeletes an Resilience Hub application. This is a destructive action that can't be undone.
batch_update_recommendation_statusexecregion, appArn, requestEntriesEnables you to include or exclude one or more operational recommendations.
import_resources_to_draft_app_versionexecregion, appArnImports 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_versionexecregion, appArnPublishes a new version of a specific Resilience Hub application.
start_app_assessmentexecregion, appArn, appVersion, assessmentNameCreates 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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)
appArnstringAmazon 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.
awsApplicationArnstringAmazon 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.
fromLastAssessmentTimestring (date-time)Lower limit of the range that is used to filter applications based on their last assessment times.
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.
namestringThe name for the one of the listed applications.
nextTokenstringNull, or the token from a previous call to get the next set of results.
reverseOrderbooleanThe 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.
toLastAssessmentTimestring (date-time)Upper limit of the range that is used to filter the applications based on their last assessment times.

SELECT examples

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
;

INSERT examples

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
;

UPDATE examples

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

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

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 }}"
}'
;