create_launch_template_version¶
Operation¶
create_launch_template_version
async
¶
create_launch_template_version(input: CreateLaunchTemplateVersionInput, plugins: list[Plugin] | None = None) -> CreateLaunchTemplateVersionOutput
Creates a new version of a launch template. You must specify an existing launch template, either by name or ID. You can determine whether the new version inherits parameters from a source version, and add or overwrite parameters as needed.
Launch template versions are numbered in the order in which they are created. You can't specify, change, or replace the numbering of launch template versions.
Launch templates are immutable; after you create a launch template, you can't modify it. Instead, you can create a new version of the launch template that includes the changes that you require.
For more information, see Modify a launch template (manage launch template versions) in the Amazon EC2 User Guide.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input
|
CreateLaunchTemplateVersionInput
|
An instance of |
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 |
|---|---|
CreateLaunchTemplateVersionOutput
|
An instance of |
Input¶
CreateLaunchTemplateVersionInput
dataclass
¶
Bases: _SerdeShape
Dataclass for CreateLaunchTemplateVersionInput 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.
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_data
class-attribute
instance-attribute
¶
The information for the launch template.
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.
resolve_alias
class-attribute
instance-attribute
¶
resolve_alias: bool | None = ...
If true, and if a Systems Manager parameter is specified for
ImageId, the AMI ID is displayed in the response for imageID. For
more information, see Use a Systems Manager parameter instead of an AMI
ID
in the Amazon EC2 User Guide.
Default: false
source_version
class-attribute
instance-attribute
¶
source_version: str | None = ...
The version of the launch template on which to base the new version. Snapshots applied to the block device mapping are ignored when creating a new version unless they are explicitly included.
If you specify this parameter, the new version inherits the launch parameters from the source version. If you specify additional launch parameters for the new version, they overwrite any corresponding launch parameters inherited from the source version.
If you omit this parameter, the new version contains only the launch parameters that you specify for the new version.
Output¶
CreateLaunchTemplateVersionOutput
dataclass
¶
Bases: _SerdeShape
Dataclass for CreateLaunchTemplateVersionOutput structure.
Attributes¶
launch_template_version
class-attribute
instance-attribute
¶
Information about the launch template version.
response_metadata
class-attribute
instance-attribute
¶
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.
warning
class-attribute
instance-attribute
¶
If the new version of the launch template contains parameters or parameter combinations that are not valid, an error code and an error message are returned for each issue that's found.