modifyClusterMaintenance method
Modifies the maintenance settings of a cluster.
May throw ClusterNotFoundFault.
May throw InvalidClusterStateFault.
Parameter clusterIdentifier :
A unique identifier for the cluster.
Parameter deferMaintenance :
A boolean indicating whether to enable the deferred maintenance window.
Parameter deferMaintenanceDuration :
An integer indicating the duration of the maintenance window in days. If
you specify a duration, you can't specify an end time. The duration must
be 60 days or less.
Parameter deferMaintenanceEndTime :
A timestamp indicating end time for the deferred maintenance window. If
you specify an end time, you can't specify a duration.
Parameter deferMaintenanceIdentifier :
A unique identifier for the deferred maintenance window.
Parameter deferMaintenanceStartTime :
A timestamp indicating the start time for the deferred maintenance window.
Implementation
Future<ModifyClusterMaintenanceResult> modifyClusterMaintenance({
required String clusterIdentifier,
bool? deferMaintenance,
int? deferMaintenanceDuration,
DateTime? deferMaintenanceEndTime,
String? deferMaintenanceIdentifier,
DateTime? deferMaintenanceStartTime,
}) async {
final $request = <String, String>{
'ClusterIdentifier': clusterIdentifier,
if (deferMaintenance != null)
'DeferMaintenance': deferMaintenance.toString(),
if (deferMaintenanceDuration != null)
'DeferMaintenanceDuration': deferMaintenanceDuration.toString(),
if (deferMaintenanceEndTime != null)
'DeferMaintenanceEndTime': _s.iso8601ToJson(deferMaintenanceEndTime),
if (deferMaintenanceIdentifier != null)
'DeferMaintenanceIdentifier': deferMaintenanceIdentifier,
if (deferMaintenanceStartTime != null)
'DeferMaintenanceStartTime':
_s.iso8601ToJson(deferMaintenanceStartTime),
};
final $result = await _protocol.send(
$request,
action: 'ModifyClusterMaintenance',
version: '2012-12-01',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
resultWrapper: 'ModifyClusterMaintenanceResult',
);
return ModifyClusterMaintenanceResult.fromXml($result);
}