getMaintenanceWindowExecutionTask method

Future<GetMaintenanceWindowExecutionTaskResult> getMaintenanceWindowExecutionTask({
  1. required String taskId,
  2. required String windowExecutionId,
})

Retrieves the details about a specific task run as part of a maintenance window execution.

May throw DoesNotExistException. May throw InternalServerError.

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

Parameter windowExecutionId : The ID of the maintenance window execution that includes the task.

Implementation

Future<GetMaintenanceWindowExecutionTaskResult>
    getMaintenanceWindowExecutionTask({
  required String taskId,
  required String windowExecutionId,
}) async {
  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.GetMaintenanceWindowExecutionTask'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'TaskId': taskId,
      'WindowExecutionId': windowExecutionId,
    },
  );

  return GetMaintenanceWindowExecutionTaskResult.fromJson(jsonResponse.body);
}