approvePlanExecutionStep method

Future<void> approvePlanExecutionStep({
  1. required Approval approval,
  2. required String executionId,
  3. required String planArn,
  4. required String stepName,
  5. String? comment,
})

Approves a step in a plan execution that requires manual approval. When you create a plan, you can include approval steps that require manual intervention before the execution can proceed. This operation allows you to provide that approval.

You must specify the plan ARN, execution ID, step name, and approval status. You can also provide an optional comment explaining the approval decision.

May throw AccessDeniedException. May throw ResourceNotFoundException.

Parameter approval : The status of approval for a plan execution step.

Parameter executionId : The execution identifier of a plan execution.

Parameter planArn : The Amazon Resource Name (ARN) of the plan.

Parameter stepName : The name of a step in a plan execution.

Parameter comment : A comment that you can enter about a plan execution.

Implementation

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