Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Method to trigger a cloud helper command for one or more ECS instances

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

This article is about how to trigger a cloud helper command for one or more ECS instances. The editor thought it was very practical, so I shared it with you as a reference. Let's follow the editor and have a look.

InvokeCommand

Description

When you use this interface, note that:

In an Ali cloud region, you can run cloud assistant commands up to 500 times a day.

The network type of the target instance must be a private network VPC.

The status of the target instance must be Running.

The target instance must be pre-installed with the Cloud Assistant client.

When executing a command of type PowerShell, you need to ensure that the target ECS Windows instance has been configured with the PowerShell module.

For a single execution (Timed=False), the command is executed only once.

For periodic execution (Timed=True), the cloud helper will be executed regularly according to the time and frequency specified by the parameter Frequency. The result of the last execution does not have any impact on the next execution.

The time benchmark for cycle execution is UTC + 08:00, and this time is based on the system time of the instance. You need to make sure that the time or time zone of your ECS instance is the same as your expected time.

For more information about time zone, please see modify ECS Linux instance time zone and set NTP service for Linux instance, and synchronize Windows instance clock for Windows instance.

You can select multiple ECS instances. If one of the instances does not meet the execution conditions, you need to re-select them.

The execution of the command may not be executed due to the abnormal status of the target instance, network exception or cloud helper client exception, and no execution information will be generated when it cannot be executed.

Request parameter

Return parameters

Example

Request example

Https://ecs.aliyuncs.com/?Action=InvokeCommand&RegionId=cn-hangzhou&InstanceId.1=i-bp185dy2o3o6nxxxxxxx&InstanceId.2=i-bsdn5dy2o845sxxxxxxx&CommandId=c-e996287206324975b5fbe1dxxxxxxxxx&Timed=true&Frequency=0 0-5 14 * *?

Normal return example

XML format

E69EF3CC-94CD-42E7-8926-F133B86387C0 t-7d2a745b412b4601b2d47f6a768d3a14

JSON format

{"RequestId": "E69EF3CC-94CD-42E7-8926-F133B86387C0", "InvokeId": "t-7d2a745b412b4601b2d47f6a768d3a14"}

Exception return example

XML format

E69EF3CC-94CD-42E7-8926-F133B86387C0 ecs.aliyuncs.com MissingParameter.CommandId The input parameter "CommandId" that is mandatory for processing this request is not supplied.

JSON format

{"RequestId": "E69EF3CC-94CD-42E7-8926-F133B86387C0", "HostId": "ecs.aliyuncs.com"Code": "MissingParameter.CommandId"Message": "The input parameter" CommandId "that is mandatory for processing this request is not supplied."}

Error code

The following are the error codes specific to this API. For more error codes, please visit the API error Center.

Thank you for reading! This is the end of the method of triggering a cloud assistant command for one or more ECS instances. I hope the above content will be helpful to you so that you can learn more. If you think the article is good, you can share it and let more people see it.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report