getMaintenanceWindow method

Future<GetMaintenanceWindowResult> getMaintenanceWindow({
  1. required String windowId,
})

Retrieves a maintenance window.

May throw DoesNotExistException. May throw InternalServerError.

Parameter windowId : The ID of the maintenance window for which you want to retrieve information.

Implementation

Future<GetMaintenanceWindowResult> getMaintenanceWindow({
  required String windowId,
}) async {
  ArgumentError.checkNotNull(windowId, 'windowId');
  _s.validateStringLength(
    'windowId',
    windowId,
    20,
    20,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AmazonSSM.GetMaintenanceWindow'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'WindowId': windowId,
    },
  );

  return GetMaintenanceWindowResult.fromJson(jsonResponse.body);
}