From ad6a84442a93e802a1c626fc405deda0a8abc07f Mon Sep 17 00:00:00 2001 From: sdk-team Date: Tue, 22 Oct 2024 03:01:38 +0000 Subject: [PATCH] Generated 2019-06-24 for eais. --- ChangeLog.txt | 5 + services/eais/create_eai_all.go | 115 ------------------- services/eais/list_tag_resources.go | 110 ++++++++++++++++++ services/eais/start_eai_jupyter.go | 100 ++++++++++++++++ services/eais/stop_eai_jupyter.go | 100 ++++++++++++++++ services/eais/struct_access_denied_detail.go | 27 +++++ services/eais/struct_tag_resource.go | 24 ++++ services/eais/struct_tag_resources.go | 21 ++++ services/eais/tag_resources.go | 107 +++++++++++++++++ services/eais/untag_resources.go | 102 ++++++++++++++++ 10 files changed, 596 insertions(+), 115 deletions(-) delete mode 100644 services/eais/create_eai_all.go create mode 100644 services/eais/list_tag_resources.go create mode 100644 services/eais/start_eai_jupyter.go create mode 100644 services/eais/stop_eai_jupyter.go create mode 100644 services/eais/struct_access_denied_detail.go create mode 100644 services/eais/struct_tag_resource.go create mode 100644 services/eais/struct_tag_resources.go create mode 100644 services/eais/tag_resources.go create mode 100644 services/eais/untag_resources.go diff --git a/ChangeLog.txt b/ChangeLog.txt index d39976740c..313c9e8c6e 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,8 @@ +2024-10-22 Version: v1.63.33 +- Generated 2019-06-24 for `eais`. +- Add openapi StartEaiJupyter. +- Add openapi StopEaiJupyter. + 2024-10-18 Version: v1.63.32 - Generated 2024-04-15 for `Gwlb`. - Gwlb Open API released. diff --git a/services/eais/create_eai_all.go b/services/eais/create_eai_all.go deleted file mode 100644 index a934b6b68e..0000000000 --- a/services/eais/create_eai_all.go +++ /dev/null @@ -1,115 +0,0 @@ -package eais - -//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" -) - -// CreateEaiAll invokes the eais.CreateEaiAll API synchronously -func (client *Client) CreateEaiAll(request *CreateEaiAllRequest) (response *CreateEaiAllResponse, err error) { - response = CreateCreateEaiAllResponse() - err = client.DoAction(request, response) - return -} - -// CreateEaiAllWithChan invokes the eais.CreateEaiAll API asynchronously -func (client *Client) CreateEaiAllWithChan(request *CreateEaiAllRequest) (<-chan *CreateEaiAllResponse, <-chan error) { - responseChan := make(chan *CreateEaiAllResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.CreateEaiAll(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan -} - -// CreateEaiAllWithCallback invokes the eais.CreateEaiAll API asynchronously -func (client *Client) CreateEaiAllWithCallback(request *CreateEaiAllRequest, callback func(response *CreateEaiAllResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *CreateEaiAllResponse - var err error - defer close(result) - response, err = client.CreateEaiAll(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result -} - -// CreateEaiAllRequest is the request struct for api CreateEaiAll -type CreateEaiAllRequest struct { - *requests.RpcRequest - ClientImageId string `position:"Query" name:"ClientImageId"` - ClientSystemDiskCategory string `position:"Query" name:"ClientSystemDiskCategory"` - ClientInternetMaxBandwidthOut requests.Integer `position:"Query" name:"ClientInternetMaxBandwidthOut"` - ClientToken string `position:"Query" name:"ClientToken"` - ResourceGroupId string `position:"Query" name:"ResourceGroupId"` - ClientInstanceName string `position:"Query" name:"ClientInstanceName"` - ClientInternetMaxBandwidthIn requests.Integer `position:"Query" name:"ClientInternetMaxBandwidthIn"` - ClientSystemDiskSize requests.Integer `position:"Query" name:"ClientSystemDiskSize"` - ClientVSwitchId string `position:"Query" name:"ClientVSwitchId"` - ClientPassword string `position:"Query" name:"ClientPassword"` - ClientInstanceType string `position:"Query" name:"ClientInstanceType"` - ClientSecurityGroupId string `position:"Query" name:"ClientSecurityGroupId"` - EaiInstanceType string `position:"Query" name:"EaiInstanceType"` - ClientZoneId string `position:"Query" name:"ClientZoneId"` - InstanceName string `position:"Query" name:"InstanceName"` -} - -// CreateEaiAllResponse is the response struct for api CreateEaiAll -type CreateEaiAllResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - ElasticAcceleratedInstanceId string `json:"ElasticAcceleratedInstanceId" xml:"ElasticAcceleratedInstanceId"` - ClientInstanceId string `json:"ClientInstanceId" xml:"ClientInstanceId"` -} - -// CreateCreateEaiAllRequest creates a request to invoke CreateEaiAll API -func CreateCreateEaiAllRequest() (request *CreateEaiAllRequest) { - request = &CreateEaiAllRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("eais", "2019-06-24", "CreateEaiAll", "eais", "openAPI") - request.Method = requests.POST - return -} - -// CreateCreateEaiAllResponse creates a response to parse from CreateEaiAll response -func CreateCreateEaiAllResponse() (response *CreateEaiAllResponse) { - response = &CreateEaiAllResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return -} diff --git a/services/eais/list_tag_resources.go b/services/eais/list_tag_resources.go new file mode 100644 index 0000000000..bf9d171e55 --- /dev/null +++ b/services/eais/list_tag_resources.go @@ -0,0 +1,110 @@ +package eais + +//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 eais.ListTagResources API synchronously +func (client *Client) ListTagResources(request *ListTagResourcesRequest) (response *ListTagResourcesResponse, err error) { + response = CreateListTagResourcesResponse() + err = client.DoAction(request, response) + return +} + +// ListTagResourcesWithChan invokes the eais.ListTagResources API asynchronously +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 eais.ListTagResources API asynchronously +func (client *Client) ListTagResourcesWithCallback(request *ListTagResourcesRequest, callback func(response *ListTagResourcesResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ListTagResourcesResponse + var err error + defer close(result) + response, err = client.ListTagResources(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ListTagResourcesRequest is the request struct for api ListTagResources +type ListTagResourcesRequest struct { + *requests.RpcRequest + ResourceId *[]string `position:"Query" name:"ResourceId" type:"Repeated"` + ResourceType string `position:"Query" name:"ResourceType"` + NextToken string `position:"Query" name:"NextToken"` + Tag *[]ListTagResourcesTag `position:"Query" name:"Tag" type:"Repeated"` +} + +// ListTagResourcesTag is a repeated param struct in ListTagResourcesRequest +type ListTagResourcesTag struct { + Value string `name:"Value"` + Key string `name:"Key"` +} + +// ListTagResourcesResponse is the response struct for api ListTagResources +type ListTagResourcesResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + NextToken string `json:"NextToken" xml:"NextToken"` + TagResources []TagResource `json:"TagResources" xml:"TagResources"` +} + +// CreateListTagResourcesRequest creates a request to invoke ListTagResources API +func CreateListTagResourcesRequest() (request *ListTagResourcesRequest) { + request = &ListTagResourcesRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("eais", "2019-06-24", "ListTagResources", "eais", "openAPI") + request.Method = requests.POST + return +} + +// CreateListTagResourcesResponse creates a response to parse from ListTagResources response +func CreateListTagResourcesResponse() (response *ListTagResourcesResponse) { + response = &ListTagResourcesResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/eais/start_eai_jupyter.go b/services/eais/start_eai_jupyter.go new file mode 100644 index 0000000000..de750e1b17 --- /dev/null +++ b/services/eais/start_eai_jupyter.go @@ -0,0 +1,100 @@ +package eais + +//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" +) + +// StartEaiJupyter invokes the eais.StartEaiJupyter API synchronously +func (client *Client) StartEaiJupyter(request *StartEaiJupyterRequest) (response *StartEaiJupyterResponse, err error) { + response = CreateStartEaiJupyterResponse() + err = client.DoAction(request, response) + return +} + +// StartEaiJupyterWithChan invokes the eais.StartEaiJupyter API asynchronously +func (client *Client) StartEaiJupyterWithChan(request *StartEaiJupyterRequest) (<-chan *StartEaiJupyterResponse, <-chan error) { + responseChan := make(chan *StartEaiJupyterResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.StartEaiJupyter(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// StartEaiJupyterWithCallback invokes the eais.StartEaiJupyter API asynchronously +func (client *Client) StartEaiJupyterWithCallback(request *StartEaiJupyterRequest, callback func(response *StartEaiJupyterResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *StartEaiJupyterResponse + var err error + defer close(result) + response, err = client.StartEaiJupyter(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// StartEaiJupyterRequest is the request struct for api StartEaiJupyter +type StartEaiJupyterRequest struct { + *requests.RpcRequest + InstanceId string `position:"Query" name:"InstanceId"` +} + +// StartEaiJupyterResponse is the response struct for api StartEaiJupyter +type StartEaiJupyterResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + AccessDeniedDetail AccessDeniedDetail `json:"AccessDeniedDetail" xml:"AccessDeniedDetail"` +} + +// CreateStartEaiJupyterRequest creates a request to invoke StartEaiJupyter API +func CreateStartEaiJupyterRequest() (request *StartEaiJupyterRequest) { + request = &StartEaiJupyterRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("eais", "2019-06-24", "StartEaiJupyter", "eais", "openAPI") + request.Method = requests.POST + return +} + +// CreateStartEaiJupyterResponse creates a response to parse from StartEaiJupyter response +func CreateStartEaiJupyterResponse() (response *StartEaiJupyterResponse) { + response = &StartEaiJupyterResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/eais/stop_eai_jupyter.go b/services/eais/stop_eai_jupyter.go new file mode 100644 index 0000000000..e30259ee32 --- /dev/null +++ b/services/eais/stop_eai_jupyter.go @@ -0,0 +1,100 @@ +package eais + +//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" +) + +// StopEaiJupyter invokes the eais.StopEaiJupyter API synchronously +func (client *Client) StopEaiJupyter(request *StopEaiJupyterRequest) (response *StopEaiJupyterResponse, err error) { + response = CreateStopEaiJupyterResponse() + err = client.DoAction(request, response) + return +} + +// StopEaiJupyterWithChan invokes the eais.StopEaiJupyter API asynchronously +func (client *Client) StopEaiJupyterWithChan(request *StopEaiJupyterRequest) (<-chan *StopEaiJupyterResponse, <-chan error) { + responseChan := make(chan *StopEaiJupyterResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.StopEaiJupyter(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// StopEaiJupyterWithCallback invokes the eais.StopEaiJupyter API asynchronously +func (client *Client) StopEaiJupyterWithCallback(request *StopEaiJupyterRequest, callback func(response *StopEaiJupyterResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *StopEaiJupyterResponse + var err error + defer close(result) + response, err = client.StopEaiJupyter(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// StopEaiJupyterRequest is the request struct for api StopEaiJupyter +type StopEaiJupyterRequest struct { + *requests.RpcRequest + InstanceId string `position:"Query" name:"InstanceId"` +} + +// StopEaiJupyterResponse is the response struct for api StopEaiJupyter +type StopEaiJupyterResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + AccessDeniedDetail AccessDeniedDetail `json:"AccessDeniedDetail" xml:"AccessDeniedDetail"` +} + +// CreateStopEaiJupyterRequest creates a request to invoke StopEaiJupyter API +func CreateStopEaiJupyterRequest() (request *StopEaiJupyterRequest) { + request = &StopEaiJupyterRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("eais", "2019-06-24", "StopEaiJupyter", "eais", "openAPI") + request.Method = requests.POST + return +} + +// CreateStopEaiJupyterResponse creates a response to parse from StopEaiJupyter response +func CreateStopEaiJupyterResponse() (response *StopEaiJupyterResponse) { + response = &StopEaiJupyterResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/eais/struct_access_denied_detail.go b/services/eais/struct_access_denied_detail.go new file mode 100644 index 0000000000..a2cbacf840 --- /dev/null +++ b/services/eais/struct_access_denied_detail.go @@ -0,0 +1,27 @@ +package eais + +//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. + +// AccessDeniedDetail is a nested struct in eais response +type AccessDeniedDetail struct { + PolicyType string `json:"PolicyType" xml:"PolicyType"` + EncodedDiagnosticMessage string `json:"EncodedDiagnosticMessage" xml:"EncodedDiagnosticMessage"` + AuthAction string `json:"AuthAction" xml:"AuthAction"` + NoPermissionType string `json:"NoPermissionType" xml:"NoPermissionType"` + AuthPrincipalDisplayName string `json:"AuthPrincipalDisplayName" xml:"AuthPrincipalDisplayName"` + AuthPrincipalOwnerId string `json:"AuthPrincipalOwnerId" xml:"AuthPrincipalOwnerId"` + AuthPrincipalType string `json:"AuthPrincipalType" xml:"AuthPrincipalType"` +} diff --git a/services/eais/struct_tag_resource.go b/services/eais/struct_tag_resource.go new file mode 100644 index 0000000000..bcde824972 --- /dev/null +++ b/services/eais/struct_tag_resource.go @@ -0,0 +1,24 @@ +package eais + +//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 eais 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"` +} diff --git a/services/eais/struct_tag_resources.go b/services/eais/struct_tag_resources.go new file mode 100644 index 0000000000..02728c6091 --- /dev/null +++ b/services/eais/struct_tag_resources.go @@ -0,0 +1,21 @@ +package eais + +//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 eais response +type TagResources struct { + TagResource []TagResource `json:"TagResource" xml:"TagResource"` +} diff --git a/services/eais/tag_resources.go b/services/eais/tag_resources.go new file mode 100644 index 0000000000..98312e07fe --- /dev/null +++ b/services/eais/tag_resources.go @@ -0,0 +1,107 @@ +package eais + +//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 eais.TagResources API synchronously +func (client *Client) TagResources(request *TagResourcesRequest) (response *TagResourcesResponse, err error) { + response = CreateTagResourcesResponse() + err = client.DoAction(request, response) + return +} + +// TagResourcesWithChan invokes the eais.TagResources API asynchronously +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 eais.TagResources API asynchronously +func (client *Client) TagResourcesWithCallback(request *TagResourcesRequest, callback func(response *TagResourcesResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *TagResourcesResponse + var err error + defer close(result) + response, err = client.TagResources(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// TagResourcesRequest is the request struct for api TagResources +type TagResourcesRequest struct { + *requests.RpcRequest + ResourceId *[]string `position:"Query" name:"ResourceId" type:"Repeated"` + ResourceType string `position:"Query" name:"ResourceType"` + Tag *[]TagResourcesTag `position:"Query" name:"Tag" type:"Repeated"` +} + +// TagResourcesTag is a repeated param struct in TagResourcesRequest +type TagResourcesTag struct { + Value string `name:"Value"` + Key string `name:"Key"` +} + +// TagResourcesResponse is the response struct for api TagResources +type TagResourcesResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` +} + +// CreateTagResourcesRequest creates a request to invoke TagResources API +func CreateTagResourcesRequest() (request *TagResourcesRequest) { + request = &TagResourcesRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("eais", "2019-06-24", "TagResources", "eais", "openAPI") + request.Method = requests.POST + return +} + +// CreateTagResourcesResponse creates a response to parse from TagResources response +func CreateTagResourcesResponse() (response *TagResourcesResponse) { + response = &TagResourcesResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/eais/untag_resources.go b/services/eais/untag_resources.go new file mode 100644 index 0000000000..2ebdd34dd6 --- /dev/null +++ b/services/eais/untag_resources.go @@ -0,0 +1,102 @@ +package eais + +//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 eais.UntagResources API synchronously +func (client *Client) UntagResources(request *UntagResourcesRequest) (response *UntagResourcesResponse, err error) { + response = CreateUntagResourcesResponse() + err = client.DoAction(request, response) + return +} + +// UntagResourcesWithChan invokes the eais.UntagResources API asynchronously +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 eais.UntagResources API asynchronously +func (client *Client) UntagResourcesWithCallback(request *UntagResourcesRequest, callback func(response *UntagResourcesResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *UntagResourcesResponse + var err error + defer close(result) + response, err = client.UntagResources(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// UntagResourcesRequest is the request struct for api UntagResources +type UntagResourcesRequest struct { + *requests.RpcRequest + All requests.Boolean `position:"Query" name:"All"` + ResourceId *[]string `position:"Query" name:"ResourceId" type:"Repeated"` + ResourceType string `position:"Query" name:"ResourceType"` + TagKey *[]string `position:"Query" name:"TagKey" type:"Repeated"` +} + +// 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("eais", "2019-06-24", "UntagResources", "eais", "openAPI") + request.Method = requests.POST + return +} + +// CreateUntagResourcesResponse creates a response to parse from UntagResources response +func CreateUntagResourcesResponse() (response *UntagResourcesResponse) { + response = &UntagResourcesResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +}