Documentation ¶
Index ¶
- func Delete(client *golangsdk.ServiceClient, id string) (err error)
- type CreateOpts
- type HostEntry
- type Info
- type Instance
- func Get(client *golangsdk.ServiceClient, id string) (*Instance, error)
- func List(client *golangsdk.ServiceClient, opts ListOpts) ([]Instance, error)
- func Update(client *golangsdk.ServiceClient, id string, opts UpdateOpts) (*Instance, error)
- func Upgrade(client *golangsdk.ServiceClient, id string) (*Instance, error)
- type InstanceResponse
- type ListOpts
- type UpdateOpts
- type UpgradeOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CreateOpts ¶
type CreateOpts struct { // Billing mode. Currently, only pay-per-use billing (30) is // supported. Make sure your account balance is enough, or // the dedicated WAF engine will forward requests directly to // the origin server without inspection. ChargeMode int `json:"chargemode"` // Region where a dedicated engine is to be created. Its // value is EU-DE. Region string `json:"region" required:"true"` // AZ where the dedicated engine is to be created. AvailabilityZone string `json:"available_zone" required:"true"` // Dedicated engine CPU architecture. Its value can be x86. Architecture string `json:"arch" required:"true"` // Prefix of the dedicated WAF engine name, which is user-defined InstanceName string `json:"instancename" required:"true"` // Specification of the dedicated engine version. The value can be // waf.instance.enterprise or waf.instance.professional. An // enterprise edition dedicated engine has more functions // than a professional edition one. For more details, see the // Web Application Firewall (WAF) User Guide Specification string `json:"specification" required:"true"` // ID of the specification of the ECS hosting the dedicated // engine. It can be obtained by calling the ECS ListFlavors API. // For the enterprise edition, ECS specification with 8 vCPUs // and 16 GB memory are used. For the professional edition, // ECS specification with 2 vCPUs and 4 GB memory are used. Flavor string `json:"cpu_flavor" required:"true"` // ID of the VPC where the dedicated engine is located. It // can be obtained by calling the ListVpcs API. VpcId string `json:"vpc_id" required:"true"` // ID of the VPC subnet where the dedicated engine is // located. It can be obtained by calling the ListSubnets API. // subnet_id has the same value as network_id obtained by // calling the OpenStack APIs. SubnetId string `json:"subnet_id" required:"true"` // ID of the security group where the dedicated engine is // located. It can be obtained by calling the ListSecurityGroups API. SecurityGroupsId []string `json:"security_group" required:"true"` // Number of dedicated engines to be provisioned Count int `json:"count" required:"true"` // Whether to create a dedicated engine instance of the network interface type. // Its value has to be true. ResTenant *bool `json:"res_tenant" required:"true"` }
type Instance ¶
type Instance struct { // ID of the dedicated WAF engine. ID string `json:"id"` // Name of the dedicated WAF engine. Name string `json:"instance_name"` // Region where a dedicated engine is to be created. Its value is EU-DE. Region string `json:"region"` // Az ID. AvailabilityZone string `json:"zone"` // CPU architecture. Architecture string `json:"arch"` // ECS specification ID. Flavor string `json:"cpu_flavor"` // ID of the VPC where the dedicated engine is located. VpcID string `json:"vpc_id"` // Subnet ID of the VPC where the dedicated engine is located. SubnetId string `json:"subnet_id"` // Service plane IP address of the dedicated engine. ServiceIp string `json:"service_ip"` // IPv6 address of the service plane of the dedicated engine. ServiceIpv6 string `json:"service_ipv6"` // Security groups bound to the dedicated engine ECS. SecurityGroups []string `json:"security_group_ids"` // Billing status of dedicated WAF engine. The value can be 0, 1, or 2. // 0: The billing is normal. // 1: The billing account is frozen. Resources // and data will be retained, but the cloud // services cannot be used by the account. // 2: The billing is terminated. Resources and data will be cleared. BillingStatus int `json:"status"` // Running status of the dedicated engine. The value can be: // 0 (creating) // 1 (running) // 2 (deleting) // 3 (deleted) // 4 (creation failed) // 5 (frozen) // 6 (abnormal) // 7 (updating) // 8 (update failed). Status int `json:"run_status"` // Access status of the dedicated engine. The value can be 0 or 1. // 0: the dedicated engine is not connected. // 1: the dedicated engine is connected. AccessStatus int `json:"access_status"` // Whether the dedicated engine can be upgraded. // The value can be 0 for no or 1 for yes. Upgradable int `json:"upgradable"` // Dedicated engine ECS specification for example, // 8 vCPUs | 16 GB. Specification string `json:"specification"` // Domain name protected by the dedicated engine. Hosts []HostEntry `json:"hosts"` // ID of the ECS hosting the dedicated engine. ServerId string `json:"server_id"` // Timestamp when the dedicated WAF engine was created. CreatedAt int `json:"create_time"` // Resource specifications code. // This code is used to identify the resource specifications the dedicated engine uses. ResourceSpecification string `json:"resourceSpecCode"` }
type InstanceResponse ¶
type InstanceResponse struct {
Instances []Info `json:"instances"`
}
func Create ¶
func Create(client *golangsdk.ServiceClient, opts CreateOpts) (*InstanceResponse, error)
Create will create a new instance on the values in CreateOpts.
type ListOpts ¶
type ListOpts struct { // Fuzzy query for dedicated WAF engine names. // Only Prefix and Suffix match query are supported Name string `json:"instancename"` }
type UpdateOpts ¶
type UpdateOpts struct { // New name of the dedicated WAF engine Name string `json:"instancename" required:"true"` }
type UpgradeOpts ¶
type UpgradeOpts struct { // Operation name. // upgrade: Upgrade the software version of the dedicated WAF engine Action string `json:"action"` }
Click to show internal directories.
Click to hide internal directories.