Browse Source

Support TAG API.

sdk-team 5 years ago
parent
commit
3c55fa08c9
35 changed files with 1288 additions and 84 deletions
  1. 3 0
      ChangeLog.txt
  2. 3 2
      services/oos/create_template.go
  3. 2 1
      services/oos/delete_template.go
  4. 104 0
      services/oos/delete_templates.go
  5. 104 0
      services/oos/describe_regions.go
  6. 1 1
      services/oos/list_actions.go
  7. 6 3
      services/oos/list_execution_logs.go
  8. 104 0
      services/oos/list_execution_risky_tasks.go
  9. 18 16
      services/oos/list_executions.go
  10. 108 0
      services/oos/list_tag_keys.go
  11. 108 0
      services/oos/list_tag_resources.go
  12. 109 0
      services/oos/list_tag_values.go
  13. 4 4
      services/oos/list_task_executions.go
  14. 13 10
      services/oos/list_templates.go
  15. 4 2
      services/oos/notify_execution.go
  16. 10 6
      services/oos/start_execution.go
  17. 26 20
      services/oos/struct_execution.go
  18. 4 2
      services/oos/struct_execution_log.go
  19. 21 0
      services/oos/struct_keys.go
  20. 23 0
      services/oos/struct_region.go
  21. 21 0
      services/oos/struct_regions.go
  22. 24 0
      services/oos/struct_risky_task.go
  23. 21 0
      services/oos/struct_risky_tasks.go
  24. 24 0
      services/oos/struct_tag_resource.go
  25. 21 0
      services/oos/struct_tag_resources.go
  26. 2 2
      services/oos/struct_task.go
  27. 1 0
      services/oos/struct_task_execution.go
  28. 21 0
      services/oos/struct_task_in_list_execution_risky_tasks.go
  29. 16 13
      services/oos/struct_template.go
  30. 21 0
      services/oos/struct_template_in_list_execution_risky_tasks.go
  31. 21 0
      services/oos/struct_values.go
  32. 105 0
      services/oos/tag_resources.go
  33. 106 0
      services/oos/trigger_execution.go
  34. 106 0
      services/oos/untag_resources.go
  35. 3 2
      services/oos/update_template.go

+ 3 - 0
ChangeLog.txt

@@ -1,3 +1,6 @@
+2020-02-21 Version: v1.60.386
+- Support TAG API.
+
 2020-02-20 Version: v1.60.385
 - Generated 2019-09-28 for `reid`.
 

+ 3 - 2
services/oos/create_template.go

@@ -76,8 +76,9 @@ func (client *Client) CreateTemplateWithCallback(request *CreateTemplateRequest,
 // CreateTemplateRequest is the request struct for api CreateTemplate
 type CreateTemplateRequest struct {
 	*requests.RpcRequest
-	TemplateName string `position:"Query" name:"TemplateName"`
-	Content      string `position:"Query" name:"Content"`
+	Content      string                 `position:"Query" name:"Content"`
+	Tags         map[string]interface{} `position:"Query" name:"Tags"`
+	TemplateName string                 `position:"Query" name:"TemplateName"`
 }
 
 // CreateTemplateResponse is the response struct for api CreateTemplate

+ 2 - 1
services/oos/delete_template.go

@@ -76,7 +76,8 @@ func (client *Client) DeleteTemplateWithCallback(request *DeleteTemplateRequest,
 // DeleteTemplateRequest is the request struct for api DeleteTemplate
 type DeleteTemplateRequest struct {
 	*requests.RpcRequest
-	TemplateName string `position:"Query" name:"TemplateName"`
+	AutoDeleteExecutions requests.Boolean `position:"Query" name:"AutoDeleteExecutions"`
+	TemplateName         string           `position:"Query" name:"TemplateName"`
 }
 
 // DeleteTemplateResponse is the response struct for api DeleteTemplate

+ 104 - 0
services/oos/delete_templates.go

@@ -0,0 +1,104 @@
+package oos
+
+//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"
+)
+
+// DeleteTemplates invokes the oos.DeleteTemplates API synchronously
+// api document: https://help.aliyun.com/api/oos/deletetemplates.html
+func (client *Client) DeleteTemplates(request *DeleteTemplatesRequest) (response *DeleteTemplatesResponse, err error) {
+	response = CreateDeleteTemplatesResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DeleteTemplatesWithChan invokes the oos.DeleteTemplates API asynchronously
+// api document: https://help.aliyun.com/api/oos/deletetemplates.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteTemplatesWithChan(request *DeleteTemplatesRequest) (<-chan *DeleteTemplatesResponse, <-chan error) {
+	responseChan := make(chan *DeleteTemplatesResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DeleteTemplates(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DeleteTemplatesWithCallback invokes the oos.DeleteTemplates API asynchronously
+// api document: https://help.aliyun.com/api/oos/deletetemplates.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteTemplatesWithCallback(request *DeleteTemplatesRequest, callback func(response *DeleteTemplatesResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DeleteTemplatesResponse
+		var err error
+		defer close(result)
+		response, err = client.DeleteTemplates(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DeleteTemplatesRequest is the request struct for api DeleteTemplates
+type DeleteTemplatesRequest struct {
+	*requests.RpcRequest
+	TemplateNames        string           `position:"Query" name:"TemplateNames"`
+	AutoDeleteExecutions requests.Boolean `position:"Query" name:"AutoDeleteExecutions"`
+}
+
+// DeleteTemplatesResponse is the response struct for api DeleteTemplates
+type DeleteTemplatesResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateDeleteTemplatesRequest creates a request to invoke DeleteTemplates API
+func CreateDeleteTemplatesRequest() (request *DeleteTemplatesRequest) {
+	request = &DeleteTemplatesRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("oos", "2019-06-01", "DeleteTemplates", "oos", "openAPI")
+	return
+}
+
+// CreateDeleteTemplatesResponse creates a response to parse from DeleteTemplates response
+func CreateDeleteTemplatesResponse() (response *DeleteTemplatesResponse) {
+	response = &DeleteTemplatesResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 104 - 0
services/oos/describe_regions.go

@@ -0,0 +1,104 @@
+package oos
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// DescribeRegions invokes the oos.DescribeRegions API synchronously
+// api document: https://help.aliyun.com/api/oos/describeregions.html
+func (client *Client) DescribeRegions(request *DescribeRegionsRequest) (response *DescribeRegionsResponse, err error) {
+	response = CreateDescribeRegionsResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DescribeRegionsWithChan invokes the oos.DescribeRegions API asynchronously
+// api document: https://help.aliyun.com/api/oos/describeregions.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeRegionsWithChan(request *DescribeRegionsRequest) (<-chan *DescribeRegionsResponse, <-chan error) {
+	responseChan := make(chan *DescribeRegionsResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DescribeRegions(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DescribeRegionsWithCallback invokes the oos.DescribeRegions API asynchronously
+// api document: https://help.aliyun.com/api/oos/describeregions.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeRegionsWithCallback(request *DescribeRegionsRequest, callback func(response *DescribeRegionsResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DescribeRegionsResponse
+		var err error
+		defer close(result)
+		response, err = client.DescribeRegions(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DescribeRegionsRequest is the request struct for api DescribeRegions
+type DescribeRegionsRequest struct {
+	*requests.RpcRequest
+	AcceptLanguage string `position:"Query" name:"AcceptLanguage"`
+}
+
+// DescribeRegionsResponse is the response struct for api DescribeRegions
+type DescribeRegionsResponse struct {
+	*responses.BaseResponse
+	RequestId string   `json:"RequestId" xml:"RequestId"`
+	Regions   []Region `json:"Regions" xml:"Regions"`
+}
+
+// CreateDescribeRegionsRequest creates a request to invoke DescribeRegions API
+func CreateDescribeRegionsRequest() (request *DescribeRegionsRequest) {
+	request = &DescribeRegionsRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("oos", "2019-06-01", "DescribeRegions", "oos", "openAPI")
+	return
+}
+
+// CreateDescribeRegionsResponse creates a response to parse from DescribeRegions response
+func CreateDescribeRegionsResponse() (response *DescribeRegionsResponse) {
+	response = &DescribeRegionsResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 1 - 1
services/oos/list_actions.go

@@ -76,9 +76,9 @@ func (client *Client) ListActionsWithCallback(request *ListActionsRequest, callb
 // ListActionsRequest is the request struct for api ListActions
 type ListActionsRequest struct {
 	*requests.RpcRequest
+	OOSActionName string           `position:"Query" name:"OOSActionName"`
 	NextToken     string           `position:"Query" name:"NextToken"`
 	MaxResults    requests.Integer `position:"Query" name:"MaxResults"`
-	OOSActionName string           `position:"Query" name:"OOSActionName"`
 }
 
 // ListActionsResponse is the response struct for api ListActions

+ 6 - 3
services/oos/list_execution_logs.go

@@ -76,9 +76,11 @@ func (client *Client) ListExecutionLogsWithCallback(request *ListExecutionLogsRe
 // ListExecutionLogsRequest is the request struct for api ListExecutionLogs
 type ListExecutionLogsRequest struct {
 	*requests.RpcRequest
-	ExecutionId string           `position:"Query" name:"ExecutionId"`
-	NextToken   string           `position:"Query" name:"NextToken"`
-	MaxResults  requests.Integer `position:"Query" name:"MaxResults"`
+	ExecutionId     string           `position:"Query" name:"ExecutionId"`
+	LogType         string           `position:"Query" name:"LogType"`
+	NextToken       string           `position:"Query" name:"NextToken"`
+	MaxResults      requests.Integer `position:"Query" name:"MaxResults"`
+	TaskExecutionId string           `position:"Query" name:"TaskExecutionId"`
 }
 
 // ListExecutionLogsResponse is the response struct for api ListExecutionLogs
@@ -87,6 +89,7 @@ type ListExecutionLogsResponse struct {
 	RequestId     string         `json:"RequestId" xml:"RequestId"`
 	MaxResults    int            `json:"MaxResults" xml:"MaxResults"`
 	NextToken     string         `json:"NextToken" xml:"NextToken"`
+	IsTruncated   bool           `json:"IsTruncated" xml:"IsTruncated"`
 	ExecutionLogs []ExecutionLog `json:"ExecutionLogs" xml:"ExecutionLogs"`
 }
 

+ 104 - 0
services/oos/list_execution_risky_tasks.go

@@ -0,0 +1,104 @@
+package oos
+
+//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"
+)
+
+// ListExecutionRiskyTasks invokes the oos.ListExecutionRiskyTasks API synchronously
+// api document: https://help.aliyun.com/api/oos/listexecutionriskytasks.html
+func (client *Client) ListExecutionRiskyTasks(request *ListExecutionRiskyTasksRequest) (response *ListExecutionRiskyTasksResponse, err error) {
+	response = CreateListExecutionRiskyTasksResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// ListExecutionRiskyTasksWithChan invokes the oos.ListExecutionRiskyTasks API asynchronously
+// api document: https://help.aliyun.com/api/oos/listexecutionriskytasks.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ListExecutionRiskyTasksWithChan(request *ListExecutionRiskyTasksRequest) (<-chan *ListExecutionRiskyTasksResponse, <-chan error) {
+	responseChan := make(chan *ListExecutionRiskyTasksResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.ListExecutionRiskyTasks(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// ListExecutionRiskyTasksWithCallback invokes the oos.ListExecutionRiskyTasks API asynchronously
+// api document: https://help.aliyun.com/api/oos/listexecutionriskytasks.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ListExecutionRiskyTasksWithCallback(request *ListExecutionRiskyTasksRequest, callback func(response *ListExecutionRiskyTasksResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *ListExecutionRiskyTasksResponse
+		var err error
+		defer close(result)
+		response, err = client.ListExecutionRiskyTasks(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// ListExecutionRiskyTasksRequest is the request struct for api ListExecutionRiskyTasks
+type ListExecutionRiskyTasksRequest struct {
+	*requests.RpcRequest
+	TemplateName string `position:"Query" name:"TemplateName"`
+}
+
+// ListExecutionRiskyTasksResponse is the response struct for api ListExecutionRiskyTasks
+type ListExecutionRiskyTasksResponse struct {
+	*responses.BaseResponse
+	RequestId  string      `json:"RequestId" xml:"RequestId"`
+	RiskyTasks []RiskyTask `json:"RiskyTasks" xml:"RiskyTasks"`
+}
+
+// CreateListExecutionRiskyTasksRequest creates a request to invoke ListExecutionRiskyTasks API
+func CreateListExecutionRiskyTasksRequest() (request *ListExecutionRiskyTasksRequest) {
+	request = &ListExecutionRiskyTasksRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("oos", "2019-06-01", "ListExecutionRiskyTasks", "oos", "openAPI")
+	return
+}
+
+// CreateListExecutionRiskyTasksResponse creates a response to parse from ListExecutionRiskyTasks response
+func CreateListExecutionRiskyTasksResponse() (response *ListExecutionRiskyTasksResponse) {
+	response = &ListExecutionRiskyTasksResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 18 - 16
services/oos/list_executions.go

@@ -76,22 +76,24 @@ func (client *Client) ListExecutionsWithCallback(request *ListExecutionsRequest,
 // ListExecutionsRequest is the request struct for api ListExecutions
 type ListExecutionsRequest struct {
 	*requests.RpcRequest
-	ExecutedBy            string           `position:"Query" name:"ExecutedBy"`
-	IncludeChildExecution requests.Boolean `position:"Query" name:"IncludeChildExecution"`
-	StartDateAfter        string           `position:"Query" name:"StartDateAfter"`
-	StartDateBefore       string           `position:"Query" name:"StartDateBefore"`
-	Mode                  string           `position:"Query" name:"Mode"`
-	ExecutionId           string           `position:"Query" name:"ExecutionId"`
-	ParentExecutionId     string           `position:"Query" name:"ParentExecutionId"`
-	RamRole               string           `position:"Query" name:"RamRole"`
-	NextToken             string           `position:"Query" name:"NextToken"`
-	EndDateAfter          string           `position:"Query" name:"EndDateAfter"`
-	MaxResults            requests.Integer `position:"Query" name:"MaxResults"`
-	TemplateName          string           `position:"Query" name:"TemplateName"`
-	EndDateBefore         string           `position:"Query" name:"EndDateBefore"`
-	SortOrder             string           `position:"Query" name:"SortOrder"`
-	SortField             string           `position:"Query" name:"SortField"`
-	Status                string           `position:"Query" name:"Status"`
+	ExecutedBy            string                 `position:"Query" name:"ExecutedBy"`
+	IncludeChildExecution requests.Boolean       `position:"Query" name:"IncludeChildExecution"`
+	Mode                  string                 `position:"Query" name:"Mode"`
+	ExecutionId           string                 `position:"Query" name:"ExecutionId"`
+	RamRole               string                 `position:"Query" name:"RamRole"`
+	NextToken             string                 `position:"Query" name:"NextToken"`
+	TemplateName          string                 `position:"Query" name:"TemplateName"`
+	EndDateBefore         string                 `position:"Query" name:"EndDateBefore"`
+	SortOrder             string                 `position:"Query" name:"SortOrder"`
+	StartDateAfter        string                 `position:"Query" name:"StartDateAfter"`
+	StartDateBefore       string                 `position:"Query" name:"StartDateBefore"`
+	Tags                  map[string]interface{} `position:"Query" name:"Tags"`
+	ParentExecutionId     string                 `position:"Query" name:"ParentExecutionId"`
+	EndDateAfter          string                 `position:"Query" name:"EndDateAfter"`
+	MaxResults            requests.Integer       `position:"Query" name:"MaxResults"`
+	SortField             string                 `position:"Query" name:"SortField"`
+	Category              string                 `position:"Query" name:"Category"`
+	Status                string                 `position:"Query" name:"Status"`
 }
 
 // ListExecutionsResponse is the response struct for api ListExecutions

+ 108 - 0
services/oos/list_tag_keys.go

@@ -0,0 +1,108 @@
+package oos
+
+//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"
+)
+
+// ListTagKeys invokes the oos.ListTagKeys API synchronously
+// api document: https://help.aliyun.com/api/oos/listtagkeys.html
+func (client *Client) ListTagKeys(request *ListTagKeysRequest) (response *ListTagKeysResponse, err error) {
+	response = CreateListTagKeysResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// ListTagKeysWithChan invokes the oos.ListTagKeys API asynchronously
+// api document: https://help.aliyun.com/api/oos/listtagkeys.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ListTagKeysWithChan(request *ListTagKeysRequest) (<-chan *ListTagKeysResponse, <-chan error) {
+	responseChan := make(chan *ListTagKeysResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.ListTagKeys(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// ListTagKeysWithCallback invokes the oos.ListTagKeys API asynchronously
+// api document: https://help.aliyun.com/api/oos/listtagkeys.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ListTagKeysWithCallback(request *ListTagKeysRequest, callback func(response *ListTagKeysResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *ListTagKeysResponse
+		var err error
+		defer close(result)
+		response, err = client.ListTagKeys(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// ListTagKeysRequest is the request struct for api ListTagKeys
+type ListTagKeysRequest struct {
+	*requests.RpcRequest
+	ResourceType string           `position:"Query" name:"ResourceType"`
+	NextToken    string           `position:"Query" name:"NextToken"`
+	MaxResults   requests.Integer `position:"Query" name:"MaxResults"`
+}
+
+// ListTagKeysResponse is the response struct for api ListTagKeys
+type ListTagKeysResponse struct {
+	*responses.BaseResponse
+	RequestId  string   `json:"RequestId" xml:"RequestId"`
+	MaxResults int      `json:"MaxResults" xml:"MaxResults"`
+	NextToken  string   `json:"NextToken" xml:"NextToken"`
+	Keys       []string `json:"Keys" xml:"Keys"`
+}
+
+// CreateListTagKeysRequest creates a request to invoke ListTagKeys API
+func CreateListTagKeysRequest() (request *ListTagKeysRequest) {
+	request = &ListTagKeysRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("oos", "2019-06-01", "ListTagKeys", "oos", "openAPI")
+	return
+}
+
+// CreateListTagKeysResponse creates a response to parse from ListTagKeys response
+func CreateListTagKeysResponse() (response *ListTagKeysResponse) {
+	response = &ListTagKeysResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 108 - 0
services/oos/list_tag_resources.go

@@ -0,0 +1,108 @@
+package oos
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// ListTagResources invokes the oos.ListTagResources API synchronously
+// api document: https://help.aliyun.com/api/oos/listtagresources.html
+func (client *Client) ListTagResources(request *ListTagResourcesRequest) (response *ListTagResourcesResponse, err error) {
+	response = CreateListTagResourcesResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// ListTagResourcesWithChan invokes the oos.ListTagResources API asynchronously
+// api document: https://help.aliyun.com/api/oos/listtagresources.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ListTagResourcesWithChan(request *ListTagResourcesRequest) (<-chan *ListTagResourcesResponse, <-chan error) {
+	responseChan := make(chan *ListTagResourcesResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.ListTagResources(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// ListTagResourcesWithCallback invokes the oos.ListTagResources API asynchronously
+// api document: https://help.aliyun.com/api/oos/listtagresources.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ListTagResourcesWithCallback(request *ListTagResourcesRequest, callback func(response *ListTagResourcesResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *ListTagResourcesResponse
+		var err error
+		defer close(result)
+		response, err = client.ListTagResources(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// ListTagResourcesRequest is the request struct for api ListTagResources
+type ListTagResourcesRequest struct {
+	*requests.RpcRequest
+	ResourceType string                 `position:"Query" name:"ResourceType"`
+	Tags         map[string]interface{} `position:"Query" name:"Tags"`
+	NextToken    string                 `position:"Query" name:"NextToken"`
+	ResourceIds  map[string]interface{} `position:"Query" name:"ResourceIds"`
+}
+
+// ListTagResourcesResponse is the response struct for api ListTagResources
+type ListTagResourcesResponse struct {
+	*responses.BaseResponse
+	RequestId    string       `json:"RequestId" xml:"RequestId"`
+	NextToken    string       `json:"NextToken" xml:"NextToken"`
+	TagResources TagResources `json:"TagResources" xml:"TagResources"`
+}
+
+// CreateListTagResourcesRequest creates a request to invoke ListTagResources API
+func CreateListTagResourcesRequest() (request *ListTagResourcesRequest) {
+	request = &ListTagResourcesRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("oos", "2019-06-01", "ListTagResources", "oos", "openAPI")
+	return
+}
+
+// CreateListTagResourcesResponse creates a response to parse from ListTagResources response
+func CreateListTagResourcesResponse() (response *ListTagResourcesResponse) {
+	response = &ListTagResourcesResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 109 - 0
services/oos/list_tag_values.go

@@ -0,0 +1,109 @@
+package oos
+
+//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"
+)
+
+// ListTagValues invokes the oos.ListTagValues API synchronously
+// api document: https://help.aliyun.com/api/oos/listtagvalues.html
+func (client *Client) ListTagValues(request *ListTagValuesRequest) (response *ListTagValuesResponse, err error) {
+	response = CreateListTagValuesResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// ListTagValuesWithChan invokes the oos.ListTagValues API asynchronously
+// api document: https://help.aliyun.com/api/oos/listtagvalues.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ListTagValuesWithChan(request *ListTagValuesRequest) (<-chan *ListTagValuesResponse, <-chan error) {
+	responseChan := make(chan *ListTagValuesResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.ListTagValues(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// ListTagValuesWithCallback invokes the oos.ListTagValues API asynchronously
+// api document: https://help.aliyun.com/api/oos/listtagvalues.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ListTagValuesWithCallback(request *ListTagValuesRequest, callback func(response *ListTagValuesResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *ListTagValuesResponse
+		var err error
+		defer close(result)
+		response, err = client.ListTagValues(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// ListTagValuesRequest is the request struct for api ListTagValues
+type ListTagValuesRequest struct {
+	*requests.RpcRequest
+	ResourceType string           `position:"Query" name:"ResourceType"`
+	NextToken    string           `position:"Query" name:"NextToken"`
+	MaxResults   requests.Integer `position:"Query" name:"MaxResults"`
+	Key          string           `position:"Query" name:"Key"`
+}
+
+// ListTagValuesResponse is the response struct for api ListTagValues
+type ListTagValuesResponse struct {
+	*responses.BaseResponse
+	RequestId  string   `json:"RequestId" xml:"RequestId"`
+	MaxResults int      `json:"MaxResults" xml:"MaxResults"`
+	NextToken  string   `json:"NextToken" xml:"NextToken"`
+	Values     []string `json:"Values" xml:"Values"`
+}
+
+// CreateListTagValuesRequest creates a request to invoke ListTagValues API
+func CreateListTagValuesRequest() (request *ListTagValuesRequest) {
+	request = &ListTagValuesRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("oos", "2019-06-01", "ListTagValues", "oos", "openAPI")
+	return
+}
+
+// CreateListTagValuesResponse creates a response to parse from ListTagValues response
+func CreateListTagValuesResponse() (response *ListTagValuesResponse) {
+	response = &ListTagValuesResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 4 - 4
services/oos/list_task_executions.go

@@ -76,18 +76,18 @@ func (client *Client) ListTaskExecutionsWithCallback(request *ListTaskExecutions
 // ListTaskExecutionsRequest is the request struct for api ListTaskExecutions
 type ListTaskExecutionsRequest struct {
 	*requests.RpcRequest
-	StartDateAfter            string           `position:"Query" name:"StartDateAfter"`
-	StartDateBefore           string           `position:"Query" name:"StartDateBefore"`
 	TaskName                  string           `position:"Query" name:"TaskName"`
 	IncludeChildTaskExecution requests.Boolean `position:"Query" name:"IncludeChildTaskExecution"`
 	ExecutionId               string           `position:"Query" name:"ExecutionId"`
 	ParentTaskExecutionId     string           `position:"Query" name:"ParentTaskExecutionId"`
 	NextToken                 string           `position:"Query" name:"NextToken"`
+	EndDateBefore             string           `position:"Query" name:"EndDateBefore"`
+	SortOrder                 string           `position:"Query" name:"SortOrder"`
+	StartDateAfter            string           `position:"Query" name:"StartDateAfter"`
+	StartDateBefore           string           `position:"Query" name:"StartDateBefore"`
 	EndDateAfter              string           `position:"Query" name:"EndDateAfter"`
 	MaxResults                requests.Integer `position:"Query" name:"MaxResults"`
-	EndDateBefore             string           `position:"Query" name:"EndDateBefore"`
 	TaskExecutionId           string           `position:"Query" name:"TaskExecutionId"`
-	SortOrder                 string           `position:"Query" name:"SortOrder"`
 	SortField                 string           `position:"Query" name:"SortField"`
 	TaskAction                string           `position:"Query" name:"TaskAction"`
 	Status                    string           `position:"Query" name:"Status"`

+ 13 - 10
services/oos/list_templates.go

@@ -76,16 +76,19 @@ func (client *Client) ListTemplatesWithCallback(request *ListTemplatesRequest, c
 // ListTemplatesRequest is the request struct for api ListTemplates
 type ListTemplatesRequest struct {
 	*requests.RpcRequest
-	CreatedDateBefore string           `position:"Query" name:"CreatedDateBefore"`
-	CreatedBy         string           `position:"Query" name:"CreatedBy"`
-	NextToken         string           `position:"Query" name:"NextToken"`
-	CreatedDateAfter  string           `position:"Query" name:"CreatedDateAfter"`
-	MaxResults        requests.Integer `position:"Query" name:"MaxResults"`
-	TemplateName      string           `position:"Query" name:"TemplateName"`
-	SortOrder         string           `position:"Query" name:"SortOrder"`
-	TemplateFormat    string           `position:"Query" name:"TemplateFormat"`
-	ShareType         string           `position:"Query" name:"ShareType"`
-	SortField         string           `position:"Query" name:"SortField"`
+	CreatedDateBefore string                 `position:"Query" name:"CreatedDateBefore"`
+	CreatedBy         string                 `position:"Query" name:"CreatedBy"`
+	NextToken         string                 `position:"Query" name:"NextToken"`
+	TemplateName      string                 `position:"Query" name:"TemplateName"`
+	SortOrder         string                 `position:"Query" name:"SortOrder"`
+	ShareType         string                 `position:"Query" name:"ShareType"`
+	HasTrigger        requests.Boolean       `position:"Query" name:"HasTrigger"`
+	CreatedDateAfter  string                 `position:"Query" name:"CreatedDateAfter"`
+	Tags              map[string]interface{} `position:"Query" name:"Tags"`
+	MaxResults        requests.Integer       `position:"Query" name:"MaxResults"`
+	TemplateFormat    string                 `position:"Query" name:"TemplateFormat"`
+	SortField         string                 `position:"Query" name:"SortField"`
+	Category          string                 `position:"Query" name:"Category"`
 }
 
 // ListTemplatesResponse is the response struct for api ListTemplates

+ 4 - 2
services/oos/notify_execution.go

@@ -76,11 +76,13 @@ func (client *Client) NotifyExecutionWithCallback(request *NotifyExecutionReques
 // NotifyExecutionRequest is the request struct for api NotifyExecution
 type NotifyExecutionRequest struct {
 	*requests.RpcRequest
+	TaskName        string `position:"Query" name:"TaskName"`
 	ExecutionId     string `position:"Query" name:"ExecutionId"`
+	NotifyType      string `position:"Query" name:"NotifyType"`
 	ExecutionStatus string `position:"Query" name:"ExecutionStatus"`
 	NotifyNote      string `position:"Query" name:"NotifyNote"`
-	TaskName        string `position:"Query" name:"TaskName"`
-	NotifyType      string `position:"Query" name:"NotifyType"`
+	LoopItem        string `position:"Query" name:"LoopItem"`
+	TaskExecutionId string `position:"Query" name:"TaskExecutionId"`
 	Parameters      string `position:"Query" name:"Parameters"`
 }
 

+ 10 - 6
services/oos/start_execution.go

@@ -76,12 +76,16 @@ func (client *Client) StartExecutionWithCallback(request *StartExecutionRequest,
 // StartExecutionRequest is the request struct for api StartExecution
 type StartExecutionRequest struct {
 	*requests.RpcRequest
-	Mode              string `position:"Query" name:"Mode"`
-	TemplateVersion   string `position:"Query" name:"TemplateVersion"`
-	ParentExecutionId string `position:"Query" name:"ParentExecutionId"`
-	TemplateName      string `position:"Query" name:"TemplateName"`
-	SafetyCheck       string `position:"Query" name:"SafetyCheck"`
-	Parameters        string `position:"Query" name:"Parameters"`
+	ClientToken       string                 `position:"Query" name:"ClientToken"`
+	Description       string                 `position:"Query" name:"Description"`
+	Mode              string                 `position:"Query" name:"Mode"`
+	TemplateVersion   string                 `position:"Query" name:"TemplateVersion"`
+	TemplateName      string                 `position:"Query" name:"TemplateName"`
+	LoopMode          string                 `position:"Query" name:"LoopMode"`
+	SafetyCheck       string                 `position:"Query" name:"SafetyCheck"`
+	Tags              map[string]interface{} `position:"Query" name:"Tags"`
+	ParentExecutionId string                 `position:"Query" name:"ParentExecutionId"`
+	Parameters        string                 `position:"Query" name:"Parameters"`
 }
 
 // StartExecutionResponse is the response struct for api StartExecution

+ 26 - 20
services/oos/struct_execution.go

@@ -17,24 +17,30 @@ package oos
 
 // Execution is a nested struct in oos response
 type Execution struct {
-	TemplateId        string        `json:"TemplateId" xml:"TemplateId"`
-	ExecutedBy        string        `json:"ExecutedBy" xml:"ExecutedBy"`
-	EndDate           string        `json:"EndDate" xml:"EndDate"`
-	TemplateName      string        `json:"TemplateName" xml:"TemplateName"`
-	RamRole           string        `json:"RamRole" xml:"RamRole"`
-	IsParent          bool          `json:"IsParent" xml:"IsParent"`
-	StatusMessage     string        `json:"StatusMessage" xml:"StatusMessage"`
-	Mode              string        `json:"Mode" xml:"Mode"`
-	StartDate         string        `json:"StartDate" xml:"StartDate"`
-	SafetyCheck       string        `json:"SafetyCheck" xml:"SafetyCheck"`
-	TemplateVersion   string        `json:"TemplateVersion" xml:"TemplateVersion"`
-	CreateDate        string        `json:"CreateDate" xml:"CreateDate"`
-	Parameters        string        `json:"Parameters" xml:"Parameters"`
-	Counters          string        `json:"Counters" xml:"Counters"`
-	UpdateDate        string        `json:"UpdateDate" xml:"UpdateDate"`
-	ParentExecutionId string        `json:"ParentExecutionId" xml:"ParentExecutionId"`
-	Outputs           string        `json:"Outputs" xml:"Outputs"`
-	ExecutionId       string        `json:"ExecutionId" xml:"ExecutionId"`
-	Status            string        `json:"Status" xml:"Status"`
-	CurrentTasks      []CurrentTask `json:"CurrentTasks" xml:"CurrentTasks"`
+	TemplateId        string                 `json:"TemplateId" xml:"TemplateId"`
+	Category          string                 `json:"Category" xml:"Category"`
+	ExecutedBy        string                 `json:"ExecutedBy" xml:"ExecutedBy"`
+	TemplateName      string                 `json:"TemplateName" xml:"TemplateName"`
+	WaitingStatus     string                 `json:"WaitingStatus" xml:"WaitingStatus"`
+	IsParent          bool                   `json:"IsParent" xml:"IsParent"`
+	StatusMessage     string                 `json:"StatusMessage" xml:"StatusMessage"`
+	Mode              string                 `json:"Mode" xml:"Mode"`
+	SafetyCheck       string                 `json:"SafetyCheck" xml:"SafetyCheck"`
+	TemplateVersion   string                 `json:"TemplateVersion" xml:"TemplateVersion"`
+	UpdateDate        string                 `json:"UpdateDate" xml:"UpdateDate"`
+	ParentExecutionId string                 `json:"ParentExecutionId" xml:"ParentExecutionId"`
+	Outputs           string                 `json:"Outputs" xml:"Outputs"`
+	Description       string                 `json:"Description" xml:"Description"`
+	Tags              map[string]interface{} `json:"Tags" xml:"Tags"`
+	EndDate           string                 `json:"EndDate" xml:"EndDate"`
+	RamRole           string                 `json:"RamRole" xml:"RamRole"`
+	LoopMode          string                 `json:"LoopMode" xml:"LoopMode"`
+	StartDate         string                 `json:"StartDate" xml:"StartDate"`
+	StatusReason      string                 `json:"StatusReason" xml:"StatusReason"`
+	CreateDate        string                 `json:"CreateDate" xml:"CreateDate"`
+	Parameters        string                 `json:"Parameters" xml:"Parameters"`
+	Counters          string                 `json:"Counters" xml:"Counters"`
+	ExecutionId       string                 `json:"ExecutionId" xml:"ExecutionId"`
+	Status            string                 `json:"Status" xml:"Status"`
+	CurrentTasks      []CurrentTask          `json:"CurrentTasks" xml:"CurrentTasks"`
 }

+ 4 - 2
services/oos/struct_execution_log.go

@@ -17,6 +17,8 @@ package oos
 
 // ExecutionLog is a nested struct in oos response
 type ExecutionLog struct {
-	Timestamp string `json:"Timestamp" xml:"Timestamp"`
-	Message   string `json:"Message" xml:"Message"`
+	Timestamp       string `json:"Timestamp" xml:"Timestamp"`
+	Message         string `json:"Message" xml:"Message"`
+	TaskExecutionId string `json:"TaskExecutionId" xml:"TaskExecutionId"`
+	LogType         string `json:"LogType" xml:"LogType"`
 }

+ 21 - 0
services/oos/struct_keys.go

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

+ 23 - 0
services/oos/struct_region.go

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

+ 21 - 0
services/oos/struct_regions.go

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

+ 24 - 0
services/oos/struct_risky_task.go

@@ -0,0 +1,24 @@
+package oos
+
+//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.
+
+// RiskyTask is a nested struct in oos response
+type RiskyTask struct {
+	Service  string   `json:"Service" xml:"Service"`
+	API      string   `json:"API" xml:"API"`
+	Task     []string `json:"Task" xml:"Task"`
+	Template []string `json:"Template" xml:"Template"`
+}

+ 21 - 0
services/oos/struct_risky_tasks.go

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

+ 24 - 0
services/oos/struct_tag_resource.go

@@ -0,0 +1,24 @@
+package oos
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+// TagResource is a nested struct in oos response
+type TagResource struct {
+	TagKey       string `json:"TagKey" xml:"TagKey"`
+	TagValue     string `json:"TagValue" xml:"TagValue"`
+	ResourceId   string `json:"ResourceId" xml:"ResourceId"`
+	ResourceType string `json:"ResourceType" xml:"ResourceType"`
+}

+ 21 - 0
services/oos/struct_tag_resources.go

@@ -0,0 +1,21 @@
+package oos
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+// TagResources is a nested struct in oos response
+type TagResources struct {
+	TagResource []TagResource `json:"TagResource" xml:"TagResource"`
+}

+ 2 - 2
services/oos/struct_task.go

@@ -18,8 +18,8 @@ package oos
 // Task is a nested struct in oos response
 type Task struct {
 	Name        string `json:"Name" xml:"Name"`
-	Type        string `json:"Type" xml:"Type"`
+	Outputs     string `json:"Outputs" xml:"Outputs"`
 	Description string `json:"Description" xml:"Description"`
 	Properties  string `json:"Properties" xml:"Properties"`
-	Outputs     string `json:"Outputs" xml:"Outputs"`
+	Type        string `json:"Type" xml:"Type"`
 }

+ 1 - 0
services/oos/struct_task_execution.go

@@ -35,4 +35,5 @@ type TaskExecution struct {
 	LoopItem              string `json:"LoopItem" xml:"LoopItem"`
 	Loop                  string `json:"Loop" xml:"Loop"`
 	ExtraData             string `json:"ExtraData" xml:"ExtraData"`
+	LoopBatchNumber       int    `json:"LoopBatchNumber" xml:"LoopBatchNumber"`
 }

+ 21 - 0
services/oos/struct_task_in_list_execution_risky_tasks.go

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

+ 16 - 13
services/oos/struct_template.go

@@ -17,17 +17,20 @@ package oos
 
 // Template is a nested struct in oos response
 type Template struct {
-	TemplateId          string `json:"TemplateId" xml:"TemplateId"`
-	TotalExecutionCount int    `json:"TotalExecutionCount" xml:"TotalExecutionCount"`
-	TemplateName        string `json:"TemplateName" xml:"TemplateName"`
-	Hash                string `json:"Hash" xml:"Hash"`
-	CreatedBy           string `json:"CreatedBy" xml:"CreatedBy"`
-	TemplateVersion     string `json:"TemplateVersion" xml:"TemplateVersion"`
-	TemplateFormat      string `json:"TemplateFormat" xml:"TemplateFormat"`
-	UpdatedBy           string `json:"UpdatedBy" xml:"UpdatedBy"`
-	CreatedDate         string `json:"CreatedDate" xml:"CreatedDate"`
-	Description         string `json:"Description" xml:"Description"`
-	UpdatedDate         string `json:"UpdatedDate" xml:"UpdatedDate"`
-	Popularity          int    `json:"Popularity" xml:"Popularity"`
-	ShareType           string `json:"ShareType" xml:"ShareType"`
+	TemplateId          string                 `json:"TemplateId" xml:"TemplateId"`
+	Category            string                 `json:"Category" xml:"Category"`
+	TotalExecutionCount int                    `json:"TotalExecutionCount" xml:"TotalExecutionCount"`
+	TemplateName        string                 `json:"TemplateName" xml:"TemplateName"`
+	Hash                string                 `json:"Hash" xml:"Hash"`
+	CreatedBy           string                 `json:"CreatedBy" xml:"CreatedBy"`
+	TemplateVersion     string                 `json:"TemplateVersion" xml:"TemplateVersion"`
+	TemplateFormat      string                 `json:"TemplateFormat" xml:"TemplateFormat"`
+	UpdatedBy           string                 `json:"UpdatedBy" xml:"UpdatedBy"`
+	CreatedDate         string                 `json:"CreatedDate" xml:"CreatedDate"`
+	HasTrigger          bool                   `json:"HasTrigger" xml:"HasTrigger"`
+	Description         string                 `json:"Description" xml:"Description"`
+	UpdatedDate         string                 `json:"UpdatedDate" xml:"UpdatedDate"`
+	Tags                map[string]interface{} `json:"Tags" xml:"Tags"`
+	Popularity          int                    `json:"Popularity" xml:"Popularity"`
+	ShareType           string                 `json:"ShareType" xml:"ShareType"`
 }

+ 21 - 0
services/oos/struct_template_in_list_execution_risky_tasks.go

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

+ 21 - 0
services/oos/struct_values.go

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

+ 105 - 0
services/oos/tag_resources.go

@@ -0,0 +1,105 @@
+package oos
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// TagResources invokes the oos.TagResources API synchronously
+// api document: https://help.aliyun.com/api/oos/tagresources.html
+func (client *Client) TagResources(request *TagResourcesRequest) (response *TagResourcesResponse, err error) {
+	response = CreateTagResourcesResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// TagResourcesWithChan invokes the oos.TagResources API asynchronously
+// api document: https://help.aliyun.com/api/oos/tagresources.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) TagResourcesWithChan(request *TagResourcesRequest) (<-chan *TagResourcesResponse, <-chan error) {
+	responseChan := make(chan *TagResourcesResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.TagResources(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// TagResourcesWithCallback invokes the oos.TagResources API asynchronously
+// api document: https://help.aliyun.com/api/oos/tagresources.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) TagResourcesWithCallback(request *TagResourcesRequest, callback func(response *TagResourcesResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *TagResourcesResponse
+		var err error
+		defer close(result)
+		response, err = client.TagResources(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// TagResourcesRequest is the request struct for api TagResources
+type TagResourcesRequest struct {
+	*requests.RpcRequest
+	ResourceType string                 `position:"Query" name:"ResourceType"`
+	Tags         map[string]interface{} `position:"Query" name:"Tags"`
+	ResourceIds  map[string]interface{} `position:"Query" name:"ResourceIds"`
+}
+
+// TagResourcesResponse is the response struct for api TagResources
+type TagResourcesResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateTagResourcesRequest creates a request to invoke TagResources API
+func CreateTagResourcesRequest() (request *TagResourcesRequest) {
+	request = &TagResourcesRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("oos", "2019-06-01", "TagResources", "oos", "openAPI")
+	return
+}
+
+// CreateTagResourcesResponse creates a response to parse from TagResources response
+func CreateTagResourcesResponse() (response *TagResourcesResponse) {
+	response = &TagResourcesResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 106 - 0
services/oos/trigger_execution.go

@@ -0,0 +1,106 @@
+package oos
+
+//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"
+)
+
+// TriggerExecution invokes the oos.TriggerExecution API synchronously
+// api document: https://help.aliyun.com/api/oos/triggerexecution.html
+func (client *Client) TriggerExecution(request *TriggerExecutionRequest) (response *TriggerExecutionResponse, err error) {
+	response = CreateTriggerExecutionResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// TriggerExecutionWithChan invokes the oos.TriggerExecution API asynchronously
+// api document: https://help.aliyun.com/api/oos/triggerexecution.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) TriggerExecutionWithChan(request *TriggerExecutionRequest) (<-chan *TriggerExecutionResponse, <-chan error) {
+	responseChan := make(chan *TriggerExecutionResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.TriggerExecution(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// TriggerExecutionWithCallback invokes the oos.TriggerExecution API asynchronously
+// api document: https://help.aliyun.com/api/oos/triggerexecution.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) TriggerExecutionWithCallback(request *TriggerExecutionRequest, callback func(response *TriggerExecutionResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *TriggerExecutionResponse
+		var err error
+		defer close(result)
+		response, err = client.TriggerExecution(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// TriggerExecutionRequest is the request struct for api TriggerExecution
+type TriggerExecutionRequest struct {
+	*requests.RpcRequest
+	ClientToken string `position:"Query" name:"ClientToken"`
+	Type        string `position:"Query" name:"Type"`
+	Content     string `position:"Query" name:"Content"`
+	ExecutionId string `position:"Query" name:"ExecutionId"`
+}
+
+// TriggerExecutionResponse is the response struct for api TriggerExecution
+type TriggerExecutionResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateTriggerExecutionRequest creates a request to invoke TriggerExecution API
+func CreateTriggerExecutionRequest() (request *TriggerExecutionRequest) {
+	request = &TriggerExecutionRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("oos", "2019-06-01", "TriggerExecution", "oos", "openAPI")
+	return
+}
+
+// CreateTriggerExecutionResponse creates a response to parse from TriggerExecution response
+func CreateTriggerExecutionResponse() (response *TriggerExecutionResponse) {
+	response = &TriggerExecutionResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 106 - 0
services/oos/untag_resources.go

@@ -0,0 +1,106 @@
+package oos
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// UntagResources invokes the oos.UntagResources API synchronously
+// api document: https://help.aliyun.com/api/oos/untagresources.html
+func (client *Client) UntagResources(request *UntagResourcesRequest) (response *UntagResourcesResponse, err error) {
+	response = CreateUntagResourcesResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// UntagResourcesWithChan invokes the oos.UntagResources API asynchronously
+// api document: https://help.aliyun.com/api/oos/untagresources.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UntagResourcesWithChan(request *UntagResourcesRequest) (<-chan *UntagResourcesResponse, <-chan error) {
+	responseChan := make(chan *UntagResourcesResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.UntagResources(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// UntagResourcesWithCallback invokes the oos.UntagResources API asynchronously
+// api document: https://help.aliyun.com/api/oos/untagresources.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UntagResourcesWithCallback(request *UntagResourcesRequest, callback func(response *UntagResourcesResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *UntagResourcesResponse
+		var err error
+		defer close(result)
+		response, err = client.UntagResources(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// UntagResourcesRequest is the request struct for api UntagResources
+type UntagResourcesRequest struct {
+	*requests.RpcRequest
+	All          requests.Boolean       `position:"Query" name:"All"`
+	ResourceType string                 `position:"Query" name:"ResourceType"`
+	TagKeys      map[string]interface{} `position:"Query" name:"TagKeys"`
+	ResourceIds  map[string]interface{} `position:"Query" name:"ResourceIds"`
+}
+
+// UntagResourcesResponse is the response struct for api UntagResources
+type UntagResourcesResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateUntagResourcesRequest creates a request to invoke UntagResources API
+func CreateUntagResourcesRequest() (request *UntagResourcesRequest) {
+	request = &UntagResourcesRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("oos", "2019-06-01", "UntagResources", "oos", "openAPI")
+	return
+}
+
+// CreateUntagResourcesResponse creates a response to parse from UntagResources response
+func CreateUntagResourcesResponse() (response *UntagResourcesResponse) {
+	response = &UntagResourcesResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 3 - 2
services/oos/update_template.go

@@ -76,8 +76,9 @@ func (client *Client) UpdateTemplateWithCallback(request *UpdateTemplateRequest,
 // UpdateTemplateRequest is the request struct for api UpdateTemplate
 type UpdateTemplateRequest struct {
 	*requests.RpcRequest
-	TemplateName string `position:"Query" name:"TemplateName"`
-	Content      string `position:"Query" name:"Content"`
+	Content      string                 `position:"Query" name:"Content"`
+	Tags         map[string]interface{} `position:"Query" name:"Tags"`
+	TemplateName string                 `position:"Query" name:"TemplateName"`
 }
 
 // UpdateTemplateResponse is the response struct for api UpdateTemplate