瀏覽代碼

由荣旸发起的TESLAMAXCOMPUTE SDK自动发布, BUILD_ID=231, 版本号:0.7.3

Signed-off-by: haowei.yao <haowei.yao@alibaba-inc.com>
haowei.yao 8 年之前
父節點
當前提交
d2ff480d59

+ 3 - 0
ChangeLog.txt

@@ -1,3 +1,6 @@
+2018-01-04 Version: 0.7.3
+1, Remove get entity info API, replaced by get entity instance.
+
 2017-12-29 Version: 0.7.0
 1, First release for Domain-intl.
 2, Add interfaces for domain name registration and management.

+ 43 - 0
services/teslamaxcompute/client.go

@@ -0,0 +1,43 @@
+package teslamaxcompute
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth"
+)
+
+type Client struct {
+	sdk.Client
+}
+
+func NewClient() (client *Client, err error) {
+	client = &Client{}
+	err = client.Init()
+	return
+}
+
+func NewClientWithOptions(regionId string, config *sdk.Config, credential auth.Credential) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithOptions(regionId, config, credential)
+	return
+}
+
+func NewClientWithAccessKey(regionId, accessKeyId, accessKeySecret string) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithAccessKey(regionId, accessKeyId, accessKeySecret)
+	return
+}

+ 120 - 0
services/teslamaxcompute/get_cluster_instance.go

@@ -0,0 +1,120 @@
+package teslamaxcompute
+
+//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"
+)
+
+func (client *Client) GetClusterInstance(request *GetClusterInstanceRequest) (response *GetClusterInstanceResponse, err error) {
+	response = CreateGetClusterInstanceResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+func (client *Client) GetClusterInstanceWithChan(request *GetClusterInstanceRequest) (<-chan *GetClusterInstanceResponse, <-chan error) {
+	responseChan := make(chan *GetClusterInstanceResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.GetClusterInstance(request)
+		responseChan <- response
+		errChan <- err
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+func (client *Client) GetClusterInstanceWithCallback(request *GetClusterInstanceRequest, callback func(response *GetClusterInstanceResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *GetClusterInstanceResponse
+		var err error
+		defer close(result)
+		response, err = client.GetClusterInstance(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+type GetClusterInstanceRequest struct {
+	*requests.RpcRequest
+	Cluster  string           `position:"Query" name:"Cluster"`
+	PageSize requests.Integer `position:"Query" name:"PageSize"`
+	PageNum  requests.Integer `position:"Query" name:"PageNum"`
+	Region   string           `position:"Query" name:"Region"`
+	Status   string           `position:"Query" name:"Status"`
+}
+
+type GetClusterInstanceResponse struct {
+	*responses.BaseResponse
+	Code      int    `json:"Code" xml:"Code"`
+	Message   string `json:"Message" xml:"Message"`
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	Data      struct {
+		Total  int `json:"Total" xml:"Total"`
+		Detail []struct {
+			Project         string  `json:"Project" xml:"Project"`
+			InstanceId      string  `json:"InstanceId" xml:"InstanceId"`
+			Status          string  `json:"Status" xml:"Status"`
+			UserAccount     string  `json:"UserAccount" xml:"UserAccount"`
+			NickName        string  `json:"NickName" xml:"NickName"`
+			Cluster         string  `json:"Cluster" xml:"Cluster"`
+			RunTime         string  `json:"RunTime" xml:"RunTime"`
+			CpuUsed         int     `json:"CpuUsed" xml:"CpuUsed"`
+			CpuRequest      int     `json:"CpuRequest" xml:"CpuRequest"`
+			CpuUsedTotal    int     `json:"CpuUsedTotal" xml:"CpuUsedTotal"`
+			CpuUsedRatioMax float64 `json:"CpuUsedRatioMax" xml:"CpuUsedRatioMax"`
+			CpuUsedRatioMin float64 `json:"CpuUsedRatioMin" xml:"CpuUsedRatioMin"`
+			MemUsed         int     `json:"MemUsed" xml:"MemUsed"`
+			MemRequest      int     `json:"MemRequest" xml:"MemRequest"`
+			MemUsedTotal    int     `json:"MemUsedTotal" xml:"MemUsedTotal"`
+			MemUsedRatioMax float64 `json:"MemUsedRatioMax" xml:"MemUsedRatioMax"`
+			MemUsedRatioMin float64 `json:"MemUsedRatioMin" xml:"MemUsedRatioMin"`
+			TaskType        string  `json:"TaskType" xml:"TaskType"`
+			SkynetId        string  `json:"SkynetId" xml:"SkynetId"`
+			QuotaName       string  `json:"QuotaName" xml:"QuotaName"`
+			QuotaId         int     `json:"QuotaId" xml:"QuotaId"`
+		} `json:"Detail" xml:"Detail"`
+	} `json:"Data" xml:"Data"`
+}
+
+func CreateGetClusterInstanceRequest() (request *GetClusterInstanceRequest) {
+	request = &GetClusterInstanceRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("TeslaMaxCompute", "2018-01-04", "GetClusterInstance", "", "")
+	return
+}
+
+func CreateGetClusterInstanceResponse() (response *GetClusterInstanceResponse) {
+	response = &GetClusterInstanceResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 95 - 0
services/teslamaxcompute/get_instances_status_count.go

@@ -0,0 +1,95 @@
+package teslamaxcompute
+
+//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"
+)
+
+func (client *Client) GetInstancesStatusCount(request *GetInstancesStatusCountRequest) (response *GetInstancesStatusCountResponse, err error) {
+	response = CreateGetInstancesStatusCountResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+func (client *Client) GetInstancesStatusCountWithChan(request *GetInstancesStatusCountRequest) (<-chan *GetInstancesStatusCountResponse, <-chan error) {
+	responseChan := make(chan *GetInstancesStatusCountResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.GetInstancesStatusCount(request)
+		responseChan <- response
+		errChan <- err
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+func (client *Client) GetInstancesStatusCountWithCallback(request *GetInstancesStatusCountRequest, callback func(response *GetInstancesStatusCountResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *GetInstancesStatusCountResponse
+		var err error
+		defer close(result)
+		response, err = client.GetInstancesStatusCount(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+type GetInstancesStatusCountRequest struct {
+	*requests.RpcRequest
+	Cluster string `position:"Query" name:"Cluster"`
+	Region  string `position:"Query" name:"Region"`
+}
+
+type GetInstancesStatusCountResponse struct {
+	*responses.BaseResponse
+	Code      int    `json:"Code" xml:"Code"`
+	Message   string `json:"Message" xml:"Message"`
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	Data      []struct {
+		Status string `json:"Status" xml:"Status"`
+		Size   int    `json:"Size" xml:"Size"`
+	} `json:"Data" xml:"Data"`
+}
+
+func CreateGetInstancesStatusCountRequest() (request *GetInstancesStatusCountRequest) {
+	request = &GetInstancesStatusCountRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("TeslaMaxCompute", "2018-01-04", "GetInstancesStatusCount", "", "")
+	return
+}
+
+func CreateGetInstancesStatusCountResponse() (response *GetInstancesStatusCountResponse) {
+	response = &GetInstancesStatusCountResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 120 - 0
services/teslamaxcompute/get_project_instance.go

@@ -0,0 +1,120 @@
+package teslamaxcompute
+
+//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"
+)
+
+func (client *Client) GetProjectInstance(request *GetProjectInstanceRequest) (response *GetProjectInstanceResponse, err error) {
+	response = CreateGetProjectInstanceResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+func (client *Client) GetProjectInstanceWithChan(request *GetProjectInstanceRequest) (<-chan *GetProjectInstanceResponse, <-chan error) {
+	responseChan := make(chan *GetProjectInstanceResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.GetProjectInstance(request)
+		responseChan <- response
+		errChan <- err
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+func (client *Client) GetProjectInstanceWithCallback(request *GetProjectInstanceRequest, callback func(response *GetProjectInstanceResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *GetProjectInstanceResponse
+		var err error
+		defer close(result)
+		response, err = client.GetProjectInstance(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+type GetProjectInstanceRequest struct {
+	*requests.RpcRequest
+	PageSize requests.Integer `position:"Query" name:"PageSize"`
+	Project  string           `position:"Query" name:"Project"`
+	PageNum  requests.Integer `position:"Query" name:"PageNum"`
+	Region   string           `position:"Query" name:"Region"`
+	Status   string           `position:"Query" name:"Status"`
+}
+
+type GetProjectInstanceResponse struct {
+	*responses.BaseResponse
+	Code      int    `json:"Code" xml:"Code"`
+	Message   string `json:"Message" xml:"Message"`
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	Data      struct {
+		Total  int `json:"Total" xml:"Total"`
+		Detail []struct {
+			Project         string  `json:"Project" xml:"Project"`
+			InstanceId      string  `json:"InstanceId" xml:"InstanceId"`
+			Status          string  `json:"Status" xml:"Status"`
+			UserAccount     string  `json:"UserAccount" xml:"UserAccount"`
+			NickName        string  `json:"NickName" xml:"NickName"`
+			Cluster         string  `json:"Cluster" xml:"Cluster"`
+			RunTime         string  `json:"RunTime" xml:"RunTime"`
+			CpuUsed         int     `json:"CpuUsed" xml:"CpuUsed"`
+			CpuRequest      int     `json:"CpuRequest" xml:"CpuRequest"`
+			CpuUsedTotal    int     `json:"CpuUsedTotal" xml:"CpuUsedTotal"`
+			CpuUsedRatioMax float64 `json:"CpuUsedRatioMax" xml:"CpuUsedRatioMax"`
+			CpuUsedRatioMin float64 `json:"CpuUsedRatioMin" xml:"CpuUsedRatioMin"`
+			MemUsed         int     `json:"MemUsed" xml:"MemUsed"`
+			MemRequest      int     `json:"MemRequest" xml:"MemRequest"`
+			MemUsedTotal    int     `json:"MemUsedTotal" xml:"MemUsedTotal"`
+			MemUsedRatioMax float64 `json:"MemUsedRatioMax" xml:"MemUsedRatioMax"`
+			MemUsedRatioMin float64 `json:"MemUsedRatioMin" xml:"MemUsedRatioMin"`
+			TaskType        string  `json:"TaskType" xml:"TaskType"`
+			SkynetId        string  `json:"SkynetId" xml:"SkynetId"`
+			QuotaName       string  `json:"QuotaName" xml:"QuotaName"`
+			QuotaId         int     `json:"QuotaId" xml:"QuotaId"`
+		} `json:"Detail" xml:"Detail"`
+	} `json:"Data" xml:"Data"`
+}
+
+func CreateGetProjectInstanceRequest() (request *GetProjectInstanceRequest) {
+	request = &GetProjectInstanceRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("TeslaMaxCompute", "2018-01-04", "GetProjectInstance", "", "")
+	return
+}
+
+func CreateGetProjectInstanceResponse() (response *GetProjectInstanceResponse) {
+	response = &GetProjectInstanceResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 119 - 0
services/teslamaxcompute/get_quota_history_info.go

@@ -0,0 +1,119 @@
+package teslamaxcompute
+
+//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"
+)
+
+func (client *Client) GetQuotaHistoryInfo(request *GetQuotaHistoryInfoRequest) (response *GetQuotaHistoryInfoResponse, err error) {
+	response = CreateGetQuotaHistoryInfoResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+func (client *Client) GetQuotaHistoryInfoWithChan(request *GetQuotaHistoryInfoRequest) (<-chan *GetQuotaHistoryInfoResponse, <-chan error) {
+	responseChan := make(chan *GetQuotaHistoryInfoResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.GetQuotaHistoryInfo(request)
+		responseChan <- response
+		errChan <- err
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+func (client *Client) GetQuotaHistoryInfoWithCallback(request *GetQuotaHistoryInfoRequest, callback func(response *GetQuotaHistoryInfoResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *GetQuotaHistoryInfoResponse
+		var err error
+		defer close(result)
+		response, err = client.GetQuotaHistoryInfo(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+type GetQuotaHistoryInfoRequest struct {
+	*requests.RpcRequest
+	Cluster   string           `position:"Query" name:"Cluster"`
+	EndTime   requests.Integer `position:"Query" name:"EndTime"`
+	StartTime requests.Integer `position:"Query" name:"StartTime"`
+	Region    string           `position:"Query" name:"Region"`
+	QuotaName string           `position:"Query" name:"QuotaName"`
+}
+
+type GetQuotaHistoryInfoResponse struct {
+	*responses.BaseResponse
+	Code      int    `json:"Code" xml:"Code"`
+	Message   string `json:"Message" xml:"Message"`
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	Data      []struct {
+		Times int `json:"Times" xml:"Times"`
+		Point struct {
+			CpuMaxQuota struct {
+				Min int `json:"Min" xml:"Min"`
+				Max int `json:"Max" xml:"Max"`
+				Avg int `json:"Avg" xml:"Avg"`
+			} `json:"CpuMaxQuota" xml:"CpuMaxQuota"`
+			CpuMinQuota struct {
+				Min int `json:"Min" xml:"Min"`
+				Max int `json:"Max" xml:"Max"`
+				Avg int `json:"Avg" xml:"Avg"`
+			} `json:"CpuMinQuota" xml:"CpuMinQuota"`
+			MemUsed struct {
+				Min int `json:"Min" xml:"Min"`
+				Max int `json:"Max" xml:"Max"`
+				Avg int `json:"Avg" xml:"Avg"`
+			} `json:"MemUsed" xml:"MemUsed"`
+			CpuUsed struct {
+				Min int `json:"Min" xml:"Min"`
+				Max int `json:"Max" xml:"Max"`
+				Avg int `json:"Avg" xml:"Avg"`
+			} `json:"CpuUsed" xml:"CpuUsed"`
+		} `json:"Point" xml:"Point"`
+	} `json:"Data" xml:"Data"`
+}
+
+func CreateGetQuotaHistoryInfoRequest() (request *GetQuotaHistoryInfoRequest) {
+	request = &GetQuotaHistoryInfoRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("TeslaMaxCompute", "2018-01-04", "GetQuotaHistoryInfo", "", "")
+	return
+}
+
+func CreateGetQuotaHistoryInfoResponse() (response *GetQuotaHistoryInfoResponse) {
+	response = &GetQuotaHistoryInfoResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 120 - 0
services/teslamaxcompute/get_quota_instance.go

@@ -0,0 +1,120 @@
+package teslamaxcompute
+
+//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"
+)
+
+func (client *Client) GetQuotaInstance(request *GetQuotaInstanceRequest) (response *GetQuotaInstanceResponse, err error) {
+	response = CreateGetQuotaInstanceResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+func (client *Client) GetQuotaInstanceWithChan(request *GetQuotaInstanceRequest) (<-chan *GetQuotaInstanceResponse, <-chan error) {
+	responseChan := make(chan *GetQuotaInstanceResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.GetQuotaInstance(request)
+		responseChan <- response
+		errChan <- err
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+func (client *Client) GetQuotaInstanceWithCallback(request *GetQuotaInstanceRequest, callback func(response *GetQuotaInstanceResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *GetQuotaInstanceResponse
+		var err error
+		defer close(result)
+		response, err = client.GetQuotaInstance(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+type GetQuotaInstanceRequest struct {
+	*requests.RpcRequest
+	Cluster  string           `position:"Query" name:"Cluster"`
+	PageSize requests.Integer `position:"Query" name:"PageSize"`
+	QuotaId  string           `position:"Query" name:"QuotaId"`
+	PageNum  requests.Integer `position:"Query" name:"PageNum"`
+	Status   string           `position:"Query" name:"Status"`
+}
+
+type GetQuotaInstanceResponse struct {
+	*responses.BaseResponse
+	Code      int    `json:"Code" xml:"Code"`
+	Message   string `json:"Message" xml:"Message"`
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	Data      struct {
+		Total  int `json:"Total" xml:"Total"`
+		Detail []struct {
+			Project         string  `json:"Project" xml:"Project"`
+			InstanceId      string  `json:"InstanceId" xml:"InstanceId"`
+			Status          string  `json:"Status" xml:"Status"`
+			UserAccount     string  `json:"UserAccount" xml:"UserAccount"`
+			NickName        string  `json:"NickName" xml:"NickName"`
+			Cluster         string  `json:"Cluster" xml:"Cluster"`
+			RunTime         string  `json:"RunTime" xml:"RunTime"`
+			CpuUsed         int     `json:"CpuUsed" xml:"CpuUsed"`
+			CpuRequest      int     `json:"CpuRequest" xml:"CpuRequest"`
+			CpuUsedTotal    int     `json:"CpuUsedTotal" xml:"CpuUsedTotal"`
+			CpuUsedRatioMax float64 `json:"CpuUsedRatioMax" xml:"CpuUsedRatioMax"`
+			CpuUsedRatioMin float64 `json:"CpuUsedRatioMin" xml:"CpuUsedRatioMin"`
+			MemUsed         int     `json:"MemUsed" xml:"MemUsed"`
+			MemRequest      int     `json:"MemRequest" xml:"MemRequest"`
+			MemUsedTotal    int     `json:"MemUsedTotal" xml:"MemUsedTotal"`
+			MemUsedRatioMax float64 `json:"MemUsedRatioMax" xml:"MemUsedRatioMax"`
+			MemUsedRatioMin float64 `json:"MemUsedRatioMin" xml:"MemUsedRatioMin"`
+			TaskType        string  `json:"TaskType" xml:"TaskType"`
+			SkynetId        string  `json:"SkynetId" xml:"SkynetId"`
+			QuotaName       string  `json:"QuotaName" xml:"QuotaName"`
+			QuotaId         int     `json:"QuotaId" xml:"QuotaId"`
+		} `json:"Detail" xml:"Detail"`
+	} `json:"Data" xml:"Data"`
+}
+
+func CreateGetQuotaInstanceRequest() (request *GetQuotaInstanceRequest) {
+	request = &GetQuotaInstanceRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("TeslaMaxCompute", "2018-01-04", "GetQuotaInstance", "", "")
+	return
+}
+
+func CreateGetQuotaInstanceResponse() (response *GetQuotaInstanceResponse) {
+	response = &GetQuotaInstanceResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 120 - 0
services/teslamaxcompute/get_user_instance.go

@@ -0,0 +1,120 @@
+package teslamaxcompute
+
+//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"
+)
+
+func (client *Client) GetUserInstance(request *GetUserInstanceRequest) (response *GetUserInstanceResponse, err error) {
+	response = CreateGetUserInstanceResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+func (client *Client) GetUserInstanceWithChan(request *GetUserInstanceRequest) (<-chan *GetUserInstanceResponse, <-chan error) {
+	responseChan := make(chan *GetUserInstanceResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.GetUserInstance(request)
+		responseChan <- response
+		errChan <- err
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+func (client *Client) GetUserInstanceWithCallback(request *GetUserInstanceRequest, callback func(response *GetUserInstanceResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *GetUserInstanceResponse
+		var err error
+		defer close(result)
+		response, err = client.GetUserInstance(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+type GetUserInstanceRequest struct {
+	*requests.RpcRequest
+	PageSize requests.Integer `position:"Query" name:"PageSize"`
+	PageNum  requests.Integer `position:"Query" name:"PageNum"`
+	Region   string           `position:"Query" name:"Region"`
+	User     string           `position:"Query" name:"User"`
+	Status   string           `position:"Query" name:"Status"`
+}
+
+type GetUserInstanceResponse struct {
+	*responses.BaseResponse
+	Code      int    `json:"Code" xml:"Code"`
+	Message   string `json:"Message" xml:"Message"`
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	Data      struct {
+		Total  int `json:"Total" xml:"Total"`
+		Detail []struct {
+			Project         string  `json:"Project" xml:"Project"`
+			InstanceId      string  `json:"InstanceId" xml:"InstanceId"`
+			Status          string  `json:"Status" xml:"Status"`
+			UserAccount     string  `json:"UserAccount" xml:"UserAccount"`
+			NickName        string  `json:"NickName" xml:"NickName"`
+			Cluster         string  `json:"Cluster" xml:"Cluster"`
+			RunTime         string  `json:"RunTime" xml:"RunTime"`
+			CpuUsed         int     `json:"CpuUsed" xml:"CpuUsed"`
+			CpuRequest      int     `json:"CpuRequest" xml:"CpuRequest"`
+			CpuUsedTotal    int     `json:"CpuUsedTotal" xml:"CpuUsedTotal"`
+			CpuUsedRatioMax float64 `json:"CpuUsedRatioMax" xml:"CpuUsedRatioMax"`
+			CpuUsedRatioMin float64 `json:"CpuUsedRatioMin" xml:"CpuUsedRatioMin"`
+			MemUsed         int     `json:"MemUsed" xml:"MemUsed"`
+			MemRequest      int     `json:"MemRequest" xml:"MemRequest"`
+			MemUsedTotal    int     `json:"MemUsedTotal" xml:"MemUsedTotal"`
+			MemUsedRatioMax float64 `json:"MemUsedRatioMax" xml:"MemUsedRatioMax"`
+			MemUsedRatioMin float64 `json:"MemUsedRatioMin" xml:"MemUsedRatioMin"`
+			TaskType        string  `json:"TaskType" xml:"TaskType"`
+			SkynetId        string  `json:"SkynetId" xml:"SkynetId"`
+			QuotaName       string  `json:"QuotaName" xml:"QuotaName"`
+			QuotaId         int     `json:"QuotaId" xml:"QuotaId"`
+		} `json:"Detail" xml:"Detail"`
+	} `json:"Data" xml:"Data"`
+}
+
+func CreateGetUserInstanceRequest() (request *GetUserInstanceRequest) {
+	request = &GetUserInstanceRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("TeslaMaxCompute", "2018-01-04", "GetUserInstance", "", "")
+	return
+}
+
+func CreateGetUserInstanceResponse() (response *GetUserInstanceResponse) {
+	response = &GetUserInstanceResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}