This topic describes how to use obshell-sdk-python to modify the log archiving status of a cluster.
Note
We recommend that you first read Get started with obshell-sdk-python to learn how to use obshell-sdk-python.
Considerations
Make sure that obshell is running.
The node corresponding to the client 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 with the node address '10.10.10.1' and port 2886.
client = ClientSet("10.10.10.1", 2886, PassswordAuth("****"))
client.v1.patch_cluster_backup_log_status("stop")
References
For more information about the API for modifying the log archiving status of a cluster, see Modify the log archiving status of a cluster.
For more information about how to request the API by using obshell-sdk-go, see Modify the log archiving status of a cluster.