Help us shape the future of Go! Take the 2026 Go Developer Survey

instance

package
v0.9.6 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigureAutoExpansion

func ConfigureAutoExpansion(client *golangsdk.ServiceClient, opts DiskAutoExpansionOpts) error

func RenameInstance

func RenameInstance(client *golangsdk.ServiceClient, opts RenameInstanceOpts) error

func ResetPassword

func ResetPassword(client *golangsdk.ServiceClient, opts ResetPasswordOpts) error

func ResizeInstance

func ResizeInstance(client *golangsdk.ServiceClient, opts ResizeInstanceOpts) (string, error)

Types

type AutoEnlargePolicy

type AutoEnlargePolicy struct {
	Threshold int `json:"threshold"`
	Step      int `json:"step"`
	Size      int `json:"size"`
}

type BackupStrategy

type BackupStrategy struct {
	StartTime string `json:"start_time"`
	KeepDays  string `json:"keep_days"`
}

type BackupStrategyOpt

type BackupStrategyOpt struct {
	StartTime string `json:"start_time" required:"true"`
	KeepDays  string `json:"keep_days,omitempty"`
}

type ChangeSecGroupOpts

type ChangeSecGroupOpts struct {
	InstanceId      string `json:"-"`
	SecurityGroupId string `json:"security_group_id" required:"true"`
}

type ChangeSecGroupResp

type ChangeSecGroupResp struct {
	JobId string `json:"job_id"`
}

type CreateOpts

type CreateOpts struct {
	Name                string             `json:"name" required:"true"`
	DataStore           DataStoreOpt       `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"`
	Mode                string             `json:"mode" required:"true"`
	Flavor              []FlavorOpt        `json:"flavor" required:"true"`
	ConfigurationId     string             `json:"configuration_id,omitempty"`
	BackupStrategy      *BackupStrategyOpt `json:"backup_strategy,omitempty"`
	EnterpriseProjectId *string            `json:"enterprise_project_id,omitempty"`
	SslOption           *string            `json:"ssl_option,omitempty"`
}

type CreateResp

type CreateResp struct {
	Id               string         `json:"id"`
	Name             string         `json:"name"`
	DataStore        DataStore      `json:"datastore"`
	Created          string         `json:"created"`
	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"`
	Mode             string         `json:"mode"`
	Flavor           []Flavor       `json:"flavor"`
	BackupStrategy   BackupStrategy `json:"backup_strategy"`
	SslOption        string         `json:"ssl_option"`
	JobId            string         `json:"job_id"`
}

func Create

func Create(client *golangsdk.ServiceClient, opts CreateOpts) (*CreateResp, error)

type DataStore

type DataStore struct {
	Type          string `json:"type"`
	Version       string `json:"version"`
	StorageEngine string `json:"storage_engine"`
}

type DataStoreOpt

type DataStoreOpt struct {
	Type          string `json:"type" required:"true"`
	Version       string `json:"version" required:"true"`
	StorageEngine string `json:"storage_engine" required:"true"`
}

type DeleteResponse

type DeleteResponse struct {
	JobId string `json:"job_id"`
}

func Delete

func Delete(client *golangsdk.ServiceClient, instanceID string) (*DeleteResponse, error)

type DiskAutoExpansionOpts

type DiskAutoExpansionOpts struct {
	InstanceIds  []string                 `json:"instance_ids" required:"true"`
	SwitchOption string                   `json:"switch_option,omitempty"`
	Policy       *DiskAutoExpansionPolicy `json:"policy,omitempty"`
}

type DiskAutoExpansionPolicy

type DiskAutoExpansionPolicy struct {
	Threshold int `json:"threshold,omitempty"`
	Step      int `json:"step,omitempty"`
	Size      int `json:"size,omitempty"`
}

type EnlargeNodeOpts

type EnlargeNodeOpts struct {
	InstanceId string `json:"-"`
	Num        int    `json:"num" required:"true"`
	SubnetId   string `json:"subnet_id,omitempty"`
}

type EnlargeNodeResponse

type EnlargeNodeResponse struct {
	JobId string `json:"job_id"`
}

type ExtendVolumeOpts

type ExtendVolumeOpts struct {
	InstanceId string `json:"-"`
	Size       int    `json:"size" required:"true"`
}

type ExtendVolumeResponse

type ExtendVolumeResponse struct {
	JobId string `json:"job_id"`
}

type Flavor

type Flavor struct {
	Num      string `json:"num"`
	Size     string `json:"size"`
	Storage  string `json:"storage"`
	SpecCode string `json:"spec_code"`
}

type FlavorOpt

type FlavorOpt struct {
	Num      string `json:"num" required:"true"`
	Size     string `json:"size" required:"true"`
	Storage  string `json:"storage" required:"true"`
	SpecCode string `json:"spec_code" required:"true"`
}

type GetAutoExpansionResponse

type GetAutoExpansionResponse struct {
	Policy *AutoEnlargePolicy `json:"policy"`
}

func GetAutoExpansion

func GetAutoExpansion(client *golangsdk.ServiceClient, instanceId string) (*GetAutoExpansionResponse, error)

type ListBackupStrategyResult

type ListBackupStrategyResult struct {
	StartTime string `json:"start_time"`
	KeepDays  int    `json:"keep_days"`
}

type ListDatastoreResult

type ListDatastoreResult struct {
	Type         string `json:"type"`
	Version      string `json:"version"`
	WholeVersion string `json:"whole_version"`
}

type ListGeminiDBOpts

type ListGeminiDBOpts struct {
	Id            string `q:"id"`
	Name          string `q:"name"`
	DataStoreType string `q:"datastore_type"`
	Mode          string `q:"mode"`
	VpcId         string `q:"vpc_id"`
	SubnetId      string `q:"subnet_id"`
	Offset        int    `q:"offset"`
	Limit         int    `q:"limit"`
}

type ListGroupResult

type ListGroupResult struct {
	Id     string           `json:"id"`
	Status string           `json:"status"`
	Volume Volume           `json:"volume"`
	Nodes  []ListNodeResult `json:"nodes"`
}

type ListNodeResult

type ListNodeResult struct {
	Id               string `json:"id"`
	Name             string `json:"name"`
	Status           string `json:"status"`
	SubnetId         string `json:"subnet_id"`
	PrivateIp        string `json:"private_ip"`
	PublicIp         string `json:"public_ip"`
	SpecCode         string `json:"spec_code"`
	AvailabilityZone string `json:"availability_zone"`
	SupportReduce    bool   `json:"support_reduce"`
}

type ListResult

type ListResult 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           ListDatastoreResult      `json:"datastore"`
	Engine              string                   `json:"engine"`
	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"`
	BackupStrategy      ListBackupStrategyResult `json:"backup_strategy"`
	PayMode             string                   `json:"pay_mode"`
	MaintenanceWindow   string                   `json:"maintenance_window"`
	Groups              []ListGroupResult        `json:"groups"`
	EnterpriseProjectId string                   `json:"enterprise_project_id"`
	TimeZone            string                   `json:"time_zone"`
	Actions             []string                 `json:"actions"`
}

func ListGeminiDB

func ListGeminiDB(client *golangsdk.ServiceClient, opts ListGeminiDBOpts) ([]ListResult, error)

type ReduceNodeOpts

type ReduceNodeOpts struct {
	InstanceID string   `json:"-"`
	Num        *int     `json:"num,omitempty"`
	NodeList   []string `json:"node_list,omitempty"`
}

type ReduceNodeResponse

type ReduceNodeResponse struct {
	JobId string `json:"job_id"`
}

func ReduceNode

func ReduceNode(client *golangsdk.ServiceClient, opts ReduceNodeOpts) (*ReduceNodeResponse, error)

type RenameInstanceOpts

type RenameInstanceOpts struct {
	InstanceID string `json:"-"`
	Name       string `json:"name" required:"true"`
}

type ResetPasswordOpts

type ResetPasswordOpts struct {
	InstanceId string `json:"-"`
	Password   string `json:"password" required:"true"`
}

type ResizeInstanceOpts

type ResizeInstanceOpts struct {
	InstanceID     string `json:"-"`
	TargetSpecCode string `json:"-" required:"true"`
}

type Volume

type Volume struct {
	Size string `json:"size"`
	Used string `json:"used"`
}

Jump to

Keyboard shortcuts

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