Documentation
¶
Index ¶
- func List(client *golangsdk.ServiceClient, opts ListInstanceBuilder) pagination.Pager
- type BackupStrategy
- type BackupStrategyOpt
- 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 UpdateInstanceResult
- type UpdateNodeNumOpts
- type UpdateOpt
- type UpdateSpecOpts
- type UpdateVolumeOpts
- type Volume
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 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"`
DiskEncryptionId string `json:"disk_encryption_id,omitempty"`
Ssl string `json:"ssl_option,omitempty"`
Mode string `json:"mode" required:"true"`
Flavor []Flavor `json:"flavor" required:"true"`
BackupStrategy BackupStrategy `json:"backup_strategy,omitempty"`
EnterpriseProjectID string `json:"enterprise_project_id,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 {
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 UpdateInstanceResult ¶
type UpdateInstanceResult struct {
// contains filtered or unexported fields
}
func Update ¶
func Update(client *golangsdk.ServiceClient, instanceId string, opts []UpdateOpt) (r UpdateInstanceResult)
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 *UpdateVolumeOpts `json:"volume,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 UpdateSpecOpts ¶
type UpdateVolumeOpts ¶
Click to show internal directories.
Click to hide internal directories.