Skip to main content

ecs image

Manage ECS image resources

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

create

ecctl ecs image create [flags]

Create custom image

  • Kind: mutation · Risk: medium
  • Synchronous: waits for Available (waiter available_after_create, timeout 1800s); use --no-wait to skip.
  • Idempotent via ClientToken.
  • Dry run: supported via --dry-run.
APIWhen calledPurpose
CreateImageEvery time the command runs.Perform the resource operation.
DescribeImagesWhen --no-wait is not specified and --dry-run is not specified.Poll until the resource reaches the target state. (repeated)
DescribeImagesWhen --no-wait is not specified and --dry-run is not specified.Return the final resource view. (cached; no additional request)
ParameterTypeRequiredDescription
--regionstringAlibaba Cloud region
--architecturestringimage architecture
--boot-modestringboot mode
--descriptionstringimage description
--detection-strategystringimage detection strategy
--disk-device-mappingobjectdisk device mappings used when creating or importing an image
--image-familystringimage family to associate when creating or updating the image
--image-versionstringimage version
--instancestringinstance ID used as the image source
--namestringimage name
--platformstringoperating system platform
--resource-groupstringresource group ID
--snapshotstringsnapshot ID used as the image source
--tagkey_valuetag assignment key=value

update

ecctl ecs image update <id> [flags]

Update image attributes or share permission

  • Kind: mutation · Risk: medium
APIWhen calledPurpose
ModifyImageAttributeWhen --name is specified or --description is specified or --image-family is specified or --boot-mode is specified or --license-type is specified or --status-action is specified or --features is specified.Perform the resource operation.
ModifyImageSharePermissionWhen --share-add is specified or --share-remove is specified or --launch-permission is specified.Perform the resource operation.
DescribeImagesWhen --no-wait is not specified.Read the resource view.
DescribeImageSharePermissionWhen (--share-add is specified or --share-remove is specified or --launch-permission is specified) and --no-wait is not specified.Read the resource view.
ParameterTypeRequiredDescription
--regionstringAlibaba Cloud region
--boot-modestringboot mode
--descriptionstringimage description
--featuresobjectimage feature flags
--image-familystringimage family to associate when creating or updating the image
--launch-permissionstringimage launch permission setting
--license-typestringlicense type
--namestringimage name
--share-addstring_arrayaccount IDs to add to the image share permission
--share-removestring_arrayaccount IDs to remove from the image share permission
--status-actionstringtarget status when modifying the image

delete

ecctl ecs image delete <id> [flags]

Delete image

  • Kind: mutation · Risk: high
  • Synchronous: waits for absent (waiter deleted_after_delete, timeout 600s); use --no-wait to skip.
APIWhen calledPurpose
DeleteImageEvery time the command runs.Perform the resource operation.
DescribeImagesWhen --no-wait is not specified.Poll until the resource reaches the target state. (repeated)
ParameterTypeRequiredDescription
--regionstringAlibaba Cloud region
--forcebooleanforce image deletion even when referenced by an instance (must be set explicitly) (default: false)

get

ecctl ecs image get <id> [flags]

Get image

  • Kind: read · Risk: low
APIWhen calledPurpose
DescribeImageFromFamilyWhen --family is specified.Read the resource view.
DescribeImagesWhen &lt;id> is specified.Read the resource view.
DescribeImageSharePermissionWhen --with-share-permission is specified.Read the resource view.
DescribeImageSupportInstanceTypesWhen --with-supported-instance-types is specified.Read the resource view.
ParameterTypeRequiredDescription
--regionstringAlibaba Cloud region
--action-typestringaction type for supported instance types query
--familystringimage family name
--fieldsstringcomma-separated resource fields to include
--with-share-permissionbooleaninclude image share permission
--with-supported-instance-typesbooleaninclude supported instance types

list

ecctl ecs image list [<ids>...] [flags]

List image resources

  • Kind: read · Risk: low
APIWhen calledPurpose
DescribeImagesEvery time the command runs.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)

copy

ecctl ecs image copy <id> [flags]

Copy image across regions

  • Kind: mutation · Risk: medium
  • Synchronous: waits for Available (waiter available_after_copy, timeout 3600s); use --no-wait to skip.
  • Idempotent via ClientToken.
APIWhen calledPurpose
CancelCopyImageWhen --cancel is specified.Perform the resource operation.
CopyImageWhen --cancel is not specified.Perform the resource operation.
DescribeImagesWhen --cancel is not specified and --no-wait is not specified.Poll until the resource reaches the target state. (repeated)
ParameterTypeRequiredDescription
--regionstringAlibaba Cloud region
--cancelbooleancancel an in-progress copy task on the image
--destination-descriptionstringdestination image description for copy
--destination-namestringdestination image name for copy
--destination-regionstringdestination region for copy
--encryptedbooleanencrypt the destination image when copying
--kms-key-idstringKMS key ID used to encrypt the destination image
--resource-groupstringresource group ID
--tagkey_valuetag assignment key=value

export

ecctl ecs image export <id> [flags]

Export image to OSS

  • Kind: mutation · Risk: medium
  • Synchronous: waits for Finished (waiter task_finished, timeout 3600s); use --no-wait to skip.
APIWhen calledPurpose
ExportImageEvery time the command runs.Perform the resource operation.
DescribeTaskAttributeWhen --no-wait is not specified.Poll until the resource reaches the target state. (repeated)
DescribeTaskAttributeWhen --no-wait is not specified.Return the final resource view. (cached; no additional request)
ParameterTypeRequiredDescription
--oss-bucketstringOSS bucket for image export or import
--regionstringAlibaba Cloud region
--export-formatstringimage export format
--image-formatstringimage file format
--oss-prefixstringOSS object key prefix for image export
--role-namestringRAM role name for OSS access

import

ecctl ecs image import [flags]

Import image from OSS

  • Kind: mutation · Risk: medium
  • Synchronous: waits for Available (waiter available_after_import, timeout 3600s); use --no-wait to skip.
  • Idempotent via ClientToken.
APIWhen calledPurpose
ImportImageEvery time the command runs.Perform the resource operation.
DescribeImagesWhen --no-wait is not specified.Poll until the resource reaches the target state. (repeated)
DescribeImagesWhen --no-wait is not specified.Return the final resource view. (cached; no additional request)
ParameterTypeRequiredDescription
--disk-device-mappingobjectdisk device mappings used when creating or importing an image
--regionstringAlibaba Cloud region
--architecturestringimage architecture
--boot-modestringboot mode
--descriptionstringimage description
--detection-strategystringimage detection strategy
--image-familystringimage family to associate when creating or updating the image
--image-versionstringimage version
--license-typestringlicense type
--namestringimage name
--os-typestringoperating system type
--platformstringoperating system platform
--resource-groupstringresource group ID
--role-namestringRAM role name for OSS access
--tagkey_valuetag assignment key=value