All Products
Search
Document Center

ECS actions

Last Updated: Sep 05, 2019

This topic describes the Elastic Compute Service (ECS) actions specific to various scenarios, including their usage, involved API operations, parameters, outputs, and sample code. You can use the ACS::Template action to call the cloud product actions. For more information, see ACS::Template.

Instance operation scenarios

Cloud product action Description API operation Parameter Output Sample code
ACS::ECS::DescribeInstancesByTag You can use this action to query ECS instances by tag. DescribeInstances
  • tagKey: String

  • tagValue: String

  • instanceIds: List

YAML
ACS::ECS::RunInstances You can use this action to start one or more ECS instances. RunInstances
DescribeInstances
  • imageId: String

  • instanceType: String

  • securityGroupId: String

  • vSwitchId: String

  • amount: String

  • instanceIds: List

YAML
ACS::ECS::RunInstancesFromTemplate You can use this action to create an ECS instance by executing a template. RunInstances
DescribeInstances
  • launchTemplateId: String

  • launchTemplateName: String

  • amount: Number
  • instanceIds: List

YAML
ACS::ECS::DeleteInstance You can use this action to delete an ECS instance. DeleteInstance
  • instanceId: String

- YAML
ACS::ECS::StartInstance You can use this action to start an ECS instance. StartInstance
DescribeInstances
  • instanceId: String

- YAML
ACS::ECS::StopInstance You can use this action to stop an ECS instance. StopInstance
DescribeInstances
  • instanceId: String

- YAML
ACS::ECS::RebootInstance You can use this action to restart an ECS instance. RebootInstance
DescribeInstances
  • instanceId: String

- YAML
ACS::ECS::DescribeInstancesByName You can use this action to query ECS instances by name. DescribeInstances
  • instanceName: String

  • instanceIds: List

YAML
ACS::ECS::DescribeInstancesByStatus You can use this action to query ECS instances by status. DescribeInstances
  • status: String

  • instanceIds: List

YAML

Instance modification scenarios

Cloud product action Description API operation Parameter Output Sample code
ACS::ECS::ResizeDisk You can use this action to expand a cloud disk. DescribeInstances
ResizeDisk
DescribeDisks
RebootInstance
DescribeInstances
  • diskId: String

  • instanceId: String

  • newSize: String
- YAML
ACS::ECS::ModifyInstanceVpcAttribute You can use this action to modify the VPC attributes of an ECS instance. StopInstance
DescribeInstances
ModifyInstanceVpcAttribute
  • instanceId: String

  • vSwitchId: String
- YAML
ACS::ECS::ResetPassword You can use this action to change the password of an ECS instance. ModifyInstanceAttribute
RebootInstance
DescribeInstances
  • instanceId: String

  • password: String
  • instanceId: String

YAML
ACS::ECS::ModifyVncPassword You can use this action to change the Virtual Network Computing (VNC) password of an ECS instance. ModifyInstanceVncPasswd
RebootInstance
DescribeInstances
  • instanceId: String

  • vncPassword: String
- YAML
ACS::ECS::ModifyPrepaySpec You can use this action to upgrade or downgrade the specification of a subscribed ECS instance. StopInstance
DescribeInstances
ModifyPrepayInstanceSpec
StartInstance
DescribeInstances
  • instanceId: String

  • autoPay: String

  • instanceType: String

  • orderId: String

YAML
ACS::ECS::AttachDisk You can use this action to attach a cloud disk to an ECS instance. AttachDisk
DescribeDisks
  • instanceId: String

  • diskId: String
- YAML
ACS::ECS::DetachDisk You can use this action to detach a cloud disk from an ECS instance. DetachDisk
DescribeDisks
  • instanceId: String

  • diskId: String
- YAML

Cloud Assistant scenarios

Cloud product action Description API operation Parameter Output Sample code
ACS::ECS::InstallCloudAssistant You can use this action to install Cloud Assistant. InstallCloudAssistant
RebootInstance
DescribeInstances
DescribeCloudAssistantStatus
  • instanceId: String

- YAML
ACS::ECS::RunCommand You can use this action to run a command in the Cloud Assistant client. CreateCommand
InvokeCommand
DescribeInvocations
DescribeInvocationResults
DeleteCommand
  • instanceId: String

  • commandContent: String

  • commandType: String

  • invocationResult: String

YAML

Other scenarios

Cloud product action Description API operation Parameter Output Sample code
ACS::ECS::CreateImage You can use this action to create an image. DescribeInstances
CreateImage
DescribeImages
  • instanceId: String

  • imageName: String
  • imageId: String

YAML
ACS::ECS::CreateSnapshot You can use this action to create a snapshot. DescribeInstances
CreateSnapshot
  • instanceId: String

  • diskId: String

  • snapshotName: String

  • snapshotId: String

YAML
ACS::ECS::ResetDisk You can use this action to restore a cloud disk to a specific snapshot status at a given time point. StopInstance
DescribeInstances
ResetDisk StartInstance
DescribeInstances
  • instanceId: String

  • diskId: String

  • snapshotId: String

- YAML
ACS::ECS::CreateAndAttachDisk You can use this action to create a cloud disk and attach it to an ECS instance. DescribeInstances
CreateDisk
DescribeDisks
AttachDisk
  • instanceId: String

  • diskName: String

  • zoneId: String

  • diskCategory: String

  • size: String

  • diskId: String
YAML
ACS::ECS::ReplaceSystemDisk You can use this action to replace the system disk. StopInstance
DescribeInstances
ReplaceSystemDisk
StartInstance
  • instanceId: String

  • imageId: String
- YAML
ACS::ECS::ReInitDisk You can use this action to initialize a cloud disk. DescribeDisks
DescribeInstances
ReInitDisk StartInstance
DescribeInstances
  • diskId: String
- YAML
ACS::ECS::AllocatePublicIpAddress You can use this action to assign a public IP address to an instance. DescribeInstances
AllocatePublicIpAddress
RebootInstance
DescribeInstances
  • instanceId: String
- YAML
ACS::ECS::CreateAndAttachNetworkInterface You can use this action to create and install a network interface card (NIC). DescribeInstances
CreateNetworkInterface
AttachNetworkInterface
  • instanceId: String

  • securityGroupId: String

  • vSwitchId: String

  • networkInterfaceId: String

YAML
ACS::ECS::DeleteImage You can use this action to delete an image. DeleteImage
  • imageId: String
- YAML
ACS::ECS::InstallLogtail You can use this action to install Logtail. DescribeInstances
CreateCommand
InvokeCommand
DescribeInvocations
DescribeInvocationResults
DeleteCommand
  • instanceId: String

  • logTailUserDefinedId: String

  • OOSAssumeRole: String

  • exitCode: String

  • invocationResult: String

YAML