All Products
Search
Document Center

Tablestore:Query the description of a delivery task

Last Updated:Jun 14, 2024

After you create a delivery task, you can call the DescribeDeliveryTask operation to query the description of the task.

Prerequisites

Parameters

Request parameters

Parameter

Description

TableName

The name of the data table.

TaskName

The name of the delivery task.

Response parameters

Parameter

Description

TaskConfig

The configuration information about the delivery task.

TaskSyncStat

The synchronization status of the delivery task.

TaskType

The type of the delivery task. Valid values:

  • 0: the full data delivery type.

  • 1: the incremental data delivery type.

  • 2: the differential data delivery type.

Examples

The following sample code provides an example on how to query the description of a delivery task, such as the Object Storage Service (OSS) configurations and synchronization status:

func DescribeTaskSample(client *tablestore.TableStoreClient, tableName string, taskName string) {
    req := &tablestore.DescribeDeliveryTaskRequest{
        TableName: tableName,
        TaskName: taskName,
    }
    resp, err := client.DescribeDeliveryTask(req)
    if err != nil {
        log.Fatal("describe delivery task failed ", err)
    }
    fmt.Println("TaskConfig: ", *resp.TaskConfig)
    fmt.Println("TaskSyncStat: ", *resp.TaskSyncStat)
    fmt.Println("TaskType: ", resp.TaskType)
}