updateLaunchConfigurationTemplate method

Future<UpdateLaunchConfigurationTemplateResponse> updateLaunchConfigurationTemplate({
  1. required String launchConfigurationTemplateID,
  2. bool? copyPrivateIp,
  3. bool? copyTags,
  4. String? exportBucketArn,
  5. LaunchDisposition? launchDisposition,
  6. bool? launchIntoSourceInstance,
  7. Licensing? licensing,
  8. bool? postLaunchEnabled,
  9. TargetInstanceTypeRightSizingMethod? targetInstanceTypeRightSizingMethod,
})

Updates an existing Launch Configuration Template by ID.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw UninitializedAccountException. May throw ValidationException.

Parameter launchConfigurationTemplateID : Launch Configuration Template ID.

Parameter copyPrivateIp : Copy private IP.

Parameter copyTags : Copy tags.

Parameter exportBucketArn : S3 bucket ARN to export Source Network templates.

Parameter launchDisposition : Launch disposition.

Parameter launchIntoSourceInstance : DRS will set the 'launch into instance ID' of any source server when performing a drill, recovery or failback to the previous region or availability zone, using the instance ID of the source instance.

Parameter licensing : Licensing.

Parameter postLaunchEnabled : Whether we want to activate post-launch actions.

Parameter targetInstanceTypeRightSizingMethod : Target instance type right-sizing method.

Implementation

Future<UpdateLaunchConfigurationTemplateResponse>
    updateLaunchConfigurationTemplate({
  required String launchConfigurationTemplateID,
  bool? copyPrivateIp,
  bool? copyTags,
  String? exportBucketArn,
  LaunchDisposition? launchDisposition,
  bool? launchIntoSourceInstance,
  Licensing? licensing,
  bool? postLaunchEnabled,
  TargetInstanceTypeRightSizingMethod? targetInstanceTypeRightSizingMethod,
}) async {
  final $payload = <String, dynamic>{
    'launchConfigurationTemplateID': launchConfigurationTemplateID,
    if (copyPrivateIp != null) 'copyPrivateIp': copyPrivateIp,
    if (copyTags != null) 'copyTags': copyTags,
    if (exportBucketArn != null) 'exportBucketArn': exportBucketArn,
    if (launchDisposition != null)
      'launchDisposition': launchDisposition.value,
    if (launchIntoSourceInstance != null)
      'launchIntoSourceInstance': launchIntoSourceInstance,
    if (licensing != null) 'licensing': licensing,
    if (postLaunchEnabled != null) 'postLaunchEnabled': postLaunchEnabled,
    if (targetInstanceTypeRightSizingMethod != null)
      'targetInstanceTypeRightSizingMethod':
          targetInstanceTypeRightSizingMethod.value,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/UpdateLaunchConfigurationTemplate',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateLaunchConfigurationTemplateResponse.fromJson(response);
}