After you create a delivery task, you can call the DescribeDeliveryTask operation to query the description of the task.
Prerequisites
The TableStoreClient instance is initialized. For more information, see Initialization.
The delivery task is created. For more information about how to use the console or the SDK, see Quick start or Create delivery tasks.
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:
|
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)
}