getMaintenanceWindowExecutionTaskInvocation method

Future<GetMaintenanceWindowExecutionTaskInvocationResult> getMaintenanceWindowExecutionTaskInvocation({
  1. required String invocationId,
  2. required String taskId,
  3. required String windowExecutionId,
})

Retrieves information about a specific task running on a specific target.

May throw DoesNotExistException. May throw InternalServerError.

Parameter invocationId : The invocation ID to retrieve.

Parameter taskId : The ID of the specific task in the maintenance window task that should be retrieved.

Parameter windowExecutionId : The ID of the maintenance window execution for which the task is a part.

Implementation

Future<GetMaintenanceWindowExecutionTaskInvocationResult>
    getMaintenanceWindowExecutionTaskInvocation({
  required String invocationId,
  required String taskId,
  required String windowExecutionId,
}) async {
  ArgumentError.checkNotNull(invocationId, 'invocationId');
  _s.validateStringLength(
    'invocationId',
    invocationId,
    36,
    36,
    isRequired: true,
  );
  ArgumentError.checkNotNull(taskId, 'taskId');
  _s.validateStringLength(
    'taskId',
    taskId,
    36,
    36,
    isRequired: true,
  );
  ArgumentError.checkNotNull(windowExecutionId, 'windowExecutionId');
  _s.validateStringLength(
    'windowExecutionId',
    windowExecutionId,
    36,
    36,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AmazonSSM.GetMaintenanceWindowExecutionTaskInvocation'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'InvocationId': invocationId,
      'TaskId': taskId,
      'WindowExecutionId': windowExecutionId,
    },
  );

  return GetMaintenanceWindowExecutionTaskInvocationResult.fromJson(
      jsonResponse.body);
}