百度智能云

All Product Document

          Relational Database Service

          Other Interfaces

          Other Interfaces

          Get backup list

          Use the following codes to get the backup list under an instance.

          // import "github.com/baidubce/bce-sdk-go/services/rds"
          args := &rds.GetBackupListArgs{}
          _, err := client.GetBackupList(instanceId, args)
          if err != nil {
              fmt.Printf("get backup list error: %+v\n", err)
              return
          }
          fmt.Printf("get backup list success\n")

          Note:

          • The request parameters marker and maxKeys are not required.

          Get the list of available zones

          Use the following codes to get the list of available zones.

          // import "github.com/baidubce/bce-sdk-go/services/rds"
          err = client.GetZoneList()
          if err != nil {
              fmt.Printf("get zone list error: %+v\n", err)
              return
          }
          fmt.Printf("get zone list success\n")
          fmt.Println("rds instanceId: ", result.InstanceId)

          Get the list of subnets

          Use the following codes to get the subnet list under an instance.

          // import "github.com/baidubce/bce-sdk-go/services/rds"
          args := &rds.ListSubnetsArgs{}
          _, err := client.ListSubnets(args)
          if err != nil {
              fmt.Printf("get subnet list error: %+v\n", err)
              return
          }
          fmt.Printf("get subnet list success\n")

          Note:

          • The request parameters vpcId and zoneName are not required.
          Previous
          Primary Interfaces
          Next
          Repository