delete_launch_template_versions
async
¶
delete_launch_template_versions(
*,
config_overrides: Optional[AsyncEC2ClientConfig] = None,
dry_run: Optional[Boolean] = None,
launch_template_id: Optional[LaunchTemplateId] = None,
launch_template_name: Optional[LaunchTemplateName] = None,
versions: Optional[VersionStringList] = None,
) -> DeleteLaunchTemplateVersionsResult
Deletes one or more versions of a launch template.
You can't delete the default version of a launch template; you must first assign a different version as the default. If the default version is the only version for the launch template, you must delete the entire launch template using DeleteLaunchTemplate.
You can delete up to 200 launch template versions in a single request. To delete more than 200 versions in a single request, use DeleteLaunchTemplate, which deletes the launch template and all of its versions.
For more information, see Delete a launch template version in the Amazon EC2 User Guide.
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. -
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.
-
versions(Optional[VersionStringList], default:None) –The version numbers of one or more launch template versions to delete. You can specify up to 200 launch template version numbers.
Raises:
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To delete a launch template version This example deletes the specified launch template version.
>>> await client.delete_launch_template_versions(launch_template_id='lt-0abcd290751193123', versions=['1'])
Source code in docs_src/capo_ec2/_services/async_ec2.py
17250 17251 17252 17253 17254 17255 17256 17257 17258 17259 17260 17261 17262 17263 17264 17265 17266 17267 17268 17269 17270 17271 17272 17273 17274 17275 17276 17277 17278 17279 17280 17281 17282 17283 17284 17285 17286 17287 17288 17289 17290 17291 17292 17293 17294 17295 17296 17297 17298 17299 17300 17301 17302 17303 17304 17305 17306 17307 17308 17309 17310 17311 17312 17313 17314 17315 17316 17317 | |