This topic describes how to use obshell-sdk-go to get information about all tenants in the recycle bin.
Note
We recommend that you first read Get started with obshell-sdk-go to learn how to use obshell-sdk-go.
Considerations
Make sure that obshell is running.
The node corresponding to the client must be part of an initialized cluster.
Sample code
package main
import (
"fmt"
"github.com/oceanbase/obshell-sdk-go/services"
)
func main() {
// Create a client instance. The node address is '10.10.10.1' and the port is 2886.
client, err := services.NewClientWithPassword("10.10.10.1", 2886, "****")
if err != nil {
fmt.Print(err)
return
}
tenants, err := client.V1().GetAllRecyclebinTenants()
if err != nil {
fmt.Print(err)
return
}
fmt.Print(tenants)
}
References
For more information about the API for getting information about all tenants in the recycle bin, see Get information about all tenants in the recycle bin.
For more information about how to request API methods by using obshell-sdk-python, see Get information about all tenants in the recycle bin.