tencent cloud

自动化助手

产品动态
产品简介
产品概述
产品优势
应用场景
访问管理
使用限制
购买指南
快速入门
操作指南
安装自动化助手客户端
免登录执行命令
批量执行命令
查看命令执行状态
故障处理
Windows实例问题诊断及处理
API 文档
History
Introduction
API Category
Making API Requests
Remote Command APIs
Scheduled Execution APIs
Managed Instance APIs
Scenario APIs
Statistics APIs
Data Types
Error Codes
常见问题
联系我们
词汇表
TAT 政策
TAT 隐私协议
TAT 数据处理和安全协议

PreviewReplacedCommandContent

PDF
聚焦模式
字号
最后更新时间: 2026-03-26 22:28:38

1. API Description

Domain name for API request: tat.intl.tencentcloudapi.com.

This API is used to preview the command with custom parameters. The command is not executed.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: PreviewReplacedCommandContent.
Version Yes String Common Params. The value used for this API: 2020-10-28.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
Parameters No String The preview uses custom parameters. field type is json encoded string, for example: {"varA": "222"}.
This parameter can be set only when the EnableParameter of the command is true. you can obtain the EnableParameter settings through the DescribeCommands (detailed command information) api.
If DefaultParameters or DefaultParameterConfs has set, it will overlay with Parameters and prioritize the value of Parameters.

key specifies the custom parameter name, and value specifies the parameter. both kv are string-type.
Custom parameters are limited to 20.
The custom parameter name must meet the following standard: the number of characters has a cap of 64, and the optional range is [a-zA-Z0-9-_].
If the previewed CommandId has DefaultParameters set, this parameter can be empty.
CommandId No String Perform the replace preview command.
Call the DescribeCommands api to query command details.
CommandId and Content, you must provide one and can only provide one.
Content No String Base64-encoded command to be previewed. The maximum length is 64 KB.
CommandId or Content must be specified.

3. Output Parameters

Parameter Name Type Description
ReplacedContent String Base64-encoded command with custom parameters.
RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

4. Example

Example1 Previewing the result of replacing command content

Input Example

POST / HTTP/1.1
Host: tat.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: PreviewReplacedCommandContent
<Common request parameters>

{
    "Parameters": "{\"a\": \"123\"}",
    "Content": "bHMge3thfX0KZWNobyB7e2J9fSB7e2N9fQ=="
}

Output Example

{
    "Response": {
        "RequestId": "0b4c6010-42a7-45cd-b8c3-daa7de930e82",
        "ReplacedContent": "bHMgMTIzCmVjaG8ge3tifX0ge3tjfX0="
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
InvalidParameter.ConflictParameter Conflicting parameters.
InvalidParameter.ParameterNameDuplicated Duplicate parameter name.
InvalidParameterValue.CommandContentInvalid Invalid command content.
InvalidParameterValue.CommandNameDuplicated Duplicate command name.
InvalidParameterValue.InvalidCommandId Invalid CommandId.
InvalidParameterValue.LackOfParameterInfo The custom parameter feature is enabled, but custom parameters are missing.
InvalidParameterValue.LackOfParameters Parameters not provided.
InvalidParameterValue.ParameterDisabled The custom parameter feature is not enabled.
InvalidParameterValue.ParameterInvalidJsonFormat The parameter is not a valid JSON string.
InvalidParameterValue.ParameterKeyContainsInvalidChar The parameter key contains invalid characters.
InvalidParameterValue.ParameterKeyDuplicated Duplicate parameter keys.
InvalidParameterValue.ParameterKeyLenExceeded The parameter key is too long.
InvalidParameterValue.ParameterNumberExceeded Too many parameters.
InvalidParameterValue.ParameterValueNotString The parameter value is not a string.
InvalidParameterValue.Range The parameter value is not in the valid range.
InvalidParameterValue.SupportParametersOnlyIfEnableParameter The custom parameter feature is not enabled.
ResourceNotFound.CommandNotFound The command does not exist.
UnauthorizedOperation.CamAuthFailed CAM authentication failed.
UnauthorizedOperation.InvalidToken Invalid token.
UnauthorizedOperation.MFAExpired The Multi-factor authentication (MFA) code expired.
UnauthorizedOperation.MFANotFound Multi-factor authentication (MFA) does not exist.

帮助和支持

本页内容是否解决了您的问题?

填写满意度调查问卷,共创更好文档体验。

文档反馈