UpdateAppCommand

Updates an application.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { ResiliencehubClient, UpdateAppCommand } from "@aws-sdk/client-resiliencehub"; // ES Modules import
// const { ResiliencehubClient, UpdateAppCommand } = require("@aws-sdk/client-resiliencehub"); // CommonJS import
const client = new ResiliencehubClient(config);
const input = { // UpdateAppRequest
  appArn: "STRING_VALUE", // required
  description: "STRING_VALUE",
  policyArn: "STRING_VALUE",
  clearResiliencyPolicyArn: true || false,
  assessmentSchedule: "Disabled" || "Daily",
  permissionModel: { // PermissionModel
    type: "LegacyIAMUser" || "RoleBased", // required
    invokerRoleName: "STRING_VALUE",
    crossAccountRoleArns: [ // IamRoleArnList
      "STRING_VALUE",
    ],
  },
  eventSubscriptions: [ // EventSubscriptionList
    { // EventSubscription
      name: "STRING_VALUE", // required
      eventType: "ScheduledAssessmentFailure" || "DriftDetected", // required
      snsTopicArn: "STRING_VALUE",
    },
  ],
};
const command = new UpdateAppCommand(input);
const response = await client.send(command);
// { // UpdateAppResponse
//   app: { // App
//     appArn: "STRING_VALUE", // required
//     name: "STRING_VALUE", // required
//     description: "STRING_VALUE",
//     policyArn: "STRING_VALUE",
//     creationTime: new Date("TIMESTAMP"), // required
//     status: "Active" || "Deleting",
//     complianceStatus: "PolicyBreached" || "PolicyMet" || "NotAssessed" || "ChangesDetected" || "NotApplicable" || "MissingPolicy",
//     lastAppComplianceEvaluationTime: new Date("TIMESTAMP"),
//     resiliencyScore: Number("double"),
//     lastResiliencyScoreEvaluationTime: new Date("TIMESTAMP"),
//     tags: { // TagMap
//       "<keys>": "STRING_VALUE",
//     },
//     assessmentSchedule: "Disabled" || "Daily",
//     permissionModel: { // PermissionModel
//       type: "LegacyIAMUser" || "RoleBased", // required
//       invokerRoleName: "STRING_VALUE",
//       crossAccountRoleArns: [ // IamRoleArnList
//         "STRING_VALUE",
//       ],
//     },
//     eventSubscriptions: [ // EventSubscriptionList
//       { // EventSubscription
//         name: "STRING_VALUE", // required
//         eventType: "ScheduledAssessmentFailure" || "DriftDetected", // required
//         snsTopicArn: "STRING_VALUE",
//       },
//     ],
//     driftStatus: "NotChecked" || "NotDetected" || "Detected",
//     lastDriftEvaluationTime: new Date("TIMESTAMP"),
//     rtoInSecs: Number("int"),
//     rpoInSecs: Number("int"),
//     awsApplicationArn: "STRING_VALUE",
//   },
// };

UpdateAppCommand Input

See UpdateAppCommandInput for more details

Parameter
Type
Description
appArn
Required
string | undefined

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.

assessmentSchedule
AppAssessmentScheduleType | undefined

Assessment execution schedule with 'Daily' or 'Disabled' values.

clearResiliencyPolicyArn
boolean | undefined

Specifies if the resiliency policy ARN should be cleared.

description
string | undefined

The optional description for an app.

eventSubscriptions
EventSubscription[] | undefined

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.

permissionModel
PermissionModel | undefined

Defines the roles and credentials that Resilience Hub would use while creating an application, importing its resources, and running an assessment.

policyArn
string | undefined

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.

UpdateAppCommand Output

See UpdateAppCommandOutput for details

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
app
Required
App | undefined

The specified application, returned as an object with details including compliance status, creation time, description, resiliency score, and more.

Throws

Name
Fault
Details
AccessDeniedException
client

You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions.

ConflictException
client

This exception occurs when a conflict with a previous successful write is detected. This generally occurs when the previous write did not have time to propagate to the host serving the current request. A retry (with appropriate backoff logic) is the recommended response to this exception.

InternalServerException
server

This exception occurs when there is an internal failure in the Resilience Hub service.

ResourceNotFoundException
client

This exception occurs when the specified resource could not be found.

ThrottlingException
client

This exception occurs when you have exceeded the limit on the number of requests per second.

ValidationException
client

This exception occurs when a request is not valid.

ResiliencehubServiceException
Base exception class for all service exceptions from Resiliencehub service.