instances

package
v0.0.0-...-d823fe1 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2021 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RestorePassword

func RestorePassword(client *golangsdk.ServiceClient, opts RestorePasswordOptsBuilder, id string) (r golangsdk.Result)

Types

type BackupStrategyOpt

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

type Coordinator

type Coordinator struct {
	AzCode string `json:"az_code" required:"true"`
}

type CreateGaussDBBuilder

type CreateGaussDBBuilder interface {
	ToInstancesCreateMap() (map[string]interface{}, error)
}

type CreateGaussDBOpts

type CreateGaussDBOpts struct {
	Name                string             `json:"name" required:"true"`
	Region              string             `json:"region,omitempty"`
	Flavor              string             `json:"flavor_ref" required:"true"`
	VpcId               string             `json:"vpc_id,omitempty"`
	SubnetId            string             `json:"subnet_id,omitempty"`
	SecurityGroupId     string             `json:"security_group_id,omitempty"`
	Password            string             `json:"password" required:"true"`
	Port                string             `json:"port,omitempty"`
	DiskEncryptionId    string             `json:"disk_encryption_id,omitempty"`
	TimeZone            string             `json:"time_zone,omitempty"`
	AvailabilityZone    string             `json:"availability_zone" required:"true"`
	ConfigurationId     string             `json:"configuration_id,omitempty"`
	DsspoolId           string             `json:"dsspool_id,omitempty"`
	ReplicaOfId         string             `json:"replica_of_id,omitempty"`
	ShardingNum         int                `json:"sharding_num" required:"true"`
	CoordinatorNum      int                `json:"coordinator_num" required:"true"`
	EnterpriseProjectId string             `json:"enterprise_project_id,omitempty"`
	DataStore           DataStoreOpt       `json:"datastore" required:"true"`
	Volume              VolumeOpt          `json:"volume" required:"true"`
	Ha                  *HaOpt             `json:"ha,omitempty"`
	BackupStrategy      *BackupStrategyOpt `json:"backup_strategy,omitempty"`
	RestorePoint        *RestorePointOpt   `json:"restore_point,omitempty"`
}

func (CreateGaussDBOpts) ToInstancesCreateMap

func (opts CreateGaussDBOpts) ToInstancesCreateMap() (map[string]interface{}, error)

type CreateResponse

type CreateResponse struct {
	Instance GaussDBResponse `json:"instance"`
}

type CreateResult

type CreateResult struct {
	// contains filtered or unexported fields
}

func Create

func Create(client *golangsdk.ServiceClient, opts CreateGaussDBBuilder) (r CreateResult)

func (CreateResult) Extract

func (r CreateResult) Extract() (*CreateResponse, error)

type DataStoreOpt

type DataStoreOpt struct {
	Type    string `json:"type" required:"true"`
	Version string `json:"version,omitempty"`
}

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 GaussDBInstance

type GaussDBInstance struct {
	Id                string   `json:"id"`
	Name              string   `json:"name"`
	Status            string   `json:"status"`
	Type              string   `json:"type"`
	Port              int      `json:"port"`
	VpcId             string   `json:"vpc_id"`
	SubnetId          string   `json:"subnet_id"`
	SecurityGroupId   string   `json:"security_group_id"`
	TimeZone          string   `json:"time_zone"`
	Region            string   `json:"region"`
	FlavorRef         string   `json:"flavor_ref"`
	DbUserName        string   `json:"db_user_name"`
	DiskEncryptionId  string   `json:"disk_encryption_id"`
	DsspoolId         string   `json:"dsspool_id"`
	SwitchStrategy    string   `json:"switch_strategy"`
	MaintenanceWindow string   `json:"maintenance_window"`
	PublicIps         []string `json:"public_ips"`
	PrivateIps        []string `json:"private_ips"`

	Volume         VolumeOpt         `json:"volume"`
	Ha             HaOpt             `json:"ha"`
	Nodes          []Nodes           `json:"nodes"`
	DataStore      DataStoreOpt      `json:"datastore"`
	BackupStrategy BackupStrategyOpt `json:"backup_strategy"`

	EnterpriseProjectId string `json:"enterprise_project_id"`
}

func GetInstanceByID

func GetInstanceByID(client *golangsdk.ServiceClient, instanceId string) (GaussDBInstance, error)

func GetInstanceByName

func GetInstanceByName(client *golangsdk.ServiceClient, name string) (GaussDBInstance, error)

type GaussDBPage

type GaussDBPage struct {
	pagination.SinglePageBase
}

func (GaussDBPage) IsEmpty

func (r GaussDBPage) IsEmpty() (bool, error)

type GaussDBResponse

type GaussDBResponse struct {
	Id     string `json:"id"`
	Status string `json:"status"`
}

type HaOpt

type HaOpt struct {
	Mode            string `json:"mode" required:"true"`
	ReplicationMode string `json:"replication_mode" required:"true"`
	Consistency     string `json:"consistency,omitempty"`
}

type ListGaussDBBuilder

type ListGaussDBBuilder interface {
	ToGaussDBListDetailQuery() (string, error)
}

type ListGaussDBInstanceOpts

type ListGaussDBInstanceOpts 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 (ListGaussDBInstanceOpts) ToGaussDBListDetailQuery

func (opts ListGaussDBInstanceOpts) ToGaussDBListDetailQuery() (string, error)

type ListGaussDBResponse

type ListGaussDBResponse struct {
	Instances  []GaussDBInstance `json:"instances"`
	TotalCount int               `json:"total_count"`
}

func ExtractGaussDBInstances

func ExtractGaussDBInstances(r pagination.Page) (ListGaussDBResponse, error)

ExtractGaussDBInstances is a function that takes a ListResult and returns the services' information.

type ListGaussDBResult

type ListGaussDBResult struct {
	// contains filtered or unexported fields
}

type Nodes

type Nodes struct {
	Id               string `json:"id"`
	Name             string `json:"name"`
	Status           string `json:"status"`
	Role             string `json:"role"`
	AvailabilityZone string `json:"availability_zone"`
}

type RenameOpts

type RenameOpts struct {
	Name string `json:"name" required:"true"`
}

func (RenameOpts) ToRenameMap

func (opts RenameOpts) ToRenameMap() (map[string]interface{}, error)

type RenameOptsBuilder

type RenameOptsBuilder interface {
	ToRenameMap() (map[string]interface{}, error)
}

type RenameResponse

type RenameResponse struct {
	Instance GaussDBResponse `json:"instance"`
	JobId    string          `json:"job_id"`
}

type RenameResult

type RenameResult struct {
	// contains filtered or unexported fields
}

func Rename

func Rename(client *golangsdk.ServiceClient, opts RenameOptsBuilder, id string) (r RenameResult)

func (RenameResult) Extract

func (r RenameResult) Extract() (*RenameResponse, error)

type RestorePasswordOpts

type RestorePasswordOpts struct {
	Password string `json:"password" required:"true"`
}

func (RestorePasswordOpts) ToRestorePasswordMap

func (opts RestorePasswordOpts) ToRestorePasswordMap() (map[string]interface{}, error)

type RestorePasswordOptsBuilder

type RestorePasswordOptsBuilder interface {
	ToRestorePasswordMap() (map[string]interface{}, error)
}

type RestorePointOpt

type RestorePointOpt struct {
	InstanceId   string            `json:"instance_id" required:"true"`
	Type         string            `json:"type" required:"true"`
	BackupId     string            `json:"backup_id,omitempty"`
	RestoreTime  int               `json:"restore_time,omitempty"`
	DatabaseName map[string]string `json:"database_name,omitempty"`
}

type Shard

type Shard struct {
	Count int `json:"count" required:"true"`
}

type UpdateClusterOpts

type UpdateClusterOpts struct {
	Shard        *Shard        `json:"shard,omitempty"`
	Coordinators []Coordinator `json:"coordinators,omitempty"`
}

func (UpdateClusterOpts) ToClusterUpdateMap

func (opts UpdateClusterOpts) ToClusterUpdateMap() (map[string]interface{}, error)

type UpdateClusterOptsBuilder

type UpdateClusterOptsBuilder interface {
	ToClusterUpdateMap() (map[string]interface{}, error)
}

type UpdateResult

type UpdateResult struct {
	// contains filtered or unexported fields
}

func UpdateCluster

func UpdateCluster(client *golangsdk.ServiceClient, opts UpdateClusterOptsBuilder, id string) (r UpdateResult)

func UpdateVolume

func UpdateVolume(client *golangsdk.ServiceClient, opts UpdateVolumeOptsBuilder, id string) (r UpdateResult)

type UpdateVolumeOpts

type UpdateVolumeOpts struct {
	Size int `json:"size" required:"true"`
}

func (UpdateVolumeOpts) ToVolumeUpdateMap

func (opts UpdateVolumeOpts) ToVolumeUpdateMap() (map[string]interface{}, error)

type UpdateVolumeOptsBuilder

type UpdateVolumeOptsBuilder interface {
	ToVolumeUpdateMap() (map[string]interface{}, error)
}

type VolumeOpt

type VolumeOpt struct {
	Type string `json:"type" required:"true"`
	Size int    `json:"size" required:"true"`
}

Jump to

Keyboard shortcuts

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