Ver Fonte

Generated 2017-08-24 for faas.

sdk-team há 5 anos atrás
pai
commit
824e0251c1

+ 4 - 0
ChangeLog.txt

@@ -1,3 +1,7 @@
+2020-03-18 Version: v1.61.64
+- Generated 2017-08-24 for `faas`.
+- Support GO-SDK for 20170824 version.
+
 2020-03-18 Version: v1.61.63
 - Generated 2018-08-28 for `Tag`.
 

+ 129 - 0
services/faas/client.go

@@ -0,0 +1,129 @@
+package faas
+
+//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 (
+	"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
+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
+}
+
+// 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)
+	SetEndpointDataToClient(client)
+	return
+}
+
+// NewClientWithAccessKey is a shortcut to create sdk client with accesskey
+// 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://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://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://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
+// 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
+}

+ 119 - 0
services/faas/create_fpga_image_task.go

@@ -0,0 +1,119 @@
+package faas
+
+//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"
+)
+
+// CreateFpgaImageTask invokes the faas.CreateFpgaImageTask API synchronously
+// api document: https://help.aliyun.com/api/faas/createfpgaimagetask.html
+func (client *Client) CreateFpgaImageTask(request *CreateFpgaImageTaskRequest) (response *CreateFpgaImageTaskResponse, err error) {
+	response = CreateCreateFpgaImageTaskResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// CreateFpgaImageTaskWithChan invokes the faas.CreateFpgaImageTask API asynchronously
+// api document: https://help.aliyun.com/api/faas/createfpgaimagetask.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CreateFpgaImageTaskWithChan(request *CreateFpgaImageTaskRequest) (<-chan *CreateFpgaImageTaskResponse, <-chan error) {
+	responseChan := make(chan *CreateFpgaImageTaskResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.CreateFpgaImageTask(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// CreateFpgaImageTaskWithCallback invokes the faas.CreateFpgaImageTask API asynchronously
+// api document: https://help.aliyun.com/api/faas/createfpgaimagetask.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CreateFpgaImageTaskWithCallback(request *CreateFpgaImageTaskRequest, callback func(response *CreateFpgaImageTaskResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *CreateFpgaImageTaskResponse
+		var err error
+		defer close(result)
+		response, err = client.CreateFpgaImageTask(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// CreateFpgaImageTaskRequest is the request struct for api CreateFpgaImageTask
+type CreateFpgaImageTaskRequest struct {
+	*requests.RpcRequest
+	Description string           `position:"Query" name:"Description"`
+	KeyId       string           `position:"Query" name:"KeyId"`
+	ShellUUID   string           `position:"Query" name:"ShellUUID"`
+	Tags        string           `position:"Query" name:"Tags"`
+	Bucket      string           `position:"Query" name:"Bucket"`
+	Encrypted   requests.Boolean `position:"Query" name:"Encrypted"`
+	RoleArn     string           `position:"Query" name:"RoleArn"`
+	Name        string           `position:"Query" name:"Name"`
+	FpgaType    string           `position:"Query" name:"FpgaType"`
+	Email       string           `position:"Query" name:"Email"`
+	Object      string           `position:"Query" name:"Object"`
+}
+
+// CreateFpgaImageTaskResponse is the response struct for api CreateFpgaImageTask
+type CreateFpgaImageTaskResponse struct {
+	*responses.BaseResponse
+	RequestId     string `json:"RequestId" xml:"RequestId"`
+	Name          string `json:"Name" xml:"Name"`
+	CreateTime    string `json:"CreateTime" xml:"CreateTime"`
+	ShellUUID     string `json:"ShellUUID" xml:"ShellUUID"`
+	State         string `json:"State" xml:"State"`
+	Description   string `json:"Description" xml:"Description"`
+	FpgaImageUUID string `json:"FpgaImageUUID" xml:"FpgaImageUUID"`
+}
+
+// CreateCreateFpgaImageTaskRequest creates a request to invoke CreateFpgaImageTask API
+func CreateCreateFpgaImageTaskRequest() (request *CreateFpgaImageTaskRequest) {
+	request = &CreateFpgaImageTaskRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("faas", "2017-08-24", "CreateFpgaImageTask", "faas", "openAPI")
+	return
+}
+
+// CreateCreateFpgaImageTaskResponse creates a response to parse from CreateFpgaImageTask response
+func CreateCreateFpgaImageTaskResponse() (response *CreateFpgaImageTaskResponse) {
+	response = &CreateFpgaImageTaskResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 107 - 0
services/faas/delete_fpga_image.go

@@ -0,0 +1,107 @@
+package faas
+
+//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"
+)
+
+// DeleteFpgaImage invokes the faas.DeleteFpgaImage API synchronously
+// api document: https://help.aliyun.com/api/faas/deletefpgaimage.html
+func (client *Client) DeleteFpgaImage(request *DeleteFpgaImageRequest) (response *DeleteFpgaImageResponse, err error) {
+	response = CreateDeleteFpgaImageResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DeleteFpgaImageWithChan invokes the faas.DeleteFpgaImage API asynchronously
+// api document: https://help.aliyun.com/api/faas/deletefpgaimage.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteFpgaImageWithChan(request *DeleteFpgaImageRequest) (<-chan *DeleteFpgaImageResponse, <-chan error) {
+	responseChan := make(chan *DeleteFpgaImageResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DeleteFpgaImage(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DeleteFpgaImageWithCallback invokes the faas.DeleteFpgaImage API asynchronously
+// api document: https://help.aliyun.com/api/faas/deletefpgaimage.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteFpgaImageWithCallback(request *DeleteFpgaImageRequest, callback func(response *DeleteFpgaImageResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DeleteFpgaImageResponse
+		var err error
+		defer close(result)
+		response, err = client.DeleteFpgaImage(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DeleteFpgaImageRequest is the request struct for api DeleteFpgaImage
+type DeleteFpgaImageRequest struct {
+	*requests.RpcRequest
+	FpgaImageUUID string           `position:"Query" name:"FpgaImageUUID"`
+	CallerUid     requests.Integer `position:"Query" name:"callerUid"`
+}
+
+// DeleteFpgaImageResponse is the response struct for api DeleteFpgaImage
+type DeleteFpgaImageResponse struct {
+	*responses.BaseResponse
+	RequestId     string `json:"RequestId" xml:"RequestId"`
+	Status        string `json:"Status" xml:"Status"`
+	FpgaImageUUID string `json:"FpgaImageUUID" xml:"FpgaImageUUID"`
+	Message       string `json:"Message" xml:"Message"`
+}
+
+// CreateDeleteFpgaImageRequest creates a request to invoke DeleteFpgaImage API
+func CreateDeleteFpgaImageRequest() (request *DeleteFpgaImageRequest) {
+	request = &DeleteFpgaImageRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("faas", "2017-08-24", "DeleteFpgaImage", "faas", "openAPI")
+	return
+}
+
+// CreateDeleteFpgaImageResponse creates a response to parse from DeleteFpgaImage response
+func CreateDeleteFpgaImageResponse() (response *DeleteFpgaImageResponse) {
+	response = &DeleteFpgaImageResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 108 - 0
services/faas/delete_publish_fpga_image.go

@@ -0,0 +1,108 @@
+package faas
+
+//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"
+)
+
+// DeletePublishFpgaImage invokes the faas.DeletePublishFpgaImage API synchronously
+// api document: https://help.aliyun.com/api/faas/deletepublishfpgaimage.html
+func (client *Client) DeletePublishFpgaImage(request *DeletePublishFpgaImageRequest) (response *DeletePublishFpgaImageResponse, err error) {
+	response = CreateDeletePublishFpgaImageResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DeletePublishFpgaImageWithChan invokes the faas.DeletePublishFpgaImage API asynchronously
+// api document: https://help.aliyun.com/api/faas/deletepublishfpgaimage.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeletePublishFpgaImageWithChan(request *DeletePublishFpgaImageRequest) (<-chan *DeletePublishFpgaImageResponse, <-chan error) {
+	responseChan := make(chan *DeletePublishFpgaImageResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DeletePublishFpgaImage(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DeletePublishFpgaImageWithCallback invokes the faas.DeletePublishFpgaImage API asynchronously
+// api document: https://help.aliyun.com/api/faas/deletepublishfpgaimage.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeletePublishFpgaImageWithCallback(request *DeletePublishFpgaImageRequest, callback func(response *DeletePublishFpgaImageResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DeletePublishFpgaImageResponse
+		var err error
+		defer close(result)
+		response, err = client.DeletePublishFpgaImage(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DeletePublishFpgaImageRequest is the request struct for api DeletePublishFpgaImage
+type DeletePublishFpgaImageRequest struct {
+	*requests.RpcRequest
+	ImageID       string           `position:"Query" name:"ImageID"`
+	FpgaImageUUID string           `position:"Query" name:"FpgaImageUUID"`
+	CallerUid     requests.Integer `position:"Query" name:"callerUid"`
+}
+
+// DeletePublishFpgaImageResponse is the response struct for api DeletePublishFpgaImage
+type DeletePublishFpgaImageResponse struct {
+	*responses.BaseResponse
+	RequestId     string `json:"RequestId" xml:"RequestId"`
+	Status        string `json:"Status" xml:"Status"`
+	FpgaImageUUID string `json:"FpgaImageUUID" xml:"FpgaImageUUID"`
+	Message       string `json:"Message" xml:"Message"`
+}
+
+// CreateDeletePublishFpgaImageRequest creates a request to invoke DeletePublishFpgaImage API
+func CreateDeletePublishFpgaImageRequest() (request *DeletePublishFpgaImageRequest) {
+	request = &DeletePublishFpgaImageRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("faas", "2017-08-24", "DeletePublishFpgaImage", "faas", "openAPI")
+	return
+}
+
+// CreateDeletePublishFpgaImageResponse creates a response to parse from DeletePublishFpgaImage response
+func CreateDeletePublishFpgaImageResponse() (response *DeletePublishFpgaImageResponse) {
+	response = &DeletePublishFpgaImageResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 104 - 0
services/faas/describe_fpga_images.go

@@ -0,0 +1,104 @@
+package faas
+
+//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"
+)
+
+// DescribeFpgaImages invokes the faas.DescribeFpgaImages API synchronously
+// api document: https://help.aliyun.com/api/faas/describefpgaimages.html
+func (client *Client) DescribeFpgaImages(request *DescribeFpgaImagesRequest) (response *DescribeFpgaImagesResponse, err error) {
+	response = CreateDescribeFpgaImagesResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DescribeFpgaImagesWithChan invokes the faas.DescribeFpgaImages API asynchronously
+// api document: https://help.aliyun.com/api/faas/describefpgaimages.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeFpgaImagesWithChan(request *DescribeFpgaImagesRequest) (<-chan *DescribeFpgaImagesResponse, <-chan error) {
+	responseChan := make(chan *DescribeFpgaImagesResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DescribeFpgaImages(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DescribeFpgaImagesWithCallback invokes the faas.DescribeFpgaImages API asynchronously
+// api document: https://help.aliyun.com/api/faas/describefpgaimages.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeFpgaImagesWithCallback(request *DescribeFpgaImagesRequest, callback func(response *DescribeFpgaImagesResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DescribeFpgaImagesResponse
+		var err error
+		defer close(result)
+		response, err = client.DescribeFpgaImages(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DescribeFpgaImagesRequest is the request struct for api DescribeFpgaImages
+type DescribeFpgaImagesRequest struct {
+	*requests.RpcRequest
+	CallerUid requests.Integer `position:"Query" name:"callerUid"`
+}
+
+// DescribeFpgaImagesResponse is the response struct for api DescribeFpgaImages
+type DescribeFpgaImagesResponse struct {
+	*responses.BaseResponse
+	RequestId  string                         `json:"RequestId" xml:"RequestId"`
+	FpgaImages FpgaImagesInDescribeFpgaImages `json:"FpgaImages" xml:"FpgaImages"`
+}
+
+// CreateDescribeFpgaImagesRequest creates a request to invoke DescribeFpgaImages API
+func CreateDescribeFpgaImagesRequest() (request *DescribeFpgaImagesRequest) {
+	request = &DescribeFpgaImagesRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("faas", "2017-08-24", "DescribeFpgaImages", "faas", "openAPI")
+	return
+}
+
+// CreateDescribeFpgaImagesResponse creates a response to parse from DescribeFpgaImages response
+func CreateDescribeFpgaImagesResponse() (response *DescribeFpgaImagesResponse) {
+	response = &DescribeFpgaImagesResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 106 - 0
services/faas/describe_fpga_instances.go

@@ -0,0 +1,106 @@
+package faas
+
+//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"
+)
+
+// DescribeFpgaInstances invokes the faas.DescribeFpgaInstances API synchronously
+// api document: https://help.aliyun.com/api/faas/describefpgainstances.html
+func (client *Client) DescribeFpgaInstances(request *DescribeFpgaInstancesRequest) (response *DescribeFpgaInstancesResponse, err error) {
+	response = CreateDescribeFpgaInstancesResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DescribeFpgaInstancesWithChan invokes the faas.DescribeFpgaInstances API asynchronously
+// api document: https://help.aliyun.com/api/faas/describefpgainstances.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeFpgaInstancesWithChan(request *DescribeFpgaInstancesRequest) (<-chan *DescribeFpgaInstancesResponse, <-chan error) {
+	responseChan := make(chan *DescribeFpgaInstancesResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DescribeFpgaInstances(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DescribeFpgaInstancesWithCallback invokes the faas.DescribeFpgaInstances API asynchronously
+// api document: https://help.aliyun.com/api/faas/describefpgainstances.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeFpgaInstancesWithCallback(request *DescribeFpgaInstancesRequest, callback func(response *DescribeFpgaInstancesResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DescribeFpgaInstancesResponse
+		var err error
+		defer close(result)
+		response, err = client.DescribeFpgaInstances(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DescribeFpgaInstancesRequest is the request struct for api DescribeFpgaInstances
+type DescribeFpgaInstancesRequest struct {
+	*requests.RpcRequest
+	InstanceId    string `position:"Query" name:"InstanceId"`
+	SecurityToken string `position:"Query" name:"SecurityToken"`
+	RoleArn       string `position:"Query" name:"RoleArn"`
+}
+
+// DescribeFpgaInstancesResponse is the response struct for api DescribeFpgaInstances
+type DescribeFpgaInstancesResponse struct {
+	*responses.BaseResponse
+	RequestId string    `json:"RequestId" xml:"RequestId"`
+	Instances Instances `json:"Instances" xml:"Instances"`
+}
+
+// CreateDescribeFpgaInstancesRequest creates a request to invoke DescribeFpgaInstances API
+func CreateDescribeFpgaInstancesRequest() (request *DescribeFpgaInstancesRequest) {
+	request = &DescribeFpgaInstancesRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("faas", "2017-08-24", "DescribeFpgaInstances", "faas", "openAPI")
+	return
+}
+
+// CreateDescribeFpgaInstancesResponse creates a response to parse from DescribeFpgaInstances response
+func CreateDescribeFpgaInstancesResponse() (response *DescribeFpgaInstancesResponse) {
+	response = &DescribeFpgaInstancesResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 113 - 0
services/faas/describe_load_task_status.go

@@ -0,0 +1,113 @@
+package faas
+
+//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"
+)
+
+// DescribeLoadTaskStatus invokes the faas.DescribeLoadTaskStatus API synchronously
+// api document: https://help.aliyun.com/api/faas/describeloadtaskstatus.html
+func (client *Client) DescribeLoadTaskStatus(request *DescribeLoadTaskStatusRequest) (response *DescribeLoadTaskStatusResponse, err error) {
+	response = CreateDescribeLoadTaskStatusResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DescribeLoadTaskStatusWithChan invokes the faas.DescribeLoadTaskStatus API asynchronously
+// api document: https://help.aliyun.com/api/faas/describeloadtaskstatus.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeLoadTaskStatusWithChan(request *DescribeLoadTaskStatusRequest) (<-chan *DescribeLoadTaskStatusResponse, <-chan error) {
+	responseChan := make(chan *DescribeLoadTaskStatusResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DescribeLoadTaskStatus(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DescribeLoadTaskStatusWithCallback invokes the faas.DescribeLoadTaskStatus API asynchronously
+// api document: https://help.aliyun.com/api/faas/describeloadtaskstatus.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeLoadTaskStatusWithCallback(request *DescribeLoadTaskStatusRequest, callback func(response *DescribeLoadTaskStatusResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DescribeLoadTaskStatusResponse
+		var err error
+		defer close(result)
+		response, err = client.DescribeLoadTaskStatus(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DescribeLoadTaskStatusRequest is the request struct for api DescribeLoadTaskStatus
+type DescribeLoadTaskStatusRequest struct {
+	*requests.RpcRequest
+	InstanceId    string `position:"Query" name:"InstanceId"`
+	SecurityToken string `position:"Query" name:"SecurityToken"`
+	RoleArn       string `position:"Query" name:"RoleArn"`
+	FpgaUUID      string `position:"Query" name:"FpgaUUID"`
+}
+
+// DescribeLoadTaskStatusResponse is the response struct for api DescribeLoadTaskStatus
+type DescribeLoadTaskStatusResponse struct {
+	*responses.BaseResponse
+	RequestId     string `json:"RequestId" xml:"RequestId"`
+	FpgaUUID      string `json:"FpgaUUID" xml:"FpgaUUID"`
+	ShellUUID     string `json:"shellUUID" xml:"shellUUID"`
+	FpgaImageUUID string `json:"FpgaImageUUID" xml:"FpgaImageUUID"`
+	InstanceId    string `json:"InstanceId" xml:"InstanceId"`
+	CreateTime    string `json:"CreateTime" xml:"CreateTime"`
+	TaskStatus    string `json:"TaskStatus" xml:"TaskStatus"`
+	Encrypted     bool   `json:"Encrypted" xml:"Encrypted"`
+}
+
+// CreateDescribeLoadTaskStatusRequest creates a request to invoke DescribeLoadTaskStatus API
+func CreateDescribeLoadTaskStatusRequest() (request *DescribeLoadTaskStatusRequest) {
+	request = &DescribeLoadTaskStatusRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("faas", "2017-08-24", "DescribeLoadTaskStatus", "faas", "openAPI")
+	return
+}
+
+// CreateDescribeLoadTaskStatusResponse creates a response to parse from DescribeLoadTaskStatus response
+func CreateDescribeLoadTaskStatusResponse() (response *DescribeLoadTaskStatusResponse) {
+	response = &DescribeLoadTaskStatusResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 106 - 0
services/faas/describe_publish_fpga_images.go

@@ -0,0 +1,106 @@
+package faas
+
+//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"
+)
+
+// DescribePublishFpgaImages invokes the faas.DescribePublishFpgaImages API synchronously
+// api document: https://help.aliyun.com/api/faas/describepublishfpgaimages.html
+func (client *Client) DescribePublishFpgaImages(request *DescribePublishFpgaImagesRequest) (response *DescribePublishFpgaImagesResponse, err error) {
+	response = CreateDescribePublishFpgaImagesResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DescribePublishFpgaImagesWithChan invokes the faas.DescribePublishFpgaImages API asynchronously
+// api document: https://help.aliyun.com/api/faas/describepublishfpgaimages.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribePublishFpgaImagesWithChan(request *DescribePublishFpgaImagesRequest) (<-chan *DescribePublishFpgaImagesResponse, <-chan error) {
+	responseChan := make(chan *DescribePublishFpgaImagesResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DescribePublishFpgaImages(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DescribePublishFpgaImagesWithCallback invokes the faas.DescribePublishFpgaImages API asynchronously
+// api document: https://help.aliyun.com/api/faas/describepublishfpgaimages.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribePublishFpgaImagesWithCallback(request *DescribePublishFpgaImagesRequest, callback func(response *DescribePublishFpgaImagesResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DescribePublishFpgaImagesResponse
+		var err error
+		defer close(result)
+		response, err = client.DescribePublishFpgaImages(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DescribePublishFpgaImagesRequest is the request struct for api DescribePublishFpgaImages
+type DescribePublishFpgaImagesRequest struct {
+	*requests.RpcRequest
+	ImageID       string           `position:"Query" name:"ImageID"`
+	SecurityToken string           `position:"Query" name:"SecurityToken"`
+	CallerUid     requests.Integer `position:"Query" name:"callerUid"`
+}
+
+// DescribePublishFpgaImagesResponse is the response struct for api DescribePublishFpgaImages
+type DescribePublishFpgaImagesResponse struct {
+	*responses.BaseResponse
+	RequestId  string                                `json:"RequestId" xml:"RequestId"`
+	FpgaImages FpgaImagesInDescribePublishFpgaImages `json:"FpgaImages" xml:"FpgaImages"`
+}
+
+// CreateDescribePublishFpgaImagesRequest creates a request to invoke DescribePublishFpgaImages API
+func CreateDescribePublishFpgaImagesRequest() (request *DescribePublishFpgaImagesRequest) {
+	request = &DescribePublishFpgaImagesRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("faas", "2017-08-24", "DescribePublishFpgaImages", "faas", "openAPI")
+	return
+}
+
+// CreateDescribePublishFpgaImagesResponse creates a response to parse from DescribePublishFpgaImages response
+func CreateDescribePublishFpgaImagesResponse() (response *DescribePublishFpgaImagesResponse) {
+	response = &DescribePublishFpgaImagesResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 20 - 0
services/faas/endpoint.go

@@ -0,0 +1,20 @@
+package faas
+
+// EndpointMap Endpoint Data
+var EndpointMap map[string]string
+
+// EndpointType regional or central
+var EndpointType = "regional"
+
+// GetEndpointMap Get Endpoint Data Map
+func GetEndpointMap() map[string]string {
+	if EndpointMap == nil {
+		EndpointMap = map[string]string{}
+	}
+	return EndpointMap
+}
+
+// GetEndpointType Get Endpoint Type Value
+func GetEndpointType() string {
+	return EndpointType
+}

+ 116 - 0
services/faas/load_fpga_image_task.go

@@ -0,0 +1,116 @@
+package faas
+
+//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"
+)
+
+// LoadFpgaImageTask invokes the faas.LoadFpgaImageTask API synchronously
+// api document: https://help.aliyun.com/api/faas/loadfpgaimagetask.html
+func (client *Client) LoadFpgaImageTask(request *LoadFpgaImageTaskRequest) (response *LoadFpgaImageTaskResponse, err error) {
+	response = CreateLoadFpgaImageTaskResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// LoadFpgaImageTaskWithChan invokes the faas.LoadFpgaImageTask API asynchronously
+// api document: https://help.aliyun.com/api/faas/loadfpgaimagetask.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) LoadFpgaImageTaskWithChan(request *LoadFpgaImageTaskRequest) (<-chan *LoadFpgaImageTaskResponse, <-chan error) {
+	responseChan := make(chan *LoadFpgaImageTaskResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.LoadFpgaImageTask(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// LoadFpgaImageTaskWithCallback invokes the faas.LoadFpgaImageTask API asynchronously
+// api document: https://help.aliyun.com/api/faas/loadfpgaimagetask.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) LoadFpgaImageTaskWithCallback(request *LoadFpgaImageTaskRequest, callback func(response *LoadFpgaImageTaskResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *LoadFpgaImageTaskResponse
+		var err error
+		defer close(result)
+		response, err = client.LoadFpgaImageTask(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// LoadFpgaImageTaskRequest is the request struct for api LoadFpgaImageTask
+type LoadFpgaImageTaskRequest struct {
+	*requests.RpcRequest
+	FpgaImageType string `position:"Query" name:"FpgaImageType"`
+	FpgaImageUUID string `position:"Query" name:"FpgaImageUUID"`
+	SecurityToken string `position:"Query" name:"SecurityToken"`
+	FpgaType      string `position:"Query" name:"FpgaType"`
+	FpgaUUID      string `position:"Query" name:"FpgaUUID"`
+	ShellUUID     string `position:"Query" name:"ShellUUID"`
+	OwnerAlias    string `position:"Query" name:"OwnerAlias"`
+	InstanceId    string `position:"Query" name:"InstanceId"`
+	RoleArn       string `position:"Query" name:"RoleArn"`
+	Object        string `position:"Query" name:"Object"`
+}
+
+// LoadFpgaImageTaskResponse is the response struct for api LoadFpgaImageTask
+type LoadFpgaImageTaskResponse struct {
+	*responses.BaseResponse
+	RequestId     string `json:"RequestId" xml:"RequestId"`
+	FpgaUUID      string `json:"FpgaUUID" xml:"FpgaUUID"`
+	FpgaImageUUID string `json:"FpgaImageUUID" xml:"FpgaImageUUID"`
+	InstanceId    string `json:"InstanceId" xml:"InstanceId"`
+	TaskStatus    string `json:"TaskStatus" xml:"TaskStatus"`
+}
+
+// CreateLoadFpgaImageTaskRequest creates a request to invoke LoadFpgaImageTask API
+func CreateLoadFpgaImageTaskRequest() (request *LoadFpgaImageTaskRequest) {
+	request = &LoadFpgaImageTaskRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("faas", "2017-08-24", "LoadFpgaImageTask", "faas", "openAPI")
+	return
+}
+
+// CreateLoadFpgaImageTaskResponse creates a response to parse from LoadFpgaImageTask response
+func CreateLoadFpgaImageTaskResponse() (response *LoadFpgaImageTaskResponse) {
+	response = &LoadFpgaImageTaskResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 107 - 0
services/faas/publish_fpga_image.go

@@ -0,0 +1,107 @@
+package faas
+
+//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"
+)
+
+// PublishFpgaImage invokes the faas.PublishFpgaImage API synchronously
+// api document: https://help.aliyun.com/api/faas/publishfpgaimage.html
+func (client *Client) PublishFpgaImage(request *PublishFpgaImageRequest) (response *PublishFpgaImageResponse, err error) {
+	response = CreatePublishFpgaImageResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// PublishFpgaImageWithChan invokes the faas.PublishFpgaImage API asynchronously
+// api document: https://help.aliyun.com/api/faas/publishfpgaimage.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) PublishFpgaImageWithChan(request *PublishFpgaImageRequest) (<-chan *PublishFpgaImageResponse, <-chan error) {
+	responseChan := make(chan *PublishFpgaImageResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.PublishFpgaImage(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// PublishFpgaImageWithCallback invokes the faas.PublishFpgaImage API asynchronously
+// api document: https://help.aliyun.com/api/faas/publishfpgaimage.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) PublishFpgaImageWithCallback(request *PublishFpgaImageRequest, callback func(response *PublishFpgaImageResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *PublishFpgaImageResponse
+		var err error
+		defer close(result)
+		response, err = client.PublishFpgaImage(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// PublishFpgaImageRequest is the request struct for api PublishFpgaImage
+type PublishFpgaImageRequest struct {
+	*requests.RpcRequest
+	ImageID       string           `position:"Query" name:"ImageID"`
+	FpgaImageUUID string           `position:"Query" name:"FpgaImageUUID"`
+	CallerUid     requests.Integer `position:"Query" name:"callerUid"`
+}
+
+// PublishFpgaImageResponse is the response struct for api PublishFpgaImage
+type PublishFpgaImageResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	Status    string `json:"Status" xml:"Status"`
+	Message   string `json:"Message" xml:"Message"`
+}
+
+// CreatePublishFpgaImageRequest creates a request to invoke PublishFpgaImage API
+func CreatePublishFpgaImageRequest() (request *PublishFpgaImageRequest) {
+	request = &PublishFpgaImageRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("faas", "2017-08-24", "PublishFpgaImage", "faas", "openAPI")
+	return
+}
+
+// CreatePublishFpgaImageResponse creates a response to parse from PublishFpgaImage response
+func CreatePublishFpgaImageResponse() (response *PublishFpgaImageResponse) {
+	response = &PublishFpgaImageResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 105 - 0
services/faas/pull_create_task.go

@@ -0,0 +1,105 @@
+package faas
+
+//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"
+)
+
+// PullCreateTask invokes the faas.PullCreateTask API synchronously
+// api document: https://help.aliyun.com/api/faas/pullcreatetask.html
+func (client *Client) PullCreateTask(request *PullCreateTaskRequest) (response *PullCreateTaskResponse, err error) {
+	response = CreatePullCreateTaskResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// PullCreateTaskWithChan invokes the faas.PullCreateTask API asynchronously
+// api document: https://help.aliyun.com/api/faas/pullcreatetask.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) PullCreateTaskWithChan(request *PullCreateTaskRequest) (<-chan *PullCreateTaskResponse, <-chan error) {
+	responseChan := make(chan *PullCreateTaskResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.PullCreateTask(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// PullCreateTaskWithCallback invokes the faas.PullCreateTask API asynchronously
+// api document: https://help.aliyun.com/api/faas/pullcreatetask.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) PullCreateTaskWithCallback(request *PullCreateTaskRequest, callback func(response *PullCreateTaskResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *PullCreateTaskResponse
+		var err error
+		defer close(result)
+		response, err = client.PullCreateTask(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// PullCreateTaskRequest is the request struct for api PullCreateTask
+type PullCreateTaskRequest struct {
+	*requests.RpcRequest
+}
+
+// PullCreateTaskResponse is the response struct for api PullCreateTask
+type PullCreateTaskResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	Message   string `json:"Message" xml:"Message"`
+	Status    string `json:"Status" xml:"Status"`
+	Data      Data   `json:"Data" xml:"Data"`
+}
+
+// CreatePullCreateTaskRequest creates a request to invoke PullCreateTask API
+func CreatePullCreateTaskRequest() (request *PullCreateTaskRequest) {
+	request = &PullCreateTaskRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("faas", "2017-08-24", "PullCreateTask", "faas", "openAPI")
+	return
+}
+
+// CreatePullCreateTaskResponse creates a response to parse from PullCreateTask response
+func CreatePullCreateTaskResponse() (response *PullCreateTaskResponse) {
+	response = &PullCreateTaskResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 31 - 0
services/faas/struct_data.go

@@ -0,0 +1,31 @@
+package faas
+
+//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.
+
+// Data is a nested struct in faas response
+type Data struct {
+	AliyunId       string `json:"AliyunId" xml:"AliyunId"`
+	CallerParentId string `json:"CallerParentId" xml:"CallerParentId"`
+	FpgaImageUUID  string `json:"FpgaImageUUID" xml:"FpgaImageUUID"`
+	FpgaType       string `json:"FpgaType" xml:"FpgaType"`
+	Bucket         string `json:"Bucket" xml:"Bucket"`
+	Object         string `json:"Object" xml:"Object"`
+	ShellUUID      string `json:"ShellUUID" xml:"ShellUUID"`
+	RoleArn        string `json:"RoleArn" xml:"RoleArn"`
+	Encrypted      bool   `json:"Encrypted" xml:"Encrypted"`
+	KeyId          string `json:"KeyId" xml:"KeyId"`
+	Email          string `json:"Email" xml:"Email"`
+}

+ 31 - 0
services/faas/struct_fpga_image.go

@@ -0,0 +1,31 @@
+package faas
+
+//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.
+
+// FpgaImage is a nested struct in faas response
+type FpgaImage struct {
+	Name          string `json:"Name" xml:"Name"`
+	Tags          string `json:"Tags" xml:"Tags"`
+	State         string `json:"State" xml:"State"`
+	OwnerAlias    string `json:"OwnerAlias" xml:"OwnerAlias"`
+	UpdateTime    string `json:"UpdateTime" xml:"UpdateTime"`
+	FpgaImageUUID string `json:"FpgaImageUUID" xml:"FpgaImageUUID"`
+	CreateTime    string `json:"CreateTime" xml:"CreateTime"`
+	PublishTime   string `json:"PublishTime" xml:"PublishTime"`
+	Description   string `json:"Description" xml:"Description"`
+	ShellUUID     string `json:"ShellUUID" xml:"ShellUUID"`
+	Encrypted     bool   `json:"Encrypted" xml:"Encrypted"`
+}

+ 21 - 0
services/faas/struct_fpga_images_in_describe_fpga_images.go

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

+ 21 - 0
services/faas/struct_fpga_images_in_describe_publish_fpga_images.go

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

+ 28 - 0
services/faas/struct_instance.go

@@ -0,0 +1,28 @@
+package faas
+
+//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.
+
+// Instance is a nested struct in faas response
+type Instance struct {
+	FpgaUUID      string `json:"FpgaUUID" xml:"FpgaUUID"`
+	InstanceId    string `json:"InstanceId" xml:"InstanceId"`
+	ShellUUID     string `json:"ShellUUID" xml:"ShellUUID"`
+	FpgaStatus    string `json:"FpgaStatus" xml:"FpgaStatus"`
+	FpgaImageUUID string `json:"FpgaImageUUID" xml:"FpgaImageUUID"`
+	DeviceId      string `json:"DeviceId" xml:"DeviceId"`
+	DeviceBDF     string `json:"DeviceBDF" xml:"DeviceBDF"`
+	FpgaType      string `json:"FpgaType" xml:"FpgaType"`
+}

+ 21 - 0
services/faas/struct_instances.go

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

+ 108 - 0
services/faas/update_create_task.go

@@ -0,0 +1,108 @@
+package faas
+
+//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"
+)
+
+// UpdateCreateTask invokes the faas.UpdateCreateTask API synchronously
+// api document: https://help.aliyun.com/api/faas/updatecreatetask.html
+func (client *Client) UpdateCreateTask(request *UpdateCreateTaskRequest) (response *UpdateCreateTaskResponse, err error) {
+	response = CreateUpdateCreateTaskResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// UpdateCreateTaskWithChan invokes the faas.UpdateCreateTask API asynchronously
+// api document: https://help.aliyun.com/api/faas/updatecreatetask.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UpdateCreateTaskWithChan(request *UpdateCreateTaskRequest) (<-chan *UpdateCreateTaskResponse, <-chan error) {
+	responseChan := make(chan *UpdateCreateTaskResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.UpdateCreateTask(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// UpdateCreateTaskWithCallback invokes the faas.UpdateCreateTask API asynchronously
+// api document: https://help.aliyun.com/api/faas/updatecreatetask.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UpdateCreateTaskWithCallback(request *UpdateCreateTaskRequest, callback func(response *UpdateCreateTaskResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *UpdateCreateTaskResponse
+		var err error
+		defer close(result)
+		response, err = client.UpdateCreateTask(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// UpdateCreateTaskRequest is the request struct for api UpdateCreateTask
+type UpdateCreateTaskRequest struct {
+	*requests.RpcRequest
+	State               string           `position:"Query" name:"State"`
+	OwnerId             requests.Integer `position:"Query" name:"OwnerId"`
+	FpgaImageObjectName string           `position:"Query" name:"FpgaImageObjectName"`
+	FpgaImageUUID       string           `position:"Query" name:"FpgaImageUUID"`
+	CallerUid           requests.Integer `position:"Query" name:"callerUid"`
+}
+
+// UpdateCreateTaskResponse is the response struct for api UpdateCreateTask
+type UpdateCreateTaskResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	Message   string `json:"Message" xml:"Message"`
+}
+
+// CreateUpdateCreateTaskRequest creates a request to invoke UpdateCreateTask API
+func CreateUpdateCreateTaskRequest() (request *UpdateCreateTaskRequest) {
+	request = &UpdateCreateTaskRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("faas", "2017-08-24", "UpdateCreateTask", "faas", "openAPI")
+	return
+}
+
+// CreateUpdateCreateTaskResponse creates a response to parse from UpdateCreateTask response
+func CreateUpdateCreateTaskResponse() (response *UpdateCreateTaskResponse) {
+	response = &UpdateCreateTaskResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 108 - 0
services/faas/update_image_attribute.go

@@ -0,0 +1,108 @@
+package faas
+
+//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"
+)
+
+// UpdateImageAttribute invokes the faas.UpdateImageAttribute API synchronously
+// api document: https://help.aliyun.com/api/faas/updateimageattribute.html
+func (client *Client) UpdateImageAttribute(request *UpdateImageAttributeRequest) (response *UpdateImageAttributeResponse, err error) {
+	response = CreateUpdateImageAttributeResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// UpdateImageAttributeWithChan invokes the faas.UpdateImageAttribute API asynchronously
+// api document: https://help.aliyun.com/api/faas/updateimageattribute.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UpdateImageAttributeWithChan(request *UpdateImageAttributeRequest) (<-chan *UpdateImageAttributeResponse, <-chan error) {
+	responseChan := make(chan *UpdateImageAttributeResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.UpdateImageAttribute(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// UpdateImageAttributeWithCallback invokes the faas.UpdateImageAttribute API asynchronously
+// api document: https://help.aliyun.com/api/faas/updateimageattribute.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UpdateImageAttributeWithCallback(request *UpdateImageAttributeRequest, callback func(response *UpdateImageAttributeResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *UpdateImageAttributeResponse
+		var err error
+		defer close(result)
+		response, err = client.UpdateImageAttribute(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// UpdateImageAttributeRequest is the request struct for api UpdateImageAttribute
+type UpdateImageAttributeRequest struct {
+	*requests.RpcRequest
+	Name          string           `position:"Query" name:"Name"`
+	Description   string           `position:"Query" name:"Description"`
+	FpgaImageUUID string           `position:"Query" name:"FpgaImageUUID"`
+	CallerUid     requests.Integer `position:"Query" name:"callerUid"`
+	Tags          string           `position:"Query" name:"Tags"`
+}
+
+// UpdateImageAttributeResponse is the response struct for api UpdateImageAttribute
+type UpdateImageAttributeResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	Message   string `json:"Message" xml:"Message"`
+}
+
+// CreateUpdateImageAttributeRequest creates a request to invoke UpdateImageAttribute API
+func CreateUpdateImageAttributeRequest() (request *UpdateImageAttributeRequest) {
+	request = &UpdateImageAttributeRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("faas", "2017-08-24", "UpdateImageAttribute", "faas", "openAPI")
+	return
+}
+
+// CreateUpdateImageAttributeResponse creates a response to parse from UpdateImageAttribute response
+func CreateUpdateImageAttributeResponse() (response *UpdateImageAttributeResponse) {
+	response = &UpdateImageAttributeResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}