From ae1727c8361b4425a9a9ae202625b5831b04c25f Mon Sep 17 00:00:00 2001 From: sdk-team Date: Sun, 8 Oct 2023 02:44:06 +0000 Subject: [PATCH] Generated 2022-04-30 for Nlb. --- ChangeLog.txt | 4 + .../nlb/cancel_shift_load_balancer_zones.go | 114 ++++++++++++++++++ services/nlb/create_server_group.go | 1 + .../nlb/start_shift_load_balancer_zones.go | 114 ++++++++++++++++++ services/nlb/struct_server_group.go | 1 + services/nlb/update_server_group_attribute.go | 1 + 6 files changed, 235 insertions(+) create mode 100644 services/nlb/cancel_shift_load_balancer_zones.go create mode 100644 services/nlb/start_shift_load_balancer_zones.go diff --git a/ChangeLog.txt b/ChangeLog.txt index 3e41831e02..0200cd948c 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,7 @@ +2023-10-08 Version: v1.62.569 +- Generated 2022-04-30 for `Nlb`. +undefined + 2023-09-28 Version: v1.62.568 - Generated 2018-11-01 for `dms-enterprise`. - Support CreateProcCorrectAPI. diff --git a/services/nlb/cancel_shift_load_balancer_zones.go b/services/nlb/cancel_shift_load_balancer_zones.go new file mode 100644 index 0000000000..2534c3c68c --- /dev/null +++ b/services/nlb/cancel_shift_load_balancer_zones.go @@ -0,0 +1,114 @@ +package nlb + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// CancelShiftLoadBalancerZones invokes the nlb.CancelShiftLoadBalancerZones API synchronously +func (client *Client) CancelShiftLoadBalancerZones(request *CancelShiftLoadBalancerZonesRequest) (response *CancelShiftLoadBalancerZonesResponse, err error) { + response = CreateCancelShiftLoadBalancerZonesResponse() + err = client.DoAction(request, response) + return +} + +// CancelShiftLoadBalancerZonesWithChan invokes the nlb.CancelShiftLoadBalancerZones API asynchronously +func (client *Client) CancelShiftLoadBalancerZonesWithChan(request *CancelShiftLoadBalancerZonesRequest) (<-chan *CancelShiftLoadBalancerZonesResponse, <-chan error) { + responseChan := make(chan *CancelShiftLoadBalancerZonesResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.CancelShiftLoadBalancerZones(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// CancelShiftLoadBalancerZonesWithCallback invokes the nlb.CancelShiftLoadBalancerZones API asynchronously +func (client *Client) CancelShiftLoadBalancerZonesWithCallback(request *CancelShiftLoadBalancerZonesRequest, callback func(response *CancelShiftLoadBalancerZonesResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *CancelShiftLoadBalancerZonesResponse + var err error + defer close(result) + response, err = client.CancelShiftLoadBalancerZones(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// CancelShiftLoadBalancerZonesRequest is the request struct for api CancelShiftLoadBalancerZones +type CancelShiftLoadBalancerZonesRequest struct { + *requests.RpcRequest + ClientToken string `position:"Body" name:"ClientToken"` + DryRun requests.Boolean `position:"Body" name:"DryRun"` + ZoneMappings *[]CancelShiftLoadBalancerZonesZoneMappings `position:"Body" name:"ZoneMappings" type:"Repeated"` + LoadBalancerId string `position:"Body" name:"LoadBalancerId"` +} + +// CancelShiftLoadBalancerZonesZoneMappings is a repeated param struct in CancelShiftLoadBalancerZonesRequest +type CancelShiftLoadBalancerZonesZoneMappings struct { + VSwitchId string `name:"VSwitchId"` + ZoneId string `name:"ZoneId"` +} + +// CancelShiftLoadBalancerZonesResponse is the response struct for api CancelShiftLoadBalancerZones +type CancelShiftLoadBalancerZonesResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + HttpStatusCode int `json:"HttpStatusCode" xml:"HttpStatusCode"` + DynamicCode string `json:"DynamicCode" xml:"DynamicCode"` + DynamicMessage string `json:"DynamicMessage" xml:"DynamicMessage"` +} + +// CreateCancelShiftLoadBalancerZonesRequest creates a request to invoke CancelShiftLoadBalancerZones API +func CreateCancelShiftLoadBalancerZonesRequest() (request *CancelShiftLoadBalancerZonesRequest) { + request = &CancelShiftLoadBalancerZonesRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Nlb", "2022-04-30", "CancelShiftLoadBalancerZones", "nlb", "openAPI") + request.Method = requests.POST + return +} + +// CreateCancelShiftLoadBalancerZonesResponse creates a response to parse from CancelShiftLoadBalancerZones response +func CreateCancelShiftLoadBalancerZonesResponse() (response *CancelShiftLoadBalancerZonesResponse) { + response = &CancelShiftLoadBalancerZonesResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/nlb/create_server_group.go b/services/nlb/create_server_group.go index 13e6682580..8b663482f9 100644 --- a/services/nlb/create_server_group.go +++ b/services/nlb/create_server_group.go @@ -71,6 +71,7 @@ func (client *Client) CreateServerGroupWithCallback(request *CreateServerGroupRe // CreateServerGroupRequest is the request struct for api CreateServerGroup type CreateServerGroupRequest struct { *requests.RpcRequest + QuicVersion string `position:"Body" name:"QuicVersion"` ServerGroupName string `position:"Body" name:"ServerGroupName"` ClientToken string `position:"Body" name:"ClientToken"` PreserveClientIpEnabled requests.Boolean `position:"Body" name:"PreserveClientIpEnabled"` diff --git a/services/nlb/start_shift_load_balancer_zones.go b/services/nlb/start_shift_load_balancer_zones.go new file mode 100644 index 0000000000..adc1e9dd5c --- /dev/null +++ b/services/nlb/start_shift_load_balancer_zones.go @@ -0,0 +1,114 @@ +package nlb + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// StartShiftLoadBalancerZones invokes the nlb.StartShiftLoadBalancerZones API synchronously +func (client *Client) StartShiftLoadBalancerZones(request *StartShiftLoadBalancerZonesRequest) (response *StartShiftLoadBalancerZonesResponse, err error) { + response = CreateStartShiftLoadBalancerZonesResponse() + err = client.DoAction(request, response) + return +} + +// StartShiftLoadBalancerZonesWithChan invokes the nlb.StartShiftLoadBalancerZones API asynchronously +func (client *Client) StartShiftLoadBalancerZonesWithChan(request *StartShiftLoadBalancerZonesRequest) (<-chan *StartShiftLoadBalancerZonesResponse, <-chan error) { + responseChan := make(chan *StartShiftLoadBalancerZonesResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.StartShiftLoadBalancerZones(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// StartShiftLoadBalancerZonesWithCallback invokes the nlb.StartShiftLoadBalancerZones API asynchronously +func (client *Client) StartShiftLoadBalancerZonesWithCallback(request *StartShiftLoadBalancerZonesRequest, callback func(response *StartShiftLoadBalancerZonesResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *StartShiftLoadBalancerZonesResponse + var err error + defer close(result) + response, err = client.StartShiftLoadBalancerZones(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// StartShiftLoadBalancerZonesRequest is the request struct for api StartShiftLoadBalancerZones +type StartShiftLoadBalancerZonesRequest struct { + *requests.RpcRequest + ClientToken string `position:"Body" name:"ClientToken"` + DryRun requests.Boolean `position:"Body" name:"DryRun"` + ZoneMappings *[]StartShiftLoadBalancerZonesZoneMappings `position:"Body" name:"ZoneMappings" type:"Repeated"` + LoadBalancerId string `position:"Body" name:"LoadBalancerId"` +} + +// StartShiftLoadBalancerZonesZoneMappings is a repeated param struct in StartShiftLoadBalancerZonesRequest +type StartShiftLoadBalancerZonesZoneMappings struct { + VSwitchId string `name:"VSwitchId"` + ZoneId string `name:"ZoneId"` +} + +// StartShiftLoadBalancerZonesResponse is the response struct for api StartShiftLoadBalancerZones +type StartShiftLoadBalancerZonesResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + HttpStatusCode int `json:"HttpStatusCode" xml:"HttpStatusCode"` + DynamicCode string `json:"DynamicCode" xml:"DynamicCode"` + DynamicMessage string `json:"DynamicMessage" xml:"DynamicMessage"` +} + +// CreateStartShiftLoadBalancerZonesRequest creates a request to invoke StartShiftLoadBalancerZones API +func CreateStartShiftLoadBalancerZonesRequest() (request *StartShiftLoadBalancerZonesRequest) { + request = &StartShiftLoadBalancerZonesRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Nlb", "2022-04-30", "StartShiftLoadBalancerZones", "nlb", "openAPI") + request.Method = requests.POST + return +} + +// CreateStartShiftLoadBalancerZonesResponse creates a response to parse from StartShiftLoadBalancerZones response +func CreateStartShiftLoadBalancerZonesResponse() (response *StartShiftLoadBalancerZonesResponse) { + response = &StartShiftLoadBalancerZonesResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/nlb/struct_server_group.go b/services/nlb/struct_server_group.go index 8e7c442e07..c2941ba0cf 100644 --- a/services/nlb/struct_server_group.go +++ b/services/nlb/struct_server_group.go @@ -35,6 +35,7 @@ type ServerGroup struct { ServerGroupStatus string `json:"ServerGroupStatus" xml:"ServerGroupStatus"` AliUid int64 `json:"AliUid" xml:"AliUid"` ServerCount int `json:"ServerCount" xml:"ServerCount"` + QuicVersion string `json:"QuicVersion" xml:"QuicVersion"` RelatedLoadBalancerIds []string `json:"RelatedLoadBalancerIds" xml:"RelatedLoadBalancerIds"` HealthCheck HealthCheck `json:"HealthCheck" xml:"HealthCheck"` Tags []Tag `json:"Tags" xml:"Tags"` diff --git a/services/nlb/update_server_group_attribute.go b/services/nlb/update_server_group_attribute.go index 14e6531a4e..13d31023e2 100644 --- a/services/nlb/update_server_group_attribute.go +++ b/services/nlb/update_server_group_attribute.go @@ -71,6 +71,7 @@ func (client *Client) UpdateServerGroupAttributeWithCallback(request *UpdateServ // UpdateServerGroupAttributeRequest is the request struct for api UpdateServerGroupAttribute type UpdateServerGroupAttributeRequest struct { *requests.RpcRequest + QuicVersion string `position:"Body" name:"QuicVersion"` ServerGroupName string `position:"Body" name:"ServerGroupName"` ClientToken string `position:"Body" name:"ClientToken"` PreserveClientIpEnabled requests.Boolean `position:"Body" name:"PreserveClientIpEnabled"`