getMaintenanceWindowTask method

Future<GetMaintenanceWindowTaskResult> getMaintenanceWindowTask({
  1. required String windowId,
  2. required String windowTaskId,
})

Retrieves the details of a maintenance window task. To retrieve a list of tasks in a maintenance window, instead use the DescribeMaintenanceWindowTasks command.

May throw DoesNotExistException. May throw InternalServerError.

Parameter windowId : The maintenance window ID that includes the task to retrieve.

Parameter windowTaskId : The maintenance window task ID to retrieve.

Implementation

Future<GetMaintenanceWindowTaskResult> getMaintenanceWindowTask({
  required String windowId,
  required String windowTaskId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AmazonSSM.GetMaintenanceWindowTask'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'WindowId': windowId,
      'WindowTaskId': windowTaskId,
    },
  );

  return GetMaintenanceWindowTaskResult.fromJson(jsonResponse.body);
}