Skip to content

EC2  >  Operations  >  modify_launch_template

modify_launch_template

Operation

modify_launch_template async

modify_launch_template(input: ModifyLaunchTemplateInput, plugins: list[Plugin] | None = None) -> ModifyLaunchTemplateOutput

Modifies a launch template. You can specify which version of the launch template to set as the default version. When launching an instance, the default version applies when a launch template version is not specified.

Parameters:

Name Type Description Default
input ModifyLaunchTemplateInput

An instance of ModifyLaunchTemplateInput.

required
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
ModifyLaunchTemplateOutput

An instance of ModifyLaunchTemplateOutput.

Input

ModifyLaunchTemplateInput dataclass

Bases: _SerdeShape

Dataclass for ModifyLaunchTemplateInput structure.

Attributes

client_token class-attribute instance-attribute
client_token: str | None = ...

Unique, case-sensitive identifier you provide to ensure the idempotency of the request. If a client token isn't specified, a randomly generated token is used in the request to ensure idempotency.

For more information, see Ensuring idempotency.

Constraint: Maximum 128 ASCII characters.

This field is autopopulated if not provided.

default_version class-attribute instance-attribute
default_version: str | None = ...

The version number of the launch template to set as the default version.

dry_run class-attribute instance-attribute
dry_run: bool | 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.

launch_template_id class-attribute instance-attribute
launch_template_id: str | None = ...

The ID of the launch template.

You must specify either the launch template ID or the launch template name, but not both.

launch_template_name class-attribute instance-attribute
launch_template_name: str | None = ...

The name of the launch template.

You must specify either the launch template ID or the launch template name, but not both.

Output

ModifyLaunchTemplateOutput dataclass

Bases: _SerdeShape

Dataclass for ModifyLaunchTemplateOutput structure.

Attributes

launch_template class-attribute instance-attribute
launch_template: LaunchTemplate | None = ...

Information about the launch template.

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.