getMaintenanceWindowTask method

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

Lists the tasks in a maintenance window.

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 {
  ArgumentError.checkNotNull(windowId, 'windowId');
  _s.validateStringLength(
    'windowId',
    windowId,
    20,
    20,
    isRequired: true,
  );
  ArgumentError.checkNotNull(windowTaskId, 'windowTaskId');
  _s.validateStringLength(
    'windowTaskId',
    windowTaskId,
    36,
    36,
    isRequired: true,
  );
  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);
}