deleteMaintenanceWindow method

Future<DeleteMaintenanceWindowResult> deleteMaintenanceWindow({
  1. required String windowId,
})

Deletes a maintenance window.

May throw InternalServerError.

Parameter windowId : The ID of the maintenance window to delete.

Implementation

Future<DeleteMaintenanceWindowResult> deleteMaintenanceWindow({
  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.DeleteMaintenanceWindow'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'WindowId': windowId,
    },
  );

  return DeleteMaintenanceWindowResult.fromJson(jsonResponse.body);
}