diff --git a/ChangeLog.txt b/ChangeLog.txt index 15380883de..3ecc60d7d3 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,7 @@ +2024-11-27 Version: v1.63.58 +- Generated 2017-11-10 for `Ens`. +undefined + 2024-11-27 Version: v1.63.57 - Generated 2016-04-28 for `Vpc`. - Support CreationTime for ListTrafficMirrorFilters. diff --git a/services/ens/attach_instance_sdg.go b/services/ens/attach_instance_sdg.go new file mode 100644 index 0000000000..9422df525d --- /dev/null +++ b/services/ens/attach_instance_sdg.go @@ -0,0 +1,101 @@ +package ens + +//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" +) + +// AttachInstanceSDG invokes the ens.AttachInstanceSDG API synchronously +func (client *Client) AttachInstanceSDG(request *AttachInstanceSDGRequest) (response *AttachInstanceSDGResponse, err error) { + response = CreateAttachInstanceSDGResponse() + err = client.DoAction(request, response) + return +} + +// AttachInstanceSDGWithChan invokes the ens.AttachInstanceSDG API asynchronously +func (client *Client) AttachInstanceSDGWithChan(request *AttachInstanceSDGRequest) (<-chan *AttachInstanceSDGResponse, <-chan error) { + responseChan := make(chan *AttachInstanceSDGResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.AttachInstanceSDG(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// AttachInstanceSDGWithCallback invokes the ens.AttachInstanceSDG API asynchronously +func (client *Client) AttachInstanceSDGWithCallback(request *AttachInstanceSDGRequest, callback func(response *AttachInstanceSDGResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *AttachInstanceSDGResponse + var err error + defer close(result) + response, err = client.AttachInstanceSDG(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// AttachInstanceSDGRequest is the request struct for api AttachInstanceSDG +type AttachInstanceSDGRequest struct { + *requests.RpcRequest + SDGId string `position:"Query" name:"SDGId"` + InstanceIds *[]string `position:"Query" name:"InstanceIds" type:"Json"` +} + +// AttachInstanceSDGResponse is the response struct for api AttachInstanceSDG +type AttachInstanceSDGResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Data Data `json:"Data" xml:"Data"` +} + +// CreateAttachInstanceSDGRequest creates a request to invoke AttachInstanceSDG API +func CreateAttachInstanceSDGRequest() (request *AttachInstanceSDGRequest) { + request = &AttachInstanceSDGRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ens", "2017-11-10", "AttachInstanceSDG", "ens", "openAPI") + request.Method = requests.POST + return +} + +// CreateAttachInstanceSDGResponse creates a response to parse from AttachInstanceSDG response +func CreateAttachInstanceSDGResponse() (response *AttachInstanceSDGResponse) { + response = &AttachInstanceSDGResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/ens/create_arm_server_instances.go b/services/ens/create_arm_server_instances.go index c3f4cad32a..0d9785280e 100644 --- a/services/ens/create_arm_server_instances.go +++ b/services/ens/create_arm_server_instances.go @@ -71,21 +71,22 @@ func (client *Client) CreateARMServerInstancesWithCallback(request *CreateARMSer // CreateARMServerInstancesRequest is the request struct for api CreateARMServerInstances type CreateARMServerInstancesRequest struct { *requests.RpcRequest - KeyPairName string `position:"Query" name:"KeyPairName"` - Resolution string `position:"Query" name:"Resolution"` - Frequency requests.Integer `position:"Query" name:"Frequency"` - EnsRegionId string `position:"Query" name:"EnsRegionId"` - Period requests.Integer `position:"Query" name:"Period"` - PeriodUnit string `position:"Query" name:"PeriodUnit"` - AutoRenew requests.Boolean `position:"Query" name:"AutoRenew"` - ImageId string `position:"Query" name:"ImageId"` - ServerType string `position:"Query" name:"ServerType"` - AutoUseCoupon requests.Boolean `position:"Query" name:"AutoUseCoupon"` - InstanceType string `position:"Query" name:"InstanceType"` - Amount requests.Integer `position:"Query" name:"Amount"` - NameSpace string `position:"Query" name:"NameSpace"` - ServerName string `position:"Query" name:"ServerName"` - PayType string `position:"Query" name:"PayType"` + KeyPairName string `position:"Query" name:"KeyPairName"` + Resolution string `position:"Query" name:"Resolution"` + Frequency requests.Integer `position:"Query" name:"Frequency"` + EnsRegionId string `position:"Query" name:"EnsRegionId"` + Period requests.Integer `position:"Query" name:"Period"` + PeriodUnit string `position:"Query" name:"PeriodUnit"` + AutoRenew requests.Boolean `position:"Query" name:"AutoRenew"` + ImageId string `position:"Query" name:"ImageId"` + ServerType string `position:"Query" name:"ServerType"` + AutoUseCoupon requests.Boolean `position:"Query" name:"AutoUseCoupon"` + InstanceType string `position:"Query" name:"InstanceType"` + Amount requests.Integer `position:"Query" name:"Amount"` + EnvironmentVar string `position:"Query" name:"EnvironmentVar"` + NameSpace string `position:"Query" name:"NameSpace"` + ServerName string `position:"Query" name:"ServerName"` + PayType string `position:"Query" name:"PayType"` } // CreateARMServerInstancesResponse is the response struct for api CreateARMServerInstances diff --git a/services/ens/create_ha_vip.go b/services/ens/create_ha_vip.go new file mode 100644 index 0000000000..a51bd7ce3a --- /dev/null +++ b/services/ens/create_ha_vip.go @@ -0,0 +1,104 @@ +package ens + +//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" +) + +// CreateHaVip invokes the ens.CreateHaVip API synchronously +func (client *Client) CreateHaVip(request *CreateHaVipRequest) (response *CreateHaVipResponse, err error) { + response = CreateCreateHaVipResponse() + err = client.DoAction(request, response) + return +} + +// CreateHaVipWithChan invokes the ens.CreateHaVip API asynchronously +func (client *Client) CreateHaVipWithChan(request *CreateHaVipRequest) (<-chan *CreateHaVipResponse, <-chan error) { + responseChan := make(chan *CreateHaVipResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.CreateHaVip(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// CreateHaVipWithCallback invokes the ens.CreateHaVip API asynchronously +func (client *Client) CreateHaVipWithCallback(request *CreateHaVipRequest, callback func(response *CreateHaVipResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *CreateHaVipResponse + var err error + defer close(result) + response, err = client.CreateHaVip(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// CreateHaVipRequest is the request struct for api CreateHaVip +type CreateHaVipRequest struct { + *requests.RpcRequest + IpAddress string `position:"Query" name:"IpAddress"` + Description string `position:"Query" name:"Description"` + Amount requests.Integer `position:"Query" name:"Amount"` + VSwitchId string `position:"Query" name:"VSwitchId"` + Name string `position:"Query" name:"Name"` +} + +// CreateHaVipResponse is the response struct for api CreateHaVip +type CreateHaVipResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + HaVipIds []string `json:"HaVipIds" xml:"HaVipIds"` +} + +// CreateCreateHaVipRequest creates a request to invoke CreateHaVip API +func CreateCreateHaVipRequest() (request *CreateHaVipRequest) { + request = &CreateHaVipRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ens", "2017-11-10", "CreateHaVip", "ens", "openAPI") + request.Method = requests.POST + return +} + +// CreateCreateHaVipResponse creates a response to parse from CreateHaVip response +func CreateCreateHaVipResponse() (response *CreateHaVipResponse) { + response = &CreateHaVipResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/ens/create_network_interface.go b/services/ens/create_network_interface.go new file mode 100644 index 0000000000..938fd5644a --- /dev/null +++ b/services/ens/create_network_interface.go @@ -0,0 +1,103 @@ +package ens + +//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" +) + +// CreateNetworkInterface invokes the ens.CreateNetworkInterface API synchronously +func (client *Client) CreateNetworkInterface(request *CreateNetworkInterfaceRequest) (response *CreateNetworkInterfaceResponse, err error) { + response = CreateCreateNetworkInterfaceResponse() + err = client.DoAction(request, response) + return +} + +// CreateNetworkInterfaceWithChan invokes the ens.CreateNetworkInterface API asynchronously +func (client *Client) CreateNetworkInterfaceWithChan(request *CreateNetworkInterfaceRequest) (<-chan *CreateNetworkInterfaceResponse, <-chan error) { + responseChan := make(chan *CreateNetworkInterfaceResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.CreateNetworkInterface(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// CreateNetworkInterfaceWithCallback invokes the ens.CreateNetworkInterface API asynchronously +func (client *Client) CreateNetworkInterfaceWithCallback(request *CreateNetworkInterfaceRequest, callback func(response *CreateNetworkInterfaceResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *CreateNetworkInterfaceResponse + var err error + defer close(result) + response, err = client.CreateNetworkInterface(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// CreateNetworkInterfaceRequest is the request struct for api CreateNetworkInterface +type CreateNetworkInterfaceRequest struct { + *requests.RpcRequest + Description string `position:"Query" name:"Description"` + SecurityGroupIds *[]string `position:"Query" name:"SecurityGroupIds" type:"Json"` + VSwitchId string `position:"Query" name:"VSwitchId"` + Name string `position:"Query" name:"Name"` +} + +// CreateNetworkInterfaceResponse is the response struct for api CreateNetworkInterface +type CreateNetworkInterfaceResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + NetworkInterfaceIds []string `json:"NetworkInterfaceIds" xml:"NetworkInterfaceIds"` +} + +// CreateCreateNetworkInterfaceRequest creates a request to invoke CreateNetworkInterface API +func CreateCreateNetworkInterfaceRequest() (request *CreateNetworkInterfaceRequest) { + request = &CreateNetworkInterfaceRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ens", "2017-11-10", "CreateNetworkInterface", "ens", "openAPI") + request.Method = requests.POST + return +} + +// CreateCreateNetworkInterfaceResponse creates a response to parse from CreateNetworkInterface response +func CreateCreateNetworkInterfaceResponse() (response *CreateNetworkInterfaceResponse) { + response = &CreateNetworkInterfaceResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/ens/delete_ha_vips.go b/services/ens/delete_ha_vips.go new file mode 100644 index 0000000000..151d66d475 --- /dev/null +++ b/services/ens/delete_ha_vips.go @@ -0,0 +1,99 @@ +package ens + +//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" +) + +// DeleteHaVips invokes the ens.DeleteHaVips API synchronously +func (client *Client) DeleteHaVips(request *DeleteHaVipsRequest) (response *DeleteHaVipsResponse, err error) { + response = CreateDeleteHaVipsResponse() + err = client.DoAction(request, response) + return +} + +// DeleteHaVipsWithChan invokes the ens.DeleteHaVips API asynchronously +func (client *Client) DeleteHaVipsWithChan(request *DeleteHaVipsRequest) (<-chan *DeleteHaVipsResponse, <-chan error) { + responseChan := make(chan *DeleteHaVipsResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DeleteHaVips(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DeleteHaVipsWithCallback invokes the ens.DeleteHaVips API asynchronously +func (client *Client) DeleteHaVipsWithCallback(request *DeleteHaVipsRequest, callback func(response *DeleteHaVipsResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DeleteHaVipsResponse + var err error + defer close(result) + response, err = client.DeleteHaVips(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DeleteHaVipsRequest is the request struct for api DeleteHaVips +type DeleteHaVipsRequest struct { + *requests.RpcRequest + HaVipIds *[]string `position:"Query" name:"HaVipIds" type:"Json"` +} + +// DeleteHaVipsResponse is the response struct for api DeleteHaVips +type DeleteHaVipsResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` +} + +// CreateDeleteHaVipsRequest creates a request to invoke DeleteHaVips API +func CreateDeleteHaVipsRequest() (request *DeleteHaVipsRequest) { + request = &DeleteHaVipsRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ens", "2017-11-10", "DeleteHaVips", "ens", "openAPI") + request.Method = requests.POST + return +} + +// CreateDeleteHaVipsResponse creates a response to parse from DeleteHaVips response +func CreateDeleteHaVipsResponse() (response *DeleteHaVipsResponse) { + response = &DeleteHaVipsResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/ens/delete_network_interfaces.go b/services/ens/delete_network_interfaces.go new file mode 100644 index 0000000000..d74bafabdd --- /dev/null +++ b/services/ens/delete_network_interfaces.go @@ -0,0 +1,99 @@ +package ens + +//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" +) + +// DeleteNetworkInterfaces invokes the ens.DeleteNetworkInterfaces API synchronously +func (client *Client) DeleteNetworkInterfaces(request *DeleteNetworkInterfacesRequest) (response *DeleteNetworkInterfacesResponse, err error) { + response = CreateDeleteNetworkInterfacesResponse() + err = client.DoAction(request, response) + return +} + +// DeleteNetworkInterfacesWithChan invokes the ens.DeleteNetworkInterfaces API asynchronously +func (client *Client) DeleteNetworkInterfacesWithChan(request *DeleteNetworkInterfacesRequest) (<-chan *DeleteNetworkInterfacesResponse, <-chan error) { + responseChan := make(chan *DeleteNetworkInterfacesResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DeleteNetworkInterfaces(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DeleteNetworkInterfacesWithCallback invokes the ens.DeleteNetworkInterfaces API asynchronously +func (client *Client) DeleteNetworkInterfacesWithCallback(request *DeleteNetworkInterfacesRequest, callback func(response *DeleteNetworkInterfacesResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DeleteNetworkInterfacesResponse + var err error + defer close(result) + response, err = client.DeleteNetworkInterfaces(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DeleteNetworkInterfacesRequest is the request struct for api DeleteNetworkInterfaces +type DeleteNetworkInterfacesRequest struct { + *requests.RpcRequest + NetworkInterfaceIds *[]string `position:"Query" name:"NetworkInterfaceIds" type:"Json"` +} + +// DeleteNetworkInterfacesResponse is the response struct for api DeleteNetworkInterfaces +type DeleteNetworkInterfacesResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` +} + +// CreateDeleteNetworkInterfacesRequest creates a request to invoke DeleteNetworkInterfaces API +func CreateDeleteNetworkInterfacesRequest() (request *DeleteNetworkInterfacesRequest) { + request = &DeleteNetworkInterfacesRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ens", "2017-11-10", "DeleteNetworkInterfaces", "ens", "openAPI") + request.Method = requests.POST + return +} + +// CreateDeleteNetworkInterfacesResponse creates a response to parse from DeleteNetworkInterfaces response +func CreateDeleteNetworkInterfacesResponse() (response *DeleteNetworkInterfacesResponse) { + response = &DeleteNetworkInterfacesResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/ens/describe_ens_route_tables.go b/services/ens/describe_ens_route_tables.go new file mode 100644 index 0000000000..0657936b35 --- /dev/null +++ b/services/ens/describe_ens_route_tables.go @@ -0,0 +1,107 @@ +package ens + +//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" +) + +// DescribeEnsRouteTables invokes the ens.DescribeEnsRouteTables API synchronously +func (client *Client) DescribeEnsRouteTables(request *DescribeEnsRouteTablesRequest) (response *DescribeEnsRouteTablesResponse, err error) { + response = CreateDescribeEnsRouteTablesResponse() + err = client.DoAction(request, response) + return +} + +// DescribeEnsRouteTablesWithChan invokes the ens.DescribeEnsRouteTables API asynchronously +func (client *Client) DescribeEnsRouteTablesWithChan(request *DescribeEnsRouteTablesRequest) (<-chan *DescribeEnsRouteTablesResponse, <-chan error) { + responseChan := make(chan *DescribeEnsRouteTablesResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DescribeEnsRouteTables(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DescribeEnsRouteTablesWithCallback invokes the ens.DescribeEnsRouteTables API asynchronously +func (client *Client) DescribeEnsRouteTablesWithCallback(request *DescribeEnsRouteTablesRequest, callback func(response *DescribeEnsRouteTablesResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DescribeEnsRouteTablesResponse + var err error + defer close(result) + response, err = client.DescribeEnsRouteTables(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DescribeEnsRouteTablesRequest is the request struct for api DescribeEnsRouteTables +type DescribeEnsRouteTablesRequest struct { + *requests.RpcRequest + PageNumber requests.Integer `position:"Query" name:"PageNumber"` + PageSize requests.Integer `position:"Query" name:"PageSize"` + EnsRegionId string `position:"Query" name:"EnsRegionId"` + RouteTableId string `position:"Query" name:"RouteTableId"` + NetworkId string `position:"Query" name:"NetworkId"` +} + +// DescribeEnsRouteTablesResponse is the response struct for api DescribeEnsRouteTables +type DescribeEnsRouteTablesResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + PageNumber int `json:"PageNumber" xml:"PageNumber"` + TotalCount int `json:"TotalCount" xml:"TotalCount"` + PageSize int `json:"PageSize" xml:"PageSize"` + RouteTables []RouteTable `json:"RouteTables" xml:"RouteTables"` +} + +// CreateDescribeEnsRouteTablesRequest creates a request to invoke DescribeEnsRouteTables API +func CreateDescribeEnsRouteTablesRequest() (request *DescribeEnsRouteTablesRequest) { + request = &DescribeEnsRouteTablesRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ens", "2017-11-10", "DescribeEnsRouteTables", "ens", "openAPI") + request.Method = requests.POST + return +} + +// CreateDescribeEnsRouteTablesResponse creates a response to parse from DescribeEnsRouteTables response +func CreateDescribeEnsRouteTablesResponse() (response *DescribeEnsRouteTablesResponse) { + response = &DescribeEnsRouteTablesResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/ens/describe_instance_sdg_status.go b/services/ens/describe_instance_sdg_status.go new file mode 100644 index 0000000000..6828369e24 --- /dev/null +++ b/services/ens/describe_instance_sdg_status.go @@ -0,0 +1,107 @@ +package ens + +//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" +) + +// DescribeInstanceSDGStatus invokes the ens.DescribeInstanceSDGStatus API synchronously +func (client *Client) DescribeInstanceSDGStatus(request *DescribeInstanceSDGStatusRequest) (response *DescribeInstanceSDGStatusResponse, err error) { + response = CreateDescribeInstanceSDGStatusResponse() + err = client.DoAction(request, response) + return +} + +// DescribeInstanceSDGStatusWithChan invokes the ens.DescribeInstanceSDGStatus API asynchronously +func (client *Client) DescribeInstanceSDGStatusWithChan(request *DescribeInstanceSDGStatusRequest) (<-chan *DescribeInstanceSDGStatusResponse, <-chan error) { + responseChan := make(chan *DescribeInstanceSDGStatusResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DescribeInstanceSDGStatus(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DescribeInstanceSDGStatusWithCallback invokes the ens.DescribeInstanceSDGStatus API asynchronously +func (client *Client) DescribeInstanceSDGStatusWithCallback(request *DescribeInstanceSDGStatusRequest, callback func(response *DescribeInstanceSDGStatusResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DescribeInstanceSDGStatusResponse + var err error + defer close(result) + response, err = client.DescribeInstanceSDGStatus(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DescribeInstanceSDGStatusRequest is the request struct for api DescribeInstanceSDGStatus +type DescribeInstanceSDGStatusRequest struct { + *requests.RpcRequest + PageNumber requests.Integer `position:"Query" name:"PageNumber"` + PageSize requests.Integer `position:"Query" name:"PageSize"` + SDGIds *[]string `position:"Query" name:"SDGIds" type:"Json"` + InstanceId string `position:"Query" name:"InstanceId"` + Status string `position:"Query" name:"Status"` +} + +// DescribeInstanceSDGStatusResponse is the response struct for api DescribeInstanceSDGStatus +type DescribeInstanceSDGStatusResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + PageNumber int64 `json:"PageNumber" xml:"PageNumber"` + PageSize string `json:"PageSize" xml:"PageSize"` + TotalCount string `json:"TotalCount" xml:"TotalCount"` + DeploymentStatus []DeploymentStatusItem `json:"DeploymentStatus" xml:"DeploymentStatus"` +} + +// CreateDescribeInstanceSDGStatusRequest creates a request to invoke DescribeInstanceSDGStatus API +func CreateDescribeInstanceSDGStatusRequest() (request *DescribeInstanceSDGStatusRequest) { + request = &DescribeInstanceSDGStatusRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ens", "2017-11-10", "DescribeInstanceSDGStatus", "ens", "openAPI") + request.Method = requests.GET + return +} + +// CreateDescribeInstanceSDGStatusResponse creates a response to parse from DescribeInstanceSDGStatus response +func CreateDescribeInstanceSDGStatusResponse() (response *DescribeInstanceSDGStatusResponse) { + response = &DescribeInstanceSDGStatusResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/ens/describe_snapshots.go b/services/ens/describe_snapshots.go index e99de57728..0652367838 100644 --- a/services/ens/describe_snapshots.go +++ b/services/ens/describe_snapshots.go @@ -71,12 +71,14 @@ func (client *Client) DescribeSnapshotsWithCallback(request *DescribeSnapshotsRe // DescribeSnapshotsRequest is the request struct for api DescribeSnapshots type DescribeSnapshotsRequest struct { *requests.RpcRequest - SnapshotId string `position:"Query" name:"SnapshotId"` - PageNumber requests.Integer `position:"Query" name:"PageNumber"` - EnsRegionId string `position:"Query" name:"EnsRegionId"` - PageSize requests.Integer `position:"Query" name:"PageSize"` - DiskId string `position:"Query" name:"DiskId"` - InstanceId string `position:"Query" name:"InstanceId"` + EnsRegionId string `position:"Query" name:"EnsRegionId"` + InstanceId string `position:"Query" name:"InstanceId"` + SnapshotId string `position:"Query" name:"SnapshotId"` + SnapshotName string `position:"Query" name:"SnapshotName"` + PageNumber requests.Integer `position:"Query" name:"PageNumber"` + PageSize requests.Integer `position:"Query" name:"PageSize"` + DiskId string `position:"Query" name:"DiskId"` + EnsRegionIds string `position:"Query" name:"EnsRegionIds"` } // DescribeSnapshotsResponse is the response struct for api DescribeSnapshots diff --git a/services/ens/detach_instance_sdg.go b/services/ens/detach_instance_sdg.go new file mode 100644 index 0000000000..82bd7db1fc --- /dev/null +++ b/services/ens/detach_instance_sdg.go @@ -0,0 +1,101 @@ +package ens + +//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" +) + +// DetachInstanceSDG invokes the ens.DetachInstanceSDG API synchronously +func (client *Client) DetachInstanceSDG(request *DetachInstanceSDGRequest) (response *DetachInstanceSDGResponse, err error) { + response = CreateDetachInstanceSDGResponse() + err = client.DoAction(request, response) + return +} + +// DetachInstanceSDGWithChan invokes the ens.DetachInstanceSDG API asynchronously +func (client *Client) DetachInstanceSDGWithChan(request *DetachInstanceSDGRequest) (<-chan *DetachInstanceSDGResponse, <-chan error) { + responseChan := make(chan *DetachInstanceSDGResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DetachInstanceSDG(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DetachInstanceSDGWithCallback invokes the ens.DetachInstanceSDG API asynchronously +func (client *Client) DetachInstanceSDGWithCallback(request *DetachInstanceSDGRequest, callback func(response *DetachInstanceSDGResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DetachInstanceSDGResponse + var err error + defer close(result) + response, err = client.DetachInstanceSDG(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DetachInstanceSDGRequest is the request struct for api DetachInstanceSDG +type DetachInstanceSDGRequest struct { + *requests.RpcRequest + SDGId string `position:"Query" name:"SDGId"` + InstanceIds *[]string `position:"Query" name:"InstanceIds" type:"Json"` +} + +// DetachInstanceSDGResponse is the response struct for api DetachInstanceSDG +type DetachInstanceSDGResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Data Data `json:"Data" xml:"Data"` +} + +// CreateDetachInstanceSDGRequest creates a request to invoke DetachInstanceSDG API +func CreateDetachInstanceSDGRequest() (request *DetachInstanceSDGRequest) { + request = &DetachInstanceSDGRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ens", "2017-11-10", "DetachInstanceSDG", "ens", "openAPI") + request.Method = requests.POST + return +} + +// CreateDetachInstanceSDGResponse creates a response to parse from DetachInstanceSDG response +func CreateDetachInstanceSDGResponse() (response *DetachInstanceSDGResponse) { + response = &DetachInstanceSDGResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/ens/mount_instance_sdg.go b/services/ens/mount_instance_sdg.go new file mode 100644 index 0000000000..75f7e3c445 --- /dev/null +++ b/services/ens/mount_instance_sdg.go @@ -0,0 +1,101 @@ +package ens + +//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" +) + +// MountInstanceSDG invokes the ens.MountInstanceSDG API synchronously +func (client *Client) MountInstanceSDG(request *MountInstanceSDGRequest) (response *MountInstanceSDGResponse, err error) { + response = CreateMountInstanceSDGResponse() + err = client.DoAction(request, response) + return +} + +// MountInstanceSDGWithChan invokes the ens.MountInstanceSDG API asynchronously +func (client *Client) MountInstanceSDGWithChan(request *MountInstanceSDGRequest) (<-chan *MountInstanceSDGResponse, <-chan error) { + responseChan := make(chan *MountInstanceSDGResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.MountInstanceSDG(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// MountInstanceSDGWithCallback invokes the ens.MountInstanceSDG API asynchronously +func (client *Client) MountInstanceSDGWithCallback(request *MountInstanceSDGRequest, callback func(response *MountInstanceSDGResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *MountInstanceSDGResponse + var err error + defer close(result) + response, err = client.MountInstanceSDG(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// MountInstanceSDGRequest is the request struct for api MountInstanceSDG +type MountInstanceSDGRequest struct { + *requests.RpcRequest + SDGId string `position:"Query" name:"SDGId"` + InstanceIds *[]string `position:"Query" name:"InstanceIds" type:"Json"` +} + +// MountInstanceSDGResponse is the response struct for api MountInstanceSDG +type MountInstanceSDGResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Data Data `json:"Data" xml:"Data"` +} + +// CreateMountInstanceSDGRequest creates a request to invoke MountInstanceSDG API +func CreateMountInstanceSDGRequest() (request *MountInstanceSDGRequest) { + request = &MountInstanceSDGRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ens", "2017-11-10", "MountInstanceSDG", "ens", "openAPI") + request.Method = requests.POST + return +} + +// CreateMountInstanceSDGResponse creates a response to parse from MountInstanceSDG response +func CreateMountInstanceSDGResponse() (response *MountInstanceSDGResponse) { + response = &MountInstanceSDGResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/ens/struct_deployment_status.go b/services/ens/struct_deployment_status_in_describe_instance_sdg_status.go similarity index 85% rename from services/ens/struct_deployment_status.go rename to services/ens/struct_deployment_status_in_describe_instance_sdg_status.go index 63987f932e..5c36c0b17d 100644 --- a/services/ens/struct_deployment_status.go +++ b/services/ens/struct_deployment_status_in_describe_instance_sdg_status.go @@ -15,7 +15,7 @@ package ens // Code generated by Alibaba Cloud SDK Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DeploymentStatus is a nested struct in ens response -type DeploymentStatus struct { +// DeploymentStatusInDescribeInstanceSDGStatus is a nested struct in ens response +type DeploymentStatusInDescribeInstanceSDGStatus struct { DeploymentStatusItem []DeploymentStatusItem `json:"DeploymentStatus" xml:"DeploymentStatus"` } diff --git a/services/ens/struct_deployment_status_in_describe_sdg_deployment_status.go b/services/ens/struct_deployment_status_in_describe_sdg_deployment_status.go new file mode 100644 index 0000000000..c4a0d4de09 --- /dev/null +++ b/services/ens/struct_deployment_status_in_describe_sdg_deployment_status.go @@ -0,0 +1,21 @@ +package ens + +//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. + +// DeploymentStatusInDescribeSDGDeploymentStatus is a nested struct in ens response +type DeploymentStatusInDescribeSDGDeploymentStatus struct { + DeploymentStatusItem []DeploymentStatusItem `json:"DeploymentStatus" xml:"DeploymentStatus"` +} diff --git a/services/ens/struct_deployment_status_item.go b/services/ens/struct_deployment_status_item.go index bed66fb4c4..fd61ece606 100644 --- a/services/ens/struct_deployment_status_item.go +++ b/services/ens/struct_deployment_status_item.go @@ -17,9 +17,12 @@ package ens // DeploymentStatusItem is a nested struct in ens response type DeploymentStatusItem struct { - InstanceId string `json:"InstanceId" xml:"InstanceId"` - MountType string `json:"MountType" xml:"MountType"` - RegionId string `json:"RegionId" xml:"RegionId"` - Status string `json:"Status" xml:"Status"` - UpdateTime string `json:"UpdateTime" xml:"UpdateTime"` + RegionId string `json:"RegionId" xml:"RegionId"` + UpdateTime string `json:"UpdateTime" xml:"UpdateTime"` + InstanceId string `json:"InstanceId" xml:"InstanceId"` + Phase string `json:"Phase" xml:"Phase"` + SDGId string `json:"SDGId" xml:"SDGId"` + EnsRegionId string `json:"EnsRegionId" xml:"EnsRegionId"` + MountType string `json:"MountType" xml:"MountType"` + Status string `json:"Status" xml:"Status"` } diff --git a/services/ens/struct_disks_item.go b/services/ens/struct_disks_item.go index b02bb2df31..62fe98480b 100644 --- a/services/ens/struct_disks_item.go +++ b/services/ens/struct_disks_item.go @@ -17,20 +17,22 @@ package ens // DisksItem is a nested struct in ens response type DisksItem struct { - Category string `json:"Category" xml:"Category"` - CreationTime string `json:"CreationTime" xml:"CreationTime"` - DiskChargeType string `json:"DiskChargeType" xml:"DiskChargeType"` - DiskId string `json:"DiskId" xml:"DiskId"` - DiskName string `json:"DiskName" xml:"DiskName"` - EnsRegionId string `json:"EnsRegionId" xml:"EnsRegionId"` - InstanceId string `json:"InstanceId" xml:"InstanceId"` - InstanceName string `json:"InstanceName" xml:"InstanceName"` - Size int `json:"Size" xml:"Size"` - Status string `json:"Status" xml:"Status"` - Type string `json:"Type" xml:"Type"` - Portable bool `json:"Portable" xml:"Portable"` - SnapshotId string `json:"SnapshotId" xml:"SnapshotId"` - SerialId string `json:"SerialId" xml:"SerialId"` - Encrypted bool `json:"Encrypted" xml:"Encrypted"` - EncryptedKeyId string `json:"EncryptedKeyId" xml:"EncryptedKeyId"` + Category string `json:"Category" xml:"Category"` + CreationTime string `json:"CreationTime" xml:"CreationTime"` + DiskChargeType string `json:"DiskChargeType" xml:"DiskChargeType"` + DiskId string `json:"DiskId" xml:"DiskId"` + DiskName string `json:"DiskName" xml:"DiskName"` + EnsRegionId string `json:"EnsRegionId" xml:"EnsRegionId"` + InstanceId string `json:"InstanceId" xml:"InstanceId"` + InstanceName string `json:"InstanceName" xml:"InstanceName"` + Description string `json:"Description" xml:"Description"` + Size int `json:"Size" xml:"Size"` + Status string `json:"Status" xml:"Status"` + Type string `json:"Type" xml:"Type"` + Portable bool `json:"Portable" xml:"Portable"` + SnapshotId string `json:"SnapshotId" xml:"SnapshotId"` + SerialId string `json:"SerialId" xml:"SerialId"` + Encrypted bool `json:"Encrypted" xml:"Encrypted"` + EncryptedKeyId string `json:"EncryptedKeyId" xml:"EncryptedKeyId"` + DeleteWithInstance bool `json:"DeleteWithInstance" xml:"DeleteWithInstance"` } diff --git a/services/ens/struct_failed_items_in_attach_instance_sdg.go b/services/ens/struct_failed_items_in_attach_instance_sdg.go new file mode 100644 index 0000000000..75dc9f154a --- /dev/null +++ b/services/ens/struct_failed_items_in_attach_instance_sdg.go @@ -0,0 +1,21 @@ +package ens + +//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. + +// FailedItemsInAttachInstanceSDG is a nested struct in ens response +type FailedItemsInAttachInstanceSDG struct { + FailedItemsItem []FailedItemsItem `json:"FailedItems" xml:"FailedItems"` +} diff --git a/services/ens/struct_failed_items_in_detach_instance_sdg.go b/services/ens/struct_failed_items_in_detach_instance_sdg.go new file mode 100644 index 0000000000..e7f8814c33 --- /dev/null +++ b/services/ens/struct_failed_items_in_detach_instance_sdg.go @@ -0,0 +1,21 @@ +package ens + +//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. + +// FailedItemsInDetachInstanceSDG is a nested struct in ens response +type FailedItemsInDetachInstanceSDG struct { + FailedItem []FailedItem `json:"FailedItem" xml:"FailedItem"` +} diff --git a/services/ens/struct_failed_items_in_mount_instance_sdg.go b/services/ens/struct_failed_items_in_mount_instance_sdg.go new file mode 100644 index 0000000000..0702ea2799 --- /dev/null +++ b/services/ens/struct_failed_items_in_mount_instance_sdg.go @@ -0,0 +1,21 @@ +package ens + +//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. + +// FailedItemsInMountInstanceSDG is a nested struct in ens response +type FailedItemsInMountInstanceSDG struct { + FailedItem []FailedItem `json:"FailedItem" xml:"FailedItem"` +} diff --git a/services/ens/struct_failed_items_in_unmount_instance_sdg.go b/services/ens/struct_failed_items_in_unmount_instance_sdg.go new file mode 100644 index 0000000000..67a655dd14 --- /dev/null +++ b/services/ens/struct_failed_items_in_unmount_instance_sdg.go @@ -0,0 +1,21 @@ +package ens + +//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. + +// FailedItemsInUnmountInstanceSDG is a nested struct in ens response +type FailedItemsInUnmountInstanceSDG struct { + FailedItem []FailedItem `json:"FailedItem" xml:"FailedItem"` +} diff --git a/services/ens/struct_failed_items_item.go b/services/ens/struct_failed_items_item.go index 8f9cac8405..b432ffe9ef 100644 --- a/services/ens/struct_failed_items_item.go +++ b/services/ens/struct_failed_items_item.go @@ -18,8 +18,8 @@ package ens // FailedItemsItem is a nested struct in ens response type FailedItemsItem struct { DestinationRegionId string `json:"DestinationRegionId" xml:"DestinationRegionId"` - ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"` InstanceId string `json:"InstanceId" xml:"InstanceId"` + ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"` ErrMessage string `json:"ErrMessage" xml:"ErrMessage"` Item Item `json:"Item" xml:"Item"` } diff --git a/services/ens/struct_ha_vip_ids.go b/services/ens/struct_ha_vip_ids.go new file mode 100644 index 0000000000..52378568d4 --- /dev/null +++ b/services/ens/struct_ha_vip_ids.go @@ -0,0 +1,21 @@ +package ens + +//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. + +// HaVipIds is a nested struct in ens response +type HaVipIds struct { + HaVipIds []string `json:"HaVipIds" xml:"HaVipIds"` +} diff --git a/services/ens/struct_network_interface_ids.go b/services/ens/struct_network_interface_ids.go new file mode 100644 index 0000000000..3769e3ea91 --- /dev/null +++ b/services/ens/struct_network_interface_ids.go @@ -0,0 +1,21 @@ +package ens + +//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. + +// NetworkInterfaceIds is a nested struct in ens response +type NetworkInterfaceIds struct { + NetworkInterfaceIds []string `json:"NetworkInterfaceIds" xml:"NetworkInterfaceIds"` +} diff --git a/services/ens/struct_result_in_detach_instance_sdg.go b/services/ens/struct_result_in_detach_instance_sdg.go new file mode 100644 index 0000000000..cfc1f56a93 --- /dev/null +++ b/services/ens/struct_result_in_detach_instance_sdg.go @@ -0,0 +1,23 @@ +package ens + +//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. + +// ResultInDetachInstanceSDG is a nested struct in ens response +type ResultInDetachInstanceSDG struct { + FailedCount int64 `json:"FailedCount" xml:"FailedCount"` + SuccessCount string `json:"SuccessCount" xml:"SuccessCount"` + FailedItems []FailedItem `json:"FailedItems" xml:"FailedItems"` +} diff --git a/services/ens/struct_result_in_mount_instance_sdg.go b/services/ens/struct_result_in_mount_instance_sdg.go new file mode 100644 index 0000000000..7f64af7792 --- /dev/null +++ b/services/ens/struct_result_in_mount_instance_sdg.go @@ -0,0 +1,23 @@ +package ens + +//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. + +// ResultInMountInstanceSDG is a nested struct in ens response +type ResultInMountInstanceSDG struct { + FailedCount int64 `json:"FailedCount" xml:"FailedCount"` + SuccessCount int64 `json:"SuccessCount" xml:"SuccessCount"` + FailedItems []FailedItem `json:"FailedItems" xml:"FailedItems"` +} diff --git a/services/ens/struct_result_in_unmount_instance_sdg.go b/services/ens/struct_result_in_unmount_instance_sdg.go new file mode 100644 index 0000000000..bdf873e145 --- /dev/null +++ b/services/ens/struct_result_in_unmount_instance_sdg.go @@ -0,0 +1,23 @@ +package ens + +//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. + +// ResultInUnmountInstanceSDG is a nested struct in ens response +type ResultInUnmountInstanceSDG struct { + FailedCount int64 `json:"FailedCount" xml:"FailedCount"` + SuccessCount int64 `json:"SuccessCount" xml:"SuccessCount"` + FailedItems []FailedItem `json:"FailedItems" xml:"FailedItems"` +} diff --git a/services/ens/struct_route_table.go b/services/ens/struct_route_table.go new file mode 100644 index 0000000000..26ed1ba173 --- /dev/null +++ b/services/ens/struct_route_table.go @@ -0,0 +1,29 @@ +package ens + +//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. + +// RouteTable is a nested struct in ens response +type RouteTable struct { + CreationTime string `json:"CreationTime" xml:"CreationTime"` + Status string `json:"Status" xml:"Status"` + RouteTableId string `json:"RouteTableId" xml:"RouteTableId"` + NetworkId string `json:"NetworkId" xml:"NetworkId"` + EnsRegionId string `json:"EnsRegionId" xml:"EnsRegionId"` + Type string `json:"Type" xml:"Type"` + RouteTableName string `json:"RouteTableName" xml:"RouteTableName"` + NetworkName string `json:"NetworkName" xml:"NetworkName"` + VSwitchIds []string `json:"VSwitchIds" xml:"VSwitchIds"` +} diff --git a/services/ens/struct_route_tables.go b/services/ens/struct_route_tables.go new file mode 100644 index 0000000000..4332ed16ca --- /dev/null +++ b/services/ens/struct_route_tables.go @@ -0,0 +1,21 @@ +package ens + +//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. + +// RouteTables is a nested struct in ens response +type RouteTables struct { + RouteTable []RouteTable `json:"RouteTable" xml:"RouteTable"` +} diff --git a/services/ens/struct_v_switch_ids_in_describe_ens_route_tables.go b/services/ens/struct_v_switch_ids_in_describe_ens_route_tables.go new file mode 100644 index 0000000000..57230b2b2d --- /dev/null +++ b/services/ens/struct_v_switch_ids_in_describe_ens_route_tables.go @@ -0,0 +1,21 @@ +package ens + +//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. + +// VSwitchIdsInDescribeEnsRouteTables is a nested struct in ens response +type VSwitchIdsInDescribeEnsRouteTables struct { + VSwitch []string `json:"VSwitch" xml:"VSwitch"` +} diff --git a/services/ens/unmount_instance_sdg.go b/services/ens/unmount_instance_sdg.go new file mode 100644 index 0000000000..013595019d --- /dev/null +++ b/services/ens/unmount_instance_sdg.go @@ -0,0 +1,101 @@ +package ens + +//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" +) + +// UnmountInstanceSDG invokes the ens.UnmountInstanceSDG API synchronously +func (client *Client) UnmountInstanceSDG(request *UnmountInstanceSDGRequest) (response *UnmountInstanceSDGResponse, err error) { + response = CreateUnmountInstanceSDGResponse() + err = client.DoAction(request, response) + return +} + +// UnmountInstanceSDGWithChan invokes the ens.UnmountInstanceSDG API asynchronously +func (client *Client) UnmountInstanceSDGWithChan(request *UnmountInstanceSDGRequest) (<-chan *UnmountInstanceSDGResponse, <-chan error) { + responseChan := make(chan *UnmountInstanceSDGResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.UnmountInstanceSDG(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// UnmountInstanceSDGWithCallback invokes the ens.UnmountInstanceSDG API asynchronously +func (client *Client) UnmountInstanceSDGWithCallback(request *UnmountInstanceSDGRequest, callback func(response *UnmountInstanceSDGResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *UnmountInstanceSDGResponse + var err error + defer close(result) + response, err = client.UnmountInstanceSDG(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// UnmountInstanceSDGRequest is the request struct for api UnmountInstanceSDG +type UnmountInstanceSDGRequest struct { + *requests.RpcRequest + SDGId string `position:"Query" name:"SDGId"` + InstanceIds *[]string `position:"Query" name:"InstanceIds" type:"Json"` +} + +// UnmountInstanceSDGResponse is the response struct for api UnmountInstanceSDG +type UnmountInstanceSDGResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Data Data `json:"Data" xml:"Data"` +} + +// CreateUnmountInstanceSDGRequest creates a request to invoke UnmountInstanceSDG API +func CreateUnmountInstanceSDGRequest() (request *UnmountInstanceSDGRequest) { + request = &UnmountInstanceSDGRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ens", "2017-11-10", "UnmountInstanceSDG", "ens", "openAPI") + request.Method = requests.POST + return +} + +// CreateUnmountInstanceSDGResponse creates a response to parse from UnmountInstanceSDG response +func CreateUnmountInstanceSDGResponse() (response *UnmountInstanceSDGResponse) { + response = &UnmountInstanceSDGResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +}