Skip to content

update_launch_configuration_template async

update_launch_configuration_template(
    launch_configuration_template_id: LaunchConfigurationTemplateID,
    *,
    config_overrides: Optional[AsyncdrsClientConfig] = None,
    launch_disposition: Optional[LaunchDisposition] = None,
    target_instance_type_right_sizing_method: Optional[
        TargetInstanceTypeRightSizingMethod
    ] = None,
    copy_private_ip: Optional[bool] = None,
    copy_tags: Optional[bool] = None,
    licensing: Optional[Licensing] = None,
    export_bucket_arn: Optional[ARN] = None,
    post_launch_enabled: Optional[bool] = None,
    launch_into_source_instance: Optional[bool] = None,
    recovery_mode: Optional[RecoveryMode] = None,
) -> UpdateLaunchConfigurationTemplateResponse

Updates an existing Launch Configuration Template by ID.

Parameters:

  • launch_configuration_template_id (LaunchConfigurationTemplateID) –

    Launch Configuration Template ID.

  • launch_disposition (Optional[LaunchDisposition], default: None ) –

    Launch disposition.

  • target_instance_type_right_sizing_method (Optional[TargetInstanceTypeRightSizingMethod], default: None ) –

    Target instance type right-sizing method.

  • copy_private_ip (Optional[bool], default: None ) –

    Copy private IP.

  • copy_tags (Optional[bool], default: None ) –

    Copy tags.

  • licensing (Optional[Licensing], default: None ) –

    Licensing.

  • export_bucket_arn (Optional[ARN], default: None ) –

    S3 bucket ARN to export Source Network templates.

  • post_launch_enabled (Optional[bool], default: None ) –

    Whether we want to activate post-launch actions.

  • launch_into_source_instance (Optional[bool], default: None ) –

    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.

  • recovery_mode (Optional[RecoveryMode], default: None ) –

    Recovery mode.

Raises:

Source code in docs_src/capo_drs/_services/async_drs.py
async def update_launch_configuration_template(
    self,
    launch_configuration_template_id: "capo_drs.types.launch_configuration_template_id.LaunchConfigurationTemplateID",
    *,
    config_overrides: Optional[AsyncdrsClientConfig] = None,
    launch_disposition: Optional[
        "capo_drs.types.launch_disposition.LaunchDisposition"
    ] = None,
    target_instance_type_right_sizing_method: Optional[
        "capo_drs.types.target_instance_type_right_sizing_method.TargetInstanceTypeRightSizingMethod"
    ] = None,
    copy_private_ip: Optional[bool] = None,
    copy_tags: Optional[bool] = None,
    licensing: Optional["capo_drs.types.licensing.Licensing"] = None,
    export_bucket_arn: Optional["capo_drs.types.arn.ARN"] = None,
    post_launch_enabled: Optional[bool] = None,
    launch_into_source_instance: Optional[bool] = None,
    recovery_mode: Optional["capo_drs.types.recovery_mode.RecoveryMode"] = None,
) -> "capo_drs.types.update_launch_configuration_template_response.UpdateLaunchConfigurationTemplateResponse":
    """<p>Updates an existing Launch Configuration Template by ID.</p>

    Args:
        launch_configuration_template_id: <p>Launch Configuration Template ID.</p>
        launch_disposition: <p>Launch disposition.</p>
        target_instance_type_right_sizing_method: <p>Target instance type right-sizing method.</p>
        copy_private_ip: <p>Copy private IP.</p>
        copy_tags: <p>Copy tags.</p>
        licensing: <p>Licensing.</p>
        export_bucket_arn: <p>S3 bucket ARN to export Source Network templates.</p>
        post_launch_enabled: <p>Whether we want to activate post-launch actions.</p>
        launch_into_source_instance: <p>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.</p>
        recovery_mode: <p>Recovery mode.</p>

    Raises:
        capo_drs.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_drs.errors.internal_server_exception.InternalServerException: <p>The request processing has failed because of an unknown error, exception or failure.</p>
        capo_drs.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource for this operation was not found.</p>
        capo_drs.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_drs.errors.uninitialized_account_exception.UninitializedAccountException: <p>The account performing the request has not been initialized.</p>
        capo_drs.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the AWS service.</p>
        capo_drs.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_drs.types.update_launch_configuration_template_request.UpdateLaunchConfigurationTemplateRequest]",
    ) -> AsyncOperationResponse[
        "capo_drs.types.update_launch_configuration_template_response.UpdateLaunchConfigurationTemplateResponse"
    ]:
        import capo_drs._operations.elastic_disaster_recovery_service.update_launch_configuration_template

        (
            output,
            http_response,
        ) = await capo_drs._operations.elastic_disaster_recovery_service.update_launch_configuration_template.async_update_launch_configuration_template(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_drs.types.update_launch_configuration_template_response.UpdateLaunchConfigurationTemplateResponse",
    ) -> dict[str, Any]:
        import capo_drs.types.update_launch_configuration_template_response

        return capo_drs.types.update_launch_configuration_template_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "UpdateLaunchConfigurationTemplate", redact_output=_redact_output
        ),
    )
    input_: capo_drs.types.update_launch_configuration_template_request.UpdateLaunchConfigurationTemplateRequest = {
        "launch_configuration_template_id": launch_configuration_template_id
    }
    if launch_disposition is not None:
        input_["launch_disposition"] = launch_disposition
    if target_instance_type_right_sizing_method is not None:
        input_["target_instance_type_right_sizing_method"] = (
            target_instance_type_right_sizing_method
        )
    if copy_private_ip is not None:
        input_["copy_private_ip"] = copy_private_ip
    if copy_tags is not None:
        input_["copy_tags"] = copy_tags
    if licensing is not None:
        input_["licensing"] = licensing
    if export_bucket_arn is not None:
        input_["export_bucket_arn"] = export_bucket_arn
    if post_launch_enabled is not None:
        input_["post_launch_enabled"] = post_launch_enabled
    if launch_into_source_instance is not None:
        input_["launch_into_source_instance"] = launch_into_source_instance
    if recovery_mode is not None:
        input_["recovery_mode"] = recovery_mode

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output