tencent cloud

文档反馈

DescribeInstanceEvents

最后更新时间:2024-04-15 11:08:57

1. API Description

Domain name for API request: redis.tencentcloudapi.com.

This API is used to query the event information on a TecentDB for Redis instance.

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: DescribeInstanceEvents.
Version Yes String Common Params. The value used for this API: 2018-04-12.
Region No String Common Params. This parameter is not required for this API.
ExecutionStartDate Yes String Configures the start date for querying the event execution schedule.
ExecutionEndDate Yes String Configures the end date for querying the event execution schedule.
InstanceId No String Specifies the instance ID. Example: crs-xjhsdj****. Log in to the TencentDB for Redis console and copy the instance ID in the instance list.
PageSize No Integer Outputs the number of events displayed per page. Default value: 10.
PageNo No Integer Configures the page number for querying events. You can query events on a certain page by specifying PageNo and PageSize. Default value: 1.
Status.N No Array of String Current status of the event.- Waiting: The event is waiting for execution on the execution date or during the operations period.- Running: The event is being executed during the operations period.- Finished: Execution of the event is completed.- Canceled: Execution of the event is canceled.
EventTypes.N No Array of String Event type. Currently, the type can only be related to instance migration, resource movement, and IDC deletion. This parameter can be set only to InstanceMigration.
Grades.N No Array of String Configures the level of the queried event. Events are divided into Critical, High, Medium, and Low events according to the severity and urgency.- Critical- High- Medium- Low

3. Output Parameters

Parameter Name Type Description
TotalCount Integer Total number of events.
RedisInstanceEvents Array of RedisInstanceEvent Instance event information.
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 Querying Instance Events

This example shows you how to query instance events.

Input Example

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

{
    "InstanceId": "crs-b6wst31p",
    "PageSize": 20,
    "PageNo": 1,
    "ExecutionStartDate": "2023-10-04",
    "ExecutionEndDate": "2023-10-04",
    "Grades": [
        "Low"
    ],
    "Status": [
        "Waiting"
    ],
    "EventTypes": [
        "InstanceMigration"
    ]
}

Output Example

{
    "Response": {
        "RedisInstanceEvents": [
            {
                "EffectInfo": "Momentary disconnection that lasts for several seconds will occur after the migration is completed.",
                "EndTime": "22:00",
                "ExecutionDate": "2023-09-18",
                "Grade": "Low",
                "ID": 10,
                "InitialExecutionDate": "2023-08-19",
                "InstanceId": "crs-b6wst31p",
                "InstanceName": "benyqhuang8",
                "LatestExecutionDate": "2023-09-18",
                "StartTime": "21:00",
                "Status": "Waiting",
                "TaskEndTime": "0000-00-00 00:00:00",
                "Type": "InstanceMigration"
            }
        ],
        "RequestId": "36a33a3d-f9ce-47c1-87d0-84869a37466d",
        "TotalCount": 1
    }
}

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
FailedOperation.SystemError Internal system error, which is irrelevant to the business.
InternalError.DbOperationFailed Internal system error with the database operation, which may be update, insert, select, etc.
InvalidParameter.ActionNotFound The corresponding API was not found.
InvalidParameter.InvalidParameter Invalid service parameter.
InvalidParameter.PermissionDenied The API has no CAM permissions.
UnauthorizedOperation.NoCAMAuthed No CAM permissions.
UnsupportedOperation.InstanceNotOperation Unsupported operation