Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Scalable File Service Turbo
Containers
Cloud Container Engine
Software Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Modifying Instance Specifications

Function

This API is used to modify specifications of a DCS instance in the Running state.

Calling Method

For details, see Calling APIs.

URI

POST /v2/{project_id}/instances/{instance_id}/resize

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

instance_id

Yes

String

Instance ID.

project_id

Yes

String

Project ID. For details, see Obtaining a Project ID.

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

spec_code

Yes

String

Flavor after the modification. The query method is as follows:

new_capacity

Yes

Integer

New memory size of the DCS instance, in GB.

For a single-node or master/standby DCS Redis 4.0 or later instance, the value can be 0.125, 0.25, 0.5, 1, 2, 4, 8, 16, 32, or 64. For a cluster instance, the value can be 4, 8, 16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, or 1024. For a read/write splitting instance, the value can be 8, 16, 32, or 64.

For a single-node or master/standby DCS Memcached instance, the value can be 2, 4, 8, 16, 32, or 64.

Currently, the specifications of a Proxy Cluster DCS Redis 3.0 instance cannot be reduced. In addition to integers, 0.125, 0.25, and 0.5 are also supported.

bss_param

No

BssParamEntity object

This parameter does not need to be set for pay-per-use instances.

reserved_ip

No

Array of strings

IP addresses to retain. Mandatory during cluster scale-in. If this parameter is not set, the system randomly deletes unnecessary shards.

change_type

No

String

Modification type. Mandatory when the number of replicas of a DCS Redis 4.0 or 5.0 instance is modified.

  • createReplication: adding replicas

  • deleteReplication: deleting replicas

  • addSharding: adding shards

  • instanceType: changing the instance type. Currently, you can change a master/standby or read/write splitting DCS Redis 4.0 or 5.0 instance to the Proxy Cluster type, or from Proxy Cluster to master/standby or read/write splitting..

available_zones

No

Array of strings

Code of the AZ where each replica is in. This parameter is mandatory when you add replicas to a DCS Redis 4.0 or 5.0 instance. Before specifying an AZ, ensure that there are available resources in it. This parameter is mandatory when you delete replicas from a cluster instance.

For details, see Querying AZs.

node_list

No

Array of strings

ID of the replica to delete. This parameter is mandatory when you delete replicas of a master/standby or read/write splitting DCS Redis 4.0 or 5.0 instance. Currently, only one replica can be deleted at a time.

For details, see Querying Details of Shards and Replicas.

execute_immediately

No

Boolean

Whether to apply the change immediately. The default value is true.

  • true: Apply the change immediately.

  • false: Apply the change during the maintenance window. Specification changes can be applied during the maintenance window only in some scenarios. For details, see Modifying Specifications.

Table 3 BssParamEntity

Parameter

Mandatory

Type

Description

is_auto_pay

No

String

Indicates whether fees are deducted automatically from the account balance. Non-automatic payment is used by default.

Value range:

  • true: Fees are automatically deducted from the account balance.

  • false: The order must be paid manually. This is the default value.

Note:

If this parameter is set to true, fees will be automatically deleted from the account balance. To use cash coupons, set this parameter to false and go to the Billing Center to make the payment.

If this parameter is set to false, go to Billing Center > Orders to pay for the order after modifying specifications or creating an instance. Otherwise, the order is always pending payment and the instance modification or creation is not considered successful.

Response Parameters

None

Example Requests

Changing instance specifications to 1 GB.

POST https://{dcs_endpoint}/v2/{project_id}/instances/{instance_id}/resize

{
  "spec_code" : "redis.ha.xu1.tiny.r2.1",
  "new_capacity" : 1,
  "reserved_ip" : [ "192.168.0.125" ],
  "change_type" : "createReplication",
  "available_zones" : [ "e7afd64502d64fe3bfb60c2c82ec0ec6", "d90ff6d692954373bf53be49cf3900cb" ],
  "node_list" : [ "ff80808282eee5f90183120188ae093e" ],
  "execute_immediately" : true
}

Example Responses

None

SDK Sample Code

The SDK sample code is as follows.

Changing instance specifications to 1 GB.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
package com.huaweicloud.sdk.test;

import com.huaweicloud.sdk.core.auth.ICredential;
import com.huaweicloud.sdk.core.auth.BasicCredentials;
import com.huaweicloud.sdk.core.exception.ConnectionException;
import com.huaweicloud.sdk.core.exception.RequestTimeoutException;
import com.huaweicloud.sdk.core.exception.ServiceResponseException;
import com.huaweicloud.sdk.dcs.v2.region.DcsRegion;
import com.huaweicloud.sdk.dcs.v2.*;
import com.huaweicloud.sdk.dcs.v2.model.*;

import java.util.List;
import java.util.ArrayList;

public class ResizeInstanceSolution {

    public static void main(String[] args) {
        // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
        // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
        String ak = System.getenv("CLOUD_SDK_AK");
        String sk = System.getenv("CLOUD_SDK_SK");
        String projectId = "{project_id}";

        ICredential auth = new BasicCredentials()
                .withProjectId(projectId)
                .withAk(ak)
                .withSk(sk);

        DcsClient client = DcsClient.newBuilder()
                .withCredential(auth)
                .withRegion(DcsRegion.valueOf("<YOUR REGION>"))
                .build();
        ResizeInstanceRequest request = new ResizeInstanceRequest();
        request.withInstanceId("{instance_id}");
        ResizeInstanceBody body = new ResizeInstanceBody();
        List<String> listbodyNodeList = new ArrayList<>();
        listbodyNodeList.add("ff80808282eee5f90183120188ae093e");
        List<String> listbodyAvailableZones = new ArrayList<>();
        listbodyAvailableZones.add("e7afd64502d64fe3bfb60c2c82ec0ec6");
        listbodyAvailableZones.add("d90ff6d692954373bf53be49cf3900cb");
        List<String> listbodyReservedIp = new ArrayList<>();
        listbodyReservedIp.add("192.168.0.125");
        body.withExecuteImmediately(true);
        body.withNodeList(listbodyNodeList);
        body.withAvailableZones(listbodyAvailableZones);
        body.withChangeType(ResizeInstanceBody.ChangeTypeEnum.fromValue("createReplication"));
        body.withReservedIp(listbodyReservedIp);
        body.withNewCapacity(1);
        body.withSpecCode("redis.ha.xu1.tiny.r2.1");
        request.withBody(body);
        try {
            ResizeInstanceResponse response = client.resizeInstance(request);
            System.out.println(response.toString());
        } catch (ConnectionException e) {
            e.printStackTrace();
        } catch (RequestTimeoutException e) {
            e.printStackTrace();
        } catch (ServiceResponseException e) {
            e.printStackTrace();
            System.out.println(e.getHttpStatusCode());
            System.out.println(e.getRequestId());
            System.out.println(e.getErrorCode());
            System.out.println(e.getErrorMsg());
        }
    }
}

Changing instance specifications to 1 GB.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# coding: utf-8

import os
from huaweicloudsdkcore.auth.credentials import BasicCredentials
from huaweicloudsdkdcs.v2.region.dcs_region import DcsRegion
from huaweicloudsdkcore.exceptions import exceptions
from huaweicloudsdkdcs.v2 import *

if __name__ == "__main__":
    # The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
    # In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
    ak = os.environ["CLOUD_SDK_AK"]
    sk = os.environ["CLOUD_SDK_SK"]
    projectId = "{project_id}"

    credentials = BasicCredentials(ak, sk, projectId)

    client = DcsClient.new_builder() \
        .with_credentials(credentials) \
        .with_region(DcsRegion.value_of("<YOUR REGION>")) \
        .build()

    try:
        request = ResizeInstanceRequest()
        request.instance_id = "{instance_id}"
        listNodeListbody = [
            "ff80808282eee5f90183120188ae093e"
        ]
        listAvailableZonesbody = [
            "e7afd64502d64fe3bfb60c2c82ec0ec6",
            "d90ff6d692954373bf53be49cf3900cb"
        ]
        listReservedIpbody = [
            "192.168.0.125"
        ]
        request.body = ResizeInstanceBody(
            execute_immediately=True,
            node_list=listNodeListbody,
            available_zones=listAvailableZonesbody,
            change_type="createReplication",
            reserved_ip=listReservedIpbody,
            new_capacity=1,
            spec_code="redis.ha.xu1.tiny.r2.1"
        )
        response = client.resize_instance(request)
        print(response)
    except exceptions.ClientRequestException as e:
        print(e.status_code)
        print(e.request_id)
        print(e.error_code)
        print(e.error_msg)

Changing instance specifications to 1 GB.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
package main

import (
	"fmt"
	"github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic"
    dcs "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/dcs/v2"
	"github.com/huaweicloud/huaweicloud-sdk-go-v3/services/dcs/v2/model"
    region "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/dcs/v2/region"
)

func main() {
    // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
    // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
    ak := os.Getenv("CLOUD_SDK_AK")
    sk := os.Getenv("CLOUD_SDK_SK")
    projectId := "{project_id}"

    auth := basic.NewCredentialsBuilder().
        WithAk(ak).
        WithSk(sk).
        WithProjectId(projectId).
        Build()

    client := dcs.NewDcsClient(
        dcs.DcsClientBuilder().
            WithRegion(region.ValueOf("<YOUR REGION>")).
            WithCredential(auth).
            Build())

    request := &model.ResizeInstanceRequest{}
	request.InstanceId = "{instance_id}"
	var listNodeListbody = []string{
        "ff80808282eee5f90183120188ae093e",
    }
	var listAvailableZonesbody = []string{
        "e7afd64502d64fe3bfb60c2c82ec0ec6",
	    "d90ff6d692954373bf53be49cf3900cb",
    }
	var listReservedIpbody = []string{
        "192.168.0.125",
    }
	executeImmediatelyResizeInstanceBody:= true
	changeTypeResizeInstanceBody:= model.GetResizeInstanceBodyChangeTypeEnum().CREATE_REPLICATION
	request.Body = &model.ResizeInstanceBody{
		ExecuteImmediately: &executeImmediatelyResizeInstanceBody,
		NodeList: &listNodeListbody,
		AvailableZones: &listAvailableZonesbody,
		ChangeType: &changeTypeResizeInstanceBody,
		ReservedIp: &listReservedIpbody,
		NewCapacity: int32(1),
		SpecCode: "redis.ha.xu1.tiny.r2.1",
	}
	response, err := client.ResizeInstance(request)
	if err == nil {
        fmt.Printf("%+v\n", response)
    } else {
        fmt.Println(err)
    }
}

For SDK sample code of more programming languages, see the Sample Code tab in API Explorer. SDK sample code can be automatically generated.

Changing instance specifications to 1 GB.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
package com.huaweicloud.sdk.test;

import com.huaweicloud.sdk.core.auth.ICredential;
import com.huaweicloud.sdk.core.auth.BasicCredentials;
import com.huaweicloud.sdk.core.exception.ConnectionException;
import com.huaweicloud.sdk.core.exception.RequestTimeoutException;
import com.huaweicloud.sdk.core.exception.ServiceResponseException;
import com.huaweicloud.sdk.dcs.v2.region.DcsRegion;
import com.huaweicloud.sdk.dcs.v2.*;
import com.huaweicloud.sdk.dcs.v2.model.*;

import java.util.List;
import java.util.ArrayList;

public class ResizeInstanceSolution {

    public static void main(String[] args) {
        // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
        // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
        String ak = System.getenv("CLOUD_SDK_AK");
        String sk = System.getenv("CLOUD_SDK_SK");
        String projectId = "{project_id}";

        ICredential auth = new BasicCredentials()
                .withProjectId(projectId)
                .withAk(ak)
                .withSk(sk);

        DcsClient client = DcsClient.newBuilder()
                .withCredential(auth)
                .withRegion(DcsRegion.valueOf("<YOUR REGION>"))
                .build();
        ResizeInstanceRequest request = new ResizeInstanceRequest();
        request.withInstanceId("{instance_id}");
        ResizeInstanceBody body = new ResizeInstanceBody();
        List<String> listbodyNodeList = new ArrayList<>();
        listbodyNodeList.add("ff80808282eee5f90183120188ae093e");
        List<String> listbodyAvailableZones = new ArrayList<>();
        listbodyAvailableZones.add("e7afd64502d64fe3bfb60c2c82ec0ec6");
        listbodyAvailableZones.add("d90ff6d692954373bf53be49cf3900cb");
        List<String> listbodyReservedIp = new ArrayList<>();
        listbodyReservedIp.add("192.168.0.125");
        body.withExecuteImmediately(true);
        body.withNodeList(listbodyNodeList);
        body.withAvailableZones(listbodyAvailableZones);
        body.withChangeType(ResizeInstanceBody.ChangeTypeEnum.fromValue("createReplication"));
        body.withReservedIp(listbodyReservedIp);
        body.withNewCapacity(1);
        body.withSpecCode("redis.ha.xu1.tiny.r2.1");
        request.withBody(body);
        try {
            ResizeInstanceResponse response = client.resizeInstance(request);
            System.out.println(response.toString());
        } catch (ConnectionException e) {
            e.printStackTrace();
        } catch (RequestTimeoutException e) {
            e.printStackTrace();
        } catch (ServiceResponseException e) {
            e.printStackTrace();
            System.out.println(e.getHttpStatusCode());
            System.out.println(e.getRequestId());
            System.out.println(e.getErrorCode());
            System.out.println(e.getErrorMsg());
        }
    }
}

Changing instance specifications to 1 GB.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# coding: utf-8

import os
from huaweicloudsdkcore.auth.credentials import BasicCredentials
from huaweicloudsdkdcs.v2.region.dcs_region import DcsRegion
from huaweicloudsdkcore.exceptions import exceptions
from huaweicloudsdkdcs.v2 import *

if __name__ == "__main__":
    # The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
    # In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
    ak = os.environ["CLOUD_SDK_AK"]
    sk = os.environ["CLOUD_SDK_SK"]
    projectId = "{project_id}"

    credentials = BasicCredentials(ak, sk, projectId)

    client = DcsClient.new_builder() \
        .with_credentials(credentials) \
        .with_region(DcsRegion.value_of("<YOUR REGION>")) \
        .build()

    try:
        request = ResizeInstanceRequest()
        request.instance_id = "{instance_id}"
        listNodeListbody = [
            "ff80808282eee5f90183120188ae093e"
        ]
        listAvailableZonesbody = [
            "e7afd64502d64fe3bfb60c2c82ec0ec6",
            "d90ff6d692954373bf53be49cf3900cb"
        ]
        listReservedIpbody = [
            "192.168.0.125"
        ]
        request.body = ResizeInstanceBody(
            execute_immediately=True,
            node_list=listNodeListbody,
            available_zones=listAvailableZonesbody,
            change_type="createReplication",
            reserved_ip=listReservedIpbody,
            new_capacity=1,
            spec_code="redis.ha.xu1.tiny.r2.1"
        )
        response = client.resize_instance(request)
        print(response)
    except exceptions.ClientRequestException as e:
        print(e.status_code)
        print(e.request_id)
        print(e.error_code)
        print(e.error_msg)

Changing instance specifications to 1 GB.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
package main

import (
	"fmt"
	"github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic"
    dcs "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/dcs/v2"
	"github.com/huaweicloud/huaweicloud-sdk-go-v3/services/dcs/v2/model"
    region "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/dcs/v2/region"
)

func main() {
    // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
    // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
    ak := os.Getenv("CLOUD_SDK_AK")
    sk := os.Getenv("CLOUD_SDK_SK")
    projectId := "{project_id}"

    auth := basic.NewCredentialsBuilder().
        WithAk(ak).
        WithSk(sk).
        WithProjectId(projectId).
        Build()

    client := dcs.NewDcsClient(
        dcs.DcsClientBuilder().
            WithRegion(region.ValueOf("<YOUR REGION>")).
            WithCredential(auth).
            Build())

    request := &model.ResizeInstanceRequest{}
	request.InstanceId = "{instance_id}"
	var listNodeListbody = []string{
        "ff80808282eee5f90183120188ae093e",
    }
	var listAvailableZonesbody = []string{
        "e7afd64502d64fe3bfb60c2c82ec0ec6",
	    "d90ff6d692954373bf53be49cf3900cb",
    }
	var listReservedIpbody = []string{
        "192.168.0.125",
    }
	executeImmediatelyResizeInstanceBody:= true
	changeTypeResizeInstanceBody:= model.GetResizeInstanceBodyChangeTypeEnum().CREATE_REPLICATION
	request.Body = &model.ResizeInstanceBody{
		ExecuteImmediately: &executeImmediatelyResizeInstanceBody,
		NodeList: &listNodeListbody,
		AvailableZones: &listAvailableZonesbody,
		ChangeType: &changeTypeResizeInstanceBody,
		ReservedIp: &listReservedIpbody,
		NewCapacity: int32(1),
		SpecCode: "redis.ha.xu1.tiny.r2.1",
	}
	response, err := client.ResizeInstance(request)
	if err == nil {
        fmt.Printf("%+v\n", response)
    } else {
        fmt.Println(err)
    }
}

For SDK sample code of more programming languages, see the Sample Code tab in API Explorer. SDK sample code can be automatically generated.

Status Codes

Status Code

Description

204

DCS instance specifications modified successfully.

Error Codes

See Error Codes.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback