From e1a433bf512bff85c33342b014f3a906b6879365 Mon Sep 17 00:00:00 2001 From: sdk-team Date: Wed, 22 May 2024 07:56:13 +0000 Subject: [PATCH] Generated 2017-11-10 for Ens. --- ChangeLog.txt | 4 + services/ens/create_sdg.go | 103 ++++++++++++++++ services/ens/delete_key_pairs.go | 1 + services/ens/delete_sdg.go | 99 ++++++++++++++++ services/ens/describe_application.go | 1 + services/ens/describe_instances.go | 41 ++++--- services/ens/describe_key_pairs.go | 1 + services/ens/describe_network_interfaces.go | 25 ++-- services/ens/describe_sd_gs.go | 101 ++++++++++++++++ .../ens/describe_sdg_deployment_status.go | 105 +++++++++++++++++ services/ens/describe_workflow.go | 111 ------------------ services/ens/describe_workflow_activity.go | 100 ---------------- services/ens/modify_image_attribute.go | 1 - services/ens/modify_instance_charge_type.go | 107 +++++++++++++++++ services/ens/reboot_instances.go | 4 +- services/ens/reinit_instances.go | 4 +- .../ens/{retry_workflow.go => remove_sdg.go} | 48 ++++---- services/ens/renew_arm_server_instance.go | 1 + services/ens/rescale_application.go | 4 +- services/ens/reset_aic_instance.go | 5 +- services/ens/restart_workflow.go | 99 ---------------- services/ens/rollback_workflow.go | 99 ---------------- services/ens/run_instances.go | 9 ++ services/ens/save_sdg.go | 99 ++++++++++++++++ services/ens/start_instances.go | 4 +- services/ens/stop_instances.go | 4 +- services/ens/struct_activity_infos.go | 32 ----- services/ens/struct_avaliable_region_ids.go | 21 ++++ .../ens/struct_avaliable_region_ids_item.go | 24 ++++ services/ens/struct_data_disk_item.go | 1 + services/ens/struct_deployed_instance_ids.go | 21 ++++ .../ens/struct_deployed_instance_ids_item.go | 24 ++++ services/ens/struct_deployment_status.go | 21 ++++ services/ens/struct_deployment_status_item.go | 25 ++++ services/ens/struct_instance.go | 5 +- ...ance_ids_in_modify_instance_charge_type.go | 21 ++++ ..._instance_responses_in_reboot_instances.go | 2 +- ..._instance_responses_in_reinit_instances.go | 2 +- ...t_instance_responses_in_start_instances.go | 2 +- ...ct_instance_responses_in_stop_instances.go | 2 +- services/ens/struct_key_pair.go | 1 + services/ens/struct_network_interface_set.go | 1 + ...e_responses_item.go => struct_response.go} | 6 +- services/ens/struct_responses.go | 23 ++++ ...truct_activity_info.go => struct_sd_gs.go} | 6 +- services/ens/struct_sd_gs_item.go | 31 +++++ ...truct_work_flow_info.go => struct_tags.go} | 6 +- services/ens/struct_tags_item.go | 22 ++++ services/ens/struct_work_flow_infos.go | 38 ------ services/ens/terminate_workflow.go | 99 ---------------- services/ens/upgrade_application.go | 1 + 51 files changed, 958 insertions(+), 659 deletions(-) create mode 100644 services/ens/create_sdg.go create mode 100644 services/ens/delete_sdg.go create mode 100644 services/ens/describe_sd_gs.go create mode 100644 services/ens/describe_sdg_deployment_status.go delete mode 100644 services/ens/describe_workflow.go delete mode 100644 services/ens/describe_workflow_activity.go create mode 100644 services/ens/modify_instance_charge_type.go rename services/ens/{retry_workflow.go => remove_sdg.go} (50%) delete mode 100644 services/ens/restart_workflow.go delete mode 100644 services/ens/rollback_workflow.go create mode 100644 services/ens/save_sdg.go delete mode 100644 services/ens/struct_activity_infos.go create mode 100644 services/ens/struct_avaliable_region_ids.go create mode 100644 services/ens/struct_avaliable_region_ids_item.go create mode 100644 services/ens/struct_deployed_instance_ids.go create mode 100644 services/ens/struct_deployed_instance_ids_item.go create mode 100644 services/ens/struct_deployment_status.go create mode 100644 services/ens/struct_deployment_status_item.go create mode 100644 services/ens/struct_instance_ids_in_modify_instance_charge_type.go rename services/ens/{struct_instance_responses_item.go => struct_response.go} (89%) create mode 100644 services/ens/struct_responses.go rename services/ens/{struct_activity_info.go => struct_sd_gs.go} (82%) create mode 100644 services/ens/struct_sd_gs_item.go rename services/ens/{struct_work_flow_info.go => struct_tags.go} (82%) create mode 100644 services/ens/struct_tags_item.go delete mode 100644 services/ens/struct_work_flow_infos.go delete mode 100644 services/ens/terminate_workflow.go diff --git a/ChangeLog.txt b/ChangeLog.txt index 39f1ac7780..8f0c438062 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,7 @@ +2024-05-22 Version: v1.62.741 +- Generated 2017-11-10 for `Ens`. +- Support Spot Instance. + 2024-05-22 Version: v1.62.740 - Generated 2018-02-08, 2018-01-29, 2016-05-11 for `Domain`. - Supported for QueryBrokerDemand. diff --git a/services/ens/create_sdg.go b/services/ens/create_sdg.go new file mode 100644 index 0000000000..4e9f22e277 --- /dev/null +++ b/services/ens/create_sdg.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" +) + +// CreateSDG invokes the ens.CreateSDG API synchronously +func (client *Client) CreateSDG(request *CreateSDGRequest) (response *CreateSDGResponse, err error) { + response = CreateCreateSDGResponse() + err = client.DoAction(request, response) + return +} + +// CreateSDGWithChan invokes the ens.CreateSDG API asynchronously +func (client *Client) CreateSDGWithChan(request *CreateSDGRequest) (<-chan *CreateSDGResponse, <-chan error) { + responseChan := make(chan *CreateSDGResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.CreateSDG(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// CreateSDGWithCallback invokes the ens.CreateSDG API asynchronously +func (client *Client) CreateSDGWithCallback(request *CreateSDGRequest, callback func(response *CreateSDGResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *CreateSDGResponse + var err error + defer close(result) + response, err = client.CreateSDG(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// CreateSDGRequest is the request struct for api CreateSDG +type CreateSDGRequest struct { + *requests.RpcRequest + FromSDGId string `position:"Query" name:"FromSDGId"` + Description string `position:"Query" name:"Description"` + InstanceId string `position:"Query" name:"InstanceId"` + Size string `position:"Query" name:"Size"` +} + +// CreateSDGResponse is the response struct for api CreateSDG +type CreateSDGResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + SDGId string `json:"SDGId" xml:"SDGId"` +} + +// CreateCreateSDGRequest creates a request to invoke CreateSDG API +func CreateCreateSDGRequest() (request *CreateSDGRequest) { + request = &CreateSDGRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ens", "2017-11-10", "CreateSDG", "ens", "openAPI") + request.Method = requests.GET + return +} + +// CreateCreateSDGResponse creates a response to parse from CreateSDG response +func CreateCreateSDGResponse() (response *CreateSDGResponse) { + response = &CreateSDGResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/ens/delete_key_pairs.go b/services/ens/delete_key_pairs.go index a0ab0aa8f7..786c9fd6a0 100644 --- a/services/ens/delete_key_pairs.go +++ b/services/ens/delete_key_pairs.go @@ -72,6 +72,7 @@ func (client *Client) DeleteKeyPairsWithCallback(request *DeleteKeyPairsRequest, type DeleteKeyPairsRequest struct { *requests.RpcRequest KeyPairName string `position:"Query" name:"KeyPairName"` + KeyPairId string `position:"Query" name:"KeyPairId"` } // DeleteKeyPairsResponse is the response struct for api DeleteKeyPairs diff --git a/services/ens/delete_sdg.go b/services/ens/delete_sdg.go new file mode 100644 index 0000000000..48ea04aac3 --- /dev/null +++ b/services/ens/delete_sdg.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" +) + +// DeleteSDG invokes the ens.DeleteSDG API synchronously +func (client *Client) DeleteSDG(request *DeleteSDGRequest) (response *DeleteSDGResponse, err error) { + response = CreateDeleteSDGResponse() + err = client.DoAction(request, response) + return +} + +// DeleteSDGWithChan invokes the ens.DeleteSDG API asynchronously +func (client *Client) DeleteSDGWithChan(request *DeleteSDGRequest) (<-chan *DeleteSDGResponse, <-chan error) { + responseChan := make(chan *DeleteSDGResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DeleteSDG(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DeleteSDGWithCallback invokes the ens.DeleteSDG API asynchronously +func (client *Client) DeleteSDGWithCallback(request *DeleteSDGRequest, callback func(response *DeleteSDGResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DeleteSDGResponse + var err error + defer close(result) + response, err = client.DeleteSDG(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DeleteSDGRequest is the request struct for api DeleteSDG +type DeleteSDGRequest struct { + *requests.RpcRequest + SDGId *[]string `position:"Query" name:"SDGId" type:"Json"` +} + +// DeleteSDGResponse is the response struct for api DeleteSDG +type DeleteSDGResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` +} + +// CreateDeleteSDGRequest creates a request to invoke DeleteSDG API +func CreateDeleteSDGRequest() (request *DeleteSDGRequest) { + request = &DeleteSDGRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ens", "2017-11-10", "DeleteSDG", "ens", "openAPI") + request.Method = requests.GET + return +} + +// CreateDeleteSDGResponse creates a response to parse from DeleteSDG response +func CreateDeleteSDGResponse() (response *DeleteSDGResponse) { + response = &DeleteSDGResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/ens/describe_application.go b/services/ens/describe_application.go index 2c45a202f7..499cb2cae9 100644 --- a/services/ens/describe_application.go +++ b/services/ens/describe_application.go @@ -71,6 +71,7 @@ func (client *Client) DescribeApplicationWithCallback(request *DescribeApplicati // DescribeApplicationRequest is the request struct for api DescribeApplication type DescribeApplicationRequest struct { *requests.RpcRequest + ResourceSelector string `position:"Query" name:"ResourceSelector"` AppVersions string `position:"Query" name:"AppVersions"` OutDetailStatParams string `position:"Query" name:"OutDetailStatParams"` Level string `position:"Query" name:"Level"` diff --git a/services/ens/describe_instances.go b/services/ens/describe_instances.go index 4439c2fc11..68b5248507 100644 --- a/services/ens/describe_instances.go +++ b/services/ens/describe_instances.go @@ -71,23 +71,30 @@ func (client *Client) DescribeInstancesWithCallback(request *DescribeInstancesRe // DescribeInstancesRequest is the request struct for api DescribeInstances type DescribeInstancesRequest struct { *requests.RpcRequest - OrderByParams string `position:"Query" name:"OrderByParams"` - EnsRegionId string `position:"Query" name:"EnsRegionId"` - InstanceResourceType string `position:"Query" name:"InstanceResourceType"` - EnsServiceId string `position:"Query" name:"EnsServiceId"` - VSwitchId string `position:"Query" name:"VSwitchId"` - InstanceId string `position:"Query" name:"InstanceId"` - InstanceName string `position:"Query" name:"InstanceName"` - InstanceIds string `position:"Query" name:"InstanceIds"` - NetworkId string `position:"Query" name:"NetworkId"` - Status string `position:"Query" name:"Status"` - IntranetIp string `position:"Query" name:"IntranetIp"` - ImageId string `position:"Query" name:"ImageId"` - SecurityGroupId string `position:"Query" name:"SecurityGroupId"` - SearchKey string `position:"Query" name:"SearchKey"` - PageNumber requests.Integer `position:"Query" name:"PageNumber"` - PageSize string `position:"Query" name:"PageSize"` - EnsRegionIds string `position:"Query" name:"EnsRegionIds"` + OrderByParams string `position:"Query" name:"OrderByParams"` + EnsRegionId string `position:"Query" name:"EnsRegionId"` + InstanceResourceType string `position:"Query" name:"InstanceResourceType"` + EnsServiceId string `position:"Query" name:"EnsServiceId"` + Tags *[]DescribeInstancesTags `position:"Query" name:"Tags" type:"Json"` + VSwitchId string `position:"Query" name:"VSwitchId"` + InstanceId string `position:"Query" name:"InstanceId"` + InstanceName string `position:"Query" name:"InstanceName"` + InstanceIds string `position:"Query" name:"InstanceIds"` + NetworkId string `position:"Query" name:"NetworkId"` + Status string `position:"Query" name:"Status"` + IntranetIp string `position:"Query" name:"IntranetIp"` + ImageId string `position:"Query" name:"ImageId"` + SecurityGroupId string `position:"Query" name:"SecurityGroupId"` + SearchKey string `position:"Query" name:"SearchKey"` + PageNumber requests.Integer `position:"Query" name:"PageNumber"` + PageSize string `position:"Query" name:"PageSize"` + EnsRegionIds string `position:"Query" name:"EnsRegionIds"` +} + +// DescribeInstancesTags is a repeated param struct in DescribeInstancesRequest +type DescribeInstancesTags struct { + Value string `name:"Value"` + Key string `name:"Key"` } // DescribeInstancesResponse is the response struct for api DescribeInstances diff --git a/services/ens/describe_key_pairs.go b/services/ens/describe_key_pairs.go index 7b1d72beb8..e2ba7a3042 100644 --- a/services/ens/describe_key_pairs.go +++ b/services/ens/describe_key_pairs.go @@ -74,6 +74,7 @@ type DescribeKeyPairsRequest struct { KeyPairName string `position:"Query" name:"KeyPairName"` PageNumber string `position:"Query" name:"PageNumber"` PageSize string `position:"Query" name:"PageSize"` + KeyPairId string `position:"Query" name:"KeyPairId"` } // DescribeKeyPairsResponse is the response struct for api DescribeKeyPairs diff --git a/services/ens/describe_network_interfaces.go b/services/ens/describe_network_interfaces.go index cbec25577b..fd1cd50435 100644 --- a/services/ens/describe_network_interfaces.go +++ b/services/ens/describe_network_interfaces.go @@ -71,18 +71,19 @@ func (client *Client) DescribeNetworkInterfacesWithCallback(request *DescribeNet // DescribeNetworkInterfacesRequest is the request struct for api DescribeNetworkInterfaces type DescribeNetworkInterfacesRequest struct { *requests.RpcRequest - Type string `position:"Query" name:"Type"` - EnsRegionId string `position:"Query" name:"EnsRegionId"` - NetworkInterfaceName string `position:"Query" name:"NetworkInterfaceName"` - VSwitchId string `position:"Query" name:"VSwitchId"` - InstanceId string `position:"Query" name:"InstanceId"` - NetworkId string `position:"Query" name:"NetworkId"` - Status string `position:"Query" name:"Status"` - SecurityGroupId string `position:"Query" name:"SecurityGroupId"` - PageNumber string `position:"Query" name:"PageNumber"` - PageSize string `position:"Query" name:"PageSize"` - PrimaryIpAddress string `position:"Query" name:"PrimaryIpAddress"` - NetworkInterfaceId string `position:"Query" name:"NetworkInterfaceId"` + Type string `position:"Query" name:"Type"` + EnsRegionId string `position:"Query" name:"EnsRegionId"` + NetworkInterfaceName string `position:"Query" name:"NetworkInterfaceName"` + VSwitchId string `position:"Query" name:"VSwitchId"` + InstanceId string `position:"Query" name:"InstanceId"` + NetworkId string `position:"Query" name:"NetworkId"` + Status string `position:"Query" name:"Status"` + SecurityGroupId string `position:"Query" name:"SecurityGroupId"` + PageNumber string `position:"Query" name:"PageNumber"` + ShowDetail requests.Boolean `position:"Query" name:"ShowDetail"` + PageSize string `position:"Query" name:"PageSize"` + PrimaryIpAddress string `position:"Query" name:"PrimaryIpAddress"` + NetworkInterfaceId string `position:"Query" name:"NetworkInterfaceId"` } // DescribeNetworkInterfacesResponse is the response struct for api DescribeNetworkInterfaces diff --git a/services/ens/describe_sd_gs.go b/services/ens/describe_sd_gs.go new file mode 100644 index 0000000000..8d1a314700 --- /dev/null +++ b/services/ens/describe_sd_gs.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" +) + +// DescribeSDGs invokes the ens.DescribeSDGs API synchronously +func (client *Client) DescribeSDGs(request *DescribeSDGsRequest) (response *DescribeSDGsResponse, err error) { + response = CreateDescribeSDGsResponse() + err = client.DoAction(request, response) + return +} + +// DescribeSDGsWithChan invokes the ens.DescribeSDGs API asynchronously +func (client *Client) DescribeSDGsWithChan(request *DescribeSDGsRequest) (<-chan *DescribeSDGsResponse, <-chan error) { + responseChan := make(chan *DescribeSDGsResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DescribeSDGs(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DescribeSDGsWithCallback invokes the ens.DescribeSDGs API asynchronously +func (client *Client) DescribeSDGsWithCallback(request *DescribeSDGsRequest, callback func(response *DescribeSDGsResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DescribeSDGsResponse + var err error + defer close(result) + response, err = client.DescribeSDGs(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DescribeSDGsRequest is the request struct for api DescribeSDGs +type DescribeSDGsRequest struct { + *requests.RpcRequest + SDGIds *[]string `position:"Query" name:"SDGIds" type:"Json"` + InstanceIds *[]string `position:"Query" name:"InstanceIds" type:"Json"` +} + +// DescribeSDGsResponse is the response struct for api DescribeSDGs +type DescribeSDGsResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + SDGs []SDGsItem `json:"SDGs" xml:"SDGs"` +} + +// CreateDescribeSDGsRequest creates a request to invoke DescribeSDGs API +func CreateDescribeSDGsRequest() (request *DescribeSDGsRequest) { + request = &DescribeSDGsRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ens", "2017-11-10", "DescribeSDGs", "ens", "openAPI") + request.Method = requests.GET + return +} + +// CreateDescribeSDGsResponse creates a response to parse from DescribeSDGs response +func CreateDescribeSDGsResponse() (response *DescribeSDGsResponse) { + response = &DescribeSDGsResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/ens/describe_sdg_deployment_status.go b/services/ens/describe_sdg_deployment_status.go new file mode 100644 index 0000000000..7941fd4699 --- /dev/null +++ b/services/ens/describe_sdg_deployment_status.go @@ -0,0 +1,105 @@ +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" +) + +// DescribeSDGDeploymentStatus invokes the ens.DescribeSDGDeploymentStatus API synchronously +func (client *Client) DescribeSDGDeploymentStatus(request *DescribeSDGDeploymentStatusRequest) (response *DescribeSDGDeploymentStatusResponse, err error) { + response = CreateDescribeSDGDeploymentStatusResponse() + err = client.DoAction(request, response) + return +} + +// DescribeSDGDeploymentStatusWithChan invokes the ens.DescribeSDGDeploymentStatus API asynchronously +func (client *Client) DescribeSDGDeploymentStatusWithChan(request *DescribeSDGDeploymentStatusRequest) (<-chan *DescribeSDGDeploymentStatusResponse, <-chan error) { + responseChan := make(chan *DescribeSDGDeploymentStatusResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DescribeSDGDeploymentStatus(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DescribeSDGDeploymentStatusWithCallback invokes the ens.DescribeSDGDeploymentStatus API asynchronously +func (client *Client) DescribeSDGDeploymentStatusWithCallback(request *DescribeSDGDeploymentStatusRequest, callback func(response *DescribeSDGDeploymentStatusResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DescribeSDGDeploymentStatusResponse + var err error + defer close(result) + response, err = client.DescribeSDGDeploymentStatus(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DescribeSDGDeploymentStatusRequest is the request struct for api DescribeSDGDeploymentStatus +type DescribeSDGDeploymentStatusRequest struct { + *requests.RpcRequest + PageNumber string `position:"Query" name:"PageNumber"` + SDGId string `position:"Query" name:"SDGId"` + PageSize string `position:"Query" name:"PageSize"` +} + +// DescribeSDGDeploymentStatusResponse is the response struct for api DescribeSDGDeploymentStatus +type DescribeSDGDeploymentStatusResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + PageNumber int64 `json:"PageNumber" xml:"PageNumber"` + PageSize int64 `json:"PageSize" xml:"PageSize"` + TotalCount int64 `json:"TotalCount" xml:"TotalCount"` + DeploymentStatus []DeploymentStatusItem `json:"DeploymentStatus" xml:"DeploymentStatus"` +} + +// CreateDescribeSDGDeploymentStatusRequest creates a request to invoke DescribeSDGDeploymentStatus API +func CreateDescribeSDGDeploymentStatusRequest() (request *DescribeSDGDeploymentStatusRequest) { + request = &DescribeSDGDeploymentStatusRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ens", "2017-11-10", "DescribeSDGDeploymentStatus", "ens", "openAPI") + request.Method = requests.GET + return +} + +// CreateDescribeSDGDeploymentStatusResponse creates a response to parse from DescribeSDGDeploymentStatus response +func CreateDescribeSDGDeploymentStatusResponse() (response *DescribeSDGDeploymentStatusResponse) { + response = &DescribeSDGDeploymentStatusResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/ens/describe_workflow.go b/services/ens/describe_workflow.go deleted file mode 100644 index 7234e50d10..0000000000 --- a/services/ens/describe_workflow.go +++ /dev/null @@ -1,111 +0,0 @@ -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" -) - -// DescribeWorkflow invokes the ens.DescribeWorkflow API synchronously -func (client *Client) DescribeWorkflow(request *DescribeWorkflowRequest) (response *DescribeWorkflowResponse, err error) { - response = CreateDescribeWorkflowResponse() - err = client.DoAction(request, response) - return -} - -// DescribeWorkflowWithChan invokes the ens.DescribeWorkflow API asynchronously -func (client *Client) DescribeWorkflowWithChan(request *DescribeWorkflowRequest) (<-chan *DescribeWorkflowResponse, <-chan error) { - responseChan := make(chan *DescribeWorkflowResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.DescribeWorkflow(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan -} - -// DescribeWorkflowWithCallback invokes the ens.DescribeWorkflow API asynchronously -func (client *Client) DescribeWorkflowWithCallback(request *DescribeWorkflowRequest, callback func(response *DescribeWorkflowResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *DescribeWorkflowResponse - var err error - defer close(result) - response, err = client.DescribeWorkflow(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result -} - -// DescribeWorkflowRequest is the request struct for api DescribeWorkflow -type DescribeWorkflowRequest struct { - *requests.RpcRequest - PageNum string `position:"Query" name:"PageNum"` - StartDate string `position:"Query" name:"StartDate"` - EnsRegionId string `position:"Query" name:"EnsRegionId"` - Id string `position:"Query" name:"Id"` - WorkFlowId string `position:"Query" name:"WorkFlowId"` - BusinessId string `position:"Query" name:"BusinessId"` - InstanceId string `position:"Query" name:"InstanceId"` - EndDate string `position:"Query" name:"EndDate"` - Status string `position:"Query" name:"Status"` - WorkFlowName string `position:"Query" name:"WorkFlowName"` - PageSize string `position:"Query" name:"PageSize"` - AliUid string `position:"Query" name:"AliUid"` -} - -// DescribeWorkflowResponse is the response struct for api DescribeWorkflow -type DescribeWorkflowResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - WorkFlowInfo []WorkFlowInfos `json:"WorkFlowInfo" xml:"WorkFlowInfo"` -} - -// CreateDescribeWorkflowRequest creates a request to invoke DescribeWorkflow API -func CreateDescribeWorkflowRequest() (request *DescribeWorkflowRequest) { - request = &DescribeWorkflowRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("Ens", "2017-11-10", "DescribeWorkflow", "ens", "openAPI") - request.Method = requests.POST - return -} - -// CreateDescribeWorkflowResponse creates a response to parse from DescribeWorkflow response -func CreateDescribeWorkflowResponse() (response *DescribeWorkflowResponse) { - response = &DescribeWorkflowResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return -} diff --git a/services/ens/describe_workflow_activity.go b/services/ens/describe_workflow_activity.go deleted file mode 100644 index 39ad1a8bec..0000000000 --- a/services/ens/describe_workflow_activity.go +++ /dev/null @@ -1,100 +0,0 @@ -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" -) - -// DescribeWorkflowActivity invokes the ens.DescribeWorkflowActivity API synchronously -func (client *Client) DescribeWorkflowActivity(request *DescribeWorkflowActivityRequest) (response *DescribeWorkflowActivityResponse, err error) { - response = CreateDescribeWorkflowActivityResponse() - err = client.DoAction(request, response) - return -} - -// DescribeWorkflowActivityWithChan invokes the ens.DescribeWorkflowActivity API asynchronously -func (client *Client) DescribeWorkflowActivityWithChan(request *DescribeWorkflowActivityRequest) (<-chan *DescribeWorkflowActivityResponse, <-chan error) { - responseChan := make(chan *DescribeWorkflowActivityResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.DescribeWorkflowActivity(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan -} - -// DescribeWorkflowActivityWithCallback invokes the ens.DescribeWorkflowActivity API asynchronously -func (client *Client) DescribeWorkflowActivityWithCallback(request *DescribeWorkflowActivityRequest, callback func(response *DescribeWorkflowActivityResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *DescribeWorkflowActivityResponse - var err error - defer close(result) - response, err = client.DescribeWorkflowActivity(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result -} - -// DescribeWorkflowActivityRequest is the request struct for api DescribeWorkflowActivity -type DescribeWorkflowActivityRequest struct { - *requests.RpcRequest - WorkFlowId string `position:"Query" name:"WorkFlowId"` -} - -// DescribeWorkflowActivityResponse is the response struct for api DescribeWorkflowActivity -type DescribeWorkflowActivityResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - ActivityInfo []ActivityInfos `json:"ActivityInfo" xml:"ActivityInfo"` -} - -// CreateDescribeWorkflowActivityRequest creates a request to invoke DescribeWorkflowActivity API -func CreateDescribeWorkflowActivityRequest() (request *DescribeWorkflowActivityRequest) { - request = &DescribeWorkflowActivityRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("Ens", "2017-11-10", "DescribeWorkflowActivity", "ens", "openAPI") - request.Method = requests.POST - return -} - -// CreateDescribeWorkflowActivityResponse creates a response to parse from DescribeWorkflowActivity response -func CreateDescribeWorkflowActivityResponse() (response *DescribeWorkflowActivityResponse) { - response = &DescribeWorkflowActivityResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return -} diff --git a/services/ens/modify_image_attribute.go b/services/ens/modify_image_attribute.go index bf85a53266..3d932a9bc3 100644 --- a/services/ens/modify_image_attribute.go +++ b/services/ens/modify_image_attribute.go @@ -73,7 +73,6 @@ type ModifyImageAttributeRequest struct { *requests.RpcRequest ImageId string `position:"Query" name:"ImageId"` ImageName string `position:"Query" name:"ImageName"` - Product string `position:"Query" name:"product"` } // ModifyImageAttributeResponse is the response struct for api ModifyImageAttribute diff --git a/services/ens/modify_instance_charge_type.go b/services/ens/modify_instance_charge_type.go new file mode 100644 index 0000000000..9be07459fb --- /dev/null +++ b/services/ens/modify_instance_charge_type.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" +) + +// ModifyInstanceChargeType invokes the ens.ModifyInstanceChargeType API synchronously +func (client *Client) ModifyInstanceChargeType(request *ModifyInstanceChargeTypeRequest) (response *ModifyInstanceChargeTypeResponse, err error) { + response = CreateModifyInstanceChargeTypeResponse() + err = client.DoAction(request, response) + return +} + +// ModifyInstanceChargeTypeWithChan invokes the ens.ModifyInstanceChargeType API asynchronously +func (client *Client) ModifyInstanceChargeTypeWithChan(request *ModifyInstanceChargeTypeRequest) (<-chan *ModifyInstanceChargeTypeResponse, <-chan error) { + responseChan := make(chan *ModifyInstanceChargeTypeResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ModifyInstanceChargeType(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ModifyInstanceChargeTypeWithCallback invokes the ens.ModifyInstanceChargeType API asynchronously +func (client *Client) ModifyInstanceChargeTypeWithCallback(request *ModifyInstanceChargeTypeRequest, callback func(response *ModifyInstanceChargeTypeResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ModifyInstanceChargeTypeResponse + var err error + defer close(result) + response, err = client.ModifyInstanceChargeType(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ModifyInstanceChargeTypeRequest is the request struct for api ModifyInstanceChargeType +type ModifyInstanceChargeTypeRequest struct { + *requests.RpcRequest + Period string `position:"Query" name:"Period"` + IncludeDataDisks requests.Boolean `position:"Query" name:"IncludeDataDisks"` + PeriodUnit string `position:"Query" name:"PeriodUnit"` + AutoRenew requests.Boolean `position:"Query" name:"AutoRenew"` + InstanceIds *[]string `position:"Query" name:"InstanceIds" type:"Json"` + InstanceChargeType string `position:"Query" name:"InstanceChargeType"` + AutoPay requests.Boolean `position:"Query" name:"AutoPay"` +} + +// ModifyInstanceChargeTypeResponse is the response struct for api ModifyInstanceChargeType +type ModifyInstanceChargeTypeResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + OrderId int64 `json:"OrderId" xml:"OrderId"` + InstanceIds []string `json:"InstanceIds" xml:"InstanceIds"` +} + +// CreateModifyInstanceChargeTypeRequest creates a request to invoke ModifyInstanceChargeType API +func CreateModifyInstanceChargeTypeRequest() (request *ModifyInstanceChargeTypeRequest) { + request = &ModifyInstanceChargeTypeRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ens", "2017-11-10", "ModifyInstanceChargeType", "ens", "openAPI") + request.Method = requests.POST + return +} + +// CreateModifyInstanceChargeTypeResponse creates a response to parse from ModifyInstanceChargeType response +func CreateModifyInstanceChargeTypeResponse() (response *ModifyInstanceChargeTypeResponse) { + response = &ModifyInstanceChargeTypeResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/ens/reboot_instances.go b/services/ens/reboot_instances.go index f6a583da07..712bb51f2e 100644 --- a/services/ens/reboot_instances.go +++ b/services/ens/reboot_instances.go @@ -77,8 +77,8 @@ type RebootInstancesRequest struct { // RebootInstancesResponse is the response struct for api RebootInstances type RebootInstancesResponse struct { *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - InstanceResponses []InstanceResponsesItem `json:"InstanceResponses" xml:"InstanceResponses"` + RequestId string `json:"RequestId" xml:"RequestId"` + InstanceResponses []Responses `json:"InstanceResponses" xml:"InstanceResponses"` } // CreateRebootInstancesRequest creates a request to invoke RebootInstances API diff --git a/services/ens/reinit_instances.go b/services/ens/reinit_instances.go index 7336237596..a2d8b56bb7 100644 --- a/services/ens/reinit_instances.go +++ b/services/ens/reinit_instances.go @@ -79,8 +79,8 @@ type ReinitInstancesRequest struct { // ReinitInstancesResponse is the response struct for api ReinitInstances type ReinitInstancesResponse struct { *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - InstanceResponses []InstanceResponsesItem `json:"InstanceResponses" xml:"InstanceResponses"` + RequestId string `json:"RequestId" xml:"RequestId"` + InstanceResponses []Responses `json:"InstanceResponses" xml:"InstanceResponses"` } // CreateReinitInstancesRequest creates a request to invoke ReinitInstances API diff --git a/services/ens/retry_workflow.go b/services/ens/remove_sdg.go similarity index 50% rename from services/ens/retry_workflow.go rename to services/ens/remove_sdg.go index 0f283a2d9b..e20498088b 100644 --- a/services/ens/retry_workflow.go +++ b/services/ens/remove_sdg.go @@ -20,21 +20,21 @@ import ( "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" ) -// RetryWorkflow invokes the ens.RetryWorkflow API synchronously -func (client *Client) RetryWorkflow(request *RetryWorkflowRequest) (response *RetryWorkflowResponse, err error) { - response = CreateRetryWorkflowResponse() +// RemoveSDG invokes the ens.RemoveSDG API synchronously +func (client *Client) RemoveSDG(request *RemoveSDGRequest) (response *RemoveSDGResponse, err error) { + response = CreateRemoveSDGResponse() err = client.DoAction(request, response) return } -// RetryWorkflowWithChan invokes the ens.RetryWorkflow API asynchronously -func (client *Client) RetryWorkflowWithChan(request *RetryWorkflowRequest) (<-chan *RetryWorkflowResponse, <-chan error) { - responseChan := make(chan *RetryWorkflowResponse, 1) +// RemoveSDGWithChan invokes the ens.RemoveSDG API asynchronously +func (client *Client) RemoveSDGWithChan(request *RemoveSDGRequest) (<-chan *RemoveSDGResponse, <-chan error) { + responseChan := make(chan *RemoveSDGResponse, 1) errChan := make(chan error, 1) err := client.AddAsyncTask(func() { defer close(responseChan) defer close(errChan) - response, err := client.RetryWorkflow(request) + response, err := client.RemoveSDG(request) if err != nil { errChan <- err } else { @@ -49,14 +49,14 @@ func (client *Client) RetryWorkflowWithChan(request *RetryWorkflowRequest) (<-ch return responseChan, errChan } -// RetryWorkflowWithCallback invokes the ens.RetryWorkflow API asynchronously -func (client *Client) RetryWorkflowWithCallback(request *RetryWorkflowRequest, callback func(response *RetryWorkflowResponse, err error)) <-chan int { +// RemoveSDGWithCallback invokes the ens.RemoveSDG API asynchronously +func (client *Client) RemoveSDGWithCallback(request *RemoveSDGRequest, callback func(response *RemoveSDGResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { - var response *RetryWorkflowResponse + var response *RemoveSDGResponse var err error defer close(result) - response, err = client.RetryWorkflow(request) + response, err = client.RemoveSDG(request) callback(response, err) result <- 1 }) @@ -68,31 +68,31 @@ func (client *Client) RetryWorkflowWithCallback(request *RetryWorkflowRequest, c return result } -// RetryWorkflowRequest is the request struct for api RetryWorkflow -type RetryWorkflowRequest struct { +// RemoveSDGRequest is the request struct for api RemoveSDG +type RemoveSDGRequest struct { *requests.RpcRequest - WorkflowIds *[]string `position:"Query" name:"WorkflowIds" type:"Json"` + InstanceIds *[]string `position:"Query" name:"InstanceIds" type:"Json"` } -// RetryWorkflowResponse is the response struct for api RetryWorkflow -type RetryWorkflowResponse struct { +// RemoveSDGResponse is the response struct for api RemoveSDG +type RemoveSDGResponse struct { *responses.BaseResponse RequestId string `json:"RequestId" xml:"RequestId"` } -// CreateRetryWorkflowRequest creates a request to invoke RetryWorkflow API -func CreateRetryWorkflowRequest() (request *RetryWorkflowRequest) { - request = &RetryWorkflowRequest{ +// CreateRemoveSDGRequest creates a request to invoke RemoveSDG API +func CreateRemoveSDGRequest() (request *RemoveSDGRequest) { + request = &RemoveSDGRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ens", "2017-11-10", "RetryWorkflow", "ens", "openAPI") - request.Method = requests.POST + request.InitWithApiInfo("Ens", "2017-11-10", "RemoveSDG", "ens", "openAPI") + request.Method = requests.GET return } -// CreateRetryWorkflowResponse creates a response to parse from RetryWorkflow response -func CreateRetryWorkflowResponse() (response *RetryWorkflowResponse) { - response = &RetryWorkflowResponse{ +// CreateRemoveSDGResponse creates a response to parse from RemoveSDG response +func CreateRemoveSDGResponse() (response *RemoveSDGResponse) { + response = &RemoveSDGResponse{ BaseResponse: &responses.BaseResponse{}, } return diff --git a/services/ens/renew_arm_server_instance.go b/services/ens/renew_arm_server_instance.go index ae70581951..7e158424e0 100644 --- a/services/ens/renew_arm_server_instance.go +++ b/services/ens/renew_arm_server_instance.go @@ -74,6 +74,7 @@ type RenewARMServerInstanceRequest struct { Period requests.Integer `position:"Query" name:"Period"` PeriodUnit string `position:"Query" name:"PeriodUnit"` InstanceId string `position:"Query" name:"InstanceId"` + AutoRenew requests.Boolean `position:"Query" name:"AutoRenew"` } // RenewARMServerInstanceResponse is the response struct for api RenewARMServerInstance diff --git a/services/ens/rescale_application.go b/services/ens/rescale_application.go index 583ea2af8d..8ff0e99e76 100644 --- a/services/ens/rescale_application.go +++ b/services/ens/rescale_application.go @@ -71,12 +71,12 @@ func (client *Client) RescaleApplicationWithCallback(request *RescaleApplication // RescaleApplicationRequest is the request struct for api RescaleApplication type RescaleApplicationRequest struct { *requests.RpcRequest - ResourceSelector string `position:"Query" name:"ResourceSelector"` - ToAppVersion string `position:"Query" name:"ToAppVersion"` RescaleType string `position:"Query" name:"RescaleType"` + ResourceSelector string `position:"Query" name:"ResourceSelector"` Timeout requests.Integer `position:"Query" name:"Timeout"` RescaleLevel string `position:"Query" name:"RescaleLevel"` AppId string `position:"Query" name:"AppId"` + ToAppVersion string `position:"Query" name:"ToAppVersion"` } // RescaleApplicationResponse is the response struct for api RescaleApplication diff --git a/services/ens/reset_aic_instance.go b/services/ens/reset_aic_instance.go index 934158d191..7482957eef 100644 --- a/services/ens/reset_aic_instance.go +++ b/services/ens/reset_aic_instance.go @@ -71,9 +71,8 @@ func (client *Client) ResetAICInstanceWithCallback(request *ResetAICInstanceRequ // ResetAICInstanceRequest is the request struct for api ResetAICInstance type ResetAICInstanceRequest struct { *requests.RpcRequest - ServerId string `position:"Query" name:"ServerId"` - InstanceId string `position:"Query" name:"InstanceId"` - InstanceIds *[]string `position:"Query" name:"InstanceIds" type:"Json"` + ServerId string `position:"Query" name:"ServerId"` + InstanceId string `position:"Query" name:"InstanceId"` } // ResetAICInstanceResponse is the response struct for api ResetAICInstance diff --git a/services/ens/restart_workflow.go b/services/ens/restart_workflow.go deleted file mode 100644 index 00afe28687..0000000000 --- a/services/ens/restart_workflow.go +++ /dev/null @@ -1,99 +0,0 @@ -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" -) - -// RestartWorkflow invokes the ens.RestartWorkflow API synchronously -func (client *Client) RestartWorkflow(request *RestartWorkflowRequest) (response *RestartWorkflowResponse, err error) { - response = CreateRestartWorkflowResponse() - err = client.DoAction(request, response) - return -} - -// RestartWorkflowWithChan invokes the ens.RestartWorkflow API asynchronously -func (client *Client) RestartWorkflowWithChan(request *RestartWorkflowRequest) (<-chan *RestartWorkflowResponse, <-chan error) { - responseChan := make(chan *RestartWorkflowResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.RestartWorkflow(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan -} - -// RestartWorkflowWithCallback invokes the ens.RestartWorkflow API asynchronously -func (client *Client) RestartWorkflowWithCallback(request *RestartWorkflowRequest, callback func(response *RestartWorkflowResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *RestartWorkflowResponse - var err error - defer close(result) - response, err = client.RestartWorkflow(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result -} - -// RestartWorkflowRequest is the request struct for api RestartWorkflow -type RestartWorkflowRequest struct { - *requests.RpcRequest - WorkflowIds *[]string `position:"Query" name:"WorkflowIds" type:"Json"` -} - -// RestartWorkflowResponse is the response struct for api RestartWorkflow -type RestartWorkflowResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` -} - -// CreateRestartWorkflowRequest creates a request to invoke RestartWorkflow API -func CreateRestartWorkflowRequest() (request *RestartWorkflowRequest) { - request = &RestartWorkflowRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("Ens", "2017-11-10", "RestartWorkflow", "ens", "openAPI") - request.Method = requests.POST - return -} - -// CreateRestartWorkflowResponse creates a response to parse from RestartWorkflow response -func CreateRestartWorkflowResponse() (response *RestartWorkflowResponse) { - response = &RestartWorkflowResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return -} diff --git a/services/ens/rollback_workflow.go b/services/ens/rollback_workflow.go deleted file mode 100644 index addbb8af35..0000000000 --- a/services/ens/rollback_workflow.go +++ /dev/null @@ -1,99 +0,0 @@ -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" -) - -// RollbackWorkflow invokes the ens.RollbackWorkflow API synchronously -func (client *Client) RollbackWorkflow(request *RollbackWorkflowRequest) (response *RollbackWorkflowResponse, err error) { - response = CreateRollbackWorkflowResponse() - err = client.DoAction(request, response) - return -} - -// RollbackWorkflowWithChan invokes the ens.RollbackWorkflow API asynchronously -func (client *Client) RollbackWorkflowWithChan(request *RollbackWorkflowRequest) (<-chan *RollbackWorkflowResponse, <-chan error) { - responseChan := make(chan *RollbackWorkflowResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.RollbackWorkflow(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan -} - -// RollbackWorkflowWithCallback invokes the ens.RollbackWorkflow API asynchronously -func (client *Client) RollbackWorkflowWithCallback(request *RollbackWorkflowRequest, callback func(response *RollbackWorkflowResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *RollbackWorkflowResponse - var err error - defer close(result) - response, err = client.RollbackWorkflow(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result -} - -// RollbackWorkflowRequest is the request struct for api RollbackWorkflow -type RollbackWorkflowRequest struct { - *requests.RpcRequest - WorkflowIds *[]string `position:"Query" name:"WorkflowIds" type:"Json"` -} - -// RollbackWorkflowResponse is the response struct for api RollbackWorkflow -type RollbackWorkflowResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` -} - -// CreateRollbackWorkflowRequest creates a request to invoke RollbackWorkflow API -func CreateRollbackWorkflowRequest() (request *RollbackWorkflowRequest) { - request = &RollbackWorkflowRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("Ens", "2017-11-10", "RollbackWorkflow", "ens", "openAPI") - request.Method = requests.POST - return -} - -// CreateRollbackWorkflowResponse creates a response to parse from RollbackWorkflow response -func CreateRollbackWorkflowResponse() (response *RollbackWorkflowResponse) { - response = &RollbackWorkflowResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return -} diff --git a/services/ens/run_instances.go b/services/ens/run_instances.go index 53a2955309..b7aebe6d2d 100644 --- a/services/ens/run_instances.go +++ b/services/ens/run_instances.go @@ -81,11 +81,13 @@ type RunInstancesRequest struct { SystemDisk RunInstancesSystemDisk `position:"Query" name:"SystemDisk" type:"Struct"` NetDistrictCode string `position:"Query" name:"NetDistrictCode"` EnsRegionId string `position:"Query" name:"EnsRegionId"` + Tag *[]RunInstancesTag `position:"Query" name:"Tag" type:"Repeated"` Period requests.Integer `position:"Query" name:"Period"` PublicIpIdentification requests.Boolean `position:"Query" name:"PublicIpIdentification"` BillingCycle string `position:"Query" name:"BillingCycle"` VSwitchId string `position:"Query" name:"VSwitchId"` PrivateIpAddress string `position:"Query" name:"PrivateIpAddress"` + SpotStrategy string `position:"Query" name:"SpotStrategy"` PeriodUnit string `position:"Query" name:"PeriodUnit"` InstanceName string `position:"Query" name:"InstanceName"` AutoRenew requests.Boolean `position:"Query" name:"AutoRenew"` @@ -100,6 +102,7 @@ type RunInstancesRequest struct { InstanceType string `position:"Query" name:"InstanceType"` InstanceChargeType string `position:"Query" name:"InstanceChargeType"` Amount requests.Integer `position:"Query" name:"Amount"` + AutoReleaseTime string `position:"Query" name:"AutoReleaseTime"` IpType string `position:"Query" name:"IpType"` DataDisk *[]RunInstancesDataDisk `position:"Query" name:"DataDisk" type:"Json"` SchedulingStrategy string `position:"Query" name:"SchedulingStrategy"` @@ -120,6 +123,12 @@ type RunInstancesSystemDisk struct { Category string `name:"Category"` } +// RunInstancesTag is a repeated param struct in RunInstancesRequest +type RunInstancesTag struct { + Value string `name:"Value"` + Key string `name:"Key"` +} + // RunInstancesResponse is the response struct for api RunInstances type RunInstancesResponse struct { *responses.BaseResponse diff --git a/services/ens/save_sdg.go b/services/ens/save_sdg.go new file mode 100644 index 0000000000..e8523074d8 --- /dev/null +++ b/services/ens/save_sdg.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" +) + +// SaveSDG invokes the ens.SaveSDG API synchronously +func (client *Client) SaveSDG(request *SaveSDGRequest) (response *SaveSDGResponse, err error) { + response = CreateSaveSDGResponse() + err = client.DoAction(request, response) + return +} + +// SaveSDGWithChan invokes the ens.SaveSDG API asynchronously +func (client *Client) SaveSDGWithChan(request *SaveSDGRequest) (<-chan *SaveSDGResponse, <-chan error) { + responseChan := make(chan *SaveSDGResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.SaveSDG(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// SaveSDGWithCallback invokes the ens.SaveSDG API asynchronously +func (client *Client) SaveSDGWithCallback(request *SaveSDGRequest, callback func(response *SaveSDGResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *SaveSDGResponse + var err error + defer close(result) + response, err = client.SaveSDG(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// SaveSDGRequest is the request struct for api SaveSDG +type SaveSDGRequest struct { + *requests.RpcRequest + SDGId string `position:"Query" name:"SDGId"` +} + +// SaveSDGResponse is the response struct for api SaveSDG +type SaveSDGResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` +} + +// CreateSaveSDGRequest creates a request to invoke SaveSDG API +func CreateSaveSDGRequest() (request *SaveSDGRequest) { + request = &SaveSDGRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ens", "2017-11-10", "SaveSDG", "ens", "openAPI") + request.Method = requests.GET + return +} + +// CreateSaveSDGResponse creates a response to parse from SaveSDG response +func CreateSaveSDGResponse() (response *SaveSDGResponse) { + response = &SaveSDGResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/ens/start_instances.go b/services/ens/start_instances.go index cfb6705e3e..7c3e4604e3 100644 --- a/services/ens/start_instances.go +++ b/services/ens/start_instances.go @@ -77,8 +77,8 @@ type StartInstancesRequest struct { // StartInstancesResponse is the response struct for api StartInstances type StartInstancesResponse struct { *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - InstanceResponses []InstanceResponsesItem `json:"InstanceResponses" xml:"InstanceResponses"` + RequestId string `json:"RequestId" xml:"RequestId"` + InstanceResponses []Response `json:"InstanceResponses" xml:"InstanceResponses"` } // CreateStartInstancesRequest creates a request to invoke StartInstances API diff --git a/services/ens/stop_instances.go b/services/ens/stop_instances.go index 166f576d53..af71bff820 100644 --- a/services/ens/stop_instances.go +++ b/services/ens/stop_instances.go @@ -77,8 +77,8 @@ type StopInstancesRequest struct { // StopInstancesResponse is the response struct for api StopInstances type StopInstancesResponse struct { *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - InstanceResponses []InstanceResponsesItem `json:"InstanceResponses" xml:"InstanceResponses"` + RequestId string `json:"RequestId" xml:"RequestId"` + InstanceResponses []Responses `json:"InstanceResponses" xml:"InstanceResponses"` } // CreateStopInstancesRequest creates a request to invoke StopInstances API diff --git a/services/ens/struct_activity_infos.go b/services/ens/struct_activity_infos.go deleted file mode 100644 index df52ef3fee..0000000000 --- a/services/ens/struct_activity_infos.go +++ /dev/null @@ -1,32 +0,0 @@ -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. - -// ActivityInfos is a nested struct in ens response -type ActivityInfos struct { - ActivityId string `json:"ActivityId" xml:"ActivityId"` - ActivityName string `json:"ActivityName" xml:"ActivityName"` - State string `json:"State" xml:"State"` - GmtStart string `json:"GmtStart" xml:"GmtStart"` - GmtEnd string `json:"GmtEnd" xml:"GmtEnd"` - Duration string `json:"Duration" xml:"Duration"` - GmtCreate string `json:"GmtCreate" xml:"GmtCreate"` - Method string `json:"Method" xml:"Method"` - Input string `json:"Input" xml:"Input"` - Output string `json:"Output" xml:"Output"` - Error string `json:"Error" xml:"Error"` - WorkerNode string `json:"WorkerNode" xml:"WorkerNode"` -} diff --git a/services/ens/struct_avaliable_region_ids.go b/services/ens/struct_avaliable_region_ids.go new file mode 100644 index 0000000000..82f0d08bbb --- /dev/null +++ b/services/ens/struct_avaliable_region_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. + +// AvaliableRegionIds is a nested struct in ens response +type AvaliableRegionIds struct { + AvaliableRegionIdsItem []AvaliableRegionIdsItem `json:"AvaliableRegionIds" xml:"AvaliableRegionIds"` +} diff --git a/services/ens/struct_avaliable_region_ids_item.go b/services/ens/struct_avaliable_region_ids_item.go new file mode 100644 index 0000000000..0f1a9dd04d --- /dev/null +++ b/services/ens/struct_avaliable_region_ids_item.go @@ -0,0 +1,24 @@ +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. + +// AvaliableRegionIdsItem is a nested struct in ens response +type AvaliableRegionIdsItem struct { + CreationTime string `json:"CreationTime" xml:"CreationTime"` + RegionId string `json:"RegionId" xml:"RegionId"` + SnapshotId string `json:"SnapshotId" xml:"SnapshotId"` + Status string `json:"Status" xml:"Status"` +} diff --git a/services/ens/struct_data_disk_item.go b/services/ens/struct_data_disk_item.go index 4743f23651..78a6ae1bb9 100644 --- a/services/ens/struct_data_disk_item.go +++ b/services/ens/struct_data_disk_item.go @@ -26,4 +26,5 @@ type DataDiskItem struct { DiskId string `json:"DiskId" xml:"DiskId"` Category string `json:"Category" xml:"Category"` Name string `json:"name" xml:"name"` + DiskSize int `json:"DiskSize" xml:"DiskSize"` } diff --git a/services/ens/struct_deployed_instance_ids.go b/services/ens/struct_deployed_instance_ids.go new file mode 100644 index 0000000000..f2f9da5adb --- /dev/null +++ b/services/ens/struct_deployed_instance_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. + +// DeployedInstanceIds is a nested struct in ens response +type DeployedInstanceIds struct { + DeployedInstanceIdsItem []DeployedInstanceIdsItem `json:"DeployedInstanceIds" xml:"DeployedInstanceIds"` +} diff --git a/services/ens/struct_deployed_instance_ids_item.go b/services/ens/struct_deployed_instance_ids_item.go new file mode 100644 index 0000000000..5a8f856cf8 --- /dev/null +++ b/services/ens/struct_deployed_instance_ids_item.go @@ -0,0 +1,24 @@ +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. + +// DeployedInstanceIdsItem is a nested struct in ens response +type DeployedInstanceIdsItem struct { + CreationTime string `json:"CreationTime" xml:"CreationTime"` + InstanceId string `json:"InstanceId" xml:"InstanceId"` + Status string `json:"Status" xml:"Status"` + DeploymentType string `json:"DeploymentType" xml:"DeploymentType"` +} diff --git a/services/ens/struct_deployment_status.go b/services/ens/struct_deployment_status.go new file mode 100644 index 0000000000..63987f932e --- /dev/null +++ b/services/ens/struct_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. + +// DeploymentStatus is a nested struct in ens response +type DeploymentStatus 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 new file mode 100644 index 0000000000..bed66fb4c4 --- /dev/null +++ b/services/ens/struct_deployment_status_item.go @@ -0,0 +1,25 @@ +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. + +// 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"` +} diff --git a/services/ens/struct_instance.go b/services/ens/struct_instance.go index baba0776c3..8621dad973 100644 --- a/services/ens/struct_instance.go +++ b/services/ens/struct_instance.go @@ -21,6 +21,7 @@ type Instance struct { InstanceResourceType string `json:"InstanceResourceType" xml:"InstanceResourceType"` ImageId string `json:"ImageId" xml:"ImageId"` OSName string `json:"OSName" xml:"OSName"` + AutoReleaseTime string `json:"AutoReleaseTime" xml:"AutoReleaseTime"` InternetMaxBandwidthOut int `json:"InternetMaxBandwidthOut" xml:"InternetMaxBandwidthOut"` InstanceTypeFamily string `json:"InstanceTypeFamily" xml:"InstanceTypeFamily"` InstanceId string `json:"InstanceId" xml:"InstanceId"` @@ -37,12 +38,14 @@ type Instance struct { Disk int `json:"Disk" xml:"Disk"` HostName string `json:"HostName" xml:"HostName"` Status string `json:"Status" xml:"Status"` + SpotStrategy string `json:"SpotStrategy" xml:"SpotStrategy"` SecurityGroupIds SecurityGroupIdsInDescribeInstances `json:"SecurityGroupIds" xml:"SecurityGroupIds"` InnerIpAddress InnerIpAddress `json:"InnerIpAddress" xml:"InnerIpAddress"` PublicIpAddress PublicIpAddressInDescribeInstances `json:"PublicIpAddress" xml:"PublicIpAddress"` SystemDisk SystemDisk `json:"SystemDisk" xml:"SystemDisk"` NetworkAttributes NetworkAttributesInDescribeInstances `json:"NetworkAttributes" xml:"NetworkAttributes"` - DataDisk DataDisk `json:"DataDisk" xml:"DataDisk"` + Tags Tags `json:"Tags" xml:"Tags"` PublicIpAddresses PublicIpAddresses `json:"PublicIpAddresses" xml:"PublicIpAddresses"` + DataDisk DataDisk `json:"DataDisk" xml:"DataDisk"` PrivateIpAddresses PrivateIpAddresses `json:"PrivateIpAddresses" xml:"PrivateIpAddresses"` } diff --git a/services/ens/struct_instance_ids_in_modify_instance_charge_type.go b/services/ens/struct_instance_ids_in_modify_instance_charge_type.go new file mode 100644 index 0000000000..1265db970b --- /dev/null +++ b/services/ens/struct_instance_ids_in_modify_instance_charge_type.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. + +// InstanceIdsInModifyInstanceChargeType is a nested struct in ens response +type InstanceIdsInModifyInstanceChargeType struct { + InstanceIds []string `json:"InstanceIds" xml:"InstanceIds"` +} diff --git a/services/ens/struct_instance_responses_in_reboot_instances.go b/services/ens/struct_instance_responses_in_reboot_instances.go index c03b94af04..a1594fc73d 100644 --- a/services/ens/struct_instance_responses_in_reboot_instances.go +++ b/services/ens/struct_instance_responses_in_reboot_instances.go @@ -17,5 +17,5 @@ package ens // InstanceResponsesInRebootInstances is a nested struct in ens response type InstanceResponsesInRebootInstances struct { - InstanceResponsesItem []InstanceResponsesItem `json:"InstanceResponses" xml:"InstanceResponses"` + Responses []Responses `json:"responses" xml:"responses"` } diff --git a/services/ens/struct_instance_responses_in_reinit_instances.go b/services/ens/struct_instance_responses_in_reinit_instances.go index 6ed27c8012..f9cd221417 100644 --- a/services/ens/struct_instance_responses_in_reinit_instances.go +++ b/services/ens/struct_instance_responses_in_reinit_instances.go @@ -17,5 +17,5 @@ package ens // InstanceResponsesInReinitInstances is a nested struct in ens response type InstanceResponsesInReinitInstances struct { - InstanceResponsesItem []InstanceResponsesItem `json:"InstanceResponses" xml:"InstanceResponses"` + Responses []Responses `json:"responses" xml:"responses"` } diff --git a/services/ens/struct_instance_responses_in_start_instances.go b/services/ens/struct_instance_responses_in_start_instances.go index a3976c948b..b68dc482f7 100644 --- a/services/ens/struct_instance_responses_in_start_instances.go +++ b/services/ens/struct_instance_responses_in_start_instances.go @@ -17,5 +17,5 @@ package ens // InstanceResponsesInStartInstances is a nested struct in ens response type InstanceResponsesInStartInstances struct { - InstanceResponsesItem []InstanceResponsesItem `json:"InstanceResponses" xml:"InstanceResponses"` + Response []Response `json:"response" xml:"response"` } diff --git a/services/ens/struct_instance_responses_in_stop_instances.go b/services/ens/struct_instance_responses_in_stop_instances.go index 820af3f17c..714780fb84 100644 --- a/services/ens/struct_instance_responses_in_stop_instances.go +++ b/services/ens/struct_instance_responses_in_stop_instances.go @@ -17,5 +17,5 @@ package ens // InstanceResponsesInStopInstances is a nested struct in ens response type InstanceResponsesInStopInstances struct { - InstanceResponsesItem []InstanceResponsesItem `json:"InstanceResponses" xml:"InstanceResponses"` + Responses []Responses `json:"responses" xml:"responses"` } diff --git a/services/ens/struct_key_pair.go b/services/ens/struct_key_pair.go index 3548155009..861f13e33b 100644 --- a/services/ens/struct_key_pair.go +++ b/services/ens/struct_key_pair.go @@ -20,4 +20,5 @@ type KeyPair struct { CreationTime string `json:"CreationTime" xml:"CreationTime"` KeyPairFingerPrint string `json:"KeyPairFingerPrint" xml:"KeyPairFingerPrint"` KeyPairName string `json:"KeyPairName" xml:"KeyPairName"` + KeyPairId string `json:"KeyPairId" xml:"KeyPairId"` } diff --git a/services/ens/struct_network_interface_set.go b/services/ens/struct_network_interface_set.go index 3c0f80a97f..a081de6e0c 100644 --- a/services/ens/struct_network_interface_set.go +++ b/services/ens/struct_network_interface_set.go @@ -20,6 +20,7 @@ type NetworkInterfaceSet struct { CreationTime string `json:"CreationTime" xml:"CreationTime"` EnsRegionId string `json:"EnsRegionId" xml:"EnsRegionId"` InstanceId string `json:"InstanceId" xml:"InstanceId"` + InstanceName string `json:"InstanceName" xml:"InstanceName"` MacAddress string `json:"MacAddress" xml:"MacAddress"` NetworkInterfaceId string `json:"NetworkInterfaceId" xml:"NetworkInterfaceId"` PrimaryIp string `json:"PrimaryIp" xml:"PrimaryIp"` diff --git a/services/ens/struct_instance_responses_item.go b/services/ens/struct_response.go similarity index 89% rename from services/ens/struct_instance_responses_item.go rename to services/ens/struct_response.go index 000ab2002f..950ca6f596 100644 --- a/services/ens/struct_instance_responses_item.go +++ b/services/ens/struct_response.go @@ -15,9 +15,9 @@ package ens // Code generated by Alibaba Cloud SDK Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// InstanceResponsesItem is a nested struct in ens response -type InstanceResponsesItem struct { +// Response is a nested struct in ens response +type Response struct { + Code int64 `json:"Code" xml:"Code"` Message string `json:"Message" xml:"Message"` InstanceId string `json:"InstanceId" xml:"InstanceId"` - Code int64 `json:"Code" xml:"Code"` } diff --git a/services/ens/struct_responses.go b/services/ens/struct_responses.go new file mode 100644 index 0000000000..5e41835793 --- /dev/null +++ b/services/ens/struct_responses.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. + +// Responses is a nested struct in ens response +type Responses struct { + Message string `json:"Message" xml:"Message"` + InstanceId string `json:"InstanceId" xml:"InstanceId"` + Code int64 `json:"Code" xml:"Code"` +} diff --git a/services/ens/struct_activity_info.go b/services/ens/struct_sd_gs.go similarity index 82% rename from services/ens/struct_activity_info.go rename to services/ens/struct_sd_gs.go index 0d4728dab6..1a2e6bfdd9 100644 --- a/services/ens/struct_activity_info.go +++ b/services/ens/struct_sd_gs.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. -// ActivityInfo is a nested struct in ens response -type ActivityInfo struct { - ActivityInfos []ActivityInfos `json:"ActivityInfos" xml:"ActivityInfos"` +// SDGs is a nested struct in ens response +type SDGs struct { + SDGsItem []SDGsItem `json:"SDGs" xml:"SDGs"` } diff --git a/services/ens/struct_sd_gs_item.go b/services/ens/struct_sd_gs_item.go new file mode 100644 index 0000000000..2569245058 --- /dev/null +++ b/services/ens/struct_sd_gs_item.go @@ -0,0 +1,31 @@ +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. + +// SDGsItem is a nested struct in ens response +type SDGsItem struct { + CreationInstanceId string `json:"CreationInstanceId" xml:"CreationInstanceId"` + CreationRegionId string `json:"CreationRegionId" xml:"CreationRegionId"` + CreationTime string `json:"CreationTime" xml:"CreationTime"` + Description string `json:"Description" xml:"Description"` + ParentSDGId string `json:"ParentSDGId" xml:"ParentSDGId"` + SDGId string `json:"SDGId" xml:"SDGId"` + Size int64 `json:"Size" xml:"Size"` + Status string `json:"Status" xml:"Status"` + UpdateTime string `json:"UpdateTime" xml:"UpdateTime"` + AvaliableRegionIds []AvaliableRegionIdsItem `json:"AvaliableRegionIds" xml:"AvaliableRegionIds"` + DeployedInstanceIds []DeployedInstanceIdsItem `json:"DeployedInstanceIds" xml:"DeployedInstanceIds"` +} diff --git a/services/ens/struct_work_flow_info.go b/services/ens/struct_tags.go similarity index 82% rename from services/ens/struct_work_flow_info.go rename to services/ens/struct_tags.go index 8068a39d54..447aa8c625 100644 --- a/services/ens/struct_work_flow_info.go +++ b/services/ens/struct_tags.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. -// WorkFlowInfo is a nested struct in ens response -type WorkFlowInfo struct { - WorkFlowInfos []WorkFlowInfos `json:"WorkFlowInfos" xml:"WorkFlowInfos"` +// Tags is a nested struct in ens response +type Tags struct { + TagsItem []TagsItem `json:"Tags" xml:"Tags"` } diff --git a/services/ens/struct_tags_item.go b/services/ens/struct_tags_item.go new file mode 100644 index 0000000000..2e1ea6fb4a --- /dev/null +++ b/services/ens/struct_tags_item.go @@ -0,0 +1,22 @@ +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. + +// TagsItem is a nested struct in ens response +type TagsItem struct { + TagValue string `json:"TagValue" xml:"TagValue"` + TagKey string `json:"TagKey" xml:"TagKey"` +} diff --git a/services/ens/struct_work_flow_infos.go b/services/ens/struct_work_flow_infos.go deleted file mode 100644 index 02e6206a7e..0000000000 --- a/services/ens/struct_work_flow_infos.go +++ /dev/null @@ -1,38 +0,0 @@ -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. - -// WorkFlowInfos is a nested struct in ens response -type WorkFlowInfos struct { - GmtCreate string `json:"GmtCreate" xml:"GmtCreate"` - GmtExpire string `json:"GmtExpire" xml:"GmtExpire"` - WorkflowId string `json:"WorkflowId" xml:"WorkflowId"` - BizType string `json:"BizType" xml:"BizType"` - InitAttributes string `json:"InitAttributes" xml:"InitAttributes"` - WorkerNode string `json:"WorkerNode" xml:"WorkerNode"` - Duration string `json:"Duration" xml:"Duration"` - GmtStart string `json:"GmtStart" xml:"GmtStart"` - AliUid string `json:"AliUid" xml:"AliUid"` - EnsRegionId string `json:"EnsRegionId" xml:"EnsRegionId"` - InstanceId string `json:"InstanceId" xml:"InstanceId"` - Name string `json:"Name" xml:"Name"` - GmtModify string `json:"GmtModify" xml:"GmtModify"` - Id string `json:"Id" xml:"Id"` - GmtEnd string `json:"GmtEnd" xml:"GmtEnd"` - BussinessId string `json:"BussinessId" xml:"BussinessId"` - Status string `json:"Status" xml:"Status"` - Priority string `json:"Priority" xml:"Priority"` -} diff --git a/services/ens/terminate_workflow.go b/services/ens/terminate_workflow.go deleted file mode 100644 index effabe207c..0000000000 --- a/services/ens/terminate_workflow.go +++ /dev/null @@ -1,99 +0,0 @@ -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" -) - -// TerminateWorkflow invokes the ens.TerminateWorkflow API synchronously -func (client *Client) TerminateWorkflow(request *TerminateWorkflowRequest) (response *TerminateWorkflowResponse, err error) { - response = CreateTerminateWorkflowResponse() - err = client.DoAction(request, response) - return -} - -// TerminateWorkflowWithChan invokes the ens.TerminateWorkflow API asynchronously -func (client *Client) TerminateWorkflowWithChan(request *TerminateWorkflowRequest) (<-chan *TerminateWorkflowResponse, <-chan error) { - responseChan := make(chan *TerminateWorkflowResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.TerminateWorkflow(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan -} - -// TerminateWorkflowWithCallback invokes the ens.TerminateWorkflow API asynchronously -func (client *Client) TerminateWorkflowWithCallback(request *TerminateWorkflowRequest, callback func(response *TerminateWorkflowResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *TerminateWorkflowResponse - var err error - defer close(result) - response, err = client.TerminateWorkflow(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result -} - -// TerminateWorkflowRequest is the request struct for api TerminateWorkflow -type TerminateWorkflowRequest struct { - *requests.RpcRequest - WorkflowIds *[]string `position:"Query" name:"WorkflowIds" type:"Json"` -} - -// TerminateWorkflowResponse is the response struct for api TerminateWorkflow -type TerminateWorkflowResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` -} - -// CreateTerminateWorkflowRequest creates a request to invoke TerminateWorkflow API -func CreateTerminateWorkflowRequest() (request *TerminateWorkflowRequest) { - request = &TerminateWorkflowRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("Ens", "2017-11-10", "TerminateWorkflow", "ens", "openAPI") - request.Method = requests.POST - return -} - -// CreateTerminateWorkflowResponse creates a response to parse from TerminateWorkflow response -func CreateTerminateWorkflowResponse() (response *TerminateWorkflowResponse) { - response = &TerminateWorkflowResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return -} diff --git a/services/ens/upgrade_application.go b/services/ens/upgrade_application.go index 7926ac1376..e61c082460 100644 --- a/services/ens/upgrade_application.go +++ b/services/ens/upgrade_application.go @@ -80,6 +80,7 @@ type UpgradeApplicationRequest struct { type UpgradeApplicationResponse struct { *responses.BaseResponse RequestId string `json:"RequestId" xml:"RequestId"` + TaskId string `json:"TaskId" xml:"TaskId"` } // CreateUpgradeApplicationRequest creates a request to invoke UpgradeApplication API