Modifying Information About a DCS Instance¶
Function¶
This API is used to modify the information about a DCS instance, including the instance name, description, backup policy, start and end time of the maintenance window, and security group.
URI¶
PUT /v1.0/{project_id}/instances/{instance_id}
Table 1 describes the parameters.
Parameter | Type | Mandatory | Description |
---|---|---|---|
project_id | String | Yes | Project ID. |
instance_id | String | Yes | DCS instance ID. |
Request¶
Request parameters
Table 2 describes the request parameters.
Parameter | Type | Mandatory | Description |
---|---|---|---|
name | String | No | DCS instance name. An instance name can contain 4 to 64 characters, including letters, digits, underscores (_), and hyphens (-), and must start with a letter. |
description | String | No | Brief description of the DCS instance. A brief description supports up to 1024 characters. Note "\" is defined as an escape character in the queue description. If you need to enter a backward slash (\) or a double quotation mark (") in the queue description, enter \\ or \". |
instance_backup_policy | Object | No | Backup policy. This parameter is available for master/standby and cluster DCS instances. For details, see Table 3 and Table 4. |
maintain_begin | String | No | Time at which the maintenance time window starts. Format: hh:mm:ss.
|
maintain_end | String | No | Time at which the maintenance time window ends. Format: hh:mm:ss.
|
security_group_id | String | No | Security group ID. The value can be obtained from the VPC console or the API. This parameter is supported only by DCS Redis 3.0 instances. |
Example request
Request URL:
PUT https://{dcs_endpoint}/v1.0/{project_id}/instances/{instance_id}
Example 1
{ "description": "instance description" }
Example 2
{ "name": "dcs002", "description": "instance description", "instance_backup_policy": { "backup_type": "auto", "save_days": 1, "periodical_backup_plan": { "begin_at": "00:00-01:00", "period_type": "weekly", "backup_at": [ "1", "2", "3", "4", "6", "7" ] } }, "security_group_id": "18e9309f-f81a-4749-bb21-f74576292162", "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 Table 1.
Status Code | Description |
---|---|
204 | DCS instance modified successfully. |