diff --git a/vngcloud/services/loadbalancer/v2/irequest.go b/vngcloud/services/loadbalancer/v2/irequest.go index 42c4949..cd53ab0 100644 --- a/vngcloud/services/loadbalancer/v2/irequest.go +++ b/vngcloud/services/loadbalancer/v2/irequest.go @@ -9,6 +9,7 @@ type ICreateLoadBalancerRequest interface { WithPool(ppool ICreatePoolRequest) ICreateLoadBalancerRequest WithTags(ptags ...string) ICreateLoadBalancerRequest WithScheme(pscheme LoadBalancerScheme) ICreateLoadBalancerRequest + WithAutoScalable(pautoScalable bool) ICreateLoadBalancerRequest WithType(ptype LoadBalancerType) ICreateLoadBalancerRequest ParseUserAgent() string } diff --git a/vngcloud/services/loadbalancer/v2/loadbalancer_request.go b/vngcloud/services/loadbalancer/v2/loadbalancer_request.go index e045cad..dac5eb5 100644 --- a/vngcloud/services/loadbalancer/v2/loadbalancer_request.go +++ b/vngcloud/services/loadbalancer/v2/loadbalancer_request.go @@ -52,14 +52,15 @@ func NewDeleteLoadBalancerByIdRequest(plbId string) IDeleteLoadBalancerByIdReque } type CreateLoadBalancerRequest struct { - Name string `json:"name"` - PackageID string `json:"packageId"` - Scheme LoadBalancerScheme `json:"scheme"` - SubnetID string `json:"subnetId"` - Type LoadBalancerType `json:"type"` - Listener ICreateListenerRequest `json:"listener"` - Pool ICreatePoolRequest `json:"pool"` - Tags []lscommon.Tag `json:"tags,omitempty"` + Name string `json:"name"` + PackageID string `json:"packageId"` + Scheme LoadBalancerScheme `json:"scheme"` + AutoScalable bool `json:"autoScalable"` + SubnetID string `json:"subnetId"` + Type LoadBalancerType `json:"type"` + Listener ICreateListenerRequest `json:"listener"` + Pool ICreatePoolRequest `json:"pool"` + Tags []lscommon.Tag `json:"tags,omitempty"` lscommon.UserAgent } @@ -130,6 +131,11 @@ func (s *CreateLoadBalancerRequest) WithScheme(pscheme LoadBalancerScheme) ICrea return s } +func (s *CreateLoadBalancerRequest) WithAutoScalable(pautoScalable bool) ICreateLoadBalancerRequest { + s.AutoScalable = pautoScalable + return s +} + func (s *CreateLoadBalancerRequest) WithType(ptype LoadBalancerType) ICreateLoadBalancerRequest { s.Type = ptype return s