Modifying a Client
Function
This API is used to change the status of a client.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
URI
PUT /v3/{project_id}/agents/{agent_id}
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
agent_id |
Yes |
String |
Client ID |
project_id |
Yes |
String |
Project ID |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token The token can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
agent |
Yes |
AgentUpdate object |
Agent parameters to be updated |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
agent |
Agent object |
Agent details |
Parameter |
Type |
Description |
---|---|---|
created_at |
String |
Time when the Agent was installed |
updated_at |
String |
Time when the Agent was updated |
agent_id |
String |
Client ID |
agent_version |
String |
Agent version |
agent_type |
String |
Agent type |
host_name |
String |
Name of the host where the Agent is installed |
host_nickname |
String |
Host alias |
host_ip |
String |
Host IP address |
host_os |
String |
Host OS |
status |
String |
Agent status |
last_active_time |
String |
Time when the Agent was last activated |
paths |
Array of Path objects |
Backup path of the client |
Example Requests
Changing the agent status of a client to uninstalled
PUT https://{endpoint}/v3/f841e01fd2b14e7fa41b6ae7aa6b0594/agents/79bd9daa-884f-4f84-b8fe-235d58cd927d { "agent" : { "status" : "uninstall" } }
Example Responses
Status code: 200
OK
{ "agent" : { "created_at" : "2022-01-30T09:28:09.334+00:00", "updated_at" : "2022-01-30T09:28:09.334+00:00", "agent_id" : "489654f2-363b-4ebf-966a-bdf079d97114", "agent_version" : "1.0.0", "agent_type" : "native", "host_name" : "ecs-0001", "host_nickname" : "", "host_ip" : "192.168.10.144", "host_os" : "linux", "status" : "uninstall", "last_active_time" : "2022-01-30T09:28:08.960+00:00", "paths" : [ { "id" : "5684b0fb-44c8-4c70-bb59-b03ec2738360", "agent_id" : "0cba3ff9-f836-4178-9ce8-91dc8026321c", "dir_path" : "/opt/huaweicloud/cbragent/lib", "status" : "available" }, { "id" : "1ad949d5-c955-4995-8c28-60fc8b110a21", "agent_id" : "0cba3ff9-f836-4178-9ce8-91dc8026321c", "dir_path" : "/opt/backup", "status" : "available" } ] } }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot