modifyScheduledAction method
Modifies a scheduled action.
May throw ClusterNotFoundFault.
May throw InvalidScheduledActionFault.
May throw InvalidScheduleFault.
May throw ScheduledActionNotFoundFault.
May throw ScheduledActionTypeUnsupportedFault.
May throw UnauthorizedOperation.
May throw UnsupportedOperationFault.
Parameter scheduledActionName :
The name of the scheduled action to modify.
Parameter enable :
A modified enable flag of the scheduled action. If true, the scheduled
action is active. If false, the scheduled action is disabled.
Parameter endTime :
A modified end time of the scheduled action. For more information about
this parameter, see ScheduledAction.
Parameter iamRole :
A different IAM role to assume to run the target action. For more
information about this parameter, see ScheduledAction.
Parameter schedule :
A modified schedule in either at( ) or cron( )
format. For more information about this parameter, see
ScheduledAction.
Parameter scheduledActionDescription :
A modified description of the scheduled action.
Parameter startTime :
A modified start time of the scheduled action. For more information about
this parameter, see ScheduledAction.
Parameter targetAction :
A modified JSON format of the scheduled action. For more information about
this parameter, see ScheduledAction.
Implementation
Future<ScheduledAction> modifyScheduledAction({
required String scheduledActionName,
bool? enable,
DateTime? endTime,
String? iamRole,
String? schedule,
String? scheduledActionDescription,
DateTime? startTime,
ScheduledActionType? targetAction,
}) async {
final $request = <String, String>{
'ScheduledActionName': scheduledActionName,
if (enable != null) 'Enable': enable.toString(),
if (endTime != null) 'EndTime': _s.iso8601ToJson(endTime),
if (iamRole != null) 'IamRole': iamRole,
if (schedule != null) 'Schedule': schedule,
if (scheduledActionDescription != null)
'ScheduledActionDescription': scheduledActionDescription,
if (startTime != null) 'StartTime': _s.iso8601ToJson(startTime),
if (targetAction != null)
for (var e1 in targetAction.toQueryMap().entries)
'TargetAction.${e1.key}': e1.value,
};
final $result = await _protocol.send(
$request,
action: 'ModifyScheduledAction',
version: '2012-12-01',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
resultWrapper: 'ModifyScheduledActionResult',
);
return ScheduledAction.fromXml($result);
}