ddcrds

package
v0.9.193 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 10, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

ddc.go - the ddc APIs definition supported by the DDC service

Index

Constants

View Source
const (
	DEFAULT_ENDPOINT                = "ddc.su.baidubce.com"
	DDC_NOT_SUPPORTED               = "DDC does not support this feature."
	RDS_NOT_SUPPORTED               = "RDS does not support this feature."
	URI_PREFIX                      = bce.URI_PREFIX + "v1/ddc"
	URI_PREFIX_V2                   = bce.URI_PREFIX + "v2/ddc"
	REQUEST_DDC_INSTANCE_URL        = "/instance"
	REQUEST_DDC_POOL_URL            = "/pool"
	REQUEST_DDC_HOST_URL            = "/host"
	REQUEST_DDC_TASK_URL            = "/task"
	REQUEST_DDC_DEPLOY_URL          = "/deploy"
	REQUEST_DDC_DATABASE_URL        = "/database"
	REQUEST_DDC_TABLE_URL           = "/table"
	REQUEST_DDC_HARDLINK_URL        = "/link"
	REQUEST_DDC_ACCOUNT_URL         = "/account"
	REQUEST_DDC_ROGROUP_URL         = "/roGroup"
	REQUEST_DDC_RECYCLER_URL        = "/recycler"
	REQUEST_DDC_SECURITYGROUP_URL   = "/security"
	REQUEST_DDC_LOG_URL             = "/logs"
	REQUEST_DDC_UPDATE_ACTION       = "/update"
	REQUEST_DDC_MAINTAINTIME_URL    = "/maintenTimeInfo"
	REQUEST_UPDATE_MAINTAINTIME_URL = "/updateMaintenTime"
)
View Source
const (
	KEY_CLIENT_TOKEN = "clientToken"
	KEY_MARKER       = "marker"
	KEY_MAX_KEYS     = "maxKeys"
	COMMA            = ","
)
View Source
const (
	STANDARD  string = "Standard"
	SINGLETON string = "Singleton"
)

Variables

This section is empty.

Functions

func DDCNotSupportError

func DDCNotSupportError() error

func Int added in v0.9.52

func Int(value string) *int

Int int point helper

func Json added in v0.9.52

func Json(v interface{}) string

func RDSNotSupportError

func RDSNotSupportError() error

Types

type AccessDetailArgs added in v0.9.143

type AccessDetailArgs struct {
	StartDateTime string `json:"startDateTime"`
	EndDateTime   string `json:"endDateTime"`
	Marker        string `json:"marker,omitempty"`
	MaxKeys       int    `json:"maxKeys,omitempty"`
	DataType      string `json:"dataType,omitempty"`
}

type AccessDetailItem added in v0.9.143

type AccessDetailItem struct {
	BackupID             string `json:"backupID"`
	AccessDateTime       string `json:"accessDateTime"`
	AccessResult         string `json:"accessResult"`
	AccessSrcAddressType string `json:"accessSrcAddressType"`
	AvailableZone        string `json:"availableZone"`
	AccessSrcAddress     string `json:"accessSrcAddress"`
	AccessOperationType  string `json:"accessOperationType"`
	StorageType          string `json:"storageType"`
	StorageAddress       string `json:"storageAddress"`
	Region               string `json:"region"`
	BackupName           string `json:"backupName"`
	AccessSrcAgent       string `json:"accessSrcAgent"`
	StorageID            string `json:"storageID"`
}

type AccessLog added in v0.9.84

type AccessLog struct {
	Downloadurl struct {
		Bbc   string `json:"bbc"`
		Bos   string `json:"bos"`
		Mysql string `json:"mysql"`
	} `json:"downloadurl"`
}

type Account

type Account struct {
	AccountName        string              `json:"accountName"`
	Desc               string              `json:"remark"`
	Status             string              `json:"accountStatus"`
	AccountType        string              `json:"accountType"`
	DatabasePrivileges []DatabasePrivilege `json:"databasePrivileges"`
}

type AccountPrivilege

type AccountPrivilege struct {
	AccountName string   `json:"accountName"`
	AuthType    AuthType `json:"authType"`
}

type AccountResult

type AccountResult struct {
	Account Account `json:"account"`
}

type AccountType

type AccountType string

Account

const (
	AccountType_Super  AccountType = "rdssuper"
	AccountType_Common AccountType = "common"
)

type AuthType

type AuthType string
const (
	AuthType_ReadOnly  AuthType = "readOnly"
	AuthType_ReadWrite AuthType = "readWrite"
)

type AutoRenewArgs

type AutoRenewArgs struct {
	InstanceIds       []string `json:"instanceIds"`
	AutoRenewTimeUnit string   `json:"autoRenewTimeUnit"`
	AutoRenewTime     int      `json:"autoRenewTime"`
}

type AutoRenewRule added in v0.9.84

type AutoRenewRule struct {
	RenewTime     int    `json:"renewTime"`
	RenewTimeUnit string `json:"renewTimeUnit"`
}

type BackupAccessDetail added in v0.9.143

type BackupAccessDetail struct {
	StartDateTime       string             `json:"startDateTime"`
	EndDateTime         string             `json:"endDateTime"`
	DataType            string             `json:"dataType"`
	BackupAccessDetails []AccessDetailItem `json:"backupAccessDetails"`
	Pagination          Pagination         `json:"pagination"`
}

type BackupDetailResult

type BackupDetailResult struct {
	Snapshot SnapshotModel `json:"snapshot"`
}

type BackupPolicy

type BackupPolicy struct {
	BackupDays      string `json:"backupDays"`
	BackupTime      string `json:"backupTime"`
	Persistent      bool   `json:"persistent"`
	ExpireInDaysStr string `json:"expireInDaysStr"`
	FreeSpaceInGB   int    `json:"freeSpaceInGb"`

	ExpireInDaysInt int `json:"expireInDays"`
}

type BatchInstanceIds added in v0.9.48

type BatchInstanceIds struct {
	InstanceIds string `json:"instanceIds"`
}

type Billing

type Billing struct {
	PaymentTiming string      `json:"paymentTiming"`
	Reservation   Reservation `json:"reservation,omitempty"`
}

type Binlog

type Binlog struct {
	BinlogId          string `json:"binlogId"`
	BinlogSizeInBytes int64  `json:"binlogSizeInBytes"`
	BinlogStatus      string `json:"binlogStatus"`
	BinlogStartTime   string `json:"binlogStartTime"`
	BinlogEndTime     string `json:"binlogEndTime"`
}

type BinlogDetailResult

type BinlogDetailResult struct {
	Binlog BinlogModel `json:"binlog"`
}

type BinlogListResult

type BinlogListResult struct {
	Binlogs []Binlog `json:"binlogs"`
}

type BinlogModel

type BinlogModel struct {
	BinlogId          string `json:"binlogId"`
	BinlogSizeInBytes int64  `json:"binlogSizeInBytes"`
	BinlogStatus      string `json:"binlogStatus"`
	BinlogStartTime   string `json:"binlogStartTime"`
	BinlogEndTime     string `json:"binlogEndTime"`
	DownloadUrl       string `json:"downloadUrl"`
	DownloadExpires   string `json:"downloadExpires"`
}

type CapacityOfZone added in v0.9.60

type CapacityOfZone struct {
	Single int `json:"single"`
	Slave  int `json:"slave"`
	HA     int `json:"HA"`
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client of DDC service is a kind of BceClient, so derived from BceClient

func NewClient

func NewClient(ak, sk, endPoint string) (*Client, error)

内部创建rds和ddc两个client

func (*Client) AutoRenew

func (c *Client) AutoRenew(args *AutoRenewArgs, productType string) error

autoRenew - create autoRenew

PARAMS:

  • Args: *autoRenewArgs

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) BindSecurityGroups added in v0.9.48

func (c *Client) BindSecurityGroups(args *SecurityGroupArgs) error

BindSecurityGroups - bind SecurityGroup to instances

PARAMS:

  • args: http request body

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) BinlogAccessDetail added in v0.9.143

func (c *Client) BinlogAccessDetail(args *AccessDetailArgs) (*BackupAccessDetail, error)

BinlogAccessDetail - get snapshot access detail

PARAMS:

  • args: the arguments to get snapshot access detail

RETURNS:

  • *AccessDetail
  • error: nil if success otherwise the specific error

func (*Client) CancelMaintainTask added in v0.9.83

func (c *Client) CancelMaintainTask(taskId string) error

CancelMaintainTask - cancel maintain task

PARAMS:

  • taskId: id of the task

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) Config added in v0.9.45

func (c *Client) Config(config *bce.BceClientConfiguration)

func (*Client) ConfigConnectionTimeoutInMillis added in v0.9.45

func (c *Client) ConfigConnectionTimeoutInMillis(millis int)

func (*Client) ConfigCredentials added in v0.9.45

func (c *Client) ConfigCredentials(credentials *auth.BceCredentials)

func (*Client) ConfigEndpoint added in v0.9.45

func (c *Client) ConfigEndpoint(endPoint string)

func (*Client) ConfigProxyUrl added in v0.9.45

func (c *Client) ConfigProxyUrl(proxyUrl string)

func (*Client) ConfigRegion added in v0.9.45

func (c *Client) ConfigRegion(region string)

func (*Client) ConfigRetry added in v0.9.45

func (c *Client) ConfigRetry(policy bce.RetryPolicy)

func (*Client) ConfigSignOption added in v0.9.45

func (c *Client) ConfigSignOption(option *auth.SignOptions)

func (*Client) ConfigSignOptionExpireSeconds added in v0.9.45

func (c *Client) ConfigSignOptionExpireSeconds(seconds int)

func (*Client) ConfigSignOptionHeadersToSign added in v0.9.45

func (c *Client) ConfigSignOptionHeadersToSign(header map[string]struct{})

func (*Client) CreateAccount

func (c *Client) CreateAccount(instanceId string, args *CreateAccountArgs) error

CreateAccount - create a account with the specific parameters

PARAMS:

  • instanceId: the specific instanceId
  • args: the arguments to create a account

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) CreateBackup

func (c *Client) CreateBackup(instanceId string) error

CreateBackup - create backup of the instance

PARAMS:

  • instanceId: the id of the instance

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) CreateDatabase

func (c *Client) CreateDatabase(instanceId string, args *CreateDatabaseArgs) error

CreateDatabase - create a database with the specific parameters

PARAMS:

  • instanceId: the specific instanceId
  • args: the arguments to create a account

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) CreateDeploySet

func (c *Client) CreateDeploySet(poolId string, args *CreateDeployRequest) (*CreateDeployResult, error)

CreateDeploySet - create a deploy set

PARAMS:

  • body: http request body

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) CreateHotBackup added in v0.9.166

func (c *Client) CreateHotBackup(args *CreateHotBackupArgs) (*CreateResult, error)

CreateHotBackup - create a hotBackup ddc with the specific parameters

PARAMS:

  • args: the arguments to create a hotBackup ddc

RETURNS:

  • *InstanceIds: the result of create a hotBackup ddc, contains the hotBackup DDC's instanceIds
  • error: nil if success otherwise the specific error

func (*Client) CreateRds

func (c *Client) CreateRds(args *CreateRdsArgs, productType string) (*CreateResult, error)

CreateInstance - create a Instance with the specific parameters

PARAMS:

  • args: the arguments to create a instance

RETURNS:

  • *InstanceIds: the result of create RDS, contains new RDS's instanceIds
  • error: nil if success otherwise the specific error

func (*Client) CreateRdsProxy

func (c *Client) CreateRdsProxy(args *CreateRdsProxyArgs) (*CreateResult, error)

CreateRdsProxy - create a proxy RDS with the specific parameters

PARAMS:

  • args: the arguments to create a readReplica rds

RETURNS:

  • *InstanceIds: the result of create a readReplica RDS, contains the readReplica RDS's instanceIds
  • error: nil if success otherwise the specific error

func (*Client) CreateReadReplica

func (c *Client) CreateReadReplica(args *CreateReadReplicaArgs) (*CreateResult, error)

CreateReadReplica - create a readReplica RDS with the specific parameters

PARAMS:

  • args: the arguments to create a readReplica rds

RETURNS:

  • *InstanceIds: the result of create a readReplica RDS, contains the readReplica RDS's instanceIds
  • error: nil if success otherwise the specific error

func (*Client) DeleteAccount

func (c *Client) DeleteAccount(instanceId, accountName string) error

DeleteAccount - delete an account of a RDS instance

PARAMS:

  • instanceIds: the specific instanceIds
  • accountName: the specific account's name

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) DeleteDatabase

func (c *Client) DeleteDatabase(instanceId, dbName string) error

DeleteDatabase - delete an database of a DDC instance

PARAMS:

  • instanceIds: the specific instanceIds
  • dbName: the specific database's name

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) DeleteDeploySet

func (c *Client) DeleteDeploySet(poolId string, deploySetId string) error

DeleteDeploySet - delete a deploy set

PARAMS:

  • poolId: the id of the pool
  • deploySetId: the id of the deploy set
  • clientToken: idempotent token, an ASCII string no longer than 64 bits

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) DeleteRds

func (c *Client) DeleteRds(instanceIds string) error

DeleteRds - delete instances

PARAMS:

  • instanceIds: id of the instance

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) DeleteRecyclerInstances added in v0.9.48

func (c *Client) DeleteRecyclerInstances(instanceIds []string) error

DeleteRecyclerInstances - batch delete instances that in recycler

PARAMS:

  • instanceIds: instanceId list to delete

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) ExecuteMaintainTaskImmediately added in v0.9.83

func (c *Client) ExecuteMaintainTaskImmediately(taskId string) error

ExecuteMaintainTaskImmediately - execute maintain task immediately

PARAMS:

  • taskId: id of the task

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) GetAccessLog added in v0.9.84

func (c *Client) GetAccessLog(date string) (*AccessLog, error)

GetAccessLog - get access logs's download info by date

PARAMS: RETURNS:

  • *AccessLog: the access logs's download info
  • error: nil if success otherwise the specific error

func (*Client) GetAccount

func (c *Client) GetAccount(instanceId, accountName string) (*Account, error)

GetAccount - get an account of a RDS instance with the specific parameters

PARAMS:

  • instanceId: the specific rds Instance's ID
  • accountName: the specific account's name

RETURNS:

  • *Account: the account's meta
  • error: nil if success otherwise the specific error

func (*Client) GetBackupDetail

func (c *Client) GetBackupDetail(instanceId string, snapshotId string) (*BackupDetailResult, error)

GetBackupDetail - get details of the instance'Backup

PARAMS:

  • instanceId: the id of the instance
  • snapshotId: the id of the backup

RETURNS:

  • *BackupDetailResult: the detail of the backup
  • error: nil if success otherwise the specific error

func (*Client) GetBackupList

func (c *Client) GetBackupList(instanceId string, args *GetBackupListArgs) (*GetBackupListResult, error)

GetBackupList - get backup list of the instance

PARAMS:

  • cli: the client agent which can perform sending request
  • instanceId: id of the instance

RETURNS:

  • *GetBackupListResult: result of the backup list
  • error: nil if success otherwise the specific error

func (*Client) GetBinlogDetail

func (c *Client) GetBinlogDetail(instanceId string, binlog string) (*BinlogDetailResult, error)

GetBinlogDetail - get details of the instance'Binlog

PARAMS:

  • instanceId: the id of the instance
  • binlog: the id of the binlog

RETURNS:

  • *BinlogDetailResult: the detail of the binlog
  • error: nil if success otherwise the specific error

func (*Client) GetBinlogList

func (c *Client) GetBinlogList(instanceId string, datetime string) (*BinlogListResult, error)

GetBinlogList - get backup list of the instance

PARAMS:

  • instanceId: id of the instance

RETURNS:

  • *BinlogListResult: result of the backup list
  • error: nil if success otherwise the specific error

func (*Client) GetDatabase

func (c *Client) GetDatabase(instanceId, dbName string) (*Database, error)

GetDatabase - get an database of a DDC instance with the specific parameters

PARAMS:

  • instanceId: the specific rds Instance's ID
  • dbName: the specific database's name

RETURNS:

  • *Database: the database's meta
  • error: nil if success otherwise the specific error

func (*Client) GetDatabaseDiskUsage added in v0.9.72

func (c *Client) GetDatabaseDiskUsage(instanceId, dbName string) (*DatabaseDiskUsageResult, error)

GetDatabaseDiskUsage - get the disk footprint and the remaining space for database

PARAMS:

  • instanceId: the specific ddc Instance's ID

RETURNS:

  • *ListDatabaseResult: the disk footprint and the remaining space for database
  • error: nil if success otherwise the specific error

func (*Client) GetDeploySet

func (c *Client) GetDeploySet(poolId string, deploySetId string) (*DeploySet, error)

GetDeploySet - get details of the deploy set

PARAMS:

  • poolId: the id of the pool
  • cli: the client agent which can perform sending request
  • deploySetId: the id of the deploy set

RETURNS:

  • *DeploySet: the detail of the deploy set
  • error: nil if success otherwise the specific error

func (*Client) GetDetail

func (c *Client) GetDetail(instanceId string) (*Instance, error)

GetDetail - get a specific ddc Instance's detail

PARAMS:

  • instanceId: the specific ddc Instance's ID

RETURNS:

  • *Instance: the specific ddc Instance's detail
  • error: nil if success otherwise the specific error

func (*Client) GetDisk added in v0.9.57

func (c *Client) GetDisk(instanceId string) (*Disk, error)

GetDisk - get disk detail of instance

PARAMS:

  • instanceId: id of instance

RETURNS:

  • *Disk:disk of instance
  • error: nil if success otherwise the specific error

func (*Client) GetErrorLogs added in v0.9.86

func (c *Client) GetErrorLogs(args *GetErrorLogsArgs) (*ErrorLogsResponse, error)

GetErrorLogs - get error logs

PARAMS: RETURNS:

  • *ErrorLogsResponse: the error logs
  • error: nil if success otherwise the specific error

func (*Client) GetFlavorCapacity added in v0.9.60

func (c *Client) GetFlavorCapacity(poolId string, args *GetFlavorCapacityArgs) (*GetFlavorCapacityResult, error)

GetFlavorCapacity - get flavor capacity of pool

PARAMS:

  • poolId: id of pool
  • args: request params

RETURNS:

  • *GetResidualResult:get flavor capacity of pool
  • error: nil if success otherwise the specific error

func (*Client) GetInstanceBackupStatus added in v0.9.108

func (c *Client) GetInstanceBackupStatus(instanceId string) (*GetBackupStatusResponse, error)

GetInstanceBackupStatus - get instance backup status and backup start time

PARAMS: RETURNS:

  • *GetBackupStatusResponse: the response of backup status
  • error: nil if success otherwise the specific error

func (*Client) GetInstanceSyncDelay added in v0.9.127

func (c *Client) GetInstanceSyncDelay(instanceId string) (*InstanceSyncDelayResponse, error)

GetInstanceSyncDelay - get readonly instance syncDelay and syncStatus.

PARAMS:

  • instanceId: id of the instance

RETURNS:

  • *InstanceSyncDelayResponse: the response of syncDelay
  • error: nil if success otherwise the specific error

func (*Client) GetKillSessionTask added in v0.9.78

func (c *Client) GetKillSessionTask(instanceId string, taskId int) (*GetKillSessionTaskResult, error)

GetKillSessionTask - get kill session tasks by taskId

PARAMS:

  • instanceId: the specific instanceId of ddc
  • taskId: kill session returned id

RETURNS:

  • *GetKillSessionTaskResult: the response of kill session task
  • error: nil if success otherwise the specific error

func (*Client) GetLogById added in v0.9.50

func (c *Client) GetLogById(instanceId, logId string, args *GetLogArgs) (*LogDetail, error)

GetLogById - list log's detail of instance

PARAMS:

  • instanceId: id of instance

RETURNS:

  • *Log:log's detail of instance
  • error: nil if success otherwise the specific error

func (*Client) GetMachineInfo added in v0.9.110

func (c *Client) GetMachineInfo(instanceId string) (*MachineInfo, error)

GetMachineInfo - get machine detail of instance

PARAMS:

  • instanceId: id of instance

RETURNS:

  • *MachineInfo:info of machine resource
  • error: nil if success otherwise the specific error

func (*Client) GetMaintainTaskDetail added in v0.9.94

func (c *Client) GetMaintainTaskDetail(taskIds string) (*MaintainTaskDetailList, error)

GetTaskDetail - get maintain task detail by taskId

PARAMS: RETURNS:

  • *MaintainTaskDetailList: the response of maintain task detail
  • error: nil if success otherwise the specific error

func (*Client) GetMaintainTaskList added in v0.9.83

func (c *Client) GetMaintainTaskList(args *GetMaintainTaskListArgs) (*ListMaintainTaskResult, error)

GetMaintainTaskList - get maintain tasks by taskId

PARAMS: RETURNS:

  • *ListMaintainTaskResult: the response of maintain tasks
  • error: nil if success otherwise the specific error

func (*Client) GetMaintainTime added in v0.9.45

func (c *Client) GetMaintainTime(instanceId string) (*MaintainTime, error)

GetMaintenTime - get details of the maintenTime

PARAMS:

  • poolId: the id of the pool
  • cli: the client agent which can perform sending request
  • deploySetId: the id of the deploy set

RETURNS:

  • *DeploySet: the detail of the deploy set
  • error: nil if success otherwise the specific error

func (*Client) GetRecoverableDateTime added in v0.9.72

func (c *Client) GetRecoverableDateTime(instanceId string) (*GetRecoverableDateTimeResult, error)

GetRecoverableDateTime - get a list of recoverable times

PARAMS:

  • instanceId: the specific ddc Instance's ID

RETURNS:

  • *GetRecoverableDateTimeResult: the result of list all recoverable datetimes
  • error: nil if success otherwise the specific error

func (*Client) GetResidual added in v0.9.60

func (c *Client) GetResidual(poolId string) (*GetResidualResult, error)

GetResidual - get residual of pool

PARAMS:

  • poolId: id of pool
  • zoneName: the zone name

RETURNS:

  • *GetResidualResult:residual of pool
  • error: nil if success otherwise the specific error

func (*Client) GetSecurityIps

func (c *Client) GetSecurityIps(instanceId string) (*GetSecurityIpsResult, error)

GetSecurityIps - get all SecurityIps

PARAMS:

  • instanceId: the specific rds Instance's ID

RETURNS:

  • *GetSecurityIpsResult: all security IP
  • error: nil if success otherwise the specific error

func (*Client) GetSlowLogs added in v0.9.86

func (c *Client) GetSlowLogs(args *GetSlowLogsArgs) (*SlowLogsResponse, error)

GetSlowLogs - get slow logs

PARAMS: RETURNS:

  • *SlowLogsResponse: the slow logs
  • error: nil if success otherwise the specific error

func (*Client) GetTableAmount added in v0.9.72

func (c *Client) GetTableAmount(args *GetTableAmountArgs) (*TableAmountResult, error)

GetTableAmount - query amount of tables

PARAMS:

  • args: the specific ddc instanceId, dbName and search pattern

RETURNS:

  • *TableAmountResult: the size of the table that meets the criteria
  • error: nil if success otherwise the specific error

func (*Client) GetZoneList

func (c *Client) GetZoneList(productType string) (*GetZoneListResult, error)

GetZoneList - list all zone

PARAMS:

  • cli: the client agent which can perform sending request

RETURNS:

  • *GetZoneListResult: result of the zone list
  • error: nil if success otherwise the specific error

func (*Client) InstanceSyncDelayReplication added in v0.9.127

func (c *Client) InstanceSyncDelayReplication(instanceId string, args *InstanceSyncDelayReplicationArg) (*InstanceSyncDelayReplicationResponse, error)

InstanceSyncDelayReplication - start or stop readonly instance syncDelay.

PARAMS:

  • instanceId: id of the instance

RETURNS:

  • *InstanceSyncDelayReplicationResponse: the response of success
  • error: nil if success otherwise the specific error

func (*Client) InstanceVersionRollBack added in v0.9.121

func (c *Client) InstanceVersionRollBack(instanceId string, args *InstanceVersionRollBackArg) (*MaintainTaskIdResult, error)

InstanceVersionRollBack - rollback instance version from 5.7 to 5.6

PARAMS:

  • instanceId: id of the instance
  • args: the arguments to set WaitSwitch

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) InstanceVersionUpgrade added in v0.9.121

func (c *Client) InstanceVersionUpgrade(instanceId string, args *InstanceVersionUpgradeArg) (*MaintainTaskIdResult, error)

InstanceVersionUpgrade - upgrade instance version from 5.6 to 5.7

PARAMS:

  • instanceId: id of the instance
  • args: the arguments to set IsUpgradeNow

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) KillSession added in v0.9.78

func (c *Client) KillSession(instanceId string, args *KillSessionArgs) (*KillSessionResult, error)

KillSession - start kill session tasks

PARAMS:

  • instanceId: id of the instance
  • args: instance role and sessionIds

RETURNS:

  • *KillSessionResult: the response of kill session task id
  • error: nil if success otherwise the specific error
func (c *Client) LazyDropCreateHardLink(instanceId, dbName, tableName string) error

LazyDropCreateHardLink - create a hard link for specified large table

PARAMS:

  • instanceId: id of instance
  • dbName: name of database
  • tableName: name of table

RETURNS:

  • error: nil if success otherwise the specific error
func (c *Client) LazyDropDeleteHardLink(instanceId, dbName, tableName string) (*MaintainTaskIdResult, error)

LazyDropDeleteHardLink - delete the hard link for specified large table

PARAMS:

  • instanceId: id of instance
  • dbName: name of database
  • tableName: name of table

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) ListAccount

func (c *Client) ListAccount(instanceId string) (*ListAccountResult, error)

ListAccount - list all account of a RDS instance with the specific parameters

PARAMS:

  • instanceId: the specific rds Instance's ID

RETURNS:

  • *ListAccountResult: the result of list all account, contains all accounts' meta
  • error: nil if success otherwise the specific error

func (*Client) ListDatabase

func (c *Client) ListDatabase(instanceId string) (*ListDatabaseResult, error)

ListDatabase - list all database of a DDC instance with the specific parameters

PARAMS:

  • instanceId: the specific ddc Instance's ID

RETURNS:

  • *ListDatabaseResult: the result of list all database, contains all databases' meta
  • error: nil if success otherwise the specific error

func (*Client) ListDeploySets

func (c *Client) ListDeploySets(poolId string, marker *Marker) (*ListDeploySetResult, error)

ListDeploySets - list all deploy sets RETURNS:

  • *ListResultWithMarker: the result of list deploy sets with marker
  • error: nil if success otherwise the specific error

func (*Client) ListLogByInstanceId added in v0.9.50

func (c *Client) ListLogByInstanceId(instanceId string, args *ListLogArgs) (*[]Log, error)

ListLogByInstanceId - list error or slow logs of instance

PARAMS:

  • instanceId: id of instance

RETURNS:

  • *[]Log:logs of instance
  • error: nil if success otherwise the specific error

func (*Client) ListPage added in v0.9.69

func (c *Client) ListPage(args *ListPageArgs) (*ListPageResult, error)

ListPage - list all instances with page RETURNS:

  • *ListRdsResult: the result of list instances with page
  • error: nil if success otherwise the specific error

func (*Client) ListParameters

func (c *Client) ListParameters(instanceId string) (*ListParametersResult, error)

ListParameters - list all parameters of a RDS instance

PARAMS:

  • instanceId: the specific rds Instance's ID

RETURNS:

  • *ListParametersResult: the result of list all parameters
  • error: nil if success otherwise the specific error

func (*Client) ListPool added in v0.9.53

func (c *Client) ListPool(marker *Marker, productType string) (*ListPoolResult, error)

ListPool - list current pools RETURNS:

  • *ListResultWithMarker: the result of list hosts with marker
  • error: nil if success otherwise the specific error

func (*Client) ListRds

func (c *Client) ListRds(marker *ListRdsArgs) (*ListRdsResult, error)

ListRds - list all instances RETURNS:

  • *ListRdsResult: the result of list instances with marker
  • error: nil if success otherwise the specific error

func (*Client) ListRecycleInstances added in v0.9.48

func (c *Client) ListRecycleInstances(marker *Marker, productType string) (*RecyclerInstanceList, error)

ListRecycleInstances - list all instances in recycler with marker

PARAMS:

  • marker: marker page

RETURNS:

  • *RecyclerInstanceList: the result of instances in recycler
  • error: nil if success otherwise the specific error

func (*Client) ListRoGroup

func (c *Client) ListRoGroup(instanceId string) (*ListRoGroupResult, error)

ListRoGroup - list all roGroups of a DDC instance with the specific parameters

PARAMS:

  • instanceId: the specific rds Instance's ID

RETURNS:

  • *ListRoGroupResult: All roGroups of the current instance
  • error: nil if success otherwise the specific error

func (*Client) ListSecurityGroupByInstanceId added in v0.9.48

func (c *Client) ListSecurityGroupByInstanceId(instanceId string) (*ListSecurityGroupResult, error)

ListSecurityGroupByInstanceId - list security groups by instance id

PARAMS:

  • instanceId: id of instance

RETURNS:

  • *ListSecurityGroupResult: list secrity groups result of instance
  • error: nil if success otherwise the specific error

func (*Client) ListSecurityGroupByVpcId added in v0.9.48

func (c *Client) ListSecurityGroupByVpcId(vpcId string) (*[]SecurityGroup, error)

ListSecurityGroupByVpcId - list security groups by vpc id

PARAMS:

  • vpcId: id of vpc

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) ListSubnets

func (c *Client) ListSubnets(args *ListSubnetsArgs, productType string) (*ListSubnetsResult, error)

ListsSubnet - list all Subnets

PARAMS:

  • cli: the client agent which can perform sending request
  • args: the arguments to list all subnets, not necessary

RETURNS:

  • *ListSubnetsResult: result of the subnet list
  • error: nil if success otherwise the specific error

func (*Client) ListVpc

func (c *Client) ListVpc(productType string) (*[]VpcVo, error)

ListVpc - list all Vpc

PARAMS: RETURNS:

  • *ListVpc: All vpc of
  • error: nil if success otherwise the specific error

func (*Client) ModifyBackupPolicy

func (c *Client) ModifyBackupPolicy(instanceId string, args *BackupPolicy) error

ModifyBackupPolicy - update backupPolicy

PARAMS:

  • instanceId: the specific rds Instance's ID
  • Args: the specific rds Instance's BackupPolicy

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) ModifyEndpoint

func (c *Client) ModifyEndpoint(instanceId string, args *ModifyEndpointArgs) error

ModifyEndpoint - modify the prefix of endpoint

PARAMS:

  • cli: the client agent which can perform sending request
  • instanceId: id of the instance
  • args: the arguments to modify endpoint

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) ModifyPublicAccess

func (c *Client) ModifyPublicAccess(instanceId string, args *ModifyPublicAccessArgs) error

ModifyPublicAccess - modify public access

PARAMS:

  • cli: the client agent which can perform sending request
  • instanceId: id of the instance
  • args: the arguments to modify public access

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) ModifySyncMode

func (c *Client) ModifySyncMode(instanceId string, args *ModifySyncModeArgs) error

UpdateSyncMode - update sync mode of a specified instance

PARAMS:

  • cli: the client agent which can perform sending request
  • instanceId: id of the instance
  • args: the arguments to update syncMode

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) ReBalanceRoGroup added in v0.9.45

func (c *Client) ReBalanceRoGroup(roGroupId, productType string) error

ReBalanceRoGroup- Initiate a rebalance for foGroup

PARAMS:

  • body: http request body

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) RebootInstance

func (c *Client) RebootInstance(instanceId string) error

RebootInstance - reboot a specified instance

PARAMS:

  • cli: the client agent which can perform sending request
  • instanceId: id of the instance to be rebooted

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) RebootInstanceWithArgs added in v0.9.45

func (c *Client) RebootInstanceWithArgs(instanceId string, args *RebootArgs) (*MaintainTaskIdResult, error)

RebootInstance - reboot a specified instance

PARAMS:

  • cli: the client agent which can perform sending request
  • instanceId: id of the instance to be rebooted
  • args: reboot args

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) RecoverRecyclerInstances added in v0.9.48

func (c *Client) RecoverRecyclerInstances(instanceIds []string) (*OrderIdResponse, error)

RecoverRecyclerInstances - batch recover instances that in recycler

PARAMS:

  • instanceIds: instanceId list to recover

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) RecoverToSourceInstanceByDatetime added in v0.9.72

func (c *Client) RecoverToSourceInstanceByDatetime(instanceId string, args *RecoverInstanceArgs) (*MaintainTaskIdResult, error)

RecoverToSourceInstanceByDatetime - recover database or tables for the specific instance by a datetime

PARAMS:

  • instanceId: the specific ddc Instance's ID
  • args: recover instance args

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) ReplaceSecurityGroups added in v0.9.48

func (c *Client) ReplaceSecurityGroups(args *SecurityGroupArgs) error

ReplaceSecurityGroups - replace SecurityGroup to instances

PARAMS:

  • args: http request body

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) ResizeRds

func (c *Client) ResizeRds(instanceId string, args *ResizeRdsArgs) (*OrderIdResponse, error)

ResizeRds - resize an RDS with the specific parameters

PARAMS:

  • instanceId: the specific instanceId
  • args: the arguments to resize an RDS

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) SnapshotAccessDetail added in v0.9.143

func (c *Client) SnapshotAccessDetail(args *AccessDetailArgs) (*BackupAccessDetail, error)

SnapshotAccessDetail - get snapshot access detail

PARAMS:

  • args: the arguments to get snapshot access detail

RETURNS:

  • *AccessDetail
  • error: nil if success otherwise the specific error

func (*Client) SwitchInstance

func (c *Client) SwitchInstance(instanceId string, args *SwitchArgs) (*ProducedMaintainTaskResult, error)

SwitchInstance - main standby switching of the instance

PARAMS:

  • instanceId: the id of the instance

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) UnBindSecurityGroups added in v0.9.48

func (c *Client) UnBindSecurityGroups(args *SecurityGroupArgs) error

UnBindSecurityGroups - unbind SecurityGroup to instances

PARAMS:

  • args: http request body

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) UpdateAccountDesc

func (c *Client) UpdateAccountDesc(instanceId string, accountName string, args *UpdateAccountDescArgs) error

UpdateAccountDesc - update a account desc with the specific parameters

PARAMS:

  • instanceId: the specific instanceId
  • accountName: the specific accountName
  • args: the arguments to update a account remark

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) UpdateAccountPassword

func (c *Client) UpdateAccountPassword(instanceId string, accountName string, args *UpdateAccountPasswordArgs) error

UpdateAccountPassword - update a account password with the specific parameters

PARAMS:

  • instanceId: the specific instanceId
  • accountName: the specific accountName
  • args: the arguments to update a account password

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) UpdateAccountPrivileges

func (c *Client) UpdateAccountPrivileges(instanceId string, accountName string, args *UpdateAccountPrivilegesArgs) error

UpdateAccountPrivileges - update a account privileges with the specific parameters

PARAMS:

  • instanceId: the specific instanceId
  • accountName: the specific accountName
  • args: the arguments to update a account privileges

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) UpdateDatabaseRemark

func (c *Client) UpdateDatabaseRemark(instanceId string, dbName string, args *UpdateDatabaseRemarkArgs) error

UpdateDatabaseRemark - update a database remark with the specific parameters

PARAMS:

  • instanceId: the specific instanceId
  • dbName: the specific accountName
  • args: the arguments to update a database remark

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) UpdateDeploySet added in v0.9.45

func (c *Client) UpdateDeploySet(poolId, deployId string, args *UpdateDeployRequest) error

UpdateDeploySet - create a deploy set

PARAMS:

  • body: http request body

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) UpdateInstanceName

func (c *Client) UpdateInstanceName(instanceId string, args *UpdateInstanceNameArgs) error

UpdateInstanceName - update name of a specified instance

PARAMS:

  • cli: the client agent which can perform sending request
  • instanceId: id of the instance
  • args: the arguments to update instanceName

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) UpdateMaintainTime added in v0.9.45

func (c *Client) UpdateMaintainTime(instanceId string, args *MaintainTime) error

UpdateMaintenTime - update UpdateMaintenTime of instance

PARAMS:

  • body: http request body

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) UpdateParameter

func (c *Client) UpdateParameter(instanceId, Etag string, args *UpdateParameterArgs) (*ProducedMaintainTaskResult, error)

UpdateParameter - update Parameter

PARAMS:

  • instanceId: the specific rds Instance's ID
  • Etag: get latest etag by ListParameters
  • Args: *UpdateParameterArgs

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) UpdateRoGroup added in v0.9.45

func (c *Client) UpdateRoGroup(roGroupId string, args *UpdateRoGroupArgs, productType string) error

UpdateRoGroup - update a roGroup

PARAMS:

  • body: http request body

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) UpdateRoGroupReplicaWeight added in v0.9.45

func (c *Client) UpdateRoGroupReplicaWeight(roGroupId string, args *UpdateRoGroupWeightArgs, productType string) error

UpdateRoGroupReplicaWeight- update repica weight in roGroup

PARAMS:

  • body: http request body

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) UpdateSecurityIps

func (c *Client) UpdateSecurityIps(instanceId, Etag string, args *UpdateSecurityIpsArgs) error

UpdateSecurityIps - update SecurityIps

PARAMS:

  • instanceId: the specific rds Instance's ID
  • Etag: get latest etag by GetSecurityIps
  • Args: all SecurityIps

RETURNS:

  • error: nil if success otherwise the specific error

type CloneInitialDataReference added in v0.9.187

type CloneInitialDataReference struct {
	InstanceId    string `json:"instanceId"`
	ReferenceType string `json:"referenceType"`
	SnapshotId    string `json:"snapshotId"`
	Datetime      string `json:"datetime"`
}

type Container

type Container struct {
	ContainerID string `json:"containerId"`
	DeployID    string `json:"deployId"`
	DeployName  string `json:"deployName"`
	Engine      string `json:"engine"`
	HostID      string `json:"hostId"`
	HostName    string `json:"hostName"`
	PoolName    string `json:"poolName"`
	Role        string `json:"role"`
	Zone        string `json:"zone"`
}

type CreateAccountArgs

type CreateAccountArgs struct {
	ClientToken string `json:"-"`
	AccountName string `json:"accountName"`
	Password    string `json:"password"`
	// 为了兼容 RDS 参数结构
	AccountType        AccountType         `json:"type"`
	Desc               string              `json:"remark"`
	DatabasePrivileges []DatabasePrivilege `json:"databasePrivileges,omitempty"`
}

type CreateDatabaseArgs

type CreateDatabaseArgs struct {
	ClientToken      string `json:"-"`
	DbName           string `json:"dbName"`
	CharacterSetName string `json:"characterSetName"`
	Remark           string `json:"remark"`
}

type CreateDeployRequest

type CreateDeployRequest struct {
	ClientToken         string `json:"-"`
	DeployName          string `json:"deployName"`
	Strategy            string `json:"strategy"`
	CentralizeThreshold int    `json:"centralizeThreshold"`
}

type CreateDeployResult added in v0.9.45

type CreateDeployResult struct {
	DeployID string `json:"deployId"`
}

type CreateHotBackupArgs added in v0.9.166

type CreateHotBackupArgs struct {
	ClientToken       string      `json:"-"`
	Billing           Billing     `json:"billing,omitempty"`
	PurchaseCount     int         `json:"purchaseCount,omitempty"`
	SourceInstanceId  string      `json:"sourceInstanceId"`
	InstanceName      string      `json:"instanceName,omitempty"`
	CpuCount          int         `json:"cpuCount,omitempty"`
	MemoryCapacity    float64     `json:"memoryCapacity,omitempty"`
	VolumeCapacity    int         `json:"volumeCapacity,omitempty"`
	ZoneNames         []string    `json:"zoneNames,omitempty"`
	VpcId             string      `json:"vpcId,omitempty"`
	IsDirectPay       bool        `json:"isDirectPay,omitempty"`
	Subnets           []SubnetMap `json:"subnets,omitempty"`
	Tags              []TagModel  `json:"tags,omitempty"`
	DeployId          string      `json:"deployId,omitempty"`
	PoolId            string      `json:"poolId,omitempty"`
	AutoRenewTimeUnit string      `json:"autoRenewTimeUnit,omitempty"`
	AutoRenewTime     int         `json:"autoRenewTime,omitempty"`
}

type CreateInstance

type CreateInstance struct {
	InstanceId           string                    `json:"instanceId,omitempty"`
	InstanceName         string                    `json:"instanceName,omitempty"`
	SourceInstanceId     string                    `json:"sourceInstanceId,omitempty"`
	Engine               string                    `json:"engine,omitempty"`
	EngineVersion        string                    `json:"engineVersion,omitempty"`
	CpuCount             int                       `json:"cpuCount,omitempty"`
	AllocatedMemoryInGB  int                       `json:"allocatedMemoryInGB,omitempty"`
	AllocatedStorageInGB int                       `json:"allocatedStorageInGB,omitempty"`
	AZone                string                    `json:"azone,omitempty"`
	VpcId                string                    `json:"vpcId,omitempty"`
	SubnetId             string                    `json:"subnetId,omitempty"`
	DiskIoType           string                    `json:"diskIoType,omitempty"`
	DeployId             string                    `json:"deployId,omitempty"`
	PoolId               string                    `json:"poolId,omitempty"`
	RoGroupId            string                    `json:"roGroupId,omitempty"`
	IsBalanceRoLoad      Integer                   `json:"isBalanceRoLoad,omitempty"`
	EnableDelayOff       Integer                   `json:"enableDelayOff,omitempty"`
	DelayThreshold       Integer                   `json:"delayThreshold,omitempty"`
	LeastInstanceAmount  Integer                   `json:"leastInstanceAmount,omitempty"`
	RoGroupWeight        Integer                   `json:"roGroupWeight,omitempty"`
	IsDirectPay          bool                      `json:"IsDirectPay,omitempty"`
	Billing              Billing                   `json:"billing,omitempty"`
	AutoRenewTimeUnit    string                    `json:"autoRenewTimeUnit,omitempty"`
	AutoRenewTime        int                       `json:"autoRenewTime,omitempty"`
	Category             string                    `json:"category,omitempty"`
	Tags                 []TagModel                `json:"tags,omitempty"`
	SyncMode             string                    `json:"syncMode,omitempty"`
	Remark               string                    `json:"remark,omitempty"`
	InitialDataReference CloneInitialDataReference `json:"initialDataReference,omitempty"`
}

type CreateInstanceArgs

type CreateInstanceArgs struct {
	ClientToken  string         `json:"-"`
	InstanceType string         `json:"instanceType,omitempty"`
	Number       int            `json:"number,omitempty"`
	Instance     CreateInstance `json:"instance,omitempty"`
}

type CreateRdsArgs

type CreateRdsArgs struct {
	ClientToken          string                    `json:"-"`
	Billing              Billing                   `json:"billing,omitempty"`
	PurchaseCount        int                       `json:"purchaseCount,omitempty"`
	InstanceName         string                    `json:"instanceName,omitempty"`
	Engine               string                    `json:"engine,omitempty"`
	EngineVersion        string                    `json:"engineVersion,omitempty"`
	Category             string                    `json:"category,omitempty"`
	CpuCount             int                       `json:"cpuCount,omitempty"`
	MemoryCapacity       float64                   `json:"memoryCapacity,omitempty"`
	VolumeCapacity       int                       `json:"volumeCapacity,omitempty"`
	ZoneNames            []string                  `json:"zoneNames,omitempty"`
	VpcId                string                    `json:"vpcId,omitempty"`
	IsDirectPay          bool                      `json:"isDirectPay,omitempty"`
	Subnets              []SubnetMap               `json:"subnets,omitempty"`
	Tags                 []TagModel                `json:"tags,omitempty"`
	AutoRenewTimeUnit    string                    `json:"autoRenewTimeUnit,omitempty"`
	AutoRenewTime        int                       `json:"autoRenewTime,omitempty"`
	DeployId             string                    `json:"deployId,omitempty"`
	PoolId               string                    `json:"poolId"`
	SyncMode             string                    `json:"syncMode"`
	InitialDataReference CloneInitialDataReference `json:"initialDataReference,omitempty"`
}

type CreateRdsProxyArgs

type CreateRdsProxyArgs struct {
	ClientToken      string      `json:"-"`
	Billing          Billing     `json:"billing"`
	SourceInstanceId string      `json:"sourceInstanceId"`
	InstanceName     string      `json:"instanceName,omitempty"`
	NodeAmount       int         `json:"nodeAmount"`
	ZoneNames        []string    `json:"zoneNames,omitempty"`
	VpcId            string      `json:"vpcId,omitempty"`
	IsDirectPay      bool        `json:"isDirectPay,omitempty"`
	Subnets          []SubnetMap `json:"subnets,omitempty"`
	Tags             []TagModel  `json:"tags,omitempty"`
}

type CreateReadReplicaArgs

type CreateReadReplicaArgs struct {
	ClientToken         string      `json:"-"`
	Billing             Billing     `json:"billing,omitempty"`
	PurchaseCount       int         `json:"purchaseCount,omitempty"`
	SourceInstanceId    string      `json:"sourceInstanceId"`
	InstanceName        string      `json:"instanceName,omitempty"`
	CpuCount            int         `json:"cpuCount,omitempty"`
	MemoryCapacity      float64     `json:"memoryCapacity,omitempty"`
	VolumeCapacity      int         `json:"volumeCapacity,omitempty"`
	ZoneNames           []string    `json:"zoneNames,omitempty"`
	VpcId               string      `json:"vpcId,omitempty"`
	IsDirectPay         bool        `json:"isDirectPay,omitempty"`
	Subnets             []SubnetMap `json:"subnets,omitempty"`
	Tags                []TagModel  `json:"tags,omitempty"`
	DeployId            string      `json:"deployId,omitempty"`
	PoolId              string      `json:"poolId,omitempty"`
	RoGroupId           string      `json:"roGroupId,omitempty"`
	EnableDelayOff      string      `json:"enableDelayOff,omitempty"`
	DelayThreshold      string      `json:"delayThreshold,omitempty"`
	LeastInstanceAmount string      `json:"leastInstanceAmount,omitempty"`
	RoGroupWeight       string      `json:"roGroupWeight,omitempty"`
	AutoRenewTimeUnit   string      `json:"autoRenewTimeUnit,omitempty"`
	AutoRenewTime       int         `json:"autoRenewTime,omitempty"`
}

type CreateResult

type CreateResult struct {
	OrderId     string   `json:"orderId"`
	InstanceIds []string `json:"instanceIds"`
}

type CreateTableHardLinkArgs added in v0.9.50

type CreateTableHardLinkArgs struct {
	TableName string `json:"tableName"`
}

type DDCClient

type DDCClient struct {
	*bce.BceClient
}

Client for DDC service

func NewDDCClient

func NewDDCClient(ak, sk, endPoint string) (*DDCClient, error)

func (*DDCClient) BindSecurityGroups added in v0.9.48

func (c *DDCClient) BindSecurityGroups(args *SecurityGroupArgs) error

BindSecurityGroups - bind SecurityGroup to instances

PARAMS:

  • args: http request body

RETURNS:

  • error: nil if success otherwise the specific error

func (*DDCClient) BinlogAccessDetail added in v0.9.143

func (c *DDCClient) BinlogAccessDetail(args *AccessDetailArgs) (*BackupAccessDetail, error)

BinlogAccessDetail - get snapshot access detail

PARAMS:

  • args: the arguments to get snapshot access detail

RETURNS:

  • *AccessDetail
  • error: nil if success otherwise the specific error

func (*DDCClient) CancelMaintainTask added in v0.9.83

func (c *DDCClient) CancelMaintainTask(taskId string) error

CancelMaintainTask - cancel maintain task

PARAMS:

  • taskId: id of the task

RETURNS:

  • error: nil if success otherwise the specific error

func (*DDCClient) CreateAccount

func (c *DDCClient) CreateAccount(instanceId string, args *CreateAccountArgs) error

CreateAccount - create a account with the specific parameters

PARAMS:

  • instanceId: the specific instanceId
  • args: the arguments to create a account

RETURNS:

  • error: nil if success otherwise the specific error

func (*DDCClient) CreateBackup

func (c *DDCClient) CreateBackup(instanceId string) error

CreateBackup - create backup of the instance

PARAMS:

  • instanceId: the id of the instance

RETURNS:

  • error: nil if success otherwise the specific error

func (*DDCClient) CreateDatabase

func (c *DDCClient) CreateDatabase(instanceId string, args *CreateDatabaseArgs) error

CreateDatabase - create a database with the specific parameters

PARAMS:

  • instanceId: the specific instanceId
  • args: the arguments to create a account

RETURNS:

  • error: nil if success otherwise the specific error

func (*DDCClient) CreateDeploySet

func (c *DDCClient) CreateDeploySet(poolId string, args *CreateDeployRequest) (*CreateDeployResult, error)

CreateDeploySet - create a deploy set

PARAMS:

  • body: http request body

RETURNS:

  • error: nil if success otherwise the specific error

func (*DDCClient) CreateHotBackup added in v0.9.166

func (c *DDCClient) CreateHotBackup(args *CreateHotBackupArgs) (*CreateResult, error)

CreateHotBackup - create a hotBackup ddc with the specific parameters

PARAMS:

  • args: the arguments to create a hotBackup ddc

RETURNS:

  • *InstanceIds: the result of create a hotBackup ddc, contains the hotBackup DDC's instanceIds
  • error: nil if success otherwise the specific error

func (*DDCClient) CreateInstance

func (c *DDCClient) CreateInstance(args *CreateInstanceArgs) (*CreateResult, error)

CreateInstance - create a Instance with the specific parameters

PARAMS:

  • args: the arguments to create a instance

RETURNS:

  • *InstanceIds: the result of create RDS, contains new RDS's instanceIds
  • error: nil if success otherwise the specific error

func (*DDCClient) CreateRds

func (c *DDCClient) CreateRds(args *CreateRdsArgs) (*CreateResult, error)

CreateRds - create a DDC with the specific parameters

PARAMS:

  • args: the arguments to create a ddc

RETURNS:

  • *InstanceIds: the result of create DDC, contains new DDC's instanceIds
  • error: nil if success otherwise the specific error

func (*DDCClient) CreateReadReplica

func (c *DDCClient) CreateReadReplica(args *CreateReadReplicaArgs) (*CreateResult, error)

CreateReadReplica - create a readReplica ddc with the specific parameters

PARAMS:

  • args: the arguments to create a readReplica ddc

RETURNS:

  • *InstanceIds: the result of create a readReplica ddc, contains the readReplica DDC's instanceIds
  • error: nil if success otherwise the specific error

func (*DDCClient) DeleteAccount

func (c *DDCClient) DeleteAccount(instanceId, accountName string) error

DeleteAccount - delete an account of a RDS instance

PARAMS:

  • instanceIds: the specific instanceIds
  • accountName: the specific account's name

RETURNS:

  • error: nil if success otherwise the specific error

func (*DDCClient) DeleteDatabase

func (c *DDCClient) DeleteDatabase(instanceId, dbName string) error

DeleteDatabase - delete an database of a DDC instance

PARAMS:

  • instanceIds: the specific instanceIds
  • dbName: the specific database's name

RETURNS:

  • error: nil if success otherwise the specific error

func (*DDCClient) DeleteDeploySet

func (c *DDCClient) DeleteDeploySet(poolId string, deploySetId string) error

DeleteDeploySet - delete a deploy set

PARAMS:

  • poolId: the id of the pool
  • deploySetId: the id of the deploy set
  • clientToken: idempotent token, an ASCII string no longer than 64 bits

RETURNS:

  • error: nil if success otherwise the specific error

func (*DDCClient) DeleteRds

func (c *DDCClient) DeleteRds(instanceIds string) error

DeleteRds - delete instances

PARAMS:

  • instanceIds: id of the instance

RETURNS:

  • error: nil if success otherwise the specific error

func (*DDCClient) DeleteRecyclerInstances added in v0.9.48

func (c *DDCClient) DeleteRecyclerInstances(instanceIds []string) error

DeleteRecyclerInstances - batch delete instances that in recycler

PARAMS:

  • instanceIds: instanceId list to delete

RETURNS:

  • error: nil if success otherwise the specific error

func (*DDCClient) ExecuteMaintainTaskImmediately added in v0.9.83

func (c *DDCClient) ExecuteMaintainTaskImmediately(taskId string) error

ExecuteMaintainTaskImmediately - execute maintain task immediately

PARAMS:

  • taskId: id of the task

RETURNS:

  • error: nil if success otherwise the specific error

func (*DDCClient) GetAccessLog added in v0.9.84

func (c *DDCClient) GetAccessLog(date string) (*AccessLog, error)

GetAccessLog - get access logs's download info by date

PARAMS: RETURNS:

  • *AccessLog: the access logs's download info
  • error: nil if success otherwise the specific error

func (*DDCClient) GetAccount

func (c *DDCClient) GetAccount(instanceId, accountName string) (*Account, error)

GetAccount - get an account of a DDC instance with the specific parameters

PARAMS:

  • instanceId: the specific rds Instance's ID
  • accountName: the specific account's name

RETURNS:

  • *Account: the account's meta
  • error: nil if success otherwise the specific error

func (*DDCClient) GetBackupDetail

func (c *DDCClient) GetBackupDetail(instanceId string, snapshotId string) (*BackupDetailResult, error)

GetBackupDetail - get details of the instance'Backup

PARAMS:

  • instanceId: the id of the instance
  • snapshotId: the id of the backup

RETURNS:

  • *BackupDetailResult: the detail of the backup
  • error: nil if success otherwise the specific error

func (*DDCClient) GetBackupList

func (c *DDCClient) GetBackupList(instanceId string, args *GetBackupListArgs) (*GetBackupListResult, error)

GetBackupList - get backup list of the instance

PARAMS:

  • instanceId: id of the instance

RETURNS:

  • *GetBackupListResult: result of the backup list
  • error: nil if success otherwise the specific error

func (*DDCClient) GetBinlogDetail

func (c *DDCClient) GetBinlogDetail(instanceId string, binlog string) (*BinlogDetailResult, error)

GetBinlogDetail - get details of the instance'Binlog

PARAMS:

  • instanceId: the id of the instance
  • binlog: the id of the binlog

RETURNS:

  • *BinlogDetailResult: the detail of the binlog
  • error: nil if success otherwise the specific error

func (*DDCClient) GetBinlogList

func (c *DDCClient) GetBinlogList(instanceId string, datetime string) (*BinlogListResult, error)

GetBinlogList - get backup list of the instance

PARAMS:

  • instanceId: id of the instance

RETURNS:

  • *BinlogListResult: result of the backup list
  • error: nil if success otherwise the specific error

func (*DDCClient) GetDatabase

func (c *DDCClient) GetDatabase(instanceId, dbName string) (*Database, error)

GetDatabase - get an database of a DDC instance with the specific parameters

PARAMS:

  • instanceId: the specific rds Instance's ID
  • dbName: the specific database's name

RETURNS:

  • *Database: the database's meta
  • error: nil if success otherwise the specific error

func (*DDCClient) GetDatabaseDiskUsage added in v0.9.72

func (c *DDCClient) GetDatabaseDiskUsage(instanceId, dbName string) (*DatabaseDiskUsageResult, error)

GetDatabaseDiskUsage - get the disk footprint and the remaining space for database

PARAMS:

  • instanceId: the specific ddc Instance's ID

RETURNS:

  • *ListDatabaseResult: the disk footprint and the remaining space for database
  • error: nil if success otherwise the specific error

func (*DDCClient) GetDdcDetail

func (c *DDCClient) GetDdcDetail(instanceId string) (*InstanceModelResult, error)

GetDdcDetail - get details of the instance

PARAMS:

  • instanceId: the id of the instance

RETURNS:

  • *InstanceModelResult: the detail of the instance
  • error: nil if success otherwise the specific error

func (*DDCClient) GetDeploySet

func (c *DDCClient) GetDeploySet(poolId string, deploySetId string) (*DeploySet, error)

GetDeploySet - get details of the deploy set

PARAMS:

  • poolId: the id of the pool
  • cli: the client agent which can perform sending request
  • deploySetId: the id of the deploy set

RETURNS:

  • *DeploySet: the detail of the deploy set
  • error: nil if success otherwise the specific error

func (*DDCClient) GetDetail

func (c *DDCClient) GetDetail(instanceId string) (*Instance, error)

GetDetail - get a specific ddc Instance's detail

PARAMS:

  • instanceId: the specific ddc Instance's ID

RETURNS:

  • *Instance: the specific ddc Instance's detail
  • error: nil if success otherwise the specific error

func (*DDCClient) GetDisk added in v0.9.57

func (c *DDCClient) GetDisk(instanceId string) (*Disk, error)

GetDisk - get disk detail of instance

PARAMS:

  • instanceId: id of instance

RETURNS:

  • *Disk:disk of instance
  • error: nil if success otherwise the specific error

func (*DDCClient) GetErrorLogs added in v0.9.86

func (c *DDCClient) GetErrorLogs(args *GetErrorLogsArgs) (*ErrorLogsResponse, error)

GetErrorLog - get error logs

PARAMS: RETURNS:

  • *ErrorLogsResponse: the error logs
  • error: nil if success otherwise the specific error

func (*DDCClient) GetFlavorCapacity added in v0.9.60

func (c *DDCClient) GetFlavorCapacity(poolId string, args *GetFlavorCapacityArgs) (*GetFlavorCapacityResult, error)

GetFlavorCapacity - get flavor capacity of pool

PARAMS:

  • poolId: id of pool
  • args: request params

RETURNS:

  • *GetResidualResult:get flavor capacity of pool
  • error: nil if success otherwise the specific error

func (*DDCClient) GetInstanceBackupStatus added in v0.9.108

func (c *DDCClient) GetInstanceBackupStatus(instanceId string) (*GetBackupStatusResponse, error)

GetInstanceBackupStatus - get instance backup status and backup start time

PARAMS: RETURNS:

  • *GetBackupStatusResponse: the response of backup status
  • error: nil if success otherwise the specific error

func (*DDCClient) GetInstanceSyncDelay added in v0.9.127

func (c *DDCClient) GetInstanceSyncDelay(instanceId string) (*InstanceSyncDelayResponse, error)

GetInstanceSyncDelay - get readonly instance syncDelay and syncStatus.

PARAMS:

  • instanceId: id of the instance

RETURNS:

  • *InstanceSyncDelayResponse: the response of syncDelay
  • error: nil if success otherwise the specific error

func (*DDCClient) GetKillSessionTask added in v0.9.78

func (c *DDCClient) GetKillSessionTask(instanceId string, taskId int) (*GetKillSessionTaskResult, error)

GetKillSessionTask - get kill session tasks by taskId

PARAMS:

  • instanceId: the specific instanceId of ddc
  • taskId: kill session returned id

RETURNS:

  • *GetKillSessionTaskResult: the response of kill session task
  • error: nil if success otherwise the specific error

func (*DDCClient) GetLogById added in v0.9.50

func (c *DDCClient) GetLogById(instanceId, logId string, args *GetLogArgs) (*LogDetail, error)

GetLogById - get log's detail of instance

PARAMS:

  • instanceId: id of instance

RETURNS:

  • *Log:log's detail of instance
  • error: nil if success otherwise the specific error

func (*DDCClient) GetMachineInfo added in v0.9.110

func (c *DDCClient) GetMachineInfo(instanceId string) (*MachineInfo, error)

GetMachineInfo - get machine info of instance

PARAMS:

  • instanceId: id of instance

RETURNS:

  • *MachineInfo:info of machine resource
  • error: nil if success otherwise the specific error

func (*DDCClient) GetMaintainTaskDetail added in v0.9.94

func (c *DDCClient) GetMaintainTaskDetail(taskIds string) (*MaintainTaskDetailList, error)

GetMaintainTaskDetail - get maintain task detail by taskId

PARAMS: RETURNS:

  • *MaintainTaskDetailList: the response of maintain task detail
  • error: nil if success otherwise the specific error

func (*DDCClient) GetMaintainTaskList added in v0.9.83

func (c *DDCClient) GetMaintainTaskList(args *GetMaintainTaskListArgs) (*ListMaintainTaskResult, error)

GetMaintainTaskList - get maintain tasks by taskId

PARAMS: RETURNS:

  • *ListMaintainTaskResult: the response of maintain tasks
  • error: nil if success otherwise the specific error

func (*DDCClient) GetMaintainTime added in v0.9.45

func (c *DDCClient) GetMaintainTime(instanceId string) (*MaintainTime, error)

GetMaintainTime - get details of the maintainTime

PARAMS:

  • poolId: the id of the pool
  • cli: the client agent which can perform sending request
  • deploySetId: the id of the deploy set

RETURNS:

  • *MaintainTime: the maintainTime of the instance
  • error: nil if success otherwise the specific error

func (*DDCClient) GetRecoverableDateTime added in v0.9.72

func (c *DDCClient) GetRecoverableDateTime(instanceId string) (*GetRecoverableDateTimeResult, error)

GetRecoverableDateTime - get a list of recoverable times

PARAMS:

  • instanceId: the specific ddc Instance's ID

RETURNS:

  • *GetRecoverableDateTimeResult: the result of list all recoverable datetimes
  • error: nil if success otherwise the specific error

func (*DDCClient) GetResidual added in v0.9.60

func (c *DDCClient) GetResidual(poolId string) (*GetResidualResult, error)

GetResidual - get residual of pool

PARAMS:

  • poolId: id of pool
  • zoneName: the zone name

RETURNS:

  • *GetResidualResult:residual of pool
  • error: nil if success otherwise the specific error

func (*DDCClient) GetSecurityIps

func (c *DDCClient) GetSecurityIps(instanceId string) (*GetSecurityIpsResult, error)

GetSecurityIps - get all SecurityIps

PARAMS:

  • instanceId: the specific rds Instance's ID

RETURNS:

  • *GetSecurityIpsResult: all security IP
  • error: nil if success otherwise the specific error

func (*DDCClient) GetSlowLogs added in v0.9.86

func (c *DDCClient) GetSlowLogs(args *GetSlowLogsArgs) (*SlowLogsResponse, error)

GetSlowLog - get slow logs

PARAMS: RETURNS:

  • *SlowLogsResponse: the slow logs
  • error: nil if success otherwise the specific error

func (*DDCClient) GetTableAmount added in v0.9.72

func (c *DDCClient) GetTableAmount(args *GetTableAmountArgs) (*TableAmountResult, error)

GetTableAmount - query amount of tables

PARAMS:

  • args: the specific ddc instanceId, dbName and search pattern

RETURNS:

  • *TableAmountResult: the size of the table that meets the criteria
  • error: nil if success otherwise the specific error

func (*DDCClient) GetZoneList

func (c *DDCClient) GetZoneList() (*GetZoneListResult, error)

GetZoneList - list all zone

PARAMS:

  • c: the client agent which can perform sending request

RETURNS:

  • *GetZoneListResult: result of the zone list
  • error: nil if success otherwise the specific error

func (*DDCClient) InstanceSyncDelayReplication added in v0.9.127

func (c *DDCClient) InstanceSyncDelayReplication(instanceId string, args *InstanceSyncDelayReplicationArg) (*InstanceSyncDelayReplicationResponse, error)

InstanceSyncDelayReplication - start or stop readonly instance syncDelay.

PARAMS:

  • instanceId: id of the instance

RETURNS:

  • *InstanceSyncDelayReplicationResponse: the response of success
  • error: nil if success otherwise the specific error

func (*DDCClient) InstanceVersionRollBack added in v0.9.121

func (c *DDCClient) InstanceVersionRollBack(instanceId string, args *InstanceVersionRollBackArg) (*MaintainTaskIdResult, error)

InstanceVersionRollBack - rollback instance version from 5.7 to 5.6

PARAMS:

  • instanceId: id of the instance
  • args: the arguments to set WaitSwitch

RETURNS:

  • *MaintainTaskIdResult: ID of generated maintain task
  • error: nil if success otherwise the specific error

func (*DDCClient) InstanceVersionUpgrade added in v0.9.121

func (c *DDCClient) InstanceVersionUpgrade(instanceId string, args *InstanceVersionUpgradeArg) (*MaintainTaskIdResult, error)

InstanceVersionUpgrade - upgrade instance version from 5.6 to 5.7

PARAMS:

  • instanceId: id of the instance
  • args: the arguments to set IsUpgradeNow

RETURNS:

  • *MaintainTaskIdResult: ID of generated maintain task
  • error: nil if success otherwise the specific error

func (*DDCClient) KillSession added in v0.9.78

func (c *DDCClient) KillSession(instanceId string, args *KillSessionArgs) (*KillSessionResult, error)

KillSession - start kill session tasks

PARAMS:

  • instanceId: id of the instance
  • args: instance role and sessionIds

RETURNS:

  • *KillSessionResult: the response of kill session task id
  • error: nil if success otherwise the specific error
func (c *DDCClient) LazyDropCreateHardLink(instanceId, dbName, tableName string) error

LazyDropCreateHardLink - create a hard link for specified large table

PARAMS:

  • instanceId: id of instance
  • dbName: name of database
  • tableName: name of table

RETURNS:

  • error: nil if success otherwise the specific error
func (c *DDCClient) LazyDropDeleteHardLink(instanceId, dbName, tableName string) (*MaintainTaskIdResult, error)

LazyDropDeleteHardLink - delete the hard link for specified large table

PARAMS:

  • instanceId: id of instance
  • dbName: name of database
  • tableName: name of table

RETURNS:

  • error: nil if success otherwise the specific error

func (*DDCClient) ListAccount

func (c *DDCClient) ListAccount(instanceId string) (*ListAccountResult, error)

ListAccount - list all account of a DDC instance with the specific parameters

PARAMS:

  • instanceId: the specific rds Instance's ID

RETURNS:

  • *ListAccountResult: the result of list all account, contains all accounts' meta
  • error: nil if success otherwise the specific error

func (*DDCClient) ListDatabase

func (c *DDCClient) ListDatabase(instanceId string) (*ListDatabaseResult, error)

ListDatabase - list all database of a DDC instance with the specific parameters

PARAMS:

  • instanceId: the specific ddc Instance's ID

RETURNS:

  • *ListDatabaseResult: the result of list all database, contains all databases' meta
  • error: nil if success otherwise the specific error

func (*DDCClient) ListDeploySets

func (c *DDCClient) ListDeploySets(poolId string, marker *Marker) (*ListDeploySetResult, error)

ListDeploySets - list all deploy sets RETURNS:

  • *ListResultWithMarker: the result of list deploy sets with marker
  • error: nil if success otherwise the specific error

func (*DDCClient) ListLogByInstanceId added in v0.9.50

func (c *DDCClient) ListLogByInstanceId(instanceId string, args *ListLogArgs) (*[]Log, error)

ListLogByInstanceId - list error or slow logs of instance

PARAMS:

  • instanceId: id of instance

RETURNS:

  • *[]Log:logs of instance
  • error: nil if success otherwise the specific error

func (*DDCClient) ListPage added in v0.9.69

func (c *DDCClient) ListPage(args *ListPageArgs) (*ListPageResult, error)

ListPage - list all instances with page RETURNS:

  • *ListPageResult: the result of list instances with marker
  • error: nil if success otherwise the specific error

func (*DDCClient) ListParameters

func (c *DDCClient) ListParameters(instanceId string) (*ListParametersResult, error)

ListParameters - list all parameters of a RDS instance

PARAMS:

  • instanceId: the specific rds Instance's ID

RETURNS:

  • *ListParametersResult: the result of list all parameters
  • error: nil if success otherwise the specific error

func (*DDCClient) ListPool added in v0.9.53

func (cli *DDCClient) ListPool(marker *Marker) (*ListPoolResult, error)

ListPool - list current pools RETURNS:

  • *ListResultWithMarker: the result of list hosts with marker
  • error: nil if success otherwise the specific error

func (*DDCClient) ListRds

func (c *DDCClient) ListRds(marker *ListRdsArgs) (*ListRdsResult, error)

ListRds - list all instances RETURNS:

  • *ListRdsResult: the result of list instances with marker
  • error: nil if success otherwise the specific error

func (*DDCClient) ListRecycleInstances added in v0.9.48

func (c *DDCClient) ListRecycleInstances(marker *Marker) (*RecyclerInstanceList, error)

ListRecycleInstances - list all instances in recycler with marker

PARAMS:

  • marker: marker page

RETURNS:

  • *RecyclerInstanceList: the result of instances in recycler
  • error: nil if success otherwise the specific error

func (*DDCClient) ListRoGroup

func (c *DDCClient) ListRoGroup(instanceId string) (*ListRoGroupResult, error)

ListRoGroup - list all roGroups of a DDC instance with the specific parameters

PARAMS:

  • instanceId: the specific rds Instance's ID

RETURNS:

  • *ListRoGroupResult: All roGroups of the current instance
  • error: nil if success otherwise the specific error

func (*DDCClient) ListSecurityGroupByInstanceId added in v0.9.48

func (c *DDCClient) ListSecurityGroupByInstanceId(instanceId string) (*ListSecurityGroupResult, error)

ListSecurityGroupByInstanceId - list security groups by instance id

PARAMS:

  • instanceId: id of instance

RETURNS:

  • *ListSecurityGroupResult: list secrity groups result of instance
  • error: nil if success otherwise the specific error

func (*DDCClient) ListSecurityGroupByVpcId added in v0.9.48

func (c *DDCClient) ListSecurityGroupByVpcId(vpcId string) (*[]SecurityGroup, error)

ListSecurityGroupByVpcId - list security groups by vpc id

PARAMS:

  • vpcId: id of vpc

RETURNS:

  • *[]SecurityGroup:security groups of vpc
  • error: nil if success otherwise the specific error

func (*DDCClient) ListSubnets

func (c *DDCClient) ListSubnets(args *ListSubnetsArgs) (*ListSubnetsResult, error)

ListsSubnet - list all Subnets

PARAMS:

  • c: the client agent which can perform sending request
  • args: the arguments to list all subnets, not necessary

RETURNS:

  • *ListSubnetsResult: result of the subnet list
  • error: nil if success otherwise the specific error

func (*DDCClient) ListVpc

func (c *DDCClient) ListVpc() (*[]VpcVo, error)

ListVpc - list all Vpc

PARAMS: RETURNS:

  • *ListVpc: All vpc of
  • error: nil if success otherwise the specific error

func (*DDCClient) ModifyBackupPolicy

func (c *DDCClient) ModifyBackupPolicy(instanceId string, args *BackupPolicy) error

ModifyBackupPolicy - update backupPolicy

PARAMS:

  • instanceId: the specific rds Instance's ID
  • Args: the specific rds Instance's BackupPolicy

RETURNS:

  • error: nil if success otherwise the specific error

func (*DDCClient) ModifySyncMode added in v0.9.55

func (c *DDCClient) ModifySyncMode(instanceId string, args *ModifySyncModeArgs) error

UpdateSyncMode - update sync mode of a specified instance

PARAMS:

  • cli: the client agent which can perform sending request
  • instanceId: id of the instance
  • args: the arguments to update syncMode

RETURNS:

  • error: nil if success otherwise the specific error

func (*DDCClient) ReBalanceRoGroup added in v0.9.45

func (c *DDCClient) ReBalanceRoGroup(roGroupId string) error

ReBalanceRoGroup- Initiate a rebalance for foGroup

PARAMS:

  • body: http request body

RETURNS:

  • error: nil if success otherwise the specific error

func (*DDCClient) RebootInstanceWithArgs added in v0.9.45

func (c *DDCClient) RebootInstanceWithArgs(instanceId string, args *RebootArgs) (*MaintainTaskIdResult, error)

RebootInstance - reboot a specified instance

PARAMS:

  • cli: the client agent which can perform sending request
  • instanceId: id of the instance to be rebooted
  • args: reboot args

RETURNS:

  • error: nil if success otherwise the specific error

func (*DDCClient) RecoverRecyclerInstances added in v0.9.48

func (c *DDCClient) RecoverRecyclerInstances(instanceIds []string) (*OrderIdResponse, error)

RecoverRecyclerInstances - batch recover instances that in recycler

PARAMS:

  • instanceIds: instanceId list to recover

RETURNS:

  • error: nil if success otherwise the specific error

func (*DDCClient) RecoverToSourceInstanceByDatetime added in v0.9.72

func (c *DDCClient) RecoverToSourceInstanceByDatetime(instanceId string, args *RecoverInstanceArgs) (*MaintainTaskIdResult, error)

RecoverToSourceInstanceByDatetime - recover database or tables for the specific instance by a datetime

PARAMS:

  • instanceId: the specific ddc Instance's ID

RETURNS:

  • *MaintainTaskIdResult: ID of generated maintain task
  • error: nil if success otherwise the specific error

func (*DDCClient) ReplaceSecurityGroups added in v0.9.48

func (c *DDCClient) ReplaceSecurityGroups(args *SecurityGroupArgs) error

ReplaceSecurityGroups - replace SecurityGroup to instances

PARAMS:

  • args: http request body

RETURNS:

  • error: nil if success otherwise the specific error

func (*DDCClient) ResizeRds added in v0.9.52

func (c *DDCClient) ResizeRds(instanceId string, args *ResizeRdsArgs) (*OrderIdResponse, error)

ResizeRds - resize an RDS with the specific parameters

PARAMS:

  • instanceId: the specific instanceId
  • args: the arguments to resize an RDS

RETURNS:

  • error: nil if success otherwise the specific error

func (*DDCClient) SnapshotAccessDetail added in v0.9.143

func (c *DDCClient) SnapshotAccessDetail(args *AccessDetailArgs) (*BackupAccessDetail, error)

SnapshotAccessDetail - get snapshot access detail

PARAMS:

  • args: the arguments to get snapshot access detail

RETURNS:

  • *AccessDetail
  • error: nil if success otherwise the specific error

func (*DDCClient) SupplyVpcInfo

func (c *DDCClient) SupplyVpcInfo(newArgs *CreateInstanceArgs, args *CreateRdsArgs) (*CreateInstanceArgs, error)

func (*DDCClient) SupplyZoneAndSubnetInfo

func (c *DDCClient) SupplyZoneAndSubnetInfo(newArgs *CreateInstanceArgs, args *CreateRdsArgs) (*CreateInstanceArgs, error)

func (*DDCClient) SwitchInstance

func (c *DDCClient) SwitchInstance(instanceId string, args *SwitchArgs) (*ProducedMaintainTaskResult, error)

SwitchInstance - main standby switching of the instance

PARAMS:

  • instanceId: the id of the instance
  • args: switch now or wait to the maintain time

RETURNS:

  • error: nil if success otherwise the specific error

func (*DDCClient) UnBindSecurityGroups added in v0.9.48

func (c *DDCClient) UnBindSecurityGroups(args *SecurityGroupArgs) error

UnBindSecurityGroups - unbind SecurityGroup to instances

PARAMS:

  • args: http request body

RETURNS:

  • error: nil if success otherwise the specific error

func (*DDCClient) UnDefaultVpcInfo

func (c *DDCClient) UnDefaultVpcInfo(newArgs *CreateInstanceArgs, args *CreateRdsArgs) (*CreateInstanceArgs, error)

func (*DDCClient) UpdateAccountDesc

func (c *DDCClient) UpdateAccountDesc(instanceId string, accountName string, args *UpdateAccountDescArgs) error

UpdateAccountDesc - update a account desc with the specific parameters

PARAMS:

  • instanceId: the specific instanceId
  • accountName: the specific accountName
  • args: the arguments to update a account remark

RETURNS:

  • error: nil if success otherwise the specific error

func (*DDCClient) UpdateAccountPassword

func (c *DDCClient) UpdateAccountPassword(instanceId string, accountName string, args *UpdateAccountPasswordArgs) error

UpdateAccountPassword - update a account password with the specific parameters

PARAMS:

  • instanceId: the specific instanceId
  • accountName: the specific accountName
  • args: the arguments to update a account password

RETURNS:

  • error: nil if success otherwise the specific error

func (*DDCClient) UpdateAccountPrivileges

func (c *DDCClient) UpdateAccountPrivileges(instanceId string, accountName string, args *UpdateAccountPrivilegesArgs) error

UpdateAccountPrivileges - update a account privileges with the specific parameters

PARAMS:

  • instanceId: the specific instanceId
  • accountName: the specific accountName
  • args: the arguments to update a account privileges

RETURNS:

  • error: nil if success otherwise the specific error

func (*DDCClient) UpdateDatabaseRemark

func (c *DDCClient) UpdateDatabaseRemark(instanceId string, dbName string, args *UpdateDatabaseRemarkArgs) error

UpdateDatabaseRemark - update a database remark with the specific parameters

PARAMS:

  • instanceId: the specific instanceId
  • dbName: the specific accountName
  • args: the arguments to update a database remark

RETURNS:

  • error: nil if success otherwise the specific error

func (*DDCClient) UpdateDeploySet added in v0.9.45

func (c *DDCClient) UpdateDeploySet(poolId string, deployId string, args *UpdateDeployRequest) error

UpdateDeploySet - update a deploy set

PARAMS:

  • body: http request body

RETURNS:

  • error: nil if success otherwise the specific error

func (*DDCClient) UpdateInstanceName

func (c *DDCClient) UpdateInstanceName(instanceId string, args *UpdateInstanceNameArgs) error

UpdateInstanceName - update name of a specified instance

PARAMS:

  • instanceId: id of the instance
  • args: the arguments to update instanceName

RETURNS:

  • error: nil if success otherwise the specific error

func (*DDCClient) UpdateMaintainTime added in v0.9.45

func (c *DDCClient) UpdateMaintainTime(instanceId string, args *MaintainTime) error

UpdateMaintainTime - update UpdateMaintainTime of instance

PARAMS:

  • body: http request body

RETURNS:

  • error: nil if success otherwise the specific error

func (*DDCClient) UpdateParameter

func (c *DDCClient) UpdateParameter(instanceId string, args *UpdateParameterArgs) (*ProducedMaintainTaskResult, error)

UpdateParameter - update Parameter

PARAMS:

  • instanceId: the specific rds Instance's ID
  • Args: *UpdateParameterArgs

RETURNS:

  • error: nil if success otherwise the specific error

func (*DDCClient) UpdateRoGroup added in v0.9.45

func (c *DDCClient) UpdateRoGroup(roGroupId string, args *UpdateRoGroupArgs) error

UpdateRoGroup - update a roGroup

PARAMS:

  • body: http request body

RETURNS:

  • error: nil if success otherwise the specific error

func (*DDCClient) UpdateRoGroupReplicaWeight added in v0.9.45

func (c *DDCClient) UpdateRoGroupReplicaWeight(roGroupId string, args *UpdateRoGroupWeightArgs) error

UpdateRoGroupReplicaWeight- update repica weight in roGroup

PARAMS:

  • body: http request body

RETURNS:

  • error: nil if success otherwise the specific error

func (*DDCClient) UpdateSecurityIps

func (c *DDCClient) UpdateSecurityIps(instacneId string, args *UpdateSecurityIpsArgs) error

UpdateSecurityIps - update SecurityIps

PARAMS:

  • instanceId: the specific rds Instance's ID
  • Args: all SecurityIps

RETURNS:

  • error: nil if success otherwise the specific error

type Database

type Database struct {
	DbName            string             `json:"dbName"`
	CharacterSetName  string             `json:"characterSetName"`
	DbStatus          string             `json:"dbStatus"`
	Remark            string             `json:"remark"`
	AccountPrivileges []AccountPrivilege `json:"accountPrivileges"`
}

type DatabaseDiskUsageResult added in v0.9.72

type DatabaseDiskUsageResult struct {
	Databases map[string]int `json:"databases"`
	RestDisk  int64          `json:"restDisk"`
	UsedDisk  int64          `json:"usedDisk"`
}

type DatabasePrivilege

type DatabasePrivilege struct {
	DbName   string `json:"dbName"`
	AuthType string `json:"authType"`
}

type DatabaseResult

type DatabaseResult struct {
	Database Database `json:"database"`
}

type DeleteDdcArgs

type DeleteDdcArgs struct {
	InstanceIds []string `json:"instanceIds"`
}

type DeploySet

type DeploySet struct {
	CreateTime          string   `json:"createTime"`
	DeployID            string   `json:"deployId"`
	DeployName          string   `json:"deployName"`
	Instances           []string `json:"instances"`
	PoolID              string   `json:"poolId"`
	Strategy            string   `json:"strategy"`
	CentralizeThreshold int      `json:"centralizeThreshold"`
}

type Disk added in v0.9.57

type Disk struct {
	Response struct {
		Items []struct {
			DiskPartition string `json:"DiskPartition"`
			InstanceID    string `json:"InstanceId"`
			InstanceRole  string `json:"InstanceRole"`
			PhysicalIP    string `json:"PhysicalIp"`
			ReportTime    string `json:"ReportTime"`
			TotalSize     int    `json:"TotalSize"`
			UsedSize      int    `json:"UsedSize"`
		} `json:"Items"`
	} `json:"Response"`
}

type Endpoint

type Endpoint struct {
	Address      string `json:"address"`
	Port         int    `json:"port"`
	VnetIp       string `json:"vnetIp"`
	VnetIpBackup string `json:"vnetIpBackup"`
	InetIp       string `json:"inetIp"`
}

type ErrorLog added in v0.9.86

type ErrorLog struct {
	InstanceId  string `json:"instanceId"`
	LogLevel    string `json:"logLevel"`
	LogText     string `json:"logText"`
	ExecuteTime string `json:"executeTime"`
}

type ErrorLogsResponse added in v0.9.86

type ErrorLogsResponse struct {
	Count     int        `json:"count"`
	ErrorLogs []ErrorLog `json:"errorLogs"`
}

type Filter added in v0.9.69

type Filter struct {
	KeywordType string `json:"keywordType"`
	Keyword     string `json:"keyword"`
}

type Flavor

type Flavor struct {
	CPUCount           int    `json:"cpuCount"`
	CPUType            string `json:"cpuType"`
	Disk               int    `json:"disk"`
	FlavorID           string `json:"flavorId"`
	MemoryCapacityInGB int    `json:"memoryCapacityInGB"`
}

type GetBackupListArgs

type GetBackupListArgs struct {
	Marker  string
	MaxKeys int
}

type GetBackupListResult

type GetBackupListResult struct {
	Marker        string     `json:"marker"`
	MaxKeys       int        `json:"maxKeys"`
	IsTruncated   bool       `json:"isTruncated"`
	NextMarker    string     `json:"nextMarker"`
	Backups       []Snapshot `json:"snapshots"`
	FreeSpaceInMB int64      `json:"freeSpaceInMB"`
	UsedSpaceInMB int64      `json:"usedSpaceInMB"`
}

type GetBackupStatusResponse added in v0.9.108

type GetBackupStatusResponse struct {
	IsBackuping       bool   `json:"isBackuping"`
	SnapshotStartTime string `json:"snapshotStartTime"`
}

type GetErrorLogsArgs added in v0.9.86

type GetErrorLogsArgs struct {
	InstanceId string `json:"instanceId"`
	StartTime  string `json:"startTime"`
	EndTime    string `json:"endTime"`
	PageNo     int    `json:"pageNo"`
	PageSize   int    `json:"pageSize"`
	Role       string `json:"role"`
	KeyWord    string `json:"keyWord,omitempty"`
}

type GetFlavorCapacityArgs added in v0.9.60

type GetFlavorCapacityArgs struct {
	CpuInCore  int   `json:"CpuInCore,omitempty"`
	MemoryInGb int64 `json:"memoryInGb,omitempty"`
	DiskInGb   int64 `json:"diskInGb,omitempty"`
	Affinity   int64 `json:"affinity,omitempty"`
}

func NewDefaultGetFlavorCapacityArgs added in v0.9.108

func NewDefaultGetFlavorCapacityArgs(cpuInCore int, memoryInGb, diskInGb int64) *GetFlavorCapacityArgs

type GetFlavorCapacityResult added in v0.9.60

type GetFlavorCapacityResult struct {
	Capacity map[string]CapacityOfZone `json:"capacity"`
}

type GetKillSessionTaskResult added in v0.9.78

type GetKillSessionTaskResult struct {
	Tasks []KillSessionTask `json:"tasks"`
}

type GetLogArgs added in v0.9.50

type GetLogArgs struct {
	ValidSeconds int `json:"downloadValidTimeInSec"`
}

type GetMaintainTaskListArgs added in v0.9.83

type GetMaintainTaskListArgs struct {
	Marker
	StartTime string `json:"startTime"`
	EndTime   string `json:"endTime"`
}

type GetRecoverableDateTimeResult added in v0.9.72

type GetRecoverableDateTimeResult struct {
	RecoverableDateTimes []RecoverableDateTime `json:"recoverableDateTimes"`
}

type GetResidualResult added in v0.9.60

type GetResidualResult struct {
	Residual map[string]ResidualOfZone `json:"residual"`
}

type GetSecurityIpsResult

type GetSecurityIpsResult struct {
	Etag        string   `json:"etag"`
	SecurityIps []string `json:"securityIps"`
}

type GetSlowLogsArgs added in v0.9.86

type GetSlowLogsArgs struct {
	InstanceId string   `json:"instanceId"`
	StartTime  string   `json:"startTime"`
	EndTime    string   `json:"endTime"`
	PageNo     int      `json:"pageNo"`
	PageSize   int      `json:"pageSize"`
	Role       string   `json:"role"`
	DbName     []string `json:"dbName,omitempty"`
	UserName   []string `json:"userName,omitempty"`
	HostIp     []string `json:"hostIp,omitempty"`
	Sql        string   `json:"sql,omitempty"`
}

type GetTableAmountArgs added in v0.9.72

type GetTableAmountArgs struct {
	InstanceId string `json:"instanceId"`
	DbName     string `json:"dbName"`
	Pattern    string `json:"pattern"`
}

type GetZoneListResult

type GetZoneListResult struct {
	Zones []ZoneName `json:"zones"`
}

type HA added in v0.9.60

type HA struct {
	DiskInGb   float64 `json:"diskInGb"`
	MemoryInGb float64 `json:"memoryInGb"`
	CPUInCore  int     `json:"cpuInCore"`
}

type Host

type Host struct {
	Containers       []Container `json:"containers"`
	Flavor           Flavor      `json:"flavor"`
	CPUQuotaTotal    int         `json:"cpuQuotaTotal"`
	CPUQuotaUsed     int         `json:"cpuQuotaUsed"`
	DeploymentStatus string      `json:"deploymentStatus"`
	DiskQuotaTotal   int         `json:"diskQuotaTotal"`
	DiskQuotaUsed    int         `json:"diskQuotaUsed"`
	HostID           string      `json:"hostId"`
	HostName         string      `json:"hostName"`
	ImageType        string      `json:"imageType"`
	MemoryQuotaTotal int64       `json:"memoryQuotaTotal"`
	MemoryQuotaUsed  int64       `json:"memoryQuotaUsed"`
	PnetIP           string      `json:"pnetIp"`
	Role             string      `json:"role"`
	Status           string      `json:"status"`
	SubnetID         string      `json:"subnetId"`
	VnetIP           string      `json:"vnetIp"`
	VpcID            string      `json:"vpcId"`
	Zone             string      `json:"zone"`
}

type HotBackup added in v0.9.166

type HotBackup struct {
	InstanceId   string `json:"instanceId"`
	Status       string `json:"status"`
	InstanceName string `json:"instanceName"`
}

type Instance

type Instance struct {
	InstanceId         string       `json:"instanceId"`
	InstanceName       string       `json:"instanceName"`
	Engine             string       `json:"engine"`
	EngineVersion      string       `json:"engineVersion"`
	Category           string       `json:"category"`
	InstanceStatus     string       `json:"instanceStatus"`
	CpuCount           int          `json:"cpuCount"`
	MemoryCapacity     float64      `json:"allocatedMemoryInGB"`
	VolumeCapacity     int          `json:"allocatedStorageInGB"`
	NodeAmount         int          `json:"nodeAmount"`
	UsedStorage        float64      `json:"usedStorageInGB"`
	PublicAccessStatus string       `json:"publicAccessStatus"`
	InstanceCreateTime string       `json:"instanceCreateTime"`
	InstanceExpireTime string       `json:"instanceExpireTime"`
	Endpoint           Endpoint     `json:"endpoint"`
	SyncMode           string       `json:"syncMode"`
	BackupPolicy       BackupPolicy `json:"backupPolicy"`
	Region             string       `json:"region"`
	InstanceType       string       `json:"type"`
	SourceInstanceId   string       `json:"sourceInstanceId"`
	SourceRegion       string       `json:"sourceRegion"`
	ZoneNames          []string     `json:"zoneNames"`
	VpcId              string       `json:"vpcId"`
	Subnets            []Subnet     `json:"subnets"`
	Topology           Topology     `json:"topology"`
	PaymentTiming      string       `json:"paymentTiming"`

	PubliclyAccessible      bool                    `json:"publiclyAccessible"`
	RoGroupList             []RoGroup               `json:"roGroupList"`
	NodeMaster              NodeInfo                `json:"nodeMaster"`
	NodeSlave               NodeInfo                `json:"nodeSlave"`
	NodeReadReplica         NodeInfo                `json:"nodeReadReplica"`
	DeployId                string                  `json:"deployId"`
	LongBBCId               string                  `json:"longBBCId"`
	HostName                string                  `json:"hostname,omitempty"`
	InstanceTopoForReadonly InstanceTopoForReadonly `json:"instanceTopoForReadonly,omitempty"`
	AutoRenewRule           *AutoRenewRule          `json:"autoRenewRule,omitempty"`
	IsHotBackup             bool                    `json:"isHotBackup"`
	HotBackupList           []HotBackup             `json:"hotBackupList"`
}

func (*Instance) ProductType

func (instance *Instance) ProductType() string

type InstanceModel

type InstanceModel struct {
	InstanceId              string                  `json:"instanceId"`
	InstanceName            string                  `json:"instanceName"`
	Engine                  string                  `json:"engine"`
	EngineVersion           string                  `json:"engineVersion"`
	InstanceStatus          string                  `json:"instanceStatus"`
	CpuCount                int                     `json:"cpuCount"`
	AllocatedMemoryInGB     float64                 `json:"allocatedMemoryInGB"`
	AllocatedStorageInGB    int                     `json:"allocatedStorageInGB"`
	NodeAmount              int                     `json:"nodeAmount"`
	UsedStorageInGB         float64                 `json:"usedStorageInGB"`
	PublicAccessStatus      bool                    `json:"publicAccessStatus"`
	InstanceCreateTime      string                  `json:"instanceCreateTime"`
	InstanceExpireTime      string                  `json:"instanceExpireTime"`
	Endpoint                Endpoint                `json:"endpoint"`
	SyncMode                string                  `json:"syncMode"`
	BackupPolicy            BackupPolicy            `json:"backupPolicy"`
	Region                  string                  `json:"region"`
	InstanceType            string                  `json:"instanceType"`
	SourceInstanceId        string                  `json:"sourceInstanceId"`
	SourceRegion            string                  `json:"sourceRegion"`
	ZoneNames               []string                `json:"zoneNames"`
	VpcId                   string                  `json:"vpcId"`
	Subnets                 []Subnet                `json:"subnets"`
	NodeMaster              NodeInfo                `json:"nodeMaster"`
	NodeSlave               NodeInfo                `json:"nodeSlave"`
	NodeReadReplica         NodeInfo                `json:"nodeReadReplica"`
	DeployId                string                  `json:"deployId"`
	Topology                Topology                `json:"topology"`
	DiskType                string                  `json:"diskType"`
	Type                    string                  `json:"type"`
	ApplicationType         string                  `json:"applicationType"`
	RoGroupList             []RoGroup               `json:"roGroupList"`
	PaymentTiming           string                  `json:"paymentTiming"`
	Category                string                  `json:"category"`
	LongBBCId               string                  `json:"longBBCId"`
	InstanceTopoForReadonly InstanceTopoForReadonly `json:"instanceTopoForReadonly,omitempty"`
	AutoRenewRule           *AutoRenewRule          `json:"autoRenewRule,omitempty"`
	IsHotBackup             bool                    `json:"isHotBackup"`
	HotBackupList           []HotBackup             `json:"hotBackupList"`
}

type InstanceModelResult

type InstanceModelResult struct {
	Instance InstanceModel `json:"instance"`
}

type InstanceSyncDelay added in v0.9.127

type InstanceSyncDelay struct {
	SyncDelay  int    `json:"sync_delay"`
	SyncStatus string `json:"sync_status"`
}

type InstanceSyncDelayReplicationArg added in v0.9.127

type InstanceSyncDelayReplicationArg struct {
	Action string `json:"action"`
}

type InstanceSyncDelayReplicationResponse added in v0.9.127

type InstanceSyncDelayReplicationResponse struct {
	Success bool `json:"success"`
}

type InstanceSyncDelayResponse added in v0.9.127

type InstanceSyncDelayResponse struct {
	Success bool              `json:"success"`
	Result  InstanceSyncDelay `json:"result"`
}

type InstanceTopoForReadonly added in v0.9.57

type InstanceTopoForReadonly struct {
	ReadReplica []TopoInstance `json:"readReplica,omitempty"`
	Master      []TopoInstance `json:"master,omitempty"`
}

type InstanceVersionRollBackArg added in v0.9.121

type InstanceVersionRollBackArg struct {
	WaitSwitch bool `json:"waitSwitch"`
}

type InstanceVersionUpgradeArg added in v0.9.121

type InstanceVersionUpgradeArg struct {
	IsUpgradeNow bool `json:"isUpgradeNow"`
}

type Integer added in v0.9.52

type Integer *int

type KVParameter

type KVParameter struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type KillSessionArgs added in v0.9.78

type KillSessionArgs struct {
	Role       string `json:"role"`
	SessionIds []int  `json:"sessionIds"`
}

type KillSessionResult added in v0.9.78

type KillSessionResult struct {
	TaskID int `json:"taskId"`
}

type KillSessionTask added in v0.9.78

type KillSessionTask struct {
	SessionID int    `json:"sessionId"`
	Status    string `json:"status"`
}

type ListAccountResult

type ListAccountResult struct {
	Accounts []Account `json:"accounts"`
}

type ListDatabaseResult

type ListDatabaseResult struct {
	Databases []Database `json:"databases"`
}

type ListDeploySetResult

type ListDeploySetResult struct {
	ListResultWithMarker
	Result []DeploySet `json:"result"`
}

type ListHostResult

type ListHostResult struct {
	ListResultWithMarker
	Result []Host `json:"result"`
}

type ListLogArgs added in v0.9.50

type ListLogArgs struct {
	LogType  string `json:"logType"`
	Datetime string `json:"datetime"`
}

type ListMaintainTaskResult added in v0.9.83

type ListMaintainTaskResult struct {
	ListResultWithMarker
	Result []MaintainTask `json:"result"`
}

type ListPageArgs added in v0.9.69

type ListPageArgs struct {
	PageNo   int      `json:"pageNo"`
	PageSize int      `json:"pageSize"`
	Filters  []Filter `json:"filters"`
}

type ListPageResult added in v0.9.69

type ListPageResult struct {
	Page Page `json:"page"`
}

type ListParametersResult

type ListParametersResult struct {
	Etag       string      `json:"etag"`
	Parameters []Parameter `json:"items"`
}

type ListPoolResult

type ListPoolResult struct {
	ListResultWithMarker
	Result []Pool `json:"result"`
}

type ListRdsArgs

type ListRdsArgs struct {
	Marker  string
	MaxKeys int
}

type ListRdsResult

type ListRdsResult struct {
	Marker      string     `json:"marker"`
	MaxKeys     int        `json:"maxKeys"`
	IsTruncated bool       `json:"isTruncated"`
	NextMarker  string     `json:"nextMarker"`
	Instances   []Instance `json:"result"`
}

type ListResultWithMarker

type ListResultWithMarker struct {
	IsTruncated bool   `json:"isTruncated"`
	Marker      string `json:"marker"`
	MaxKeys     int    `json:"maxKeys"`
	NextMarker  string `json:"nextMarker"`
}

type ListRoGroupResult

type ListRoGroupResult struct {
	RoGroups []RoGroup `json:"roGroups"`
}

type ListSecurityGroupResult added in v0.9.48

type ListSecurityGroupResult struct {
	Groups []SecurityGroupDetail `json:"groups"`
}

type ListSubnetsArgs

type ListSubnetsArgs struct {
	VpcId    string `json:"vpcId"`
	ZoneName string `json:"zoneName"`
}

type ListSubnetsResult

type ListSubnetsResult struct {
	Subnets []Subnet `json:"subnets"`
}

type Log added in v0.9.50

type Log struct {
	LogStartTime   string `json:"logStartTime"`
	LogEndTime     string `json:"logEndTime"`
	LogID          string `json:"logId"`
	LogSizeInBytes int    `json:"logSizeInBytes"`
}

type LogDetail added in v0.9.50

type LogDetail struct {
	Log
	DownloadURL     string `json:"downloadUrl"`
	DownloadExpires string `json:"downloadExpires"`
}

type MachineInfo added in v0.9.110

type MachineInfo struct {
	Response struct {
		Items []struct {
			InstanceID      string `json:"instanceId"`
			Role            string `json:"role"`
			CPUInCore       int    `json:"cpuInCore"`
			FreeCPUInCore   int    `json:"freeCpuInCore"`
			MemSizeInMB     int    `json:"memSizeInMB"`
			FreeMemSizeInMB int    `json:"freeMemSizeInMB"`
			SizeInGB        []struct {
				FreeSizeInGB int               `json:"freeSizeInGB"`
				Label        map[string]string `json:"label"`
				Path         string            `json:"path"`
				SizeInGB     int               `json:"sizeInGB"`
			} `json:"sizeInGB"`
		} `json:"Items"`
	} `json:"Response"`
}

type MaintainTask added in v0.9.83

type MaintainTask struct {
	TaskID           string   `json:"taskId"`
	TaskName         string   `json:"taskName"`
	TaskStatus       string   `json:"taskStatus"`
	InstanceID       string   `json:"instanceId"`
	InstanceName     string   `json:"instanceName"`
	SupportedOperate []string `json:"supportedOperate"`
	StartTime        string   `json:"startTime"`
	EndTime          string   `json:"endTime"`
	Region           string   `json:"region"`
}

type MaintainTaskDetail added in v0.9.94

type MaintainTaskDetail struct {
	TaskID                int    `json:"taskId"`
	InstanceID            string `json:"instanceId"`
	InstanceName          string `json:"instanceName"`
	AppID                 string `json:"appId"`
	TaskName              string `json:"taskName"`
	TaskType              string `json:"taskType"`
	CreateTime            string `json:"createTime"`
	PickupTime            string `json:"pickupTime"`
	ErrNu                 int    `json:"errNu"`
	TaskStatus            string `json:"taskStatus"`
	TaskSpecialAction     string `json:"taskSpecialAction"`
	TaskSpecialActionTime string `json:"taskSpecialActionTime"`
}

type MaintainTaskDetailList added in v0.9.94

type MaintainTaskDetailList struct {
	Tasks []MaintainTaskDetail `json:"tasks"`
}

type MaintainTaskIdResult added in v0.9.94

type MaintainTaskIdResult struct {
	TaskID string `json:"taskId"`
}

type MaintainTime added in v0.9.46

type MaintainTime struct {
	Period    string `json:"period"`
	StartTime string `json:"startTime"`
	Duration  int    `json:"duration"`
}

type MaintainWindow added in v0.9.46

type MaintainWindow struct {
	MaintainTime MaintainTime `json:"maintentime"`
}

type Marker

type Marker struct {
	Marker  string `json:"marker,omitempty"`
	MaxKeys int    `json:"maxKeys,omitempty"`
}

type ModifyEndpointArgs

type ModifyEndpointArgs struct {
	Address string `json:"address"`
}

type ModifyPublicAccessArgs

type ModifyPublicAccessArgs struct {
	PublicAccess bool `json:"publicAccess"`
}

type ModifySyncModeArgs

type ModifySyncModeArgs struct {
	SyncMode string `json:"syncMode"`
}

type NodeInfo

type NodeInfo struct {
	Id       string `json:"id"`
	Azone    string `json:"azone"`
	SubnetId string `json:"subnetId"`
	Cidr     string `json:"cidr"`
	Name     string `json:"name"`
	HostName string `json:"hostname"`
}

type OperateHostRequest

type OperateHostRequest struct {
	Action string `json:"action"`
}

type OrderIdResponse added in v0.9.80

type OrderIdResponse struct {
	OrderId string `json:"orderId"`
}

type Page added in v0.9.69

type Page struct {
	Result     []Instance `json:"result"`
	PageNo     int        `json:"pageNo"`
	PageSize   int        `json:"pageSize"`
	TotalCount int        `json:"totalCount"`
}

type Pagination added in v0.9.143

type Pagination struct {
	IsTruncated bool   `json:"isTruncated"`
	NextMarker  string `json:"nextMarker"`
	MaxKeys     int    `json:"maxKeys"`
	Marker      string `json:"marker"`
	TotalKeys   int    `json:"totalKeys"`
}

type Parameter

type Parameter struct {
	Name          string `json:"name"`
	DefaultValue  string `json:"defaultValue"`
	Value         string `json:"value"`
	PendingValue  string `json:"pendingValue"`
	Type          string `json:"type"`
	IsDynamic     bool   `json:"dynamic"`
	ISModifiable  bool   `json:"modifiable"`
	AllowedValues string `json:"allowedValues"`
	Desc          string `json:"desc"`
	// 多加字段,兼容RDS
	Dynamic    string `json:"dynamicStr"`
	Modifiable string `json:"modifiableStr"`
}

type Pool

type Pool struct {
	CPUQuotaTotal      int    `json:"cpuQuotaTotal"`
	CPUQuotaUsed       int    `json:"cpuQuotaUsed"`
	CreateTime         string `json:"createTime"`
	DeployMethod       string `json:"deployMethod"`
	DiskQuotaTotal     int    `json:"diskQuotaTotal"`
	DiskQuotaUsed      int    `json:"diskQuotaUsed"`
	Engine             string `json:"engine"`
	Hosts              []Host `json:"hosts"`
	MaxMemoryUsedRatio string `json:"maxMemoryUsedRatio"`
	MemoryQuotaTotal   int    `json:"memoryQuotaTotal"`
	MemoryQuotaUsed    int    `json:"memoryQuotaUsed"`
	PoolID             string `json:"poolId"`
	PoolName           string `json:"poolName"`
	VpcID              string `json:"vpcId"`
}

type ProducedMaintainTaskResult added in v0.9.94

type ProducedMaintainTaskResult struct {
	Success bool                 `json:"success"`
	Result  MaintainTaskIdResult `json:"result"`
}

type RebootArgs added in v0.9.45

type RebootArgs struct {
	IsRebootNow bool `json:"isRebootNow"`
}

type RecoverData added in v0.9.72

type RecoverData struct {
	RecoverTables []RecoverTable `json:"recoverTables"`
	RestoreMode   string         `json:"restoreMode"`
	DbName        string         `json:"dbName"`
	NewDbName     string         `json:"newDbName"`
}

type RecoverInstanceArgs added in v0.9.72

type RecoverInstanceArgs struct {
	Datetime    string        `json:"datetime"`
	RecoverData []RecoverData `json:"recoverData"`
}

type RecoverTable added in v0.9.72

type RecoverTable struct {
	NewTableName string `json:"newTableName"`
	TableName    string `json:"tableName"`
}

type RecoverableDateTime added in v0.9.72

type RecoverableDateTime struct {
	StartDateTime string `json:"startDateTime"`
	EndDateTime   string `json:"endDateTime"`
}

type RecycleInstance added in v0.9.48

type RecycleInstance struct {
	EngineVersion      string  `json:"engineVersion"`
	VolumeCapacity     int     `json:"volumeCapacity"`
	ApplicationType    string  `json:"applicationType"`
	InstanceName       string  `json:"instanceName"`
	PublicAccessStatus string  `json:"publicAccessStatus"`
	InstanceCreateTime string  `json:"instanceCreateTime"`
	InstanceType       string  `json:"instanceType"`
	Type               string  `json:"type"`
	InstanceStatus     string  `json:"instanceStatus"`
	MemoryCapacity     float64 `json:"memoryCapacity"`
	InstanceId         string  `json:"instanceId"`
	Engine             string  `json:"engine"`
	VpcId              string  `json:"vpcId"`
	PubliclyAccessible bool    `json:"publiclyAccessible"`
	InstanceExpireTime string  `json:"instanceExpireTime"`
	DiskType           string  `json:"diskType"`
	Region             string  `json:"region"`
	CpuCount           int     `json:"cpuCount"`
	UsedStorage        float64 `json:"usedStorage"`
	LongBBCId          string  `json:"longBBCId"`
}

type RecyclerInstanceList added in v0.9.48

type RecyclerInstanceList struct {
	ListResultWithMarker
	Result []RecycleInstance `json:"result"`
}

type Replica

type Replica struct {
	InstanceId    string `json:"instanceId"`
	InstanceName  string `json:"instanceName"`
	Status        string `json:"status"`
	RoGroupWeight int    `json:"roGroupWeight"`
}

type ReplicaWeight added in v0.9.45

type ReplicaWeight struct {
	InstanceId string `json:"instanceId"`
	Weight     int    `json:"weight"`
}

type Reservation

type Reservation struct {
	ReservationLength   int    `json:"reservationLength,omitempty"`
	ReservationTimeUnit string `json:"reservationTimeUnit,omitempty"`
}

type ResidualOfZone added in v0.9.60

type ResidualOfZone struct {
	Slave  Slave  `json:"slave"`
	Single Single `json:"single"`
	HA     HA     `json:"HA"`
}

type ResizeRdsArgs

type ResizeRdsArgs struct {
	ClientToken    string  `json:"-"`
	CpuCount       int     `json:"cpuCount"`
	MemoryCapacity float64 `json:"memoryCapacity"`
	VolumeCapacity int     `json:"volumeCapacity"`
	NodeAmount     int     `json:"nodeAmount,omitempty"`
	IsDirectPay    bool    `json:"isDirectPay,omitempty"`
	IsResizeNow    bool    `json:"isResizeNow,omitempty"`
	WaitSwitch     int     `json:"waitSwitch,omitempty"`
}

type RoGroup

type RoGroup struct {
	RoGroupID           string    `json:"roGroupId"`
	RoGroupName         string    `json:"roGroupName"`
	VnetIP              string    `json:"vnetIp"`
	IsBalanceRoLoad     int       `json:"isBalanceRoLoad"`
	EnableDelayOff      int       `json:"enableDelayOff"`
	DelayThreshold      int       `json:"delayThreshold"`
	LeastInstanceAmount int       `json:"leastInstanceAmount"`
	ReplicaList         []Replica `json:"replicaList"`
}

type SecurityGroup added in v0.9.48

type SecurityGroup struct {
	Name                 string `json:"name"`
	SecurityGroupID      string `json:"securityGroupId"`
	Description          string `json:"description"`
	TenantID             string `json:"tenantId"`
	AssociateNum         int    `json:"associateNum"`
	VpcID                string `json:"vpcId"`
	VpcShortID           string `json:"vpcShortId"`
	VpcName              string `json:"vpcName"`
	CreatedTime          string `json:"createdTime"`
	Version              int    `json:"version"`
	DefaultSecurityGroup int    `json:"defaultSecurityGroup"`
}

type SecurityGroupArgs added in v0.9.48

type SecurityGroupArgs struct {
	InstanceIds      []string `json:"instanceIds"`
	SecurityGroupIds []string `json:"securityGroupIds"`
}

type SecurityGroupDetail added in v0.9.48

type SecurityGroupDetail struct {
	SecurityGroupName   string              `json:"securityGroupName"`
	SecurityGroupID     string              `json:"securityGroupId"`
	SecurityGroupRemark string              `json:"securityGroupRemark"`
	Inbound             []SecurityGroupRule `json:"inbound"`
	Outbound            []SecurityGroupRule `json:"outbound"`
	VpcName             string              `json:"vpcName"`
	VpcID               string              `json:"vpcId"`
	ProjectID           string              `json:"projectId"`
}

type SecurityGroupRule added in v0.9.48

type SecurityGroupRule struct {
	PortRange           string `json:"portRange"`
	Protocol            string `json:"protocol"`
	RemoteGroupID       string `json:"remoteGroupId"`
	RemoteIP            string `json:"remoteIP"`
	Ethertype           string `json:"ethertype"`
	TenantID            string `json:"tenantId"`
	Name                string `json:"name"`
	ID                  string `json:"id"`
	SecurityGroupRuleID string `json:"securityGroupRuleId"`
	Direction           string `json:"direction"`
}

type SecurityIpsRawResult

type SecurityIpsRawResult struct {
	SecurityIps []string `json:"ip"`
}

type Single added in v0.9.60

type Single struct {
	DiskInGb   float64 `json:"diskInGb"`
	MemoryInGb float64 `json:"memoryInGb"`
	CPUInCore  int     `json:"cpuInCore"`
}

type Slave added in v0.9.60

type Slave struct {
	DiskInGb   float64 `json:"diskInGb"`
	MemoryInGb float64 `json:"memoryInGb"`
	CPUInCore  int     `json:"cpuInCore"`
}

type SlowLog added in v0.9.86

type SlowLog struct {
	InstanceId   string  `json:"instanceId"`
	UserName     string  `json:"userName"`
	DbName       string  `json:"dbName"`
	HostIp       string  `json:"hostIp"`
	QueryTime    float64 `json:"queryTime"`
	LockTime     float64 `json:"lockTime"`
	RowsExamined int     `json:"rowsExamined"`
	RowsSent     int     `json:"rowsSent"`
	Sql          string  `json:"sql"`
	ExecuteTime  string  `json:"executeTime"`
}

type SlowLogsResponse added in v0.9.86

type SlowLogsResponse struct {
	Count    int       `json:"count"`
	SlowLogs []SlowLog `json:"slowLogs"`
}

type Snapshot

type Snapshot struct {
	SnapshotId          string `json:"snapshotId"`
	SnapshotSizeInBytes string `json:"snapshotSizeInBytes"`
	SnapshotType        string `json:"snapshotType"`
	SnapshotStatus      string `json:"snapshotStatus"`
	SnapshotStartTime   string `json:"snapshotStartTime"`
	SnapshotEndTime     string `json:"snapshotEndTime"`
}

type SnapshotModel

type SnapshotModel struct {
	SnapshotId          string `json:"snapshotId"`
	SnapshotSizeInBytes string `json:"snapshotSizeInBytes"`
	SnapshotType        string `json:"snapshotType"`
	SnapshotStatus      string `json:"snapshotStatus"`
	SnapshotStartTime   string `json:"snapshotStartTime"`
	SnapshotEndTime     string `json:"snapshotEndTime"`
	DownloadUrl         string `json:"downloadUrl"`
	DownloadExpires     string `json:"downloadExpires"`
}

type Subnet

type Subnet struct {
	Name        string `json:"name"`
	LongId      string `json:"subnetId"`
	ZoneName    string `json:"zoneName"`
	Cidr        string `json:"cidr"`
	ShortId     string `json:"shortId"`
	VpcId       string `json:"vpcId"`
	VpcShortId  string `json:"vpcShortId"`
	Az          string `json:"az"`
	CreatedTime string `json:"createdTime"`
	UpdatedTime string `json:"updatedTime"`
}

type SubnetMap

type SubnetMap struct {
	ZoneName string `json:"zoneName"`
	SubnetId string `json:"subnetId"`
}

type SubnetVo

type SubnetVo struct {
	Name     string `json:"name"`
	SubnetId string `json:"subnetId"`
	Az       string `json:"az"`
	Cidr     string `json:"cidr"`
	ShortId  string `json:"shortId"`
}

type SwitchArgs added in v0.9.50

type SwitchArgs struct {
	IsSwitchNow bool `json:"isSwitchNow"`
	WaitSwitch  int  `json:"waitSwitch,omitempty"`
}

type TableAmountResult added in v0.9.72

type TableAmountResult struct {
	Tables       map[string]int `json:"tables"`
	TotalAmount  int            `json:"totalAmount"`
	ReturnAmount int            `json:"returnAmount"`
}

type TagModel

type TagModel struct {
	TagKey   string `json:"tagKey"`
	TagValue string `json:"tagValue"`
}

type TopoInstance added in v0.9.57

type TopoInstance struct {
	InstanceID       string `json:"instanceId,omitempty"`
	SyncMode         string `json:"syncMode,omitempty"`
	MasterSlaveDelay int    `json:"masterSlaveDelay,omitempty"`
	Type             string `json:"type,omitempty"`
	Region           string `json:"region,omitempty"`
	RoGroupID        string `json:"roGroupId,omitempty"`
	ZoneName         string `json:"zoneName,omitempty"`
	InstanceStatus   string `json:"instanceStatus,omitempty"`
}

type Topology

type Topology struct {
	Rdsproxy    []string `json:"rdsproxy"`
	Master      []string `json:"master"`
	ReadReplica []string `json:"readReplica"`
}

type UpdateAccountDescArgs

type UpdateAccountDescArgs struct {
	Desc string `json:"remark"`
}

type UpdateAccountPasswordArgs

type UpdateAccountPasswordArgs struct {
	Password string `json:"password"`
}

type UpdateAccountPrivilegesArgs

type UpdateAccountPrivilegesArgs struct {
	DatabasePrivileges []DatabasePrivilege `json:"databasePrivileges"`
}

type UpdateDatabaseRemarkArgs

type UpdateDatabaseRemarkArgs struct {
	Remark string `json:"remark"`
}

type UpdateDeployRequest added in v0.9.45

type UpdateDeployRequest struct {
	ClientToken         string `json:"-"`
	Strategy            string `json:"strategy"`
	CentralizeThreshold int    `json:"centralizeThreshold"`
}

type UpdateInstanceNameArgs

type UpdateInstanceNameArgs struct {
	InstanceName string `json:"instanceName"`
}

type UpdateParameterArgs

type UpdateParameterArgs struct {
	Parameters []KVParameter `json:"parameters"`
	WaitSwitch int           `json:"waitSwitch"`
}

type UpdateRoGroupArgs added in v0.9.45

type UpdateRoGroupArgs struct {
	RoGroupName         string `json:"roGroupName,omitempty"`
	IsBalanceRoLoad     string `json:"isBalanceRoLoad,omitempty"`
	EnableDelayOff      string `json:"enableDelayOff,omitempty"`
	DelayThreshold      string `json:"delayThreshold,omitempty"`
	LeastInstanceAmount string `json:"leastInstanceAmount,omitempty"`
	MasterDelay         string `json:"masterDelay,omitempty"`
}

type UpdateRoGroupRealArgs added in v0.9.52

type UpdateRoGroupRealArgs struct {
	RoGroupName         string  `json:"roGroupName,omitempty"`
	IsBalanceRoLoad     Integer `json:"isBalanceRoLoad,omitempty"`
	EnableDelayOff      Integer `json:"enableDelayOff,omitempty"`
	DelayThreshold      Integer `json:"delayThreshold,omitempty"`
	LeastInstanceAmount Integer `json:"leastInstanceAmount,omitempty"`
	MasterDelay         Integer `json:"masterDelay,omitempty"`
}

type UpdateRoGroupWeightArgs added in v0.9.45

type UpdateRoGroupWeightArgs struct {
	RoGroupName         string          `json:"roGroupName,omitempty"`
	EnableDelayOff      string          `json:"enableDelayOff,omitempty"`
	DelayThreshold      string          `json:"delayThreshold,omitempty"`
	LeastInstanceAmount string          `json:"leastInstanceAmount,omitempty"`
	IsBalanceRoLoad     string          `json:"isBalanceRoLoad,omitempty"`
	MasterDelay         string          `json:"masterDelay,omitempty"`
	ReplicaList         []ReplicaWeight `json:"replicaList,omitempty"`
}

type UpdateRoGroupWeightRealArgs added in v0.9.52

type UpdateRoGroupWeightRealArgs struct {
	RoGroupName         string          `json:"roGroupName,omitempty"`
	EnableDelayOff      Integer         `json:"enableDelayOff,omitempty"`
	DelayThreshold      Integer         `json:"delayThreshold,omitempty"`
	LeastInstanceAmount Integer         `json:"leastInstanceAmount,omitempty"`
	IsBalanceRoLoad     Integer         `json:"isBalanceRoLoad,omitempty"`
	MasterDelay         Integer         `json:"masterDelay,omitempty"`
	ReplicaList         []ReplicaWeight `json:"replicaList,omitempty"`
}

type UpdateSecurityIpsArgs

type UpdateSecurityIpsArgs struct {
	SecurityIps []string `json:"securityIps"`
}

type VpcVo

type VpcVo struct {
	VpcId         string   `json:"vpcId"`
	ShortId       string   `json:"shortId"`
	Name          string   `json:"name"`
	Cidr          string   `json:"cidr"`
	Status        int      `json:"status"`
	CreateTime    string   `json:"createTime"`
	Description   string   `json:"description"`
	DefaultVpc    bool     `json:"defaultVpc"`
	Ipv6Cidr      string   `json:"ipv6Cidr"`
	AuxiliaryCidr []string `json:"auxiliaryCidr"`
	Relay         bool     `json:"relay"`
}

type ZoneName

type ZoneName struct {
	ZoneNames       []string `json:"apiZoneNames"`
	ApiZoneNames    []string `json:"zoneNames"`
	Available       bool     `json:"bool"`
	DefaultSubnetId string   `json:"defaultSubnetId"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL