Skip to content

/AWS1/CL_EC2=>CREATELAUNCHTEMPLATE()

About CreateLaunchTemplate

Creates a launch template.

A launch template contains the parameters to launch an instance. When you launch an instance using RunInstances, you can specify a launch template instead of providing the launch parameters in the request. For more information, see Launch an instance from a launch template in the Amazon Elastic Compute Cloud User Guide.

To clone an existing launch template as the basis for a new launch template, use the Amazon EC2 console. The API, SDKs, and CLI do not support cloning a template. For more information, see Create a launch template from an existing launch template in the Amazon Elastic Compute Cloud User Guide.

Method Signature

IMPORTING

Required arguments:

IV_LAUNCHTEMPLATENAME TYPE /AWS1/EC2LAUNCHTEMPLATENAME /AWS1/EC2LAUNCHTEMPLATENAME

A name for the launch template.

IO_LAUNCHTEMPLATEDATA TYPE REF TO /AWS1/CL_EC2REQLAUNCHTMPLDATA /AWS1/CL_EC2REQLAUNCHTMPLDATA

The information for the launch template.

Optional arguments:

IV_DRYRUN TYPE /AWS1/EC2BOOLEAN /AWS1/EC2BOOLEAN

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.

IV_CLIENTTOKEN TYPE /AWS1/EC2STRING /AWS1/EC2STRING

Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see Ensuring idempotency.

Constraint: Maximum 128 ASCII characters.

IV_VERSIONDESCRIPTION TYPE /AWS1/EC2VERSIONDESCRIPTION /AWS1/EC2VERSIONDESCRIPTION

A description for the first version of the launch template.

IT_TAGSPECIFICATIONS TYPE /AWS1/CL_EC2TAGSPECIFICATION=>TT_TAGSPECIFICATIONLIST TT_TAGSPECIFICATIONLIST

The tags to apply to the launch template on creation. To tag the launch template, the resource type must be launch-template.

To specify the tags for the resources that are created when an instance is launched, you must use the TagSpecifications parameter in the launch template data structure.

RETURNING

OO_OUTPUT TYPE REF TO /AWS1/CL_EC2CRELAUNCHTMPLRSLT /AWS1/CL_EC2CRELAUNCHTMPLRSLT