updatePlanExecution method

Future<void> updatePlanExecution({
  1. required UpdatePlanExecutionAction action,
  2. required String executionId,
  3. required String planArn,
  4. String? comment,
})

Updates an in-progress plan execution. This operation allows you to modify certain aspects of the execution, such as adding a comment or changing the action.

May throw AccessDeniedException. May throw IllegalStateException. May throw ResourceNotFoundException.

Parameter action : The action specified for a plan execution, for example, Switch to Graceful or Pause.

Parameter executionId : The execution identifier of a plan execution.

Parameter planArn : The Amazon Resource Name (ARN) of the plan with the execution to update.

Parameter comment : An optional comment about the plan execution.

Implementation

Future<void> updatePlanExecution({
  required UpdatePlanExecutionAction action,
  required String executionId,
  required String planArn,
  String? comment,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'ArcRegionSwitch.UpdatePlanExecution'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'action': action.value,
      'executionId': executionId,
      'planArn': planArn,
      if (comment != null) 'comment': comment,
    },
  );
}