mongodb

package
v0.9.182 Latest Latest
Warning

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

Go to latest
Published: May 29, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

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

mongodb.go - the mongodb APIs definition supported by the MONGODB service

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

Index

Constants

View Source
const (
	URI_PREFIX          = bce.URI_PREFIX + "v1"
	DEFAULT_ENDPOINT    = "mongodb.bj.baidubce.com"
	REQUEST_MONGODB_URL = "/instance"
)
View Source
const (
	DEFAULT_PAGE_SIZE = 10
	DEFAULT_PAGE_NUM  = 1
	S_SHARDING        = "sharding"
	S_REPLICA         = "replica"
	S_POSTPAID        = "Postpaid"
	S_PREPAID         = "Prepaid"
)

Variables

This section is empty.

Functions

func Aes128EncryptUseSecreteKey

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

Types

type AssignTagArgs

type AssignTagArgs struct {
	Resources []LogicAssignResource `json:"resources,omitempty"` // 资源列表
}

type AutoRenewModel added in v0.9.177

type AutoRenewModel struct {
	AutoRenewLength   int    `json:"autoRenewLength,omitempty"`   // 到期后续费的时长(月),取值范围为[0,1,2,3,4,5,6,7,8,9,12,24,36]。0表示关闭自动续费,否则为开启自动续费。
	AutoRenewTimeUnit string `json:"autoRenewTimeUnit,omitempty"` // 时间单位,取值范围为["Month"],当前仅支持按月
}

type BackupDetail

type BackupDetail struct {
	BackupId          string    `json:"backupId,omitempty"`
	BackupSize        string    `json:"backupSize,omitempty"`
	BackupMethod      string    `json:"backupMethod,omitempty"`
	BackupMode        string    `json:"backupMode,omitempty"`
	BackupType        string    `json:"backupType,omitempty"`
	BackupStatus      string    `json:"backupStatus,omitempty"`
	BackupStartTime   time.Time `json:"backupStartTime,omitempty"`
	BackupEndTime     time.Time `json:"backupEndTime,omitempty"`
	DownloadURL       string    `json:"downloadUrl,omitempty"`
	DownloadExpires   string    `json:"downloadExpires,omitempty"`
	BackupDescription string    `json:"backupDescription,omitempty"`
}

type BackupModel

type BackupModel struct {
	BackupId          string    `json:"backupId,omitempty"`          // 备份ID
	BackupSize        string    `json:"backupSize,omitempty"`        // 备份大小。单位Byte
	BackupMethod      string    `json:"backupMethod,omitempty"`      // 备份方式,取值参考
	BackupMode        string    `json:"backupMode,omitempty"`        // 备份模式,取值参考
	BackupType        string    `json:"backupType,omitempty"`        // 备份类型,取值参考
	BackupStatus      string    `json:"backupStatus,omitempty"`      // 备份状态,取值参考
	BackupStartTime   time.Time `json:"backupStartTime,omitempty"`   // 备份开始时间
	BackupEndTime     time.Time `json:"backupEndTime,omitempty"`     // 备份结束时间
	BackupDescription string    `json:"backupDescription,omitempty"` // 备份详情
}

type BackupPolicy

type BackupPolicy struct {
	AutoBackupEnable          string `json:"autoBackupEnable,omitempty"`
	PreferredBackupPeriod     string `json:"preferredBackupPeriod,omitempty"`
	PreferredBackupTime       string `json:"preferredBackupTime,omitempty"`
	BackupRetentionPeriod     int    `json:"backupRetentionPeriod,omitempty"`
	EnableIncrementBackup     int    `json:"enableIncrementBackup,omitempty"`
	BackupMethod              string `json:"backupMethod,omitempty"`
	IncrBackupRetentionPeriod int    `json:"incrBackupRetentionPeriod,omitempty"`
}

type BillingModel

type BillingModel struct {
	PaymentTiming string         `json:"paymentTiming,omitempty"` // 付费方式
	Reservation   Reservation    `json:"reservation,omitempty"`   // 保留信息
	AutoRenew     AutoRenewModel `json:"autoRenew,omitempty"`     // 自动续费
}

type Client

type Client struct {
	*bce.BceClient
}

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

func NewClient

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

func (*Client) AddSecurityIps

func (c *Client) AddSecurityIps(instanceId string, args *SecurityIpModel) error

AddSecurityIps - add SecurityIps

PARAMS:

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

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) CreateBackup

func (c *Client) CreateBackup(instanceId string, backupMethod string, backupDescription string) (*CreateBackupResult, error)

CreateBackup - Create a Backup of mongodb Instance

PARAMS:

  • instanceId: the specific mongodb Instance's ID
  • backupMethod: backup method
  • backupDescription: backup description

RETURNS:

  • *CreateBackupResult: Backup Result
  • error: nil if success otherwise the specific error

func (*Client) CreateReplica

func (c *Client) CreateReplica(args *CreateReplicaArgs) (*CreateResult, error)

CreateReplica - create a Replica MONGODB with the specific parameters

PARAMS:

  • args: the arguments to create a mongodb

RETURNS:

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

func (*Client) CreateSharding

func (c *Client) CreateSharding(args *CreateShardingArgs) (*CreateResult, error)

CreateSharding - create a Sharding MONGODB with the specific parameters

PARAMS:

  • args: the arguments to create a mongodb

RETURNS:

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

func (*Client) DeleteBackup

func (c *Client) DeleteBackup(instanceId string, backupId string) error

DeleteBackup - delete Backup

PARAMS:

  • instanceId: the specific instanceId
  • backupId: id of the backup

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) DeleteMongodb

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

DeleteMongodb - delete a MONGODB / 从回收站删除一个MONGODB实例

PARAMS:

  • instanceId: the specific instanceId

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) DeleteMongodbs

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

DeleteMongodbs - delete MONGODBs / 从回收站删除若干个MONGODB实例

PARAMS:

  • instanceIds: the specific instanceIds

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) DeleteSecurityIps

func (c *Client) DeleteSecurityIps(instanceId string, args *SecurityIpModel) error

DeleteSecurityIps - delete SecurityIps

PARAMS:

  • instanceId: the specific Instance's ID
  • args: the arguments to delete SecurityIps

RETURNS:

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

func (*Client) GetBackupDetail

func (c *Client) GetBackupDetail(instanceId string, backupId string) (*BackupDetail, error)

GetBackupDetail - get backup detail of the instance's backup

PARAMS:

  • instanceId: the specific instanceId
  • backupId: id of the backup

RETURNS:

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

func (*Client) GetBackupPolicy

func (c *Client) GetBackupPolicy(instanceId string) (*BackupPolicy, error)

GetBackupPolicy - get BackupPolicy of a specific mongodb Instance

PARAMS:

  • instanceId: the specific instanceId

RETURNS:

  • *BackupPolicy: the Backup Policy of the instance
  • error: nil if success otherwise the specific error

func (*Client) GetInstanceDetail

func (c *Client) GetInstanceDetail(instanceId string) (*InstanceDetail, error)

GetInstanceDetail - get a specific mongodb Instance's detail

PARAMS:

  • instanceId: the specific mongodb Instance's ID

RETURNS:

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

func (*Client) GetReadonlyNodes

func (c *Client) GetReadonlyNodes(instanceId string) (*GetReadonlyNodesResult, error)

GetReadonlyNodes - get ReadonlyNodes list

PARAMS:

  • instanceId: the specific mongodb Instance's ID

RETURNS:

  • *GetReadonlyNodesResult: the specific ReadonlyNodes list
  • error: nil if success otherwise the specific error

func (*Client) GetSecurityIps

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

GetSecurityIps - get all SecurityIps

PARAMS:

  • instanceId: the specific Instance's ID

RETURNS:

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

func (*Client) InstanceAssignTags

func (c *Client) InstanceAssignTags(instanceId string, tags []TagModel) error

InstanceAssignTags - update tags of instance / 全量更新实例绑定的标签,即覆盖更新 PARAMS:

  • instanceId: the specific mongodb Instance's ID
  • tags: tag args

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) InstanceBindTags

func (c *Client) InstanceBindTags(instanceId string, tags []TagModel) error

InstanceBindTags - add tags of instance / 增加实例绑定的标签,即追加更新 PARAMS:

  • instanceId: the specific mongodb Instance's ID
  • tags: tag args

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) InstanceUnbindTags

func (c *Client) InstanceUnbindTags(instanceId string, tags []TagModel) error

InstanceUnbindTags - unbind tags of instance / 减少实例绑定的标签 PARAMS:

  • instanceId: the specific mongodb Instance's ID
  • tags: tag args

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) ListBackup

func (c *Client) ListBackup(instanceId string, args *ListBackupArgs) (*ListBackupResult, error)

ListBackup - list all Backup with the specific parameters

PARAMS:

  • instanceId: the specific mongodb Instance's ID
  • args: the arguments to list all MONGODB backup

RETURNS:

  • *ListBackupResult: the result of list all Backup
  • error: nil if success otherwise the specific error

func (*Client) ListLogFiles

func (c *Client) ListLogFiles(instanceId string, args *ListLogFilesArgs) (*ListLogFilesResult, error)

ListLogFiles - get log list PARAMS:

  • instanceId: the specific Instance's ID
  • args: the arguments to get log list

RETURNS:

  • *ListLogFilesResult: the result of log list
  • error: nil if success otherwise the specific error

func (*Client) ListMongodb

func (c *Client) ListMongodb(args *ListMongodbArgs) (*ListMongodbResult, error)

ListMongodb - list MONGODB with the specific parameters

PARAMS:

  • args: the arguments to list MONGODB

RETURNS:

  • *ListMongodbResult: the result of list MONGODB, contains mongodb' meta
  • error: nil if success otherwise the specific error

func (*Client) MigrateAzone

func (c *Client) MigrateAzone(instanceId string, args *MigrateAzoneArgs) error

MigrateAzone - Migrate Azone of MONGODB with the specific parameters / 迁移可用区

PARAMS:

  • instanceId: the specific mongodb Instance's ID
  • args: the arguments to create a mongodb

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) ModifyBackupDescription

func (c *Client) ModifyBackupDescription(instanceId string, backupId string, args *ModifyBackupDescriptionArgs) error

ModifyBackupDescription - modify backup description

PARAMS:

  • instanceId: the specific instanceId
  • backupId: id of the backup
  • args: the arguments to modify backup description

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) ModifyBackupPolicy

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

ModifyBackupPolicy - modify backup policy

PARAMS:

  • instanceId: the specific instanceId
  • args: the arguments to modify backup policy

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) RecoverMongodbs

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

RecoverMongodbs - delete MONGODBs / 从回收站恢复若干个MONGODB实例

PARAMS:

  • instanceIds: the specific instanceIds

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) RefundInstance added in v0.9.180

func (c *Client) RefundInstance(instanceId string, args *RefundModel) (*OrderUuidResult, error)

RefundInstance - Refund a specified instance

PARAMS:

  • instanceId: the specific instanceId
  • args: the arguments to Refund instance

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) ReleaseMongodb

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

ReleaseMongodb - release a MONGODB / 将一个MONGODB实例放入回收站

PARAMS:

  • instanceId: the specific instanceId

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) ReleaseMongodbs

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

ReleaseMongodbs - release MONGODBs / 将若干个MONGODB实例放入回收站

PARAMS:

  • instanceIds: the specific instanceIds

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) ReplicaAddReadonlyNodes

func (c *Client) ReplicaAddReadonlyNodes(instanceId string, args *ReplicaAddReadonlyNodesArgs) (*ReplicaAddReadonlyNodesResult, error)

ReplicaAddReadonlyNodes - Replica Add some ReadonlyNodes with the specific parameters / 副本集实例添加只读节点

PARAMS:

  • instanceId: the specific instanceId
  • args: the arguments to Replica Add some ReadonlyNodes

RETURNS:

  • *ReplicaAddReadonlyNodesResult: the result of Replica Add some ReadonlyNodes
  • error: nil if success otherwise the specific error

func (*Client) ReplicaResize

func (c *Client) ReplicaResize(instanceId string, args *ReplicaResizeArgs) error

ReplicaResize - Resize a Replica with the specific parameters / 副本集实例改配

PARAMS:

  • instanceId: the specific instanceId
  • args: the arguments to Resize a Replica

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) ReplicaSwitch

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

ReplicaSwitch - Switch a Replica / 副本集实例主从切换

PARAMS:

  • instanceId: the specific instanceId

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) RestartMongodb

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

RestartMongodb - Restart a MONGODB

PARAMS:

  • instanceId: the specific instanceId

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) RestartMongodbs

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

RestartMongodbs - Restart MONGODBs

PARAMS:

  • instanceIds: the specific instanceIds

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) RestartShardingComponent

func (c *Client) RestartShardingComponent(instanceId string, nodeId string) error

RestartShardingComponent - Restart a Sharding Component

PARAMS:

  • instanceId: the specific instanceId
  • nodeId: the specific nodeId

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) ShardingAddComponent

func (c *Client) ShardingAddComponent(instanceId string, args *ShardingAddComponentArgs) (*ShardingAddComponentResult, error)

ShardingAddComponent - create a Component with the specific parameters / 分片集实例新增组件

PARAMS:

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

RETURNS:

  • *ShardingAddComponentResult: the result of Add Component
  • error: nil if success otherwise the specific error

func (*Client) ShardingComponentResize

func (c *Client) ShardingComponentResize(instanceId string, nodeId string, args *ShardingComponentResizeArgs) error

ShardingComponentResize - Resize a Sharding Component with the specific parameters / 分片集实例组件改配

PARAMS:

  • instanceId: the specific instanceId
  • nodeId: the specific nodeId
  • args: the arguments to Resize a Sharding Component

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) ShardingComponentSwitch

func (c *Client) ShardingComponentSwitch(instanceId string, nodeId string) error

ShardingComponentSwitch - Switch a Sharding / 分片集实例组件主从切换

PARAMS:

  • instanceId: the specific instanceId
  • nodeId: the specific nodeId

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) StartLogging

func (c *Client) StartLogging(instanceId string, args *StartLoggingArgs) error

StartLogging - start Logging PARAMS:

  • instanceId: the specific Instance's ID
  • args: the arguments to start Logging

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) UpdateAccountPassword

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

UpdateAccountPassword - update account's password

PARAMS:

  • instanceId: the specific instanceId
  • args: the arguments to update account's password

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:

  • instanceId: the specific instanceId
  • args: the arguments to update instanceName

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) UpdateShardingComponentName

func (c *Client) UpdateShardingComponentName(instanceId string, nodeId string, args *UpdateComponentNameArgs) error

UpdateShardingComponentName - update name of a specified Component

PARAMS:

  • instanceId: the specific instanceId
  • nodeId: the specific nodeId
  • args: the arguments to update Component Name

RETURNS:

  • error: nil if success otherwise the specific error

type CreateBackupArgs

type CreateBackupArgs struct {
	BackupMethod      string `json:"backupMethod,omitempty"`
	BackupDescription string `json:"backupDescription,omitempty"`
}

type CreateBackupResult

type CreateBackupResult struct {
	BackupId string `json:"backupId,omitempty"`
}

type CreateReplicaArgs

type CreateReplicaArgs struct {
	ClientToken              string       `json:"-"`
	Billing                  BillingModel `json:"billing,omitempty"`
	PurchaseCount            int          `json:"purchaseCount,omitempty"`            // 批量创建实例个数
	DbInstanceName           string       `json:"dbInstanceName,omitempty"`           // 用户自定义实例名
	StorageEngine            string       `json:"storageEngine,omitempty"`            // 存储引擎
	EngineVersion            string       `json:"engineVersion,omitempty"`            // 数据库版本
	DbInstanceType           string       `json:"dbInstanceType,omitempty"`           // 实例类型
	DbInstanceCpuCount       int          `json:"dbInstanceCpuCount,omitempty"`       // 副本集实例CPU规格
	DbInstanceMemoryCapacity int          `json:"dbInstanceMemoryCapacity,omitempty"` // 副本集实例内存规格,单位GB
	DbInstanceStorage        int          `json:"dbInstanceStorage,omitempty"`        // 副本集实例存储规格,单位GB
	AccountPassword          string       `json:"accountPassword,omitempty"`          // root账号的密码
	DbInstanceStorageType    string       `json:"dbInstanceStorageType,omitempty"`    // 实例存储类型
	VotingMemberNum          int          `json:"votingMemberNum,omitempty"`          // 副本集实例投票节点数量
	ReadonlyNodeNum          int          `json:"readonlyNodeNum,omitempty"`          // 副本集实例只读节点数量
	SrcDbInstanceId          string       `json:"srcDbInstanceId,omitempty"`          // 源实例ID
	BackupId                 string       `json:"backupId,omitempty"`                 // 备份ID
	VpcId                    string       `json:"vpcId,omitempty"`                    // VPC ID
	Subnets                  []SubnetMap  `json:"subnets,omitempty"`                  // 子网列表
	RestoreTime              string       `json:"restoreTime,omitempty"`              // 恢复时间点
	Tags                     []TagModel   `json:"tags,omitempty"`                     // 标签列表
	ResGroupId               string       `json:"resGroupId,omitempty"`               // 资源组ID
}

type CreateResult

type CreateResult struct {
	DbInstanceSimpleModels []DbInstanceSimpleModel `json:"dbInstanceSimpleModels"`
}

type CreateShardingArgs

type CreateShardingArgs struct {
	ClientToken          string       `json:"-"`
	Billing              BillingModel `json:"billing,omitempty"`
	PurchaseCount        int          `json:"purchaseCount,omitempty"`
	DbInstanceName       string       `json:"dbInstanceName,omitempty"`
	StorageEngine        string       `json:"storageEngine,omitempty"`
	EngineVersion        string       `json:"engineVersion,omitempty"`
	DbInstanceType       string       `json:"dbInstanceType,omitempty"`
	MongosCount          int          `json:"mongosCount,omitempty"`
	MongosCpuCount       int          `json:"mongosCpuCount,omitempty"`
	MongosMemoryCapacity int          `json:"mongosMemoryCapacity,omitempty"`
	ShardCount           int          `json:"shardCount,omitempty"`
	ShardCpuCount        int          `json:"shardCpuCount,omitempty"`
	ShardMemoryCapacity  int          `json:"shardMemoryCapacity,omitempty"`
	ShardStorage         int          `json:"shardStorage,omitempty"`
	ShardStorageType     string       `json:"shardStorageType,omitempty"`
	AccountPassword      string       `json:"accountPassword,omitempty"`
	SrcDbInstanceId      string       `json:"srcDbInstanceId,omitempty"`
	BackupId             string       `json:"backupId,omitempty"`
	VpcId                string       `json:"vpcId,omitempty"`
	Subnets              []SubnetMap  `json:"subnets,omitempty"`
	RestoreTime          string       `json:"restoreTime,omitempty"`
	Tags                 []TagModel   `json:"tags,omitempty"`
	ResGroupId           string       `json:"resGroupId,omitempty"`
}

type DbInstanceSimpleModel

type DbInstanceSimpleModel struct {
	DbInstanceId     string `json:"dbInstanceId,omitempty"`     // 实例短ID
	ConnectionString string `json:"connectionString,omitempty"` // 数据库链接字符串
	Port             string `json:"port,omitempty"`             // 数据库连接端口
}

type GetReadonlyNodesResult

type GetReadonlyNodesResult struct {
	ReadOnlyList []ReadonlyNodesList `json:"readOnlyList,omitempty"`
}

type InstanceDetail

type InstanceDetail struct {
	DbInstanceId                   string               `json:"dbInstanceId,omitempty"`
	DbInstanceName                 string               `json:"dbInstanceName,omitempty"`
	DbInstanceUUID                 string               `json:"dbInstanceUUID,omitempty"`
	ConnectionString               string               `json:"connectionString,omitempty"`
	Port                           string               `json:"port,omitempty"`
	EngineVersion                  string               `json:"engineVersion,omitempty"`
	StorageEngine                  string               `json:"storageEngine,omitempty"`
	ResourceGroups                 []ResourceGroupModel `json:"resourceGroups,omitempty"`
	ResourceUuid                   string               `json:"resourceUuid,omitempty"`
	DbInstanceCpuCount             int                  `json:"dbInstanceCpuCount,omitempty"`
	DbInstanceMemoryCapacity       int                  `json:"dbInstanceMemoryCapacity,omitempty"`
	DbInstanceStorage              int                  `json:"dbInstanceStorage,omitempty"`
	DbInstanceStorageType          string               `json:"dbInstanceStorageType,omitempty"`
	DbInstanceType                 string               `json:"dbInstanceType,omitempty"`
	MongosCount                    int                  `json:"mongosCount,omitempty"`
	ShardCount                     int                  `json:"shardCount,omitempty"`
	MongosList                     []NodeModel          `json:"mongosList,omitempty"`
	ShardList                      []NodeModel          `json:"shardList,omitempty"`
	VotingMemberNum                int                  `json:"votingMemberNum,omitempty"`
	ReadonlyNodeNum                int                  `json:"readonlyNodeNum,omitempty"`
	DbInstanceStatus               string               `json:"dbInstanceStatus,omitempty"`
	CreateTime                     time.Time            `json:"createTime,omitempty"`
	ExpireTime                     time.Time            `json:"expireTime,omitempty"`
	VpcId                          string               `json:"vpcId,omitempty"`
	PublicConnectionString         string               `json:"publicConnectionString,omitempty"`
	PublicReadonlyConnectionString string               `json:"publicReadonlyConnectionString,omitempty"`
	ReadOnlyNodeConnectionString   string               `json:"readOnlyNodeConnectionString,omitempty"`
	PaymentTiming                  string               `json:"paymentTiming,omitempty"`
	LogServiceStatus               []LogServiceModel    `json:"logServiceStatus,omitempty"`
	Members                        []MemberModel        `json:"members,omitempty"`
	Subnets                        []SubnetMap          `json:"subnets,omitempty"`
	Tags                           []TagModel           `json:"tags,omitempty"`
}

type InstanceModel

type InstanceModel struct {
	DbInstanceId             string               `json:"dbInstanceId,omitempty"`
	DbInstanceName           string               `json:"dbInstanceName,omitempty"`
	DbInstanceUUID           string               `json:"dbInstanceUUID,omitempty"`
	ConnectionString         string               `json:"connectionString,omitempty"`
	Port                     string               `json:"port,omitempty"`
	StorageEngine            string               `json:"storageEngine,omitempty"`
	EngineVersion            string               `json:"engineVersion,omitempty"`
	ResourceGroups           []ResourceGroupModel `json:"resourceGroups,omitempty"`
	ResourceUuid             string               `json:"resourceUuid,omitempty"`
	DbInstanceType           string               `json:"dbInstanceType,omitempty"`
	DbInstanceStatus         string               `json:"dbInstanceStatus,omitempty"`
	DbInstanceCpuCount       int                  `json:"dbInstanceCpuCount,omitempty"`
	DbInstanceMemoryCapacity int                  `json:"dbInstanceMemoryCapacity,omitempty"`
	DbInstanceStorage        int                  `json:"dbInstanceStorage,omitempty"`
	MongosCount              int                  `json:"mongosCount,omitempty"`
	ShardCount               int                  `json:"shardCount,omitempty"`
	CreateTime               time.Time            `json:"createTime,omitempty"`
	VotingMemberNum          int                  `json:"votingMemberNum,omitempty"`
	ReadonlyNodeNum          int                  `json:"readonlyNodeNum,omitempty"`
	VpcId                    string               `json:"vpcId,omitempty"`
	PaymentTiming            string               `json:"paymentTiming,omitempty"`
	Subnets                  []SubnetMap          `json:"subnets,omitempty"`
	Tags                     []TagModel           `json:"tags,omitempty"`
}

type ListBackupArgs

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

type ListBackupResult

type ListBackupResult struct {
	Marker      string        `json:"marker,omitempty"`
	MaxKeys     int           `json:"maxKeys,omitempty"`
	IsTruncated bool          `json:"isTruncated,omitempty"`
	NextMarker  string        `json:"nextMarker,omitempty"`
	Backups     []BackupModel `json:"backups,omitempty"`
}

type ListLogFilesArgs

type ListLogFilesArgs struct {
	MemberId  string `json:"memberId,omitempty"`
	Type      string `json:"type,omitempty"`
	StartTime string `json:"startTime,omitempty"`
	EndTime   string `json:"endTime,omitempty"`
}

type ListLogFilesResult

type ListLogFilesResult struct {
	Logs []LogFile `json:"logs,omitempty"`
}

type ListMongodbArgs

type ListMongodbArgs struct {
	Marker         string
	MaxKeys        int
	EngineVersion  string
	StorageEngine  string
	DbInstanceType string
}

type ListMongodbResult

type ListMongodbResult struct {
	Marker      string          `json:"marker,omitempty"`
	MaxKeys     int             `json:"maxKeys,omitempty"`
	IsTruncated bool            `json:"isTruncated,omitempty"`
	NextMarker  string          `json:"nextMarker,omitempty"`
	DbInstances []InstanceModel `json:"dbInstances,omitempty"`
}

type LogFile

type LogFile struct {
	Name               string `json:"name,omitempty"`
	StartTime          string `json:"startTime,omitempty"`
	EndTime            string `json:"endTime,omitempty"`
	Size               int    `json:"size,omitempty"`
	DownloadUrl        string `json:"downloadUrl,omitempty"`
	DownloadExpires    int    `json:"downloadExpires,omitempty"`
	DownloadExpireTime string `json:"downloadExpireTime,omitempty"`
}

type LogServiceModel

type LogServiceModel struct {
	Type   string `json:"type,omitempty"`   // 日志类型
	Status string `json:"status,omitempty"` // 日志当前状态
}

type LogicAssignResource

type LogicAssignResource struct {
	ResourceId  string     `json:"resourceId,omitempty"`  // 资源短id
	ServiceType string     `json:"serviceType,omitempty"` // 资源类型
	Tags        []TagModel `json:"tags,omitempty"`        // 标签
}

type MemberModel

type MemberModel struct {
	MemberId    string `json:"memberId,omitempty"`    // 节点IP
	MongoStatus string `json:"mongoStatus,omitempty"` // 节点的mongo状态
	MongoType   string `json:"mongoType,omitempty"`   // 节点的mongo类型
	Readonly    string `json:"readonly,omitempty"`    // 节点是否是只读节点
	ZoneName    string `json:"zoneName,omitempty"`    // 子网所属可用区
	Ip          string `json:"ip,omitempty"`          // 节点内网IP
	MongoHost   string `json:"mongoHost,omitempty"`   // 节点所绑定域名
	Eip         string `json:"eip,omitempty"`         // 节点公网IP
}

type MemberRoleModel

type MemberRoleModel struct {
	SubnetId string `json:"subnetId,omitempty"`
	Role     string `json:"role,omitempty"`
}

type MigrateAzoneArgs

type MigrateAzoneArgs struct {
	Subnets []SubnetMap       `json:"subnets,omitempty"`
	Members []MemberRoleModel `json:"members,omitempty"`
}

type ModifyBackupDescriptionArgs

type ModifyBackupDescriptionArgs struct {
	BackupDescription string `json:"backupDescription,omitempty"`
}

type NodeModel

type NodeModel struct {
	NodeId         string        `json:"nodeId,omitempty"`         // 组件ID
	Name           string        `json:"name,omitempty"`           // 组件名称
	Status         string        `json:"status,omitempty"`         // 组件状态
	CpuCount       int           `json:"cpuCount,omitempty"`       // 组件CPU规格
	MemoryCapacity int           `json:"memoryCapacity,omitempty"` // 组件内存规格
	Storage        int           `json:"storage,omitempty"`        // 组件存储规格
	ConnectString  string        `json:"connectString,omitempty"`  // 组件链接字符串
	StorageType    string        `json:"storageType,omitempty"`    // 组件存储类型
	Members        []MemberModel `json:"members,omitempty"`        // 组件内节点信息
}

type OrderUuidResult added in v0.9.180

type OrderUuidResult struct {
	OrderId string `json:"orderId,omitempty"`
}

type ReadonlyNodesList

type ReadonlyNodesList struct {
	CompId  string   `json:"compId,omitempty"`
	NodeIds []string `json:"nodeIds,omitempty"`
}

type RefundModel added in v0.9.180

type RefundModel struct {
	RefundType   string `json:"refundType,omitempty"`   // 退款类型。"ALL"表示资源全生命周期退订。
	RefundReason string `json:"refundReason,omitempty"` // 退款原因。最大字符数4096。
}

type ReplicaAddReadonlyNodesArgs

type ReplicaAddReadonlyNodesArgs struct {
	ClientToken     string    `json:"-"`
	DbInstanceId    string    `json:"dbInstanceId,omitempty"`
	ReadonlyNodeNum int       `json:"readonlyNodeNum,omitempty"`
	Subnet          SubnetMap `json:"subnet,omitempty"`
}

type ReplicaAddReadonlyNodesResult

type ReplicaAddReadonlyNodesResult struct {
	OrderId           string   `json:"orderId,omitempty"`
	ReadonlyMemberIds []string `json:"readonlyMemberIds,omitempty"`
}

type ReplicaResizeArgs

type ReplicaResizeArgs struct {
	ClientToken              string `json:"-"`
	DbInstanceCpuCount       int    `json:"dbInstanceCpuCount,omitempty"`
	DbInstanceMemoryCapacity int    `json:"dbInstanceMemoryCapacity,omitempty"`
	DbInstanceStorage        int    `json:"dbInstanceStorage,omitempty"`
}

type Reservation

type Reservation struct {
	ReservationLength   int    `json:"reservationLength,omitempty"`   // 时长
	ReservationTimeUnit string `json:"reservationTimeUnit,omitempty"` // 时间单位,Month
}

type ResourceGroupModel

type ResourceGroupModel struct {
	AccountId  string `json:"accountId,omitempty"`
	BindTime   string `json:"bindTime,omitempty"`
	CreateTime string `json:"createTime,omitempty"`
	DeleteTime string `json:"deleteTime,omitempty"`
	Extra      string `json:"extra,omitempty"`
	GroupId    string `json:"groupId,omitempty"`
	Name       string `json:"name,omitempty"`
	ParentUuid string `json:"parentUuid,omitempty"`
	UpdateTime string `json:"updateTime,omitempty"`
	UserId     string `json:"userId,omitempty"`
}

type RestartMongodbsArgs

type RestartMongodbsArgs struct {
	DbInstanceIds []string `json:"dbInstanceIds,omitempty"`
}

type SecurityIpModel

type SecurityIpModel struct {
	SecurityIps []string `json:"securityIps,omitempty"`
}

type ShardingAddComponentArgs

type ShardingAddComponentArgs struct {
	ClientToken        string `json:"-"`
	DbInstanceId       string `json:"dbInstanceId,omitempty"`
	NodeCpuCount       int    `json:"nodeCpuCount,omitempty"`
	NodeMemoryCapacity int    `json:"nodeMemoryCapacity,omitempty"`
	NodeStorage        int    `json:"nodeStorage,omitempty"`
	NodeType           string `json:"nodeType,omitempty"`
	PurchaseCount      int    `json:"purchaseCount,omitempty"`
}

type ShardingAddComponentResult

type ShardingAddComponentResult struct {
	NodeIds []string `json:"nodeIds"`
}

type ShardingComponentResizeArgs

type ShardingComponentResizeArgs struct {
	ClientToken        string `json:"-"`
	DbInstanceId       string `json:"dbInstanceId,omitempty"`
	NodeId             string `json:"nodeId,omitempty"`
	NodeCpuCount       int    `json:"nodeCpuCount,omitempty"`
	NodeMemoryCapacity int    `json:"nodeMemoryCapacity,omitempty"`
	NodeStorage        int    `json:"nodeStorage,omitempty"`
}

type StartLoggingArgs

type StartLoggingArgs struct {
	Type string `json:"type,omitempty"`
}

type SubnetMap

type SubnetMap struct {
	SubnetId string `json:"subnetId,omitempty"` // 子网短ID
	ZoneName string `json:"zoneName,omitempty"` // 子网所属可用区
}

type TagModel

type TagModel struct {
	TagKey   string `json:"tagKey,omitempty"`   // 标签键
	TagValue string `json:"tagValue,omitempty"` // 标签值
}

type UpdateComponentNameArgs

type UpdateComponentNameArgs struct {
	NodeName string `json:"nodeName"`
}

type UpdateInstanceNameArgs

type UpdateInstanceNameArgs struct {
	DbInstanceName string `json:"dbInstanceName"`
}

type UpdatePasswordArgs

type UpdatePasswordArgs struct {
	AccountPassword string `json:"accountPassword"`
}

type UpdateTagArgs

type UpdateTagArgs struct {
	DbInstanceId string     `json:"dbInstanceId,omitempty"`
	Tags         []TagModel `json:"tags,omitempty"` // 标签
}

Jump to

Keyboard shortcuts

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