Documentation ¶
Index ¶
- func List(client *golangsdk.ServiceClient, opts ListInstanceBuilder) pagination.Pager
- type BackupStrategy
- type BackupStrategyOpt
- type ChargeInfo
- type Configuration
- type CreateInstanceBuilder
- type CreateOpts
- type CreateResult
- type DataStore
- type DeleteInstance
- type DeleteInstanceBuilder
- type DeleteInstanceResponse
- type DeleteInstanceResult
- type Flavor
- type FlavorOpt
- type Group
- type Instance
- type InstancePage
- type InstanceResponse
- type ListInstanceBuilder
- type ListInstanceOpts
- type ListInstanceResponse
- type ListInstanceResult
- type Nodes
- type PortOpts
- type PortUpdateResp
- type SpecOpts
- type UpdateInstanceResult
- type UpdateNodeNumOpts
- type UpdateOpt
- type UpdateResp
- type UpdateSpecOpts
- type UpdateVolumeOpts
- type Volume
- type VolumeOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func List ¶
func List(client *golangsdk.ServiceClient, opts ListInstanceBuilder) pagination.Pager
Types ¶
type BackupStrategy ¶
type BackupStrategyOpt ¶
type ChargeInfo ¶
type Configuration ¶
type CreateInstanceBuilder ¶
type CreateOpts ¶
type CreateOpts struct { Name string `json:"name" required:"true"` DataStore DataStore `json:"datastore" 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"` Password string `json:"password" required:"true"` Port string `json:"port,omitempty"` DiskEncryptionId string `json:"disk_encryption_id,omitempty"` Ssl string `json:"ssl_option,omitempty"` Mode string `json:"mode" required:"true"` Configuration []Configuration `json:"configurations,omitempty"` Flavor []Flavor `json:"flavor" required:"true"` BackupStrategy BackupStrategy `json:"backup_strategy,omitempty"` EnterpriseProjectID string `json:"enterprise_project_id,omitempty"` ChargeInfo *ChargeInfo `json:"charge_info,omitempty"` }
func (CreateOpts) ToInstancesCreateMap ¶
func (opts CreateOpts) ToInstancesCreateMap() (map[string]interface{}, error)
type CreateResult ¶
type CreateResult struct {
// contains filtered or unexported fields
}
func Create ¶
func Create(client *golangsdk.ServiceClient, opts CreateInstanceBuilder) (r CreateResult)
func (CreateResult) Extract ¶
func (r CreateResult) Extract() (*Instance, error)
type DeleteInstance ¶
type DeleteInstance struct {
InstanceId string `json:"instance_id" required:"true"`
}
func (DeleteInstance) ToInstancesDeleteMap ¶
func (opts DeleteInstance) ToInstancesDeleteMap() (map[string]interface{}, error)
type DeleteInstanceBuilder ¶
type DeleteInstanceResponse ¶
type DeleteInstanceResponse struct {
JobId string `json:"job_id"`
}
type DeleteInstanceResult ¶
type DeleteInstanceResult struct {
// contains filtered or unexported fields
}
func Delete ¶
func Delete(client *golangsdk.ServiceClient, instanceId string) (r DeleteInstanceResult)
func (DeleteInstanceResult) Extract ¶
func (r DeleteInstanceResult) Extract() (*DeleteInstanceResponse, error)
type Instance ¶
type Instance struct { OrderId string `json:"order_id"` Id string `json:"id"` Name string `json:"name"` DataStore DataStore `json:"datastore"` Status string `json:"status"` 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"` DiskEncryptionId string `json:"disk_encryption_id"` Ssl string `json:"ssl_option"` Mode string `json:"mode"` Flavor []FlavorOpt `json:"flavor"` BackupStrategy BackupStrategyOpt `json:"backup_strategy"` EnterpriseProjectID string `json:"enterprise_project_id"` }
type InstancePage ¶
type InstancePage struct {
pagination.SinglePageBase
}
func (InstancePage) IsEmpty ¶
func (r InstancePage) IsEmpty() (bool, error)
type InstanceResponse ¶
type InstanceResponse struct { Id string `json:"id"` Name string `json:"name"` Status string `json:"status"` Port string `json:"port"` Mode string `json:"mode"` Region string `json:"region"` DataStore DataStore `json:"datastore"` Engine string `json:"engine"` Created string `json:"created"` Updated string `json:"updated"` DbUserName string `json:"db_user_name"` Ssl int `json:"ssl"` VpcId string `json:"vpc_id"` SubnetId string `json:"subnet_id"` SecurityGroupId string `json:"security_group_id"` BackupStrategy BackupStrategy `json:"backup_strategy"` MaintenanceWindow string `json:"maintenance_window"` Groups []Group `json:"groups"` DiskEncryptionId string `json:"disk_encryption_id"` TimeZone string `json:"time_zone"` Actions []string `json:"actions"` EnterpriseProjectID string `json:"enterprise_project_id"` }
type ListInstanceBuilder ¶
type ListInstanceOpts ¶
type ListInstanceOpts struct { Id string `q:"id"` Name string `q:"name"` Mode string `q:"mode"` DataStoreType string `q:"datastore_type"` VpcId string `q:"vpc_id"` SubnetId string `q:"subnet_id"` Offset int `q:"offset"` Limit int `q:"limit"` }
func (ListInstanceOpts) ToInstanceListDetailQuery ¶
func (opts ListInstanceOpts) ToInstanceListDetailQuery() (string, error)
type ListInstanceResponse ¶
type ListInstanceResponse struct { Instances []InstanceResponse `json:"instances"` TotalCount int `json:"total_count"` }
func ExtractInstances ¶
func ExtractInstances(r pagination.Page) (ListInstanceResponse, error)
type ListInstanceResult ¶
type ListInstanceResult struct {
// contains filtered or unexported fields
}
type PortOpts ¶
type PortOpts struct {
Port int `json:"port"`
}
PortOpts is the structure required by the UpdatePort method to modify the database access port.
type PortUpdateResp ¶
type PortUpdateResp struct { // Job ID. JobId string `json:"job_id"` // Database access port. Port int `json:"port"` }
PortUpdateResp is the structure that represents the detail of the database user.
func UpdatePort ¶
func UpdatePort(c *golangsdk.ServiceClient, instanceId string, port int) (*PortUpdateResp, error)
UpdatePort is a method to update the database access port using given parameters.
type UpdateInstanceResult ¶
type UpdateInstanceResult struct {
// contains filtered or unexported fields
}
func Update ¶
func Update(client *golangsdk.ServiceClient, instanceId string, opts []UpdateOpt) (r UpdateInstanceResult)
func (UpdateInstanceResult) Extract ¶
func (r UpdateInstanceResult) Extract() (*UpdateResp, error)
type UpdateNodeNumOpts ¶
type UpdateNodeNumOpts struct { Type string `json:"type" required:"true"` SpecCode string `json:"spec_code" required:"true"` Num int `json:"num" required:"true"` Volume *VolumeOpts `json:"volume,omitempty"` IsAutoPay bool `json:"is_auto_pay,omitempty"` }
type UpdateOpt ¶
UpdateOpt defines the basic information for update APIs URI: <Method> base_url/<Action> Request body: {<Param>: <Value>} the supported value for Method including: "post" and "put"
type UpdateResp ¶
type UpdateSpecOpts ¶
type UpdateVolumeOpts ¶
type UpdateVolumeOpts struct { Volume VolumeOpts `json:"volume" required:"true"` IsAutoPay bool `json:"is_auto_pay,omitempty"` }
type VolumeOpts ¶
Click to show internal directories.
Click to hide internal directories.