Dedicated CDS Cluster
Updated at:2025-10-20
Create a dedicated CDS cluster
You can create a dedicated CDS cluster with the following code:
Go
1args := &CreateVolumeClusterArgs{
2 // Create a dedicated CDS cluster. Modifying this parameter can create multiple clusters simultaneously
3 PurchaseCount: 1,
4 // Cluster size, with a minimum supported capacity of 85 TB (87,040 GB) and a maximum supported capacity of 1,015 TB (1,039,360 GB), with a purchase step size of 10 TB
5 ClusterSizeInGB: 97280,
6 // Cluster name
7 ClusterName: "dbsc",
8 // Cluster disk type: General-purpose HDD, General-purpose SSD
9 StorageType: StorageTypeHdd,
10 Billing: &Billing{
11 // Only prepay is supported
12 Reservation: &Reservation{
13 // Purchase period
14 ReservationLength: 6,
15 ReservationTimeUnit: "MONTH",
16 },
17 },
18 // Auto-renewal period
19 RenewTimeUnit: "MONTH",
20 RenewTime: 6,
21}
22result, err := DBSC_CLIENT.CreateVolumeCluster(args)
23if err != nil {
24 fmt.Println(err)
25}
26clusterId := result.ClusterIds[0]
27fmt.Print(clusterId)
List of dedicated CDS clusters
You can query a batch of dedicated CDS clusters based on their cluster IDs with the following code:
Go
1args := &ListVolumeClusterArgs{
2}
3result, err := DBSC_CLIENT.ListVolumeCluster(args)
4if err != nil {
5 fmt.Println(err)
6}
7fmt.Println(result)
Details of dedicated CDS cluster
You can query a batch of dedicated CDS clusters based on their cluster IDs with the following code:
Go
1clusterId := "clusterId"
2result, err := DBSC_CLIENT.GetVolumeClusterDetail(clusterId)
3if err != nil {
4 fmt.Println(err)
5}
6fmt.Println(result)
Expansion of dedicated CDS cluster
You can expand a dedicated CDS cluster with the following code:
Go
1clusterId := "clusterId"
2args := &ResizeVolumeClusterArgs{
3 NewClusterSizeInGB int `json:"newClusterSizeInGB"`
4}
5err := DBSC_CLIENT.ResizeVolumeCluster(clusterId, args)
6if err != nil {
7 fmt.Println(err)
8}
Renewal of dedicated CDS cluster
You can renew a dedicated CDS cluster with the following code:
Go
1args := &PurchaseReservedVolumeClusterArgs{
2 Billing: &Billing{
3 Reservation: &Reservation{
4 // Renewal period
5 ReservationLength: 6,
6 ReservationTimeUnit: "MONTH",
7 },
8 },
9}
10clusterId := "clusterId"
11err := DBSC_CLIENT.PurchaseReservedVolumeCluster(clusterId, args)
12if err != nil {
13 fmt.Println(err)
14}
Auto-renewal of dedicated CDS cluster
You can set auto-renewal of a dedicated CDS cluster with the following code:
Go
1clusterId := "clusterId"
2args := &AutoRenewVolumeClusterArgs{
3 ClusterId: clusterId,
4 RenewTime: 6,
5 RenewTimeUnit: "month",
6}
7err := DBSC_CLIENT.AutoRenewVolumeCluster(args)
8if err != nil {
9 fmt.Println(err)
10}
Disable auto-renewal of dedicated CDS cluster
You can disable the auto-renewal of a dedicated CDS cluster with the following code:
Go
1clusterId := "clusterId"
2args := &CancelAutoRenewVolumeClusterArgs{
3 ClusterId: clusterId,
4}
5err := DBSC_CLIENT.CancelAutoRenewVolumeCluster(args)
6if err != nil {
7 fmt.Println(err)
8}
