getPlanExecution method

Future<GetPlanExecutionResponse> getPlanExecution({
  1. required String executionId,
  2. required String planArn,
  3. int? maxResults,
  4. String? nextToken,
})

Retrieves detailed information about a specific plan execution. You must specify the plan ARN and execution ID.

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 with the execution to retrieve.

Parameter maxResults : The number of objects that you want to return with this call.

Parameter nextToken : Specifies that you want to receive the next page of results. Valid only if you received a nextToken response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's nextToken response to request the next page of results.

Implementation

Future<GetPlanExecutionResponse> getPlanExecution({
  required String executionId,
  required String planArn,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'ArcRegionSwitch.GetPlanExecution'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'executionId': executionId,
      'planArn': planArn,
      if (maxResults != null) 'maxResults': maxResults,
      if (nextToken != null) 'nextToken': nextToken,
    },
  );

  return GetPlanExecutionResponse.fromJson(jsonResponse.body);
}