@@ -26,6 +26,8 @@ type NodeBalancer struct {
2626 ClientConnThrottle int `json:"client_conn_throttle"`
2727 // Information about the amount of transfer this NodeBalancer has had so far this month.
2828 Transfer NodeBalancerTransfer `json:"transfer"`
29+ // This NodeBalancer's plane Type
30+ Type NodeBalancerPlanType `json:"type"`
2931
3032 // An array of tags applied to this object. Tags are for organizational purposes only.
3133 Tags []string `json:"tags"`
@@ -52,6 +54,7 @@ type NodeBalancerCreateOptions struct {
5254 Configs []* NodeBalancerConfigCreateOptions `json:"configs,omitempty"`
5355 Tags []string `json:"tags"`
5456 FirewallID int `json:"firewall_id,omitempty"`
57+ Type NodeBalancerPlanType `json:"type,omitempty"`
5558}
5659
5760// NodeBalancerUpdateOptions are the options permitted for UpdateNodeBalancer
@@ -61,6 +64,15 @@ type NodeBalancerUpdateOptions struct {
6164 Tags * []string `json:"tags,omitempty"`
6265}
6366
67+ // NodeBalancerPlanType constants start with NBType and include Linode API Nodebalancer plan types
68+ type NodeBalancerPlanType string
69+
70+ // NodeBalancerPlanType constants reflect the plan type used by a NodeBalancer Config
71+ const (
72+ NBTypePremium NodeBalancerPlanType = "premium"
73+ NBTypeCommon NodeBalancerPlanType = "common"
74+ )
75+
6476// UnmarshalJSON implements the json.Unmarshaler interface
6577func (i * NodeBalancer ) UnmarshalJSON (b []byte ) error {
6678 type Mask NodeBalancer
@@ -89,6 +101,7 @@ func (i NodeBalancer) GetCreateOptions() NodeBalancerCreateOptions {
89101 Label : i .Label ,
90102 Region : i .Region ,
91103 ClientConnThrottle : & i .ClientConnThrottle ,
104+ Type : i .Type ,
92105 Tags : i .Tags ,
93106 }
94107}
0 commit comments