فهرست منبع

Supported create routeEntry with routeEntryName.

sdk-team 6 سال پیش
والد
کامیت
58b59b3972

+ 3 - 0
ChangeLog.txt

@@ -1,3 +1,6 @@
+2019-08-12 Version: 1.60.97
+- Supported create routeEntry with routeEntryName.
+
 2019-08-12 Version: 1.60.96
 - Support Defect Face API.
 

+ 118 - 0
services/vpc/describe_route_entry_list.go

@@ -0,0 +1,118 @@
+package vpc
+
+//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"
+)
+
+// DescribeRouteEntryList invokes the vpc.DescribeRouteEntryList API synchronously
+// api document: https://help.aliyun.com/api/vpc/describerouteentrylist.html
+func (client *Client) DescribeRouteEntryList(request *DescribeRouteEntryListRequest) (response *DescribeRouteEntryListResponse, err error) {
+	response = CreateDescribeRouteEntryListResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DescribeRouteEntryListWithChan invokes the vpc.DescribeRouteEntryList API asynchronously
+// api document: https://help.aliyun.com/api/vpc/describerouteentrylist.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeRouteEntryListWithChan(request *DescribeRouteEntryListRequest) (<-chan *DescribeRouteEntryListResponse, <-chan error) {
+	responseChan := make(chan *DescribeRouteEntryListResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DescribeRouteEntryList(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DescribeRouteEntryListWithCallback invokes the vpc.DescribeRouteEntryList API asynchronously
+// api document: https://help.aliyun.com/api/vpc/describerouteentrylist.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeRouteEntryListWithCallback(request *DescribeRouteEntryListRequest, callback func(response *DescribeRouteEntryListResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DescribeRouteEntryListResponse
+		var err error
+		defer close(result)
+		response, err = client.DescribeRouteEntryList(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DescribeRouteEntryListRequest is the request struct for api DescribeRouteEntryList
+type DescribeRouteEntryListRequest struct {
+	*requests.RpcRequest
+	ResourceOwnerId      requests.Integer `position:"Query" name:"ResourceOwnerId"`
+	RouteEntryName       string           `position:"Query" name:"RouteEntryName"`
+	NextToken            string           `position:"Query" name:"NextToken"`
+	RouteEntryType       string           `position:"Query" name:"RouteEntryType"`
+	IpVersion            string           `position:"Query" name:"IpVersion"`
+	NextHopId            string           `position:"Query" name:"NextHopId"`
+	NextHopType          string           `position:"Query" name:"NextHopType"`
+	RouteTableId         string           `position:"Query" name:"RouteTableId"`
+	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
+	DestinationCidrBlock string           `position:"Query" name:"DestinationCidrBlock"`
+	OwnerAccount         string           `position:"Query" name:"OwnerAccount"`
+	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
+	MaxResult            requests.Integer `position:"Query" name:"MaxResult"`
+	RouteEntryId         string           `position:"Query" name:"RouteEntryId"`
+}
+
+// DescribeRouteEntryListResponse is the response struct for api DescribeRouteEntryList
+type DescribeRouteEntryListResponse struct {
+	*responses.BaseResponse
+	RequestId   string                              `json:"RequestId" xml:"RequestId"`
+	NextToken   string                              `json:"NextToken" xml:"NextToken"`
+	RouteEntrys RouteEntrysInDescribeRouteEntryList `json:"RouteEntrys" xml:"RouteEntrys"`
+}
+
+// CreateDescribeRouteEntryListRequest creates a request to invoke DescribeRouteEntryList API
+func CreateDescribeRouteEntryListRequest() (request *DescribeRouteEntryListRequest) {
+	request = &DescribeRouteEntryListRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Vpc", "2016-04-28", "DescribeRouteEntryList", "vpc", "openAPI")
+	return
+}
+
+// CreateDescribeRouteEntryListResponse creates a response to parse from DescribeRouteEntryList response
+func CreateDescribeRouteEntryListResponse() (response *DescribeRouteEntryListResponse) {
+	response = &DescribeRouteEntryListResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 9 - 8
services/vpc/struct_next_hop.go

@@ -17,12 +17,13 @@ package vpc
 
 // NextHop is a nested struct in vpc response
 type NextHop struct {
-	NextHopType              string `json:"NextHopType" xml:"NextHopType"`
-	NextHopId                string `json:"NextHopId" xml:"NextHopId"`
-	Enabled                  int    `json:"Enabled" xml:"Enabled"`
-	Weight                   int    `json:"Weight" xml:"Weight"`
-	NextHopRegionId          string `json:"NextHopRegionId" xml:"NextHopRegionId"`
-	NextHopOppsiteType       string `json:"NextHopOppsiteType" xml:"NextHopOppsiteType"`
-	NextHopOppsiteInstanceId string `json:"NextHopOppsiteInstanceId" xml:"NextHopOppsiteInstanceId"`
-	NextHopOppsiteRegionId   string `json:"NextHopOppsiteRegionId" xml:"NextHopOppsiteRegionId"`
+	NextHopId                string             `json:"NextHopId" xml:"NextHopId"`
+	NextHopOppsiteInstanceId string             `json:"NextHopOppsiteInstanceId" xml:"NextHopOppsiteInstanceId"`
+	NextHopType              string             `json:"NextHopType" xml:"NextHopType"`
+	Enabled                  int                `json:"Enabled" xml:"Enabled"`
+	Weight                   int                `json:"Weight" xml:"Weight"`
+	NextHopRegionId          string             `json:"NextHopRegionId" xml:"NextHopRegionId"`
+	NextHopOppsiteType       string             `json:"NextHopOppsiteType" xml:"NextHopOppsiteType"`
+	NextHopOppsiteRegionId   string             `json:"NextHopOppsiteRegionId" xml:"NextHopOppsiteRegionId"`
+	NextHopRelatedInfo       NextHopRelatedInfo `json:"NextHopRelatedInfo" xml:"NextHopRelatedInfo"`
 }

+ 23 - 0
services/vpc/struct_next_hop_related_info.go

@@ -0,0 +1,23 @@
+package vpc
+
+//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.
+
+// NextHopRelatedInfo is a nested struct in vpc response
+type NextHopRelatedInfo struct {
+	InstanceType string `json:"InstanceType" xml:"InstanceType"`
+	RegionId     string `json:"RegionId" xml:"RegionId"`
+	InstanceId   string `json:"InstanceId" xml:"InstanceId"`
+}

+ 21 - 0
services/vpc/struct_next_hops_in_describe_route_entry_list.go

@@ -0,0 +1,21 @@
+package vpc
+
+//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.
+
+// NextHopsInDescribeRouteEntryList is a nested struct in vpc response
+type NextHopsInDescribeRouteEntryList struct {
+	NextHop []NextHop `json:"NextHop" xml:"NextHop"`
+}

+ 21 - 0
services/vpc/struct_next_hops_in_describe_route_tables.go

@@ -0,0 +1,21 @@
+package vpc
+
+//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.
+
+// NextHopsInDescribeRouteTables is a nested struct in vpc response
+type NextHopsInDescribeRouteTables struct {
+	NextHop []NextHop `json:"NextHop" xml:"NextHop"`
+}

+ 15 - 14
services/vpc/struct_route_entry.go

@@ -17,18 +17,19 @@ package vpc
 
 // RouteEntry is a nested struct in vpc response
 type RouteEntry struct {
-	RouteTableId             string   `json:"RouteTableId" xml:"RouteTableId"`
-	DestinationCidrBlock     string   `json:"DestinationCidrBlock" xml:"DestinationCidrBlock"`
-	Type                     string   `json:"Type" xml:"Type"`
-	Status                   string   `json:"Status" xml:"Status"`
-	InstanceId               string   `json:"InstanceId" xml:"InstanceId"`
-	NextHopType              string   `json:"NextHopType" xml:"NextHopType"`
-	RouteEntryName           string   `json:"RouteEntryName" xml:"RouteEntryName"`
-	RouteEntryId             string   `json:"RouteEntryId" xml:"RouteEntryId"`
-	NextHopRegionId          string   `json:"NextHopRegionId" xml:"NextHopRegionId"`
-	NextHopOppsiteType       string   `json:"NextHopOppsiteType" xml:"NextHopOppsiteType"`
-	NextHopOppsiteInstanceId string   `json:"NextHopOppsiteInstanceId" xml:"NextHopOppsiteInstanceId"`
-	NextHopOppsiteRegionId   string   `json:"NextHopOppsiteRegionId" xml:"NextHopOppsiteRegionId"`
-	PrivateIpAddress         string   `json:"PrivateIpAddress" xml:"PrivateIpAddress"`
-	NextHops                 NextHops `json:"NextHops" xml:"NextHops"`
+	PrivateIpAddress         string                        `json:"PrivateIpAddress" xml:"PrivateIpAddress"`
+	NextHopOppsiteInstanceId string                        `json:"NextHopOppsiteInstanceId" xml:"NextHopOppsiteInstanceId"`
+	NextHopType              string                        `json:"NextHopType" xml:"NextHopType"`
+	IpVersion                string                        `json:"IpVersion" xml:"IpVersion"`
+	RouteTableId             string                        `json:"RouteTableId" xml:"RouteTableId"`
+	RouteEntryName           string                        `json:"RouteEntryName" xml:"RouteEntryName"`
+	InstanceId               string                        `json:"InstanceId" xml:"InstanceId"`
+	RouteEntryId             string                        `json:"RouteEntryId" xml:"RouteEntryId"`
+	Status                   string                        `json:"Status" xml:"Status"`
+	DestinationCidrBlock     string                        `json:"DestinationCidrBlock" xml:"DestinationCidrBlock"`
+	NextHopRegionId          string                        `json:"NextHopRegionId" xml:"NextHopRegionId"`
+	NextHopOppsiteType       string                        `json:"NextHopOppsiteType" xml:"NextHopOppsiteType"`
+	NextHopOppsiteRegionId   string                        `json:"NextHopOppsiteRegionId" xml:"NextHopOppsiteRegionId"`
+	Type                     string                        `json:"Type" xml:"Type"`
+	NextHops                 NextHopsInDescribeRouteTables `json:"NextHops" xml:"NextHops"`
 }

+ 21 - 0
services/vpc/struct_route_entrys_in_describe_route_entry_list.go

@@ -0,0 +1,21 @@
+package vpc
+
+//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.
+
+// RouteEntrysInDescribeRouteEntryList is a nested struct in vpc response
+type RouteEntrysInDescribeRouteEntryList struct {
+	RouteEntry []RouteEntry `json:"RouteEntry" xml:"RouteEntry"`
+}

+ 21 - 0
services/vpc/struct_route_entrys_in_describe_route_tables.go

@@ -0,0 +1,21 @@
+package vpc
+
+//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.
+
+// RouteEntrysInDescribeRouteTables is a nested struct in vpc response
+type RouteEntrysInDescribeRouteTables struct {
+	RouteEntry []RouteEntry `json:"RouteEntry" xml:"RouteEntry"`
+}

+ 8 - 8
services/vpc/struct_route_table.go

@@ -17,12 +17,12 @@ package vpc
 
 // RouteTable is a nested struct in vpc response
 type RouteTable struct {
-	ResourceGroupId string                          `json:"ResourceGroupId" xml:"ResourceGroupId"`
-	CreationTime    string                          `json:"CreationTime" xml:"CreationTime"`
-	RouteTableType  string                          `json:"RouteTableType" xml:"RouteTableType"`
-	Status          string                          `json:"Status" xml:"Status"`
-	RouteTableId    string                          `json:"RouteTableId" xml:"RouteTableId"`
-	VRouterId       string                          `json:"VRouterId" xml:"VRouterId"`
-	VSwitchIds      VSwitchIdsInDescribeRouteTables `json:"VSwitchIds" xml:"VSwitchIds"`
-	RouteEntrys     RouteEntrys                     `json:"RouteEntrys" xml:"RouteEntrys"`
+	ResourceGroupId string                           `json:"ResourceGroupId" xml:"ResourceGroupId"`
+	CreationTime    string                           `json:"CreationTime" xml:"CreationTime"`
+	RouteTableType  string                           `json:"RouteTableType" xml:"RouteTableType"`
+	Status          string                           `json:"Status" xml:"Status"`
+	RouteTableId    string                           `json:"RouteTableId" xml:"RouteTableId"`
+	VRouterId       string                           `json:"VRouterId" xml:"VRouterId"`
+	VSwitchIds      VSwitchIdsInDescribeRouteTables  `json:"VSwitchIds" xml:"VSwitchIds"`
+	RouteEntrys     RouteEntrysInDescribeRouteTables `json:"RouteEntrys" xml:"RouteEntrys"`
 }