cancelPlanExecution method
Cancels an in-progress plan execution. This operation stops the execution of the plan and prevents any further steps from being processed.
You must specify the plan ARN and execution ID. You can also provide an optional comment explaining why the execution was canceled.
May throw AccessDeniedException.
May throw ResourceNotFoundException.
Parameter executionId :
The execution identifier of a plan execution.
Parameter planArn :
The Amazon Resource Name (ARN) of the plan.
Parameter comment :
A comment that you can enter about canceling a plan execution step.
Implementation
Future<void> cancelPlanExecution({
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.CancelPlanExecution'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'executionId': executionId,
'planArn': planArn,
if (comment != null) 'comment': comment,
},
);
}