Skip to main content

ecs launch-template

Manage ECS launch templates

Run ecctl ecs launch-template <action> -h for usage, or ecctl schema ecs.launch-template.<action> --full for the complete, agent-readable spec of every parameter and behavior.

create

ecctl ecs launch-template create [flags]

Create launch template

  • Kind: mutation · Risk: medium
  • Synchronous: waits for present (waiter template_visible, timeout 300s); use --no-wait to skip.
APIWhen calledPurpose
CreateLaunchTemplateEvery time the command runs.Perform the resource operation.
DescribeLaunchTemplatesWhen --no-wait is not specified.Poll until the resource reaches the target state. (repeated)
DescribeLaunchTemplatesWhen --no-wait is not specified.Read the resource view.
DescribeLaunchTemplateVersionsWhen --no-wait is not specified.Read the resource view.
ParameterTypeRequiredDescription
--namestringlaunch template name
--regionstringAlibaba Cloud region
--descriptionstringinstance description stored in the launch template
--imagestringECS image ID
--keypairstringkey pair name
--resource-groupstringresource group ID for the launch template
--resource-resource-groupstringresource group ID for resources created from the template
--resource-tagkey_valuetag assignment key=value for resources created from the template
--security-groupsarraysecurity group IDs
--sgstringsecurity group ID
--tagkey_valuelaunch template tag assignment key=value
--typestringECS instance type
--version-descriptionstringlaunch template version description
--vswitchstringvSwitch ID

update

ecctl ecs launch-template update <id> [flags]

Create a launch template version or switch the default version

  • Kind: mutation · Risk: medium
  • Synchronous: waits for present (waiter created_version_visible, timeout 300s); use --no-wait to skip.
APIWhen calledPurpose
CreateLaunchTemplateVersionWhen --create-version is specified.Perform the resource operation.
DescribeLaunchTemplateVersionsWhen --create-version is specified and --no-wait is not specified.Poll until the resource reaches the target state. (repeated)
ModifyLaunchTemplateDefaultVersionWhen --default-version is specified.Perform the resource operation.
DescribeLaunchTemplateVersionsWhen --default-version is specified and --no-wait is not specified.Poll until the resource reaches the target state. (repeated)
DescribeLaunchTemplatesWhen &lt;id> is specified and --no-wait is not specified.Read the resource view.
DescribeLaunchTemplatesWhen --name is specified and --no-wait is not specified and &lt;id> is not specified.Read the resource view.
DescribeLaunchTemplateVersionsWhen --default-version is specified and --no-wait is not specified.Read the resource view.
DescribeLaunchTemplateVersionsWhen --create-version is specified and --no-wait is not specified.Read the resource view.
ParameterTypeRequiredDescription
--regionstringAlibaba Cloud region
--create-versionbooleancreate a new launch template version
--default-versionintegerlaunch template default version number
--descriptionstringinstance description stored in the launch template
--imagestringECS image ID
--keypairstringkey pair name
--namestringlaunch template name
--resource-resource-groupstringresource group ID for resources created from the template
--resource-tagkey_valuetag assignment key=value for resources created from the template
--security-groupsarraysecurity group IDs
--sgstringsecurity group ID
--typestringECS instance type
--version-descriptionstringlaunch template version description
--vswitchstringvSwitch ID

delete

ecctl ecs launch-template delete <target> [flags]

Delete launch template or version

  • Kind: mutation · Risk: high
APIWhen calledPurpose
DescribeLaunchTemplatesWhen &lt;target> starts with lt-.Read the resource view.
DescribeLaunchTemplatesWhen the preceding step did not produce target_template.Read the resource view.
DeleteLaunchTemplateVersionWhen --version is specified.Perform the resource operation.
DeleteLaunchTemplateWhen --version is not specified.Perform the resource operation.
ParameterTypeRequiredDescription
--regionstringAlibaba Cloud region
--versionintegerlaunch template version number

get

ecctl ecs launch-template get <target> [flags]

Get launch template

  • Kind: read · Risk: low
APIWhen calledPurpose
DescribeLaunchTemplatesWhen &lt;target> starts with lt-.Read the resource view.
DescribeLaunchTemplatesWhen the preceding step did not produce target_template.Read the resource view.
DescribeLaunchTemplateVersionsWhen --with-versions is specified.Read the resource view.
DescribeLaunchTemplateVersionsWhen --version is specified and --with-versions is not specified.Read the resource view.
ParameterTypeRequiredDescription
--regionstringAlibaba Cloud region
--fieldsstringcomma-separated resource fields to include
--versionintegerlaunch template version number
--with-versionsbooleaninclude launch template versions

list

ecctl ecs launch-template list [<targets>...] [flags]

List launch templates

  • Kind: read · Risk: low
APIWhen calledPurpose
DescribeLaunchTemplatesWhen &lt;targets> is not specified.Read the resource view.
DescribeLaunchTemplatesWhen &lt;targets> contains a value starting with lt-.Read the resource view.
DescribeLaunchTemplatesWhen &lt;targets> contains a value that does not start with lt-.Read the resource view.
DescribeLaunchTemplatesWhen &lt;targets> contains an unmatched value starting with lt-.Read the resource view.
ParameterTypeRequiredDescription
--regionstringAlibaba Cloud region
--fieldsstringcomma-separated resource fields to include
--filterkey_valuefilter expression key=value
--limitintegermaximum resources to return (default: 100)
--pageintegerresults page to return (default: 1)