瀏覽代碼

KMS SDK Auto Released By shenshi,Version:1.53.74

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

+ 3 - 0
ChangeLog.txt

@@ -1,3 +1,6 @@
+2019-03-21 Version: 1.53.74
+1, Update Dependency
+
 2019-03-21 Version: 1.53.73
 1,  Update Dependency
 

+ 0 - 0
services/kms/cancel_key_deletion.go


+ 0 - 0
services/kms/client.go


+ 1 - 1
services/kms/create_alias.go

@@ -76,8 +76,8 @@ func (client *Client) CreateAliasWithCallback(request *CreateAliasRequest, callb
 // CreateAliasRequest is the request struct for api CreateAlias
 type CreateAliasRequest struct {
 	*requests.RpcRequest
-	KeyId     string `position:"Query" name:"KeyId"`
 	AliasName string `position:"Query" name:"AliasName"`
+	KeyId     string `position:"Query" name:"KeyId"`
 	STSToken  string `position:"Query" name:"STSToken"`
 }
 

+ 2 - 2
services/kms/create_key.go

@@ -76,10 +76,10 @@ func (client *Client) CreateKeyWithCallback(request *CreateKeyRequest, callback
 // CreateKeyRequest is the request struct for api CreateKey
 type CreateKeyRequest struct {
 	*requests.RpcRequest
-	Description string `position:"Query" name:"Description"`
 	KeyUsage    string `position:"Query" name:"KeyUsage"`
-	STSToken    string `position:"Query" name:"STSToken"`
 	Origin      string `position:"Query" name:"Origin"`
+	Description string `position:"Query" name:"Description"`
+	STSToken    string `position:"Query" name:"STSToken"`
 }
 
 // CreateKeyResponse is the response struct for api CreateKey

+ 2 - 2
services/kms/decrypt.go

@@ -76,9 +76,9 @@ func (client *Client) DecryptWithCallback(request *DecryptRequest, callback func
 // DecryptRequest is the request struct for api Decrypt
 type DecryptRequest struct {
 	*requests.RpcRequest
-	CiphertextBlob    string `position:"Query" name:"CiphertextBlob"`
-	STSToken          string `position:"Query" name:"STSToken"`
 	EncryptionContext string `position:"Query" name:"EncryptionContext"`
+	STSToken          string `position:"Query" name:"STSToken"`
+	CiphertextBlob    string `position:"Query" name:"CiphertextBlob"`
 }
 
 // DecryptResponse is the response struct for api Decrypt

+ 0 - 0
services/kms/delete_alias.go


+ 0 - 0
services/kms/delete_key_material.go


+ 0 - 0
services/kms/describe_key.go


+ 0 - 0
services/kms/describe_regions.go


+ 0 - 0
services/kms/disable_key.go


+ 0 - 0
services/kms/enable_key.go


+ 2 - 2
services/kms/encrypt.go

@@ -76,10 +76,10 @@ func (client *Client) EncryptWithCallback(request *EncryptRequest, callback func
 // EncryptRequest is the request struct for api Encrypt
 type EncryptRequest struct {
 	*requests.RpcRequest
+	EncryptionContext string `position:"Query" name:"EncryptionContext"`
 	KeyId             string `position:"Query" name:"KeyId"`
-	Plaintext         string `position:"Query" name:"Plaintext"`
 	STSToken          string `position:"Query" name:"STSToken"`
-	EncryptionContext string `position:"Query" name:"EncryptionContext"`
+	Plaintext         string `position:"Query" name:"Plaintext"`
 }
 
 // EncryptResponse is the response struct for api Encrypt

+ 2 - 2
services/kms/generate_data_key.go

@@ -76,11 +76,11 @@ func (client *Client) GenerateDataKeyWithCallback(request *GenerateDataKeyReques
 // GenerateDataKeyRequest is the request struct for api GenerateDataKey
 type GenerateDataKeyRequest struct {
 	*requests.RpcRequest
+	EncryptionContext string           `position:"Query" name:"EncryptionContext"`
 	KeyId             string           `position:"Query" name:"KeyId"`
 	KeySpec           string           `position:"Query" name:"KeySpec"`
-	NumberOfBytes     requests.Integer `position:"Query" name:"NumberOfBytes"`
 	STSToken          string           `position:"Query" name:"STSToken"`
-	EncryptionContext string           `position:"Query" name:"EncryptionContext"`
+	NumberOfBytes     requests.Integer `position:"Query" name:"NumberOfBytes"`
 }
 
 // GenerateDataKeyResponse is the response struct for api GenerateDataKey

+ 0 - 0
services/kms/get_parameters_for_import.go


+ 3 - 3
services/kms/import_key_material.go

@@ -76,11 +76,11 @@ func (client *Client) ImportKeyMaterialWithCallback(request *ImportKeyMaterialRe
 // ImportKeyMaterialRequest is the request struct for api ImportKeyMaterial
 type ImportKeyMaterialRequest struct {
 	*requests.RpcRequest
-	KeyId                 string           `position:"Query" name:"KeyId"`
-	STSToken              string           `position:"Query" name:"STSToken"`
-	EncryptedKeyMaterial  string           `position:"Query" name:"EncryptedKeyMaterial"`
 	ImportToken           string           `position:"Query" name:"ImportToken"`
+	EncryptedKeyMaterial  string           `position:"Query" name:"EncryptedKeyMaterial"`
 	KeyMaterialExpireUnix requests.Integer `position:"Query" name:"KeyMaterialExpireUnix"`
+	KeyId                 string           `position:"Query" name:"KeyId"`
+	STSToken              string           `position:"Query" name:"STSToken"`
 }
 
 // ImportKeyMaterialResponse is the response struct for api ImportKeyMaterial

+ 1 - 1
services/kms/list_aliases.go

@@ -76,9 +76,9 @@ func (client *Client) ListAliasesWithCallback(request *ListAliasesRequest, callb
 // ListAliasesRequest is the request struct for api ListAliases
 type ListAliasesRequest struct {
 	*requests.RpcRequest
-	PageNumber requests.Integer `position:"Query" name:"PageNumber"`
 	PageSize   requests.Integer `position:"Query" name:"PageSize"`
 	STSToken   string           `position:"Query" name:"STSToken"`
+	PageNumber requests.Integer `position:"Query" name:"PageNumber"`
 }
 
 // ListAliasesResponse is the response struct for api ListAliases

+ 2 - 2
services/kms/list_aliases_by_key_id.go

@@ -76,10 +76,10 @@ func (client *Client) ListAliasesByKeyIdWithCallback(request *ListAliasesByKeyId
 // ListAliasesByKeyIdRequest is the request struct for api ListAliasesByKeyId
 type ListAliasesByKeyIdRequest struct {
 	*requests.RpcRequest
-	KeyId      string           `position:"Query" name:"KeyId"`
-	PageNumber requests.Integer `position:"Query" name:"PageNumber"`
 	PageSize   requests.Integer `position:"Query" name:"PageSize"`
+	KeyId      string           `position:"Query" name:"KeyId"`
 	STSToken   string           `position:"Query" name:"STSToken"`
+	PageNumber requests.Integer `position:"Query" name:"PageNumber"`
 }
 
 // ListAliasesByKeyIdResponse is the response struct for api ListAliasesByKeyId

+ 1 - 1
services/kms/list_keys.go

@@ -76,9 +76,9 @@ func (client *Client) ListKeysWithCallback(request *ListKeysRequest, callback fu
 // ListKeysRequest is the request struct for api ListKeys
 type ListKeysRequest struct {
 	*requests.RpcRequest
-	PageNumber requests.Integer `position:"Query" name:"PageNumber"`
 	PageSize   requests.Integer `position:"Query" name:"PageSize"`
 	STSToken   string           `position:"Query" name:"STSToken"`
+	PageNumber requests.Integer `position:"Query" name:"PageNumber"`
 }
 
 // ListKeysResponse is the response struct for api ListKeys

+ 105 - 0
services/kms/list_resource_tags.go

@@ -0,0 +1,105 @@
+package kms
+
+//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"
+)
+
+// ListResourceTags invokes the kms.ListResourceTags API synchronously
+// api document: https://help.aliyun.com/api/kms/listresourcetags.html
+func (client *Client) ListResourceTags(request *ListResourceTagsRequest) (response *ListResourceTagsResponse, err error) {
+	response = CreateListResourceTagsResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// ListResourceTagsWithChan invokes the kms.ListResourceTags API asynchronously
+// api document: https://help.aliyun.com/api/kms/listresourcetags.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ListResourceTagsWithChan(request *ListResourceTagsRequest) (<-chan *ListResourceTagsResponse, <-chan error) {
+	responseChan := make(chan *ListResourceTagsResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.ListResourceTags(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// ListResourceTagsWithCallback invokes the kms.ListResourceTags API asynchronously
+// api document: https://help.aliyun.com/api/kms/listresourcetags.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ListResourceTagsWithCallback(request *ListResourceTagsRequest, callback func(response *ListResourceTagsResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *ListResourceTagsResponse
+		var err error
+		defer close(result)
+		response, err = client.ListResourceTags(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// ListResourceTagsRequest is the request struct for api ListResourceTags
+type ListResourceTagsRequest struct {
+	*requests.RpcRequest
+	KeyId    string `position:"Query" name:"KeyId"`
+	STSToken string `position:"Query" name:"STSToken"`
+}
+
+// ListResourceTagsResponse is the response struct for api ListResourceTags
+type ListResourceTagsResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	Tags      Tags   `json:"Tags" xml:"Tags"`
+}
+
+// CreateListResourceTagsRequest creates a request to invoke ListResourceTags API
+func CreateListResourceTagsRequest() (request *ListResourceTagsRequest) {
+	request = &ListResourceTagsRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Kms", "2016-01-20", "ListResourceTags", "kms", "openAPI")
+	return
+}
+
+// CreateListResourceTagsResponse creates a response to parse from ListResourceTags response
+func CreateListResourceTagsResponse() (response *ListResourceTagsResponse) {
+	response = &ListResourceTagsResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 1 - 1
services/kms/schedule_key_deletion.go

@@ -76,8 +76,8 @@ func (client *Client) ScheduleKeyDeletionWithCallback(request *ScheduleKeyDeleti
 // ScheduleKeyDeletionRequest is the request struct for api ScheduleKeyDeletion
 type ScheduleKeyDeletionRequest struct {
 	*requests.RpcRequest
-	KeyId               string           `position:"Query" name:"KeyId"`
 	PendingWindowInDays requests.Integer `position:"Query" name:"PendingWindowInDays"`
+	KeyId               string           `position:"Query" name:"KeyId"`
 	STSToken            string           `position:"Query" name:"STSToken"`
 }
 

+ 0 - 0
services/kms/struct_alias.go


+ 0 - 0
services/kms/struct_aliases_in_list_aliases.go


+ 0 - 0
services/kms/struct_aliases_in_list_aliases_by_key_id.go


+ 0 - 0
services/kms/struct_key.go


+ 0 - 0
services/kms/struct_key_metadata.go


+ 0 - 0
services/kms/struct_keys.go


+ 0 - 0
services/kms/struct_region.go


+ 0 - 0
services/kms/struct_regions.go


+ 23 - 0
services/kms/struct_tag.go

@@ -0,0 +1,23 @@
+package kms
+
+//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.
+
+// Tag is a nested struct in kms response
+type Tag struct {
+	KeyId    string `json:"KeyId" xml:"KeyId"`
+	TagKey   string `json:"TagKey" xml:"TagKey"`
+	TagValue string `json:"TagValue" xml:"TagValue"`
+}

+ 21 - 0
services/kms/struct_tags.go

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

+ 105 - 0
services/kms/tag_resource.go

@@ -0,0 +1,105 @@
+package kms
+
+//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"
+)
+
+// TagResource invokes the kms.TagResource API synchronously
+// api document: https://help.aliyun.com/api/kms/tagresource.html
+func (client *Client) TagResource(request *TagResourceRequest) (response *TagResourceResponse, err error) {
+	response = CreateTagResourceResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// TagResourceWithChan invokes the kms.TagResource API asynchronously
+// api document: https://help.aliyun.com/api/kms/tagresource.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) TagResourceWithChan(request *TagResourceRequest) (<-chan *TagResourceResponse, <-chan error) {
+	responseChan := make(chan *TagResourceResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.TagResource(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// TagResourceWithCallback invokes the kms.TagResource API asynchronously
+// api document: https://help.aliyun.com/api/kms/tagresource.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) TagResourceWithCallback(request *TagResourceRequest, callback func(response *TagResourceResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *TagResourceResponse
+		var err error
+		defer close(result)
+		response, err = client.TagResource(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// TagResourceRequest is the request struct for api TagResource
+type TagResourceRequest struct {
+	*requests.RpcRequest
+	KeyId    string `position:"Query" name:"KeyId"`
+	STSToken string `position:"Query" name:"STSToken"`
+	Tags     string `position:"Query" name:"Tags"`
+}
+
+// TagResourceResponse is the response struct for api TagResource
+type TagResourceResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateTagResourceRequest creates a request to invoke TagResource API
+func CreateTagResourceRequest() (request *TagResourceRequest) {
+	request = &TagResourceRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Kms", "2016-01-20", "TagResource", "kms", "openAPI")
+	return
+}
+
+// CreateTagResourceResponse creates a response to parse from TagResource response
+func CreateTagResourceResponse() (response *TagResourceResponse) {
+	response = &TagResourceResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 105 - 0
services/kms/untag_resource.go

@@ -0,0 +1,105 @@
+package kms
+
+//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"
+)
+
+// UntagResource invokes the kms.UntagResource API synchronously
+// api document: https://help.aliyun.com/api/kms/untagresource.html
+func (client *Client) UntagResource(request *UntagResourceRequest) (response *UntagResourceResponse, err error) {
+	response = CreateUntagResourceResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// UntagResourceWithChan invokes the kms.UntagResource API asynchronously
+// api document: https://help.aliyun.com/api/kms/untagresource.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UntagResourceWithChan(request *UntagResourceRequest) (<-chan *UntagResourceResponse, <-chan error) {
+	responseChan := make(chan *UntagResourceResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.UntagResource(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// UntagResourceWithCallback invokes the kms.UntagResource API asynchronously
+// api document: https://help.aliyun.com/api/kms/untagresource.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UntagResourceWithCallback(request *UntagResourceRequest, callback func(response *UntagResourceResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *UntagResourceResponse
+		var err error
+		defer close(result)
+		response, err = client.UntagResource(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// UntagResourceRequest is the request struct for api UntagResource
+type UntagResourceRequest struct {
+	*requests.RpcRequest
+	TagKeys  string `position:"Query" name:"TagKeys"`
+	KeyId    string `position:"Query" name:"KeyId"`
+	STSToken string `position:"Query" name:"STSToken"`
+}
+
+// UntagResourceResponse is the response struct for api UntagResource
+type UntagResourceResponse struct {
+	*responses.BaseResponse
+	KeyId string `json:"KeyId" xml:"KeyId"`
+}
+
+// CreateUntagResourceRequest creates a request to invoke UntagResource API
+func CreateUntagResourceRequest() (request *UntagResourceRequest) {
+	request = &UntagResourceRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Kms", "2016-01-20", "UntagResource", "kms", "openAPI")
+	return
+}
+
+// CreateUntagResourceResponse creates a response to parse from UntagResource response
+func CreateUntagResourceResponse() (response *UntagResourceResponse) {
+	response = &UntagResourceResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 1 - 1
services/kms/update_alias.go

@@ -76,8 +76,8 @@ func (client *Client) UpdateAliasWithCallback(request *UpdateAliasRequest, callb
 // UpdateAliasRequest is the request struct for api UpdateAlias
 type UpdateAliasRequest struct {
 	*requests.RpcRequest
-	KeyId     string `position:"Query" name:"KeyId"`
 	AliasName string `position:"Query" name:"AliasName"`
+	KeyId     string `position:"Query" name:"KeyId"`
 	STSToken  string `position:"Query" name:"STSToken"`
 }