Documentation ¶
Index ¶
- type CreateInstanceOpts
- type CreationgRst
- type DedicatedInstance
- func Delete(c *golangsdk.ServiceClient, id string) (*DedicatedInstance, error)
- func DeleteWithEpsId(c *golangsdk.ServiceClient, id string, epsId string) (*DedicatedInstance, error)
- func GetInstance(c *golangsdk.ServiceClient, id string) (*DedicatedInstance, error)
- func GetWithEpsId(c *golangsdk.ServiceClient, id string, epsId string) (*DedicatedInstance, error)
- func UpdateInstance(c *golangsdk.ServiceClient, id string, opts UpdateInstanceOpts) (*DedicatedInstance, error)
- func UpdateWithEpsId(c *golangsdk.ServiceClient, id string, opts UpdateInstanceOpts, epsId string) (*DedicatedInstance, error)
- type DedicatedInstanceList
- type IdHostnameEntry
- type IdNameEntry
- type ListInstanceOpts
- type UpdateInstanceOpts
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"` 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"` ResTenant *bool `json:"res_tenant,omitempty"` CpuFlavor string `json:"cpu_flavor,omitempty"` AntiAffinity *bool `json:"anti_affinity,omitempty"` Tags []tags.ResourceTag `json:"tags,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.
func CreateWithEpsId ¶
func CreateWithEpsId(c *golangsdk.ServiceClient, opts CreateInstanceOpts, epsId string) (*CreationgRst, error)
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 ¶
func Delete(c *golangsdk.ServiceClient, id string) (*DedicatedInstance, error)
Delete will permanently delete a engine based on its unique ID.
func DeleteWithEpsId ¶
func DeleteWithEpsId(c *golangsdk.ServiceClient, id string, epsId string) (*DedicatedInstance, error)
func GetInstance ¶
func GetInstance(c *golangsdk.ServiceClient, id string) (*DedicatedInstance, error)
GetInstance get the waf instance detail.
func GetWithEpsId ¶
func GetWithEpsId(c *golangsdk.ServiceClient, id string, epsId string) (*DedicatedInstance, error)
func UpdateInstance ¶
func UpdateInstance(c *golangsdk.ServiceClient, id string, opts UpdateInstanceOpts) (*DedicatedInstance, error)
UpdateInstance query a list of waf instance base on UpdateInstanceOpts
func UpdateWithEpsId ¶
func UpdateWithEpsId(c *golangsdk.ServiceClient, id string, opts UpdateInstanceOpts, epsId string) ( *DedicatedInstance, error)
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 ¶
func ListInstance(c *golangsdk.ServiceClient, opts ListInstanceOpts) (*DedicatedInstanceList, error)
ListInstance query a list of waf instance base on ListInstanceOpts
type IdHostnameEntry ¶
type IdNameEntry ¶
type ListInstanceOpts ¶
type ListInstanceOpts struct { EnterpriseProjectId string `q:"enterprise_project_id"` 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.