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.
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. |
| 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. |
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=="
}
{
"Response": {
"RequestId": "0b4c6010-42a7-45cd-b8c3-daa7de930e82",
"ReplacedContent": "bHMgMTIzCmVjaG8ge3tifX0ge3tjfX0="
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
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. |
Feedback