Skip to content

disable_fast_launch

disable_fast_launch(
    *,
    config_overrides: Optional[EC2ClientConfig] = None,
    image_id: Optional[ImageId] = None,
    force: Optional[Boolean] = None,
    dry_run: Optional[Boolean] = None,
) -> DisableFastLaunchResult

Discontinue Windows fast launch for a Windows AMI, and clean up existing pre-provisioned snapshots. After you disable Windows fast launch, the AMI uses the standard launch process for each new instance. Amazon EC2 must remove all pre-provisioned snapshots before you can enable Windows fast launch again.

You can only change these settings for Windows AMIs that you own or that have been shared with you.

Parameters:

  • image_id (Optional[ImageId], default: None ) –

    Specify the ID of the image for which to disable Windows fast launch.

  • force (Optional[Boolean], default: None ) –

    Forces the image settings to turn off Windows fast launch for your Windows AMI. This parameter overrides any errors that are encountered while cleaning up resources in your account.

  • dry_run (Optional[Boolean], default: None ) –

    Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

Raises:

Source code in docs_src/capo_ec2/_services/ec2.py
def disable_fast_launch(
    self,
    *,
    config_overrides: Optional[EC2ClientConfig] = None,
    image_id: Optional["capo_ec2.types.image_id.ImageId"] = None,
    force: Optional["capo_ec2.types.boolean.Boolean"] = None,
    dry_run: Optional["capo_ec2.types.boolean.Boolean"] = None,
) -> "capo_ec2.types.disable_fast_launch_result.DisableFastLaunchResult":
    """<p>Discontinue Windows fast launch for a Windows AMI, and clean up existing pre-provisioned snapshots. After you disable Windows fast launch, the AMI uses the standard launch process for each new instance. Amazon EC2 must remove all pre-provisioned snapshots before you can enable Windows fast launch again.</p> <note> <p>You can only change these settings for Windows AMIs that you own or that have been shared with you.</p> </note>

    Args:
        image_id: <p>Specify the ID of the image for which to disable Windows fast launch.</p>
        force: <p>Forces the image settings to turn off Windows fast launch for your Windows AMI. This parameter overrides any errors that are encountered while cleaning up resources in your account.</p>
        dry_run: <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>

    Raises:
        capo_ec2.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_ec2.types.disable_fast_launch_request.DisableFastLaunchRequest]",
    ) -> OperationResponse[
        "capo_ec2.types.disable_fast_launch_result.DisableFastLaunchResult"
    ]:
        import capo_ec2._operations.amazon_ec2.disable_fast_launch

        output, http_response = (
            capo_ec2._operations.amazon_ec2.disable_fast_launch.disable_fast_launch(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DisableFastLaunch")
    )
    input_: capo_ec2.types.disable_fast_launch_request.DisableFastLaunchRequest = {}
    if image_id is not None:
        input_["image_id"] = image_id
    if force is not None:
        input_["force"] = force
    if dry_run is not None:
        input_["dry_run"] = dry_run

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output