ソースを参照

LOCATION SDK Auto Released By puling.tyq,Version:1.43.9

Signed-off-by: yixiong.jxy <yixiong.jxy@alibaba-inc.com>
yixiong.jxy 7 年 前
コミット
70ce0255f3

+ 3 - 0
ChangeLog.txt

@@ -1,3 +1,6 @@
+2018-12-11 Version: 1.43.9
+1, Release Location Go SDK
+
 2018-12-11 Version: 1.43.8
 1, DescribeAccount support OwnerAccount params.
 2, Upgrade Rds SDK Version to 2.3.0

+ 81 - 0
services/location/client.go

@@ -0,0 +1,81 @@
+package location
+
+//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"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth"
+)
+
+// Client is the sdk client struct, each func corresponds to an OpenAPI
+type Client struct {
+	sdk.Client
+}
+
+// NewClient creates a sdk client with environment variables
+func NewClient() (client *Client, err error) {
+	client = &Client{}
+	err = client.Init()
+	return
+}
+
+// NewClientWithOptions creates a sdk client with regionId/sdkConfig/credential
+// this is the common api to create a sdk client
+func NewClientWithOptions(regionId string, config *sdk.Config, credential auth.Credential) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithOptions(regionId, config, credential)
+	return
+}
+
+// NewClientWithAccessKey is a shortcut to create sdk client with accesskey
+// usage: https://help.aliyun.com/document_detail/66217.html
+func NewClientWithAccessKey(regionId, accessKeyId, accessKeySecret string) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithAccessKey(regionId, accessKeyId, accessKeySecret)
+	return
+}
+
+// NewClientWithStsToken is a shortcut to create sdk client with sts token
+// usage: https://help.aliyun.com/document_detail/66222.html
+func NewClientWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToken string) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToken)
+	return
+}
+
+// NewClientWithRamRoleArn is a shortcut to create sdk client with ram roleArn
+// usage: https://help.aliyun.com/document_detail/66222.html
+func NewClientWithRamRoleArn(regionId string, accessKeyId, accessKeySecret, roleArn, roleSessionName string) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithRamRoleArn(regionId, accessKeyId, accessKeySecret, roleArn, roleSessionName)
+	return
+}
+
+// NewClientWithEcsRamRole is a shortcut to create sdk client with ecs ram role
+// usage: https://help.aliyun.com/document_detail/66223.html
+func NewClientWithEcsRamRole(regionId string, roleName string) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithEcsRamRole(regionId, roleName)
+	return
+}
+
+// NewClientWithRsaKeyPair is a shortcut to create sdk client with rsa key pair
+// attention: rsa key pair auth is only Japan regions available
+func NewClientWithRsaKeyPair(regionId string, publicKeyId, privateKey string, sessionExpiration int) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithRsaKeyPair(regionId, publicKeyId, privateKey, sessionExpiration)
+	return
+}

+ 111 - 0
services/location/describe_endpoint.go

@@ -0,0 +1,111 @@
+package location
+
+//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"
+)
+
+// DescribeEndpoint invokes the location.DescribeEndpoint API synchronously
+// api document: https://help.aliyun.com/api/location/describeendpoint.html
+func (client *Client) DescribeEndpoint(request *DescribeEndpointRequest) (response *DescribeEndpointResponse, err error) {
+	response = CreateDescribeEndpointResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DescribeEndpointWithChan invokes the location.DescribeEndpoint API asynchronously
+// api document: https://help.aliyun.com/api/location/describeendpoint.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeEndpointWithChan(request *DescribeEndpointRequest) (<-chan *DescribeEndpointResponse, <-chan error) {
+	responseChan := make(chan *DescribeEndpointResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DescribeEndpoint(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DescribeEndpointWithCallback invokes the location.DescribeEndpoint API asynchronously
+// api document: https://help.aliyun.com/api/location/describeendpoint.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeEndpointWithCallback(request *DescribeEndpointRequest, callback func(response *DescribeEndpointResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DescribeEndpointResponse
+		var err error
+		defer close(result)
+		response, err = client.DescribeEndpoint(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DescribeEndpointRequest is the request struct for api DescribeEndpoint
+type DescribeEndpointRequest struct {
+	*requests.RpcRequest
+	Password    string `position:"Query" name:"Password"`
+	ServiceCode string `position:"Query" name:"ServiceCode"`
+	Id          string `position:"Query" name:"Id"`
+}
+
+// DescribeEndpointResponse is the response struct for api DescribeEndpoint
+type DescribeEndpointResponse struct {
+	*responses.BaseResponse
+	RequestId   string                      `json:"RequestId" xml:"RequestId"`
+	Endpoint    string                      `json:"Endpoint" xml:"Endpoint"`
+	Id          string                      `json:"Id" xml:"Id"`
+	Namespace   string                      `json:"Namespace" xml:"Namespace"`
+	SerivceCode string                      `json:"SerivceCode" xml:"SerivceCode"`
+	Type        string                      `json:"Type" xml:"Type"`
+	Protocols   ProtocolsInDescribeEndpoint `json:"Protocols" xml:"Protocols"`
+}
+
+// CreateDescribeEndpointRequest creates a request to invoke DescribeEndpoint API
+func CreateDescribeEndpointRequest() (request *DescribeEndpointRequest) {
+	request = &DescribeEndpointRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Location", "2015-06-12", "DescribeEndpoint", "location", "openAPI")
+	return
+}
+
+// CreateDescribeEndpointResponse creates a response to parse from DescribeEndpoint response
+func CreateDescribeEndpointResponse() (response *DescribeEndpointResponse) {
+	response = &DescribeEndpointResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 107 - 0
services/location/describe_endpoints.go

@@ -0,0 +1,107 @@
+package location
+
+//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"
+)
+
+// DescribeEndpoints invokes the location.DescribeEndpoints API synchronously
+// api document: https://help.aliyun.com/api/location/describeendpoints.html
+func (client *Client) DescribeEndpoints(request *DescribeEndpointsRequest) (response *DescribeEndpointsResponse, err error) {
+	response = CreateDescribeEndpointsResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DescribeEndpointsWithChan invokes the location.DescribeEndpoints API asynchronously
+// api document: https://help.aliyun.com/api/location/describeendpoints.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeEndpointsWithChan(request *DescribeEndpointsRequest) (<-chan *DescribeEndpointsResponse, <-chan error) {
+	responseChan := make(chan *DescribeEndpointsResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DescribeEndpoints(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DescribeEndpointsWithCallback invokes the location.DescribeEndpoints API asynchronously
+// api document: https://help.aliyun.com/api/location/describeendpoints.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeEndpointsWithCallback(request *DescribeEndpointsRequest, callback func(response *DescribeEndpointsResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DescribeEndpointsResponse
+		var err error
+		defer close(result)
+		response, err = client.DescribeEndpoints(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DescribeEndpointsRequest is the request struct for api DescribeEndpoints
+type DescribeEndpointsRequest struct {
+	*requests.RpcRequest
+	ServiceCode string `position:"Query" name:"ServiceCode"`
+	Id          string `position:"Query" name:"Id"`
+	Type        string `position:"Query" name:"Type"`
+}
+
+// DescribeEndpointsResponse is the response struct for api DescribeEndpoints
+type DescribeEndpointsResponse struct {
+	*responses.BaseResponse
+	RequestId string    `json:"RequestId" xml:"RequestId"`
+	Success   bool      `json:"Success" xml:"Success"`
+	Endpoints Endpoints `json:"Endpoints" xml:"Endpoints"`
+}
+
+// CreateDescribeEndpointsRequest creates a request to invoke DescribeEndpoints API
+func CreateDescribeEndpointsRequest() (request *DescribeEndpointsRequest) {
+	request = &DescribeEndpointsRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Location", "2015-06-12", "DescribeEndpoints", "location", "openAPI")
+	return
+}
+
+// CreateDescribeEndpointsResponse creates a response to parse from DescribeEndpoints response
+func CreateDescribeEndpointsResponse() (response *DescribeEndpointsResponse) {
+	response = &DescribeEndpointsResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 105 - 0
services/location/describe_regions.go

@@ -0,0 +1,105 @@
+package location
+
+//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"
+)
+
+// DescribeRegions invokes the location.DescribeRegions API synchronously
+// api document: https://help.aliyun.com/api/location/describeregions.html
+func (client *Client) DescribeRegions(request *DescribeRegionsRequest) (response *DescribeRegionsResponse, err error) {
+	response = CreateDescribeRegionsResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DescribeRegionsWithChan invokes the location.DescribeRegions API asynchronously
+// api document: https://help.aliyun.com/api/location/describeregions.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeRegionsWithChan(request *DescribeRegionsRequest) (<-chan *DescribeRegionsResponse, <-chan error) {
+	responseChan := make(chan *DescribeRegionsResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DescribeRegions(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DescribeRegionsWithCallback invokes the location.DescribeRegions API asynchronously
+// api document: https://help.aliyun.com/api/location/describeregions.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeRegionsWithCallback(request *DescribeRegionsRequest, callback func(response *DescribeRegionsResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DescribeRegionsResponse
+		var err error
+		defer close(result)
+		response, err = client.DescribeRegions(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DescribeRegionsRequest is the request struct for api DescribeRegions
+type DescribeRegionsRequest struct {
+	*requests.RpcRequest
+	Password string `position:"Query" name:"Password"`
+}
+
+// DescribeRegionsResponse is the response struct for api DescribeRegions
+type DescribeRegionsResponse struct {
+	*responses.BaseResponse
+	RequestId  string    `json:"RequestId" xml:"RequestId"`
+	TotalCount int       `json:"TotalCount" xml:"TotalCount"`
+	RegionIds  RegionIds `json:"RegionIds" xml:"RegionIds"`
+}
+
+// CreateDescribeRegionsRequest creates a request to invoke DescribeRegions API
+func CreateDescribeRegionsRequest() (request *DescribeRegionsRequest) {
+	request = &DescribeRegionsRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Location", "2015-06-12", "DescribeRegions", "location", "openAPI")
+	return
+}
+
+// CreateDescribeRegionsResponse creates a response to parse from DescribeRegions response
+func CreateDescribeRegionsResponse() (response *DescribeRegionsResponse) {
+	response = &DescribeRegionsResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 105 - 0
services/location/describe_services.go

@@ -0,0 +1,105 @@
+package location
+
+//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"
+)
+
+// DescribeServices invokes the location.DescribeServices API synchronously
+// api document: https://help.aliyun.com/api/location/describeservices.html
+func (client *Client) DescribeServices(request *DescribeServicesRequest) (response *DescribeServicesResponse, err error) {
+	response = CreateDescribeServicesResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DescribeServicesWithChan invokes the location.DescribeServices API asynchronously
+// api document: https://help.aliyun.com/api/location/describeservices.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeServicesWithChan(request *DescribeServicesRequest) (<-chan *DescribeServicesResponse, <-chan error) {
+	responseChan := make(chan *DescribeServicesResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DescribeServices(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DescribeServicesWithCallback invokes the location.DescribeServices API asynchronously
+// api document: https://help.aliyun.com/api/location/describeservices.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeServicesWithCallback(request *DescribeServicesRequest, callback func(response *DescribeServicesResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DescribeServicesResponse
+		var err error
+		defer close(result)
+		response, err = client.DescribeServices(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DescribeServicesRequest is the request struct for api DescribeServices
+type DescribeServicesRequest struct {
+	*requests.RpcRequest
+	Password string `position:"Query" name:"Password"`
+}
+
+// DescribeServicesResponse is the response struct for api DescribeServices
+type DescribeServicesResponse struct {
+	*responses.BaseResponse
+	RequestId  string   `json:"RequestId" xml:"RequestId"`
+	TotalCount int      `json:"TotalCount" xml:"TotalCount"`
+	Services   Services `json:"Services" xml:"Services"`
+}
+
+// CreateDescribeServicesRequest creates a request to invoke DescribeServices API
+func CreateDescribeServicesRequest() (request *DescribeServicesRequest) {
+	request = &DescribeServicesRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Location", "2015-06-12", "DescribeServices", "location", "openAPI")
+	return
+}
+
+// CreateDescribeServicesResponse creates a response to parse from DescribeServices response
+func CreateDescribeServicesResponse() (response *DescribeServicesResponse) {
+	response = &DescribeServicesResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 107 - 0
services/location/list_endpoints.go

@@ -0,0 +1,107 @@
+package location
+
+//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"
+)
+
+// ListEndpoints invokes the location.ListEndpoints API synchronously
+// api document: https://help.aliyun.com/api/location/listendpoints.html
+func (client *Client) ListEndpoints(request *ListEndpointsRequest) (response *ListEndpointsResponse, err error) {
+	response = CreateListEndpointsResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// ListEndpointsWithChan invokes the location.ListEndpoints API asynchronously
+// api document: https://help.aliyun.com/api/location/listendpoints.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ListEndpointsWithChan(request *ListEndpointsRequest) (<-chan *ListEndpointsResponse, <-chan error) {
+	responseChan := make(chan *ListEndpointsResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.ListEndpoints(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// ListEndpointsWithCallback invokes the location.ListEndpoints API asynchronously
+// api document: https://help.aliyun.com/api/location/listendpoints.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ListEndpointsWithCallback(request *ListEndpointsRequest, callback func(response *ListEndpointsResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *ListEndpointsResponse
+		var err error
+		defer close(result)
+		response, err = client.ListEndpoints(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// ListEndpointsRequest is the request struct for api ListEndpoints
+type ListEndpointsRequest struct {
+	*requests.RpcRequest
+	Namespace   string `position:"Query" name:"Namespace"`
+	Id          string `position:"Query" name:"Id"`
+	SerivceCode string `position:"Query" name:"SerivceCode"`
+}
+
+// ListEndpointsResponse is the response struct for api ListEndpoints
+type ListEndpointsResponse struct {
+	*responses.BaseResponse
+	RequestId    string                      `json:"RequestId" xml:"RequestId"`
+	Success      bool                        `json:"Success" xml:"Success"`
+	EndpointList EndpointListInListEndpoints `json:"EndpointList" xml:"EndpointList"`
+}
+
+// CreateListEndpointsRequest creates a request to invoke ListEndpoints API
+func CreateListEndpointsRequest() (request *ListEndpointsRequest) {
+	request = &ListEndpointsRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Location", "2015-06-12", "ListEndpoints", "location", "openAPI")
+	return
+}
+
+// CreateListEndpointsResponse creates a response to parse from ListEndpoints response
+func CreateListEndpointsResponse() (response *ListEndpointsResponse) {
+	response = &ListEndpointsResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 105 - 0
services/location/list_endpoints_by_ip.go

@@ -0,0 +1,105 @@
+package location
+
+//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"
+)
+
+// ListEndpointsByIp invokes the location.ListEndpointsByIp API synchronously
+// api document: https://help.aliyun.com/api/location/listendpointsbyip.html
+func (client *Client) ListEndpointsByIp(request *ListEndpointsByIpRequest) (response *ListEndpointsByIpResponse, err error) {
+	response = CreateListEndpointsByIpResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// ListEndpointsByIpWithChan invokes the location.ListEndpointsByIp API asynchronously
+// api document: https://help.aliyun.com/api/location/listendpointsbyip.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ListEndpointsByIpWithChan(request *ListEndpointsByIpRequest) (<-chan *ListEndpointsByIpResponse, <-chan error) {
+	responseChan := make(chan *ListEndpointsByIpResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.ListEndpointsByIp(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// ListEndpointsByIpWithCallback invokes the location.ListEndpointsByIp API asynchronously
+// api document: https://help.aliyun.com/api/location/listendpointsbyip.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ListEndpointsByIpWithCallback(request *ListEndpointsByIpRequest, callback func(response *ListEndpointsByIpResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *ListEndpointsByIpResponse
+		var err error
+		defer close(result)
+		response, err = client.ListEndpointsByIp(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// ListEndpointsByIpRequest is the request struct for api ListEndpointsByIp
+type ListEndpointsByIpRequest struct {
+	*requests.RpcRequest
+	Ip string `position:"Query" name:"Ip"`
+}
+
+// ListEndpointsByIpResponse is the response struct for api ListEndpointsByIp
+type ListEndpointsByIpResponse struct {
+	*responses.BaseResponse
+	RequestId    string                          `json:"RequestId" xml:"RequestId"`
+	Success      bool                            `json:"Success" xml:"Success"`
+	EndpointList EndpointListInListEndpointsByIp `json:"EndpointList" xml:"EndpointList"`
+}
+
+// CreateListEndpointsByIpRequest creates a request to invoke ListEndpointsByIp API
+func CreateListEndpointsByIpRequest() (request *ListEndpointsByIpRequest) {
+	request = &ListEndpointsByIpRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Location", "2015-06-12", "ListEndpointsByIp", "location", "openAPI")
+	return
+}
+
+// CreateListEndpointsByIpResponse creates a response to parse from ListEndpointsByIp response
+func CreateListEndpointsByIpResponse() (response *ListEndpointsByIpResponse) {
+	response = &ListEndpointsByIpResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 26 - 0
services/location/struct_endpoint.go

@@ -0,0 +1,26 @@
+package location
+
+//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.
+
+// Endpoint is a nested struct in location response
+type Endpoint struct {
+	Endpoint    string                       `json:"Endpoint" xml:"Endpoint"`
+	Id          string                       `json:"Id" xml:"Id"`
+	Namespace   string                       `json:"Namespace" xml:"Namespace"`
+	SerivceCode string                       `json:"SerivceCode" xml:"SerivceCode"`
+	Type        string                       `json:"Type" xml:"Type"`
+	Protocols   ProtocolsInDescribeEndpoints `json:"Protocols" xml:"Protocols"`
+}

+ 21 - 0
services/location/struct_endpoint_list_in_list_endpoints.go

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

+ 21 - 0
services/location/struct_endpoint_list_in_list_endpoints_by_ip.go

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

+ 21 - 0
services/location/struct_endpoints.go

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

+ 26 - 0
services/location/struct_item_endpoint.go

@@ -0,0 +1,26 @@
+package location
+
+//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.
+
+// ItemEndpoint is a nested struct in location response
+type ItemEndpoint struct {
+	Endpoint  string                       `json:"Endpoint" xml:"Endpoint"`
+	Product   string                       `json:"Product" xml:"Product"`
+	Namespace string                       `json:"Namespace" xml:"Namespace"`
+	Id        string                       `json:"Id" xml:"Id"`
+	Type      string                       `json:"Type" xml:"Type"`
+	Protocols ProtocolsInListEndpointsByIp `json:"Protocols" xml:"Protocols"`
+}

+ 21 - 0
services/location/struct_protocols_in_describe_endpoint.go

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

+ 21 - 0
services/location/struct_protocols_in_describe_endpoints.go

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

+ 21 - 0
services/location/struct_protocols_in_list_endpoints.go

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

+ 21 - 0
services/location/struct_protocols_in_list_endpoints_by_ip.go

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

+ 21 - 0
services/location/struct_region_ids.go

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

+ 21 - 0
services/location/struct_services.go

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