Documentation ¶
Index ¶
- Variables
- func DisableAutoExpand(c *golangsdk.ServiceClient, instanceId string) error
- func EnableAutoExpand(c *golangsdk.ServiceClient, opts EnableAutoExpandOpts) error
- func List(client *golangsdk.ServiceClient, opts ListRdsBuilder) pagination.Pager
- func ListErrorLog(client *golangsdk.ServiceClient, opts DbErrorlogBuilder, instanceID string) pagination.Pager
- func ListSlowLog(client *golangsdk.ServiceClient, opts DbSlowLogBuilder, instanceID string) pagination.Pager
- type ActionInstanceBuilder
- type AutoExpansion
- type BackupStrategy
- type ChargeInfo
- type ChargeResponse
- type ConfigParams
- type CreateOpts
- type CreateRdsBuilder
- type CreateReplicaOpts
- type CreateResponse
- type CreateResult
- type Datastore
- type DbErrorlogBuilder
- type DbErrorlogOpts
- type DbSlowLogBuilder
- type DbSlowLogOpts
- type DeleteInstanceBuilder
- type DeleteOpts
- type DeleteResponse
- type DeleteResult
- type EnableAutoExpandOpts
- type Engine
- type EnlargeVolumeOpts
- type EnlargeVolumeResp
- type EnlargeVolumeResult
- type EnlargeVolumeSize
- type ErrorLogPage
- type ErrorLogResp
- type ErrorLogResult
- type ErrorResponse
- type Errorlog
- type GetConfigurationResp
- type GetConfigurationResult
- type Ha
- type Instance
- type Job
- type ListJob
- type ListOpts
- type ListRdsBuilder
- type ListRdsResponse
- type ListRdsResult
- type ModifyConfigurationOpts
- type ModifyConfigurationResp
- type ModifyConfigurationResult
- type Nodes
- type RDSJobBuilder
- type RDSJobOpts
- type RDSJobResult
- type RdsInstanceResponse
- type RdsPage
- type RebootResp
- type RebootResult
- type RelatedInstance
- type RenameInstanceOpts
- type RenameResult
- type ResizeFlavor
- type ResizeFlavorOpts
- type ResizeFlavorResult
- type RestRootPasswordOpts
- type RestartInstanceOpts
- type RestartResponse
- type RestartResult
- type SingleToHaRds
- type SingleToHaRdsOpts
- type SingleToHaResponse
- type SingleToHaResult
- type SlowLogPage
- type SlowLogResp
- type Slowloglist
- type SpecCode
- type UnchangeableParam
- type VersionInfo
- type Volume
Constants ¶
This section is empty.
Variables ¶
var RequestOpts = golangsdk.RequestOpts{ MoreHeaders: map[string]string{"Content-Type": "application/json", "X-Language": "en-us"}, }
Functions ¶
func DisableAutoExpand ¶
DisableAutoExpand is a method used to remove the volume automatic expansion configuration of RDS instance.
func EnableAutoExpand ¶
func EnableAutoExpand(c *golangsdk.ServiceClient, opts EnableAutoExpandOpts) error
EnableAutoExpand is a method used to configure the volume automatic expansion of RDS instance.
func List ¶
func List(client *golangsdk.ServiceClient, opts ListRdsBuilder) pagination.Pager
func ListErrorLog ¶
func ListErrorLog(client *golangsdk.ServiceClient, opts DbErrorlogBuilder, instanceID string) pagination.Pager
func ListSlowLog ¶
func ListSlowLog(client *golangsdk.ServiceClient, opts DbSlowLogBuilder, instanceID string) pagination.Pager
Types ¶
type ActionInstanceBuilder ¶
type AutoExpansion ¶
type AutoExpansion struct { // Whether the automatic expansion is enabled. SwitchOption bool `json:"switch_option"` // The upper limit of automatic expansion of storage, in GB. // This parameter is mandatory when switch_option is set to true. // The value ranges from 40 GB to 4,000 GB and must be no less than the current storage of the instance. LimitSize int `json:"limit_size"` // The threshold to trigger automatic expansion. // If the available storage drops to this threshold or 10 GB, the automatic expansion is triggered. // This parameter is mandatory when switch_option is set to true. // The valid values are as follows: // + 10 // + 15 // + 20 TriggerThreshold int `json:"trigger_threshold"` }
AutoExpansion is an object that represents the automatic expansion configuration.
func GetAutoExpand ¶
func GetAutoExpand(c *golangsdk.ServiceClient, instanceId string) (*AutoExpansion, error)
GetAutoExpand is a method used to obtain the automatic expansion configuarion of instance storage.
type BackupStrategy ¶
type ChargeInfo ¶
type ChargeResponse ¶
type ChargeResponse struct {
ChargeMode string `json:"charge_mode"`
}
type ConfigParams ¶
type CreateOpts ¶
type CreateOpts struct { Name string `json:"name" required:"true"` Datastore *Datastore `json:"datastore" required:"true"` Ha *Ha `json:"ha,omitempty"` ConfigurationId string `json:"configuration_id,omitempty"` Port string `json:"port,omitempty"` Password string `json:"password" required:"true"` BackupStrategy *BackupStrategy `json:"backup_strategy,omitempty"` EnterpriseProjectId string `json:"enterprise_project_id,omitempty"` DiskEncryptionId string `json:"disk_encryption_id,omitempty"` FlavorRef string `json:"flavor_ref" required:"true"` Volume *Volume `json:"volume" required:"true"` Region string `json:"region" required:"true"` AvailabilityZone string `json:"availability_zone" required:"true"` VpcId string `json:"vpc_id" required:"true"` SubnetId string `json:"subnet_id" required:"true"` SecurityGroupId string `json:"security_group_id" required:"true"` ChargeInfo *ChargeInfo `json:"charge_info,omitempty"` TimeZone string `json:"time_zone,omitempty"` FixedIp string `json:"data_vip,omitempty"` Collation string `json:"collation,omitempty"` UnchangeableParam *UnchangeableParam `json:"unchangeable_param,omitempty"` }
func (CreateOpts) ToInstancesCreateMap ¶
func (opts CreateOpts) ToInstancesCreateMap() (map[string]interface{}, error)
type CreateRdsBuilder ¶
type CreateReplicaOpts ¶
type CreateReplicaOpts struct { Name string `json:"name" required:"true"` ReplicaOfId string `json:"replica_of_id" required:"true"` EnterpriseProjectId string `json:"enterprise_project_id,omitempty"` DiskEncryptionId string `json:"disk_encryption_id,omitempty"` FlavorRef string `json:"flavor_ref" required:"true"` Volume *Volume `json:"volume" required:"true"` Region string `json:"region,omitempty"` AvailabilityZone string `json:"availability_zone" required:"true"` ChargeInfo *ChargeInfo `json:"charge_info,omitempty"` }
func (CreateReplicaOpts) ToInstancesCreateMap ¶
func (opts CreateReplicaOpts) ToInstancesCreateMap() (map[string]interface{}, error)
type CreateResponse ¶
type CreateResult ¶
type CreateResult struct {
// contains filtered or unexported fields
}
func Create ¶
func Create(client *golangsdk.ServiceClient, opts CreateRdsBuilder) (r CreateResult)
func CreateReplica ¶
func CreateReplica(client *golangsdk.ServiceClient, opts CreateRdsBuilder) (r CreateResult)
func (CreateResult) Extract ¶
func (r CreateResult) Extract() (*CreateResponse, error)
type DbErrorlogBuilder ¶
type DbErrorlogOpts ¶
type DbErrorlogOpts struct { StartDate string `q:"start_date"` EndDate string `q:"end_date"` Offset string `q:"offset"` Limit string `q:"limit"` Level string `q:"level"` }
func (DbErrorlogOpts) DbErrorlogQuery ¶
func (opts DbErrorlogOpts) DbErrorlogQuery() (string, error)
type DbSlowLogBuilder ¶
type DbSlowLogOpts ¶
type DbSlowLogOpts struct { StartDate string `q:"start_date"` EndDate string `q:"end_date"` Offset string `q:"offset"` Limit string `q:"limit"` Level string `q:"level"` }
func (DbSlowLogOpts) ToDbSlowLogListQuery ¶
func (opts DbSlowLogOpts) ToDbSlowLogListQuery() (string, error)
type DeleteInstanceBuilder ¶
type DeleteOpts ¶
type DeleteOpts struct {
InstanceId string `json:"instance_id" required:"true"`
}
func (DeleteOpts) ToInstancesDeleteMap ¶
func (opts DeleteOpts) ToInstancesDeleteMap() (map[string]interface{}, error)
type DeleteResponse ¶
type DeleteResponse struct {
JobId string `json:"job_id"`
}
type DeleteResult ¶
type DeleteResult struct {
// contains filtered or unexported fields
}
func Delete ¶
func Delete(client *golangsdk.ServiceClient, instanceId string) (r DeleteResult)
func (DeleteResult) Extract ¶
func (r DeleteResult) Extract() (*DeleteResponse, error)
type EnableAutoExpandOpts ¶
type EnableAutoExpandOpts struct { // The instnace ID. InstanceId string `json:"-" required:"true"` // The upper limit of automatic expansion of storage, in GB. // This parameter is mandatory when switch_option is set to true. // The value ranges from 40 GB to 4,000 GB and must be no less than the current storage of the instance. LimitSize int `json:"limit_size" required:"true"` // The threshold to trigger automatic expansion. // If the available storage drops to this threshold or 10 GB, the automatic expansion is triggered. // This parameter is mandatory when switch_option is set to true. // The valid values are as follows: // + 10 // + 15 // + 20 TriggerThreshold int `json:"trigger_threshold" required:"true"` }
EnableAutoExpandOpts is the structure used to enable the volume automatic expansion of RDS instance.
type EnlargeVolumeOpts ¶
type EnlargeVolumeOpts struct {
EnlargeVolume *EnlargeVolumeSize `json:"enlarge_volume" required:"true"`
}
func (EnlargeVolumeOpts) ToActionInstanceMap ¶
func (opts EnlargeVolumeOpts) ToActionInstanceMap() (map[string]interface{}, error)
type EnlargeVolumeResp ¶
type EnlargeVolumeResp struct {
JobId string `json:"job_id"`
}
type EnlargeVolumeResult ¶
type EnlargeVolumeResult struct {
// contains filtered or unexported fields
}
func EnlargeVolume ¶
func EnlargeVolume(client *golangsdk.ServiceClient, opts ActionInstanceBuilder, instanceId string) (r EnlargeVolumeResult)
func (EnlargeVolumeResult) Extract ¶
func (r EnlargeVolumeResult) Extract() (*EnlargeVolumeResp, error)
type EnlargeVolumeSize ¶
type EnlargeVolumeSize struct {
Size int `json:"size" required:"true"`
}
type ErrorLogPage ¶
type ErrorLogPage struct {
pagination.SinglePageBase
}
func (ErrorLogPage) IsEmpty ¶
func (r ErrorLogPage) IsEmpty() (bool, error)
IsEmpty returns true if a ListResult contains no services.
type ErrorLogResp ¶
type ErrorLogResp struct { ErrorLogList []Errorlog `json:"error_log_list"` TotalRecord int `json:"total_record"` }
func ExtractErrorLog ¶
func ExtractErrorLog(r pagination.Page) (ErrorLogResp, error)
type ErrorLogResult ¶
type ErrorLogResult struct {
golangsdk.Result
}
type ErrorResponse ¶
type ErrorResponse struct { ErrorCode string `json:"error_code"` ErrorMsg string `json:"error_msg"` }
func RestRootPassword ¶
func RestRootPassword(c *golangsdk.ServiceClient, instanceID string, opts RestRootPasswordOpts) (*ErrorResponse, error)
type GetConfigurationResp ¶
type GetConfigurationResp struct { DatastoreVersion string `json:"datastore_version_name"` DatastoreName string `json:"datastore_name"` Parameters []ConfigParams `json:"configuration_parameters"` }
type GetConfigurationResult ¶
type GetConfigurationResult struct {
// contains filtered or unexported fields
}
func GetConfigurations ¶
func GetConfigurations(c *golangsdk.ServiceClient, instanceID string) (r GetConfigurationResult)
func (GetConfigurationResult) Extract ¶
func (r GetConfigurationResult) Extract() (*GetConfigurationResp, error)
type Instance ¶
type Instance struct { Id string `json:"id"` Name string `json:"name"` Status string `json:"status"` Datastore Datastore `json:"datastore"` Ha Ha `json:"ha"` ConfigurationId string `json:"configuration_id"` Port string `json:"port"` BackupStrategy BackupStrategy `json:"backup_strategy"` EnterpriseProjectId string `json:"enterprise_project_id"` DiskEncryptionId string `json:"disk_encryption_id"` FlavorRef string `json:"flavor_ref"` Volume Volume `json:"volume"` Region string `json:"region"` AvailabilityZone string `json:"availability_zone"` VpcId string `json:"vpc_id"` SubnetId string `json:"subnet_id"` SecurityGroupId string `json:"security_group_id"` ChargeInfo ChargeResponse `json:"charge_info"` }
type ListOpts ¶
type ListOpts struct { Id string `q:"id"` Name string `q:"name"` Type string `q:"type"` DataStoreType string `q:"datastore_type"` VpcId string `q:"vpc_id"` SubnetId string `q:"subnet_id"` Offset int `q:"offset"` Limit int `q:"limit"` }
func (ListOpts) ToRdsListDetailQuery ¶
type ListRdsBuilder ¶
type ListRdsResponse ¶
type ListRdsResponse struct { Instances []RdsInstanceResponse `json:"instances"` TotalCount int `json:"total_count"` }
func ExtractRdsInstances ¶
func ExtractRdsInstances(r pagination.Page) (ListRdsResponse, error)
ExtractRdsInstances is a function that takes a ListResult and returns the instances' information.
type ListRdsResult ¶
type ListRdsResult struct {
// contains filtered or unexported fields
}
type ModifyConfigurationOpts ¶
type ModifyConfigurationResp ¶
type ModifyConfigurationResult ¶
type ModifyConfigurationResult struct {
// contains filtered or unexported fields
}
func ModifyConfiguration ¶
func ModifyConfiguration(c *golangsdk.ServiceClient, instanceID string, opts ModifyConfigurationOpts) (r ModifyConfigurationResult)
func (ModifyConfigurationResult) Extract ¶
func (r ModifyConfigurationResult) Extract() (*ModifyConfigurationResp, error)
type RDSJobBuilder ¶
type RDSJobOpts ¶
type RDSJobOpts struct {
JobID string `q:"id"`
}
func (RDSJobOpts) ToRDSJobQuery ¶
func (opts RDSJobOpts) ToRDSJobQuery() (string, error)
type RDSJobResult ¶
type RDSJobResult struct {
// contains filtered or unexported fields
}
func GetRDSJob ¶
func GetRDSJob(client *golangsdk.ServiceClient, opts RDSJobBuilder) (r RDSJobResult)
func (RDSJobResult) Extract ¶
func (r RDSJobResult) Extract() (ListJob, error)
type RdsInstanceResponse ¶
type RdsInstanceResponse struct { Id string `json:"id"` Name string `json:"name"` Status string `json:"status"` PrivateIps []string `json:"private_ips"` PublicIps []string `json:"public_ips"` Port int `json:"port"` Type string `json:"type"` Ha Ha `json:"ha"` Region string `json:"region"` DataStore Datastore `json:"datastore"` Created string `json:"created"` Updated string `json:"updated"` DbUserName string `json:"db_user_name"` VpcId string `json:"vpc_id"` SubnetId string `json:"subnet_id"` SecurityGroupId string `json:"security_group_id"` FlavorRef string `json:"flavor_ref"` Volume Volume `json:"volume"` SwitchStrategy string `json:"switch_strategy"` BackupStrategy BackupStrategy `json:"backup_strategy"` ChargeInfo ChargeResponse `json:"charge_info"` MaintenanceWindow string `json:"maintenance_window"` Nodes []Nodes `json:"nodes"` RelatedInstance []RelatedInstance `json:"related_instance"` DiskEncryptionId string `json:"disk_encryption_id"` EnterpriseProjectId string `json:"enterprise_project_id"` TimeZone string `json:"time_zone"` Tags []tags.ResourceTag `json:"tags"` }
type RdsPage ¶
type RdsPage struct {
pagination.SinglePageBase
}
type RebootResp ¶
type RebootResp struct {
JobId string `json:"job_id"`
}
type RebootResult ¶
type RebootResult struct {
// contains filtered or unexported fields
}
func RebootInstance ¶
func RebootInstance(c *golangsdk.ServiceClient, instanceID string) (r RebootResult)
func (RebootResult) Extract ¶
func (r RebootResult) Extract() (*RebootResp, error)
type RelatedInstance ¶
type RenameInstanceOpts ¶
type RenameInstanceOpts struct {
Name string `json:"name" required:"true"`
}
func (RenameInstanceOpts) ToActionInstanceMap ¶
func (opts RenameInstanceOpts) ToActionInstanceMap() (map[string]interface{}, error)
type RenameResult ¶
type RenameResult struct {
// contains filtered or unexported fields
}
func Rename ¶
func Rename(client *golangsdk.ServiceClient, opts ActionInstanceBuilder, instanceId string) (r RenameResult)
type ResizeFlavor ¶
type ResizeFlavorOpts ¶
type ResizeFlavorOpts struct {
ResizeFlavor *SpecCode `json:"resize_flavor" required:"true"`
}
func (ResizeFlavorOpts) ToActionInstanceMap ¶
func (opts ResizeFlavorOpts) ToActionInstanceMap() (map[string]interface{}, error)
type ResizeFlavorResult ¶
type ResizeFlavorResult struct {
// contains filtered or unexported fields
}
func Resize ¶
func Resize(client *golangsdk.ServiceClient, opts ActionInstanceBuilder, instanceId string) (r ResizeFlavorResult)
func (ResizeFlavorResult) Extract ¶
func (r ResizeFlavorResult) Extract() (*ResizeFlavor, error)
type RestRootPasswordOpts ¶
type RestRootPasswordOpts struct {
DbUserPwd string `json:"db_user_pwd" required:"true"`
}
type RestartInstanceOpts ¶
type RestartInstanceOpts struct {
Restart string `json:"restart" required:"true"`
}
func (RestartInstanceOpts) ToActionInstanceMap ¶
func (opts RestartInstanceOpts) ToActionInstanceMap() (map[string]interface{}, error)
type RestartResponse ¶
type RestartResponse struct {
JobId string `json:"job_id"`
}
type RestartResult ¶
type RestartResult struct {
// contains filtered or unexported fields
}
func Restart ¶
func Restart(client *golangsdk.ServiceClient, opts ActionInstanceBuilder, instanceId string) (r RestartResult)
func (RestartResult) Extract ¶
func (r RestartResult) Extract() (*RestartResponse, error)
type SingleToHaRds ¶
type SingleToHaRdsOpts ¶
type SingleToHaRdsOpts struct {
SingleToHa *SingleToHaRds `json:"single_to_ha" required:"true"`
}
func (SingleToHaRdsOpts) ToActionInstanceMap ¶
func (opts SingleToHaRdsOpts) ToActionInstanceMap() (map[string]interface{}, error)
type SingleToHaResponse ¶
type SingleToHaResponse struct {
JobId string `json:"job_id"`
}
type SingleToHaResult ¶
type SingleToHaResult struct {
// contains filtered or unexported fields
}
func SingleToHa ¶
func SingleToHa(client *golangsdk.ServiceClient, opts ActionInstanceBuilder, instanceId string) (r SingleToHaResult)
func (SingleToHaResult) Extract ¶
func (r SingleToHaResult) Extract() (*SingleToHaResponse, error)
type SlowLogPage ¶
type SlowLogPage struct {
pagination.SinglePageBase
}
func (SlowLogPage) IsEmpty ¶
func (r SlowLogPage) IsEmpty() (bool, error)
IsEmpty returns true if a ListResult contains no services.
type SlowLogResp ¶
type SlowLogResp struct { Slowloglist []Slowloglist `json:"slow_log_list"` TotalRecord int `json:"total_record"` }
func ExtractSlowLog ¶
func ExtractSlowLog(r pagination.Page) (SlowLogResp, error)
ExtractCloudServers is a function that takes a ListResult and returns the services' information.
type Slowloglist ¶
type Slowloglist struct { Count string `json:"count"` Time string `json:"time"` Locktime string `json:"lock_time"` Rowssent string `json:"rows_sent"` Rowsexamined string `json:"rows_examined"` Database string `json:"database"` Users string `json:"users"` QuerySample string `json:"query_sample"` Type string `json:"type"` }
type UnchangeableParam ¶
type UnchangeableParam struct {
LowerCaseTableNames string `json:"lower_case_table_names"`
}