Modifying Instance Information
Function
This API is used to modify the name and description of an instance.
Debugging
You can use API Explorer to debug this API.
URI
PUT /v2/{project_id}/instances/{instance_id}
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Project ID. |
|
instance_id |
Yes |
String |
Instance ID. |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
name |
No |
String |
Instance name. An instance name starts with a letter, consists of 4 to 64 characters, and can contain only letters, digits, and hyphens (-). |
|
description |
No |
String |
Instance description. The description can contain a maximum of 1024 characters.
NOTE:
The backslash () and quotation mark (") are special characters for JSON messages. When using a backslash () or a quotation mark (") in a parameter value, add the escape character () before the characters, for example, \ and ". |
|
maintain_begin |
No |
String |
Time at which the maintenance time window starts. The format is HH:mm:ss.
|
|
maintain_end |
No |
String |
Time at which the maintenance time window ends. The format is HH:mm:ss.
|
|
security_group_id |
No |
String |
Security group ID. |
|
enable_publicip |
No |
Boolean |
Whether to enable public access for the RabbitMQ instance.
|
|
publicip_id |
No |
String |
ID of the EIP bound to a RabbitMQ instance. This parameter is mandatory if public access is enabled (that is, enable_publicip is set to true). To obtain the value, log in to the Network Console, go to the EIPs page, click the specified EIP, and query the ID in the Basic Information area. |
|
enterprise_project_id |
No |
String |
Enterprise project. |
Response Parameters
None
Example Requests
-
Modifying the name and description of an instance.
PUT https://{endpoint}/v2/{project_id}/instances/{instance_id} { "name" : "rabbitmq-01", "description" : "instance description" } -
Modifying the name, description, and maintenance time window of an instance.
PUT https://{endpoint}/v2/{project_id}/instances/{instance_id} { "name" : "rabbitmq-01", "description" : "instance description", "maintain_begin" : "02:00:00", "maintain_end" : "06:00:00" } -
Enabling public access for an instance.
PUT https://{endpoint}/v2/{project_id}/instances/{instance_id} { "enable_publicip" : true, "publicip_id" : "32685c2b-xxxx-xxxx-86c6-a1902359xxxx" }
Example Responses
None
Status Codes
|
Status Code |
Description |
|---|---|
|
204 |
The instance is modified successfully. |
Error Codes
See Error Codes.
Last Article: Deleting an Instance
Next Article: Batch Restarting or Deleting Instances
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.