Tencent Cloud Automation Tools (TAT) is a native operations and deployment tool for Cloud Virtual Machine (CVM) and Lighthouse. TAT provides a remote operation method without logging in and password. You can batch execute commands (Shell, PowerShell, etc.) to run Automation scripts, polling process, install/uninstall software, update applications and install patches.
This section introduces the TAT automation assistant API interface. All are API 3.0 interfaces.
You can call APIs to perform TAT operations, such as create command and run command.
For ALL supported API information of TAT, please refer to the API overview.
Common terminology for TAT API interface see the table below:
| Term | Description |
|---|---|
| Client (agent) | The client is a service program named tat_agent running on user servers. TAT depends on the client and server interaction to achieve functionality. You can query the client status of an instance using the API DescribeAutomationAgentStatus. The client code is open-source. If the instance client is offline, follow the installation guide to install the client. |
| Command (command) | A command is a script that can be delivered to the target server via TAT for execution. The command ID starts with cmd-, followed by 8 Chinese and English characters. You can query command details via DescribeCommands. |
| Personal command (normal command) | A personal command is a reusable script created by users through the CreateCommand API (https://www.tencentcloud.com/document/product/1340/52684?from_cn_redirect=1). You can use the InvokeCommand API (https://www.tencentcloud.com/document/product/1340/52678?from_cn_redirect=1) to deliver the personal command to a specified instance for running. |
| public command | public commands are a set of preset scripts officially provided by TAT, including multiple frequently used maintenance operations. You can use the InvokeCommand API (https://www.tencentcloud.com/document/product/1340/52678?from_cn_redirect=1) to run public commands on specified instances. Query public commands by specifying the created-by Filter parameter as TAT in the DescribeCommands API (https://www.tencentcloud.com/document/product/1340/52681?from_cn_redirect=1). |
| Temporary command | A temporary command is actually a script executed on the server through the RunCommand API (https://www.tencentcloud.com/document/product/1340/52676?from_cn_redirect=1). TAT will not save temporary commands and will delete them immediately after the command is executed. |
| Execution (invocation) | Execution means the action of running a command. The execution ID starts with inv- followed by 10 Chinese and English characters. Every time you issue commands via the InvokeCommand or RunCommand API, an execution will be generated. You can query execution details through the DescribeInvocations API. |
| Task (invocation task) | A task represents the execution of a command on a single instance. The task ID starts with invt- followed by 10 Chinese and English characters. You can specify multiple instances each time you run a command, and each instance generates a standalone task. Use DescribeInvocationTasks (https://www.tencentcloud.com/document/product/1340/52680?from_cn_redirect=1) to query task details. |
| Hosted instance (register instance) | A hosted instance is actually registered on Tencent Cloud through TAT, for unified operation and maintenance of non-Tencent Cloud machines, across different accounts or cross-regional machines using TAT. The hosted instance ID starts with rins-, followed by 8 Chinese and English characters. You can register a hosted instance by following the guide (https://www.tencentcloud.com/document/product/1340/96048?from_cn_redirect=1). After registration, you can query the details of a hosted instance via the DescribeRegisterInstances API (https://www.tencentcloud.com/document/product/1340/96924?from_cn_redirect=1). |
| Registration code (register code) | A registration code is a key-value pair used to register an instance to a specified region. You can create a registration code through the CreateRegisterCode API (https://www.tencentcloud.com/document/product/1340/96928?from_cn_redirect=1) and query existing registration codes through the DescribeRegisterCodes API (https://www.tencentcloud.com/document/product/1340/96925?from_cn_redirect=1). |
| Executor (invoker) | The executor is a controller used to run commands on a schedule, supporting delay execution or scheduled cyclic execution. The executor ID starts with ivk- followed by 8 Chinese and English characters. You can create an executor via the CreateInvoker API (https://www.tencentcloud.com/document/product/1340/61762?from_cn_redirect=1). |
| Scenario (scene) | A scenario is a division of resource categories, currently only used for grouping public commands and does not support user customization. The command ID begins with sc- followed by 8 Chinese and English characters. Scenario information can be queried via DescribeScenes. |
Only instances with TAT client online can perform operations such as run command and password-free login. If the instance client is offline, follow the guide to install client (https://www.tencentcloud.com/document/product/1340/51945?from_cn_redirect=1).
The following scenarios do not support installing the TAT client:
-Classic network instance.
-Unsupported operating systems (FreeBSD, Windows Server 2008, etc.).
-Network unreachable, certificate expiration, damage.
TAT is a service deployed strictly by region and can only provide services in supported regions. You can query supported regions through the DescribeRegions API. Data between TAT regions is not interconnected, and resources in other regions cannot be accessed. To manage instances across regions, you can register instances in the same region through Managed Instance Registration.
When TAT runs a command, the script content should not exceed 64KB after Base64 encoding. The plaintext execution output can save up to 24KB, and content that exceeds the limit will be discarded. To save the complete output, you can configure uploading the complete command output to COS. The execution record is only saved for 3 months, and an account can store up to 10,000 entries. Execution records that exceed the limit will be regularly cleared.
TAT has Quota limits for partial resources. Resource creation will be precluded when the quota is reached. Currently, the default quota for commands is 500 and for registration codes is 5000. If needed, submit a ticket to increase quota.
You can use the API Explorer tool to call APIs online.
This document uses execute command as an example. The steps to make an API call via the API Explorer Tool are as follows:
Feedback