Help Center> Distributed Cache Service> API Reference> Lifecycle Management APIs> Modifying Information About a DCS Instance

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.
Table 1 Parameter description

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.
Table 2 Parameter description

Parameter

Type

Mandatory

Description

name

String

No

DCS instance name.

An instance name is a string that contains letters, digits, underscores (_), and hyphens (-) and starts with a letter.

When you create only one instance at a time, the value of this parameter must be a string consisting of 4 to 64 characters. When you create more than one instance at a time, the value of this parameter must be a string consisting of 4 to 56 characters. These instances are named in the format of "name-n", in which n starts from 000 and is incremented by 1. For example, if you create two instances and set name to dcs_demo, the two instances are respectively named as dcs_demo-000 and dcs_demo-001.

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

JSON

No

Backup policy.

This parameter is available for master/standby and cluster DCS instances. For details, see Table 4 and Table 5.

maintain_begin

String

No

Time at which the maintenance time window starts.

Format: HH:mm:ss.

  • The start time and end time of the maintenance time window must indicate the time segment of a supported maintenance time window. For details on how to query the time segments of supported maintenance time windows, see Querying Maintenance Time Window (Unavailable Soon).
  • 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.
  • Parameters maintain_begin and maintain_end must be set in pairs. If parameter maintain_begin is left blank, parameter maintain_end is also blank.

maintain_end

String

No

Time at which the maintenance time window ends.

Format: HH:mm:ss.

  • The start time and end time of the maintenance time window must indicate the time segment of a supported maintenance time window. For details on how to query the time segments of supported maintenance time windows, see Querying Maintenance Time Window (Unavailable Soon).
  • 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.
  • Parameters maintain_begin and maintain_end must be set in pairs. If parameter maintain_end is left blank, parameter maintain_start is also blank.

security_group_id

String

No

Security group ID.

The value can be obtained from the VPC console or the API.

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.

Table 3 Status code

Status Code

Description

204

DCS instance modified successfully.