changeServerLifeCycleState method
Allows the user to set the SourceServer.LifeCycle.state property for specific Source Server IDs to one of the following: READY_FOR_TEST or READY_FOR_CUTOVER. This command only works if the Source Server is already launchable (dataReplicationInfo.lagDuration is not null.)
May throw ConflictException.
May throw ResourceNotFoundException.
May throw UninitializedAccountException.
May throw ValidationException.
Parameter lifeCycle :
The request to change the source server migration lifecycle state.
Parameter sourceServerID :
The request to change the source server migration lifecycle state by
source server ID.
Parameter accountID :
The request to change the source server migration account ID.
Implementation
Future<SourceServer> changeServerLifeCycleState({
required ChangeServerLifeCycleStateSourceServerLifecycle lifeCycle,
required String sourceServerID,
String? accountID,
}) async {
final $payload = <String, dynamic>{
'lifeCycle': lifeCycle,
'sourceServerID': sourceServerID,
if (accountID != null) 'accountID': accountID,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/ChangeServerLifeCycleState',
exceptionFnMap: _exceptionFns,
);
return SourceServer.fromJson(response);
}