Browse Source

Update tag related api to publically visable.

sdk-team 6 years ago
parent
commit
fcf2d93158

+ 3 - 0
ChangeLog.txt

@@ -1,3 +1,6 @@
+2019-12-16 Version: v1.60.291
+- Update tag related api to publically visable.
+
 2019-12-14 Version: v1.60.290
 - Generated 2015-01-01 for `R-kvstore`.
 

+ 110 - 0
services/yundun_bastionhost/list_tag_keys.go

@@ -0,0 +1,110 @@
+package yundun_bastionhost
+
+//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 yundun_bastionhost.ListTagKeys API synchronously
+// api document: https://help.aliyun.com/api/yundun-bastionhost/listtagkeys.html
+func (client *Client) ListTagKeys(request *ListTagKeysRequest) (response *ListTagKeysResponse, err error) {
+	response = CreateListTagKeysResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// ListTagKeysWithChan invokes the yundun_bastionhost.ListTagKeys API asynchronously
+// api document: https://help.aliyun.com/api/yundun-bastionhost/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 yundun_bastionhost.ListTagKeys API asynchronously
+// api document: https://help.aliyun.com/api/yundun-bastionhost/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
+	CurrentPage  requests.Integer `position:"Query" name:"CurrentPage"`
+	ResourceType string           `position:"Query" name:"ResourceType"`
+	SourceIp     string           `position:"Query" name:"SourceIp"`
+	PageSize     requests.Integer `position:"Query" name:"PageSize"`
+}
+
+// ListTagKeysResponse is the response struct for api ListTagKeys
+type ListTagKeysResponse struct {
+	*responses.BaseResponse
+	RequestId   string   `json:"RequestId" xml:"RequestId"`
+	CurrentPage int      `json:"CurrentPage" xml:"CurrentPage"`
+	PageSize    int      `json:"PageSize" xml:"PageSize"`
+	TotalCount  int      `json:"TotalCount" xml:"TotalCount"`
+	TagKeys     []TagKey `json:"TagKeys" xml:"TagKeys"`
+}
+
+// CreateListTagKeysRequest creates a request to invoke ListTagKeys API
+func CreateListTagKeysRequest() (request *ListTagKeysRequest) {
+	request = &ListTagKeysRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Yundun-bastionhost", "2018-10-10", "ListTagKeys", "bastionhost", "openAPI")
+	return
+}
+
+// CreateListTagKeysResponse creates a response to parse from ListTagKeys response
+func CreateListTagKeysResponse() (response *ListTagKeysResponse) {
+	response = &ListTagKeysResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 115 - 0
services/yundun_bastionhost/list_tag_resources.go

@@ -0,0 +1,115 @@
+package yundun_bastionhost
+
+//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 yundun_bastionhost.ListTagResources API synchronously
+// api document: https://help.aliyun.com/api/yundun-bastionhost/listtagresources.html
+func (client *Client) ListTagResources(request *ListTagResourcesRequest) (response *ListTagResourcesResponse, err error) {
+	response = CreateListTagResourcesResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// ListTagResourcesWithChan invokes the yundun_bastionhost.ListTagResources API asynchronously
+// api document: https://help.aliyun.com/api/yundun-bastionhost/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 yundun_bastionhost.ListTagResources API asynchronously
+// api document: https://help.aliyun.com/api/yundun-bastionhost/listtagresources.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ListTagResourcesWithCallback(request *ListTagResourcesRequest, callback func(response *ListTagResourcesResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *ListTagResourcesResponse
+		var err error
+		defer close(result)
+		response, err = client.ListTagResources(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// ListTagResourcesRequest is the request struct for api ListTagResources
+type ListTagResourcesRequest struct {
+	*requests.RpcRequest
+	ResourceId   *[]string              `position:"Query" name:"ResourceId"  type:"Repeated"`
+	ResourceType string                 `position:"Query" name:"ResourceType"`
+	SourceIp     string                 `position:"Query" name:"SourceIp"`
+	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 TagResources `json:"TagResources" xml:"TagResources"`
+}
+
+// CreateListTagResourcesRequest creates a request to invoke ListTagResources API
+func CreateListTagResourcesRequest() (request *ListTagResourcesRequest) {
+	request = &ListTagResourcesRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Yundun-bastionhost", "2018-10-10", "ListTagResources", "bastionhost", "openAPI")
+	return
+}
+
+// CreateListTagResourcesResponse creates a response to parse from ListTagResources response
+func CreateListTagResourcesResponse() (response *ListTagResourcesResponse) {
+	response = &ListTagResourcesResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 22 - 0
services/yundun_bastionhost/struct_tag_key.go

@@ -0,0 +1,22 @@
+package yundun_bastionhost
+
+//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.
+
+// TagKey is a nested struct in yundun_bastionhost response
+type TagKey struct {
+	TagKey   string `json:"TagKey" xml:"TagKey"`
+	TagCount int    `json:"TagCount" xml:"TagCount"`
+}

+ 21 - 0
services/yundun_bastionhost/struct_tag_keys.go

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

+ 24 - 0
services/yundun_bastionhost/struct_tag_resource.go

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

+ 21 - 0
services/yundun_bastionhost/struct_tag_resources.go

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

+ 112 - 0
services/yundun_bastionhost/tag_resources.go

@@ -0,0 +1,112 @@
+package yundun_bastionhost
+
+//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 yundun_bastionhost.TagResources API synchronously
+// api document: https://help.aliyun.com/api/yundun-bastionhost/tagresources.html
+func (client *Client) TagResources(request *TagResourcesRequest) (response *TagResourcesResponse, err error) {
+	response = CreateTagResourcesResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// TagResourcesWithChan invokes the yundun_bastionhost.TagResources API asynchronously
+// api document: https://help.aliyun.com/api/yundun-bastionhost/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 yundun_bastionhost.TagResources API asynchronously
+// api document: https://help.aliyun.com/api/yundun-bastionhost/tagresources.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) TagResourcesWithCallback(request *TagResourcesRequest, callback func(response *TagResourcesResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *TagResourcesResponse
+		var err error
+		defer close(result)
+		response, err = client.TagResources(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// TagResourcesRequest is the request struct for api TagResources
+type TagResourcesRequest struct {
+	*requests.RpcRequest
+	ResourceId   *[]string          `position:"Query" name:"ResourceId"  type:"Repeated"`
+	ResourceType string             `position:"Query" name:"ResourceType"`
+	SourceIp     string             `position:"Query" name:"SourceIp"`
+	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("Yundun-bastionhost", "2018-10-10", "TagResources", "bastionhost", "openAPI")
+	return
+}
+
+// CreateTagResourcesResponse creates a response to parse from TagResources response
+func CreateTagResourcesResponse() (response *TagResourcesResponse) {
+	response = &TagResourcesResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 107 - 0
services/yundun_bastionhost/untag_resources.go

@@ -0,0 +1,107 @@
+package yundun_bastionhost
+
+//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 yundun_bastionhost.UntagResources API synchronously
+// api document: https://help.aliyun.com/api/yundun-bastionhost/untagresources.html
+func (client *Client) UntagResources(request *UntagResourcesRequest) (response *UntagResourcesResponse, err error) {
+	response = CreateUntagResourcesResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// UntagResourcesWithChan invokes the yundun_bastionhost.UntagResources API asynchronously
+// api document: https://help.aliyun.com/api/yundun-bastionhost/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 yundun_bastionhost.UntagResources API asynchronously
+// api document: https://help.aliyun.com/api/yundun-bastionhost/untagresources.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UntagResourcesWithCallback(request *UntagResourcesRequest, callback func(response *UntagResourcesResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *UntagResourcesResponse
+		var err error
+		defer close(result)
+		response, err = client.UntagResources(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// UntagResourcesRequest is the request struct for api UntagResources
+type UntagResourcesRequest struct {
+	*requests.RpcRequest
+	All          requests.Boolean `position:"Query" name:"All"`
+	ResourceId   *[]string        `position:"Query" name:"ResourceId"  type:"Repeated"`
+	ResourceType string           `position:"Query" name:"ResourceType"`
+	SourceIp     string           `position:"Query" name:"SourceIp"`
+	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("Yundun-bastionhost", "2018-10-10", "UntagResources", "bastionhost", "openAPI")
+	return
+}
+
+// CreateUntagResourcesResponse creates a response to parse from UntagResources response
+func CreateUntagResourcesResponse() (response *UntagResourcesResponse) {
+	response = &UntagResourcesResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}