Browse Source

App-related actions support tag authentication.

sdk-team 6 năm trước cách đây
mục cha
commit
c8b1514bea

+ 3 - 0
ChangeLog.txt

@@ -1,3 +1,6 @@
+2019-07-25 Version: 1.60.72
+- App-related actions support tag authentication.
+
 2019-07-23 Version: 1.60.71
 - Supported CreationOption of CreateDBCluster with `CloneFromPolarDB `,`CloneFromRDS`,`MigrationFromRDS`.
 

+ 53 - 5
services/cloudapi/client.go

@@ -16,8 +16,11 @@ package cloudapi
 // Changes may cause incorrect behavior and will be lost if the code is regenerated.
 
 import (
+	"reflect"
+
 	"github.com/aliyun/alibaba-cloud-sdk-go/sdk"
 	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth/credentials/provider"
 )
 
 // Client is the sdk client struct, each func corresponds to an OpenAPI
@@ -25,10 +28,40 @@ type Client struct {
 	sdk.Client
 }
 
+// SetClientProperty Set Property by Reflect
+func SetClientProperty(client *Client, propertyName string, propertyValue interface{}) {
+	v := reflect.ValueOf(client).Elem()
+	if v.FieldByName(propertyName).IsValid() && v.FieldByName(propertyName).CanSet() {
+		v.FieldByName(propertyName).Set(reflect.ValueOf(propertyValue))
+	}
+}
+
+// SetEndpointDataToClient Set EndpointMap and ENdpointType
+func SetEndpointDataToClient(client *Client) {
+	SetClientProperty(client, "EndpointMap", GetEndpointMap())
+	SetClientProperty(client, "EndpointType", GetEndpointType())
+}
+
 // NewClient creates a sdk client with environment variables
 func NewClient() (client *Client, err error) {
 	client = &Client{}
 	err = client.Init()
+	SetEndpointDataToClient(client)
+	return
+}
+
+// NewClientWithProvider creates a sdk client with providers
+// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
+func NewClientWithProvider(regionId string, providers ...provider.Provider) (client *Client, err error) {
+	client = &Client{}
+	var pc provider.Provider
+	if len(providers) == 0 {
+		pc = provider.DefaultChain
+	} else {
+		pc = provider.NewProviderChain(providers)
+	}
+	err = client.InitWithProviderChain(regionId, pc)
+	SetEndpointDataToClient(client)
 	return
 }
 
@@ -37,45 +70,60 @@ func NewClient() (client *Client, err error) {
 func NewClientWithOptions(regionId string, config *sdk.Config, credential auth.Credential) (client *Client, err error) {
 	client = &Client{}
 	err = client.InitWithOptions(regionId, config, credential)
+	SetEndpointDataToClient(client)
 	return
 }
 
 // NewClientWithAccessKey is a shortcut to create sdk client with accesskey
-// usage: https://help.aliyun.com/document_detail/66217.html
+// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
 func NewClientWithAccessKey(regionId, accessKeyId, accessKeySecret string) (client *Client, err error) {
 	client = &Client{}
 	err = client.InitWithAccessKey(regionId, accessKeyId, accessKeySecret)
+	SetEndpointDataToClient(client)
 	return
 }
 
 // NewClientWithStsToken is a shortcut to create sdk client with sts token
-// usage: https://help.aliyun.com/document_detail/66222.html
+// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
 func NewClientWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToken string) (client *Client, err error) {
 	client = &Client{}
 	err = client.InitWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToken)
+	SetEndpointDataToClient(client)
 	return
 }
 
 // NewClientWithRamRoleArn is a shortcut to create sdk client with ram roleArn
-// usage: https://help.aliyun.com/document_detail/66222.html
+// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
 func NewClientWithRamRoleArn(regionId string, accessKeyId, accessKeySecret, roleArn, roleSessionName string) (client *Client, err error) {
 	client = &Client{}
 	err = client.InitWithRamRoleArn(regionId, accessKeyId, accessKeySecret, roleArn, roleSessionName)
+	SetEndpointDataToClient(client)
+	return
+}
+
+// NewClientWithRamRoleArn is a shortcut to create sdk client with ram roleArn and policy
+// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
+func NewClientWithRamRoleArnAndPolicy(regionId string, accessKeyId, accessKeySecret, roleArn, roleSessionName, policy string) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithRamRoleArnAndPolicy(regionId, accessKeyId, accessKeySecret, roleArn, roleSessionName, policy)
+	SetEndpointDataToClient(client)
 	return
 }
 
 // NewClientWithEcsRamRole is a shortcut to create sdk client with ecs ram role
-// usage: https://help.aliyun.com/document_detail/66223.html
+// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
 func NewClientWithEcsRamRole(regionId string, roleName string) (client *Client, err error) {
 	client = &Client{}
 	err = client.InitWithEcsRamRole(regionId, roleName)
+	SetEndpointDataToClient(client)
 	return
 }
 
 // NewClientWithRsaKeyPair is a shortcut to create sdk client with rsa key pair
-// attention: rsa key pair auth is only Japan regions available
+// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
 func NewClientWithRsaKeyPair(regionId string, publicKeyId, privateKey string, sessionExpiration int) (client *Client, err error) {
 	client = &Client{}
 	err = client.InitWithRsaKeyPair(regionId, publicKeyId, privateKey, sessionExpiration)
+	SetEndpointDataToClient(client)
 	return
 }

+ 1 - 0
services/cloudapi/create_api.go

@@ -78,6 +78,7 @@ type CreateApiRequest struct {
 	*requests.RpcRequest
 	WebSocketApiType     string           `position:"Query" name:"WebSocketApiType"`
 	ErrorCodeSamples     string           `position:"Query" name:"ErrorCodeSamples"`
+	AppCodeAuthType      string           `position:"Query" name:"AppCodeAuthType"`
 	Description          string           `position:"Query" name:"Description"`
 	DisableInternet      requests.Boolean `position:"Query" name:"DisableInternet"`
 	ConstantParameters   string           `position:"Query" name:"ConstantParameters"`

+ 8 - 5
services/cloudapi/create_api_group.go

@@ -76,6 +76,7 @@ func (client *Client) CreateApiGroupWithCallback(request *CreateApiGroupRequest,
 // CreateApiGroupRequest is the request struct for api CreateApiGroup
 type CreateApiGroupRequest struct {
 	*requests.RpcRequest
+	InstanceId    string `position:"Query" name:"InstanceId"`
 	SecurityToken string `position:"Query" name:"SecurityToken"`
 	Description   string `position:"Query" name:"Description"`
 	Source        string `position:"Query" name:"Source"`
@@ -85,11 +86,13 @@ type CreateApiGroupRequest struct {
 // CreateApiGroupResponse is the response struct for api CreateApiGroup
 type CreateApiGroupResponse struct {
 	*responses.BaseResponse
-	RequestId   string `json:"RequestId" xml:"RequestId"`
-	GroupId     string `json:"GroupId" xml:"GroupId"`
-	GroupName   string `json:"GroupName" xml:"GroupName"`
-	SubDomain   string `json:"SubDomain" xml:"SubDomain"`
-	Description string `json:"Description" xml:"Description"`
+	RequestId    string `json:"RequestId" xml:"RequestId"`
+	GroupId      string `json:"GroupId" xml:"GroupId"`
+	GroupName    string `json:"GroupName" xml:"GroupName"`
+	SubDomain    string `json:"SubDomain" xml:"SubDomain"`
+	Description  string `json:"Description" xml:"Description"`
+	InstanceId   string `json:"InstanceId" xml:"InstanceId"`
+	InstanceType string `json:"InstanceType" xml:"InstanceType"`
 }
 
 // CreateCreateApiGroupRequest creates a request to invoke CreateApiGroup API

+ 1 - 1
services/cloudapi/create_app.go

@@ -85,7 +85,7 @@ type CreateAppRequest struct {
 type CreateAppResponse struct {
 	*responses.BaseResponse
 	RequestId string `json:"RequestId" xml:"RequestId"`
-	AppId     int    `json:"AppId" xml:"AppId"`
+	AppId     int64  `json:"AppId" xml:"AppId"`
 }
 
 // CreateCreateAppRequest creates a request to invoke CreateApp API

+ 7 - 0
services/cloudapi/delete_app.go

@@ -78,6 +78,13 @@ type DeleteAppRequest struct {
 	*requests.RpcRequest
 	SecurityToken string           `position:"Query" name:"SecurityToken"`
 	AppId         requests.Integer `position:"Query" name:"AppId"`
+	Tag           *[]DeleteAppTag  `position:"Query" name:"Tag"  type:"Repeated"`
+}
+
+// DeleteAppTag is a repeated param struct in DeleteAppRequest
+type DeleteAppTag struct {
+	Value string `name:"Value"`
+	Key   string `name:"Key"`
 }
 
 // DeleteAppResponse is the response struct for api DeleteApp

+ 3 - 0
services/cloudapi/describe_api_group.go

@@ -96,6 +96,9 @@ type DescribeApiGroupResponse struct {
 	IllegalStatus string        `json:"IllegalStatus" xml:"IllegalStatus"`
 	TrafficLimit  int           `json:"TrafficLimit" xml:"TrafficLimit"`
 	VpcDomain     string        `json:"VpcDomain" xml:"VpcDomain"`
+	InstanceType  string        `json:"InstanceType" xml:"InstanceType"`
+	InstanceId    string        `json:"InstanceId" xml:"InstanceId"`
+	HttpsPolicy   string        `json:"HttpsPolicy" xml:"HttpsPolicy"`
 	CustomDomains CustomDomains `json:"CustomDomains" xml:"CustomDomains"`
 	StageItems    StageItems    `json:"StageItems" xml:"StageItems"`
 }

+ 1 - 1
services/cloudapi/describe_app.go

@@ -84,7 +84,7 @@ type DescribeAppRequest struct {
 type DescribeAppResponse struct {
 	*responses.BaseResponse
 	RequestId    string `json:"RequestId" xml:"RequestId"`
-	AppId        int    `json:"AppId" xml:"AppId"`
+	AppId        int64  `json:"AppId" xml:"AppId"`
 	AppName      string `json:"AppName" xml:"AppName"`
 	Description  string `json:"Description" xml:"Description"`
 	CreatedTime  string `json:"CreatedTime" xml:"CreatedTime"`

+ 12 - 5
services/cloudapi/describe_app_attributes.go

@@ -76,11 +76,18 @@ func (client *Client) DescribeAppAttributesWithCallback(request *DescribeAppAttr
 // DescribeAppAttributesRequest is the request struct for api DescribeAppAttributes
 type DescribeAppAttributesRequest struct {
 	*requests.RpcRequest
-	AppName       string           `position:"Query" name:"AppName"`
-	SecurityToken string           `position:"Query" name:"SecurityToken"`
-	AppId         requests.Integer `position:"Query" name:"AppId"`
-	PageSize      requests.Integer `position:"Query" name:"PageSize"`
-	PageNumber    requests.Integer `position:"Query" name:"PageNumber"`
+	AppName       string                      `position:"Query" name:"AppName"`
+	SecurityToken string                      `position:"Query" name:"SecurityToken"`
+	AppId         requests.Integer            `position:"Query" name:"AppId"`
+	PageSize      requests.Integer            `position:"Query" name:"PageSize"`
+	Tag           *[]DescribeAppAttributesTag `position:"Query" name:"Tag"  type:"Repeated"`
+	PageNumber    requests.Integer            `position:"Query" name:"PageNumber"`
+}
+
+// DescribeAppAttributesTag is a repeated param struct in DescribeAppAttributesRequest
+type DescribeAppAttributesTag struct {
+	Value string `name:"Value"`
+	Key   string `name:"Key"`
 }
 
 // DescribeAppAttributesResponse is the response struct for api DescribeAppAttributes

+ 9 - 2
services/cloudapi/describe_app_security.go

@@ -76,8 +76,15 @@ func (client *Client) DescribeAppSecurityWithCallback(request *DescribeAppSecuri
 // DescribeAppSecurityRequest is the request struct for api DescribeAppSecurity
 type DescribeAppSecurityRequest struct {
 	*requests.RpcRequest
-	SecurityToken string           `position:"Query" name:"SecurityToken"`
-	AppId         requests.Integer `position:"Query" name:"AppId"`
+	SecurityToken string                    `position:"Query" name:"SecurityToken"`
+	AppId         requests.Integer          `position:"Query" name:"AppId"`
+	Tag           *[]DescribeAppSecurityTag `position:"Query" name:"Tag"  type:"Repeated"`
+}
+
+// DescribeAppSecurityTag is a repeated param struct in DescribeAppSecurityRequest
+type DescribeAppSecurityTag struct {
+	Value string `name:"Value"`
+	Key   string `name:"Key"`
 }
 
 // DescribeAppSecurityResponse is the response struct for api DescribeAppSecurity

+ 3 - 0
services/cloudapi/describe_authorized_apps.go

@@ -77,8 +77,11 @@ func (client *Client) DescribeAuthorizedAppsWithCallback(request *DescribeAuthor
 type DescribeAuthorizedAppsRequest struct {
 	*requests.RpcRequest
 	StageName     string           `position:"Query" name:"StageName"`
+	AppName       string           `position:"Query" name:"AppName"`
 	SecurityToken string           `position:"Query" name:"SecurityToken"`
 	GroupId       string           `position:"Query" name:"GroupId"`
+	AppId         requests.Integer `position:"Query" name:"AppId"`
+	AppOwnerId    requests.Integer `position:"Query" name:"AppOwnerId"`
 	PageSize      requests.Integer `position:"Query" name:"PageSize"`
 	ApiId         string           `position:"Query" name:"ApiId"`
 	PageNumber    requests.Integer `position:"Query" name:"PageNumber"`

+ 115 - 0
services/cloudapi/list_tag_resources.go

@@ -0,0 +1,115 @@
+package cloudapi
+
+//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"
+)
+
+// ListTagResources invokes the cloudapi.ListTagResources API synchronously
+// api document: https://help.aliyun.com/api/cloudapi/listtagresources.html
+func (client *Client) ListTagResources(request *ListTagResourcesRequest) (response *ListTagResourcesResponse, err error) {
+	response = CreateListTagResourcesResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// ListTagResourcesWithChan invokes the cloudapi.ListTagResources API asynchronously
+// api document: https://help.aliyun.com/api/cloudapi/listtagresources.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ListTagResourcesWithChan(request *ListTagResourcesRequest) (<-chan *ListTagResourcesResponse, <-chan error) {
+	responseChan := make(chan *ListTagResourcesResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.ListTagResources(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// ListTagResourcesWithCallback invokes the cloudapi.ListTagResources API asynchronously
+// api document: https://help.aliyun.com/api/cloudapi/listtagresources.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ListTagResourcesWithCallback(request *ListTagResourcesRequest, callback func(response *ListTagResourcesResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *ListTagResourcesResponse
+		var err error
+		defer close(result)
+		response, err = client.ListTagResources(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// ListTagResourcesRequest is the request struct for api ListTagResources
+type ListTagResourcesRequest struct {
+	*requests.RpcRequest
+	ResourceId    *[]string              `position:"Query" name:"ResourceId"  type:"Repeated"`
+	SecurityToken string                 `position:"Query" name:"SecurityToken"`
+	NextToken     string                 `position:"Query" name:"NextToken"`
+	Tag           *[]ListTagResourcesTag `position:"Query" name:"Tag"  type:"Repeated"`
+	ResourceType  string                 `position:"Query" name:"ResourceType"`
+}
+
+// ListTagResourcesTag is a repeated param struct in ListTagResourcesRequest
+type ListTagResourcesTag struct {
+	Value string `name:"Value"`
+	Key   string `name:"Key"`
+}
+
+// ListTagResourcesResponse is the response struct for api ListTagResources
+type ListTagResourcesResponse struct {
+	*responses.BaseResponse
+	NextToken    string       `json:"NextToken" xml:"NextToken"`
+	RequestId    string       `json:"RequestId" xml:"RequestId"`
+	TagResources TagResources `json:"TagResources" xml:"TagResources"`
+}
+
+// CreateListTagResourcesRequest creates a request to invoke ListTagResources API
+func CreateListTagResourcesRequest() (request *ListTagResourcesRequest) {
+	request = &ListTagResourcesRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("CloudAPI", "2016-07-14", "ListTagResources", "apigateway", "openAPI")
+	return
+}
+
+// CreateListTagResourcesResponse creates a response to parse from ListTagResources response
+func CreateListTagResourcesResponse() (response *ListTagResourcesResponse) {
+	response = &ListTagResourcesResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 1 - 0
services/cloudapi/modify_api.go

@@ -78,6 +78,7 @@ type ModifyApiRequest struct {
 	*requests.RpcRequest
 	WebSocketApiType     string           `position:"Query" name:"WebSocketApiType"`
 	ErrorCodeSamples     string           `position:"Query" name:"ErrorCodeSamples"`
+	AppCodeAuthType      string           `position:"Query" name:"AppCodeAuthType"`
 	Description          string           `position:"Query" name:"Description"`
 	DisableInternet      requests.Boolean `position:"Query" name:"DisableInternet"`
 	ConstantParameters   string           `position:"Query" name:"ConstantParameters"`

+ 7 - 0
services/cloudapi/modify_app.go

@@ -80,6 +80,13 @@ type ModifyAppRequest struct {
 	SecurityToken string           `position:"Query" name:"SecurityToken"`
 	AppId         requests.Integer `position:"Query" name:"AppId"`
 	Description   string           `position:"Query" name:"Description"`
+	Tag           *[]ModifyAppTag  `position:"Query" name:"Tag"  type:"Repeated"`
+}
+
+// ModifyAppTag is a repeated param struct in ModifyAppRequest
+type ModifyAppTag struct {
+	Value string `name:"Value"`
+	Key   string `name:"Key"`
 }
 
 // ModifyAppResponse is the response struct for api ModifyApp

+ 104 - 0
services/cloudapi/reset_app_code.go

@@ -0,0 +1,104 @@
+package cloudapi
+
+//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"
+)
+
+// ResetAppCode invokes the cloudapi.ResetAppCode API synchronously
+// api document: https://help.aliyun.com/api/cloudapi/resetappcode.html
+func (client *Client) ResetAppCode(request *ResetAppCodeRequest) (response *ResetAppCodeResponse, err error) {
+	response = CreateResetAppCodeResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// ResetAppCodeWithChan invokes the cloudapi.ResetAppCode API asynchronously
+// api document: https://help.aliyun.com/api/cloudapi/resetappcode.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ResetAppCodeWithChan(request *ResetAppCodeRequest) (<-chan *ResetAppCodeResponse, <-chan error) {
+	responseChan := make(chan *ResetAppCodeResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.ResetAppCode(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// ResetAppCodeWithCallback invokes the cloudapi.ResetAppCode API asynchronously
+// api document: https://help.aliyun.com/api/cloudapi/resetappcode.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ResetAppCodeWithCallback(request *ResetAppCodeRequest, callback func(response *ResetAppCodeResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *ResetAppCodeResponse
+		var err error
+		defer close(result)
+		response, err = client.ResetAppCode(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// ResetAppCodeRequest is the request struct for api ResetAppCode
+type ResetAppCodeRequest struct {
+	*requests.RpcRequest
+	SecurityToken string `position:"Query" name:"SecurityToken"`
+	AppCode       string `position:"Query" name:"AppCode"`
+}
+
+// ResetAppCodeResponse is the response struct for api ResetAppCode
+type ResetAppCodeResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateResetAppCodeRequest creates a request to invoke ResetAppCode API
+func CreateResetAppCodeRequest() (request *ResetAppCodeRequest) {
+	request = &ResetAppCodeRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("CloudAPI", "2016-07-14", "ResetAppCode", "apigateway", "openAPI")
+	return
+}
+
+// CreateResetAppCodeResponse creates a response to parse from ResetAppCode response
+func CreateResetAppCodeResponse() (response *ResetAppCodeResponse) {
+	response = &ResetAppCodeResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 3 - 6
services/cloudapi/set_domain.go

@@ -76,12 +76,9 @@ func (client *Client) SetDomainWithCallback(request *SetDomainRequest, callback
 // SetDomainRequest is the request struct for api SetDomain
 type SetDomainRequest struct {
 	*requests.RpcRequest
-	SecurityToken         string `position:"Query" name:"SecurityToken"`
-	CertificatePrivateKey string `position:"Query" name:"CertificatePrivateKey"`
-	GroupId               string `position:"Query" name:"GroupId"`
-	DomainName            string `position:"Query" name:"DomainName"`
-	CertificateName       string `position:"Query" name:"CertificateName"`
-	CertificateBody       string `position:"Query" name:"CertificateBody"`
+	SecurityToken string `position:"Query" name:"SecurityToken"`
+	GroupId       string `position:"Query" name:"GroupId"`
+	DomainName    string `position:"Query" name:"DomainName"`
 }
 
 // SetDomainResponse is the response struct for api SetDomain

+ 3 - 0
services/cloudapi/struct_api_group_attribute.go

@@ -27,4 +27,7 @@ type ApiGroupAttribute struct {
 	TrafficLimit  int    `json:"TrafficLimit" xml:"TrafficLimit"`
 	BillingStatus string `json:"BillingStatus" xml:"BillingStatus"`
 	IllegalStatus string `json:"IllegalStatus" xml:"IllegalStatus"`
+	InstanceId    string `json:"InstanceId" xml:"InstanceId"`
+	InstanceType  string `json:"InstanceType" xml:"InstanceType"`
+	HttpsPolicy   string `json:"HttpsPolicy" xml:"HttpsPolicy"`
 }

+ 1 - 1
services/cloudapi/struct_app_attribute.go

@@ -17,7 +17,7 @@ package cloudapi
 
 // AppAttribute is a nested struct in cloudapi response
 type AppAttribute struct {
-	AppId        int    `json:"AppId" xml:"AppId"`
+	AppId        int64  `json:"AppId" xml:"AppId"`
 	AppName      string `json:"AppName" xml:"AppName"`
 	Description  string `json:"Description" xml:"Description"`
 	CreatedTime  string `json:"CreatedTime" xml:"CreatedTime"`

+ 1 - 1
services/cloudapi/struct_app_item.go

@@ -17,7 +17,7 @@ package cloudapi
 
 // AppItem is a nested struct in cloudapi response
 type AppItem struct {
-	AppId       int    `json:"AppId" xml:"AppId"`
+	AppId       int64  `json:"AppId" xml:"AppId"`
 	AppName     string `json:"AppName" xml:"AppName"`
 	Description string `json:"Description" xml:"Description"`
 }

+ 1 - 1
services/cloudapi/struct_authorized_app.go

@@ -18,7 +18,7 @@ package cloudapi
 // AuthorizedApp is a nested struct in cloudapi response
 type AuthorizedApp struct {
 	StageName           string `json:"StageName" xml:"StageName"`
-	AppId               int    `json:"AppId" xml:"AppId"`
+	AppId               int64  `json:"AppId" xml:"AppId"`
 	AppName             string `json:"AppName" xml:"AppName"`
 	Operator            string `json:"Operator" xml:"Operator"`
 	AuthorizationSource string `json:"AuthorizationSource" xml:"AuthorizationSource"`

+ 2 - 2
services/cloudapi/struct_purchased_api_group_attribute.go

@@ -24,7 +24,7 @@ type PurchasedApiGroupAttribute struct {
 	ExpireTime     string `json:"ExpireTime" xml:"ExpireTime"`
 	RegionId       string `json:"RegionId" xml:"RegionId"`
 	BillingType    string `json:"BillingType" xml:"BillingType"`
-	InvokeTimesMax int    `json:"InvokeTimesMax" xml:"InvokeTimesMax"`
-	InvokeTimesNow int    `json:"InvokeTimesNow" xml:"InvokeTimesNow"`
+	InvokeTimesMax int64  `json:"InvokeTimesMax" xml:"InvokeTimesMax"`
+	InvokeTimesNow int64  `json:"InvokeTimesNow" xml:"InvokeTimesNow"`
 	Status         string `json:"Status" xml:"Status"`
 }

+ 4 - 4
services/cloudapi/struct_request_parameter.go

@@ -17,7 +17,7 @@ package cloudapi
 
 // RequestParameter is a nested struct in cloudapi response
 type RequestParameter struct {
-	MaxValue          int    `json:"MaxValue" xml:"MaxValue"`
+	MaxValue          int64  `json:"MaxValue" xml:"MaxValue"`
 	ApiParameterName  string `json:"ApiParameterName" xml:"ApiParameterName"`
 	DocOrder          int    `json:"DocOrder" xml:"DocOrder"`
 	EnumValue         string `json:"EnumValue" xml:"EnumValue"`
@@ -27,10 +27,10 @@ type RequestParameter struct {
 	Location          string `json:"Location" xml:"Location"`
 	Required          string `json:"Required" xml:"Required"`
 	DemoValue         string `json:"DemoValue" xml:"DemoValue"`
-	MinLength         int    `json:"MinLength" xml:"MinLength"`
-	MaxLength         int    `json:"MaxLength" xml:"MaxLength"`
+	MinLength         int64  `json:"MinLength" xml:"MinLength"`
+	MaxLength         int64  `json:"MaxLength" xml:"MaxLength"`
 	RegularExpression string `json:"RegularExpression" xml:"RegularExpression"`
-	MinValue          int    `json:"MinValue" xml:"MinValue"`
+	MinValue          int64  `json:"MinValue" xml:"MinValue"`
 	DocShow           string `json:"DocShow" xml:"DocShow"`
 	Description       string `json:"Description" xml:"Description"`
 }

+ 2 - 2
services/cloudapi/struct_route_rule_item.go

@@ -17,8 +17,8 @@ package cloudapi
 
 // RouteRuleItem is a nested struct in cloudapi response
 type RouteRuleItem struct {
-	MaxValue       int    `json:"MaxValue" xml:"MaxValue"`
-	MinValue       int    `json:"MinValue" xml:"MinValue"`
+	MaxValue       int64  `json:"MaxValue" xml:"MaxValue"`
+	MinValue       int64  `json:"MinValue" xml:"MinValue"`
 	ConditionValue string `json:"ConditionValue" xml:"ConditionValue"`
 	ResultValue    string `json:"ResultValue" xml:"ResultValue"`
 }

+ 24 - 0
services/cloudapi/struct_tag_resource.go

@@ -0,0 +1,24 @@
+package cloudapi
+
+//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.
+
+// TagResource is a nested struct in cloudapi response
+type TagResource struct {
+	ResourceId   string `json:"ResourceId" xml:"ResourceId"`
+	ResourceType string `json:"ResourceType" xml:"ResourceType"`
+	TagKey       string `json:"TagKey" xml:"TagKey"`
+	TagValue     string `json:"TagValue" xml:"TagValue"`
+}

+ 21 - 0
services/cloudapi/struct_tag_resources.go

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

+ 112 - 0
services/cloudapi/tag_resources.go

@@ -0,0 +1,112 @@
+package cloudapi
+
+//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"
+)
+
+// TagResources invokes the cloudapi.TagResources API synchronously
+// api document: https://help.aliyun.com/api/cloudapi/tagresources.html
+func (client *Client) TagResources(request *TagResourcesRequest) (response *TagResourcesResponse, err error) {
+	response = CreateTagResourcesResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// TagResourcesWithChan invokes the cloudapi.TagResources API asynchronously
+// api document: https://help.aliyun.com/api/cloudapi/tagresources.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) TagResourcesWithChan(request *TagResourcesRequest) (<-chan *TagResourcesResponse, <-chan error) {
+	responseChan := make(chan *TagResourcesResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.TagResources(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// TagResourcesWithCallback invokes the cloudapi.TagResources API asynchronously
+// api document: https://help.aliyun.com/api/cloudapi/tagresources.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) TagResourcesWithCallback(request *TagResourcesRequest, callback func(response *TagResourcesResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *TagResourcesResponse
+		var err error
+		defer close(result)
+		response, err = client.TagResources(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// TagResourcesRequest is the request struct for api TagResources
+type TagResourcesRequest struct {
+	*requests.RpcRequest
+	ResourceId    *[]string          `position:"Query" name:"ResourceId"  type:"Repeated"`
+	SecurityToken string             `position:"Query" name:"SecurityToken"`
+	Tag           *[]TagResourcesTag `position:"Query" name:"Tag"  type:"Repeated"`
+	ResourceType  string             `position:"Query" name:"ResourceType"`
+}
+
+// TagResourcesTag is a repeated param struct in TagResourcesRequest
+type TagResourcesTag struct {
+	Value string `name:"Value"`
+	Key   string `name:"Key"`
+}
+
+// TagResourcesResponse is the response struct for api TagResources
+type TagResourcesResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateTagResourcesRequest creates a request to invoke TagResources API
+func CreateTagResourcesRequest() (request *TagResourcesRequest) {
+	request = &TagResourcesRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("CloudAPI", "2016-07-14", "TagResources", "apigateway", "openAPI")
+	return
+}
+
+// CreateTagResourcesResponse creates a response to parse from TagResources response
+func CreateTagResourcesResponse() (response *TagResourcesResponse) {
+	response = &TagResourcesResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 107 - 0
services/cloudapi/untag_resources.go

@@ -0,0 +1,107 @@
+package cloudapi
+
+//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"
+)
+
+// UntagResources invokes the cloudapi.UntagResources API synchronously
+// api document: https://help.aliyun.com/api/cloudapi/untagresources.html
+func (client *Client) UntagResources(request *UntagResourcesRequest) (response *UntagResourcesResponse, err error) {
+	response = CreateUntagResourcesResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// UntagResourcesWithChan invokes the cloudapi.UntagResources API asynchronously
+// api document: https://help.aliyun.com/api/cloudapi/untagresources.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UntagResourcesWithChan(request *UntagResourcesRequest) (<-chan *UntagResourcesResponse, <-chan error) {
+	responseChan := make(chan *UntagResourcesResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.UntagResources(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// UntagResourcesWithCallback invokes the cloudapi.UntagResources API asynchronously
+// api document: https://help.aliyun.com/api/cloudapi/untagresources.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UntagResourcesWithCallback(request *UntagResourcesRequest, callback func(response *UntagResourcesResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *UntagResourcesResponse
+		var err error
+		defer close(result)
+		response, err = client.UntagResources(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// UntagResourcesRequest is the request struct for api UntagResources
+type UntagResourcesRequest struct {
+	*requests.RpcRequest
+	All           requests.Boolean `position:"Query" name:"All"`
+	ResourceId    *[]string        `position:"Query" name:"ResourceId"  type:"Repeated"`
+	SecurityToken string           `position:"Query" name:"SecurityToken"`
+	TagKey        *[]string        `position:"Query" name:"TagKey"  type:"Repeated"`
+	ResourceType  string           `position:"Query" name:"ResourceType"`
+}
+
+// UntagResourcesResponse is the response struct for api UntagResources
+type UntagResourcesResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateUntagResourcesRequest creates a request to invoke UntagResources API
+func CreateUntagResourcesRequest() (request *UntagResourcesRequest) {
+	request = &UntagResourcesRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("CloudAPI", "2016-07-14", "UntagResources", "apigateway", "openAPI")
+	return
+}
+
+// CreateUntagResourcesResponse creates a response to parse from UntagResources response
+func CreateUntagResourcesResponse() (response *UntagResourcesResponse) {
+	response = &UntagResourcesResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}