updateApp method

Future<UpdateAppResponse> updateApp({
  1. required String appArn,
  2. AppAssessmentScheduleType? assessmentSchedule,
  3. bool? clearResiliencyPolicyArn,
  4. String? description,
  5. List<EventSubscription>? eventSubscriptions,
  6. PermissionModel? permissionModel,
  7. String? policyArn,
})

Updates an application.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter appArn : 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.

Parameter assessmentSchedule : Assessment execution schedule with 'Daily' or 'Disabled' values.

Parameter clearResiliencyPolicyArn : Specifies if the resiliency policy ARN should be cleared.

Parameter description : The optional description for an app.

Parameter eventSubscriptions : 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.

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

Parameter policyArn : 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.

Implementation

Future<UpdateAppResponse> updateApp({
  required String appArn,
  AppAssessmentScheduleType? assessmentSchedule,
  bool? clearResiliencyPolicyArn,
  String? description,
  List<EventSubscription>? eventSubscriptions,
  PermissionModel? permissionModel,
  String? policyArn,
}) async {
  final $payload = <String, dynamic>{
    'appArn': appArn,
    if (assessmentSchedule != null)
      'assessmentSchedule': assessmentSchedule.value,
    if (clearResiliencyPolicyArn != null)
      'clearResiliencyPolicyArn': clearResiliencyPolicyArn,
    if (description != null) 'description': description,
    if (eventSubscriptions != null) 'eventSubscriptions': eventSubscriptions,
    if (permissionModel != null) 'permissionModel': permissionModel,
    if (policyArn != null) 'policyArn': policyArn,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/update-app',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateAppResponse.fromJson(response);
}