Domain name for API request: tat.intl.tencentcloudapi.com.
This API is used to create an invoker.
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: CreateInvoker. |
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. |
Name | Yes | String | Invoker name. |
Type | Yes | String | Invoker type. It can only be SCHEDULE (recurring invokers). |
CommandId | Yes | String | Remote command ID. |
InstanceIds.N | Yes | Array of String | ID of the instance bound to the trigger. Up to 100 IDs are allowed. |
Username | No | String | The user who executes the command. |
Parameters | No | String | Custom parameters of the command. |
ScheduleSettings | No | ScheduleSettings | Settings required for a recurring invoker. |
Parameter Name | Type | Description |
---|---|---|
InvokerId | String | Invoker ID. |
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. |
Execute command cmd-m7uma92n on instance ins-yx05ky8j at 2021-09-01 00:00:00 UTC+8
POST / HTTP/1.1
Host: tat.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateInvoker
<Common request parameters>
{
"Name": "test-invoker",
"CommandId": "cmd-m7uma92n",
"InstanceIds": [
"ins-yx05ky8j"
],
"Type": "SCHEDULE",
"ScheduleSettings": {
"Policy": "ONCE",
"InvokeTime": "2021-09-01T00:00:00+08:00"
}
}
{
"Response": {
"RequestId": "97268137-e0f7-477d-833b-766273d0ea47",
"InvokerId": "ivk-le1g3x2h"
}
}
Execute command cmd-m7uma92n on instance ins-yx05ky8j at 00:00:00 UTC+8 on the first day of every month
POST / HTTP/1.1
Host: tat.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateInvoker
<Common request parameters>
{
"Name": "cron-invoker",
"CommandId": "cmd-m7uma92n",
"InstanceIds": [
"ins-yx05ky8j"
],
"Type": "SCHEDULE",
"ScheduleSettings": {
"Policy": "RECURRENCE",
"Recurrence": "0 0 1 * *"
}
}
{
"Response": {
"RequestId": "d1d7ce29-b6ac-436d-93e0-b454f096cc50",
"InvokerId": "ivk-n0t6rxtv"
}
}
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 |
---|---|
AuthFailure | CAM signature/authentication error. |
InternalError | Internal error. |
InvalidParameter | Invalid parameter. |
InvalidParameterValue.InvalidCommandId | Invalid CommandId. |
InvalidParameterValue.InvalidCronExpression | Invalid crontab expression. |
InvalidParameterValue.InvalidInstanceId | Invalid instance ID. |
InvalidParameterValue.InvalidTimeFormat | Invalid time format. |
InvalidParameterValue.InvokeTimeExpired | API invocation expired. |
InvalidParameterValue.ParameterInvalidJsonFormat | The parameter is not a valid JSON string. |
ResourceNotFound.CommandNotFound | The command does not exist. |
ResourceNotFound.InstanceNotFound | The instance does not exist. |
ResourceUnavailable.AgentNotInstalled | TAT Agent is not installed. |
ResourceUnavailable.AgentStatusNotOnline | TAT Agent is offline. |
本页内容是否解决了您的问题?