gaiadb

package
v0.9.201 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package gaiadb defines the GAIADB services of BCE. The supported APIs are all defined in sub-package

gaiadb.go - the gaiadb APIs definition supported by the GAIADB service

util.go - define the utilities for api package of GAIADB service

Index

Constants

View Source
const (
	URI_PREFIX       = bce.URI_PREFIX + "v1"
	DEFAULT_ENDPOINT = "gaiadb.bj.baidubce.com"
)

Variables

This section is empty.

Functions

func Aes128EncryptUseSecreteKey

func Aes128EncryptUseSecreteKey(sk string, data string) (string, error)

func Json

func Json(v interface{}) string

Types

type Access

type Access struct {
	Name        string `json:"name"`
	DnsName     string `json:"dnsName"`
	AddressName string `json:"addressName"`
	Eip         string `json:"eip"`
}

type AccountDetail

type AccountDetail struct {
	Account AccountInfo `json:"account"`
}

type AccountInfo

type AccountInfo struct {
	AccountName        string              `json:"accountName"`
	Remark             string              `json:"remark"`
	AccountStatus      string              `json:"accountStatus"`
	AccountType        string              `json:"accountType"`
	DatabasePrivileges []DatabasePrivilege `json:"databasePrivileges"`
	Etag               string              `json:"etag"`
}

type AccountList

type AccountList struct {
	Accounts []AccountInfo `json:"accounts"`
}

type AccountPrivilege

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

type ApplyParamTemplateArgs

type ApplyParamTemplateArgs struct {
	Timing   string     `json:"timing"`
	Clusters ParamsItem `json:"clusters"`
}

type ApplyRecord

type ApplyRecord struct {
	Status        string `json:"status"`
	FinishTime    string `json:"finishTime"`
	ClusterId     string `json:"clusterId"`
	ClusterName   string `json:"clusterName"`
	ClusterStatus string `json:"clusterStatus"`
	ClusterRegion string `json:"clusterRegion"`
	StartTime     string `json:"startTime"`
	ErrMsg        string `json:"errMsg"`
}

type AuthIp

type AuthIp struct {
	Authip  []string `json:"authip"`
	Authbns []string `json:"authbns"`
}

type AuthIpArgs

type AuthIpArgs struct {
	Action string `json:"action"`
	Value  AuthIp `json:"value"`
	Etag   string `json:"etag"`
}

type AutoJoinRequestItem

type AutoJoinRequestItem struct {
	NewInstanceAutoJoin string `json:"newInstanceAutoJoin"`
	InterfaceId         string `json:"interfaceId"`
}

type AvailableSubnet added in v0.9.183

type AvailableSubnet struct {
	VpcId    string `json:"vpcId"`
	SubnetId string `json:"subnetId"`
}

type BindTagsArgs

type BindTagsArgs struct {
	Resources []Resource `json:"resources"`
}

type BinlogDetail

type BinlogDetail struct {
	Name             string   `json:"name"`
	LogStartDateTime string   `json:"logStartDateTime"`
	LogEndDateTime   string   `json:"logEndDateTime"`
	LogSizeBytes     int64    `json:"logSizeBytes"`
	OuterLinks       []string `json:"outerLinks"`
}

type BinlogItem

type BinlogItem struct {
	Id               string `json:"id"`
	Name             string `json:"name"`
	LogStartDateTime string `json:"logStartDateTime"`
	LogEndDateTime   string `json:"logEndDateTime"`
	LogSizeBytes     int64  `json:"logSizeBytes"`
}

type BinlogList

type BinlogList struct {
	LogBackups []BinlogItem `json:"logBackups"`
	Pagination Pagination   `json:"pagination"`
}

type Client

type Client struct {
	*bce.BceClient
}

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

func NewClient

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

func (*Client) ApplyParamTemplate

func (c *Client) ApplyParamTemplate(templateId string, args *ApplyParamTemplateArgs) error

ApplyParamTemplate - apply param template

PARAMS:

-templateId: template id
- args: the params to apply param template

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) BindTags

func (c *Client) BindTags(args *BindTagsArgs) error

BindTags - bind tags

PARAMS:

  • args: the arguments to bind tags

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) CancelTask

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

CancelTask - cancel task

PARAMS:

  • taskId : task id

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) ClusterSwitch

func (c *Client) ClusterSwitch(clusterId string, args *ClusterSwitchArgs) (*ClusterSwitchResult, error)

ClusterSwitch - cluster switch

PARAMS:

  • clusterId: the cluster id
  • args: the arguments to switch cluster

RETURNS:

  • error: nil if success otherwise the specific error
  • *SwitchResult: the result of switch cluster

func (*Client) CreateAccount

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

CreateAccount - create account

PARAMS:

  • clusterId: cluster id
  • args: the arguments to create account

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) CreateCluster

func (c *Client) CreateCluster(args *CreateClusterArgs) (*CreateResult, error)

CreateCluster - create gaiadb cluster

PARAMS:

  • args: the arguments to create gaiadb cluster

RETURNS:

  • *CreateResult: the result of create gaiadb cluster
  • error: nil if success otherwise the specific error

func (*Client) CreateDatabase

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

CreateDatabase - create database

PARAMS:

  • clusterId: cluster id
  • args: the arguments to create database

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) CreateMultiactiveGroup

func (c *Client) CreateMultiactiveGroup(args *CreateMultiactiveGroupArgs) (*CreateMultiactiveGroupResult, error)

CreateMultiactiveGroup - create multiactive group

PARAMS:

  • args: the arguments to create multiactive group

RETURNS:

  • error: nil if success otherwise the specific error
  • *CreateMultiactiveGroupResult: multiactive group result

func (*Client) CreateParamTemplate

func (c *Client) CreateParamTemplate(args *CreateParamTemplateArgs) error

CreateParamTemplate - create param template

PARAMS:

  • args: the params to create param template

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) CreateSnapshot

func (c *Client) CreateSnapshot(clusterId string) error

CreateSnapshot - create snapshot

PARAMS:

  • clusterId: cluster id

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) DeleteAccount

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

DeleteAccount - delete account

PARAMS:

  • clusterId: cluster id
  • accountName: account name to delete

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) DeleteCluster

func (c *Client) DeleteCluster(clusterId string) error

DeleteCluster - delete gaiadb cluster

PARAMS:

  • clusterId: the cluster id which you want to delete

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) DeleteDatabase

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

DeleteDatabase - delete database

PARAMS:

  • clusterId: cluster id
  • dbName: the database name to delete

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) DeleteMultiactiveGroup

func (c *Client) DeleteMultiactiveGroup(groupId string) error

DeleteMultiactiveGroup - elete multiactive group

PARAMS:

  • groupId: multiactive group id

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) DeleteParamTemplate

func (c *Client) DeleteParamTemplate(templateId string) error

DeleteParamTemplate - delete param template

PARAMS:

  • templateId: template id

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) DeleteParamsFromTemp

func (c *Client) DeleteParamsFromTemp(templateId string, args *Params) error

DeleteParamsFromTemp - delete params from template

PARAMS:

  • templateId: template id
  • args: the params to delete

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) ExecuteTaskNow

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

ExecuteTaskNow - execute task now

PARAMS:

  • taskId : task id

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) GetAccountDetail

func (c *Client) GetAccountDetail(clusterId, accountName string) (*AccountDetail, error)

GetAccountDetail - get account detail

PARAMS:

  • clusterId: cluster id
  • accountName: account name to delete

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) GetAccountList

func (c *Client) GetAccountList(clusterId string) (*AccountList, error)

GetAccountList - get account list

PARAMS:

  • clusterId: cluster id

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) GetAvailableSubnetList added in v0.9.183

func (c *Client) GetAvailableSubnetList(vpcId string) ([]AvailableSubnet, error)

GetAvailableSubnetList - get available subnetList

PARAMS:

  • vpcId: the vpc id which you want to query

RETURNS:

  • []AvailableSubnet: the result of get available subnetList
  • error: nil if success otherwise the specific error

func (*Client) GetBinlogDetail

func (c *Client) GetBinlogDetail(binlogId string, args *GetBinlogArgs) (*BinlogDetail, error)

GetBinlogDetail - get binlog detail

PARAMS:

  • binlogId : binlog id
  • args: the params to get binlog detail

RETURNS:

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

func (*Client) GetBinlogList

func (c *Client) GetBinlogList(args *GetBinlogListArgs) (*BinlogList, error)

GetBinlogList - get binlog list

PARAMS:

  • args: the params to get binlog list

RETURNS:

  • error: nil if success otherwise the specific error
  • *BinlogList: binlog List

func (*Client) GetClusterByLbId

func (c *Client) GetClusterByLbId(lbIds string) (*ClusterList, error)

GetClusterByLbId - get cluster by lb id

PARAMS:

  • LbId : the params to get cluster by lb id

RETURNS:

  • error: nil if success otherwise the specific error
  • *ClusterList: cluster List

func (*Client) GetClusterByVpcId

func (c *Client) GetClusterByVpcId(vpcId string) (*ClusterList, error)

GetClusterByVpcId - get cluster by vpc id

PARAMS:

  • vpcId : the params to get cluster by vpc id

RETURNS:

  • error: nil if success otherwise the specific error
  • *ClusterList: cluster List

func (*Client) GetClusterCapacity

func (c *Client) GetClusterCapacity(clusterId string) (*ClusterCapacityResult, error)

GetClusterCapacity - get cluster capacity PARAMS:

  • ClusterId: cluster id

RETURNS:

  • *ClusterCapacityResult: the result of cluster capacity
  • error: nil if success otherwise the specific error

func (*Client) GetClusterDetail

func (c *Client) GetClusterDetail(clusterId string) (*ClusterDetailResult, error)

GetClusterCapacity - get cluster Capacity PARAMS:

  • ClusterId: cluster id

RETURNS:

  • *ClusterCapacityResult: the result of cluster detail
  • error: nil if success otherwise the specific error

func (*Client) GetClusterList

func (c *Client) GetClusterList(args *Marker) (*ClusterListResult, error)

GetClusterList - get gaiadb cluster list

PARAMS:

  • *Markder: the arguments to get cluster list

RETURNS:

  • error: nil if success otherwise the specific error
  • *ClusterListResult: the result of get cluster list

func (*Client) GetInterfaceList

func (c *Client) GetInterfaceList(clusterId string) (*InterfaceListResult, error)

GetInterfaceList - get interface list PARAMS:

  • clusterId: cluster id

RETURNS:

  • *InterfaceListResult: the result of interface list
  • error: nil if success otherwise the specific error

func (*Client) GetMaintenTime

func (c *Client) GetMaintenTime(clusterId string) (*MaintenTimeDetail, error)

GetMaintenTime - get maintenTime

PARAMS:

  • clusterId: cluster id

RETURNS:

  • error: nil if success otherwise the specific error
  • *MaintenTime: maintenTime data

func (*Client) GetOrderInfo

func (c *Client) GetOrderInfo(orderId string) (*OrderInfo, error)

GetOrderInfo - get order info

PARAMS:

  • orderId : the params to get order info

RETURNS:

  • error: nil if success otherwise the specific error
  • *OrderInfo: order info

func (*Client) GetParamTemplateDetail

func (c *Client) GetParamTemplateDetail(templateId, detail string) (*ParamTemplateDetail, error)

GetParamTemplateDetail - get param template detail

PARAMS:

  • templateId: template id
  • detail: detail type

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) GetParamTemplateHistory

func (c *Client) GetParamTemplateHistory(templateId, action string) (*ParamTemplateHistory, error)

GetParamTemplateHistory - get param template history

PARAMS:

  • templateId: template id

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) GetParamsHistory

func (c *Client) GetParamsHistory(clusterId string) (*GetParamsHistoryResult, error)

GetParamsHistory - get paremeters history

PARAMS:

  • clusterId: cluster id

RETURNS:

  • error: nil if success otherwise the specific error
  • *GetParamsHistoryResult: get paremeters history result

func (*Client) GetParamsList

func (c *Client) GetParamsList(clusterId string) (*GetParamsListResult, error)

GetParamsList - get paremeters list

PARAMS:

  • clusterId: cluster id

RETURNS:

  • error: nil if success otherwise the specific error
  • *GetParamsListResult: get paremeters list result

func (*Client) GetSlowSqlDetail

func (c *Client) GetSlowSqlDetail(clusterId string, args *GetSlowSqlArgs) (*SlowSqlDetailDetail, error)

GetSlowSqlDetail - get slow sql detail

PARAMS:

  • args: the params to get slow sql detail

RETURNS:

  • error: nil if success otherwise the specific error
  • *SlowSqlDetail: slow sql detail

func (*Client) GetSnapshotPolicy

func (c *Client) GetSnapshotPolicy(clusterId string) (*SnapshotPolicy, error)

GetSnapshotPolicy - get snapshot policy

PARAMS:

  • clusterId: cluster id

RETURNS:

  • error: nil if success otherwise the specific error
  • *SnapshotPolicy: the snapshot policy

func (*Client) GetSyncStatus

func (c *Client) GetSyncStatus(groupId, followerClusterId string) (*GetSyncStatusResult, error)

GetSyncStatus - get multiactive group sync status

PARAMS:

  • groupId: multiactive group id
  • followerClusterId: the follower cluster id

RETURNS:

  • error: nil if success otherwise the specific error
  • *GetSyncStatusResult: multiactive group Detail result

func (*Client) GetTaskList

func (c *Client) GetTaskList(args *TaskListArgs) (*TaskList, error)

GetTaskList - get task list

PARAMS:

  • args : the params to get task list

RETURNS:

  • error: nil if success otherwise the specific error
  • *TaskList: task List

func (*Client) GetTemplateApplyRecords

func (c *Client) GetTemplateApplyRecords(templateId string) (*GetTemplateApplyRecordsResult, error)

GetTemplateApplyRecords - get template apply records

PARAMS:

  • templateId: template id

RETURNS:

  • error: nil if success otherwise the specific error
  • *GetTemplateApplyRecordsResult: get template apply records result

func (*Client) GetWhiteList

func (c *Client) GetWhiteList(clusterId string) (*WhiteList, error)

GetWhiteList - get white list

PARAMS:

  • clusterId: cluster id

RETURNS:

  • error: nil if success otherwise the specific error
  • *WhiteListResult: the result of white list

func (*Client) GroupExchange

func (c *Client) GroupExchange(groupId string, args *ExchangeArgs) error

GroupExchange - group exchange

PARAMS:

  • groupId: multiactive group id
  • args: the arguments to group exchange

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) ListDatabase

func (c *Client) ListDatabase(clusterId string) (*DatabaseList, error)

ListDatabase - list database

PARAMS:

  • clusterId: cluster id

RETURNS:

  • error: nil if success otherwise the specific error
  • *DatabaseList: the database list

func (*Client) ListParamTemplate

func (c *Client) ListParamTemplate(args *ListParamTempArgs) (*ListParamTempResult, error)

ListParamTemplate - list param template

PARAMS:

  • args: the arguments to list param template

RETURNS:

  • error: nil if success otherwise the specific error
  • *ListParamTemplateResult: get paremeters list result

func (*Client) ListSnapshot

func (c *Client) ListSnapshot(clusterId string) (*SnapshotList, error)

ListSnapshot - list snapshot

PARAMS:

  • clusterId: cluster id

RETURNS:

  • error: nil if success otherwise the specific error
  • *SnapshotList: the snapshot list

func (*Client) ModifyParams

func (c *Client) ModifyParams(templateId string, args *ModifyParamsArgs) error

ModifyParams - modify params

PARAMS:

  • templateId: template id
  • args: the params to modify

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) MultiactiveGroupDetail

func (c *Client) MultiactiveGroupDetail(groupId string) (*MultiactiveGroupDetailResult, error)

MultiactiveGroupDetail - get multiactive group detail

PARAMS:

  • groupId: multiactive group id

RETURNS:

  • error: nil if success otherwise the specific error
  • *MultiactiveGroupDetailResult: multiactive group Detail result

func (*Client) MultiactiveGroupList

func (c *Client) MultiactiveGroupList() (*MultiactiveGroupListResult, error)

MultiactiveGroupList - list multiactive group

PARAMS:

RETURNS:

  • error: nil if success otherwise the specific error
  • *MultiactiveGroupListResult: multiactive group list result

func (*Client) NewInstanceAutoJoin

func (c *Client) NewInstanceAutoJoin(clusterId string, args *NewInstanceAutoJoinArgs) error

NewInstanceAutoJoin - new instance auto join

PARAMS:

  • clusterId: cluster id
  • args: the arguments to new instance auto join

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) QueryClusterPrice

func (c *Client) QueryClusterPrice(args *QueryPriceArgs) (*PriceResult, error)

QueryClusterPrice - query cluster price

PARAMS:

  • args: the arguments to query cluster price

RETURNS:

  • *PriceResult: the result of query cluster price
  • error: nil if success otherwise the specific error

func (*Client) QueryResizeClusterPrice

func (c *Client) QueryResizeClusterPrice(args *QueryResizePriceArgs) (*PriceResult, error)

QueryResizeClusterPrice - query resize cluster price

PARAMS:

  • args: the arguments to query resize cluster price

RETURNS:

  • *PriceResult: the result of query resize cluster price
  • error: nil if success otherwise the specific error

func (*Client) RebootInstance

func (c *Client) RebootInstance(clusterId, instanceId string, args *RebootInstanceArgs) error

RebootInstance - reboot instance

PARAMS:

  • args: the arguments to reboot instance

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) RenameCluster

func (c *Client) RenameCluster(clusterId string, args *ClusterName) error

RenameCluster - rename gaiadb cluster

PARAMS:

  • clusterId: the cluster id which you want to delete
  • *ClusterName: the new cluster name

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) RenameMultiactiveGroup

func (c *Client) RenameMultiactiveGroup(groupId string, args *RenameMultiactiveGroupArgs) error

RenameMultiactiveGroup - rename multiactive group

PARAMS:

  • groupId: multiactive group id
  • args: the arguments to rename multiactive group

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) Request

func (c *Client) Request(method, uri string, body interface{}) (interface{}, error)

func (*Client) ResizeCluster

func (c *Client) ResizeCluster(clusterId string, args *ResizeClusterArgs) (*OrderId, error)

ResizeCluster - resize gaiadb cluster

PARAMS:

  • clusterId: the cluster id which you want to delete
  • *ResizeClusterArgs: the arguments to resize gaiadb cluster

RETURNS:

  • error: nil if success otherwise the specific error
  • *ResizeResult: the result of resize gaiadb cluster

func (*Client) SaveAsParamTemplate

func (c *Client) SaveAsParamTemplate(args *ParamTempArgs) error

SaveAsParamTemplate - save as params template

PARAMS:

  • args: the arguments to save as params template

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) SlowSqlAdvice

func (c *Client) SlowSqlAdvice(clusterId, sqlId string) (*SlowSqlAdviceDetail, error)

SlowSqlAdvice - slow sql advice

PARAMS:

  • clusterId: cluster id
  • sqlId : sql id

RETURNS:

  • error: nil if success otherwise the specific error
  • *SlowSqlAdviceDetail: slow sql advice detail

func (*Client) UpdateAccountAuthIp

func (c *Client) UpdateAccountAuthIp(clusterId, accountName string, args *AuthIpArgs) error

UpdateAccountAuthIp - update account auth ip

PARAMS:

  • clusterId: cluster id
  • accountName: account name to update
  • args: the arguments to update account auth ip

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) UpdateAccountPassword

func (c *Client) UpdateAccountPassword(clusterId, accountName string, args *PasswordArgs) error

UpdateAccountPassword - update account password

PARAMS:

  • clusterId: cluster id
  • accountName: account name to update
  • args: the arguments to update account password

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) UpdateAccountPrivileges

func (c *Client) UpdateAccountPrivileges(clusterId, accountName string, args *PrivilegesArgs) error

UpdateAccountPrivileges - update account privileges

PARAMS:

  • clusterId: cluster id
  • accountName: account name to update
  • args: the arguments to update account privileges

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) UpdateAccountRemark

func (c *Client) UpdateAccountRemark(clusterId, accountName string, args *RemarkArgs) error

UpdateAccountRemark - update account remark

PARAMS:

  • clusterId: cluster id
  • accountName: account name to update
  • args: the arguments to update account

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) UpdateDnsName

func (c *Client) UpdateDnsName(clusterId string, args *UpdateDnsNameArgs) error

UpdateDnsName - update dns name

PARAMS:

  • clusterId: the cluster id
  • args: the arguments to update dns name

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) UpdateInterface

func (c *Client) UpdateInterface(clusterId string, args *UpdateInterfaceArgs) error

UpdateInterface - update interface

PARAMS:

  • clusterId: cluster id
  • args: the arguments to update interface

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) UpdateMaintenTime

func (c *Client) UpdateMaintenTime(clusterId string, args *UpdateMaintenTimeArgs) error

UpdateMaintenTime - update maintenTime

PARAMS:

  • clusterId: cluster id
  • args: the params to update maintenTime

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) UpdateParamTemplate

func (c *Client) UpdateParamTemplate(templateId string, args *UpdateParamTplArgs) error

UpdateParamTemplate - update param template

PARAMS:

  • templateId: template id
  • args: the params to update

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) UpdateParams

func (c *Client) UpdateParams(clusterId string, args *UpdateParamsArgs) error

UpdateParams - update paremeters

PARAMS:

  • clusterId: cluster id
  • args: the arguments to update paremeters

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) UpdateSnapshotPolicy

func (c *Client) UpdateSnapshotPolicy(clusterId string, args *UpdateSnapshotPolicyArgs) error

UpdateSnapshotPolicy - update snapshot policy

PARAMS:

  • clusterId: cluster id
  • args: the arguments to update snapshot policy

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) UpdateWhiteList

func (c *Client) UpdateWhiteList(clusterId string, args *WhiteList) error

UpdateWhiteList - update white list

PARAMS:

  • clusterId : cluster id
  • args: the arguments to update white list

RETURNS:

  • error: nil if success otherwise the specific error

type Cluster

type Cluster struct {
	ClusterId            string   `json:"clusterId"`
	ClusterName          string   `json:"clusterName"`
	Endpoint             Endpoint `json:"endpoint"`
	AllocatedCpuInCore   int      `json:"allocatedCpuInCore"`
	AllocatedMemoryInMB  int      `json:"allocatedMemoryInMB"`
	InstanceStatus       string   `json:"instanceStatus"`
	PubliclyAccessible   bool     `json:"publiclyAccessible"`
	InstanceCreateTime   string   `json:"instanceCreateTime"`
	InstanceExpireTime   string   `json:"instanceExpireTime"`
	InstanceAmount       int      `json:"instanceAmount"`
	ProxyAmount          int      `json:"proxyAmount"`
	ProductType          string   `json:"productType"`
	MultiActiveGroupId   string   `json:"multiActiveGroupId"`
	MultiActiveGroupRole string   `json:"multiActiveGroupRole"`
	MultiActiveGroupName string   `json:"multiActiveGroupName"`
}

type ClusterCapacityResult

type ClusterCapacityResult struct {
	TotalFree     int `json:"totalFree"`
	TotalCapacity int `json:"totalCapacity"`
}

type ClusterDetailResult

type ClusterDetailResult struct {
	ClusterId            string        `json:"clusterId"`
	ClusterName          string        `json:"clusterName"`
	Endpoint             Endpoint      `json:"endpoint"`
	AllocatedCpuInCore   int           `json:"allocatedCpuInCore"`
	AllocatedMemoryInMB  int           `json:"allocatedMemoryInMB"`
	InstanceStatus       string        `json:"instanceStatus"`
	PubliclyAccessible   bool          `json:"publiclyAccessible"`
	InstanceCreateTime   string        `json:"instanceCreateTime"`
	InstanceExpireTime   string        `json:"instanceExpireTime"`
	InstanceAmount       int           `json:"instanceAmount"`
	ProductType          string        `json:"productType"`
	MultiActiveGroupId   string        `json:"multiActiveGroupId"`
	MultiActiveGroupRole string        `json:"multiActiveGroupRole"`
	MultiActiveGroupName string        `json:"multiActiveGroupName"`
	ComputeList          []ComputeNode `json:"computeList"`
}

type ClusterItem

type ClusterItem struct {
	ClusterId string    `json:"clusterId"`
	Name      string    `json:"name"`
	LbInfos   []LbInfos `json:"lbInfos"`
}

type ClusterList

type ClusterList struct {
	Clusters []ClusterItem `json:"clusters"`
}

type ClusterListResult

type ClusterListResult struct {
	Marker      string    `json:"marker"`
	MaxKeys     int       `json:"maxKeys"`
	NextMarker  string    `json:"nextMarker"`
	Istruncated bool      `json:"istruncated"`
	Clusters    []Cluster `json:"clusters"`
}

type ClusterName

type ClusterName struct {
	ClusterName string `json:"clusterName"`
}

type ClusterSwitchArgs

type ClusterSwitchArgs struct {
	ExecuteAction       string `json:"executeAction"`
	SecondaryInstanceId string `json:"secondaryInstanceId"`
}

type ClusterSwitchResult

type ClusterSwitchResult struct {
	Switch TaskId `json:"switch"`
}

type ComputeNode

type ComputeNode struct {
	Role             string `json:"role"`
	InstanceId       string `json:"instanceId"`
	InstanceShortId  string `json:"instanceShortId"`
	InstanceUniqueId string `json:"instanceUniqueId"`
	Status           string `json:"status"`
}

type CreateAccountArgs

type CreateAccountArgs struct {
	AccountName string `json:"accountName"`
	Password    string `json:"password"`
	AccountType string `json:"accountType"`
	Remark      string `json:"remark"`
}

type CreateClusterArgs

type CreateClusterArgs struct {
	ClientToken       string        `json:"-"`
	ProductType       string        `json:"productType"`
	Duration          string        `json:"duration,omitempty"`
	AutoRenewTimeUnit string        `json:"autoRenewTimeUnit,omitempty"`
	AutoRenewTime     int           `json:"autoRenewTime,omitempty"`
	Number            int           `json:"number"`
	InstanceParam     InstanceParam `json:"instanceParam"`
}

type CreateDatabaseArgs

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

type CreateMultiactiveGroupArgs

type CreateMultiactiveGroupArgs struct {
	LeaderClusterId      string `json:"leaderClusterId"`
	MultiActiveGroupName string `json:"multiActiveGroupName"`
}

type CreateMultiactiveGroupResult

type CreateMultiactiveGroupResult struct {
	MultiActiveGroupId string `json:"multiActiveGroupId"`
}

type CreateParamTemplateArgs

type CreateParamTemplateArgs struct {
	Name        string `json:"name"`
	Type        string `json:"type"`
	Version     string `json:"version"`
	Description string `json:"description"`
}

type CreateResult

type CreateResult struct {
	OrderId    string   `json:"orderId"`
	ClusterIds []string `json:"clusterIds"`
}

type DataBackupRetainStrategy

type DataBackupRetainStrategy struct {
	StartSeconds int    `json:"startSeconds"`
	RetainCount  string `json:"retainCount"`
	Precision    int    `json:"precision"`
	EndSeconds   int    `json:"endSeconds"`
}

type DatabaseInfo

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

type DatabaseList

type DatabaseList struct {
	Databases []DatabaseInfo `json:"databases"`
}

type DatabasePrivilege

type DatabasePrivilege struct {
	DbName     string   `json:"dbName"`
	AuthType   string   `json:"authType"`
	Privileges []string `json:"privileges"`
}

type EncryptStrategy

type EncryptStrategy struct {
	EncryptEnable            bool   `json:"encryptEnable"`
	KeyManagementType        string `json:"keyManagementType"`
	KeyManagementServiceName string `json:"keyManagementServiceName"`
	SecretKeyID              string `json:"secretKeyID"`
}

type Endpoint

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

type ExchangeArgs

type ExchangeArgs struct {
	ExecuteAction      string `json:"executeAction"`
	NewLeaderClusterId string `json:"newLeaderClusterId"`
}

type Flavor

type Flavor struct {
	RamInMB   int    `json:"ramInMB"`
	DiskInGB  string `json:"diskInGB"`
	CpuInCore int    `json:"cpuInCore"`
}

type FollowerCluster

type FollowerCluster struct {
	ClusterId   string `json:"clusterId"`
	ClusterName string `json:"clusterName"`
	Region      string `json:"region"`
	Azone       string `json:"azone"`
	Status      string `json:"status"`
}

type GetBinlogArgs

type GetBinlogArgs struct {
	AppID         string `json:"appID"`
	LogBackupType string `json:"logBackupType"`
}

type GetBinlogListArgs

type GetBinlogListArgs struct {
	AppID         string `json:"appID"`
	LogBackupType string `json:"logBackupType"`
	PageNo        int    `json:"pageNo"`
	PageSize      int    `json:"pageSize"`
	StartDateTime string `json:"startDateTime"`
	EndDateTime   string `json:"endDateTime"`
}

type GetParamsHistoryResult

type GetParamsHistoryResult struct {
	Records []Record `json:"records"`
}

type GetParamsListResult

type GetParamsListResult struct {
	Params []Param `json:"params"`
}

type GetSlowSqlArgs

type GetSlowSqlArgs struct {
	Page     string `json:"page,omitempty"`
	PageSize string `json:"pageSize,omitempty"`
	Offset   string `json:"offset,omitempty"`
	Sort     string `json:"sort,omitempty"`
	NodeId   string `json:"nodeId,omitempty"`
	Engine   string `json:"engine,omitempty"`
	Schema   string `json:"schema,omitempty"`
	Digest   string `json:"digest,omitempty"`
	Start    string `json:"start,omitempty"`
	End      string `json:"end,omitempty"`
}

type GetSyncStatusResult

type GetSyncStatusResult struct {
	DelayTime int    `json:"delayTime"`
	Status    string `json:"status"`
}

type GetTemplateApplyRecordsResult

type GetTemplateApplyRecordsResult struct {
	Records []ApplyRecord `json:"records"`
}

type InstanceInfo

type InstanceInfo struct {
	ReleaseVersion       string `json:"releaseVersion"`
	AllocatedStorageInGB int    `json:"allocatedStorageInGB"`
	AllocatedMemoryInMB  int    `json:"allocatedMemoryInMB"`
	AllocatedCpuInCore   int    `json:"allocatedCpuInCore"`
	InstanceAmount       int    `json:"instanceAmount"`
	ProxyAmount          int    `json:"proxyAmount"`
}

type InstanceParam

type InstanceParam struct {
	ReleaseVersion       string `json:"releaseVersion"`
	AllocatedCpuInCore   int    `json:"allocatedCpuInCore"`
	AllocatedMemoryInMB  int    `json:"allocatedMemoryInMB"`
	AllocatedStorageInGB int    `json:"allocatedStorageInGB"`
	InstanceAmount       int    `json:"instanceAmount"`
	ProxyAmount          int    `json:"proxyAmount"`
	VpcId                string `json:"vpcId"`
	SubnetId             string `json:"subnetId"`
	SrcClusterId         string `json:"srcClusterId,omitempty"`
	SnapshotId           string `json:"snapshotId,omitempty"`
	Pit                  string `json:"pit,omitempty"`
	LowerCaseTableNames  string `json:"lowercaseTableNames,omitempty"`
	ComputeTplId         string `json:"computeTplId,omitempty"`
}

type Interface

type Interface struct {
	AppId               string   `json:"appId"`
	InterfaceId         string   `json:"interfaceId"`
	Status              string   `json:"status"`
	CreateTime          string   `json:"createTime"`
	InstanceBinding     []string `json:"instanceBinding"`
	NewInstanceAutoJoin int      `json:"newInstanceAutoJoin"`
	ReadWriteMode       string   `json:"readWriteMode"`
	InterfaceType       string   `json:"interfaceType"`
	MasterReadable      int      `json:"masterReadable"`
	Access              Access   `json:"access"`
	Flavor              Flavor   `json:"flavor"`
	Proxies             []Proxy  `json:"proxies"`
}

type InterfaceInfo

type InterfaceInfo struct {
	MasterReadable  int      `json:"masterReadable"`
	AddressName     string   `json:"addressName"`
	InstanceBinding []string `json:"instanceBinding"`
}

type InterfaceListResult

type InterfaceListResult struct {
	Interfaces []Interface `json:"interfaces"`
}

type Interfacee

type Interfacee struct {
	AddressName     string   `json:"addressName,omitempty"`
	InstanceBinding []string `json:"instanceBinding,omitempty"`
	ProxyAmount     int      `json:"proxyAmount,omitempty"`
	ReadWriteMode   string   `json:"readWriteMode,omitempty"`
	MasterReadable  int      `json:"masterReadable,omitempty"`
}

type LbInfos

type LbInfos struct {
	LbId string `json:"lbId"`
	LbIp string `json:"lbIp"`
	Eip  string `json:"eip"`
}

type LeaderCluster

type LeaderCluster struct {
	ClusterId    string `json:"clusterId"`
	ClusterName  string `json:"clusterName"`
	Region       string `json:"region"`
	Azone        string `json:"azone"`
	Status       string `json:"status"`
	ScaleOutFlag bool   `json:"scaleOutFlag"`
}

type ListParamTempArgs

type ListParamTempArgs struct {
	Detail   int    `json:"detail,omitempty"`
	Type     string `json:"type,omitempty"`
	PageNo   int    `json:"pageNo,omitempty"`
	PageSize int    `json:"pageSize,omitempty"`
}

type ListParamTempResult

type ListParamTempResult struct {
	ParamTemplates []ParamTemplate `json:"paramTemplates"`
}

type MaintenTime

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

type MaintenTimeDetail

type MaintenTimeDetail struct {
	MaintenTime MaintenTime `json:"maintenTime"`
}

type Marker

type Marker struct {
	Marker  string
	MaxKeys int
}

type ModifyParamsArgs

type ModifyParamsArgs struct {
	Params ParamsItem `json:"params"`
}

type MultiactiveGroupDetailResult

type MultiactiveGroupDetailResult struct {
	MultiActiveGroupInfo MultiactiveGroupInfo `json:"multiActiveGroupInfo"`
}

type MultiactiveGroupInfo

type MultiactiveGroupInfo struct {
	MultiActiveGroupId   string            `json:"multiActiveGroupId"`
	MultiActiveGroupName string            `json:"multiActiveGroupName"`
	Status               string            `json:"status"`
	CreateTime           string            `json:"createTime"`
	LeaderCluster        LeaderCluster     `json:"leaderCluster"`
	FollowerClusterList  []FollowerCluster `json:"followerClusterList"`
}

type MultiactiveGroupListResult

type MultiactiveGroupListResult struct {
	MultiActiveGroupInfoList []MultiactiveGroupInfo `json:"multiActiveGroupInfoList"`
}

type NewInstanceAutoJoinArgs

type NewInstanceAutoJoinArgs struct {
	AutoJoinRequestItems []AutoJoinRequestItem `json:"autoJoinRequestItems"`
}

type OrderId

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

type OrderInfo

type OrderInfo struct {
	Status string `json:"status"`
}

type Pagination

type Pagination struct {
	TotalKeys int64 `json:"totalKeys"`
}

type Param

type Param struct {
	Status        string `json:"status"`
	UpdateTime    string `json:"updateTime"`
	Type          string `json:"type"`
	Name          string `json:"name"`
	CaseSensitive bool   `json:"caseSensitive"`
	Modifiable    bool   `json:"modifiable"`
	CreateTime    string `json:"createTime"`
	Attention     string `json:"attention"`
	Precision     int    `json:"precision"`
	Value         string `json:"value"`
	AllowedValues string `json:"allowedValues"`
	BestValue     string `json:"bestValue"`
	Id            int64  `json:"id"`
	Description   string `json:"description"`
	AllowEmpty    bool   `json:"allowEmpty"`
}

type ParamTempArgs

type ParamTempArgs struct {
	Type        string `json:"type"`
	Version     string `json:"version"`
	Description string `json:"description"`
	Name        string `json:"name"`
	Source      string `json:"source"`
}

type ParamTemplate

type ParamTemplate struct {
	Uuid        string `json:"uuid"`
	Name        string `json:"name"`
	Type        string `json:"type"`
	Version     string `json:"version"`
	Description string `json:"description"`
	IsReboot    bool   `json:"isReboot"`
	ParamAmount int    `json:"paramAmount"`
	Status      string `json:"status"`
	IsSystem    bool   `json:"isSystem"`
	UserId      string `json:"userId,omitempty"`
	UserName    string `json:"userName,omitempty"`
	CreateTime  string `json:"createTime"`
	UpdateTime  string `json:"updateTime"`
}

type ParamTemplateDetail

type ParamTemplateDetail struct {
	ParamTemplate ParamTemplate `json:"paramTemplate"`
}

type ParamTemplateHistory

type ParamTemplateHistory struct {
	Records []ParamTemplateRecord `json:"records"`
}

type ParamTemplateRecord

type ParamTemplateRecord struct {
	Action          string `json:"action"`
	Name            string `json:"name"`
	ParamTemplateId string `json:"paramTemplateId"`
	RequestId       string `json:"requestId"`
	Id              int64  `json:"id"`
	ErrMsg          string `json:"errMsg"`
	AfterValue      string `json:"afterValue"`
	StartTime       string `json:"startTime"`
	FinishTime      string `json:"finishTime"`
}

type Params

type Params struct {
	Params []string `json:"params"`
}

type ParamsItem

type ParamsItem map[string]interface{}

type PasswordArgs

type PasswordArgs struct {
	Password string `json:"password"`
	Etag     string `json:"etag"`
}

type PriceResult

type PriceResult struct {
	Price        float32 `json:"price"`
	CatalogPrice float32 `json:"catalogPrice,omitempty"`
}

type PrivilegesArgs

type PrivilegesArgs struct {
	DatabasePrivileges []DatabasePrivilege `json:"databasePrivileges"`
	Etag               string              `json:"etag"`
}

type Proxy

type Proxy struct {
	Id      int    `json:"id"`
	ProxyId string `json:"proxyId"`
}

type QueryPriceArgs

type QueryPriceArgs struct {
	Number        int          `json:"number"`
	InstanceParam InstanceInfo `json:"instanceParam"`
	ProductType   string       `json:"productType"`
	Duration      int          `json:"duration"`
}

type QueryResizePriceArgs

type QueryResizePriceArgs struct {
	ClusterId           string     `json:"clusterId"`
	ResizeType          string     `json:"resizeType"`
	SlaveId             string     `json:"slaveId"`
	AllocatedCpuInCore  int        `json:"allocatedCpuInCore"`
	AllocatedMemoryInMB int        `json:"allocatedMemoryInMB"`
	ProxyAmount         int        `json:"proxyAmount"`
	InterfaceId         string     `json:"interfaceId"`
	Interfacee          Interfacee `json:"interfacee"`
}

type RebootInstanceArgs

type RebootInstanceArgs struct {
	ExecuteAction string `json:"executeAction"`
}

type Record

type Record struct {
	Status      string `json:"status"`
	FinishTime  string `json:"finishTime"`
	Name        string `json:"name"`
	StartTime   string `json:"startTime"`
	AfterValue  string `json:"afterValue"`
	BeforeValue string `json:"beforeValue"`
	TaskId      int64  `json:"taskId"`
	Id          int64  `json:"id"`
}

type RemarkArgs

type RemarkArgs struct {
	Remark string `json:"remark"`
	Etag   string `json:"etag"`
}

type RenameMultiactiveGroupArgs

type RenameMultiactiveGroupArgs struct {
	MultiActiveGroupName string `json:"multiActiveGroupName"`
}

type ResizeClusterArgs

type ResizeClusterArgs struct {
	ResizeType          string     `json:"resizeType"`
	SlaveId             string     `json:"slaveId,omitempty"`
	AllocatedCpuInCore  int        `json:"allocatedCpuInCore,omitempty"`
	AllocatedMemoryInMB int        `json:"allocatedMemoryInMB,omitempty"`
	ProxyAmount         int        `json:"proxyAmount,omitempty"`
	InterfaceId         int        `json:"interfaceId,omitempty"`
	Interfacee          Interfacee `json:"interfacee"`
}

type Resource

type Resource struct {
	ResourceId string `json:"resourceId"`
	Tags       []Tag  `json:"tags"`
}

type SlowSqlAdvice

type SlowSqlAdvice struct {
	Advice string `json:"advice"`
	Title  string `json:"title"`
}

type SlowSqlAdviceDetail

type SlowSqlAdviceDetail struct {
	IndexAdvice     []SlowSqlAdvice `json:"indexAdvice"`
	StatementAdvice []SlowSqlAdvice `json:"statementAdvice"`
}

type SlowSqlDetailDetail

type SlowSqlDetailDetail struct {
	Items      []SlowSqlDetailItem `json:"items"`
	TotalCount int64               `json:"totalCount"`
}

type SlowSqlDetailItem

type SlowSqlDetailItem struct {
	AffectedRows int64  `json:"affectedRows"`
	App          string `json:"app"`
	ClientHost   string `json:"clientHost"`
	ClientIP     string `json:"clientIP"`
	Cluster      string `json:"cluster"`
	ConnectionId int    `json:"connectionId"`
	CurrentDB    string `json:"currentDB"`
	Digest       string `json:"digest"`
	Duration     string `json:"duration"`
	ExaminedRows int64  `json:"examinedRows"`
	LockTime     string `json:"lockTime"`
	Node         string `json:"node"`
	NumRows      int64  `json:"numRows"`
	SqlId        string `json:"sqlId"`
	Start        string `json:"start"`
	User         string `json:"user"`
}

type Snapshot

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

type SnapshotList

type SnapshotList struct {
	Snapshots []Snapshot `json:"snapshots"`
}

type SnapshotPolicy

type SnapshotPolicy struct {
	Policys []SnapshotPolicyPolicy `json:"policys"`
}

type SnapshotPolicyPolicy

type SnapshotPolicyPolicy struct {
	PolicyID                  string                     `json:"policyID"`
	PolicyName                string                     `json:"policyName"`
	DataBackupWeekDay         []string                   `json:"dataBackupWeekDay"`
	DataBackupTime            string                     `json:"dataBackupTime"`
	DataBackupRetainStrategys []DataBackupRetainStrategy `json:"dataBackupRetainStrategys"`
	LogBackupRetainDays       int                        `json:"logBackupRetainDays"`
	SpeedLimitBytesPerSec     int                        `json:"speedLimitBytesPerSec"`
	EncryptStrategy           EncryptStrategy            `json:"encryptStrategy"`
}

type Tag

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

type TaskId

type TaskId struct {
	TaskId int `json:"taskId"`
}

type TaskItem

type TaskItem struct {
	TaskId           int64    `json:"taskId"`
	Region           string   `json:"region"`
	StartTime        string   `json:"startTime"`
	EndTime          string   `json:"endTime"`
	TaskName         string   `json:"taskName"`
	ClusterId        string   `json:"clusterId"`
	ClusterName      string   `json:"clusterName"`
	TaskStatus       string   `json:"taskStatus"`
	SupportedOperate []string `json:"supportedOperate"`
}

type TaskList

type TaskList struct {
	Task []TaskItem `json:"task"`
}

type TaskListArgs

type TaskListArgs struct {
	Region    string `json:"region,omitempty"`
	StartTime string `json:"startTime"`
	EndTime   string `json:"endTime,omitempty"`
}

type UpdateDnsNameArgs

type UpdateDnsNameArgs struct {
	InterfaceId string `json:"instanceId"`
	DnsName     string `json:"dnsName"`
}

type UpdateInterfaceArgs

type UpdateInterfaceArgs struct {
	InterfaceId string        `json:"instanceId"`
	Interface   InterfaceInfo `json:"interface"`
}

type UpdateMaintenTimeArgs

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

type UpdateParamTplArgs

type UpdateParamTplArgs struct {
	Name        string `json:"name"`
	Description string `json:"description"`
}

type UpdateParamsArgs

type UpdateParamsArgs struct {
	Params ParamsItem `json:"params"`
	Timing string     `json:"timing"`
}

type UpdateSnapshotPolicyArgs

type UpdateSnapshotPolicyArgs struct {
	DataBackupWeekDay         []string                   `json:"dataBackupWeekDay"`
	DataBackupRetainStrategys []DataBackupRetainStrategy `json:"dataBackupRetainStrategys"`
	DataBackupTime            string                     `json:"dataBackupTime"`
}

type WhiteList

type WhiteList struct {
	AuthIps []string `json:"authIps"`
	Etag    string   `json:"etag"`
}

Jump to

Keyboard shortcuts

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