updateLaunchConfiguration method
- required String sourceServerID,
- bool? copyPrivateIp,
- bool? copyTags,
- LaunchDisposition? launchDisposition,
- LaunchIntoInstanceProperties? launchIntoInstanceProperties,
- Licensing? licensing,
- String? name,
- bool? postLaunchEnabled,
- TargetInstanceTypeRightSizingMethod? targetInstanceTypeRightSizingMethod,
Updates a LaunchConfiguration by Source Server ID.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw UninitializedAccountException.
May throw ValidationException.
Parameter sourceServerID :
The ID of the Source Server that we want to retrieve a Launch
Configuration for.
Parameter copyPrivateIp :
Whether we should copy the Private IP of the Source Server to the Recovery
Instance.
Parameter copyTags :
Whether we want to copy the tags of the Source Server to the EC2 machine
of the Recovery Instance.
Parameter launchDisposition :
The state of the Recovery Instance in EC2 after the recovery operation.
Parameter launchIntoInstanceProperties :
Launch into existing instance properties.
Parameter licensing :
The licensing configuration to be used for this launch configuration.
Parameter name :
The name of the launch configuration.
Parameter postLaunchEnabled :
Whether we want to enable post-launch actions for the Source Server.
Parameter targetInstanceTypeRightSizingMethod :
Whether Elastic Disaster Recovery should try to automatically choose the
instance type that best matches the OS, CPU, and RAM of your Source
Server.
Implementation
Future<LaunchConfiguration> updateLaunchConfiguration({
required String sourceServerID,
bool? copyPrivateIp,
bool? copyTags,
LaunchDisposition? launchDisposition,
LaunchIntoInstanceProperties? launchIntoInstanceProperties,
Licensing? licensing,
String? name,
bool? postLaunchEnabled,
TargetInstanceTypeRightSizingMethod? targetInstanceTypeRightSizingMethod,
}) async {
final $payload = <String, dynamic>{
'sourceServerID': sourceServerID,
if (copyPrivateIp != null) 'copyPrivateIp': copyPrivateIp,
if (copyTags != null) 'copyTags': copyTags,
if (launchDisposition != null)
'launchDisposition': launchDisposition.value,
if (launchIntoInstanceProperties != null)
'launchIntoInstanceProperties': launchIntoInstanceProperties,
if (licensing != null) 'licensing': licensing,
if (name != null) 'name': name,
if (postLaunchEnabled != null) 'postLaunchEnabled': postLaunchEnabled,
if (targetInstanceTypeRightSizingMethod != null)
'targetInstanceTypeRightSizingMethod':
targetInstanceTypeRightSizingMethod.value,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/UpdateLaunchConfiguration',
exceptionFnMap: _exceptionFns,
);
return LaunchConfiguration.fromJson(response);
}