Updated on 2026-11-03 GMT+08:00

Modifying an Instance

This API is out-of-date and may not be maintained in the future. Please use the API described in Modifying Instance Information.

Function

This API is used to modify the instance information, including the instance name, description, maintenance window, and security group.

URI

PUT /v1.0/{project_id}/instances/{instance_id}

Table 1 Parameters

Parameter

Type

Mandatory

Description

project_id

String

Yes

Indicates the ID of a project.

instance_id

String

Yes

Indicates the instance ID.

Request

Request parameters

Table 2 describes the parameters.

Table 2 Request parameters

Parameter

Type

Mandatory

Description

name

String

No

Indicates the instance name.

An instance name consists of 4 to 64 characters including letters, digits, and hyphens (-) and must start with a letter.

description

String

No

Indicates the description of an instance.

The value can contain up to 1024 characters.

NOTE:

The backslash (\) and quotation mark (") are special characters for JSON packets. When using these characters in a parameter value, add the escape character (\) before these characters, for example, \\ and \".

maintain_begin

String

No

Indicates the time at which a maintenance time window starts.

Format: HH:mm:ss

  • The start time and end time must indicate a supported maintenance time window. For details, see Querying Maintenance Time Windows.
  • The start time must be set to 22:00:00, 02:00:00, 06:00:00, 10:00:00, 14:00:00, or 18:00:00.
  • This parameter and the end time must be set in pairs. If this parameter is left blank, the end time is also blank. In this case, the system automatically uses the default start time 02:00:00.

maintain_end

String

No

Indicates the time at which a maintenance time window ends.

Format: HH:mm:ss

  • The start time and end time must indicate a supported maintenance time window. For details, see Querying Maintenance Time Windows.
  • The end time is four hours later than the start time. For example, if the start time is 22:00:00, the end time is 02:00:00.
  • This parameter and the start time must be set in pairs. If this parameter is left blank, the start time is also blank. In this case, the system automatically uses the default end time 06:00:00.

security_group_id

String

No

Indicates the security group ID.

retention_policy

String

No

Indicates the capacity threshold policy. Options:

  • produce_reject: New messages cannot be created.
  • time_base: The earliest messages are deleted.

enterprise_project_id

String

No

Indicates the enterprise project ID.

Example request

Example 1:

PUT https://{dms_endpoint}/v1.0/{project_id}/instances/{instance_id}
{  
    "name": "dms002",  
    "description": "instance description"  
} 

Example 2:

PUT https://{dms_endpoint}/v1.0/{project_id}/instances/{instance_id}
{ 
     "name": "dms002",   
     "description": "instance description", 
     "maintain_begin":"02:00:00", 
     "maintain_end":"06:00:00" 
}

Response

Response parameters

None.

Example response

None.

Status Code

Table 3 describes the status code of successful operations. For details about other status codes, see Status Code.

Table 3 Status code

Status Code

Description

204

The instance is modified.