Browse Source

Generated 2019-09-10 for DnsKnocker.

sdk-team 6 years ago
parent
commit
1a1989a8bf

+ 3 - 0
ChangeLog.txt

@@ -1,3 +1,6 @@
+2019-10-18 Version: 1.60.202
+- Generated 2019-09-10 for `DnsKnocker`.
+
 2019-10-18 Version: 1.60.201
 - Modify Yundun-dbaudit DescribeInstanceAttribute InstanceStatus Type.
 

+ 113 - 0
services/dnsknocker/batch_create_rr.go

@@ -0,0 +1,113 @@
+package dnsknocker
+
+//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"
+)
+
+// BatchCreateRr invokes the dnsknocker.BatchCreateRr API synchronously
+// api document: https://help.aliyun.com/api/dnsknocker/batchcreaterr.html
+func (client *Client) BatchCreateRr(request *BatchCreateRrRequest) (response *BatchCreateRrResponse, err error) {
+	response = CreateBatchCreateRrResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// BatchCreateRrWithChan invokes the dnsknocker.BatchCreateRr API asynchronously
+// api document: https://help.aliyun.com/api/dnsknocker/batchcreaterr.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) BatchCreateRrWithChan(request *BatchCreateRrRequest) (<-chan *BatchCreateRrResponse, <-chan error) {
+	responseChan := make(chan *BatchCreateRrResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.BatchCreateRr(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// BatchCreateRrWithCallback invokes the dnsknocker.BatchCreateRr API asynchronously
+// api document: https://help.aliyun.com/api/dnsknocker/batchcreaterr.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) BatchCreateRrWithCallback(request *BatchCreateRrRequest, callback func(response *BatchCreateRrResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *BatchCreateRrResponse
+		var err error
+		defer close(result)
+		response, err = client.BatchCreateRr(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// BatchCreateRrRequest is the request struct for api BatchCreateRr
+type BatchCreateRrRequest struct {
+	*requests.RpcRequest
+	AccessID        string `position:"Body" name:"AccessID"`
+	AccessSecret    string `position:"Body" name:"AccessSecret"`
+	ResourceRecords string `position:"Body" name:"ResourceRecords"`
+	Line            string `position:"Body" name:"Line"`
+	ZoneName        string `position:"Body" name:"ZoneName"`
+	TransactionId   string `position:"Body" name:"TransactionId"`
+	Group           string `position:"Body" name:"Group"`
+}
+
+// BatchCreateRrResponse is the response struct for api BatchCreateRr
+type BatchCreateRrResponse struct {
+	*responses.BaseResponse
+	ResultCode    string `json:"ResultCode" xml:"ResultCode"`
+	ResultMessage string `json:"ResultMessage" xml:"ResultMessage"`
+	Success       bool   `json:"Success" xml:"Success"`
+	TransactionId string `json:"TransactionId" xml:"TransactionId"`
+	RequestId     string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateBatchCreateRrRequest creates a request to invoke BatchCreateRr API
+func CreateBatchCreateRrRequest() (request *BatchCreateRrRequest) {
+	request = &BatchCreateRrRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("DnsKnocker", "2019-09-10", "BatchCreateRr", "dns_knocker", "openAPI")
+	return
+}
+
+// CreateBatchCreateRrResponse creates a response to parse from BatchCreateRr response
+func CreateBatchCreateRrResponse() (response *BatchCreateRrResponse) {
+	response = &BatchCreateRrResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 113 - 0
services/dnsknocker/batch_delete_rr.go

@@ -0,0 +1,113 @@
+package dnsknocker
+
+//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"
+)
+
+// BatchDeleteRr invokes the dnsknocker.BatchDeleteRr API synchronously
+// api document: https://help.aliyun.com/api/dnsknocker/batchdeleterr.html
+func (client *Client) BatchDeleteRr(request *BatchDeleteRrRequest) (response *BatchDeleteRrResponse, err error) {
+	response = CreateBatchDeleteRrResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// BatchDeleteRrWithChan invokes the dnsknocker.BatchDeleteRr API asynchronously
+// api document: https://help.aliyun.com/api/dnsknocker/batchdeleterr.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) BatchDeleteRrWithChan(request *BatchDeleteRrRequest) (<-chan *BatchDeleteRrResponse, <-chan error) {
+	responseChan := make(chan *BatchDeleteRrResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.BatchDeleteRr(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// BatchDeleteRrWithCallback invokes the dnsknocker.BatchDeleteRr API asynchronously
+// api document: https://help.aliyun.com/api/dnsknocker/batchdeleterr.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) BatchDeleteRrWithCallback(request *BatchDeleteRrRequest, callback func(response *BatchDeleteRrResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *BatchDeleteRrResponse
+		var err error
+		defer close(result)
+		response, err = client.BatchDeleteRr(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// BatchDeleteRrRequest is the request struct for api BatchDeleteRr
+type BatchDeleteRrRequest struct {
+	*requests.RpcRequest
+	AccessID        string `position:"Body" name:"AccessID"`
+	AccessSecret    string `position:"Body" name:"AccessSecret"`
+	ResourceRecords string `position:"Body" name:"ResourceRecords"`
+	Line            string `position:"Body" name:"Line"`
+	ZoneName        string `position:"Body" name:"ZoneName"`
+	TransactionId   string `position:"Body" name:"TransactionId"`
+	Group           string `position:"Body" name:"Group"`
+}
+
+// BatchDeleteRrResponse is the response struct for api BatchDeleteRr
+type BatchDeleteRrResponse struct {
+	*responses.BaseResponse
+	ResultCode    string `json:"ResultCode" xml:"ResultCode"`
+	ResultMessage string `json:"ResultMessage" xml:"ResultMessage"`
+	Success       bool   `json:"Success" xml:"Success"`
+	TransactionId string `json:"TransactionId" xml:"TransactionId"`
+	RequestId     string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateBatchDeleteRrRequest creates a request to invoke BatchDeleteRr API
+func CreateBatchDeleteRrRequest() (request *BatchDeleteRrRequest) {
+	request = &BatchDeleteRrRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("DnsKnocker", "2019-09-10", "BatchDeleteRr", "dns_knocker", "openAPI")
+	return
+}
+
+// CreateBatchDeleteRrResponse creates a response to parse from BatchDeleteRr response
+func CreateBatchDeleteRrResponse() (response *BatchDeleteRrResponse) {
+	response = &BatchDeleteRrResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 113 - 0
services/dnsknocker/change_resource_record.go

@@ -0,0 +1,113 @@
+package dnsknocker
+
+//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"
+)
+
+// ChangeResourceRecord invokes the dnsknocker.ChangeResourceRecord API synchronously
+// api document: https://help.aliyun.com/api/dnsknocker/changeresourcerecord.html
+func (client *Client) ChangeResourceRecord(request *ChangeResourceRecordRequest) (response *ChangeResourceRecordResponse, err error) {
+	response = CreateChangeResourceRecordResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// ChangeResourceRecordWithChan invokes the dnsknocker.ChangeResourceRecord API asynchronously
+// api document: https://help.aliyun.com/api/dnsknocker/changeresourcerecord.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ChangeResourceRecordWithChan(request *ChangeResourceRecordRequest) (<-chan *ChangeResourceRecordResponse, <-chan error) {
+	responseChan := make(chan *ChangeResourceRecordResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.ChangeResourceRecord(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// ChangeResourceRecordWithCallback invokes the dnsknocker.ChangeResourceRecord API asynchronously
+// api document: https://help.aliyun.com/api/dnsknocker/changeresourcerecord.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ChangeResourceRecordWithCallback(request *ChangeResourceRecordRequest, callback func(response *ChangeResourceRecordResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *ChangeResourceRecordResponse
+		var err error
+		defer close(result)
+		response, err = client.ChangeResourceRecord(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// ChangeResourceRecordRequest is the request struct for api ChangeResourceRecord
+type ChangeResourceRecordRequest struct {
+	*requests.RpcRequest
+	AccessID      string `position:"Body" name:"AccessID"`
+	AccessSecret  string `position:"Body" name:"AccessSecret"`
+	NewRRInfo     string `position:"Body" name:"NewRRInfo"`
+	ZoneName      string `position:"Body" name:"ZoneName"`
+	TransactionId string `position:"Body" name:"TransactionId"`
+	Group         string `position:"Body" name:"Group"`
+	OldRRInfo     string `position:"Body" name:"OldRRInfo"`
+}
+
+// ChangeResourceRecordResponse is the response struct for api ChangeResourceRecord
+type ChangeResourceRecordResponse struct {
+	*responses.BaseResponse
+	ResultCode    string `json:"ResultCode" xml:"ResultCode"`
+	ResultMessage string `json:"ResultMessage" xml:"ResultMessage"`
+	Success       string `json:"Success" xml:"Success"`
+	TransactionId string `json:"TransactionId" xml:"TransactionId"`
+	RequestId     string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateChangeResourceRecordRequest creates a request to invoke ChangeResourceRecord API
+func CreateChangeResourceRecordRequest() (request *ChangeResourceRecordRequest) {
+	request = &ChangeResourceRecordRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("DnsKnocker", "2019-09-10", "ChangeResourceRecord", "dns_knocker", "openAPI")
+	return
+}
+
+// CreateChangeResourceRecordResponse creates a response to parse from ChangeResourceRecord response
+func CreateChangeResourceRecordResponse() (response *ChangeResourceRecordResponse) {
+	response = &ChangeResourceRecordResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 115 - 0
services/dnsknocker/change_resource_records.go

@@ -0,0 +1,115 @@
+package dnsknocker
+
+//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"
+)
+
+// ChangeResourceRecords invokes the dnsknocker.ChangeResourceRecords API synchronously
+// api document: https://help.aliyun.com/api/dnsknocker/changeresourcerecords.html
+func (client *Client) ChangeResourceRecords(request *ChangeResourceRecordsRequest) (response *ChangeResourceRecordsResponse, err error) {
+	response = CreateChangeResourceRecordsResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// ChangeResourceRecordsWithChan invokes the dnsknocker.ChangeResourceRecords API asynchronously
+// api document: https://help.aliyun.com/api/dnsknocker/changeresourcerecords.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ChangeResourceRecordsWithChan(request *ChangeResourceRecordsRequest) (<-chan *ChangeResourceRecordsResponse, <-chan error) {
+	responseChan := make(chan *ChangeResourceRecordsResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.ChangeResourceRecords(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// ChangeResourceRecordsWithCallback invokes the dnsknocker.ChangeResourceRecords API asynchronously
+// api document: https://help.aliyun.com/api/dnsknocker/changeresourcerecords.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ChangeResourceRecordsWithCallback(request *ChangeResourceRecordsRequest, callback func(response *ChangeResourceRecordsResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *ChangeResourceRecordsResponse
+		var err error
+		defer close(result)
+		response, err = client.ChangeResourceRecords(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// ChangeResourceRecordsRequest is the request struct for api ChangeResourceRecords
+type ChangeResourceRecordsRequest struct {
+	*requests.RpcRequest
+	AccessID        string `position:"Body" name:"AccessID"`
+	AccessSecret    string `position:"Body" name:"AccessSecret"`
+	Types           string `position:"Body" name:"Types"`
+	ResourceRecords string `position:"Body" name:"ResourceRecords"`
+	Line            string `position:"Body" name:"Line"`
+	DomainName      string `position:"Body" name:"DomainName"`
+	ZoneName        string `position:"Body" name:"ZoneName"`
+	TransactionId   string `position:"Body" name:"TransactionId"`
+	Group           string `position:"Body" name:"Group"`
+}
+
+// ChangeResourceRecordsResponse is the response struct for api ChangeResourceRecords
+type ChangeResourceRecordsResponse struct {
+	*responses.BaseResponse
+	ResultCode    string `json:"ResultCode" xml:"ResultCode"`
+	ResultMessage string `json:"ResultMessage" xml:"ResultMessage"`
+	Success       bool   `json:"Success" xml:"Success"`
+	TransactionId string `json:"TransactionId" xml:"TransactionId"`
+	RequestId     string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateChangeResourceRecordsRequest creates a request to invoke ChangeResourceRecords API
+func CreateChangeResourceRecordsRequest() (request *ChangeResourceRecordsRequest) {
+	request = &ChangeResourceRecordsRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("DnsKnocker", "2019-09-10", "ChangeResourceRecords", "dns_knocker", "openAPI")
+	return
+}
+
+// CreateChangeResourceRecordsResponse creates a response to parse from ChangeResourceRecords response
+func CreateChangeResourceRecordsResponse() (response *ChangeResourceRecordsResponse) {
+	response = &ChangeResourceRecordsResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 129 - 0
services/dnsknocker/client.go

@@ -0,0 +1,129 @@
+package dnsknocker
+
+//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 (
+	"reflect"
+
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth/credentials/provider"
+)
+
+// Client is the sdk client struct, each func corresponds to an OpenAPI
+type Client struct {
+	sdk.Client
+}
+
+// SetClientProperty Set Property by Reflect
+func SetClientProperty(client *Client, propertyName string, propertyValue interface{}) {
+	v := reflect.ValueOf(client).Elem()
+	if v.FieldByName(propertyName).IsValid() && v.FieldByName(propertyName).CanSet() {
+		v.FieldByName(propertyName).Set(reflect.ValueOf(propertyValue))
+	}
+}
+
+// SetEndpointDataToClient Set EndpointMap and ENdpointType
+func SetEndpointDataToClient(client *Client) {
+	SetClientProperty(client, "EndpointMap", GetEndpointMap())
+	SetClientProperty(client, "EndpointType", GetEndpointType())
+}
+
+// NewClient creates a sdk client with environment variables
+func NewClient() (client *Client, err error) {
+	client = &Client{}
+	err = client.Init()
+	SetEndpointDataToClient(client)
+	return
+}
+
+// NewClientWithProvider creates a sdk client with providers
+// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
+func NewClientWithProvider(regionId string, providers ...provider.Provider) (client *Client, err error) {
+	client = &Client{}
+	var pc provider.Provider
+	if len(providers) == 0 {
+		pc = provider.DefaultChain
+	} else {
+		pc = provider.NewProviderChain(providers)
+	}
+	err = client.InitWithProviderChain(regionId, pc)
+	SetEndpointDataToClient(client)
+	return
+}
+
+// NewClientWithOptions creates a sdk client with regionId/sdkConfig/credential
+// this is the common api to create a sdk client
+func NewClientWithOptions(regionId string, config *sdk.Config, credential auth.Credential) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithOptions(regionId, config, credential)
+	SetEndpointDataToClient(client)
+	return
+}
+
+// NewClientWithAccessKey is a shortcut to create sdk client with accesskey
+// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
+func NewClientWithAccessKey(regionId, accessKeyId, accessKeySecret string) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithAccessKey(regionId, accessKeyId, accessKeySecret)
+	SetEndpointDataToClient(client)
+	return
+}
+
+// NewClientWithStsToken is a shortcut to create sdk client with sts token
+// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
+func NewClientWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToken string) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToken)
+	SetEndpointDataToClient(client)
+	return
+}
+
+// NewClientWithRamRoleArn is a shortcut to create sdk client with ram roleArn
+// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
+func NewClientWithRamRoleArn(regionId string, accessKeyId, accessKeySecret, roleArn, roleSessionName string) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithRamRoleArn(regionId, accessKeyId, accessKeySecret, roleArn, roleSessionName)
+	SetEndpointDataToClient(client)
+	return
+}
+
+// NewClientWithRamRoleArn is a shortcut to create sdk client with ram roleArn and policy
+// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
+func NewClientWithRamRoleArnAndPolicy(regionId string, accessKeyId, accessKeySecret, roleArn, roleSessionName, policy string) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithRamRoleArnAndPolicy(regionId, accessKeyId, accessKeySecret, roleArn, roleSessionName, policy)
+	SetEndpointDataToClient(client)
+	return
+}
+
+// NewClientWithEcsRamRole is a shortcut to create sdk client with ecs ram role
+// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
+func NewClientWithEcsRamRole(regionId string, roleName string) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithEcsRamRole(regionId, roleName)
+	SetEndpointDataToClient(client)
+	return
+}
+
+// NewClientWithRsaKeyPair is a shortcut to create sdk client with rsa key pair
+// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
+func NewClientWithRsaKeyPair(regionId string, publicKeyId, privateKey string, sessionExpiration int) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithRsaKeyPair(regionId, publicKeyId, privateKey, sessionExpiration)
+	SetEndpointDataToClient(client)
+	return
+}

+ 116 - 0
services/dnsknocker/create_resource_record.go

@@ -0,0 +1,116 @@
+package dnsknocker
+
+//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"
+)
+
+// CreateResourceRecord invokes the dnsknocker.CreateResourceRecord API synchronously
+// api document: https://help.aliyun.com/api/dnsknocker/createresourcerecord.html
+func (client *Client) CreateResourceRecord(request *CreateResourceRecordRequest) (response *CreateResourceRecordResponse, err error) {
+	response = CreateCreateResourceRecordResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// CreateResourceRecordWithChan invokes the dnsknocker.CreateResourceRecord API asynchronously
+// api document: https://help.aliyun.com/api/dnsknocker/createresourcerecord.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CreateResourceRecordWithChan(request *CreateResourceRecordRequest) (<-chan *CreateResourceRecordResponse, <-chan error) {
+	responseChan := make(chan *CreateResourceRecordResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.CreateResourceRecord(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// CreateResourceRecordWithCallback invokes the dnsknocker.CreateResourceRecord API asynchronously
+// api document: https://help.aliyun.com/api/dnsknocker/createresourcerecord.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CreateResourceRecordWithCallback(request *CreateResourceRecordRequest, callback func(response *CreateResourceRecordResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *CreateResourceRecordResponse
+		var err error
+		defer close(result)
+		response, err = client.CreateResourceRecord(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// CreateResourceRecordRequest is the request struct for api CreateResourceRecord
+type CreateResourceRecordRequest struct {
+	*requests.RpcRequest
+	AccessID      string `position:"Body" name:"AccessID"`
+	RrTTL         string `position:"Body" name:"RrTTL"`
+	AccessSecret  string `position:"Body" name:"AccessSecret"`
+	RrLine        string `position:"Body" name:"RrLine"`
+	DomainName    string `position:"Body" name:"DomainName"`
+	RrValue       string `position:"Body" name:"RrValue"`
+	ZoneName      string `position:"Body" name:"ZoneName"`
+	TransactionId string `position:"Body" name:"TransactionId"`
+	Group         string `position:"Body" name:"Group"`
+	RrType        string `position:"Body" name:"RrType"`
+}
+
+// CreateResourceRecordResponse is the response struct for api CreateResourceRecord
+type CreateResourceRecordResponse struct {
+	*responses.BaseResponse
+	ResultCode    string `json:"ResultCode" xml:"ResultCode"`
+	ResultMessage string `json:"ResultMessage" xml:"ResultMessage"`
+	Success       string `json:"Success" xml:"Success"`
+	TransactionId string `json:"TransactionId" xml:"TransactionId"`
+	RequestId     string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateCreateResourceRecordRequest creates a request to invoke CreateResourceRecord API
+func CreateCreateResourceRecordRequest() (request *CreateResourceRecordRequest) {
+	request = &CreateResourceRecordRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("DnsKnocker", "2019-09-10", "CreateResourceRecord", "dns_knocker", "openAPI")
+	return
+}
+
+// CreateCreateResourceRecordResponse creates a response to parse from CreateResourceRecord response
+func CreateCreateResourceRecordResponse() (response *CreateResourceRecordResponse) {
+	response = &CreateResourceRecordResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 113 - 0
services/dnsknocker/delete_domain.go

@@ -0,0 +1,113 @@
+package dnsknocker
+
+//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"
+)
+
+// DeleteDomain invokes the dnsknocker.DeleteDomain API synchronously
+// api document: https://help.aliyun.com/api/dnsknocker/deletedomain.html
+func (client *Client) DeleteDomain(request *DeleteDomainRequest) (response *DeleteDomainResponse, err error) {
+	response = CreateDeleteDomainResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DeleteDomainWithChan invokes the dnsknocker.DeleteDomain API asynchronously
+// api document: https://help.aliyun.com/api/dnsknocker/deletedomain.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteDomainWithChan(request *DeleteDomainRequest) (<-chan *DeleteDomainResponse, <-chan error) {
+	responseChan := make(chan *DeleteDomainResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DeleteDomain(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DeleteDomainWithCallback invokes the dnsknocker.DeleteDomain API asynchronously
+// api document: https://help.aliyun.com/api/dnsknocker/deletedomain.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteDomainWithCallback(request *DeleteDomainRequest, callback func(response *DeleteDomainResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DeleteDomainResponse
+		var err error
+		defer close(result)
+		response, err = client.DeleteDomain(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DeleteDomainRequest is the request struct for api DeleteDomain
+type DeleteDomainRequest struct {
+	*requests.RpcRequest
+	AccessID      string `position:"Body" name:"AccessID"`
+	AccessSecret  string `position:"Body" name:"AccessSecret"`
+	Line          string `position:"Body" name:"Line"`
+	DomainName    string `position:"Body" name:"DomainName"`
+	ZoneName      string `position:"Body" name:"ZoneName"`
+	TransactionId string `position:"Body" name:"TransactionId"`
+	Group         string `position:"Body" name:"Group"`
+}
+
+// DeleteDomainResponse is the response struct for api DeleteDomain
+type DeleteDomainResponse struct {
+	*responses.BaseResponse
+	ResultCode    string `json:"ResultCode" xml:"ResultCode"`
+	ResultMessage string `json:"ResultMessage" xml:"ResultMessage"`
+	Success       bool   `json:"Success" xml:"Success"`
+	TransactionId string `json:"TransactionId" xml:"TransactionId"`
+	RequestId     string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateDeleteDomainRequest creates a request to invoke DeleteDomain API
+func CreateDeleteDomainRequest() (request *DeleteDomainRequest) {
+	request = &DeleteDomainRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("DnsKnocker", "2019-09-10", "DeleteDomain", "dns_knocker", "openAPI")
+	return
+}
+
+// CreateDeleteDomainResponse creates a response to parse from DeleteDomain response
+func CreateDeleteDomainResponse() (response *DeleteDomainResponse) {
+	response = &DeleteDomainResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 116 - 0
services/dnsknocker/delete_resource_record.go

@@ -0,0 +1,116 @@
+package dnsknocker
+
+//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"
+)
+
+// DeleteResourceRecord invokes the dnsknocker.DeleteResourceRecord API synchronously
+// api document: https://help.aliyun.com/api/dnsknocker/deleteresourcerecord.html
+func (client *Client) DeleteResourceRecord(request *DeleteResourceRecordRequest) (response *DeleteResourceRecordResponse, err error) {
+	response = CreateDeleteResourceRecordResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DeleteResourceRecordWithChan invokes the dnsknocker.DeleteResourceRecord API asynchronously
+// api document: https://help.aliyun.com/api/dnsknocker/deleteresourcerecord.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteResourceRecordWithChan(request *DeleteResourceRecordRequest) (<-chan *DeleteResourceRecordResponse, <-chan error) {
+	responseChan := make(chan *DeleteResourceRecordResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DeleteResourceRecord(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DeleteResourceRecordWithCallback invokes the dnsknocker.DeleteResourceRecord API asynchronously
+// api document: https://help.aliyun.com/api/dnsknocker/deleteresourcerecord.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteResourceRecordWithCallback(request *DeleteResourceRecordRequest, callback func(response *DeleteResourceRecordResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DeleteResourceRecordResponse
+		var err error
+		defer close(result)
+		response, err = client.DeleteResourceRecord(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DeleteResourceRecordRequest is the request struct for api DeleteResourceRecord
+type DeleteResourceRecordRequest struct {
+	*requests.RpcRequest
+	AccessID      string `position:"Body" name:"AccessID"`
+	RRTTL         string `position:"Body" name:"RRTTL"`
+	AccessSecret  string `position:"Body" name:"AccessSecret"`
+	RRLine        string `position:"Body" name:"RRLine"`
+	DomainName    string `position:"Body" name:"DomainName"`
+	RRValue       string `position:"Body" name:"RRValue"`
+	ZoneName      string `position:"Body" name:"ZoneName"`
+	TransactionId string `position:"Body" name:"TransactionId"`
+	Group         string `position:"Body" name:"Group"`
+	RRType        string `position:"Body" name:"RRType"`
+}
+
+// DeleteResourceRecordResponse is the response struct for api DeleteResourceRecord
+type DeleteResourceRecordResponse struct {
+	*responses.BaseResponse
+	ResultCode    string `json:"ResultCode" xml:"ResultCode"`
+	ResultMessage string `json:"ResultMessage" xml:"ResultMessage"`
+	Success       string `json:"Success" xml:"Success"`
+	TransactionId string `json:"TransactionId" xml:"TransactionId"`
+	RequestId     string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateDeleteResourceRecordRequest creates a request to invoke DeleteResourceRecord API
+func CreateDeleteResourceRecordRequest() (request *DeleteResourceRecordRequest) {
+	request = &DeleteResourceRecordRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("DnsKnocker", "2019-09-10", "DeleteResourceRecord", "dns_knocker", "openAPI")
+	return
+}
+
+// CreateDeleteResourceRecordResponse creates a response to parse from DeleteResourceRecord response
+func CreateDeleteResourceRecordResponse() (response *DeleteResourceRecordResponse) {
+	response = &DeleteResourceRecordResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 114 - 0
services/dnsknocker/delete_resource_records.go

@@ -0,0 +1,114 @@
+package dnsknocker
+
+//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"
+)
+
+// DeleteResourceRecords invokes the dnsknocker.DeleteResourceRecords API synchronously
+// api document: https://help.aliyun.com/api/dnsknocker/deleteresourcerecords.html
+func (client *Client) DeleteResourceRecords(request *DeleteResourceRecordsRequest) (response *DeleteResourceRecordsResponse, err error) {
+	response = CreateDeleteResourceRecordsResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DeleteResourceRecordsWithChan invokes the dnsknocker.DeleteResourceRecords API asynchronously
+// api document: https://help.aliyun.com/api/dnsknocker/deleteresourcerecords.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteResourceRecordsWithChan(request *DeleteResourceRecordsRequest) (<-chan *DeleteResourceRecordsResponse, <-chan error) {
+	responseChan := make(chan *DeleteResourceRecordsResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DeleteResourceRecords(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DeleteResourceRecordsWithCallback invokes the dnsknocker.DeleteResourceRecords API asynchronously
+// api document: https://help.aliyun.com/api/dnsknocker/deleteresourcerecords.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteResourceRecordsWithCallback(request *DeleteResourceRecordsRequest, callback func(response *DeleteResourceRecordsResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DeleteResourceRecordsResponse
+		var err error
+		defer close(result)
+		response, err = client.DeleteResourceRecords(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DeleteResourceRecordsRequest is the request struct for api DeleteResourceRecords
+type DeleteResourceRecordsRequest struct {
+	*requests.RpcRequest
+	AccessID      string `position:"Body" name:"AccessID"`
+	AccessSecret  string `position:"Body" name:"AccessSecret"`
+	TypeList      string `position:"Body" name:"TypeList"`
+	Line          string `position:"Body" name:"Line"`
+	DomainName    string `position:"Body" name:"DomainName"`
+	ZoneName      string `position:"Body" name:"ZoneName"`
+	TransactionId string `position:"Body" name:"TransactionId"`
+	Group         string `position:"Body" name:"Group"`
+}
+
+// DeleteResourceRecordsResponse is the response struct for api DeleteResourceRecords
+type DeleteResourceRecordsResponse struct {
+	*responses.BaseResponse
+	ResultCode    string `json:"ResultCode" xml:"ResultCode"`
+	ResultMessage string `json:"ResultMessage" xml:"ResultMessage"`
+	Success       string `json:"Success" xml:"Success"`
+	TransactionId string `json:"TransactionId" xml:"TransactionId"`
+	RequestId     string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateDeleteResourceRecordsRequest creates a request to invoke DeleteResourceRecords API
+func CreateDeleteResourceRecordsRequest() (request *DeleteResourceRecordsRequest) {
+	request = &DeleteResourceRecordsRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("DnsKnocker", "2019-09-10", "DeleteResourceRecords", "dns_knocker", "openAPI")
+	return
+}
+
+// CreateDeleteResourceRecordsResponse creates a response to parse from DeleteResourceRecords response
+func CreateDeleteResourceRecordsResponse() (response *DeleteResourceRecordsResponse) {
+	response = &DeleteResourceRecordsResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 20 - 0
services/dnsknocker/endpoint.go

@@ -0,0 +1,20 @@
+package dnsknocker
+
+// EndpointMap Endpoint Data
+var EndpointMap map[string]string
+
+// EndpointType regional or central
+var EndpointType = "central"
+
+// GetEndpointMap Get Endpoint Data Map
+func GetEndpointMap() map[string]string {
+	if EndpointMap == nil {
+		EndpointMap = map[string]string{}
+	}
+	return EndpointMap
+}
+
+// GetEndpointType Get Endpoint Type Value
+func GetEndpointType() string {
+	return EndpointType
+}

+ 112 - 0
services/dnsknocker/get_domain.go

@@ -0,0 +1,112 @@
+package dnsknocker
+
+//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"
+)
+
+// GetDomain invokes the dnsknocker.GetDomain API synchronously
+// api document: https://help.aliyun.com/api/dnsknocker/getdomain.html
+func (client *Client) GetDomain(request *GetDomainRequest) (response *GetDomainResponse, err error) {
+	response = CreateGetDomainResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// GetDomainWithChan invokes the dnsknocker.GetDomain API asynchronously
+// api document: https://help.aliyun.com/api/dnsknocker/getdomain.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetDomainWithChan(request *GetDomainRequest) (<-chan *GetDomainResponse, <-chan error) {
+	responseChan := make(chan *GetDomainResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.GetDomain(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// GetDomainWithCallback invokes the dnsknocker.GetDomain API asynchronously
+// api document: https://help.aliyun.com/api/dnsknocker/getdomain.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetDomainWithCallback(request *GetDomainRequest, callback func(response *GetDomainResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *GetDomainResponse
+		var err error
+		defer close(result)
+		response, err = client.GetDomain(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// GetDomainRequest is the request struct for api GetDomain
+type GetDomainRequest struct {
+	*requests.RpcRequest
+	AccessID     string `position:"Body" name:"AccessID"`
+	AccessSecret string `position:"Body" name:"AccessSecret"`
+	DomainName   string `position:"Body" name:"DomainName"`
+	DomainLine   string `position:"Body" name:"DomainLine"`
+	Group        string `position:"Body" name:"Group"`
+}
+
+// GetDomainResponse is the response struct for api GetDomain
+type GetDomainResponse struct {
+	*responses.BaseResponse
+	RequestId     string `json:"RequestId" xml:"RequestId"`
+	ResultCode    string `json:"ResultCode" xml:"ResultCode"`
+	ResultMessage string `json:"ResultMessage" xml:"ResultMessage"`
+	Success       string `json:"Success" xml:"Success"`
+	TransactionId string `json:"TransactionId" xml:"TransactionId"`
+	Domain        []Data `json:"Domain" xml:"Domain"`
+}
+
+// CreateGetDomainRequest creates a request to invoke GetDomain API
+func CreateGetDomainRequest() (request *GetDomainRequest) {
+	request = &GetDomainRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("DnsKnocker", "2019-09-10", "GetDomain", "dns_knocker", "openAPI")
+	return
+}
+
+// CreateGetDomainResponse creates a response to parse from GetDomain response
+func CreateGetDomainResponse() (response *GetDomainResponse) {
+	response = &GetDomainResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 113 - 0
services/dnsknocker/get_resource_records.go

@@ -0,0 +1,113 @@
+package dnsknocker
+
+//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"
+)
+
+// GetResourceRecords invokes the dnsknocker.GetResourceRecords API synchronously
+// api document: https://help.aliyun.com/api/dnsknocker/getresourcerecords.html
+func (client *Client) GetResourceRecords(request *GetResourceRecordsRequest) (response *GetResourceRecordsResponse, err error) {
+	response = CreateGetResourceRecordsResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// GetResourceRecordsWithChan invokes the dnsknocker.GetResourceRecords API asynchronously
+// api document: https://help.aliyun.com/api/dnsknocker/getresourcerecords.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetResourceRecordsWithChan(request *GetResourceRecordsRequest) (<-chan *GetResourceRecordsResponse, <-chan error) {
+	responseChan := make(chan *GetResourceRecordsResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.GetResourceRecords(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// GetResourceRecordsWithCallback invokes the dnsknocker.GetResourceRecords API asynchronously
+// api document: https://help.aliyun.com/api/dnsknocker/getresourcerecords.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetResourceRecordsWithCallback(request *GetResourceRecordsRequest, callback func(response *GetResourceRecordsResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *GetResourceRecordsResponse
+		var err error
+		defer close(result)
+		response, err = client.GetResourceRecords(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// GetResourceRecordsRequest is the request struct for api GetResourceRecords
+type GetResourceRecordsRequest struct {
+	*requests.RpcRequest
+	AccessID      string `position:"Body" name:"AccessID"`
+	AccessSecret  string `position:"Body" name:"AccessSecret"`
+	Zone          string `position:"Body" name:"Zone"`
+	DomainName    string `position:"Body" name:"DomainName"`
+	TransactionId string `position:"Body" name:"TransactionId"`
+	DomainLine    string `position:"Body" name:"DomainLine"`
+	Group         string `position:"Body" name:"Group"`
+}
+
+// GetResourceRecordsResponse is the response struct for api GetResourceRecords
+type GetResourceRecordsResponse struct {
+	*responses.BaseResponse
+	ResultCode        string   `json:"ResultCode" xml:"ResultCode"`
+	ResultMessage     string   `json:"ResultMessage" xml:"ResultMessage"`
+	Success           bool     `json:"Success" xml:"Success"`
+	RequestId         string   `json:"RequestId" xml:"RequestId"`
+	ResourceRecordSet []string `json:"ResourceRecordSet" xml:"ResourceRecordSet"`
+}
+
+// CreateGetResourceRecordsRequest creates a request to invoke GetResourceRecords API
+func CreateGetResourceRecordsRequest() (request *GetResourceRecordsRequest) {
+	request = &GetResourceRecordsRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("DnsKnocker", "2019-09-10", "GetResourceRecords", "dns_knocker", "openAPI")
+	return
+}
+
+// CreateGetResourceRecordsResponse creates a response to parse from GetResourceRecords response
+func CreateGetResourceRecordsResponse() (response *GetResourceRecordsResponse) {
+	response = &GetResourceRecordsResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 23 - 0
services/dnsknocker/struct_data.go

@@ -0,0 +1,23 @@
+package dnsknocker
+
+//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.
+
+// Data is a nested struct in dnsknocker response
+type Data struct {
+	DomainName string `json:"DomainName" xml:"DomainName"`
+	Exists     string `json:"Exists" xml:"Exists"`
+	Message    string `json:"Message" xml:"Message"`
+}

+ 21 - 0
services/dnsknocker/struct_domain.go

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

+ 21 - 0
services/dnsknocker/struct_resource_record_set.go

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