Browse Source

Add OpenAPI DescribeAvailableResourceInfo.

sdk-team 6 years ago
parent
commit
eb7cf44532

+ 4 - 0
ChangeLog.txt

@@ -1,3 +1,7 @@
+2019-11-21 Version: 1.60.255
+- Add OpenAPI DescribeAvailableResourceInfo.
+- Deprecated OpenApi DescribeAvailableResource.
+
 2019-11-21 Version: 1.60.254
 - First version.
 

+ 1 - 5
services/ens/attach_ens_instances.go

@@ -84,11 +84,7 @@ type AttachEnsInstancesRequest struct {
 // AttachEnsInstancesResponse is the response struct for api AttachEnsInstances
 type AttachEnsInstancesResponse struct {
 	*responses.BaseResponse
-	RequestId          string `json:"RequestId" xml:"RequestId"`
-	Code               int    `json:"Code" xml:"Code"`
-	EnsServiceId       string `json:"EnsServiceId" xml:"EnsServiceId"`
-	NetLevel           string `json:"NetLevel" xml:"NetLevel"`
-	BuyResourcesDetail string `json:"BuyResourcesDetail" xml:"BuyResourcesDetail"`
+	RequestId string `json:"RequestId" xml:"RequestId"`
 }
 
 // CreateAttachEnsInstancesRequest creates a request to invoke AttachEnsInstances API

+ 105 - 0
services/ens/describe_available_resource_info.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"
+)
+
+// DescribeAvailableResourceInfo invokes the ens.DescribeAvailableResourceInfo API synchronously
+// api document: https://help.aliyun.com/api/ens/describeavailableresourceinfo.html
+func (client *Client) DescribeAvailableResourceInfo(request *DescribeAvailableResourceInfoRequest) (response *DescribeAvailableResourceInfoResponse, err error) {
+	response = CreateDescribeAvailableResourceInfoResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DescribeAvailableResourceInfoWithChan invokes the ens.DescribeAvailableResourceInfo API asynchronously
+// api document: https://help.aliyun.com/api/ens/describeavailableresourceinfo.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeAvailableResourceInfoWithChan(request *DescribeAvailableResourceInfoRequest) (<-chan *DescribeAvailableResourceInfoResponse, <-chan error) {
+	responseChan := make(chan *DescribeAvailableResourceInfoResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DescribeAvailableResourceInfo(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DescribeAvailableResourceInfoWithCallback invokes the ens.DescribeAvailableResourceInfo API asynchronously
+// api document: https://help.aliyun.com/api/ens/describeavailableresourceinfo.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeAvailableResourceInfoWithCallback(request *DescribeAvailableResourceInfoRequest, callback func(response *DescribeAvailableResourceInfoResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DescribeAvailableResourceInfoResponse
+		var err error
+		defer close(result)
+		response, err = client.DescribeAvailableResourceInfo(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DescribeAvailableResourceInfoRequest is the request struct for api DescribeAvailableResourceInfo
+type DescribeAvailableResourceInfoRequest struct {
+	*requests.RpcRequest
+	Version string `position:"Query" name:"Version"`
+}
+
+// DescribeAvailableResourceInfoResponse is the response struct for api DescribeAvailableResourceInfo
+type DescribeAvailableResourceInfoResponse struct {
+	*responses.BaseResponse
+	RequestId        string                                          `json:"RequestId" xml:"RequestId"`
+	SupportResources SupportResourcesInDescribeAvailableResourceInfo `json:"SupportResources" xml:"SupportResources"`
+	Images           ImagesInDescribeAvailableResourceInfo           `json:"Images" xml:"Images"`
+}
+
+// CreateDescribeAvailableResourceInfoRequest creates a request to invoke DescribeAvailableResourceInfo API
+func CreateDescribeAvailableResourceInfoRequest() (request *DescribeAvailableResourceInfoRequest) {
+	request = &DescribeAvailableResourceInfoRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Ens", "2017-11-10", "DescribeAvailableResourceInfo", "ens", "openAPI")
+	return
+}
+
+// CreateDescribeAvailableResourceInfoResponse creates a response to parse from DescribeAvailableResourceInfo response
+func CreateDescribeAvailableResourceInfoResponse() (response *DescribeAvailableResourceInfoResponse) {
+	response = &DescribeAvailableResourceInfoResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 0 - 104
services/ens/ens_add_consumer_api.go

@@ -1,104 +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"
-)
-
-// EnsAddConsumerApi invokes the ens.EnsAddConsumerApi API synchronously
-// api document: https://help.aliyun.com/api/ens/ensaddconsumerapi.html
-func (client *Client) EnsAddConsumerApi(request *EnsAddConsumerApiRequest) (response *EnsAddConsumerApiResponse, err error) {
-	response = CreateEnsAddConsumerApiResponse()
-	err = client.DoAction(request, response)
-	return
-}
-
-// EnsAddConsumerApiWithChan invokes the ens.EnsAddConsumerApi API asynchronously
-// api document: https://help.aliyun.com/api/ens/ensaddconsumerapi.html
-// asynchronous document: https://help.aliyun.com/document_detail/66220.html
-func (client *Client) EnsAddConsumerApiWithChan(request *EnsAddConsumerApiRequest) (<-chan *EnsAddConsumerApiResponse, <-chan error) {
-	responseChan := make(chan *EnsAddConsumerApiResponse, 1)
-	errChan := make(chan error, 1)
-	err := client.AddAsyncTask(func() {
-		defer close(responseChan)
-		defer close(errChan)
-		response, err := client.EnsAddConsumerApi(request)
-		if err != nil {
-			errChan <- err
-		} else {
-			responseChan <- response
-		}
-	})
-	if err != nil {
-		errChan <- err
-		close(responseChan)
-		close(errChan)
-	}
-	return responseChan, errChan
-}
-
-// EnsAddConsumerApiWithCallback invokes the ens.EnsAddConsumerApi API asynchronously
-// api document: https://help.aliyun.com/api/ens/ensaddconsumerapi.html
-// asynchronous document: https://help.aliyun.com/document_detail/66220.html
-func (client *Client) EnsAddConsumerApiWithCallback(request *EnsAddConsumerApiRequest, callback func(response *EnsAddConsumerApiResponse, err error)) <-chan int {
-	result := make(chan int, 1)
-	err := client.AddAsyncTask(func() {
-		var response *EnsAddConsumerApiResponse
-		var err error
-		defer close(result)
-		response, err = client.EnsAddConsumerApi(request)
-		callback(response, err)
-		result <- 1
-	})
-	if err != nil {
-		defer close(result)
-		callback(nil, err)
-		result <- 0
-	}
-	return result
-}
-
-// EnsAddConsumerApiRequest is the request struct for api EnsAddConsumerApi
-type EnsAddConsumerApiRequest struct {
-	*requests.RpcRequest
-	Version string `position:"Query" name:"Version"`
-}
-
-// EnsAddConsumerApiResponse is the response struct for api EnsAddConsumerApi
-type EnsAddConsumerApiResponse struct {
-	*responses.BaseResponse
-	RequestId string `json:"RequestId" xml:"RequestId"`
-	Code      int    `json:"Code" xml:"Code"`
-}
-
-// CreateEnsAddConsumerApiRequest creates a request to invoke EnsAddConsumerApi API
-func CreateEnsAddConsumerApiRequest() (request *EnsAddConsumerApiRequest) {
-	request = &EnsAddConsumerApiRequest{
-		RpcRequest: &requests.RpcRequest{},
-	}
-	request.InitWithApiInfo("Ens", "2017-11-10", "EnsAddConsumerApi", "ens", "openAPI")
-	return
-}
-
-// CreateEnsAddConsumerApiResponse creates a response to parse from EnsAddConsumerApi response
-func CreateEnsAddConsumerApiResponse() (response *EnsAddConsumerApiResponse) {
-	response = &EnsAddConsumerApiResponse{
-		BaseResponse: &responses.BaseResponse{},
-	}
-	return
-}

+ 1 - 1
services/ens/struct_band_width_monitor_data.go

@@ -17,5 +17,5 @@ package ens
 
 // BandWidthMonitorData is a nested struct in ens response
 type BandWidthMonitorData struct {
-	BandWidthMonitorDataItem []BandWidthMonitorDataItem `json:"BandWidthMonitorDataItem" xml:"BandWidthMonitorDataItem"`
+	BandWidthMonitorDataItem []BandWidthMonitorDataItem `json:"BandWidthMonitorData" xml:"BandWidthMonitorData"`
 }

+ 1 - 1
services/ens/struct_data_disk.go

@@ -17,5 +17,5 @@ package ens
 
 // DataDisk is a nested struct in ens response
 type DataDisk struct {
-	DataDiskItem []DataDiskItem `json:"DataDiskItem" xml:"DataDiskItem"`
+	DataDiskItem []DataDiskItem `json:"DataDisk" xml:"DataDisk"`
 }

+ 21 - 0
services/ens/struct_ens_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.
+
+// EnsRegionIds is a nested struct in ens response
+type EnsRegionIds struct {
+	EnsRegionId []string `json:"EnsRegionId" xml:"EnsRegionId"`
+}

+ 1 - 1
services/ens/struct_ens_regions.go

@@ -17,5 +17,5 @@ package ens
 
 // EnsRegions is a nested struct in ens response
 type EnsRegions struct {
-	EnsRegionsItem []EnsRegionsItem `json:"EnsRegionsItem" xml:"EnsRegionsItem"`
+	EnsRegionsItem []EnsRegionsItem `json:"EnsRegions" xml:"EnsRegions"`
 }

+ 3 - 11
services/ens/struct_image.go

@@ -17,15 +17,7 @@ package ens
 
 // Image is a nested struct in ens response
 type Image struct {
-	Architecture    string `json:"Architecture" xml:"Architecture"`
-	Platform        string `json:"Platform" xml:"Platform"`
-	ImageVersion    string `json:"ImageVersion" xml:"ImageVersion"`
-	OSType          string `json:"OSType" xml:"OSType"`
-	ImageId         string `json:"ImageId" xml:"ImageId"`
-	OSName          string `json:"OSName" xml:"OSName"`
-	ImageOwnerAlias string `json:"ImageOwnerAlias" xml:"ImageOwnerAlias"`
-	CreationTime    string `json:"CreationTime" xml:"CreationTime"`
-	ImageName       string `json:"ImageName" xml:"ImageName"`
-	Description     string `json:"Description" xml:"Description"`
-	ImageSize       string `json:"ImageSize" xml:"ImageSize"`
+	ImageId   string `json:"ImageId" xml:"ImageId"`
+	ImageName string `json:"ImageName" xml:"ImageName"`
+	ImageSize int    `json:"ImageSize" xml:"ImageSize"`
 }

+ 26 - 0
services/ens/struct_image_in_describe_image_infos.go

@@ -0,0 +1,26 @@
+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.
+
+// ImageInDescribeImageInfos is a nested struct in ens response
+type ImageInDescribeImageInfos struct {
+	ImageId      string `json:"ImageId" xml:"ImageId"`
+	Description  string `json:"Description" xml:"Description"`
+	ImageVersion string `json:"ImageVersion" xml:"ImageVersion"`
+	OSType       string `json:"OSType" xml:"OSType"`
+	OSName       string `json:"OSName" xml:"OSName"`
+	ImageSize    string `json:"ImageSize" xml:"ImageSize"`
+}

+ 27 - 0
services/ens/struct_image_in_describe_images.go

@@ -0,0 +1,27 @@
+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.
+
+// ImageInDescribeImages is a nested struct in ens response
+type ImageInDescribeImages struct {
+	ImageId         string `json:"ImageId" xml:"ImageId"`
+	ImageName       string `json:"ImageName" xml:"ImageName"`
+	ImageOwnerAlias string `json:"ImageOwnerAlias" xml:"ImageOwnerAlias"`
+	Platform        string `json:"Platform" xml:"Platform"`
+	Architecture    string `json:"Architecture" xml:"Architecture"`
+	CreationTime    string `json:"CreationTime" xml:"CreationTime"`
+	ImageSize       string `json:"ImageSize" xml:"ImageSize"`
+}

+ 21 - 0
services/ens/struct_images_in_describe_available_resource_info.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.
+
+// ImagesInDescribeAvailableResourceInfo is a nested struct in ens response
+type ImagesInDescribeAvailableResourceInfo struct {
+	Image []Image `json:"Image" xml:"Image"`
+}

+ 1 - 1
services/ens/struct_images_in_describe_image_infos.go

@@ -17,5 +17,5 @@ package ens
 
 // ImagesInDescribeImageInfos is a nested struct in ens response
 type ImagesInDescribeImageInfos struct {
-	Image []Image `json:"Image" xml:"Image"`
+	Image []ImageInDescribeImageInfos `json:"Image" xml:"Image"`
 }

+ 1 - 1
services/ens/struct_images_in_describe_images.go

@@ -17,5 +17,5 @@ package ens
 
 // ImagesInDescribeImages is a nested struct in ens response
 type ImagesInDescribeImages struct {
-	Image []Image `json:"Image" xml:"Image"`
+	Image []ImageInDescribeImages `json:"Image" xml:"Image"`
 }

+ 21 - 0
services/ens/struct_instance_speces.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.
+
+// InstanceSpeces is a nested struct in ens response
+type InstanceSpeces struct {
+	InstanceSpec []string `json:"InstanceSpec" xml:"InstanceSpec"`
+}

+ 1 - 1
services/ens/struct_monitor_data_in_describe_user_band_width_data.go

@@ -17,5 +17,5 @@ package ens
 
 // MonitorDataInDescribeUserBandWidthData is a nested struct in ens response
 type MonitorDataInDescribeUserBandWidthData struct {
-	MonitorDataItem []MonitorDataItem `json:"MonitorDataItem" xml:"MonitorDataItem"`
+	MonitorDataItem []MonitorDataItem `json:"MonitorData" xml:"MonitorData"`
 }

+ 8 - 2
services/ens/struct_support_resource.go

@@ -17,11 +17,17 @@ package ens
 
 // SupportResource is a nested struct in ens response
 type SupportResource struct {
+	DataDiskMaxSize       int             `json:"DataDiskMaxSize" xml:"DataDiskMaxSize"`
+	SystemDiskMaxSize     int             `json:"SystemDiskMaxSize" xml:"SystemDiskMaxSize"`
+	EnsRegionId           string          `json:"EnsRegionId" xml:"EnsRegionId"`
 	DataDiskSize          string          `json:"DataDiskSize" xml:"DataDiskSize"`
 	InstanceSpec          string          `json:"InstanceSpec" xml:"InstanceSpec"`
 	SystemDiskSize        string          `json:"SystemDiskSize" xml:"SystemDiskSize"`
-	EnsRegionId           string          `json:"EnsRegionId" xml:"EnsRegionId"`
+	SystemDiskMinSize     int             `json:"SystemDiskMinSize" xml:"SystemDiskMinSize"`
+	DataDiskMinSize       int             `json:"DataDiskMinSize" xml:"DataDiskMinSize"`
 	SupportResourcesCount string          `json:"SupportResourcesCount" xml:"SupportResourcesCount"`
-	DataDiskSizes         DataDiskSizes   `json:"DataDiskSizes" xml:"DataDiskSizes"`
+	EnsRegionIds          EnsRegionIds    `json:"EnsRegionIds" xml:"EnsRegionIds"`
 	SystemDiskSizes       SystemDiskSizes `json:"SystemDiskSizes" xml:"SystemDiskSizes"`
+	InstanceSpeces        InstanceSpeces  `json:"InstanceSpeces" xml:"InstanceSpeces"`
+	DataDiskSizes         DataDiskSizes   `json:"DataDiskSizes" xml:"DataDiskSizes"`
 }

+ 21 - 0
services/ens/struct_support_resources_in_describe_available_resource_info.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.
+
+// SupportResourcesInDescribeAvailableResourceInfo is a nested struct in ens response
+type SupportResourcesInDescribeAvailableResourceInfo struct {
+	SupportResource []SupportResource `json:"SupportResource" xml:"SupportResource"`
+}