From dd6e9375c005e136ade970bae63041e2dcc05524 Mon Sep 17 00:00:00 2001 From: sdk-team Date: Wed, 25 Dec 2024 06:26:08 +0000 Subject: [PATCH] Generated 2017-11-10 for Ens. --- ChangeLog.txt | 4 + services/ens/create_snat_entry.go | 1 + services/ens/delete_eip.go | 99 ++++++++++++++++++++ services/ens/describe_instances.go | 1 + services/ens/describe_snat_attribute.go | 1 + services/ens/list_objects.go | 29 +++--- services/ens/modify_snat_entry.go | 101 +++++++++++++++++++++ services/ens/struct_common_prefix_info.go | 22 +++++ services/ens/struct_common_prefix_infos.go | 21 +++++ services/ens/struct_instance.go | 1 + services/ens/struct_snat_table_entry.go | 1 + 11 files changed, 267 insertions(+), 14 deletions(-) create mode 100644 services/ens/delete_eip.go create mode 100644 services/ens/modify_snat_entry.go create mode 100644 services/ens/struct_common_prefix_info.go create mode 100644 services/ens/struct_common_prefix_infos.go diff --git a/ChangeLog.txt b/ChangeLog.txt index f257884f8c..b1c880414f 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,7 @@ +2024-12-25 Version: v1.63.75 +- Generated 2017-11-10 for `Ens`. +-- Supported DeleteEip + 2024-12-24 Version: v1.63.74 - Generated 2022-05-30 for `eflo`. - Supported Jumbo for HDENI and LENI. diff --git a/services/ens/create_snat_entry.go b/services/ens/create_snat_entry.go index 0769142a7d..e1a1876413 100644 --- a/services/ens/create_snat_entry.go +++ b/services/ens/create_snat_entry.go @@ -81,6 +81,7 @@ type CreateSnatEntryRequest struct { NatGatewayId string `position:"Query" name:"NatGatewayId"` IdleTimeout requests.Integer `position:"Query" name:"IdleTimeout"` SnatEntryName string `position:"Query" name:"SnatEntryName"` + IspAffinity requests.Boolean `position:"Query" name:"IspAffinity"` } // CreateSnatEntryResponse is the response struct for api CreateSnatEntry diff --git a/services/ens/delete_eip.go b/services/ens/delete_eip.go new file mode 100644 index 0000000000..8f6538f08f --- /dev/null +++ b/services/ens/delete_eip.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" +) + +// DeleteEip invokes the ens.DeleteEip API synchronously +func (client *Client) DeleteEip(request *DeleteEipRequest) (response *DeleteEipResponse, err error) { + response = CreateDeleteEipResponse() + err = client.DoAction(request, response) + return +} + +// DeleteEipWithChan invokes the ens.DeleteEip API asynchronously +func (client *Client) DeleteEipWithChan(request *DeleteEipRequest) (<-chan *DeleteEipResponse, <-chan error) { + responseChan := make(chan *DeleteEipResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DeleteEip(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DeleteEipWithCallback invokes the ens.DeleteEip API asynchronously +func (client *Client) DeleteEipWithCallback(request *DeleteEipRequest, callback func(response *DeleteEipResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DeleteEipResponse + var err error + defer close(result) + response, err = client.DeleteEip(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DeleteEipRequest is the request struct for api DeleteEip +type DeleteEipRequest struct { + *requests.RpcRequest + InstanceId string `position:"Query" name:"InstanceId"` +} + +// DeleteEipResponse is the response struct for api DeleteEip +type DeleteEipResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` +} + +// CreateDeleteEipRequest creates a request to invoke DeleteEip API +func CreateDeleteEipRequest() (request *DeleteEipRequest) { + request = &DeleteEipRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ens", "2017-11-10", "DeleteEip", "ens", "openAPI") + request.Method = requests.POST + return +} + +// CreateDeleteEipResponse creates a response to parse from DeleteEip response +func CreateDeleteEipResponse() (response *DeleteEipResponse) { + response = &DeleteEipResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/ens/describe_instances.go b/services/ens/describe_instances.go index 30de5bb050..37bd233b3c 100644 --- a/services/ens/describe_instances.go +++ b/services/ens/describe_instances.go @@ -71,6 +71,7 @@ func (client *Client) DescribeInstancesWithCallback(request *DescribeInstancesRe // DescribeInstancesRequest is the request struct for api DescribeInstances type DescribeInstancesRequest struct { *requests.RpcRequest + ServiceStatus *[]string `position:"Query" name:"ServiceStatus" type:"Json"` OrderByParams string `position:"Query" name:"OrderByParams"` EnsRegionId string `position:"Query" name:"EnsRegionId"` InstanceResourceType string `position:"Query" name:"InstanceResourceType"` diff --git a/services/ens/describe_snat_attribute.go b/services/ens/describe_snat_attribute.go index b603b8b4df..e200c48f19 100644 --- a/services/ens/describe_snat_attribute.go +++ b/services/ens/describe_snat_attribute.go @@ -90,6 +90,7 @@ type DescribeSnatAttributeResponse struct { Type string `json:"Type" xml:"Type"` IdleTimeout int `json:"IdleTimeout" xml:"IdleTimeout"` DestCIDR string `json:"DestCIDR" xml:"DestCIDR"` + IspAffinity bool `json:"IspAffinity" xml:"IspAffinity"` SnatIps []Snatip `json:"SnatIps" xml:"SnatIps"` } diff --git a/services/ens/list_objects.go b/services/ens/list_objects.go index 1c72bd8878..223dfaaa20 100644 --- a/services/ens/list_objects.go +++ b/services/ens/list_objects.go @@ -84,20 +84,21 @@ type ListObjectsRequest struct { // ListObjectsResponse is the response struct for api ListObjects type ListObjectsResponse struct { *responses.BaseResponse - NextContinuationToken string `json:"NextContinuationToken" xml:"NextContinuationToken"` - ContinuationToken string `json:"ContinuationToken" xml:"ContinuationToken"` - Delimiter string `json:"Delimiter" xml:"Delimiter"` - EncodingType string `json:"EncodingType" xml:"EncodingType"` - Prefix string `json:"Prefix" xml:"Prefix"` - Marker string `json:"Marker" xml:"Marker"` - BucketName string `json:"BucketName" xml:"BucketName"` - IsTruncated bool `json:"IsTruncated" xml:"IsTruncated"` - KeyCount int64 `json:"KeyCount" xml:"KeyCount"` - NextMarker string `json:"NextMarker" xml:"NextMarker"` - MaxKeys int64 `json:"MaxKeys" xml:"MaxKeys"` - RequestId string `json:"RequestId" xml:"RequestId"` - CommonPrefixes []string `json:"CommonPrefixes" xml:"CommonPrefixes"` - Contents []Content `json:"Contents" xml:"Contents"` + NextContinuationToken string `json:"NextContinuationToken" xml:"NextContinuationToken"` + ContinuationToken string `json:"ContinuationToken" xml:"ContinuationToken"` + Delimiter string `json:"Delimiter" xml:"Delimiter"` + EncodingType string `json:"EncodingType" xml:"EncodingType"` + Prefix string `json:"Prefix" xml:"Prefix"` + Marker string `json:"Marker" xml:"Marker"` + BucketName string `json:"BucketName" xml:"BucketName"` + IsTruncated bool `json:"IsTruncated" xml:"IsTruncated"` + KeyCount int64 `json:"KeyCount" xml:"KeyCount"` + NextMarker string `json:"NextMarker" xml:"NextMarker"` + MaxKeys int64 `json:"MaxKeys" xml:"MaxKeys"` + RequestId string `json:"RequestId" xml:"RequestId"` + CommonPrefixes []string `json:"CommonPrefixes" xml:"CommonPrefixes"` + Contents []Content `json:"Contents" xml:"Contents"` + CommonPrefixInfos []CommonPrefixInfo `json:"CommonPrefixInfos" xml:"CommonPrefixInfos"` } // CreateListObjectsRequest creates a request to invoke ListObjects API diff --git a/services/ens/modify_snat_entry.go b/services/ens/modify_snat_entry.go new file mode 100644 index 0000000000..2e38cffd2a --- /dev/null +++ b/services/ens/modify_snat_entry.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" +) + +// ModifySnatEntry invokes the ens.ModifySnatEntry API synchronously +func (client *Client) ModifySnatEntry(request *ModifySnatEntryRequest) (response *ModifySnatEntryResponse, err error) { + response = CreateModifySnatEntryResponse() + err = client.DoAction(request, response) + return +} + +// ModifySnatEntryWithChan invokes the ens.ModifySnatEntry API asynchronously +func (client *Client) ModifySnatEntryWithChan(request *ModifySnatEntryRequest) (<-chan *ModifySnatEntryResponse, <-chan error) { + responseChan := make(chan *ModifySnatEntryResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ModifySnatEntry(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ModifySnatEntryWithCallback invokes the ens.ModifySnatEntry API asynchronously +func (client *Client) ModifySnatEntryWithCallback(request *ModifySnatEntryRequest, callback func(response *ModifySnatEntryResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ModifySnatEntryResponse + var err error + defer close(result) + response, err = client.ModifySnatEntry(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ModifySnatEntryRequest is the request struct for api ModifySnatEntry +type ModifySnatEntryRequest struct { + *requests.RpcRequest + SnatEntryId string `position:"Query" name:"SnatEntryId"` + SnatEntryName string `position:"Query" name:"SnatEntryName"` + IspAffinity requests.Boolean `position:"Query" name:"IspAffinity"` +} + +// ModifySnatEntryResponse is the response struct for api ModifySnatEntry +type ModifySnatEntryResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` +} + +// CreateModifySnatEntryRequest creates a request to invoke ModifySnatEntry API +func CreateModifySnatEntryRequest() (request *ModifySnatEntryRequest) { + request = &ModifySnatEntryRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ens", "2017-11-10", "ModifySnatEntry", "ens", "openAPI") + request.Method = requests.POST + return +} + +// CreateModifySnatEntryResponse creates a response to parse from ModifySnatEntry response +func CreateModifySnatEntryResponse() (response *ModifySnatEntryResponse) { + response = &ModifySnatEntryResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/ens/struct_common_prefix_info.go b/services/ens/struct_common_prefix_info.go new file mode 100644 index 0000000000..16d34ed265 --- /dev/null +++ b/services/ens/struct_common_prefix_info.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. + +// CommonPrefixInfo is a nested struct in ens response +type CommonPrefixInfo struct { + Prefix string `json:"Prefix" xml:"Prefix"` + LastModified string `json:"LastModified" xml:"LastModified"` +} diff --git a/services/ens/struct_common_prefix_infos.go b/services/ens/struct_common_prefix_infos.go new file mode 100644 index 0000000000..e647c83136 --- /dev/null +++ b/services/ens/struct_common_prefix_infos.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. + +// CommonPrefixInfos is a nested struct in ens response +type CommonPrefixInfos struct { + CommonPrefixInfo []CommonPrefixInfo `json:"CommonPrefixInfo" xml:"CommonPrefixInfo"` +} diff --git a/services/ens/struct_instance.go b/services/ens/struct_instance.go index b1753da180..dc9e819731 100644 --- a/services/ens/struct_instance.go +++ b/services/ens/struct_instance.go @@ -33,6 +33,7 @@ type Instance struct { InstanceName string `json:"InstanceName" xml:"InstanceName"` CreationTime string `json:"CreationTime" xml:"CreationTime"` EnsRegionId string `json:"EnsRegionId" xml:"EnsRegionId"` + ServiceStatus string `json:"ServiceStatus" xml:"ServiceStatus"` StartTime string `json:"StartTime" xml:"StartTime"` KeyPairName string `json:"KeyPairName" xml:"KeyPairName"` InternetMaxBandwidthIn int `json:"InternetMaxBandwidthIn" xml:"InternetMaxBandwidthIn"` diff --git a/services/ens/struct_snat_table_entry.go b/services/ens/struct_snat_table_entry.go index 09c9521849..3a41a157b1 100644 --- a/services/ens/struct_snat_table_entry.go +++ b/services/ens/struct_snat_table_entry.go @@ -28,5 +28,6 @@ type SnatTableEntry struct { Type string `json:"Type" xml:"Type"` IdleTimeout int `json:"IdleTimeout" xml:"IdleTimeout"` DestCIDR string `json:"DestCIDR" xml:"DestCIDR"` + IspAffinity bool `json:"IspAffinity" xml:"IspAffinity"` SnatIps []SnatIp `json:"SnatIps" xml:"SnatIps"` }