Browse Source

Generated 2016-01-20 for Kms.

sdk-team 5 years ago
parent
commit
f868758e87

+ 4 - 0
ChangeLog.txt

@@ -1,3 +1,7 @@
+2020-02-28 Version: v1.61.16
+- Generated 2016-01-20 for `Kms`.
+- Supported secretmanager for kms.
+
 2020-02-28 Version: v1.61.15
 - Generated 2016-04-28 for `Vpc`.
 - Supported for eip operation idempotence.

+ 112 - 0
services/kms/create_secret.go

@@ -0,0 +1,112 @@
+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"
+)
+
+// CreateSecret invokes the kms.CreateSecret API synchronously
+// api document: https://help.aliyun.com/api/kms/createsecret.html
+func (client *Client) CreateSecret(request *CreateSecretRequest) (response *CreateSecretResponse, err error) {
+	response = CreateCreateSecretResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// CreateSecretWithChan invokes the kms.CreateSecret API asynchronously
+// api document: https://help.aliyun.com/api/kms/createsecret.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CreateSecretWithChan(request *CreateSecretRequest) (<-chan *CreateSecretResponse, <-chan error) {
+	responseChan := make(chan *CreateSecretResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.CreateSecret(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// CreateSecretWithCallback invokes the kms.CreateSecret API asynchronously
+// api document: https://help.aliyun.com/api/kms/createsecret.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CreateSecretWithCallback(request *CreateSecretRequest, callback func(response *CreateSecretResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *CreateSecretResponse
+		var err error
+		defer close(result)
+		response, err = client.CreateSecret(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// CreateSecretRequest is the request struct for api CreateSecret
+type CreateSecretRequest struct {
+	*requests.RpcRequest
+	VersionId       string `position:"Query" name:"VersionId"`
+	SecretData      string `position:"Query" name:"SecretData"`
+	Description     string `position:"Query" name:"Description"`
+	SecretName      string `position:"Query" name:"SecretName"`
+	EncryptionKeyId string `position:"Query" name:"EncryptionKeyId"`
+	SecretDataType  string `position:"Query" name:"SecretDataType"`
+	Tags            string `position:"Query" name:"Tags"`
+}
+
+// CreateSecretResponse is the response struct for api CreateSecret
+type CreateSecretResponse struct {
+	*responses.BaseResponse
+	RequestId  string `json:"RequestId" xml:"RequestId"`
+	Arn        string `json:"Arn" xml:"Arn"`
+	VersionId  string `json:"VersionId" xml:"VersionId"`
+	SecretName string `json:"SecretName" xml:"SecretName"`
+}
+
+// CreateCreateSecretRequest creates a request to invoke CreateSecret API
+func CreateCreateSecretRequest() (request *CreateSecretRequest) {
+	request = &CreateSecretRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Kms", "2016-01-20", "CreateSecret", "kms", "openAPI")
+	return
+}
+
+// CreateCreateSecretResponse creates a response to parse from CreateSecret response
+func CreateCreateSecretResponse() (response *CreateSecretResponse) {
+	response = &CreateSecretResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 107 - 0
services/kms/delete_secret.go

@@ -0,0 +1,107 @@
+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"
+)
+
+// DeleteSecret invokes the kms.DeleteSecret API synchronously
+// api document: https://help.aliyun.com/api/kms/deletesecret.html
+func (client *Client) DeleteSecret(request *DeleteSecretRequest) (response *DeleteSecretResponse, err error) {
+	response = CreateDeleteSecretResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DeleteSecretWithChan invokes the kms.DeleteSecret API asynchronously
+// api document: https://help.aliyun.com/api/kms/deletesecret.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteSecretWithChan(request *DeleteSecretRequest) (<-chan *DeleteSecretResponse, <-chan error) {
+	responseChan := make(chan *DeleteSecretResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DeleteSecret(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DeleteSecretWithCallback invokes the kms.DeleteSecret API asynchronously
+// api document: https://help.aliyun.com/api/kms/deletesecret.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteSecretWithCallback(request *DeleteSecretRequest, callback func(response *DeleteSecretResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DeleteSecretResponse
+		var err error
+		defer close(result)
+		response, err = client.DeleteSecret(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DeleteSecretRequest is the request struct for api DeleteSecret
+type DeleteSecretRequest struct {
+	*requests.RpcRequest
+	ForceDeleteWithoutRecovery string `position:"Query" name:"ForceDeleteWithoutRecovery"`
+	RecoveryWindowInDays       string `position:"Query" name:"RecoveryWindowInDays"`
+	SecretName                 string `position:"Query" name:"SecretName"`
+}
+
+// DeleteSecretResponse is the response struct for api DeleteSecret
+type DeleteSecretResponse struct {
+	*responses.BaseResponse
+	RequestId         string `json:"RequestId" xml:"RequestId"`
+	SecretName        string `json:"SecretName" xml:"SecretName"`
+	PlannedDeleteTime string `json:"PlannedDeleteTime" xml:"PlannedDeleteTime"`
+}
+
+// CreateDeleteSecretRequest creates a request to invoke DeleteSecret API
+func CreateDeleteSecretRequest() (request *DeleteSecretRequest) {
+	request = &DeleteSecretRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Kms", "2016-01-20", "DeleteSecret", "kms", "openAPI")
+	return
+}
+
+// CreateDeleteSecretResponse creates a response to parse from DeleteSecret response
+func CreateDeleteSecretResponse() (response *DeleteSecretResponse) {
+	response = &DeleteSecretResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 112 - 0
services/kms/describe_secret.go

@@ -0,0 +1,112 @@
+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"
+)
+
+// DescribeSecret invokes the kms.DescribeSecret API synchronously
+// api document: https://help.aliyun.com/api/kms/describesecret.html
+func (client *Client) DescribeSecret(request *DescribeSecretRequest) (response *DescribeSecretResponse, err error) {
+	response = CreateDescribeSecretResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DescribeSecretWithChan invokes the kms.DescribeSecret API asynchronously
+// api document: https://help.aliyun.com/api/kms/describesecret.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeSecretWithChan(request *DescribeSecretRequest) (<-chan *DescribeSecretResponse, <-chan error) {
+	responseChan := make(chan *DescribeSecretResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DescribeSecret(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DescribeSecretWithCallback invokes the kms.DescribeSecret API asynchronously
+// api document: https://help.aliyun.com/api/kms/describesecret.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeSecretWithCallback(request *DescribeSecretRequest, callback func(response *DescribeSecretResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DescribeSecretResponse
+		var err error
+		defer close(result)
+		response, err = client.DescribeSecret(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DescribeSecretRequest is the request struct for api DescribeSecret
+type DescribeSecretRequest struct {
+	*requests.RpcRequest
+	SecretName string `position:"Query" name:"SecretName"`
+	FetchTags  string `position:"Query" name:"FetchTags"`
+}
+
+// DescribeSecretResponse is the response struct for api DescribeSecret
+type DescribeSecretResponse struct {
+	*responses.BaseResponse
+	RequestId         string `json:"RequestId" xml:"RequestId"`
+	Arn               string `json:"Arn" xml:"Arn"`
+	SecretName        string `json:"SecretName" xml:"SecretName"`
+	EncryptionKeyId   string `json:"EncryptionKeyId" xml:"EncryptionKeyId"`
+	Description       string `json:"Description" xml:"Description"`
+	CreateTime        string `json:"CreateTime" xml:"CreateTime"`
+	UpdateTime        string `json:"UpdateTime" xml:"UpdateTime"`
+	PlannedDeleteTime string `json:"PlannedDeleteTime" xml:"PlannedDeleteTime"`
+	Tags              []Tag  `json:"Tags" xml:"Tags"`
+}
+
+// CreateDescribeSecretRequest creates a request to invoke DescribeSecret API
+func CreateDescribeSecretRequest() (request *DescribeSecretRequest) {
+	request = &DescribeSecretRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Kms", "2016-01-20", "DescribeSecret", "kms", "openAPI")
+	return
+}
+
+// CreateDescribeSecretResponse creates a response to parse from DescribeSecret response
+func CreateDescribeSecretResponse() (response *DescribeSecretResponse) {
+	response = &DescribeSecretResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 1 - 0
services/kms/describe_service.go

@@ -83,6 +83,7 @@ type DescribeServiceResponse struct {
 	*responses.BaseResponse
 	RequestId        string           `json:"RequestId" xml:"RequestId"`
 	ProtectionLevels ProtectionLevels `json:"ProtectionLevels" xml:"ProtectionLevels"`
+	KeySpecs         KeySpecs         `json:"KeySpecs" xml:"KeySpecs"`
 }
 
 // CreateDescribeServiceRequest creates a request to invoke DescribeService API

+ 110 - 0
services/kms/get_random_password.go

@@ -0,0 +1,110 @@
+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"
+)
+
+// GetRandomPassword invokes the kms.GetRandomPassword API synchronously
+// api document: https://help.aliyun.com/api/kms/getrandompassword.html
+func (client *Client) GetRandomPassword(request *GetRandomPasswordRequest) (response *GetRandomPasswordResponse, err error) {
+	response = CreateGetRandomPasswordResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// GetRandomPasswordWithChan invokes the kms.GetRandomPassword API asynchronously
+// api document: https://help.aliyun.com/api/kms/getrandompassword.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetRandomPasswordWithChan(request *GetRandomPasswordRequest) (<-chan *GetRandomPasswordResponse, <-chan error) {
+	responseChan := make(chan *GetRandomPasswordResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.GetRandomPassword(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// GetRandomPasswordWithCallback invokes the kms.GetRandomPassword API asynchronously
+// api document: https://help.aliyun.com/api/kms/getrandompassword.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetRandomPasswordWithCallback(request *GetRandomPasswordRequest, callback func(response *GetRandomPasswordResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *GetRandomPasswordResponse
+		var err error
+		defer close(result)
+		response, err = client.GetRandomPassword(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// GetRandomPasswordRequest is the request struct for api GetRandomPassword
+type GetRandomPasswordRequest struct {
+	*requests.RpcRequest
+	ExcludeLowercase        string `position:"Query" name:"ExcludeLowercase"`
+	ExcludeCharacters       string `position:"Query" name:"ExcludeCharacters"`
+	PasswordLength          string `position:"Query" name:"PasswordLength"`
+	ExcludePunctuation      string `position:"Query" name:"ExcludePunctuation"`
+	ExcludeUppercase        string `position:"Query" name:"ExcludeUppercase"`
+	RequireEachIncludedType string `position:"Query" name:"RequireEachIncludedType"`
+	ExcludeNumbers          string `position:"Query" name:"ExcludeNumbers"`
+}
+
+// GetRandomPasswordResponse is the response struct for api GetRandomPassword
+type GetRandomPasswordResponse struct {
+	*responses.BaseResponse
+	RequestId      string `json:"RequestId" xml:"RequestId"`
+	RandomPassword string `json:"RandomPassword" xml:"RandomPassword"`
+}
+
+// CreateGetRandomPasswordRequest creates a request to invoke GetRandomPassword API
+func CreateGetRandomPasswordRequest() (request *GetRandomPasswordRequest) {
+	request = &GetRandomPasswordRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Kms", "2016-01-20", "GetRandomPassword", "kms", "openAPI")
+	return
+}
+
+// CreateGetRandomPasswordResponse creates a response to parse from GetRandomPassword response
+func CreateGetRandomPasswordResponse() (response *GetRandomPasswordResponse) {
+	response = &GetRandomPasswordResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 111 - 0
services/kms/get_secret_value.go

@@ -0,0 +1,111 @@
+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"
+)
+
+// GetSecretValue invokes the kms.GetSecretValue API synchronously
+// api document: https://help.aliyun.com/api/kms/getsecretvalue.html
+func (client *Client) GetSecretValue(request *GetSecretValueRequest) (response *GetSecretValueResponse, err error) {
+	response = CreateGetSecretValueResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// GetSecretValueWithChan invokes the kms.GetSecretValue API asynchronously
+// api document: https://help.aliyun.com/api/kms/getsecretvalue.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetSecretValueWithChan(request *GetSecretValueRequest) (<-chan *GetSecretValueResponse, <-chan error) {
+	responseChan := make(chan *GetSecretValueResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.GetSecretValue(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// GetSecretValueWithCallback invokes the kms.GetSecretValue API asynchronously
+// api document: https://help.aliyun.com/api/kms/getsecretvalue.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetSecretValueWithCallback(request *GetSecretValueRequest, callback func(response *GetSecretValueResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *GetSecretValueResponse
+		var err error
+		defer close(result)
+		response, err = client.GetSecretValue(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// GetSecretValueRequest is the request struct for api GetSecretValue
+type GetSecretValueRequest struct {
+	*requests.RpcRequest
+	VersionId    string `position:"Query" name:"VersionId"`
+	VersionStage string `position:"Query" name:"VersionStage"`
+	SecretName   string `position:"Query" name:"SecretName"`
+}
+
+// GetSecretValueResponse is the response struct for api GetSecretValue
+type GetSecretValueResponse struct {
+	*responses.BaseResponse
+	RequestId      string   `json:"RequestId" xml:"RequestId"`
+	SecretName     string   `json:"SecretName" xml:"SecretName"`
+	VersionId      string   `json:"VersionId" xml:"VersionId"`
+	CreateTime     string   `json:"CreateTime" xml:"CreateTime"`
+	SecretData     string   `json:"SecretData" xml:"SecretData"`
+	SecretDataType string   `json:"SecretDataType" xml:"SecretDataType"`
+	VersionStages  []string `json:"VersionStages" xml:"VersionStages"`
+}
+
+// CreateGetSecretValueRequest creates a request to invoke GetSecretValue API
+func CreateGetSecretValueRequest() (request *GetSecretValueRequest) {
+	request = &GetSecretValueRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Kms", "2016-01-20", "GetSecretValue", "kms", "openAPI")
+	return
+}
+
+// CreateGetSecretValueResponse creates a response to parse from GetSecretValue response
+func CreateGetSecretValueResponse() (response *GetSecretValueResponse) {
+	response = &GetSecretValueResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 2 - 2
services/kms/list_resource_tags.go

@@ -82,8 +82,8 @@ type ListResourceTagsRequest struct {
 // 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"`
+	RequestId string                 `json:"RequestId" xml:"RequestId"`
+	Tags      TagsInListResourceTags `json:"Tags" xml:"Tags"`
 }
 
 // CreateListResourceTagsRequest creates a request to invoke ListResourceTags API

+ 111 - 0
services/kms/list_secret_version_ids.go

@@ -0,0 +1,111 @@
+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"
+)
+
+// ListSecretVersionIds invokes the kms.ListSecretVersionIds API synchronously
+// api document: https://help.aliyun.com/api/kms/listsecretversionids.html
+func (client *Client) ListSecretVersionIds(request *ListSecretVersionIdsRequest) (response *ListSecretVersionIdsResponse, err error) {
+	response = CreateListSecretVersionIdsResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// ListSecretVersionIdsWithChan invokes the kms.ListSecretVersionIds API asynchronously
+// api document: https://help.aliyun.com/api/kms/listsecretversionids.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ListSecretVersionIdsWithChan(request *ListSecretVersionIdsRequest) (<-chan *ListSecretVersionIdsResponse, <-chan error) {
+	responseChan := make(chan *ListSecretVersionIdsResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.ListSecretVersionIds(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// ListSecretVersionIdsWithCallback invokes the kms.ListSecretVersionIds API asynchronously
+// api document: https://help.aliyun.com/api/kms/listsecretversionids.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ListSecretVersionIdsWithCallback(request *ListSecretVersionIdsRequest, callback func(response *ListSecretVersionIdsResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *ListSecretVersionIdsResponse
+		var err error
+		defer close(result)
+		response, err = client.ListSecretVersionIds(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// ListSecretVersionIdsRequest is the request struct for api ListSecretVersionIds
+type ListSecretVersionIdsRequest struct {
+	*requests.RpcRequest
+	IncludeDeprecated string           `position:"Query" name:"IncludeDeprecated"`
+	PageSize          requests.Integer `position:"Query" name:"PageSize"`
+	SecretName        string           `position:"Query" name:"SecretName"`
+	PageNumber        requests.Integer `position:"Query" name:"PageNumber"`
+}
+
+// ListSecretVersionIdsResponse is the response struct for api ListSecretVersionIds
+type ListSecretVersionIdsResponse struct {
+	*responses.BaseResponse
+	PageNumber int         `json:"PageNumber" xml:"PageNumber"`
+	PageSize   int         `json:"PageSize" xml:"PageSize"`
+	RequestId  string      `json:"RequestId" xml:"RequestId"`
+	SecretName string      `json:"SecretName" xml:"SecretName"`
+	TotalCount int         `json:"TotalCount" xml:"TotalCount"`
+	VersionIds []VersionId `json:"VersionIds" xml:"VersionIds"`
+}
+
+// CreateListSecretVersionIdsRequest creates a request to invoke ListSecretVersionIds API
+func CreateListSecretVersionIdsRequest() (request *ListSecretVersionIdsRequest) {
+	request = &ListSecretVersionIdsRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Kms", "2016-01-20", "ListSecretVersionIds", "kms", "openAPI")
+	return
+}
+
+// CreateListSecretVersionIdsResponse creates a response to parse from ListSecretVersionIds response
+func CreateListSecretVersionIdsResponse() (response *ListSecretVersionIdsResponse) {
+	response = &ListSecretVersionIdsResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 109 - 0
services/kms/list_secrets.go

@@ -0,0 +1,109 @@
+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"
+)
+
+// ListSecrets invokes the kms.ListSecrets API synchronously
+// api document: https://help.aliyun.com/api/kms/listsecrets.html
+func (client *Client) ListSecrets(request *ListSecretsRequest) (response *ListSecretsResponse, err error) {
+	response = CreateListSecretsResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// ListSecretsWithChan invokes the kms.ListSecrets API asynchronously
+// api document: https://help.aliyun.com/api/kms/listsecrets.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ListSecretsWithChan(request *ListSecretsRequest) (<-chan *ListSecretsResponse, <-chan error) {
+	responseChan := make(chan *ListSecretsResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.ListSecrets(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// ListSecretsWithCallback invokes the kms.ListSecrets API asynchronously
+// api document: https://help.aliyun.com/api/kms/listsecrets.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ListSecretsWithCallback(request *ListSecretsRequest, callback func(response *ListSecretsResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *ListSecretsResponse
+		var err error
+		defer close(result)
+		response, err = client.ListSecrets(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// ListSecretsRequest is the request struct for api ListSecrets
+type ListSecretsRequest struct {
+	*requests.RpcRequest
+	PageSize   requests.Integer `position:"Query" name:"PageSize"`
+	FetchTags  string           `position:"Query" name:"FetchTags"`
+	PageNumber requests.Integer `position:"Query" name:"PageNumber"`
+}
+
+// ListSecretsResponse is the response struct for api ListSecrets
+type ListSecretsResponse struct {
+	*responses.BaseResponse
+	RequestId  string   `json:"RequestId" xml:"RequestId"`
+	PageNumber int      `json:"PageNumber" xml:"PageNumber"`
+	PageSize   int      `json:"PageSize" xml:"PageSize"`
+	TotalCount int      `json:"TotalCount" xml:"TotalCount"`
+	SecretList []Secret `json:"SecretList" xml:"SecretList"`
+}
+
+// CreateListSecretsRequest creates a request to invoke ListSecrets API
+func CreateListSecretsRequest() (request *ListSecretsRequest) {
+	request = &ListSecretsRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Kms", "2016-01-20", "ListSecrets", "kms", "openAPI")
+	return
+}
+
+// CreateListSecretsResponse creates a response to parse from ListSecrets response
+func CreateListSecretsResponse() (response *ListSecretsResponse) {
+	response = &ListSecretsResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 110 - 0
services/kms/put_secret_value.go

@@ -0,0 +1,110 @@
+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"
+)
+
+// PutSecretValue invokes the kms.PutSecretValue API synchronously
+// api document: https://help.aliyun.com/api/kms/putsecretvalue.html
+func (client *Client) PutSecretValue(request *PutSecretValueRequest) (response *PutSecretValueResponse, err error) {
+	response = CreatePutSecretValueResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// PutSecretValueWithChan invokes the kms.PutSecretValue API asynchronously
+// api document: https://help.aliyun.com/api/kms/putsecretvalue.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) PutSecretValueWithChan(request *PutSecretValueRequest) (<-chan *PutSecretValueResponse, <-chan error) {
+	responseChan := make(chan *PutSecretValueResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.PutSecretValue(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// PutSecretValueWithCallback invokes the kms.PutSecretValue API asynchronously
+// api document: https://help.aliyun.com/api/kms/putsecretvalue.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) PutSecretValueWithCallback(request *PutSecretValueRequest, callback func(response *PutSecretValueResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *PutSecretValueResponse
+		var err error
+		defer close(result)
+		response, err = client.PutSecretValue(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// PutSecretValueRequest is the request struct for api PutSecretValue
+type PutSecretValueRequest struct {
+	*requests.RpcRequest
+	VersionId      string `position:"Query" name:"VersionId"`
+	VersionStages  string `position:"Query" name:"VersionStages"`
+	SecretData     string `position:"Query" name:"SecretData"`
+	SecretName     string `position:"Query" name:"SecretName"`
+	SecretDataType string `position:"Query" name:"SecretDataType"`
+}
+
+// PutSecretValueResponse is the response struct for api PutSecretValue
+type PutSecretValueResponse struct {
+	*responses.BaseResponse
+	RequestId     string   `json:"RequestId" xml:"RequestId"`
+	SecretName    string   `json:"SecretName" xml:"SecretName"`
+	VersionId     string   `json:"VersionId" xml:"VersionId"`
+	VersionStages []string `json:"VersionStages" xml:"VersionStages"`
+}
+
+// CreatePutSecretValueRequest creates a request to invoke PutSecretValue API
+func CreatePutSecretValueRequest() (request *PutSecretValueRequest) {
+	request = &PutSecretValueRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Kms", "2016-01-20", "PutSecretValue", "kms", "openAPI")
+	return
+}
+
+// CreatePutSecretValueResponse creates a response to parse from PutSecretValue response
+func CreatePutSecretValueResponse() (response *PutSecretValueResponse) {
+	response = &PutSecretValueResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 104 - 0
services/kms/restore_secret.go

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

+ 23 - 0
services/kms/struct_key_spec.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.
+
+// KeySpec is a nested struct in kms response
+type KeySpec struct {
+	Name                      string                    `json:"Name" xml:"Name"`
+	SupportedProtectionLevels SupportedProtectionLevels `json:"SupportedProtectionLevels" xml:"SupportedProtectionLevels"`
+	Usages                    Usages                    `json:"Usages" xml:"Usages"`
+}

+ 21 - 0
services/kms/struct_key_specs.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.
+
+// KeySpecs is a nested struct in kms response
+type KeySpecs struct {
+	KeySpec []KeySpec `json:"KeySpec" xml:"KeySpec"`
+}

+ 25 - 0
services/kms/struct_secret.go

@@ -0,0 +1,25 @@
+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.
+
+// Secret is a nested struct in kms response
+type Secret struct {
+	SecretName        string `json:"SecretName" xml:"SecretName"`
+	CreateTime        string `json:"CreateTime" xml:"CreateTime"`
+	UpdateTime        string `json:"UpdateTime" xml:"UpdateTime"`
+	PlannedDeleteTime string `json:"PlannedDeleteTime" xml:"PlannedDeleteTime"`
+	Tags              []Tag  `json:"Tags" xml:"Tags"`
+}

+ 21 - 0
services/kms/struct_secret_list.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.
+
+// SecretList is a nested struct in kms response
+type SecretList struct {
+	Secret []Secret `json:"Secret" xml:"Secret"`
+}

+ 21 - 0
services/kms/struct_supported_protection_levels.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.
+
+// SupportedProtectionLevels is a nested struct in kms response
+type SupportedProtectionLevels struct {
+	SupportedProtectionLevel []string `json:"SupportedProtectionLevel" xml:"SupportedProtectionLevel"`
+}

+ 2 - 2
services/kms/struct_tag.go

@@ -17,7 +17,7 @@ package kms
 
 // 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"`
+	TagKey   string `json:"TagKey" xml:"TagKey"`
+	KeyId    string `json:"KeyId" xml:"KeyId"`
 }

+ 21 - 0
services/kms/struct_tags_in_describe_secret.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.
+
+// TagsInDescribeSecret is a nested struct in kms response
+type TagsInDescribeSecret struct {
+	Tag []Tag `json:"Tag" xml:"Tag"`
+}

+ 21 - 0
services/kms/struct_tags_in_list_resource_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.
+
+// TagsInListResourceTags is a nested struct in kms response
+type TagsInListResourceTags struct {
+	Tag []Tag `json:"Tag" xml:"Tag"`
+}

+ 2 - 2
services/kms/struct_tags.go → services/kms/struct_tags_in_list_secrets.go

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

+ 21 - 0
services/kms/struct_usages.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.
+
+// Usages is a nested struct in kms response
+type Usages struct {
+	Usage []string `json:"Usage" xml:"Usage"`
+}

+ 23 - 0
services/kms/struct_version_id.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.
+
+// VersionId is a nested struct in kms response
+type VersionId struct {
+	CreateTime    string   `json:"CreateTime" xml:"CreateTime"`
+	VersionId     string   `json:"VersionId" xml:"VersionId"`
+	VersionStages []string `json:"VersionStages" xml:"VersionStages"`
+}

+ 21 - 0
services/kms/struct_version_ids.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.
+
+// VersionIds is a nested struct in kms response
+type VersionIds struct {
+	VersionId []VersionId `json:"VersionId" xml:"VersionId"`
+}

+ 21 - 0
services/kms/struct_version_stages_in_get_secret_value.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.
+
+// VersionStagesInGetSecretValue is a nested struct in kms response
+type VersionStagesInGetSecretValue struct {
+	VersionStage []string `json:"VersionStage" xml:"VersionStage"`
+}

+ 21 - 0
services/kms/struct_version_stages_in_list_secret_version_ids.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.
+
+// VersionStagesInListSecretVersionIds is a nested struct in kms response
+type VersionStagesInListSecretVersionIds struct {
+	VersionStage []string `json:"VersionStage" xml:"VersionStage"`
+}

+ 21 - 0
services/kms/struct_version_stages_in_put_secret_value.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.
+
+// VersionStagesInPutSecretValue is a nested struct in kms response
+type VersionStagesInPutSecretValue struct {
+	VersionStage []string `json:"VersionStage" xml:"VersionStage"`
+}

+ 3 - 2
services/kms/tag_resource.go

@@ -76,8 +76,9 @@ func (client *Client) TagResourceWithCallback(request *TagResourceRequest, callb
 // TagResourceRequest is the request struct for api TagResource
 type TagResourceRequest struct {
 	*requests.RpcRequest
-	KeyId string `position:"Query" name:"KeyId"`
-	Tags  string `position:"Query" name:"Tags"`
+	KeyId      string `position:"Query" name:"KeyId"`
+	SecretName string `position:"Query" name:"SecretName"`
+	Tags       string `position:"Query" name:"Tags"`
 }
 
 // TagResourceResponse is the response struct for api TagResource

+ 4 - 3
services/kms/untag_resource.go

@@ -76,14 +76,15 @@ func (client *Client) UntagResourceWithCallback(request *UntagResourceRequest, c
 // 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"`
+	TagKeys    string `position:"Query" name:"TagKeys"`
+	KeyId      string `position:"Query" name:"KeyId"`
+	SecretName string `position:"Query" name:"SecretName"`
 }
 
 // UntagResourceResponse is the response struct for api UntagResource
 type UntagResourceResponse struct {
 	*responses.BaseResponse
-	KeyId string `json:"KeyId" xml:"KeyId"`
+	RequestId string `json:"RequestId" xml:"RequestId"`
 }
 
 // CreateUntagResourceRequest creates a request to invoke UntagResource API

+ 105 - 0
services/kms/update_secret.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"
+)
+
+// UpdateSecret invokes the kms.UpdateSecret API synchronously
+// api document: https://help.aliyun.com/api/kms/updatesecret.html
+func (client *Client) UpdateSecret(request *UpdateSecretRequest) (response *UpdateSecretResponse, err error) {
+	response = CreateUpdateSecretResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// UpdateSecretWithChan invokes the kms.UpdateSecret API asynchronously
+// api document: https://help.aliyun.com/api/kms/updatesecret.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UpdateSecretWithChan(request *UpdateSecretRequest) (<-chan *UpdateSecretResponse, <-chan error) {
+	responseChan := make(chan *UpdateSecretResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.UpdateSecret(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// UpdateSecretWithCallback invokes the kms.UpdateSecret API asynchronously
+// api document: https://help.aliyun.com/api/kms/updatesecret.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UpdateSecretWithCallback(request *UpdateSecretRequest, callback func(response *UpdateSecretResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *UpdateSecretResponse
+		var err error
+		defer close(result)
+		response, err = client.UpdateSecret(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// UpdateSecretRequest is the request struct for api UpdateSecret
+type UpdateSecretRequest struct {
+	*requests.RpcRequest
+	Description string `position:"Query" name:"Description"`
+	SecretName  string `position:"Query" name:"SecretName"`
+}
+
+// UpdateSecretResponse is the response struct for api UpdateSecret
+type UpdateSecretResponse struct {
+	*responses.BaseResponse
+	RequestId  string `json:"RequestId" xml:"RequestId"`
+	SecretName string `json:"SecretName" xml:"SecretName"`
+}
+
+// CreateUpdateSecretRequest creates a request to invoke UpdateSecret API
+func CreateUpdateSecretRequest() (request *UpdateSecretRequest) {
+	request = &UpdateSecretRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Kms", "2016-01-20", "UpdateSecret", "kms", "openAPI")
+	return
+}
+
+// CreateUpdateSecretResponse creates a response to parse from UpdateSecret response
+func CreateUpdateSecretResponse() (response *UpdateSecretResponse) {
+	response = &UpdateSecretResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 107 - 0
services/kms/update_secret_version_stage.go

@@ -0,0 +1,107 @@
+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"
+)
+
+// UpdateSecretVersionStage invokes the kms.UpdateSecretVersionStage API synchronously
+// api document: https://help.aliyun.com/api/kms/updatesecretversionstage.html
+func (client *Client) UpdateSecretVersionStage(request *UpdateSecretVersionStageRequest) (response *UpdateSecretVersionStageResponse, err error) {
+	response = CreateUpdateSecretVersionStageResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// UpdateSecretVersionStageWithChan invokes the kms.UpdateSecretVersionStage API asynchronously
+// api document: https://help.aliyun.com/api/kms/updatesecretversionstage.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UpdateSecretVersionStageWithChan(request *UpdateSecretVersionStageRequest) (<-chan *UpdateSecretVersionStageResponse, <-chan error) {
+	responseChan := make(chan *UpdateSecretVersionStageResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.UpdateSecretVersionStage(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// UpdateSecretVersionStageWithCallback invokes the kms.UpdateSecretVersionStage API asynchronously
+// api document: https://help.aliyun.com/api/kms/updatesecretversionstage.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UpdateSecretVersionStageWithCallback(request *UpdateSecretVersionStageRequest, callback func(response *UpdateSecretVersionStageResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *UpdateSecretVersionStageResponse
+		var err error
+		defer close(result)
+		response, err = client.UpdateSecretVersionStage(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// UpdateSecretVersionStageRequest is the request struct for api UpdateSecretVersionStage
+type UpdateSecretVersionStageRequest struct {
+	*requests.RpcRequest
+	RemoveFromVersion string `position:"Query" name:"RemoveFromVersion"`
+	MoveToVersion     string `position:"Query" name:"MoveToVersion"`
+	VersionStage      string `position:"Query" name:"VersionStage"`
+	SecretName        string `position:"Query" name:"SecretName"`
+}
+
+// UpdateSecretVersionStageResponse is the response struct for api UpdateSecretVersionStage
+type UpdateSecretVersionStageResponse struct {
+	*responses.BaseResponse
+	SecretName string `json:"SecretName" xml:"SecretName"`
+	RequestId  string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateUpdateSecretVersionStageRequest creates a request to invoke UpdateSecretVersionStage API
+func CreateUpdateSecretVersionStageRequest() (request *UpdateSecretVersionStageRequest) {
+	request = &UpdateSecretVersionStageRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Kms", "2016-01-20", "UpdateSecretVersionStage", "kms", "openAPI")
+	return
+}
+
+// CreateUpdateSecretVersionStageResponse creates a response to parse from UpdateSecretVersionStage response
+func CreateUpdateSecretVersionStageResponse() (response *UpdateSecretVersionStageResponse) {
+	response = &UpdateSecretVersionStageResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}