putMaintenanceStartTime method
Set the maintenance start time for a gateway.
May throw ConflictException.
May throw ResourceNotFoundException.
Parameter gatewayArn :
The Amazon Resource Name (ARN) for the gateway, used to specify its
maintenance start time.
Parameter hourOfDay :
The hour of the day to start maintenance on a gateway.
Parameter minuteOfHour :
The minute of the hour to start maintenance on a gateway.
Parameter dayOfMonth :
The day of the month start maintenance on a gateway.
Valid values range from Sunday to Saturday.
Parameter dayOfWeek :
The day of the week to start maintenance on a gateway.
Implementation
Future<PutMaintenanceStartTimeOutput> putMaintenanceStartTime({
required String gatewayArn,
required int hourOfDay,
required int minuteOfHour,
int? dayOfMonth,
int? dayOfWeek,
}) async {
_s.validateNumRange(
'hourOfDay',
hourOfDay,
0,
23,
isRequired: true,
);
_s.validateNumRange(
'minuteOfHour',
minuteOfHour,
0,
59,
isRequired: true,
);
_s.validateNumRange(
'dayOfMonth',
dayOfMonth,
1,
31,
);
_s.validateNumRange(
'dayOfWeek',
dayOfWeek,
0,
6,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'BackupOnPremises_v20210101.PutMaintenanceStartTime'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'GatewayArn': gatewayArn,
'HourOfDay': hourOfDay,
'MinuteOfHour': minuteOfHour,
if (dayOfMonth != null) 'DayOfMonth': dayOfMonth,
if (dayOfWeek != null) 'DayOfWeek': dayOfWeek,
},
);
return PutMaintenanceStartTimeOutput.fromJson(jsonResponse.body);
}