modify_launch_template
async
¶
modify_launch_template(
*,
config_overrides: Optional[AsyncEC2ClientConfig] = None,
dry_run: Optional[Boolean] = None,
client_token: Optional[String] = None,
launch_template_id: Optional[LaunchTemplateId] = None,
launch_template_name: Optional[LaunchTemplateName] = None,
default_version: Optional[String] = None,
) -> ModifyLaunchTemplateResult
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:
-
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 isUnauthorizedOperation. -
client_token(Optional[String], default: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.
-
launch_template_id(Optional[LaunchTemplateId], default: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(Optional[LaunchTemplateName], default:None) –The name of the launch template.
You must specify either the launch template ID or the launch template name, but not both.
-
default_version(Optional[String], default:None) –The version number of the launch template to set as the default version.
Raises:
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To change the default version of a launch template This example specifies version 2 as the default version of the specified launch template.
>>> await client.modify_launch_template(launch_template_id='lt-0abcd290751193123', default_version='2')
Source code in docs_src/capo_ec2/_services/async_ec2.py
52382 52383 52384 52385 52386 52387 52388 52389 52390 52391 52392 52393 52394 52395 52396 52397 52398 52399 52400 52401 52402 52403 52404 52405 52406 52407 52408 52409 52410 52411 52412 52413 52414 52415 52416 52417 52418 52419 52420 52421 52422 52423 52424 52425 52426 52427 52428 52429 52430 52431 52432 52433 52434 52435 52436 52437 52438 52439 52440 52441 52442 52443 52444 52445 52446 52447 52448 52449 52450 52451 52452 | |