This topic describes how to modify the backup status of a tenant by using obshell-sdk-python.
Note
For more information about how to use obshell-sdk-python, see Get started with obshell-sdk-python.
Considerations
Make sure that obshell is running.
The node corresponding to the client in the request must be in an initialized cluster.
Sample code
The following sample code shows how to synchronize a task:
from obshell import ClientSet
from obshell.auth import PasswordAuth
# Create a client instance. The node address is '10.10.10.1', and the port is 2886.
client = ClientSet("10.10.10.1", 2886, PassswordAuth("****"))
client.v1.patch_tenant_backup_status("tenant1", "canceled")
References
For more information about the API for modifying the backup status of a tenant, see Modify the backup status of a tenant.
For more information about how to call the API by using obshell-sdk-go, see Modify the backup status of a tenant.