This topic describes how to view cluster-level tenant backup tasks by using obshell-sdk-go.
Note
For more information about how to use obshell-sdk-go, see Get started with obshell-sdk-go.
Considerations
Make sure that obshell is running.
The node corresponding to the client must be in an initialized cluster.
Sample code
package main
import (
"fmt"
"github.com/oceanbase/obshell-sdk-go/services"
)
func main() {
// Create a client instance with the node address set to '10.10.10.1' and the port set to 2886.
client, err := services.NewClientWithPassword("10.10.10.1", 2886, "****")
if err != nil {
panic(err)
}
res, err := client.V1().GetClusterBackupOverview()
if err != nil {
panic(err)
}
fmt.Printf("res: %#+v\n", res)
}
References
For more information about the API for viewing cluster-level tenant backup tasks, see View cluster-level tenant backup tasks.
For more information about how to request API methods by using obshell-sdk-python, see View cluster-level tenant backup tasks.