premium_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: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateInstanceOpts

type CreateInstanceOpts struct {
	Region        string   `json:"region" required:"true"`
	ChargeMode    int      `json:"chargemode" required:"true"`
	AvailableZone string   `json:"available_zone" required:"true"`
	Arch          string   `json:"arch" required:"true"`
	NamePrefix    string   `json:"instancename" required:"true"`
	Specification string   `json:"specification" required:"true"`
	CpuFlavor     string   `json:"cpu_flavor" required:"true"`
	VpcId         string   `json:"vpc_id" required:"true"`
	SubnetId      string   `json:"subnet_id" required:"true"`
	SecurityGroup []string `json:"security_group" required:"true"`
	Count         int      `json:"count" required:"true"`
	Ipv6Enable    string   `json:"ipv6_enable,omitempty"`
	VolumeType    string   `json:"volume_type,omitempty"`
	ClusterId     string   `json:"cluster_id,omitempty"`
	PoolId        string   `json:"pool_id,omitempty"`
}

CreateInstanceOpts the parameters in the creating request body

type CreationgRst

type CreationgRst struct {
	Instances []IdNameEntry `json:"instances"`
}

CreationgRst the struct of returned by creating.

func CreateInstance

func CreateInstance(c *golangsdk.ServiceClient, opts CreateInstanceOpts) (*CreationgRst, error)

CreateInstance will create a dedicated waf instance based on the values in CreateOpts.

type DedicatedInstance

type DedicatedInstance struct {
	Id                 string            `json:"id"`
	InstanceName       string            `json:"instancename"`
	ServerId           string            `json:"serverId"`
	Region             string            `json:"region"`
	Zone               string            `json:"zone"`
	Arch               string            `json:"arch"`
	CupFlavor          string            `json:"cpu_flavor"`
	VpcId              string            `json:"vpc_id"`
	SubnetId           string            `json:"subnet_id"`
	ServiceIp          string            `json:"service_ip"`
	ServiceIpv6        string            `json:"service_ipv6"`
	FloatIp            string            `json:"floatIp"`
	SecurityGroupIds   []string          `json:"security_group_ids"`
	MgrSecurityGroupId string            `json:"mgrSecurityGroupId"`
	Status             int               `json:"status"`
	RunStatus          int               `json:"run_status"`
	AccessStatus       int               `json:"access_status"`
	Upgradable         int               `json:"upgradable"`
	CloudServiceType   string            `json:"cloudServiceType"`
	ResourceType       string            `json:"resourceType"`
	ResourceSpecCode   string            `json:"resourceSpecCode"`
	Specification      string            `json:"specification"`
	Hosts              []IdHostnameEntry `json:"hosts"`
	VolumeType         string            `json:"volume_type"`
	ClusterId          string            `json:"cluster_id"`
	PoolId             string            `json:"pool_id"`
}

DedicatedInstance the dedicated waf instance detail.

func Delete

Delete will permanently delete a engine based on its unique ID.

func GetInstance

func GetInstance(c *golangsdk.ServiceClient, id string) (*DedicatedInstance, error)

GetInstance get the waf instance detail.

func UpdateInstance

UpdateInstance query a list of waf instance base on UpdateInstanceOpts

type DedicatedInstanceList

type DedicatedInstanceList struct {
	Total     int                 `json:"total"`
	Purchased bool                `json:"purchased"`
	Items     []DedicatedInstance `json:"items"`
}

DedicatedInstanceList the struct of returned by querying list.

func ListInstance

ListInstance query a list of waf instance base on ListInstanceOpts

type IdHostnameEntry

type IdHostnameEntry struct {
	Id       string `json:"id"`
	HostName string `json:"hostname"`
}

type IdNameEntry

type IdNameEntry struct {
	Id   string
	Name string
}

type ListInstanceOpts

type ListInstanceOpts struct {
	Page         int    `q:"page"`
	PageSize     int    `q:"pagesize"`
	InstanceName string `q:"instancename"`
}

ListInstanceOpts the parameters in the querying request.

type UpdateInstanceOpts

type UpdateInstanceOpts struct {
	InstanceName string `json:"instancename"`
}

UpdateInstanceOpts the parameters in the updating request.

Jump to

Keyboard shortcuts

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