Browse Source

new service: iot

wenzuochao 6 years ago
parent
commit
1652d796f8
91 changed files with 10750 additions and 0 deletions
  1. 118 0
      services/iot/batch_add_device_group_relations.go
  2. 115 0
      services/iot/batch_check_device_names.go
  3. 117 0
      services/iot/batch_delete_device_group_relations.go
  4. 124 0
      services/iot/batch_get_device_state.go
  5. 114 0
      services/iot/batch_register_device.go
  6. 114 0
      services/iot/batch_register_device_with_apply_id.go
  7. 115 0
      services/iot/batch_update_device_nickname.go
  8. 104 0
      services/iot/client.go
  9. 118 0
      services/iot/create_device_group.go
  10. 115 0
      services/iot/create_lo_ra_nodes_task.go
  11. 130 0
      services/iot/create_product.go
  12. 124 0
      services/iot/create_product_tags.go
  13. 112 0
      services/iot/create_product_topic.go
  14. 116 0
      services/iot/create_rule.go
  15. 112 0
      services/iot/create_rule_action.go
  16. 112 0
      services/iot/create_topic_route_table.go
  17. 110 0
      services/iot/delete_device.go
  18. 111 0
      services/iot/delete_device_file.go
  19. 108 0
      services/iot/delete_device_group.go
  20. 111 0
      services/iot/delete_device_prop.go
  21. 108 0
      services/iot/delete_product.go
  22. 109 0
      services/iot/delete_product_tags.go
  23. 108 0
      services/iot/delete_product_topic.go
  24. 108 0
      services/iot/delete_rule.go
  25. 108 0
      services/iot/delete_rule_action.go
  26. 112 0
      services/iot/delete_topic_route_table.go
  27. 110 0
      services/iot/disable_thing.go
  28. 110 0
      services/iot/enable_thing.go
  29. 111 0
      services/iot/get_device_shadow.go
  30. 115 0
      services/iot/get_device_status.go
  31. 130 0
      services/iot/get_gateway_by_sub_device.go
  32. 113 0
      services/iot/get_lora_nodes_task.go
  33. 113 0
      services/iot/get_nodes_adding_task.go
  34. 128 0
      services/iot/get_rule.go
  35. 117 0
      services/iot/get_rule_action.go
  36. 131 0
      services/iot/get_thing_topo.go
  37. 118 0
      services/iot/invoke_thing_service.go
  38. 111 0
      services/iot/invoke_things_service.go
  39. 128 0
      services/iot/list_product_by_tags.go
  40. 118 0
      services/iot/list_product_tags.go
  41. 136 0
      services/iot/list_rule.go
  42. 121 0
      services/iot/list_rule_actions.go
  43. 116 0
      services/iot/notify_add_thing_topo.go
  44. 112 0
      services/iot/pub.go
  45. 110 0
      services/iot/pub_broadcast.go
  46. 141 0
      services/iot/query_app_device_list.go
  47. 116 0
      services/iot/query_batch_register_device_status.go
  48. 134 0
      services/iot/query_device.go
  49. 131 0
      services/iot/query_device_by_tags.go
  50. 130 0
      services/iot/query_device_desired_property.go
  51. 132 0
      services/iot/query_device_detail.go
  52. 135 0
      services/iot/query_device_event_data.go
  53. 120 0
      services/iot/query_device_file.go
  54. 128 0
      services/iot/query_device_file_list.go
  55. 121 0
      services/iot/query_device_group_by_device.go
  56. 129 0
      services/iot/query_device_group_by_tags.go
  57. 119 0
      services/iot/query_device_group_info.go
  58. 127 0
      services/iot/query_device_group_list.go
  59. 118 0
      services/iot/query_device_group_tag_list.go
  60. 126 0
      services/iot/query_device_list_by_device_group.go
  61. 111 0
      services/iot/query_device_prop.go
  62. 136 0
      services/iot/query_device_properties_data.go
  63. 131 0
      services/iot/query_device_property_data.go
  64. 128 0
      services/iot/query_device_property_status.go
  65. 134 0
      services/iot/query_device_service_data.go
  66. 115 0
      services/iot/query_device_statistics.go
  67. 122 0
      services/iot/query_lo_ra_join_permissions.go
  68. 126 0
      services/iot/query_page_by_apply_id.go
  69. 128 0
      services/iot/query_product.go
  70. 133 0
      services/iot/query_product_list.go
  71. 121 0
      services/iot/query_product_topic.go
  72. 119 0
      services/iot/query_super_device_group.go
  73. 110 0
      services/iot/query_topic_reverse_route_table.go
  74. 110 0
      services/iot/query_topic_route_table.go
  75. 115 0
      services/iot/r_rpc.go
  76. 123 0
      services/iot/register_device.go
  77. 111 0
      services/iot/remove_thing_topo.go
  78. 111 0
      services/iot/save_device_prop.go
  79. 118 0
      services/iot/set_device_desired_property.go
  80. 109 0
      services/iot/set_device_group_tags.go
  81. 116 0
      services/iot/set_device_property.go
  82. 110 0
      services/iot/set_devices_property.go
  83. 108 0
      services/iot/start_rule.go
  84. 108 0
      services/iot/stop_rule.go
  85. 109 0
      services/iot/update_device_group.go
  86. 110 0
      services/iot/update_device_shadow.go
  87. 110 0
      services/iot/update_product.go
  88. 124 0
      services/iot/update_product_tags.go
  89. 111 0
      services/iot/update_product_topic.go
  90. 115 0
      services/iot/update_rule.go
  91. 110 0
      services/iot/update_rule_action.go

+ 118 - 0
services/iot/batch_add_device_group_relations.go

@@ -0,0 +1,118 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// BatchAddDeviceGroupRelations invokes the iot.BatchAddDeviceGroupRelations API synchronously
+// api document: https://help.aliyun.com/api/iot/batchadddevicegrouprelations.html
+func (client *Client) BatchAddDeviceGroupRelations(request *BatchAddDeviceGroupRelationsRequest) (response *BatchAddDeviceGroupRelationsResponse, err error) {
+	response = CreateBatchAddDeviceGroupRelationsResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// BatchAddDeviceGroupRelationsWithChan invokes the iot.BatchAddDeviceGroupRelations API asynchronously
+// api document: https://help.aliyun.com/api/iot/batchadddevicegrouprelations.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) BatchAddDeviceGroupRelationsWithChan(request *BatchAddDeviceGroupRelationsRequest) (<-chan *BatchAddDeviceGroupRelationsResponse, <-chan error) {
+	responseChan := make(chan *BatchAddDeviceGroupRelationsResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.BatchAddDeviceGroupRelations(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// BatchAddDeviceGroupRelationsWithCallback invokes the iot.BatchAddDeviceGroupRelations API asynchronously
+// api document: https://help.aliyun.com/api/iot/batchadddevicegrouprelations.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) BatchAddDeviceGroupRelationsWithCallback(request *BatchAddDeviceGroupRelationsRequest, callback func(response *BatchAddDeviceGroupRelationsResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *BatchAddDeviceGroupRelationsResponse
+		var err error
+		defer close(result)
+		response, err = client.BatchAddDeviceGroupRelations(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// BatchAddDeviceGroupRelationsRequest is the request struct for api BatchAddDeviceGroupRelations
+type BatchAddDeviceGroupRelationsRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string                                `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string                                `position:"Query" name:"IotInstanceId"`
+	GroupId       string                                `position:"Query" name:"GroupId"`
+	Device        *[]BatchAddDeviceGroupRelationsDevice `position:"Query" name:"Device" type:"Repeated"`
+}
+
+type BatchAddDeviceGroupRelationsDevice struct {
+	ProductKey string `name:"ProductKey"`
+	DeviceName string `name:"DeviceName"`
+}
+
+// BatchAddDeviceGroupRelationsResponse is the response struct for api BatchAddDeviceGroupRelations
+type BatchAddDeviceGroupRelationsResponse struct {
+	*responses.BaseResponse
+	RequestId                      string `json:"RequestId" xml:"RequestId"`
+	Success                        bool   `json:"Success" xml:"Success"`
+	Code                           string `json:"Code" xml:"Code"`
+	ValidDeviceCount               int    `json:"ValidDeviceCount" xml:"ValidDeviceCount"`
+	ExceedTenGroupDeviceCount      int    `json:"ExceedTenGroupDeviceCount" xml:"ExceedTenGroupDeviceCount"`
+	AlreadyRelatedGroupDeviceCount int    `json:"AlreadyRelatedGroupDeviceCount" xml:"AlreadyRelatedGroupDeviceCount"`
+	SuccessAddedDeviceCount        int    `json:"SuccessAddedDeviceCount" xml:"SuccessAddedDeviceCount"`
+	ErrorMessage                   string `json:"ErrorMessage" xml:"ErrorMessage"`
+}
+
+// CreateBatchAddDeviceGroupRelationsRequest creates a request to invoke BatchAddDeviceGroupRelations API
+func CreateBatchAddDeviceGroupRelationsRequest() (request *BatchAddDeviceGroupRelationsRequest) {
+	request = &BatchAddDeviceGroupRelationsRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "BatchAddDeviceGroupRelations", "iot", "openAPI")
+	return
+}
+
+// CreateBatchAddDeviceGroupRelationsResponse creates a response to parse from BatchAddDeviceGroupRelations response
+func CreateBatchAddDeviceGroupRelationsResponse() (response *BatchAddDeviceGroupRelationsResponse) {
+	response = &BatchAddDeviceGroupRelationsResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 115 - 0
services/iot/batch_check_device_names.go

@@ -0,0 +1,115 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// BatchCheckDeviceNames invokes the iot.BatchCheckDeviceNames API synchronously
+// api document: https://help.aliyun.com/api/iot/batchcheckdevicenames.html
+func (client *Client) BatchCheckDeviceNames(request *BatchCheckDeviceNamesRequest) (response *BatchCheckDeviceNamesResponse, err error) {
+	response = CreateBatchCheckDeviceNamesResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// BatchCheckDeviceNamesWithChan invokes the iot.BatchCheckDeviceNames API asynchronously
+// api document: https://help.aliyun.com/api/iot/batchcheckdevicenames.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) BatchCheckDeviceNamesWithChan(request *BatchCheckDeviceNamesRequest) (<-chan *BatchCheckDeviceNamesResponse, <-chan error) {
+	responseChan := make(chan *BatchCheckDeviceNamesResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.BatchCheckDeviceNames(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// BatchCheckDeviceNamesWithCallback invokes the iot.BatchCheckDeviceNames API asynchronously
+// api document: https://help.aliyun.com/api/iot/batchcheckdevicenames.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) BatchCheckDeviceNamesWithCallback(request *BatchCheckDeviceNamesRequest, callback func(response *BatchCheckDeviceNamesResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *BatchCheckDeviceNamesResponse
+		var err error
+		defer close(result)
+		response, err = client.BatchCheckDeviceNames(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// BatchCheckDeviceNamesRequest is the request struct for api BatchCheckDeviceNames
+type BatchCheckDeviceNamesRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string   `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string   `position:"Query" name:"IotInstanceId"`
+	ProductKey    string   `position:"Query" name:"ProductKey"`
+	DeviceName    []string `position:"Query" name:"DeviceName" type:"Repeated"`
+}
+
+// BatchCheckDeviceNamesResponse is the response struct for api BatchCheckDeviceNames
+type BatchCheckDeviceNamesResponse struct {
+	*responses.BaseResponse
+	RequestId    string                     `json:"RequestId" xml:"RequestId"`
+	Success      bool                       `json:"Success" xml:"Success"`
+	Code         string                     `json:"Code" xml:"Code"`
+	ErrorMessage string                     `json:"ErrorMessage" xml:"ErrorMessage"`
+	Data         BatchCheckDeviceNamesData0 `json:"Data" xml:"Data"`
+}
+
+type BatchCheckDeviceNamesData0 struct {
+	ApplyId               int64    `json:"ApplyId" xml:"ApplyId"`
+	InvalidDeviceNameList []string `json:"InvalidDeviceNameList" xml:"InvalidDeviceNameList"`
+}
+
+// CreateBatchCheckDeviceNamesRequest creates a request to invoke BatchCheckDeviceNames API
+func CreateBatchCheckDeviceNamesRequest() (request *BatchCheckDeviceNamesRequest) {
+	request = &BatchCheckDeviceNamesRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "BatchCheckDeviceNames", "iot", "openAPI")
+	return
+}
+
+// CreateBatchCheckDeviceNamesResponse creates a response to parse from BatchCheckDeviceNames response
+func CreateBatchCheckDeviceNamesResponse() (response *BatchCheckDeviceNamesResponse) {
+	response = &BatchCheckDeviceNamesResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 117 - 0
services/iot/batch_delete_device_group_relations.go

@@ -0,0 +1,117 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// BatchDeleteDeviceGroupRelations invokes the iot.BatchDeleteDeviceGroupRelations API synchronously
+// api document: https://help.aliyun.com/api/iot/batchdeletedevicegrouprelations.html
+func (client *Client) BatchDeleteDeviceGroupRelations(request *BatchDeleteDeviceGroupRelationsRequest) (response *BatchDeleteDeviceGroupRelationsResponse, err error) {
+	response = CreateBatchDeleteDeviceGroupRelationsResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// BatchDeleteDeviceGroupRelationsWithChan invokes the iot.BatchDeleteDeviceGroupRelations API asynchronously
+// api document: https://help.aliyun.com/api/iot/batchdeletedevicegrouprelations.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) BatchDeleteDeviceGroupRelationsWithChan(request *BatchDeleteDeviceGroupRelationsRequest) (<-chan *BatchDeleteDeviceGroupRelationsResponse, <-chan error) {
+	responseChan := make(chan *BatchDeleteDeviceGroupRelationsResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.BatchDeleteDeviceGroupRelations(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// BatchDeleteDeviceGroupRelationsWithCallback invokes the iot.BatchDeleteDeviceGroupRelations API asynchronously
+// api document: https://help.aliyun.com/api/iot/batchdeletedevicegrouprelations.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) BatchDeleteDeviceGroupRelationsWithCallback(request *BatchDeleteDeviceGroupRelationsRequest, callback func(response *BatchDeleteDeviceGroupRelationsResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *BatchDeleteDeviceGroupRelationsResponse
+		var err error
+		defer close(result)
+		response, err = client.BatchDeleteDeviceGroupRelations(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// BatchDeleteDeviceGroupRelationsRequest is the request struct for api BatchDeleteDeviceGroupRelations
+type BatchDeleteDeviceGroupRelationsRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string                                   `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string                                   `position:"Query" name:"IotInstanceId"`
+	GroupId       string                                   `position:"Query" name:"GroupId"`
+	Device        *[]BatchDeleteDeviceGroupRelationsDevice `position:"Query" name:"Device" type:"Repeated"`
+}
+
+type BatchDeleteDeviceGroupRelationsDevice struct {
+	ProductKey string `name:"ProductKey"`
+	DeviceName string `name:"DeviceName"`
+}
+
+// BatchDeleteDeviceGroupRelationsResponse is the response struct for api BatchDeleteDeviceGroupRelations
+type BatchDeleteDeviceGroupRelationsResponse struct {
+	*responses.BaseResponse
+	RequestId                      string `json:"RequestId" xml:"RequestId"`
+	Success                        bool   `json:"Success" xml:"Success"`
+	Code                           string `json:"Code" xml:"Code"`
+	ErrorMessage                   string `json:"ErrorMessage" xml:"ErrorMessage"`
+	ValidDeviceCount               int    `json:"ValidDeviceCount" xml:"ValidDeviceCount"`
+	AlreadyRelatedGroupDeviceCount int    `json:"AlreadyRelatedGroupDeviceCount" xml:"AlreadyRelatedGroupDeviceCount"`
+	SuccessDeviceCount             int    `json:"SuccessDeviceCount" xml:"SuccessDeviceCount"`
+}
+
+// CreateBatchDeleteDeviceGroupRelationsRequest creates a request to invoke BatchDeleteDeviceGroupRelations API
+func CreateBatchDeleteDeviceGroupRelationsRequest() (request *BatchDeleteDeviceGroupRelationsRequest) {
+	request = &BatchDeleteDeviceGroupRelationsRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "BatchDeleteDeviceGroupRelations", "iot", "openAPI")
+	return
+}
+
+// CreateBatchDeleteDeviceGroupRelationsResponse creates a response to parse from BatchDeleteDeviceGroupRelations response
+func CreateBatchDeleteDeviceGroupRelationsResponse() (response *BatchDeleteDeviceGroupRelationsResponse) {
+	response = &BatchDeleteDeviceGroupRelationsResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 124 - 0
services/iot/batch_get_device_state.go

@@ -0,0 +1,124 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// BatchGetDeviceState invokes the iot.BatchGetDeviceState API synchronously
+// api document: https://help.aliyun.com/api/iot/batchgetdevicestate.html
+func (client *Client) BatchGetDeviceState(request *BatchGetDeviceStateRequest) (response *BatchGetDeviceStateResponse, err error) {
+	response = CreateBatchGetDeviceStateResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// BatchGetDeviceStateWithChan invokes the iot.BatchGetDeviceState API asynchronously
+// api document: https://help.aliyun.com/api/iot/batchgetdevicestate.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) BatchGetDeviceStateWithChan(request *BatchGetDeviceStateRequest) (<-chan *BatchGetDeviceStateResponse, <-chan error) {
+	responseChan := make(chan *BatchGetDeviceStateResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.BatchGetDeviceState(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// BatchGetDeviceStateWithCallback invokes the iot.BatchGetDeviceState API asynchronously
+// api document: https://help.aliyun.com/api/iot/batchgetdevicestate.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) BatchGetDeviceStateWithCallback(request *BatchGetDeviceStateRequest, callback func(response *BatchGetDeviceStateResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *BatchGetDeviceStateResponse
+		var err error
+		defer close(result)
+		response, err = client.BatchGetDeviceState(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// BatchGetDeviceStateRequest is the request struct for api BatchGetDeviceState
+type BatchGetDeviceStateRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string   `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string   `position:"Query" name:"IotInstanceId"`
+	ProductKey    string   `position:"Query" name:"ProductKey"`
+	DeviceName    []string `position:"Query" name:"DeviceName" type:"Repeated"`
+	IotId         []string `position:"Query" name:"IotId" type:"Repeated"`
+}
+
+// BatchGetDeviceStateResponse is the response struct for api BatchGetDeviceState
+type BatchGetDeviceStateResponse struct {
+	*responses.BaseResponse
+	RequestId        string                               `json:"RequestId" xml:"RequestId"`
+	Success          bool                                 `json:"Success" xml:"Success"`
+	Code             string                               `json:"Code" xml:"Code"`
+	ErrorMessage     string                               `json:"ErrorMessage" xml:"ErrorMessage"`
+	DeviceStatusList BatchGetDeviceStateDeviceStatusList0 `json:"DeviceStatusList" xml:"DeviceStatusList"`
+}
+
+type BatchGetDeviceStateDeviceStatusList0 struct {
+	DeviceStatus []BatchGetDeviceStateDeviceStatus1 `json:"DeviceStatus" xml:"DeviceStatus"`
+}
+
+type BatchGetDeviceStateDeviceStatus1 struct {
+	DeviceId       string `json:"DeviceId" xml:"DeviceId"`
+	DeviceName     string `json:"DeviceName" xml:"DeviceName"`
+	Status         string `json:"Status" xml:"Status"`
+	AsAddress      string `json:"AsAddress" xml:"AsAddress"`
+	LastOnlineTime string `json:"LastOnlineTime" xml:"LastOnlineTime"`
+	IotId          string `json:"IotId" xml:"IotId"`
+}
+
+// CreateBatchGetDeviceStateRequest creates a request to invoke BatchGetDeviceState API
+func CreateBatchGetDeviceStateRequest() (request *BatchGetDeviceStateRequest) {
+	request = &BatchGetDeviceStateRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "BatchGetDeviceState", "iot", "openAPI")
+	return
+}
+
+// CreateBatchGetDeviceStateResponse creates a response to parse from BatchGetDeviceState response
+func CreateBatchGetDeviceStateResponse() (response *BatchGetDeviceStateResponse) {
+	response = &BatchGetDeviceStateResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 114 - 0
services/iot/batch_register_device.go

@@ -0,0 +1,114 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// BatchRegisterDevice invokes the iot.BatchRegisterDevice API synchronously
+// api document: https://help.aliyun.com/api/iot/batchregisterdevice.html
+func (client *Client) BatchRegisterDevice(request *BatchRegisterDeviceRequest) (response *BatchRegisterDeviceResponse, err error) {
+	response = CreateBatchRegisterDeviceResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// BatchRegisterDeviceWithChan invokes the iot.BatchRegisterDevice API asynchronously
+// api document: https://help.aliyun.com/api/iot/batchregisterdevice.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) BatchRegisterDeviceWithChan(request *BatchRegisterDeviceRequest) (<-chan *BatchRegisterDeviceResponse, <-chan error) {
+	responseChan := make(chan *BatchRegisterDeviceResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.BatchRegisterDevice(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// BatchRegisterDeviceWithCallback invokes the iot.BatchRegisterDevice API asynchronously
+// api document: https://help.aliyun.com/api/iot/batchregisterdevice.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) BatchRegisterDeviceWithCallback(request *BatchRegisterDeviceRequest, callback func(response *BatchRegisterDeviceResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *BatchRegisterDeviceResponse
+		var err error
+		defer close(result)
+		response, err = client.BatchRegisterDevice(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// BatchRegisterDeviceRequest is the request struct for api BatchRegisterDevice
+type BatchRegisterDeviceRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string           `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string           `position:"Query" name:"IotInstanceId"`
+	ProductKey    string           `position:"Query" name:"ProductKey"`
+	Count         requests.Integer `position:"Query" name:"Count"`
+}
+
+// BatchRegisterDeviceResponse is the response struct for api BatchRegisterDevice
+type BatchRegisterDeviceResponse struct {
+	*responses.BaseResponse
+	RequestId    string                   `json:"RequestId" xml:"RequestId"`
+	Success      bool                     `json:"Success" xml:"Success"`
+	Code         string                   `json:"Code" xml:"Code"`
+	ErrorMessage string                   `json:"ErrorMessage" xml:"ErrorMessage"`
+	Data         BatchRegisterDeviceData0 `json:"Data" xml:"Data"`
+}
+
+type BatchRegisterDeviceData0 struct {
+	ApplyId int64 `json:"ApplyId" xml:"ApplyId"`
+}
+
+// CreateBatchRegisterDeviceRequest creates a request to invoke BatchRegisterDevice API
+func CreateBatchRegisterDeviceRequest() (request *BatchRegisterDeviceRequest) {
+	request = &BatchRegisterDeviceRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "BatchRegisterDevice", "iot", "openAPI")
+	return
+}
+
+// CreateBatchRegisterDeviceResponse creates a response to parse from BatchRegisterDevice response
+func CreateBatchRegisterDeviceResponse() (response *BatchRegisterDeviceResponse) {
+	response = &BatchRegisterDeviceResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 114 - 0
services/iot/batch_register_device_with_apply_id.go

@@ -0,0 +1,114 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// BatchRegisterDeviceWithApplyId invokes the iot.BatchRegisterDeviceWithApplyId API synchronously
+// api document: https://help.aliyun.com/api/iot/batchregisterdevicewithapplyid.html
+func (client *Client) BatchRegisterDeviceWithApplyId(request *BatchRegisterDeviceWithApplyIdRequest) (response *BatchRegisterDeviceWithApplyIdResponse, err error) {
+	response = CreateBatchRegisterDeviceWithApplyIdResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// BatchRegisterDeviceWithApplyIdWithChan invokes the iot.BatchRegisterDeviceWithApplyId API asynchronously
+// api document: https://help.aliyun.com/api/iot/batchregisterdevicewithapplyid.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) BatchRegisterDeviceWithApplyIdWithChan(request *BatchRegisterDeviceWithApplyIdRequest) (<-chan *BatchRegisterDeviceWithApplyIdResponse, <-chan error) {
+	responseChan := make(chan *BatchRegisterDeviceWithApplyIdResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.BatchRegisterDeviceWithApplyId(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// BatchRegisterDeviceWithApplyIdWithCallback invokes the iot.BatchRegisterDeviceWithApplyId API asynchronously
+// api document: https://help.aliyun.com/api/iot/batchregisterdevicewithapplyid.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) BatchRegisterDeviceWithApplyIdWithCallback(request *BatchRegisterDeviceWithApplyIdRequest, callback func(response *BatchRegisterDeviceWithApplyIdResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *BatchRegisterDeviceWithApplyIdResponse
+		var err error
+		defer close(result)
+		response, err = client.BatchRegisterDeviceWithApplyId(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// BatchRegisterDeviceWithApplyIdRequest is the request struct for api BatchRegisterDeviceWithApplyId
+type BatchRegisterDeviceWithApplyIdRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string           `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string           `position:"Query" name:"IotInstanceId"`
+	ProductKey    string           `position:"Query" name:"ProductKey"`
+	ApplyId       requests.Integer `position:"Query" name:"ApplyId"`
+}
+
+// BatchRegisterDeviceWithApplyIdResponse is the response struct for api BatchRegisterDeviceWithApplyId
+type BatchRegisterDeviceWithApplyIdResponse struct {
+	*responses.BaseResponse
+	RequestId    string                              `json:"RequestId" xml:"RequestId"`
+	Success      bool                                `json:"Success" xml:"Success"`
+	Code         string                              `json:"Code" xml:"Code"`
+	ErrorMessage string                              `json:"ErrorMessage" xml:"ErrorMessage"`
+	Data         BatchRegisterDeviceWithApplyIdData0 `json:"Data" xml:"Data"`
+}
+
+type BatchRegisterDeviceWithApplyIdData0 struct {
+	ApplyId int64 `json:"ApplyId" xml:"ApplyId"`
+}
+
+// CreateBatchRegisterDeviceWithApplyIdRequest creates a request to invoke BatchRegisterDeviceWithApplyId API
+func CreateBatchRegisterDeviceWithApplyIdRequest() (request *BatchRegisterDeviceWithApplyIdRequest) {
+	request = &BatchRegisterDeviceWithApplyIdRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "BatchRegisterDeviceWithApplyId", "iot", "openAPI")
+	return
+}
+
+// CreateBatchRegisterDeviceWithApplyIdResponse creates a response to parse from BatchRegisterDeviceWithApplyId response
+func CreateBatchRegisterDeviceWithApplyIdResponse() (response *BatchRegisterDeviceWithApplyIdResponse) {
+	response = &BatchRegisterDeviceWithApplyIdResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 115 - 0
services/iot/batch_update_device_nickname.go

@@ -0,0 +1,115 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// BatchUpdateDeviceNickname invokes the iot.BatchUpdateDeviceNickname API synchronously
+// api document: https://help.aliyun.com/api/iot/batchupdatedevicenickname.html
+func (client *Client) BatchUpdateDeviceNickname(request *BatchUpdateDeviceNicknameRequest) (response *BatchUpdateDeviceNicknameResponse, err error) {
+	response = CreateBatchUpdateDeviceNicknameResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// BatchUpdateDeviceNicknameWithChan invokes the iot.BatchUpdateDeviceNickname API asynchronously
+// api document: https://help.aliyun.com/api/iot/batchupdatedevicenickname.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) BatchUpdateDeviceNicknameWithChan(request *BatchUpdateDeviceNicknameRequest) (<-chan *BatchUpdateDeviceNicknameResponse, <-chan error) {
+	responseChan := make(chan *BatchUpdateDeviceNicknameResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.BatchUpdateDeviceNickname(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// BatchUpdateDeviceNicknameWithCallback invokes the iot.BatchUpdateDeviceNickname API asynchronously
+// api document: https://help.aliyun.com/api/iot/batchupdatedevicenickname.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) BatchUpdateDeviceNicknameWithCallback(request *BatchUpdateDeviceNicknameRequest, callback func(response *BatchUpdateDeviceNicknameResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *BatchUpdateDeviceNicknameResponse
+		var err error
+		defer close(result)
+		response, err = client.BatchUpdateDeviceNickname(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// BatchUpdateDeviceNicknameRequest is the request struct for api BatchUpdateDeviceNickname
+type BatchUpdateDeviceNicknameRequest struct {
+	*requests.RpcRequest
+	AccessKeyId        string                                         `position:"Query" name:"AccessKeyId"`
+	IotInstanceId      string                                         `position:"Query" name:"IotInstanceId"`
+	DeviceNicknameInfo *[]BatchUpdateDeviceNicknameDeviceNicknameInfo `position:"Query" name:"DeviceNicknameInfo" type:"Repeated"`
+}
+
+type BatchUpdateDeviceNicknameDeviceNicknameInfo struct {
+	ProductKey string `name:"ProductKey"`
+	DeviceName string `name:"DeviceName"`
+	Nickname   string `name:"Nickname"`
+	IotId      string `name:"IotId"`
+}
+
+// BatchUpdateDeviceNicknameResponse is the response struct for api BatchUpdateDeviceNickname
+type BatchUpdateDeviceNicknameResponse struct {
+	*responses.BaseResponse
+	RequestId    string `json:"RequestId" xml:"RequestId"`
+	Success      bool   `json:"Success" xml:"Success"`
+	Code         string `json:"Code" xml:"Code"`
+	ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"`
+}
+
+// CreateBatchUpdateDeviceNicknameRequest creates a request to invoke BatchUpdateDeviceNickname API
+func CreateBatchUpdateDeviceNicknameRequest() (request *BatchUpdateDeviceNicknameRequest) {
+	request = &BatchUpdateDeviceNicknameRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "BatchUpdateDeviceNickname", "iot", "openAPI")
+	return
+}
+
+// CreateBatchUpdateDeviceNicknameResponse creates a response to parse from BatchUpdateDeviceNickname response
+func CreateBatchUpdateDeviceNicknameResponse() (response *BatchUpdateDeviceNicknameResponse) {
+	response = &BatchUpdateDeviceNicknameResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 104 - 0
services/iot/client.go

@@ -0,0 +1,104 @@
+//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.
+
+package iot
+
+import (
+	"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
+}
+
+// NewClient creates a sdk client with environment variables
+func NewClient() (client *Client, err error) {
+	client = &Client{}
+	err = client.Init()
+	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)
+	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)
+	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)
+	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)
+	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)
+	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)
+	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)
+	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)
+	return
+}

+ 118 - 0
services/iot/create_device_group.go

@@ -0,0 +1,118 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// CreateDeviceGroup invokes the iot.CreateDeviceGroup API synchronously
+// api document: https://help.aliyun.com/api/iot/createdevicegroup.html
+func (client *Client) CreateDeviceGroup(request *CreateDeviceGroupRequest) (response *CreateDeviceGroupResponse, err error) {
+	response = CreateCreateDeviceGroupResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// CreateDeviceGroupWithChan invokes the iot.CreateDeviceGroup API asynchronously
+// api document: https://help.aliyun.com/api/iot/createdevicegroup.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CreateDeviceGroupWithChan(request *CreateDeviceGroupRequest) (<-chan *CreateDeviceGroupResponse, <-chan error) {
+	responseChan := make(chan *CreateDeviceGroupResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.CreateDeviceGroup(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// CreateDeviceGroupWithCallback invokes the iot.CreateDeviceGroup API asynchronously
+// api document: https://help.aliyun.com/api/iot/createdevicegroup.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CreateDeviceGroupWithCallback(request *CreateDeviceGroupRequest, callback func(response *CreateDeviceGroupResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *CreateDeviceGroupResponse
+		var err error
+		defer close(result)
+		response, err = client.CreateDeviceGroup(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// CreateDeviceGroupRequest is the request struct for api CreateDeviceGroup
+type CreateDeviceGroupRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string `position:"Query" name:"IotInstanceId"`
+	SuperGroupId  string `position:"Query" name:"SuperGroupId"`
+	GroupName     string `position:"Query" name:"GroupName"`
+	GroupDesc     string `position:"Query" name:"GroupDesc"`
+}
+
+// CreateDeviceGroupResponse is the response struct for api CreateDeviceGroup
+type CreateDeviceGroupResponse struct {
+	*responses.BaseResponse
+	RequestId    string                 `json:"RequestId" xml:"RequestId"`
+	Success      bool                   `json:"Success" xml:"Success"`
+	Code         string                 `json:"Code" xml:"Code"`
+	ErrorMessage string                 `json:"ErrorMessage" xml:"ErrorMessage"`
+	Data         CreateDeviceGroupData0 `json:"Data" xml:"Data"`
+}
+
+type CreateDeviceGroupData0 struct {
+	GroupId   string `json:"GroupId" xml:"GroupId"`
+	UtcCreate string `json:"UtcCreate" xml:"UtcCreate"`
+	GroupName string `json:"GroupName" xml:"GroupName"`
+	GroupDesc string `json:"GroupDesc" xml:"GroupDesc"`
+}
+
+// CreateCreateDeviceGroupRequest creates a request to invoke CreateDeviceGroup API
+func CreateCreateDeviceGroupRequest() (request *CreateDeviceGroupRequest) {
+	request = &CreateDeviceGroupRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "CreateDeviceGroup", "iot", "openAPI")
+	return
+}
+
+// CreateCreateDeviceGroupResponse creates a response to parse from CreateDeviceGroup response
+func CreateCreateDeviceGroupResponse() (response *CreateDeviceGroupResponse) {
+	response = &CreateDeviceGroupResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 115 - 0
services/iot/create_lo_ra_nodes_task.go

@@ -0,0 +1,115 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// CreateLoRaNodesTask invokes the iot.CreateLoRaNodesTask API synchronously
+// api document: https://help.aliyun.com/api/iot/createloranodestask.html
+func (client *Client) CreateLoRaNodesTask(request *CreateLoRaNodesTaskRequest) (response *CreateLoRaNodesTaskResponse, err error) {
+	response = CreateCreateLoRaNodesTaskResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// CreateLoRaNodesTaskWithChan invokes the iot.CreateLoRaNodesTask API asynchronously
+// api document: https://help.aliyun.com/api/iot/createloranodestask.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CreateLoRaNodesTaskWithChan(request *CreateLoRaNodesTaskRequest) (<-chan *CreateLoRaNodesTaskResponse, <-chan error) {
+	responseChan := make(chan *CreateLoRaNodesTaskResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.CreateLoRaNodesTask(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// CreateLoRaNodesTaskWithCallback invokes the iot.CreateLoRaNodesTask API asynchronously
+// api document: https://help.aliyun.com/api/iot/createloranodestask.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CreateLoRaNodesTaskWithCallback(request *CreateLoRaNodesTaskRequest, callback func(response *CreateLoRaNodesTaskResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *CreateLoRaNodesTaskResponse
+		var err error
+		defer close(result)
+		response, err = client.CreateLoRaNodesTask(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// CreateLoRaNodesTaskRequest is the request struct for api CreateLoRaNodesTask
+type CreateLoRaNodesTaskRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string                           `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string                           `position:"Query" name:"IotInstanceId"`
+	ProductKey    string                           `position:"Query" name:"ProductKey"`
+	DeviceInfo    *[]CreateLoRaNodesTaskDeviceInfo `position:"Query" name:"DeviceInfo" type:"Repeated"`
+}
+
+type CreateLoRaNodesTaskDeviceInfo struct {
+	DevEui  string `name:"DevEui"`
+	PinCode string `name:"PinCode"`
+}
+
+// CreateLoRaNodesTaskResponse is the response struct for api CreateLoRaNodesTask
+type CreateLoRaNodesTaskResponse struct {
+	*responses.BaseResponse
+	RequestId    string `json:"RequestId" xml:"RequestId"`
+	Success      bool   `json:"Success" xml:"Success"`
+	Code         string `json:"Code" xml:"Code"`
+	ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"`
+	TaskId       string `json:"TaskId" xml:"TaskId"`
+}
+
+// CreateCreateLoRaNodesTaskRequest creates a request to invoke CreateLoRaNodesTask API
+func CreateCreateLoRaNodesTaskRequest() (request *CreateLoRaNodesTaskRequest) {
+	request = &CreateLoRaNodesTaskRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "CreateLoRaNodesTask", "iot", "openAPI")
+	return
+}
+
+// CreateCreateLoRaNodesTaskResponse creates a response to parse from CreateLoRaNodesTask response
+func CreateCreateLoRaNodesTaskResponse() (response *CreateLoRaNodesTaskResponse) {
+	response = &CreateLoRaNodesTaskResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 130 - 0
services/iot/create_product.go

@@ -0,0 +1,130 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// CreateProduct invokes the iot.CreateProduct API synchronously
+// api document: https://help.aliyun.com/api/iot/createproduct.html
+func (client *Client) CreateProduct(request *CreateProductRequest) (response *CreateProductResponse, err error) {
+	response = CreateCreateProductResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// CreateProductWithChan invokes the iot.CreateProduct API asynchronously
+// api document: https://help.aliyun.com/api/iot/createproduct.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CreateProductWithChan(request *CreateProductRequest) (<-chan *CreateProductResponse, <-chan error) {
+	responseChan := make(chan *CreateProductResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.CreateProduct(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// CreateProductWithCallback invokes the iot.CreateProduct API asynchronously
+// api document: https://help.aliyun.com/api/iot/createproduct.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CreateProductWithCallback(request *CreateProductRequest, callback func(response *CreateProductResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *CreateProductResponse
+		var err error
+		defer close(result)
+		response, err = client.CreateProduct(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// CreateProductRequest is the request struct for api CreateProduct
+type CreateProductRequest struct {
+	*requests.RpcRequest
+	AccessKeyId         string           `position:"Query" name:"AccessKeyId"`
+	IotInstanceId       string           `position:"Query" name:"IotInstanceId"`
+	ProductName         string           `position:"Query" name:"ProductName"`
+	NodeType            requests.Integer `position:"Query" name:"NodeType"`
+	DataFormat          requests.Integer `position:"Query" name:"DataFormat"`
+	Description         string           `position:"Query" name:"Description"`
+	AliyunCommodityCode string           `position:"Query" name:"AliyunCommodityCode"`
+	Id2                 requests.Boolean `position:"Query" name:"Id2"`
+	CategoryId          requests.Integer `position:"Query" name:"CategoryId"`
+	ProtocolType        string           `position:"Query" name:"ProtocolType"`
+	NetType             string           `position:"Query" name:"NetType"`
+	JoinPermissionId    string           `position:"Query" name:"JoinPermissionId"`
+}
+
+// CreateProductResponse is the response struct for api CreateProduct
+type CreateProductResponse struct {
+	*responses.BaseResponse
+	RequestId    string             `json:"RequestId" xml:"RequestId"`
+	Success      bool               `json:"Success" xml:"Success"`
+	Code         string             `json:"Code" xml:"Code"`
+	ErrorMessage string             `json:"ErrorMessage" xml:"ErrorMessage"`
+	ProductKey   string             `json:"ProductKey" xml:"ProductKey"`
+	Data         CreateProductData0 `json:"Data" xml:"Data"`
+}
+
+type CreateProductData0 struct {
+	DataFormat          int    `json:"DataFormat" xml:"DataFormat"`
+	Description         string `json:"Description" xml:"Description"`
+	NodeType            int    `json:"NodeType" xml:"NodeType"`
+	ProductKey          string `json:"ProductKey" xml:"ProductKey"`
+	ProductName         string `json:"ProductName" xml:"ProductName"`
+	AliyunCommodityCode string `json:"AliyunCommodityCode" xml:"AliyunCommodityCode"`
+	Id2                 bool   `json:"Id2" xml:"Id2"`
+	ProtocolType        string `json:"ProtocolType" xml:"ProtocolType"`
+}
+
+// CreateCreateProductRequest creates a request to invoke CreateProduct API
+func CreateCreateProductRequest() (request *CreateProductRequest) {
+	request = &CreateProductRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "CreateProduct", "iot", "openAPI")
+	return
+}
+
+// CreateCreateProductResponse creates a response to parse from CreateProduct response
+func CreateCreateProductResponse() (response *CreateProductResponse) {
+	response = &CreateProductResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 124 - 0
services/iot/create_product_tags.go

@@ -0,0 +1,124 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// CreateProductTags invokes the iot.CreateProductTags API synchronously
+// api document: https://help.aliyun.com/api/iot/createproducttags.html
+func (client *Client) CreateProductTags(request *CreateProductTagsRequest) (response *CreateProductTagsResponse, err error) {
+	response = CreateCreateProductTagsResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// CreateProductTagsWithChan invokes the iot.CreateProductTags API asynchronously
+// api document: https://help.aliyun.com/api/iot/createproducttags.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CreateProductTagsWithChan(request *CreateProductTagsRequest) (<-chan *CreateProductTagsResponse, <-chan error) {
+	responseChan := make(chan *CreateProductTagsResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.CreateProductTags(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// CreateProductTagsWithCallback invokes the iot.CreateProductTags API asynchronously
+// api document: https://help.aliyun.com/api/iot/createproducttags.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CreateProductTagsWithCallback(request *CreateProductTagsRequest, callback func(response *CreateProductTagsResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *CreateProductTagsResponse
+		var err error
+		defer close(result)
+		response, err = client.CreateProductTags(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// CreateProductTagsRequest is the request struct for api CreateProductTags
+type CreateProductTagsRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string                         `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string                         `position:"Query" name:"IotInstanceId"`
+	ProductKey    string                         `position:"Query" name:"ProductKey"`
+	ProductTag    *[]CreateProductTagsProductTag `position:"Query" name:"ProductTag" type:"Repeated"`
+}
+
+type CreateProductTagsProductTag struct {
+	TagKey   string `name:"TagKey"`
+	TagValue string `name:"TagValue"`
+}
+
+// CreateProductTagsResponse is the response struct for api CreateProductTags
+type CreateProductTagsResponse struct {
+	*responses.BaseResponse
+	RequestId          string                               `json:"RequestId" xml:"RequestId"`
+	Success            bool                                 `json:"Success" xml:"Success"`
+	ErrorMessage       string                               `json:"ErrorMessage" xml:"ErrorMessage"`
+	Code               string                               `json:"Code" xml:"Code"`
+	InvalidProductTags CreateProductTagsInvalidProductTags0 `json:"InvalidProductTags" xml:"InvalidProductTags"`
+}
+
+type CreateProductTagsInvalidProductTags0 struct {
+	ProductTag []CreateProductTagsProductTag1 `json:"ProductTag" xml:"ProductTag"`
+}
+
+type CreateProductTagsProductTag1 struct {
+	TagKey   string `json:"TagKey" xml:"TagKey"`
+	TagValue string `json:"TagValue" xml:"TagValue"`
+}
+
+// CreateCreateProductTagsRequest creates a request to invoke CreateProductTags API
+func CreateCreateProductTagsRequest() (request *CreateProductTagsRequest) {
+	request = &CreateProductTagsRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "CreateProductTags", "iot", "openAPI")
+	return
+}
+
+// CreateCreateProductTagsResponse creates a response to parse from CreateProductTags response
+func CreateCreateProductTagsResponse() (response *CreateProductTagsResponse) {
+	response = &CreateProductTagsResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 112 - 0
services/iot/create_product_topic.go

@@ -0,0 +1,112 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// CreateProductTopic invokes the iot.CreateProductTopic API synchronously
+// api document: https://help.aliyun.com/api/iot/createproducttopic.html
+func (client *Client) CreateProductTopic(request *CreateProductTopicRequest) (response *CreateProductTopicResponse, err error) {
+	response = CreateCreateProductTopicResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// CreateProductTopicWithChan invokes the iot.CreateProductTopic API asynchronously
+// api document: https://help.aliyun.com/api/iot/createproducttopic.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CreateProductTopicWithChan(request *CreateProductTopicRequest) (<-chan *CreateProductTopicResponse, <-chan error) {
+	responseChan := make(chan *CreateProductTopicResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.CreateProductTopic(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// CreateProductTopicWithCallback invokes the iot.CreateProductTopic API asynchronously
+// api document: https://help.aliyun.com/api/iot/createproducttopic.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CreateProductTopicWithCallback(request *CreateProductTopicRequest, callback func(response *CreateProductTopicResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *CreateProductTopicResponse
+		var err error
+		defer close(result)
+		response, err = client.CreateProductTopic(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// CreateProductTopicRequest is the request struct for api CreateProductTopic
+type CreateProductTopicRequest struct {
+	*requests.RpcRequest
+	AccessKeyId    string `position:"Query" name:"AccessKeyId"`
+	IotInstanceId  string `position:"Query" name:"IotInstanceId"`
+	ProductKey     string `position:"Query" name:"ProductKey"`
+	TopicShortName string `position:"Query" name:"TopicShortName"`
+	Operation      string `position:"Query" name:"Operation"`
+	Desc           string `position:"Query" name:"Desc"`
+}
+
+// CreateProductTopicResponse is the response struct for api CreateProductTopic
+type CreateProductTopicResponse struct {
+	*responses.BaseResponse
+	RequestId    string `json:"RequestId" xml:"RequestId"`
+	Success      bool   `json:"Success" xml:"Success"`
+	Code         string `json:"Code" xml:"Code"`
+	ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"`
+	TopicId      int64  `json:"TopicId" xml:"TopicId"`
+}
+
+// CreateCreateProductTopicRequest creates a request to invoke CreateProductTopic API
+func CreateCreateProductTopicRequest() (request *CreateProductTopicRequest) {
+	request = &CreateProductTopicRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "CreateProductTopic", "iot", "openAPI")
+	return
+}
+
+// CreateCreateProductTopicResponse creates a response to parse from CreateProductTopic response
+func CreateCreateProductTopicResponse() (response *CreateProductTopicResponse) {
+	response = &CreateProductTopicResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 116 - 0
services/iot/create_rule.go

@@ -0,0 +1,116 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// CreateRule invokes the iot.CreateRule API synchronously
+// api document: https://help.aliyun.com/api/iot/createrule.html
+func (client *Client) CreateRule(request *CreateRuleRequest) (response *CreateRuleResponse, err error) {
+	response = CreateCreateRuleResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// CreateRuleWithChan invokes the iot.CreateRule API asynchronously
+// api document: https://help.aliyun.com/api/iot/createrule.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CreateRuleWithChan(request *CreateRuleRequest) (<-chan *CreateRuleResponse, <-chan error) {
+	responseChan := make(chan *CreateRuleResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.CreateRule(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// CreateRuleWithCallback invokes the iot.CreateRule API asynchronously
+// api document: https://help.aliyun.com/api/iot/createrule.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CreateRuleWithCallback(request *CreateRuleRequest, callback func(response *CreateRuleResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *CreateRuleResponse
+		var err error
+		defer close(result)
+		response, err = client.CreateRule(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// CreateRuleRequest is the request struct for api CreateRule
+type CreateRuleRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string           `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string           `position:"Query" name:"IotInstanceId"`
+	Select        string           `position:"Query" name:"Select"`
+	ShortTopic    string           `position:"Query" name:"ShortTopic"`
+	Where         string           `position:"Query" name:"Where"`
+	ProductKey    string           `position:"Query" name:"ProductKey"`
+	Name          string           `position:"Query" name:"Name"`
+	RuleDesc      string           `position:"Query" name:"RuleDesc"`
+	DataType      string           `position:"Query" name:"DataType"`
+	TopicType     requests.Integer `position:"Query" name:"TopicType"`
+}
+
+// CreateRuleResponse is the response struct for api CreateRule
+type CreateRuleResponse struct {
+	*responses.BaseResponse
+	RequestId    string `json:"RequestId" xml:"RequestId"`
+	Success      bool   `json:"Success" xml:"Success"`
+	Code         string `json:"Code" xml:"Code"`
+	ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"`
+	RuleId       int64  `json:"RuleId" xml:"RuleId"`
+}
+
+// CreateCreateRuleRequest creates a request to invoke CreateRule API
+func CreateCreateRuleRequest() (request *CreateRuleRequest) {
+	request = &CreateRuleRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "CreateRule", "iot", "openAPI")
+	return
+}
+
+// CreateCreateRuleResponse creates a response to parse from CreateRule response
+func CreateCreateRuleResponse() (response *CreateRuleResponse) {
+	response = &CreateRuleResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 112 - 0
services/iot/create_rule_action.go

@@ -0,0 +1,112 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// CreateRuleAction invokes the iot.CreateRuleAction API synchronously
+// api document: https://help.aliyun.com/api/iot/createruleaction.html
+func (client *Client) CreateRuleAction(request *CreateRuleActionRequest) (response *CreateRuleActionResponse, err error) {
+	response = CreateCreateRuleActionResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// CreateRuleActionWithChan invokes the iot.CreateRuleAction API asynchronously
+// api document: https://help.aliyun.com/api/iot/createruleaction.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CreateRuleActionWithChan(request *CreateRuleActionRequest) (<-chan *CreateRuleActionResponse, <-chan error) {
+	responseChan := make(chan *CreateRuleActionResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.CreateRuleAction(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// CreateRuleActionWithCallback invokes the iot.CreateRuleAction API asynchronously
+// api document: https://help.aliyun.com/api/iot/createruleaction.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CreateRuleActionWithCallback(request *CreateRuleActionRequest, callback func(response *CreateRuleActionResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *CreateRuleActionResponse
+		var err error
+		defer close(result)
+		response, err = client.CreateRuleAction(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// CreateRuleActionRequest is the request struct for api CreateRuleAction
+type CreateRuleActionRequest struct {
+	*requests.RpcRequest
+	AccessKeyId     string           `position:"Query" name:"AccessKeyId"`
+	IotInstanceId   string           `position:"Query" name:"IotInstanceId"`
+	RuleId          requests.Integer `position:"Query" name:"RuleId"`
+	Type            string           `position:"Query" name:"Type"`
+	Configuration   string           `position:"Query" name:"Configuration"`
+	ErrorActionFlag requests.Boolean `position:"Query" name:"ErrorActionFlag"`
+}
+
+// CreateRuleActionResponse is the response struct for api CreateRuleAction
+type CreateRuleActionResponse struct {
+	*responses.BaseResponse
+	RequestId    string `json:"RequestId" xml:"RequestId"`
+	Code         string `json:"Code" xml:"Code"`
+	Success      bool   `json:"Success" xml:"Success"`
+	ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"`
+	ActionId     int64  `json:"ActionId" xml:"ActionId"`
+}
+
+// CreateCreateRuleActionRequest creates a request to invoke CreateRuleAction API
+func CreateCreateRuleActionRequest() (request *CreateRuleActionRequest) {
+	request = &CreateRuleActionRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "CreateRuleAction", "iot", "openAPI")
+	return
+}
+
+// CreateCreateRuleActionResponse creates a response to parse from CreateRuleAction response
+func CreateCreateRuleActionResponse() (response *CreateRuleActionResponse) {
+	response = &CreateRuleActionResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 112 - 0
services/iot/create_topic_route_table.go

@@ -0,0 +1,112 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// CreateTopicRouteTable invokes the iot.CreateTopicRouteTable API synchronously
+// api document: https://help.aliyun.com/api/iot/createtopicroutetable.html
+func (client *Client) CreateTopicRouteTable(request *CreateTopicRouteTableRequest) (response *CreateTopicRouteTableResponse, err error) {
+	response = CreateCreateTopicRouteTableResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// CreateTopicRouteTableWithChan invokes the iot.CreateTopicRouteTable API asynchronously
+// api document: https://help.aliyun.com/api/iot/createtopicroutetable.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CreateTopicRouteTableWithChan(request *CreateTopicRouteTableRequest) (<-chan *CreateTopicRouteTableResponse, <-chan error) {
+	responseChan := make(chan *CreateTopicRouteTableResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.CreateTopicRouteTable(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// CreateTopicRouteTableWithCallback invokes the iot.CreateTopicRouteTable API asynchronously
+// api document: https://help.aliyun.com/api/iot/createtopicroutetable.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CreateTopicRouteTableWithCallback(request *CreateTopicRouteTableRequest, callback func(response *CreateTopicRouteTableResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *CreateTopicRouteTableResponse
+		var err error
+		defer close(result)
+		response, err = client.CreateTopicRouteTable(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// CreateTopicRouteTableRequest is the request struct for api CreateTopicRouteTable
+type CreateTopicRouteTableRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string   `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string   `position:"Query" name:"IotInstanceId"`
+	RegionId      string   `position:"Query" name:"RegionId"`
+	SrcTopic      string   `position:"Query" name:"SrcTopic"`
+	DstTopic      []string `position:"Query" name:"DstTopic" type:"Repeated"`
+}
+
+// CreateTopicRouteTableResponse is the response struct for api CreateTopicRouteTable
+type CreateTopicRouteTableResponse struct {
+	*responses.BaseResponse
+	RequestId     string   `json:"RequestId" xml:"RequestId"`
+	Success       bool     `json:"Success" xml:"Success"`
+	Code          string   `json:"Code" xml:"Code"`
+	IsAllSucceed  bool     `json:"IsAllSucceed" xml:"IsAllSucceed"`
+	ErrorMessage  string   `json:"ErrorMessage" xml:"ErrorMessage"`
+	FailureTopics []string `json:"FailureTopics" xml:"FailureTopics"`
+}
+
+// CreateCreateTopicRouteTableRequest creates a request to invoke CreateTopicRouteTable API
+func CreateCreateTopicRouteTableRequest() (request *CreateTopicRouteTableRequest) {
+	request = &CreateTopicRouteTableRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "CreateTopicRouteTable", "iot", "openAPI")
+	return
+}
+
+// CreateCreateTopicRouteTableResponse creates a response to parse from CreateTopicRouteTable response
+func CreateCreateTopicRouteTableResponse() (response *CreateTopicRouteTableResponse) {
+	response = &CreateTopicRouteTableResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 110 - 0
services/iot/delete_device.go

@@ -0,0 +1,110 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// DeleteDevice invokes the iot.DeleteDevice API synchronously
+// api document: https://help.aliyun.com/api/iot/deletedevice.html
+func (client *Client) DeleteDevice(request *DeleteDeviceRequest) (response *DeleteDeviceResponse, err error) {
+	response = CreateDeleteDeviceResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DeleteDeviceWithChan invokes the iot.DeleteDevice API asynchronously
+// api document: https://help.aliyun.com/api/iot/deletedevice.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteDeviceWithChan(request *DeleteDeviceRequest) (<-chan *DeleteDeviceResponse, <-chan error) {
+	responseChan := make(chan *DeleteDeviceResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DeleteDevice(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DeleteDeviceWithCallback invokes the iot.DeleteDevice API asynchronously
+// api document: https://help.aliyun.com/api/iot/deletedevice.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteDeviceWithCallback(request *DeleteDeviceRequest, callback func(response *DeleteDeviceResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DeleteDeviceResponse
+		var err error
+		defer close(result)
+		response, err = client.DeleteDevice(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DeleteDeviceRequest is the request struct for api DeleteDevice
+type DeleteDeviceRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string `position:"Query" name:"IotInstanceId"`
+	IotId         string `position:"Query" name:"IotId"`
+	ProductKey    string `position:"Query" name:"ProductKey"`
+	DeviceName    string `position:"Query" name:"DeviceName"`
+}
+
+// DeleteDeviceResponse is the response struct for api DeleteDevice
+type DeleteDeviceResponse struct {
+	*responses.BaseResponse
+	RequestId    string `json:"RequestId" xml:"RequestId"`
+	Success      bool   `json:"Success" xml:"Success"`
+	Code         string `json:"Code" xml:"Code"`
+	ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"`
+}
+
+// CreateDeleteDeviceRequest creates a request to invoke DeleteDevice API
+func CreateDeleteDeviceRequest() (request *DeleteDeviceRequest) {
+	request = &DeleteDeviceRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "DeleteDevice", "iot", "openAPI")
+	return
+}
+
+// CreateDeleteDeviceResponse creates a response to parse from DeleteDevice response
+func CreateDeleteDeviceResponse() (response *DeleteDeviceResponse) {
+	response = &DeleteDeviceResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 111 - 0
services/iot/delete_device_file.go

@@ -0,0 +1,111 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// DeleteDeviceFile invokes the iot.DeleteDeviceFile API synchronously
+// api document: https://help.aliyun.com/api/iot/deletedevicefile.html
+func (client *Client) DeleteDeviceFile(request *DeleteDeviceFileRequest) (response *DeleteDeviceFileResponse, err error) {
+	response = CreateDeleteDeviceFileResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DeleteDeviceFileWithChan invokes the iot.DeleteDeviceFile API asynchronously
+// api document: https://help.aliyun.com/api/iot/deletedevicefile.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteDeviceFileWithChan(request *DeleteDeviceFileRequest) (<-chan *DeleteDeviceFileResponse, <-chan error) {
+	responseChan := make(chan *DeleteDeviceFileResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DeleteDeviceFile(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DeleteDeviceFileWithCallback invokes the iot.DeleteDeviceFile API asynchronously
+// api document: https://help.aliyun.com/api/iot/deletedevicefile.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteDeviceFileWithCallback(request *DeleteDeviceFileRequest, callback func(response *DeleteDeviceFileResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DeleteDeviceFileResponse
+		var err error
+		defer close(result)
+		response, err = client.DeleteDeviceFile(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DeleteDeviceFileRequest is the request struct for api DeleteDeviceFile
+type DeleteDeviceFileRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string `position:"Query" name:"IotInstanceId"`
+	ProductKey    string `position:"Query" name:"ProductKey"`
+	DeviceName    string `position:"Query" name:"DeviceName"`
+	FileId        string `position:"Query" name:"FileId"`
+	IotId         string `position:"Query" name:"IotId"`
+}
+
+// DeleteDeviceFileResponse is the response struct for api DeleteDeviceFile
+type DeleteDeviceFileResponse struct {
+	*responses.BaseResponse
+	RequestId    string `json:"RequestId" xml:"RequestId"`
+	Success      bool   `json:"Success" xml:"Success"`
+	Code         string `json:"Code" xml:"Code"`
+	ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"`
+}
+
+// CreateDeleteDeviceFileRequest creates a request to invoke DeleteDeviceFile API
+func CreateDeleteDeviceFileRequest() (request *DeleteDeviceFileRequest) {
+	request = &DeleteDeviceFileRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "DeleteDeviceFile", "iot", "openAPI")
+	return
+}
+
+// CreateDeleteDeviceFileResponse creates a response to parse from DeleteDeviceFile response
+func CreateDeleteDeviceFileResponse() (response *DeleteDeviceFileResponse) {
+	response = &DeleteDeviceFileResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 108 - 0
services/iot/delete_device_group.go

@@ -0,0 +1,108 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// DeleteDeviceGroup invokes the iot.DeleteDeviceGroup API synchronously
+// api document: https://help.aliyun.com/api/iot/deletedevicegroup.html
+func (client *Client) DeleteDeviceGroup(request *DeleteDeviceGroupRequest) (response *DeleteDeviceGroupResponse, err error) {
+	response = CreateDeleteDeviceGroupResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DeleteDeviceGroupWithChan invokes the iot.DeleteDeviceGroup API asynchronously
+// api document: https://help.aliyun.com/api/iot/deletedevicegroup.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteDeviceGroupWithChan(request *DeleteDeviceGroupRequest) (<-chan *DeleteDeviceGroupResponse, <-chan error) {
+	responseChan := make(chan *DeleteDeviceGroupResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DeleteDeviceGroup(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DeleteDeviceGroupWithCallback invokes the iot.DeleteDeviceGroup API asynchronously
+// api document: https://help.aliyun.com/api/iot/deletedevicegroup.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteDeviceGroupWithCallback(request *DeleteDeviceGroupRequest, callback func(response *DeleteDeviceGroupResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DeleteDeviceGroupResponse
+		var err error
+		defer close(result)
+		response, err = client.DeleteDeviceGroup(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DeleteDeviceGroupRequest is the request struct for api DeleteDeviceGroup
+type DeleteDeviceGroupRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string `position:"Query" name:"IotInstanceId"`
+	GroupId       string `position:"Query" name:"GroupId"`
+}
+
+// DeleteDeviceGroupResponse is the response struct for api DeleteDeviceGroup
+type DeleteDeviceGroupResponse struct {
+	*responses.BaseResponse
+	RequestId    string `json:"RequestId" xml:"RequestId"`
+	Success      bool   `json:"Success" xml:"Success"`
+	Code         string `json:"Code" xml:"Code"`
+	ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"`
+}
+
+// CreateDeleteDeviceGroupRequest creates a request to invoke DeleteDeviceGroup API
+func CreateDeleteDeviceGroupRequest() (request *DeleteDeviceGroupRequest) {
+	request = &DeleteDeviceGroupRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "DeleteDeviceGroup", "iot", "openAPI")
+	return
+}
+
+// CreateDeleteDeviceGroupResponse creates a response to parse from DeleteDeviceGroup response
+func CreateDeleteDeviceGroupResponse() (response *DeleteDeviceGroupResponse) {
+	response = &DeleteDeviceGroupResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 111 - 0
services/iot/delete_device_prop.go

@@ -0,0 +1,111 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// DeleteDeviceProp invokes the iot.DeleteDeviceProp API synchronously
+// api document: https://help.aliyun.com/api/iot/deletedeviceprop.html
+func (client *Client) DeleteDeviceProp(request *DeleteDevicePropRequest) (response *DeleteDevicePropResponse, err error) {
+	response = CreateDeleteDevicePropResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DeleteDevicePropWithChan invokes the iot.DeleteDeviceProp API asynchronously
+// api document: https://help.aliyun.com/api/iot/deletedeviceprop.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteDevicePropWithChan(request *DeleteDevicePropRequest) (<-chan *DeleteDevicePropResponse, <-chan error) {
+	responseChan := make(chan *DeleteDevicePropResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DeleteDeviceProp(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DeleteDevicePropWithCallback invokes the iot.DeleteDeviceProp API asynchronously
+// api document: https://help.aliyun.com/api/iot/deletedeviceprop.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteDevicePropWithCallback(request *DeleteDevicePropRequest, callback func(response *DeleteDevicePropResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DeleteDevicePropResponse
+		var err error
+		defer close(result)
+		response, err = client.DeleteDeviceProp(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DeleteDevicePropRequest is the request struct for api DeleteDeviceProp
+type DeleteDevicePropRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string `position:"Query" name:"IotInstanceId"`
+	IotId         string `position:"Query" name:"IotId"`
+	DeviceName    string `position:"Query" name:"DeviceName"`
+	ProductKey    string `position:"Query" name:"ProductKey"`
+	PropKey       string `position:"Query" name:"PropKey"`
+}
+
+// DeleteDevicePropResponse is the response struct for api DeleteDeviceProp
+type DeleteDevicePropResponse struct {
+	*responses.BaseResponse
+	RequestId    string `json:"RequestId" xml:"RequestId"`
+	Success      bool   `json:"Success" xml:"Success"`
+	Code         string `json:"Code" xml:"Code"`
+	ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"`
+}
+
+// CreateDeleteDevicePropRequest creates a request to invoke DeleteDeviceProp API
+func CreateDeleteDevicePropRequest() (request *DeleteDevicePropRequest) {
+	request = &DeleteDevicePropRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "DeleteDeviceProp", "iot", "openAPI")
+	return
+}
+
+// CreateDeleteDevicePropResponse creates a response to parse from DeleteDeviceProp response
+func CreateDeleteDevicePropResponse() (response *DeleteDevicePropResponse) {
+	response = &DeleteDevicePropResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 108 - 0
services/iot/delete_product.go

@@ -0,0 +1,108 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// DeleteProduct invokes the iot.DeleteProduct API synchronously
+// api document: https://help.aliyun.com/api/iot/deleteproduct.html
+func (client *Client) DeleteProduct(request *DeleteProductRequest) (response *DeleteProductResponse, err error) {
+	response = CreateDeleteProductResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DeleteProductWithChan invokes the iot.DeleteProduct API asynchronously
+// api document: https://help.aliyun.com/api/iot/deleteproduct.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteProductWithChan(request *DeleteProductRequest) (<-chan *DeleteProductResponse, <-chan error) {
+	responseChan := make(chan *DeleteProductResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DeleteProduct(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DeleteProductWithCallback invokes the iot.DeleteProduct API asynchronously
+// api document: https://help.aliyun.com/api/iot/deleteproduct.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteProductWithCallback(request *DeleteProductRequest, callback func(response *DeleteProductResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DeleteProductResponse
+		var err error
+		defer close(result)
+		response, err = client.DeleteProduct(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DeleteProductRequest is the request struct for api DeleteProduct
+type DeleteProductRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string `position:"Query" name:"IotInstanceId"`
+	ProductKey    string `position:"Query" name:"ProductKey"`
+}
+
+// DeleteProductResponse is the response struct for api DeleteProduct
+type DeleteProductResponse struct {
+	*responses.BaseResponse
+	RequestId    string `json:"RequestId" xml:"RequestId"`
+	Success      bool   `json:"Success" xml:"Success"`
+	Code         string `json:"Code" xml:"Code"`
+	ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"`
+}
+
+// CreateDeleteProductRequest creates a request to invoke DeleteProduct API
+func CreateDeleteProductRequest() (request *DeleteProductRequest) {
+	request = &DeleteProductRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "DeleteProduct", "iot", "openAPI")
+	return
+}
+
+// CreateDeleteProductResponse creates a response to parse from DeleteProduct response
+func CreateDeleteProductResponse() (response *DeleteProductResponse) {
+	response = &DeleteProductResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 109 - 0
services/iot/delete_product_tags.go

@@ -0,0 +1,109 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// DeleteProductTags invokes the iot.DeleteProductTags API synchronously
+// api document: https://help.aliyun.com/api/iot/deleteproducttags.html
+func (client *Client) DeleteProductTags(request *DeleteProductTagsRequest) (response *DeleteProductTagsResponse, err error) {
+	response = CreateDeleteProductTagsResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DeleteProductTagsWithChan invokes the iot.DeleteProductTags API asynchronously
+// api document: https://help.aliyun.com/api/iot/deleteproducttags.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteProductTagsWithChan(request *DeleteProductTagsRequest) (<-chan *DeleteProductTagsResponse, <-chan error) {
+	responseChan := make(chan *DeleteProductTagsResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DeleteProductTags(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DeleteProductTagsWithCallback invokes the iot.DeleteProductTags API asynchronously
+// api document: https://help.aliyun.com/api/iot/deleteproducttags.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteProductTagsWithCallback(request *DeleteProductTagsRequest, callback func(response *DeleteProductTagsResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DeleteProductTagsResponse
+		var err error
+		defer close(result)
+		response, err = client.DeleteProductTags(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DeleteProductTagsRequest is the request struct for api DeleteProductTags
+type DeleteProductTagsRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string   `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string   `position:"Query" name:"IotInstanceId"`
+	ProductKey    string   `position:"Query" name:"ProductKey"`
+	ProductTagKey []string `position:"Query" name:"ProductTagKey" type:"Repeated"`
+}
+
+// DeleteProductTagsResponse is the response struct for api DeleteProductTags
+type DeleteProductTagsResponse struct {
+	*responses.BaseResponse
+	RequestId    string `json:"RequestId" xml:"RequestId"`
+	Success      bool   `json:"Success" xml:"Success"`
+	ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"`
+	Code         string `json:"Code" xml:"Code"`
+}
+
+// CreateDeleteProductTagsRequest creates a request to invoke DeleteProductTags API
+func CreateDeleteProductTagsRequest() (request *DeleteProductTagsRequest) {
+	request = &DeleteProductTagsRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "DeleteProductTags", "iot", "openAPI")
+	return
+}
+
+// CreateDeleteProductTagsResponse creates a response to parse from DeleteProductTags response
+func CreateDeleteProductTagsResponse() (response *DeleteProductTagsResponse) {
+	response = &DeleteProductTagsResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 108 - 0
services/iot/delete_product_topic.go

@@ -0,0 +1,108 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// DeleteProductTopic invokes the iot.DeleteProductTopic API synchronously
+// api document: https://help.aliyun.com/api/iot/deleteproducttopic.html
+func (client *Client) DeleteProductTopic(request *DeleteProductTopicRequest) (response *DeleteProductTopicResponse, err error) {
+	response = CreateDeleteProductTopicResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DeleteProductTopicWithChan invokes the iot.DeleteProductTopic API asynchronously
+// api document: https://help.aliyun.com/api/iot/deleteproducttopic.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteProductTopicWithChan(request *DeleteProductTopicRequest) (<-chan *DeleteProductTopicResponse, <-chan error) {
+	responseChan := make(chan *DeleteProductTopicResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DeleteProductTopic(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DeleteProductTopicWithCallback invokes the iot.DeleteProductTopic API asynchronously
+// api document: https://help.aliyun.com/api/iot/deleteproducttopic.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteProductTopicWithCallback(request *DeleteProductTopicRequest, callback func(response *DeleteProductTopicResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DeleteProductTopicResponse
+		var err error
+		defer close(result)
+		response, err = client.DeleteProductTopic(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DeleteProductTopicRequest is the request struct for api DeleteProductTopic
+type DeleteProductTopicRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string `position:"Query" name:"IotInstanceId"`
+	TopicId       string `position:"Query" name:"TopicId"`
+}
+
+// DeleteProductTopicResponse is the response struct for api DeleteProductTopic
+type DeleteProductTopicResponse struct {
+	*responses.BaseResponse
+	RequestId    string `json:"RequestId" xml:"RequestId"`
+	Success      bool   `json:"Success" xml:"Success"`
+	Code         string `json:"Code" xml:"Code"`
+	ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"`
+}
+
+// CreateDeleteProductTopicRequest creates a request to invoke DeleteProductTopic API
+func CreateDeleteProductTopicRequest() (request *DeleteProductTopicRequest) {
+	request = &DeleteProductTopicRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "DeleteProductTopic", "iot", "openAPI")
+	return
+}
+
+// CreateDeleteProductTopicResponse creates a response to parse from DeleteProductTopic response
+func CreateDeleteProductTopicResponse() (response *DeleteProductTopicResponse) {
+	response = &DeleteProductTopicResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 108 - 0
services/iot/delete_rule.go

@@ -0,0 +1,108 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// DeleteRule invokes the iot.DeleteRule API synchronously
+// api document: https://help.aliyun.com/api/iot/deleterule.html
+func (client *Client) DeleteRule(request *DeleteRuleRequest) (response *DeleteRuleResponse, err error) {
+	response = CreateDeleteRuleResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DeleteRuleWithChan invokes the iot.DeleteRule API asynchronously
+// api document: https://help.aliyun.com/api/iot/deleterule.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteRuleWithChan(request *DeleteRuleRequest) (<-chan *DeleteRuleResponse, <-chan error) {
+	responseChan := make(chan *DeleteRuleResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DeleteRule(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DeleteRuleWithCallback invokes the iot.DeleteRule API asynchronously
+// api document: https://help.aliyun.com/api/iot/deleterule.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteRuleWithCallback(request *DeleteRuleRequest, callback func(response *DeleteRuleResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DeleteRuleResponse
+		var err error
+		defer close(result)
+		response, err = client.DeleteRule(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DeleteRuleRequest is the request struct for api DeleteRule
+type DeleteRuleRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string           `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string           `position:"Query" name:"IotInstanceId"`
+	RuleId        requests.Integer `position:"Query" name:"RuleId"`
+}
+
+// DeleteRuleResponse is the response struct for api DeleteRule
+type DeleteRuleResponse struct {
+	*responses.BaseResponse
+	RequestId    string `json:"RequestId" xml:"RequestId"`
+	Success      bool   `json:"Success" xml:"Success"`
+	Code         string `json:"Code" xml:"Code"`
+	ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"`
+}
+
+// CreateDeleteRuleRequest creates a request to invoke DeleteRule API
+func CreateDeleteRuleRequest() (request *DeleteRuleRequest) {
+	request = &DeleteRuleRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "DeleteRule", "iot", "openAPI")
+	return
+}
+
+// CreateDeleteRuleResponse creates a response to parse from DeleteRule response
+func CreateDeleteRuleResponse() (response *DeleteRuleResponse) {
+	response = &DeleteRuleResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 108 - 0
services/iot/delete_rule_action.go

@@ -0,0 +1,108 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// DeleteRuleAction invokes the iot.DeleteRuleAction API synchronously
+// api document: https://help.aliyun.com/api/iot/deleteruleaction.html
+func (client *Client) DeleteRuleAction(request *DeleteRuleActionRequest) (response *DeleteRuleActionResponse, err error) {
+	response = CreateDeleteRuleActionResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DeleteRuleActionWithChan invokes the iot.DeleteRuleAction API asynchronously
+// api document: https://help.aliyun.com/api/iot/deleteruleaction.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteRuleActionWithChan(request *DeleteRuleActionRequest) (<-chan *DeleteRuleActionResponse, <-chan error) {
+	responseChan := make(chan *DeleteRuleActionResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DeleteRuleAction(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DeleteRuleActionWithCallback invokes the iot.DeleteRuleAction API asynchronously
+// api document: https://help.aliyun.com/api/iot/deleteruleaction.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteRuleActionWithCallback(request *DeleteRuleActionRequest, callback func(response *DeleteRuleActionResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DeleteRuleActionResponse
+		var err error
+		defer close(result)
+		response, err = client.DeleteRuleAction(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DeleteRuleActionRequest is the request struct for api DeleteRuleAction
+type DeleteRuleActionRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string           `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string           `position:"Query" name:"IotInstanceId"`
+	ActionId      requests.Integer `position:"Query" name:"ActionId"`
+}
+
+// DeleteRuleActionResponse is the response struct for api DeleteRuleAction
+type DeleteRuleActionResponse struct {
+	*responses.BaseResponse
+	RequestId    string `json:"RequestId" xml:"RequestId"`
+	Success      bool   `json:"Success" xml:"Success"`
+	Code         string `json:"Code" xml:"Code"`
+	ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"`
+}
+
+// CreateDeleteRuleActionRequest creates a request to invoke DeleteRuleAction API
+func CreateDeleteRuleActionRequest() (request *DeleteRuleActionRequest) {
+	request = &DeleteRuleActionRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "DeleteRuleAction", "iot", "openAPI")
+	return
+}
+
+// CreateDeleteRuleActionResponse creates a response to parse from DeleteRuleAction response
+func CreateDeleteRuleActionResponse() (response *DeleteRuleActionResponse) {
+	response = &DeleteRuleActionResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 112 - 0
services/iot/delete_topic_route_table.go

@@ -0,0 +1,112 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// DeleteTopicRouteTable invokes the iot.DeleteTopicRouteTable API synchronously
+// api document: https://help.aliyun.com/api/iot/deletetopicroutetable.html
+func (client *Client) DeleteTopicRouteTable(request *DeleteTopicRouteTableRequest) (response *DeleteTopicRouteTableResponse, err error) {
+	response = CreateDeleteTopicRouteTableResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DeleteTopicRouteTableWithChan invokes the iot.DeleteTopicRouteTable API asynchronously
+// api document: https://help.aliyun.com/api/iot/deletetopicroutetable.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteTopicRouteTableWithChan(request *DeleteTopicRouteTableRequest) (<-chan *DeleteTopicRouteTableResponse, <-chan error) {
+	responseChan := make(chan *DeleteTopicRouteTableResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DeleteTopicRouteTable(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DeleteTopicRouteTableWithCallback invokes the iot.DeleteTopicRouteTable API asynchronously
+// api document: https://help.aliyun.com/api/iot/deletetopicroutetable.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteTopicRouteTableWithCallback(request *DeleteTopicRouteTableRequest, callback func(response *DeleteTopicRouteTableResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DeleteTopicRouteTableResponse
+		var err error
+		defer close(result)
+		response, err = client.DeleteTopicRouteTable(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DeleteTopicRouteTableRequest is the request struct for api DeleteTopicRouteTable
+type DeleteTopicRouteTableRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string   `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string   `position:"Query" name:"IotInstanceId"`
+	RegionId      string   `position:"Query" name:"RegionId"`
+	SrcTopic      string   `position:"Query" name:"SrcTopic"`
+	DstTopic      []string `position:"Query" name:"DstTopic" type:"Repeated"`
+}
+
+// DeleteTopicRouteTableResponse is the response struct for api DeleteTopicRouteTable
+type DeleteTopicRouteTableResponse struct {
+	*responses.BaseResponse
+	RequestId     string   `json:"RequestId" xml:"RequestId"`
+	Success       bool     `json:"Success" xml:"Success"`
+	Code          string   `json:"Code" xml:"Code"`
+	IsAllSucceed  bool     `json:"IsAllSucceed" xml:"IsAllSucceed"`
+	ErrorMessage  string   `json:"ErrorMessage" xml:"ErrorMessage"`
+	FailureTopics []string `json:"FailureTopics" xml:"FailureTopics"`
+}
+
+// CreateDeleteTopicRouteTableRequest creates a request to invoke DeleteTopicRouteTable API
+func CreateDeleteTopicRouteTableRequest() (request *DeleteTopicRouteTableRequest) {
+	request = &DeleteTopicRouteTableRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "DeleteTopicRouteTable", "iot", "openAPI")
+	return
+}
+
+// CreateDeleteTopicRouteTableResponse creates a response to parse from DeleteTopicRouteTable response
+func CreateDeleteTopicRouteTableResponse() (response *DeleteTopicRouteTableResponse) {
+	response = &DeleteTopicRouteTableResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 110 - 0
services/iot/disable_thing.go

@@ -0,0 +1,110 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// DisableThing invokes the iot.DisableThing API synchronously
+// api document: https://help.aliyun.com/api/iot/disablething.html
+func (client *Client) DisableThing(request *DisableThingRequest) (response *DisableThingResponse, err error) {
+	response = CreateDisableThingResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DisableThingWithChan invokes the iot.DisableThing API asynchronously
+// api document: https://help.aliyun.com/api/iot/disablething.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DisableThingWithChan(request *DisableThingRequest) (<-chan *DisableThingResponse, <-chan error) {
+	responseChan := make(chan *DisableThingResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DisableThing(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DisableThingWithCallback invokes the iot.DisableThing API asynchronously
+// api document: https://help.aliyun.com/api/iot/disablething.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DisableThingWithCallback(request *DisableThingRequest, callback func(response *DisableThingResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DisableThingResponse
+		var err error
+		defer close(result)
+		response, err = client.DisableThing(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DisableThingRequest is the request struct for api DisableThing
+type DisableThingRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string `position:"Query" name:"IotInstanceId"`
+	IotId         string `position:"Query" name:"IotId"`
+	ProductKey    string `position:"Query" name:"ProductKey"`
+	DeviceName    string `position:"Query" name:"DeviceName"`
+}
+
+// DisableThingResponse is the response struct for api DisableThing
+type DisableThingResponse struct {
+	*responses.BaseResponse
+	RequestId    string `json:"RequestId" xml:"RequestId"`
+	Success      bool   `json:"Success" xml:"Success"`
+	Code         string `json:"Code" xml:"Code"`
+	ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"`
+}
+
+// CreateDisableThingRequest creates a request to invoke DisableThing API
+func CreateDisableThingRequest() (request *DisableThingRequest) {
+	request = &DisableThingRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "DisableThing", "iot", "openAPI")
+	return
+}
+
+// CreateDisableThingResponse creates a response to parse from DisableThing response
+func CreateDisableThingResponse() (response *DisableThingResponse) {
+	response = &DisableThingResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 110 - 0
services/iot/enable_thing.go

@@ -0,0 +1,110 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// EnableThing invokes the iot.EnableThing API synchronously
+// api document: https://help.aliyun.com/api/iot/enablething.html
+func (client *Client) EnableThing(request *EnableThingRequest) (response *EnableThingResponse, err error) {
+	response = CreateEnableThingResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// EnableThingWithChan invokes the iot.EnableThing API asynchronously
+// api document: https://help.aliyun.com/api/iot/enablething.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) EnableThingWithChan(request *EnableThingRequest) (<-chan *EnableThingResponse, <-chan error) {
+	responseChan := make(chan *EnableThingResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.EnableThing(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// EnableThingWithCallback invokes the iot.EnableThing API asynchronously
+// api document: https://help.aliyun.com/api/iot/enablething.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) EnableThingWithCallback(request *EnableThingRequest, callback func(response *EnableThingResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *EnableThingResponse
+		var err error
+		defer close(result)
+		response, err = client.EnableThing(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// EnableThingRequest is the request struct for api EnableThing
+type EnableThingRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string `position:"Query" name:"IotInstanceId"`
+	IotId         string `position:"Query" name:"IotId"`
+	ProductKey    string `position:"Query" name:"ProductKey"`
+	DeviceName    string `position:"Query" name:"DeviceName"`
+}
+
+// EnableThingResponse is the response struct for api EnableThing
+type EnableThingResponse struct {
+	*responses.BaseResponse
+	RequestId    string `json:"RequestId" xml:"RequestId"`
+	Success      bool   `json:"Success" xml:"Success"`
+	Code         string `json:"Code" xml:"Code"`
+	ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"`
+}
+
+// CreateEnableThingRequest creates a request to invoke EnableThing API
+func CreateEnableThingRequest() (request *EnableThingRequest) {
+	request = &EnableThingRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "EnableThing", "iot", "openAPI")
+	return
+}
+
+// CreateEnableThingResponse creates a response to parse from EnableThing response
+func CreateEnableThingResponse() (response *EnableThingResponse) {
+	response = &EnableThingResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 111 - 0
services/iot/get_device_shadow.go

@@ -0,0 +1,111 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// GetDeviceShadow invokes the iot.GetDeviceShadow API synchronously
+// api document: https://help.aliyun.com/api/iot/getdeviceshadow.html
+func (client *Client) GetDeviceShadow(request *GetDeviceShadowRequest) (response *GetDeviceShadowResponse, err error) {
+	response = CreateGetDeviceShadowResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// GetDeviceShadowWithChan invokes the iot.GetDeviceShadow API asynchronously
+// api document: https://help.aliyun.com/api/iot/getdeviceshadow.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetDeviceShadowWithChan(request *GetDeviceShadowRequest) (<-chan *GetDeviceShadowResponse, <-chan error) {
+	responseChan := make(chan *GetDeviceShadowResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.GetDeviceShadow(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// GetDeviceShadowWithCallback invokes the iot.GetDeviceShadow API asynchronously
+// api document: https://help.aliyun.com/api/iot/getdeviceshadow.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetDeviceShadowWithCallback(request *GetDeviceShadowRequest, callback func(response *GetDeviceShadowResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *GetDeviceShadowResponse
+		var err error
+		defer close(result)
+		response, err = client.GetDeviceShadow(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// GetDeviceShadowRequest is the request struct for api GetDeviceShadow
+type GetDeviceShadowRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string `position:"Query" name:"IotInstanceId"`
+	DeviceName    string `position:"Query" name:"DeviceName"`
+	ProductKey    string `position:"Query" name:"ProductKey"`
+	ShadowMessage string `position:"Query" name:"ShadowMessage"`
+}
+
+// GetDeviceShadowResponse is the response struct for api GetDeviceShadow
+type GetDeviceShadowResponse struct {
+	*responses.BaseResponse
+	RequestId     string `json:"RequestId" xml:"RequestId"`
+	Success       bool   `json:"Success" xml:"Success"`
+	Code          string `json:"Code" xml:"Code"`
+	ErrorMessage  string `json:"ErrorMessage" xml:"ErrorMessage"`
+	ShadowMessage string `json:"ShadowMessage" xml:"ShadowMessage"`
+}
+
+// CreateGetDeviceShadowRequest creates a request to invoke GetDeviceShadow API
+func CreateGetDeviceShadowRequest() (request *GetDeviceShadowRequest) {
+	request = &GetDeviceShadowRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "GetDeviceShadow", "iot", "openAPI")
+	return
+}
+
+// CreateGetDeviceShadowResponse creates a response to parse from GetDeviceShadow response
+func CreateGetDeviceShadowResponse() (response *GetDeviceShadowResponse) {
+	response = &GetDeviceShadowResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 115 - 0
services/iot/get_device_status.go

@@ -0,0 +1,115 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// GetDeviceStatus invokes the iot.GetDeviceStatus API synchronously
+// api document: https://help.aliyun.com/api/iot/getdevicestatus.html
+func (client *Client) GetDeviceStatus(request *GetDeviceStatusRequest) (response *GetDeviceStatusResponse, err error) {
+	response = CreateGetDeviceStatusResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// GetDeviceStatusWithChan invokes the iot.GetDeviceStatus API asynchronously
+// api document: https://help.aliyun.com/api/iot/getdevicestatus.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetDeviceStatusWithChan(request *GetDeviceStatusRequest) (<-chan *GetDeviceStatusResponse, <-chan error) {
+	responseChan := make(chan *GetDeviceStatusResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.GetDeviceStatus(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// GetDeviceStatusWithCallback invokes the iot.GetDeviceStatus API asynchronously
+// api document: https://help.aliyun.com/api/iot/getdevicestatus.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetDeviceStatusWithCallback(request *GetDeviceStatusRequest, callback func(response *GetDeviceStatusResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *GetDeviceStatusResponse
+		var err error
+		defer close(result)
+		response, err = client.GetDeviceStatus(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// GetDeviceStatusRequest is the request struct for api GetDeviceStatus
+type GetDeviceStatusRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string `position:"Query" name:"IotInstanceId"`
+	IotId         string `position:"Query" name:"IotId"`
+	ProductKey    string `position:"Query" name:"ProductKey"`
+	DeviceName    string `position:"Query" name:"DeviceName"`
+}
+
+// GetDeviceStatusResponse is the response struct for api GetDeviceStatus
+type GetDeviceStatusResponse struct {
+	*responses.BaseResponse
+	RequestId    string               `json:"RequestId" xml:"RequestId"`
+	Success      bool                 `json:"Success" xml:"Success"`
+	Code         string               `json:"Code" xml:"Code"`
+	ErrorMessage string               `json:"ErrorMessage" xml:"ErrorMessage"`
+	Data         GetDeviceStatusData0 `json:"Data" xml:"Data"`
+}
+
+type GetDeviceStatusData0 struct {
+	Status string `json:"Status" xml:"Status"`
+}
+
+// CreateGetDeviceStatusRequest creates a request to invoke GetDeviceStatus API
+func CreateGetDeviceStatusRequest() (request *GetDeviceStatusRequest) {
+	request = &GetDeviceStatusRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "GetDeviceStatus", "iot", "openAPI")
+	return
+}
+
+// CreateGetDeviceStatusResponse creates a response to parse from GetDeviceStatus response
+func CreateGetDeviceStatusResponse() (response *GetDeviceStatusResponse) {
+	response = &GetDeviceStatusResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 130 - 0
services/iot/get_gateway_by_sub_device.go

@@ -0,0 +1,130 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// GetGatewayBySubDevice invokes the iot.GetGatewayBySubDevice API synchronously
+// api document: https://help.aliyun.com/api/iot/getgatewaybysubdevice.html
+func (client *Client) GetGatewayBySubDevice(request *GetGatewayBySubDeviceRequest) (response *GetGatewayBySubDeviceResponse, err error) {
+	response = CreateGetGatewayBySubDeviceResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// GetGatewayBySubDeviceWithChan invokes the iot.GetGatewayBySubDevice API asynchronously
+// api document: https://help.aliyun.com/api/iot/getgatewaybysubdevice.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetGatewayBySubDeviceWithChan(request *GetGatewayBySubDeviceRequest) (<-chan *GetGatewayBySubDeviceResponse, <-chan error) {
+	responseChan := make(chan *GetGatewayBySubDeviceResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.GetGatewayBySubDevice(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// GetGatewayBySubDeviceWithCallback invokes the iot.GetGatewayBySubDevice API asynchronously
+// api document: https://help.aliyun.com/api/iot/getgatewaybysubdevice.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetGatewayBySubDeviceWithCallback(request *GetGatewayBySubDeviceRequest, callback func(response *GetGatewayBySubDeviceResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *GetGatewayBySubDeviceResponse
+		var err error
+		defer close(result)
+		response, err = client.GetGatewayBySubDevice(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// GetGatewayBySubDeviceRequest is the request struct for api GetGatewayBySubDevice
+type GetGatewayBySubDeviceRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string `position:"Query" name:"IotInstanceId"`
+	ProductKey    string `position:"Query" name:"ProductKey"`
+	DeviceName    string `position:"Query" name:"DeviceName"`
+	IotId         string `position:"Query" name:"IotId"`
+}
+
+// GetGatewayBySubDeviceResponse is the response struct for api GetGatewayBySubDevice
+type GetGatewayBySubDeviceResponse struct {
+	*responses.BaseResponse
+	RequestId    string                     `json:"RequestId" xml:"RequestId"`
+	Success      bool                       `json:"Success" xml:"Success"`
+	Code         string                     `json:"Code" xml:"Code"`
+	ErrorMessage string                     `json:"ErrorMessage" xml:"ErrorMessage"`
+	Data         GetGatewayBySubDeviceData0 `json:"Data" xml:"Data"`
+}
+
+type GetGatewayBySubDeviceData0 struct {
+	ProductKey      string `json:"ProductKey" xml:"ProductKey"`
+	ProductName     string `json:"ProductName" xml:"ProductName"`
+	DeviceSecret    string `json:"DeviceSecret" xml:"DeviceSecret"`
+	DeviceName      string `json:"DeviceName" xml:"DeviceName"`
+	FirmwareVersion string `json:"FirmwareVersion" xml:"FirmwareVersion"`
+	GmtCreate       string `json:"GmtCreate" xml:"GmtCreate"`
+	UtcCreate       string `json:"UtcCreate" xml:"UtcCreate"`
+	GmtActive       string `json:"GmtActive" xml:"GmtActive"`
+	UtcActive       string `json:"UtcActive" xml:"UtcActive"`
+	GmtOnline       string `json:"GmtOnline" xml:"GmtOnline"`
+	UtcOnline       string `json:"UtcOnline" xml:"UtcOnline"`
+	Status          string `json:"Status" xml:"Status"`
+	IpAddress       string `json:"IpAddress" xml:"IpAddress"`
+	NodeType        string `json:"NodeType" xml:"NodeType"`
+	Region          string `json:"Region" xml:"Region"`
+	IotId           string `json:"IotId" xml:"IotId"`
+}
+
+// CreateGetGatewayBySubDeviceRequest creates a request to invoke GetGatewayBySubDevice API
+func CreateGetGatewayBySubDeviceRequest() (request *GetGatewayBySubDeviceRequest) {
+	request = &GetGatewayBySubDeviceRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "GetGatewayBySubDevice", "iot", "openAPI")
+	return
+}
+
+// CreateGetGatewayBySubDeviceResponse creates a response to parse from GetGatewayBySubDevice response
+func CreateGetGatewayBySubDeviceResponse() (response *GetGatewayBySubDeviceResponse) {
+	response = &GetGatewayBySubDeviceResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 113 - 0
services/iot/get_lora_nodes_task.go

@@ -0,0 +1,113 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// GetLoraNodesTask invokes the iot.GetLoraNodesTask API synchronously
+// api document: https://help.aliyun.com/api/iot/getloranodestask.html
+func (client *Client) GetLoraNodesTask(request *GetLoraNodesTaskRequest) (response *GetLoraNodesTaskResponse, err error) {
+	response = CreateGetLoraNodesTaskResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// GetLoraNodesTaskWithChan invokes the iot.GetLoraNodesTask API asynchronously
+// api document: https://help.aliyun.com/api/iot/getloranodestask.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetLoraNodesTaskWithChan(request *GetLoraNodesTaskRequest) (<-chan *GetLoraNodesTaskResponse, <-chan error) {
+	responseChan := make(chan *GetLoraNodesTaskResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.GetLoraNodesTask(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// GetLoraNodesTaskWithCallback invokes the iot.GetLoraNodesTask API asynchronously
+// api document: https://help.aliyun.com/api/iot/getloranodestask.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetLoraNodesTaskWithCallback(request *GetLoraNodesTaskRequest, callback func(response *GetLoraNodesTaskResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *GetLoraNodesTaskResponse
+		var err error
+		defer close(result)
+		response, err = client.GetLoraNodesTask(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// GetLoraNodesTaskRequest is the request struct for api GetLoraNodesTask
+type GetLoraNodesTaskRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string `position:"Query" name:"IotInstanceId"`
+	TaskId        string `position:"Query" name:"TaskId"`
+}
+
+// GetLoraNodesTaskResponse is the response struct for api GetLoraNodesTask
+type GetLoraNodesTaskResponse struct {
+	*responses.BaseResponse
+	RequestId      string   `json:"RequestId" xml:"RequestId"`
+	Success        bool     `json:"Success" xml:"Success"`
+	Code           string   `json:"Code" xml:"Code"`
+	ErrorMessage   string   `json:"ErrorMessage" xml:"ErrorMessage"`
+	TaskId         string   `json:"TaskId" xml:"TaskId"`
+	TaskState      string   `json:"TaskState" xml:"TaskState"`
+	TotalCount     int64    `json:"TotalCount" xml:"TotalCount"`
+	SuccessCount   int64    `json:"SuccessCount" xml:"SuccessCount"`
+	SuccessDevEuis []string `json:"SuccessDevEuis" xml:"SuccessDevEuis"`
+}
+
+// CreateGetLoraNodesTaskRequest creates a request to invoke GetLoraNodesTask API
+func CreateGetLoraNodesTaskRequest() (request *GetLoraNodesTaskRequest) {
+	request = &GetLoraNodesTaskRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "GetLoraNodesTask", "iot", "openAPI")
+	return
+}
+
+// CreateGetLoraNodesTaskResponse creates a response to parse from GetLoraNodesTask response
+func CreateGetLoraNodesTaskResponse() (response *GetLoraNodesTaskResponse) {
+	response = &GetLoraNodesTaskResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 113 - 0
services/iot/get_nodes_adding_task.go

@@ -0,0 +1,113 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// GetNodesAddingTask invokes the iot.GetNodesAddingTask API synchronously
+// api document: https://help.aliyun.com/api/iot/getnodesaddingtask.html
+func (client *Client) GetNodesAddingTask(request *GetNodesAddingTaskRequest) (response *GetNodesAddingTaskResponse, err error) {
+	response = CreateGetNodesAddingTaskResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// GetNodesAddingTaskWithChan invokes the iot.GetNodesAddingTask API asynchronously
+// api document: https://help.aliyun.com/api/iot/getnodesaddingtask.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetNodesAddingTaskWithChan(request *GetNodesAddingTaskRequest) (<-chan *GetNodesAddingTaskResponse, <-chan error) {
+	responseChan := make(chan *GetNodesAddingTaskResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.GetNodesAddingTask(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// GetNodesAddingTaskWithCallback invokes the iot.GetNodesAddingTask API asynchronously
+// api document: https://help.aliyun.com/api/iot/getnodesaddingtask.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetNodesAddingTaskWithCallback(request *GetNodesAddingTaskRequest, callback func(response *GetNodesAddingTaskResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *GetNodesAddingTaskResponse
+		var err error
+		defer close(result)
+		response, err = client.GetNodesAddingTask(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// GetNodesAddingTaskRequest is the request struct for api GetNodesAddingTask
+type GetNodesAddingTaskRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string `position:"Query" name:"IotInstanceId"`
+	TaskId        string `position:"Query" name:"TaskId"`
+}
+
+// GetNodesAddingTaskResponse is the response struct for api GetNodesAddingTask
+type GetNodesAddingTaskResponse struct {
+	*responses.BaseResponse
+	RequestId      string   `json:"RequestId" xml:"RequestId"`
+	Success        bool     `json:"Success" xml:"Success"`
+	Code           string   `json:"Code" xml:"Code"`
+	ErrorMessage   string   `json:"ErrorMessage" xml:"ErrorMessage"`
+	TaskId         string   `json:"TaskId" xml:"TaskId"`
+	TaskState      string   `json:"TaskState" xml:"TaskState"`
+	TotalCount     int64    `json:"TotalCount" xml:"TotalCount"`
+	SuccessCount   int64    `json:"SuccessCount" xml:"SuccessCount"`
+	SuccessDevEuis []string `json:"SuccessDevEuis" xml:"SuccessDevEuis"`
+}
+
+// CreateGetNodesAddingTaskRequest creates a request to invoke GetNodesAddingTask API
+func CreateGetNodesAddingTaskRequest() (request *GetNodesAddingTaskRequest) {
+	request = &GetNodesAddingTaskRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "GetNodesAddingTask", "iot", "openAPI")
+	return
+}
+
+// CreateGetNodesAddingTaskResponse creates a response to parse from GetNodesAddingTask response
+func CreateGetNodesAddingTaskResponse() (response *GetNodesAddingTaskResponse) {
+	response = &GetNodesAddingTaskResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 128 - 0
services/iot/get_rule.go

@@ -0,0 +1,128 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// GetRule invokes the iot.GetRule API synchronously
+// api document: https://help.aliyun.com/api/iot/getrule.html
+func (client *Client) GetRule(request *GetRuleRequest) (response *GetRuleResponse, err error) {
+	response = CreateGetRuleResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// GetRuleWithChan invokes the iot.GetRule API asynchronously
+// api document: https://help.aliyun.com/api/iot/getrule.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetRuleWithChan(request *GetRuleRequest) (<-chan *GetRuleResponse, <-chan error) {
+	responseChan := make(chan *GetRuleResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.GetRule(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// GetRuleWithCallback invokes the iot.GetRule API asynchronously
+// api document: https://help.aliyun.com/api/iot/getrule.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetRuleWithCallback(request *GetRuleRequest, callback func(response *GetRuleResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *GetRuleResponse
+		var err error
+		defer close(result)
+		response, err = client.GetRule(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// GetRuleRequest is the request struct for api GetRule
+type GetRuleRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string           `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string           `position:"Query" name:"IotInstanceId"`
+	RuleId        requests.Integer `position:"Query" name:"RuleId"`
+}
+
+// GetRuleResponse is the response struct for api GetRule
+type GetRuleResponse struct {
+	*responses.BaseResponse
+	RequestId    string           `json:"RequestId" xml:"RequestId"`
+	Success      bool             `json:"Success" xml:"Success"`
+	Code         string           `json:"Code" xml:"Code"`
+	ErrorMessage string           `json:"ErrorMessage" xml:"ErrorMessage"`
+	RuleInfo     GetRuleRuleInfo0 `json:"RuleInfo" xml:"RuleInfo"`
+}
+
+type GetRuleRuleInfo0 struct {
+	Id           int64  `json:"Id" xml:"Id"`
+	Select       string `json:"Select" xml:"Select"`
+	Topic        string `json:"Topic" xml:"Topic"`
+	ShortTopic   string `json:"ShortTopic" xml:"ShortTopic"`
+	Where        string `json:"Where" xml:"Where"`
+	Status       string `json:"Status" xml:"Status"`
+	CreateUserId int64  `json:"CreateUserId" xml:"CreateUserId"`
+	ProductKey   string `json:"ProductKey" xml:"ProductKey"`
+	Name         string `json:"Name" xml:"Name"`
+	RuleDesc     string `json:"RuleDesc" xml:"RuleDesc"`
+	DataType     string `json:"DataType" xml:"DataType"`
+	Created      string `json:"Created" xml:"Created"`
+	UtcCreated   string `json:"UtcCreated" xml:"UtcCreated"`
+	Modified     string `json:"Modified" xml:"Modified"`
+	UtcModified  string `json:"UtcModified" xml:"UtcModified"`
+	TopicType    int    `json:"TopicType" xml:"TopicType"`
+}
+
+// CreateGetRuleRequest creates a request to invoke GetRule API
+func CreateGetRuleRequest() (request *GetRuleRequest) {
+	request = &GetRuleRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "GetRule", "iot", "openAPI")
+	return
+}
+
+// CreateGetRuleResponse creates a response to parse from GetRule response
+func CreateGetRuleResponse() (response *GetRuleResponse) {
+	response = &GetRuleResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 117 - 0
services/iot/get_rule_action.go

@@ -0,0 +1,117 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// GetRuleAction invokes the iot.GetRuleAction API synchronously
+// api document: https://help.aliyun.com/api/iot/getruleaction.html
+func (client *Client) GetRuleAction(request *GetRuleActionRequest) (response *GetRuleActionResponse, err error) {
+	response = CreateGetRuleActionResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// GetRuleActionWithChan invokes the iot.GetRuleAction API asynchronously
+// api document: https://help.aliyun.com/api/iot/getruleaction.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetRuleActionWithChan(request *GetRuleActionRequest) (<-chan *GetRuleActionResponse, <-chan error) {
+	responseChan := make(chan *GetRuleActionResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.GetRuleAction(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// GetRuleActionWithCallback invokes the iot.GetRuleAction API asynchronously
+// api document: https://help.aliyun.com/api/iot/getruleaction.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetRuleActionWithCallback(request *GetRuleActionRequest, callback func(response *GetRuleActionResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *GetRuleActionResponse
+		var err error
+		defer close(result)
+		response, err = client.GetRuleAction(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// GetRuleActionRequest is the request struct for api GetRuleAction
+type GetRuleActionRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string           `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string           `position:"Query" name:"IotInstanceId"`
+	ActionId      requests.Integer `position:"Query" name:"ActionId"`
+}
+
+// GetRuleActionResponse is the response struct for api GetRuleAction
+type GetRuleActionResponse struct {
+	*responses.BaseResponse
+	RequestId      string                       `json:"RequestId" xml:"RequestId"`
+	Success        bool                         `json:"Success" xml:"Success"`
+	Code           string                       `json:"Code" xml:"Code"`
+	ErrorMessage   string                       `json:"ErrorMessage" xml:"ErrorMessage"`
+	RuleActionInfo GetRuleActionRuleActionInfo0 `json:"RuleActionInfo" xml:"RuleActionInfo"`
+}
+
+type GetRuleActionRuleActionInfo0 struct {
+	Id              int64  `json:"Id" xml:"Id"`
+	RuleId          int64  `json:"RuleId" xml:"RuleId"`
+	Type            string `json:"Type" xml:"Type"`
+	Configuration   string `json:"Configuration" xml:"Configuration"`
+	ErrorActionFlag bool   `json:"ErrorActionFlag" xml:"ErrorActionFlag"`
+}
+
+// CreateGetRuleActionRequest creates a request to invoke GetRuleAction API
+func CreateGetRuleActionRequest() (request *GetRuleActionRequest) {
+	request = &GetRuleActionRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "GetRuleAction", "iot", "openAPI")
+	return
+}
+
+// CreateGetRuleActionResponse creates a response to parse from GetRuleAction response
+func CreateGetRuleActionResponse() (response *GetRuleActionResponse) {
+	response = &GetRuleActionResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 131 - 0
services/iot/get_thing_topo.go

@@ -0,0 +1,131 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// GetThingTopo invokes the iot.GetThingTopo API synchronously
+// api document: https://help.aliyun.com/api/iot/getthingtopo.html
+func (client *Client) GetThingTopo(request *GetThingTopoRequest) (response *GetThingTopoResponse, err error) {
+	response = CreateGetThingTopoResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// GetThingTopoWithChan invokes the iot.GetThingTopo API asynchronously
+// api document: https://help.aliyun.com/api/iot/getthingtopo.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetThingTopoWithChan(request *GetThingTopoRequest) (<-chan *GetThingTopoResponse, <-chan error) {
+	responseChan := make(chan *GetThingTopoResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.GetThingTopo(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// GetThingTopoWithCallback invokes the iot.GetThingTopo API asynchronously
+// api document: https://help.aliyun.com/api/iot/getthingtopo.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetThingTopoWithCallback(request *GetThingTopoRequest, callback func(response *GetThingTopoResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *GetThingTopoResponse
+		var err error
+		defer close(result)
+		response, err = client.GetThingTopo(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// GetThingTopoRequest is the request struct for api GetThingTopo
+type GetThingTopoRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string           `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string           `position:"Query" name:"IotInstanceId"`
+	ProductKey    string           `position:"Query" name:"ProductKey"`
+	DeviceName    string           `position:"Query" name:"DeviceName"`
+	IotId         string           `position:"Query" name:"IotId"`
+	PageNo        requests.Integer `position:"Query" name:"PageNo"`
+	PageSize      requests.Integer `position:"Query" name:"PageSize"`
+}
+
+// GetThingTopoResponse is the response struct for api GetThingTopo
+type GetThingTopoResponse struct {
+	*responses.BaseResponse
+	RequestId    string            `json:"RequestId" xml:"RequestId"`
+	Success      bool              `json:"Success" xml:"Success"`
+	Code         string            `json:"Code" xml:"Code"`
+	ErrorMessage string            `json:"ErrorMessage" xml:"ErrorMessage"`
+	Data         GetThingTopoData0 `json:"Data" xml:"Data"`
+}
+
+type GetThingTopoData0 struct {
+	Total       int64             `json:"Total" xml:"Total"`
+	CurrentPage int               `json:"CurrentPage" xml:"CurrentPage"`
+	PageSize    int               `json:"PageSize" xml:"PageSize"`
+	PageCount   int64             `json:"PageCount" xml:"PageCount"`
+	List        GetThingTopoList1 `json:"List" xml:"List"`
+}
+
+type GetThingTopoList1 struct {
+	DeviceInfo []GetThingTopoDeviceInfo2 `json:"DeviceInfo" xml:"DeviceInfo"`
+}
+
+type GetThingTopoDeviceInfo2 struct {
+	IotId      string `json:"IotId" xml:"IotId"`
+	ProductKey string `json:"ProductKey" xml:"ProductKey"`
+	DeviceName string `json:"DeviceName" xml:"DeviceName"`
+}
+
+// CreateGetThingTopoRequest creates a request to invoke GetThingTopo API
+func CreateGetThingTopoRequest() (request *GetThingTopoRequest) {
+	request = &GetThingTopoRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "GetThingTopo", "iot", "openAPI")
+	return
+}
+
+// CreateGetThingTopoResponse creates a response to parse from GetThingTopo response
+func CreateGetThingTopoResponse() (response *GetThingTopoResponse) {
+	response = &GetThingTopoResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 118 - 0
services/iot/invoke_thing_service.go

@@ -0,0 +1,118 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// InvokeThingService invokes the iot.InvokeThingService API synchronously
+// api document: https://help.aliyun.com/api/iot/invokethingservice.html
+func (client *Client) InvokeThingService(request *InvokeThingServiceRequest) (response *InvokeThingServiceResponse, err error) {
+	response = CreateInvokeThingServiceResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// InvokeThingServiceWithChan invokes the iot.InvokeThingService API asynchronously
+// api document: https://help.aliyun.com/api/iot/invokethingservice.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) InvokeThingServiceWithChan(request *InvokeThingServiceRequest) (<-chan *InvokeThingServiceResponse, <-chan error) {
+	responseChan := make(chan *InvokeThingServiceResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.InvokeThingService(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// InvokeThingServiceWithCallback invokes the iot.InvokeThingService API asynchronously
+// api document: https://help.aliyun.com/api/iot/invokethingservice.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) InvokeThingServiceWithCallback(request *InvokeThingServiceRequest, callback func(response *InvokeThingServiceResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *InvokeThingServiceResponse
+		var err error
+		defer close(result)
+		response, err = client.InvokeThingService(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// InvokeThingServiceRequest is the request struct for api InvokeThingService
+type InvokeThingServiceRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string `position:"Query" name:"IotInstanceId"`
+	IotId         string `position:"Query" name:"IotId"`
+	ProductKey    string `position:"Query" name:"ProductKey"`
+	DeviceName    string `position:"Query" name:"DeviceName"`
+	Identifier    string `position:"Query" name:"Identifier"`
+	Args          string `position:"Query" name:"Args"`
+}
+
+// InvokeThingServiceResponse is the response struct for api InvokeThingService
+type InvokeThingServiceResponse struct {
+	*responses.BaseResponse
+	RequestId    string                  `json:"RequestId" xml:"RequestId"`
+	Success      bool                    `json:"Success" xml:"Success"`
+	ErrorMessage string                  `json:"ErrorMessage" xml:"ErrorMessage"`
+	Code         string                  `json:"Code" xml:"Code"`
+	Data         InvokeThingServiceData0 `json:"Data" xml:"Data"`
+}
+
+type InvokeThingServiceData0 struct {
+	Result    string `json:"Result" xml:"Result"`
+	MessageId string `json:"MessageId" xml:"MessageId"`
+}
+
+// CreateInvokeThingServiceRequest creates a request to invoke InvokeThingService API
+func CreateInvokeThingServiceRequest() (request *InvokeThingServiceRequest) {
+	request = &InvokeThingServiceRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "InvokeThingService", "iot", "openAPI")
+	return
+}
+
+// CreateInvokeThingServiceResponse creates a response to parse from InvokeThingService response
+func CreateInvokeThingServiceResponse() (response *InvokeThingServiceResponse) {
+	response = &InvokeThingServiceResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 111 - 0
services/iot/invoke_things_service.go

@@ -0,0 +1,111 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// InvokeThingsService invokes the iot.InvokeThingsService API synchronously
+// api document: https://help.aliyun.com/api/iot/invokethingsservice.html
+func (client *Client) InvokeThingsService(request *InvokeThingsServiceRequest) (response *InvokeThingsServiceResponse, err error) {
+	response = CreateInvokeThingsServiceResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// InvokeThingsServiceWithChan invokes the iot.InvokeThingsService API asynchronously
+// api document: https://help.aliyun.com/api/iot/invokethingsservice.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) InvokeThingsServiceWithChan(request *InvokeThingsServiceRequest) (<-chan *InvokeThingsServiceResponse, <-chan error) {
+	responseChan := make(chan *InvokeThingsServiceResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.InvokeThingsService(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// InvokeThingsServiceWithCallback invokes the iot.InvokeThingsService API asynchronously
+// api document: https://help.aliyun.com/api/iot/invokethingsservice.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) InvokeThingsServiceWithCallback(request *InvokeThingsServiceRequest, callback func(response *InvokeThingsServiceResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *InvokeThingsServiceResponse
+		var err error
+		defer close(result)
+		response, err = client.InvokeThingsService(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// InvokeThingsServiceRequest is the request struct for api InvokeThingsService
+type InvokeThingsServiceRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string   `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string   `position:"Query" name:"IotInstanceId"`
+	ProductKey    string   `position:"Query" name:"ProductKey"`
+	DeviceName    []string `position:"Query" name:"DeviceName" type:"Repeated"`
+	Identifier    string   `position:"Query" name:"Identifier"`
+	Args          string   `position:"Query" name:"Args"`
+}
+
+// InvokeThingsServiceResponse is the response struct for api InvokeThingsService
+type InvokeThingsServiceResponse struct {
+	*responses.BaseResponse
+	RequestId    string `json:"RequestId" xml:"RequestId"`
+	Success      bool   `json:"Success" xml:"Success"`
+	ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"`
+	Code         string `json:"Code" xml:"Code"`
+}
+
+// CreateInvokeThingsServiceRequest creates a request to invoke InvokeThingsService API
+func CreateInvokeThingsServiceRequest() (request *InvokeThingsServiceRequest) {
+	request = &InvokeThingsServiceRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "InvokeThingsService", "iot", "openAPI")
+	return
+}
+
+// CreateInvokeThingsServiceResponse creates a response to parse from InvokeThingsService response
+func CreateInvokeThingsServiceResponse() (response *InvokeThingsServiceResponse) {
+	response = &InvokeThingsServiceResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 128 - 0
services/iot/list_product_by_tags.go

@@ -0,0 +1,128 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// ListProductByTags invokes the iot.ListProductByTags API synchronously
+// api document: https://help.aliyun.com/api/iot/listproductbytags.html
+func (client *Client) ListProductByTags(request *ListProductByTagsRequest) (response *ListProductByTagsResponse, err error) {
+	response = CreateListProductByTagsResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// ListProductByTagsWithChan invokes the iot.ListProductByTags API asynchronously
+// api document: https://help.aliyun.com/api/iot/listproductbytags.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ListProductByTagsWithChan(request *ListProductByTagsRequest) (<-chan *ListProductByTagsResponse, <-chan error) {
+	responseChan := make(chan *ListProductByTagsResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.ListProductByTags(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// ListProductByTagsWithCallback invokes the iot.ListProductByTags API asynchronously
+// api document: https://help.aliyun.com/api/iot/listproductbytags.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ListProductByTagsWithCallback(request *ListProductByTagsRequest, callback func(response *ListProductByTagsResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *ListProductByTagsResponse
+		var err error
+		defer close(result)
+		response, err = client.ListProductByTags(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// ListProductByTagsRequest is the request struct for api ListProductByTags
+type ListProductByTagsRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string                         `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string                         `position:"Query" name:"IotInstanceId"`
+	CurrentPage   requests.Integer               `position:"Query" name:"CurrentPage"`
+	PageSize      requests.Integer               `position:"Query" name:"PageSize"`
+	ProductTag    *[]ListProductByTagsProductTag `position:"Query" name:"ProductTag" type:"Repeated"`
+}
+
+type ListProductByTagsProductTag struct {
+	TagKey   string `name:"TagKey"`
+	TagValue string `name:"TagValue"`
+}
+
+// ListProductByTagsResponse is the response struct for api ListProductByTags
+type ListProductByTagsResponse struct {
+	*responses.BaseResponse
+	RequestId    string                         `json:"RequestId" xml:"RequestId"`
+	Success      bool                           `json:"Success" xml:"Success"`
+	ErrorMessage string                         `json:"ErrorMessage" xml:"ErrorMessage"`
+	Code         string                         `json:"Code" xml:"Code"`
+	ProductInfos ListProductByTagsProductInfos0 `json:"ProductInfos" xml:"ProductInfos"`
+}
+
+type ListProductByTagsProductInfos0 struct {
+	ProductInfo []ListProductByTagsProductInfo1 `json:"ProductInfo" xml:"ProductInfo"`
+}
+
+type ListProductByTagsProductInfo1 struct {
+	ProductName string `json:"ProductName" xml:"ProductName"`
+	ProductKey  string `json:"ProductKey" xml:"ProductKey"`
+	CreateTime  int64  `json:"CreateTime" xml:"CreateTime"`
+	Description string `json:"Description" xml:"Description"`
+	NodeType    int    `json:"NodeType" xml:"NodeType"`
+}
+
+// CreateListProductByTagsRequest creates a request to invoke ListProductByTags API
+func CreateListProductByTagsRequest() (request *ListProductByTagsRequest) {
+	request = &ListProductByTagsRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "ListProductByTags", "iot", "openAPI")
+	return
+}
+
+// CreateListProductByTagsResponse creates a response to parse from ListProductByTags response
+func CreateListProductByTagsResponse() (response *ListProductByTagsResponse) {
+	response = &ListProductByTagsResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 118 - 0
services/iot/list_product_tags.go

@@ -0,0 +1,118 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// ListProductTags invokes the iot.ListProductTags API synchronously
+// api document: https://help.aliyun.com/api/iot/listproducttags.html
+func (client *Client) ListProductTags(request *ListProductTagsRequest) (response *ListProductTagsResponse, err error) {
+	response = CreateListProductTagsResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// ListProductTagsWithChan invokes the iot.ListProductTags API asynchronously
+// api document: https://help.aliyun.com/api/iot/listproducttags.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ListProductTagsWithChan(request *ListProductTagsRequest) (<-chan *ListProductTagsResponse, <-chan error) {
+	responseChan := make(chan *ListProductTagsResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.ListProductTags(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// ListProductTagsWithCallback invokes the iot.ListProductTags API asynchronously
+// api document: https://help.aliyun.com/api/iot/listproducttags.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ListProductTagsWithCallback(request *ListProductTagsRequest, callback func(response *ListProductTagsResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *ListProductTagsResponse
+		var err error
+		defer close(result)
+		response, err = client.ListProductTags(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// ListProductTagsRequest is the request struct for api ListProductTags
+type ListProductTagsRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string `position:"Query" name:"IotInstanceId"`
+	ProductKey    string `position:"Query" name:"ProductKey"`
+}
+
+// ListProductTagsResponse is the response struct for api ListProductTags
+type ListProductTagsResponse struct {
+	*responses.BaseResponse
+	RequestId    string               `json:"RequestId" xml:"RequestId"`
+	Success      bool                 `json:"Success" xml:"Success"`
+	ErrorMessage string               `json:"ErrorMessage" xml:"ErrorMessage"`
+	Code         string               `json:"Code" xml:"Code"`
+	Data         ListProductTagsData0 `json:"Data" xml:"Data"`
+}
+
+type ListProductTagsData0 struct {
+	ProductTag []ListProductTagsProductTag1 `json:"ProductTag" xml:"ProductTag"`
+}
+
+type ListProductTagsProductTag1 struct {
+	TagKey   string `json:"TagKey" xml:"TagKey"`
+	TagValue string `json:"TagValue" xml:"TagValue"`
+}
+
+// CreateListProductTagsRequest creates a request to invoke ListProductTags API
+func CreateListProductTagsRequest() (request *ListProductTagsRequest) {
+	request = &ListProductTagsRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "ListProductTags", "iot", "openAPI")
+	return
+}
+
+// CreateListProductTagsResponse creates a response to parse from ListProductTags response
+func CreateListProductTagsResponse() (response *ListProductTagsResponse) {
+	response = &ListProductTagsResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 136 - 0
services/iot/list_rule.go

@@ -0,0 +1,136 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// ListRule invokes the iot.ListRule API synchronously
+// api document: https://help.aliyun.com/api/iot/listrule.html
+func (client *Client) ListRule(request *ListRuleRequest) (response *ListRuleResponse, err error) {
+	response = CreateListRuleResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// ListRuleWithChan invokes the iot.ListRule API asynchronously
+// api document: https://help.aliyun.com/api/iot/listrule.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ListRuleWithChan(request *ListRuleRequest) (<-chan *ListRuleResponse, <-chan error) {
+	responseChan := make(chan *ListRuleResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.ListRule(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// ListRuleWithCallback invokes the iot.ListRule API asynchronously
+// api document: https://help.aliyun.com/api/iot/listrule.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ListRuleWithCallback(request *ListRuleRequest, callback func(response *ListRuleResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *ListRuleResponse
+		var err error
+		defer close(result)
+		response, err = client.ListRule(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// ListRuleRequest is the request struct for api ListRule
+type ListRuleRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string           `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string           `position:"Query" name:"IotInstanceId"`
+	CurrentPage   requests.Integer `position:"Query" name:"CurrentPage"`
+	PageSize      requests.Integer `position:"Query" name:"PageSize"`
+	SearchName    string           `position:"Query" name:"SearchName"`
+}
+
+// ListRuleResponse is the response struct for api ListRule
+type ListRuleResponse struct {
+	*responses.BaseResponse
+	RequestId    string        `json:"RequestId" xml:"RequestId"`
+	Success      bool          `json:"Success" xml:"Success"`
+	Code         string        `json:"Code" xml:"Code"`
+	ErrorMessage string        `json:"ErrorMessage" xml:"ErrorMessage"`
+	PageSize     int           `json:"PageSize" xml:"PageSize"`
+	Page         int           `json:"Page" xml:"Page"`
+	Total        int           `json:"Total" xml:"Total"`
+	Data         ListRuleData0 `json:"Data" xml:"Data"`
+}
+
+type ListRuleData0 struct {
+	RuleInfo []ListRuleRuleInfo1 `json:"RuleInfo" xml:"RuleInfo"`
+}
+
+type ListRuleRuleInfo1 struct {
+	Id           int64  `json:"Id" xml:"Id"`
+	Select       string `json:"Select" xml:"Select"`
+	Topic        string `json:"Topic" xml:"Topic"`
+	ShortTopic   string `json:"ShortTopic" xml:"ShortTopic"`
+	Where        string `json:"Where" xml:"Where"`
+	Status       string `json:"Status" xml:"Status"`
+	CreateUserId int64  `json:"CreateUserId" xml:"CreateUserId"`
+	ProductKey   string `json:"ProductKey" xml:"ProductKey"`
+	Name         string `json:"Name" xml:"Name"`
+	DataType     string `json:"DataType" xml:"DataType"`
+	RuleDesc     string `json:"RuleDesc" xml:"RuleDesc"`
+	Created      string `json:"Created" xml:"Created"`
+	UtcCreated   string `json:"UtcCreated" xml:"UtcCreated"`
+	Modified     string `json:"Modified" xml:"Modified"`
+	UtcModified  string `json:"UtcModified" xml:"UtcModified"`
+}
+
+// CreateListRuleRequest creates a request to invoke ListRule API
+func CreateListRuleRequest() (request *ListRuleRequest) {
+	request = &ListRuleRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "ListRule", "iot", "openAPI")
+	return
+}
+
+// CreateListRuleResponse creates a response to parse from ListRule response
+func CreateListRuleResponse() (response *ListRuleResponse) {
+	response = &ListRuleResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 121 - 0
services/iot/list_rule_actions.go

@@ -0,0 +1,121 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// ListRuleActions invokes the iot.ListRuleActions API synchronously
+// api document: https://help.aliyun.com/api/iot/listruleactions.html
+func (client *Client) ListRuleActions(request *ListRuleActionsRequest) (response *ListRuleActionsResponse, err error) {
+	response = CreateListRuleActionsResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// ListRuleActionsWithChan invokes the iot.ListRuleActions API asynchronously
+// api document: https://help.aliyun.com/api/iot/listruleactions.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ListRuleActionsWithChan(request *ListRuleActionsRequest) (<-chan *ListRuleActionsResponse, <-chan error) {
+	responseChan := make(chan *ListRuleActionsResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.ListRuleActions(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// ListRuleActionsWithCallback invokes the iot.ListRuleActions API asynchronously
+// api document: https://help.aliyun.com/api/iot/listruleactions.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ListRuleActionsWithCallback(request *ListRuleActionsRequest, callback func(response *ListRuleActionsResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *ListRuleActionsResponse
+		var err error
+		defer close(result)
+		response, err = client.ListRuleActions(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// ListRuleActionsRequest is the request struct for api ListRuleActions
+type ListRuleActionsRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string           `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string           `position:"Query" name:"IotInstanceId"`
+	RuleId        requests.Integer `position:"Query" name:"RuleId"`
+}
+
+// ListRuleActionsResponse is the response struct for api ListRuleActions
+type ListRuleActionsResponse struct {
+	*responses.BaseResponse
+	RequestId      string                         `json:"RequestId" xml:"RequestId"`
+	Success        bool                           `json:"Success" xml:"Success"`
+	Code           string                         `json:"Code" xml:"Code"`
+	ErrorMessage   string                         `json:"ErrorMessage" xml:"ErrorMessage"`
+	RuleActionList ListRuleActionsRuleActionList0 `json:"RuleActionList" xml:"RuleActionList"`
+}
+
+type ListRuleActionsRuleActionList0 struct {
+	RuleActionInfo []ListRuleActionsRuleActionInfo1 `json:"RuleActionInfo" xml:"RuleActionInfo"`
+}
+
+type ListRuleActionsRuleActionInfo1 struct {
+	Id              int64  `json:"Id" xml:"Id"`
+	RuleId          int64  `json:"RuleId" xml:"RuleId"`
+	Type            string `json:"Type" xml:"Type"`
+	Configuration   string `json:"Configuration" xml:"Configuration"`
+	ErrorActionFlag bool   `json:"ErrorActionFlag" xml:"ErrorActionFlag"`
+}
+
+// CreateListRuleActionsRequest creates a request to invoke ListRuleActions API
+func CreateListRuleActionsRequest() (request *ListRuleActionsRequest) {
+	request = &ListRuleActionsRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "ListRuleActions", "iot", "openAPI")
+	return
+}
+
+// CreateListRuleActionsResponse creates a response to parse from ListRuleActions response
+func CreateListRuleActionsResponse() (response *ListRuleActionsResponse) {
+	response = &ListRuleActionsResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 116 - 0
services/iot/notify_add_thing_topo.go

@@ -0,0 +1,116 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// NotifyAddThingTopo invokes the iot.NotifyAddThingTopo API synchronously
+// api document: https://help.aliyun.com/api/iot/notifyaddthingtopo.html
+func (client *Client) NotifyAddThingTopo(request *NotifyAddThingTopoRequest) (response *NotifyAddThingTopoResponse, err error) {
+	response = CreateNotifyAddThingTopoResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// NotifyAddThingTopoWithChan invokes the iot.NotifyAddThingTopo API asynchronously
+// api document: https://help.aliyun.com/api/iot/notifyaddthingtopo.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) NotifyAddThingTopoWithChan(request *NotifyAddThingTopoRequest) (<-chan *NotifyAddThingTopoResponse, <-chan error) {
+	responseChan := make(chan *NotifyAddThingTopoResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.NotifyAddThingTopo(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// NotifyAddThingTopoWithCallback invokes the iot.NotifyAddThingTopo API asynchronously
+// api document: https://help.aliyun.com/api/iot/notifyaddthingtopo.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) NotifyAddThingTopoWithCallback(request *NotifyAddThingTopoRequest, callback func(response *NotifyAddThingTopoResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *NotifyAddThingTopoResponse
+		var err error
+		defer close(result)
+		response, err = client.NotifyAddThingTopo(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// NotifyAddThingTopoRequest is the request struct for api NotifyAddThingTopo
+type NotifyAddThingTopoRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string `position:"Query" name:"IotInstanceId"`
+	DeviceListStr string `position:"Query" name:"DeviceListStr"`
+	GwIotId       string `position:"Query" name:"GwIotId"`
+	GwProductKey  string `position:"Query" name:"GwProductKey"`
+	GwDeviceName  string `position:"Query" name:"GwDeviceName"`
+}
+
+// NotifyAddThingTopoResponse is the response struct for api NotifyAddThingTopo
+type NotifyAddThingTopoResponse struct {
+	*responses.BaseResponse
+	RequestId    string                  `json:"RequestId" xml:"RequestId"`
+	Success      bool                    `json:"Success" xml:"Success"`
+	ErrorMessage string                  `json:"ErrorMessage" xml:"ErrorMessage"`
+	Code         string                  `json:"Code" xml:"Code"`
+	Data         NotifyAddThingTopoData0 `json:"Data" xml:"Data"`
+}
+
+type NotifyAddThingTopoData0 struct {
+	MessageId string `json:"MessageId" xml:"MessageId"`
+}
+
+// CreateNotifyAddThingTopoRequest creates a request to invoke NotifyAddThingTopo API
+func CreateNotifyAddThingTopoRequest() (request *NotifyAddThingTopoRequest) {
+	request = &NotifyAddThingTopoRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "NotifyAddThingTopo", "iot", "openAPI")
+	return
+}
+
+// CreateNotifyAddThingTopoResponse creates a response to parse from NotifyAddThingTopo response
+func CreateNotifyAddThingTopoResponse() (response *NotifyAddThingTopoResponse) {
+	response = &NotifyAddThingTopoResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 112 - 0
services/iot/pub.go

@@ -0,0 +1,112 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// Pub invokes the iot.Pub API synchronously
+// api document: https://help.aliyun.com/api/iot/pub.html
+func (client *Client) Pub(request *PubRequest) (response *PubResponse, err error) {
+	response = CreatePubResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// PubWithChan invokes the iot.Pub API asynchronously
+// api document: https://help.aliyun.com/api/iot/pub.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) PubWithChan(request *PubRequest) (<-chan *PubResponse, <-chan error) {
+	responseChan := make(chan *PubResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.Pub(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// PubWithCallback invokes the iot.Pub API asynchronously
+// api document: https://help.aliyun.com/api/iot/pub.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) PubWithCallback(request *PubRequest, callback func(response *PubResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *PubResponse
+		var err error
+		defer close(result)
+		response, err = client.Pub(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// PubRequest is the request struct for api Pub
+type PubRequest struct {
+	*requests.RpcRequest
+	AccessKeyId    string           `position:"Query" name:"AccessKeyId"`
+	IotInstanceId  string           `position:"Query" name:"IotInstanceId"`
+	ProductKey     string           `position:"Query" name:"ProductKey"`
+	Qos            requests.Integer `position:"Query" name:"Qos"`
+	TopicFullName  string           `position:"Query" name:"TopicFullName"`
+	MessageContent string           `position:"Query" name:"MessageContent"`
+}
+
+// PubResponse is the response struct for api Pub
+type PubResponse struct {
+	*responses.BaseResponse
+	RequestId    string `json:"RequestId" xml:"RequestId"`
+	Success      bool   `json:"Success" xml:"Success"`
+	Code         string `json:"Code" xml:"Code"`
+	ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"`
+	MessageId    string `json:"MessageId" xml:"MessageId"`
+}
+
+// CreatePubRequest creates a request to invoke Pub API
+func CreatePubRequest() (request *PubRequest) {
+	request = &PubRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "Pub", "iot", "openAPI")
+	return
+}
+
+// CreatePubResponse creates a response to parse from Pub response
+func CreatePubResponse() (response *PubResponse) {
+	response = &PubResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 110 - 0
services/iot/pub_broadcast.go

@@ -0,0 +1,110 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// PubBroadcast invokes the iot.PubBroadcast API synchronously
+// api document: https://help.aliyun.com/api/iot/pubbroadcast.html
+func (client *Client) PubBroadcast(request *PubBroadcastRequest) (response *PubBroadcastResponse, err error) {
+	response = CreatePubBroadcastResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// PubBroadcastWithChan invokes the iot.PubBroadcast API asynchronously
+// api document: https://help.aliyun.com/api/iot/pubbroadcast.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) PubBroadcastWithChan(request *PubBroadcastRequest) (<-chan *PubBroadcastResponse, <-chan error) {
+	responseChan := make(chan *PubBroadcastResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.PubBroadcast(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// PubBroadcastWithCallback invokes the iot.PubBroadcast API asynchronously
+// api document: https://help.aliyun.com/api/iot/pubbroadcast.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) PubBroadcastWithCallback(request *PubBroadcastRequest, callback func(response *PubBroadcastResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *PubBroadcastResponse
+		var err error
+		defer close(result)
+		response, err = client.PubBroadcast(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// PubBroadcastRequest is the request struct for api PubBroadcast
+type PubBroadcastRequest struct {
+	*requests.RpcRequest
+	AccessKeyId    string `position:"Query" name:"AccessKeyId"`
+	IotInstanceId  string `position:"Query" name:"IotInstanceId"`
+	ProductKey     string `position:"Query" name:"ProductKey"`
+	TopicFullName  string `position:"Query" name:"TopicFullName"`
+	MessageContent string `position:"Query" name:"MessageContent"`
+}
+
+// PubBroadcastResponse is the response struct for api PubBroadcast
+type PubBroadcastResponse struct {
+	*responses.BaseResponse
+	RequestId    string `json:"RequestId" xml:"RequestId"`
+	Success      bool   `json:"Success" xml:"Success"`
+	Code         string `json:"Code" xml:"Code"`
+	ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"`
+}
+
+// CreatePubBroadcastRequest creates a request to invoke PubBroadcast API
+func CreatePubBroadcastRequest() (request *PubBroadcastRequest) {
+	request = &PubBroadcastRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "PubBroadcast", "iot", "openAPI")
+	return
+}
+
+// CreatePubBroadcastResponse creates a response to parse from PubBroadcast response
+func CreatePubBroadcastResponse() (response *PubBroadcastResponse) {
+	response = &PubBroadcastResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 141 - 0
services/iot/query_app_device_list.go

@@ -0,0 +1,141 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// QueryAppDeviceList invokes the iot.QueryAppDeviceList API synchronously
+// api document: https://help.aliyun.com/api/iot/queryappdevicelist.html
+func (client *Client) QueryAppDeviceList(request *QueryAppDeviceListRequest) (response *QueryAppDeviceListResponse, err error) {
+	response = CreateQueryAppDeviceListResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// QueryAppDeviceListWithChan invokes the iot.QueryAppDeviceList API asynchronously
+// api document: https://help.aliyun.com/api/iot/queryappdevicelist.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryAppDeviceListWithChan(request *QueryAppDeviceListRequest) (<-chan *QueryAppDeviceListResponse, <-chan error) {
+	responseChan := make(chan *QueryAppDeviceListResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.QueryAppDeviceList(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// QueryAppDeviceListWithCallback invokes the iot.QueryAppDeviceList API asynchronously
+// api document: https://help.aliyun.com/api/iot/queryappdevicelist.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryAppDeviceListWithCallback(request *QueryAppDeviceListRequest, callback func(response *QueryAppDeviceListResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *QueryAppDeviceListResponse
+		var err error
+		defer close(result)
+		response, err = client.QueryAppDeviceList(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// QueryAppDeviceListRequest is the request struct for api QueryAppDeviceList
+type QueryAppDeviceListRequest struct {
+	*requests.RpcRequest
+	IotInstanceId   string                       `position:"Query" name:"IotInstanceId"`
+	CurrentPage     requests.Integer             `position:"Query" name:"CurrentPage"`
+	PageSize        requests.Integer             `position:"Query" name:"PageSize"`
+	ProductKeyList  []string                     `position:"Query" name:"ProductKeyList" type:"Repeated"`
+	CategoryKeyList []string                     `position:"Query" name:"CategoryKeyList" type:"Repeated"`
+	TagList         *[]QueryAppDeviceListTagList `position:"Query" name:"TagList" type:"Repeated"`
+	AppKey          string                       `position:"Query" name:"AppKey"`
+}
+
+type QueryAppDeviceListTagList struct {
+	TagName  string `name:"TagName"`
+	TagValue string `name:"TagValue"`
+}
+
+// QueryAppDeviceListResponse is the response struct for api QueryAppDeviceList
+type QueryAppDeviceListResponse struct {
+	*responses.BaseResponse
+	RequestId    string                  `json:"RequestId" xml:"RequestId"`
+	Success      bool                    `json:"Success" xml:"Success"`
+	ErrorMessage string                  `json:"ErrorMessage" xml:"ErrorMessage"`
+	Code         string                  `json:"Code" xml:"Code"`
+	Page         int                     `json:"Page" xml:"Page"`
+	PageSize     int                     `json:"PageSize" xml:"PageSize"`
+	PageCount    int                     `json:"PageCount" xml:"PageCount"`
+	Total        int                     `json:"Total" xml:"Total"`
+	Data         QueryAppDeviceListData0 `json:"Data" xml:"Data"`
+}
+
+type QueryAppDeviceListData0 struct {
+	Data []QueryAppDeviceListData1 `json:"Data" xml:"Data"`
+}
+
+type QueryAppDeviceListData1 struct {
+	ProductName       string `json:"ProductName" xml:"ProductName"`
+	ProductKey        string `json:"ProductKey" xml:"ProductKey"`
+	DeviceName        string `json:"DeviceName" xml:"DeviceName"`
+	NodeType          int    `json:"NodeType" xml:"NodeType"`
+	Status            string `json:"Status" xml:"Status"`
+	ActiveTime        string `json:"ActiveTime" xml:"ActiveTime"`
+	LastOnlineTime    string `json:"LastOnlineTime" xml:"LastOnlineTime"`
+	CreateTime        string `json:"CreateTime" xml:"CreateTime"`
+	ChildDeviceCount  int64  `json:"ChildDeviceCount" xml:"ChildDeviceCount"`
+	UtcActiveTime     string `json:"UtcActiveTime" xml:"UtcActiveTime"`
+	UtcLastOnlineTime string `json:"UtcLastOnlineTime" xml:"UtcLastOnlineTime"`
+	UtcCreateTime     string `json:"UtcCreateTime" xml:"UtcCreateTime"`
+}
+
+// CreateQueryAppDeviceListRequest creates a request to invoke QueryAppDeviceList API
+func CreateQueryAppDeviceListRequest() (request *QueryAppDeviceListRequest) {
+	request = &QueryAppDeviceListRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "QueryAppDeviceList", "iot", "openAPI")
+	return
+}
+
+// CreateQueryAppDeviceListResponse creates a response to parse from QueryAppDeviceList response
+func CreateQueryAppDeviceListResponse() (response *QueryAppDeviceListResponse) {
+	response = &QueryAppDeviceListResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 116 - 0
services/iot/query_batch_register_device_status.go

@@ -0,0 +1,116 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// QueryBatchRegisterDeviceStatus invokes the iot.QueryBatchRegisterDeviceStatus API synchronously
+// api document: https://help.aliyun.com/api/iot/querybatchregisterdevicestatus.html
+func (client *Client) QueryBatchRegisterDeviceStatus(request *QueryBatchRegisterDeviceStatusRequest) (response *QueryBatchRegisterDeviceStatusResponse, err error) {
+	response = CreateQueryBatchRegisterDeviceStatusResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// QueryBatchRegisterDeviceStatusWithChan invokes the iot.QueryBatchRegisterDeviceStatus API asynchronously
+// api document: https://help.aliyun.com/api/iot/querybatchregisterdevicestatus.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryBatchRegisterDeviceStatusWithChan(request *QueryBatchRegisterDeviceStatusRequest) (<-chan *QueryBatchRegisterDeviceStatusResponse, <-chan error) {
+	responseChan := make(chan *QueryBatchRegisterDeviceStatusResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.QueryBatchRegisterDeviceStatus(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// QueryBatchRegisterDeviceStatusWithCallback invokes the iot.QueryBatchRegisterDeviceStatus API asynchronously
+// api document: https://help.aliyun.com/api/iot/querybatchregisterdevicestatus.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryBatchRegisterDeviceStatusWithCallback(request *QueryBatchRegisterDeviceStatusRequest, callback func(response *QueryBatchRegisterDeviceStatusResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *QueryBatchRegisterDeviceStatusResponse
+		var err error
+		defer close(result)
+		response, err = client.QueryBatchRegisterDeviceStatus(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// QueryBatchRegisterDeviceStatusRequest is the request struct for api QueryBatchRegisterDeviceStatus
+type QueryBatchRegisterDeviceStatusRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string           `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string           `position:"Query" name:"IotInstanceId"`
+	ProductKey    string           `position:"Query" name:"ProductKey"`
+	ApplyId       requests.Integer `position:"Query" name:"ApplyId"`
+}
+
+// QueryBatchRegisterDeviceStatusResponse is the response struct for api QueryBatchRegisterDeviceStatus
+type QueryBatchRegisterDeviceStatusResponse struct {
+	*responses.BaseResponse
+	RequestId    string                              `json:"RequestId" xml:"RequestId"`
+	Success      bool                                `json:"Success" xml:"Success"`
+	Code         string                              `json:"Code" xml:"Code"`
+	ErrorMessage string                              `json:"ErrorMessage" xml:"ErrorMessage"`
+	Data         QueryBatchRegisterDeviceStatusData0 `json:"Data" xml:"Data"`
+}
+
+type QueryBatchRegisterDeviceStatusData0 struct {
+	Status      string   `json:"Status" xml:"Status"`
+	ValidList   []string `json:"ValidList" xml:"ValidList"`
+	InvalidList []string `json:"InvalidList" xml:"InvalidList"`
+}
+
+// CreateQueryBatchRegisterDeviceStatusRequest creates a request to invoke QueryBatchRegisterDeviceStatus API
+func CreateQueryBatchRegisterDeviceStatusRequest() (request *QueryBatchRegisterDeviceStatusRequest) {
+	request = &QueryBatchRegisterDeviceStatusRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "QueryBatchRegisterDeviceStatus", "iot", "openAPI")
+	return
+}
+
+// CreateQueryBatchRegisterDeviceStatusResponse creates a response to parse from QueryBatchRegisterDeviceStatus response
+func CreateQueryBatchRegisterDeviceStatusResponse() (response *QueryBatchRegisterDeviceStatusResponse) {
+	response = &QueryBatchRegisterDeviceStatusResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 134 - 0
services/iot/query_device.go

@@ -0,0 +1,134 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// QueryDevice invokes the iot.QueryDevice API synchronously
+// api document: https://help.aliyun.com/api/iot/querydevice.html
+func (client *Client) QueryDevice(request *QueryDeviceRequest) (response *QueryDeviceResponse, err error) {
+	response = CreateQueryDeviceResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// QueryDeviceWithChan invokes the iot.QueryDevice API asynchronously
+// api document: https://help.aliyun.com/api/iot/querydevice.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryDeviceWithChan(request *QueryDeviceRequest) (<-chan *QueryDeviceResponse, <-chan error) {
+	responseChan := make(chan *QueryDeviceResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.QueryDevice(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// QueryDeviceWithCallback invokes the iot.QueryDevice API asynchronously
+// api document: https://help.aliyun.com/api/iot/querydevice.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryDeviceWithCallback(request *QueryDeviceRequest, callback func(response *QueryDeviceResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *QueryDeviceResponse
+		var err error
+		defer close(result)
+		response, err = client.QueryDevice(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// QueryDeviceRequest is the request struct for api QueryDevice
+type QueryDeviceRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string           `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string           `position:"Query" name:"IotInstanceId"`
+	ProductKey    string           `position:"Query" name:"ProductKey"`
+	PageSize      requests.Integer `position:"Query" name:"PageSize"`
+	CurrentPage   requests.Integer `position:"Query" name:"CurrentPage"`
+}
+
+// QueryDeviceResponse is the response struct for api QueryDevice
+type QueryDeviceResponse struct {
+	*responses.BaseResponse
+	RequestId    string           `json:"RequestId" xml:"RequestId"`
+	Success      bool             `json:"Success" xml:"Success"`
+	Code         string           `json:"Code" xml:"Code"`
+	ErrorMessage string           `json:"ErrorMessage" xml:"ErrorMessage"`
+	Total        int              `json:"Total" xml:"Total"`
+	PageSize     int              `json:"PageSize" xml:"PageSize"`
+	PageCount    int              `json:"PageCount" xml:"PageCount"`
+	Page         int              `json:"Page" xml:"Page"`
+	Data         QueryDeviceData0 `json:"Data" xml:"Data"`
+}
+
+type QueryDeviceData0 struct {
+	DeviceInfo []QueryDeviceDeviceInfo1 `json:"DeviceInfo" xml:"DeviceInfo"`
+}
+
+type QueryDeviceDeviceInfo1 struct {
+	DeviceId     string `json:"DeviceId" xml:"DeviceId"`
+	DeviceSecret string `json:"DeviceSecret" xml:"DeviceSecret"`
+	ProductKey   string `json:"ProductKey" xml:"ProductKey"`
+	DeviceStatus string `json:"DeviceStatus" xml:"DeviceStatus"`
+	DeviceName   string `json:"DeviceName" xml:"DeviceName"`
+	DeviceType   string `json:"DeviceType" xml:"DeviceType"`
+	GmtCreate    string `json:"GmtCreate" xml:"GmtCreate"`
+	GmtModified  string `json:"GmtModified" xml:"GmtModified"`
+	UtcCreate    string `json:"UtcCreate" xml:"UtcCreate"`
+	UtcModified  string `json:"UtcModified" xml:"UtcModified"`
+	IotId        string `json:"IotId" xml:"IotId"`
+	Nickname     string `json:"Nickname" xml:"Nickname"`
+}
+
+// CreateQueryDeviceRequest creates a request to invoke QueryDevice API
+func CreateQueryDeviceRequest() (request *QueryDeviceRequest) {
+	request = &QueryDeviceRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "QueryDevice", "iot", "openAPI")
+	return
+}
+
+// CreateQueryDeviceResponse creates a response to parse from QueryDevice response
+func CreateQueryDeviceResponse() (response *QueryDeviceResponse) {
+	response = &QueryDeviceResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 131 - 0
services/iot/query_device_by_tags.go

@@ -0,0 +1,131 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// QueryDeviceByTags invokes the iot.QueryDeviceByTags API synchronously
+// api document: https://help.aliyun.com/api/iot/querydevicebytags.html
+func (client *Client) QueryDeviceByTags(request *QueryDeviceByTagsRequest) (response *QueryDeviceByTagsResponse, err error) {
+	response = CreateQueryDeviceByTagsResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// QueryDeviceByTagsWithChan invokes the iot.QueryDeviceByTags API asynchronously
+// api document: https://help.aliyun.com/api/iot/querydevicebytags.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryDeviceByTagsWithChan(request *QueryDeviceByTagsRequest) (<-chan *QueryDeviceByTagsResponse, <-chan error) {
+	responseChan := make(chan *QueryDeviceByTagsResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.QueryDeviceByTags(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// QueryDeviceByTagsWithCallback invokes the iot.QueryDeviceByTags API asynchronously
+// api document: https://help.aliyun.com/api/iot/querydevicebytags.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryDeviceByTagsWithCallback(request *QueryDeviceByTagsRequest, callback func(response *QueryDeviceByTagsResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *QueryDeviceByTagsResponse
+		var err error
+		defer close(result)
+		response, err = client.QueryDeviceByTags(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// QueryDeviceByTagsRequest is the request struct for api QueryDeviceByTags
+type QueryDeviceByTagsRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string                  `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string                  `position:"Query" name:"IotInstanceId"`
+	Tag           *[]QueryDeviceByTagsTag `position:"Query" name:"Tag" type:"Repeated"`
+	CurrentPage   requests.Integer        `position:"Query" name:"CurrentPage"`
+	PageSize      requests.Integer        `position:"Query" name:"PageSize"`
+}
+
+type QueryDeviceByTagsTag struct {
+	TagKey   string `name:"TagKey"`
+	TagValue string `name:"TagValue"`
+}
+
+// QueryDeviceByTagsResponse is the response struct for api QueryDeviceByTags
+type QueryDeviceByTagsResponse struct {
+	*responses.BaseResponse
+	RequestId    string                 `json:"RequestId" xml:"RequestId"`
+	Success      bool                   `json:"Success" xml:"Success"`
+	Code         string                 `json:"Code" xml:"Code"`
+	ErrorMessage string                 `json:"ErrorMessage" xml:"ErrorMessage"`
+	Page         int                    `json:"Page" xml:"Page"`
+	PageSize     int                    `json:"PageSize" xml:"PageSize"`
+	PageCount    int                    `json:"PageCount" xml:"PageCount"`
+	Total        int                    `json:"Total" xml:"Total"`
+	Data         QueryDeviceByTagsData0 `json:"Data" xml:"Data"`
+}
+
+type QueryDeviceByTagsData0 struct {
+	SimpleDeviceInfo []QueryDeviceByTagsSimpleDeviceInfo1 `json:"SimpleDeviceInfo" xml:"SimpleDeviceInfo"`
+}
+
+type QueryDeviceByTagsSimpleDeviceInfo1 struct {
+	ProductName string `json:"ProductName" xml:"ProductName"`
+	ProductKey  string `json:"ProductKey" xml:"ProductKey"`
+	DeviceName  string `json:"DeviceName" xml:"DeviceName"`
+	IotId       string `json:"IotId" xml:"IotId"`
+}
+
+// CreateQueryDeviceByTagsRequest creates a request to invoke QueryDeviceByTags API
+func CreateQueryDeviceByTagsRequest() (request *QueryDeviceByTagsRequest) {
+	request = &QueryDeviceByTagsRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "QueryDeviceByTags", "iot", "openAPI")
+	return
+}
+
+// CreateQueryDeviceByTagsResponse creates a response to parse from QueryDeviceByTags response
+func CreateQueryDeviceByTagsResponse() (response *QueryDeviceByTagsResponse) {
+	response = &QueryDeviceByTagsResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 130 - 0
services/iot/query_device_desired_property.go

@@ -0,0 +1,130 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// QueryDeviceDesiredProperty invokes the iot.QueryDeviceDesiredProperty API synchronously
+// api document: https://help.aliyun.com/api/iot/querydevicedesiredproperty.html
+func (client *Client) QueryDeviceDesiredProperty(request *QueryDeviceDesiredPropertyRequest) (response *QueryDeviceDesiredPropertyResponse, err error) {
+	response = CreateQueryDeviceDesiredPropertyResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// QueryDeviceDesiredPropertyWithChan invokes the iot.QueryDeviceDesiredProperty API asynchronously
+// api document: https://help.aliyun.com/api/iot/querydevicedesiredproperty.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryDeviceDesiredPropertyWithChan(request *QueryDeviceDesiredPropertyRequest) (<-chan *QueryDeviceDesiredPropertyResponse, <-chan error) {
+	responseChan := make(chan *QueryDeviceDesiredPropertyResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.QueryDeviceDesiredProperty(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// QueryDeviceDesiredPropertyWithCallback invokes the iot.QueryDeviceDesiredProperty API asynchronously
+// api document: https://help.aliyun.com/api/iot/querydevicedesiredproperty.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryDeviceDesiredPropertyWithCallback(request *QueryDeviceDesiredPropertyRequest, callback func(response *QueryDeviceDesiredPropertyResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *QueryDeviceDesiredPropertyResponse
+		var err error
+		defer close(result)
+		response, err = client.QueryDeviceDesiredProperty(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// QueryDeviceDesiredPropertyRequest is the request struct for api QueryDeviceDesiredProperty
+type QueryDeviceDesiredPropertyRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string   `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string   `position:"Query" name:"IotInstanceId"`
+	IotId         string   `position:"Query" name:"IotId"`
+	ProductKey    string   `position:"Query" name:"ProductKey"`
+	DeviceName    string   `position:"Query" name:"DeviceName"`
+	Identifier    []string `position:"Query" name:"Identifier" type:"Repeated"`
+}
+
+// QueryDeviceDesiredPropertyResponse is the response struct for api QueryDeviceDesiredProperty
+type QueryDeviceDesiredPropertyResponse struct {
+	*responses.BaseResponse
+	RequestId    string                          `json:"RequestId" xml:"RequestId"`
+	Success      bool                            `json:"Success" xml:"Success"`
+	Code         string                          `json:"Code" xml:"Code"`
+	ErrorMessage string                          `json:"ErrorMessage" xml:"ErrorMessage"`
+	Data         QueryDeviceDesiredPropertyData0 `json:"Data" xml:"Data"`
+}
+
+type QueryDeviceDesiredPropertyData0 struct {
+	List QueryDeviceDesiredPropertyList1 `json:"List" xml:"List"`
+}
+
+type QueryDeviceDesiredPropertyList1 struct {
+	DesiredPropertyInfo []QueryDeviceDesiredPropertyDesiredPropertyInfo2 `json:"DesiredPropertyInfo" xml:"DesiredPropertyInfo"`
+}
+
+type QueryDeviceDesiredPropertyDesiredPropertyInfo2 struct {
+	Unit       string `json:"Unit" xml:"Unit"`
+	Identifier string `json:"Identifier" xml:"Identifier"`
+	DataType   string `json:"DataType" xml:"DataType"`
+	Time       string `json:"Time" xml:"Time"`
+	Value      string `json:"Value" xml:"Value"`
+	Name       string `json:"Name" xml:"Name"`
+	Version    int64  `json:"Version" xml:"Version"`
+}
+
+// CreateQueryDeviceDesiredPropertyRequest creates a request to invoke QueryDeviceDesiredProperty API
+func CreateQueryDeviceDesiredPropertyRequest() (request *QueryDeviceDesiredPropertyRequest) {
+	request = &QueryDeviceDesiredPropertyRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "QueryDeviceDesiredProperty", "iot", "openAPI")
+	return
+}
+
+// CreateQueryDeviceDesiredPropertyResponse creates a response to parse from QueryDeviceDesiredProperty response
+func CreateQueryDeviceDesiredPropertyResponse() (response *QueryDeviceDesiredPropertyResponse) {
+	response = &QueryDeviceDesiredPropertyResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 132 - 0
services/iot/query_device_detail.go

@@ -0,0 +1,132 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// QueryDeviceDetail invokes the iot.QueryDeviceDetail API synchronously
+// api document: https://help.aliyun.com/api/iot/querydevicedetail.html
+func (client *Client) QueryDeviceDetail(request *QueryDeviceDetailRequest) (response *QueryDeviceDetailResponse, err error) {
+	response = CreateQueryDeviceDetailResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// QueryDeviceDetailWithChan invokes the iot.QueryDeviceDetail API asynchronously
+// api document: https://help.aliyun.com/api/iot/querydevicedetail.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryDeviceDetailWithChan(request *QueryDeviceDetailRequest) (<-chan *QueryDeviceDetailResponse, <-chan error) {
+	responseChan := make(chan *QueryDeviceDetailResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.QueryDeviceDetail(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// QueryDeviceDetailWithCallback invokes the iot.QueryDeviceDetail API asynchronously
+// api document: https://help.aliyun.com/api/iot/querydevicedetail.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryDeviceDetailWithCallback(request *QueryDeviceDetailRequest, callback func(response *QueryDeviceDetailResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *QueryDeviceDetailResponse
+		var err error
+		defer close(result)
+		response, err = client.QueryDeviceDetail(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// QueryDeviceDetailRequest is the request struct for api QueryDeviceDetail
+type QueryDeviceDetailRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string `position:"Query" name:"IotInstanceId"`
+	IotId         string `position:"Query" name:"IotId"`
+	ProductKey    string `position:"Query" name:"ProductKey"`
+	DeviceName    string `position:"Query" name:"DeviceName"`
+}
+
+// QueryDeviceDetailResponse is the response struct for api QueryDeviceDetail
+type QueryDeviceDetailResponse struct {
+	*responses.BaseResponse
+	RequestId    string                 `json:"RequestId" xml:"RequestId"`
+	Success      bool                   `json:"Success" xml:"Success"`
+	Code         string                 `json:"Code" xml:"Code"`
+	ErrorMessage string                 `json:"ErrorMessage" xml:"ErrorMessage"`
+	Data         QueryDeviceDetailData0 `json:"Data" xml:"Data"`
+}
+
+type QueryDeviceDetailData0 struct {
+	IotId           string `json:"IotId" xml:"IotId"`
+	ProductKey      string `json:"ProductKey" xml:"ProductKey"`
+	ProductName     string `json:"ProductName" xml:"ProductName"`
+	DeviceName      string `json:"DeviceName" xml:"DeviceName"`
+	DeviceSecret    string `json:"DeviceSecret" xml:"DeviceSecret"`
+	FirmwareVersion string `json:"FirmwareVersion" xml:"FirmwareVersion"`
+	GmtCreate       string `json:"GmtCreate" xml:"GmtCreate"`
+	UtcCreate       string `json:"UtcCreate" xml:"UtcCreate"`
+	GmtActive       string `json:"GmtActive" xml:"GmtActive"`
+	UtcActive       string `json:"UtcActive" xml:"UtcActive"`
+	GmtOnline       string `json:"GmtOnline" xml:"GmtOnline"`
+	UtcOnline       string `json:"UtcOnline" xml:"UtcOnline"`
+	Status          string `json:"Status" xml:"Status"`
+	IpAddress       string `json:"IpAddress" xml:"IpAddress"`
+	NodeType        int    `json:"NodeType" xml:"NodeType"`
+	Region          string `json:"Region" xml:"Region"`
+	Owner           bool   `json:"Owner" xml:"Owner"`
+	Nickname        string `json:"Nickname" xml:"Nickname"`
+}
+
+// CreateQueryDeviceDetailRequest creates a request to invoke QueryDeviceDetail API
+func CreateQueryDeviceDetailRequest() (request *QueryDeviceDetailRequest) {
+	request = &QueryDeviceDetailRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "QueryDeviceDetail", "iot", "openAPI")
+	return
+}
+
+// CreateQueryDeviceDetailResponse creates a response to parse from QueryDeviceDetail response
+func CreateQueryDeviceDetailResponse() (response *QueryDeviceDetailResponse) {
+	response = &QueryDeviceDetailResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 135 - 0
services/iot/query_device_event_data.go

@@ -0,0 +1,135 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// QueryDeviceEventData invokes the iot.QueryDeviceEventData API synchronously
+// api document: https://help.aliyun.com/api/iot/querydeviceeventdata.html
+func (client *Client) QueryDeviceEventData(request *QueryDeviceEventDataRequest) (response *QueryDeviceEventDataResponse, err error) {
+	response = CreateQueryDeviceEventDataResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// QueryDeviceEventDataWithChan invokes the iot.QueryDeviceEventData API asynchronously
+// api document: https://help.aliyun.com/api/iot/querydeviceeventdata.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryDeviceEventDataWithChan(request *QueryDeviceEventDataRequest) (<-chan *QueryDeviceEventDataResponse, <-chan error) {
+	responseChan := make(chan *QueryDeviceEventDataResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.QueryDeviceEventData(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// QueryDeviceEventDataWithCallback invokes the iot.QueryDeviceEventData API asynchronously
+// api document: https://help.aliyun.com/api/iot/querydeviceeventdata.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryDeviceEventDataWithCallback(request *QueryDeviceEventDataRequest, callback func(response *QueryDeviceEventDataResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *QueryDeviceEventDataResponse
+		var err error
+		defer close(result)
+		response, err = client.QueryDeviceEventData(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// QueryDeviceEventDataRequest is the request struct for api QueryDeviceEventData
+type QueryDeviceEventDataRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string           `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string           `position:"Query" name:"IotInstanceId"`
+	IotId         string           `position:"Query" name:"IotId"`
+	ProductKey    string           `position:"Query" name:"ProductKey"`
+	EventType     string           `position:"Query" name:"EventType"`
+	DeviceName    string           `position:"Query" name:"DeviceName"`
+	Identifier    string           `position:"Query" name:"Identifier"`
+	StartTime     requests.Integer `position:"Query" name:"StartTime"`
+	EndTime       requests.Integer `position:"Query" name:"EndTime"`
+	Asc           requests.Integer `position:"Query" name:"Asc"`
+	PageSize      requests.Integer `position:"Query" name:"PageSize"`
+}
+
+// QueryDeviceEventDataResponse is the response struct for api QueryDeviceEventData
+type QueryDeviceEventDataResponse struct {
+	*responses.BaseResponse
+	RequestId    string                    `json:"RequestId" xml:"RequestId"`
+	Success      bool                      `json:"Success" xml:"Success"`
+	Code         string                    `json:"Code" xml:"Code"`
+	ErrorMessage string                    `json:"ErrorMessage" xml:"ErrorMessage"`
+	Data         QueryDeviceEventDataData0 `json:"Data" xml:"Data"`
+}
+
+type QueryDeviceEventDataData0 struct {
+	NextTime  int64                     `json:"NextTime" xml:"NextTime"`
+	NextValid bool                      `json:"NextValid" xml:"NextValid"`
+	List      QueryDeviceEventDataList1 `json:"List" xml:"List"`
+}
+
+type QueryDeviceEventDataList1 struct {
+	EventInfo []QueryDeviceEventDataEventInfo2 `json:"EventInfo" xml:"EventInfo"`
+}
+
+type QueryDeviceEventDataEventInfo2 struct {
+	Time       string `json:"Time" xml:"Time"`
+	Identifier string `json:"Identifier" xml:"Identifier"`
+	Name       string `json:"Name" xml:"Name"`
+	EventType  string `json:"EventType" xml:"EventType"`
+	OutputData string `json:"OutputData" xml:"OutputData"`
+}
+
+// CreateQueryDeviceEventDataRequest creates a request to invoke QueryDeviceEventData API
+func CreateQueryDeviceEventDataRequest() (request *QueryDeviceEventDataRequest) {
+	request = &QueryDeviceEventDataRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "QueryDeviceEventData", "iot", "openAPI")
+	return
+}
+
+// CreateQueryDeviceEventDataResponse creates a response to parse from QueryDeviceEventData response
+func CreateQueryDeviceEventDataResponse() (response *QueryDeviceEventDataResponse) {
+	response = &QueryDeviceEventDataResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 120 - 0
services/iot/query_device_file.go

@@ -0,0 +1,120 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// QueryDeviceFile invokes the iot.QueryDeviceFile API synchronously
+// api document: https://help.aliyun.com/api/iot/querydevicefile.html
+func (client *Client) QueryDeviceFile(request *QueryDeviceFileRequest) (response *QueryDeviceFileResponse, err error) {
+	response = CreateQueryDeviceFileResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// QueryDeviceFileWithChan invokes the iot.QueryDeviceFile API asynchronously
+// api document: https://help.aliyun.com/api/iot/querydevicefile.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryDeviceFileWithChan(request *QueryDeviceFileRequest) (<-chan *QueryDeviceFileResponse, <-chan error) {
+	responseChan := make(chan *QueryDeviceFileResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.QueryDeviceFile(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// QueryDeviceFileWithCallback invokes the iot.QueryDeviceFile API asynchronously
+// api document: https://help.aliyun.com/api/iot/querydevicefile.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryDeviceFileWithCallback(request *QueryDeviceFileRequest, callback func(response *QueryDeviceFileResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *QueryDeviceFileResponse
+		var err error
+		defer close(result)
+		response, err = client.QueryDeviceFile(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// QueryDeviceFileRequest is the request struct for api QueryDeviceFile
+type QueryDeviceFileRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string `position:"Query" name:"IotInstanceId"`
+	ProductKey    string `position:"Query" name:"ProductKey"`
+	DeviceName    string `position:"Query" name:"DeviceName"`
+	FileId        string `position:"Query" name:"FileId"`
+	IotId         string `position:"Query" name:"IotId"`
+}
+
+// QueryDeviceFileResponse is the response struct for api QueryDeviceFile
+type QueryDeviceFileResponse struct {
+	*responses.BaseResponse
+	RequestId    string               `json:"RequestId" xml:"RequestId"`
+	Success      bool                 `json:"Success" xml:"Success"`
+	Code         string               `json:"Code" xml:"Code"`
+	ErrorMessage string               `json:"ErrorMessage" xml:"ErrorMessage"`
+	Data         QueryDeviceFileData0 `json:"Data" xml:"Data"`
+}
+
+type QueryDeviceFileData0 struct {
+	FileId       string `json:"FileId" xml:"FileId"`
+	Name         string `json:"Name" xml:"Name"`
+	Size         string `json:"Size" xml:"Size"`
+	UtcCreatedOn string `json:"UtcCreatedOn" xml:"UtcCreatedOn"`
+	DownloadUrl  string `json:"DownloadUrl" xml:"DownloadUrl"`
+}
+
+// CreateQueryDeviceFileRequest creates a request to invoke QueryDeviceFile API
+func CreateQueryDeviceFileRequest() (request *QueryDeviceFileRequest) {
+	request = &QueryDeviceFileRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "QueryDeviceFile", "iot", "openAPI")
+	return
+}
+
+// CreateQueryDeviceFileResponse creates a response to parse from QueryDeviceFile response
+func CreateQueryDeviceFileResponse() (response *QueryDeviceFileResponse) {
+	response = &QueryDeviceFileResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 128 - 0
services/iot/query_device_file_list.go

@@ -0,0 +1,128 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// QueryDeviceFileList invokes the iot.QueryDeviceFileList API synchronously
+// api document: https://help.aliyun.com/api/iot/querydevicefilelist.html
+func (client *Client) QueryDeviceFileList(request *QueryDeviceFileListRequest) (response *QueryDeviceFileListResponse, err error) {
+	response = CreateQueryDeviceFileListResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// QueryDeviceFileListWithChan invokes the iot.QueryDeviceFileList API asynchronously
+// api document: https://help.aliyun.com/api/iot/querydevicefilelist.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryDeviceFileListWithChan(request *QueryDeviceFileListRequest) (<-chan *QueryDeviceFileListResponse, <-chan error) {
+	responseChan := make(chan *QueryDeviceFileListResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.QueryDeviceFileList(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// QueryDeviceFileListWithCallback invokes the iot.QueryDeviceFileList API asynchronously
+// api document: https://help.aliyun.com/api/iot/querydevicefilelist.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryDeviceFileListWithCallback(request *QueryDeviceFileListRequest, callback func(response *QueryDeviceFileListResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *QueryDeviceFileListResponse
+		var err error
+		defer close(result)
+		response, err = client.QueryDeviceFileList(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// QueryDeviceFileListRequest is the request struct for api QueryDeviceFileList
+type QueryDeviceFileListRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string           `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string           `position:"Query" name:"IotInstanceId"`
+	ProductKey    string           `position:"Query" name:"ProductKey"`
+	DeviceName    string           `position:"Query" name:"DeviceName"`
+	CurrentPage   requests.Integer `position:"Query" name:"CurrentPage"`
+	PageSize      requests.Integer `position:"Query" name:"PageSize"`
+	IotId         string           `position:"Query" name:"IotId"`
+}
+
+// QueryDeviceFileListResponse is the response struct for api QueryDeviceFileList
+type QueryDeviceFileListResponse struct {
+	*responses.BaseResponse
+	RequestId    string                   `json:"RequestId" xml:"RequestId"`
+	Success      bool                     `json:"Success" xml:"Success"`
+	Code         string                   `json:"Code" xml:"Code"`
+	ErrorMessage string                   `json:"ErrorMessage" xml:"ErrorMessage"`
+	CurrentPage  int                      `json:"CurrentPage" xml:"CurrentPage"`
+	PageCount    int                      `json:"PageCount" xml:"PageCount"`
+	PageSize     int                      `json:"PageSize" xml:"PageSize"`
+	Total        int                      `json:"Total" xml:"Total"`
+	Data         QueryDeviceFileListData0 `json:"Data" xml:"Data"`
+}
+
+type QueryDeviceFileListData0 struct {
+	FileSummary []QueryDeviceFileListFileSummary1 `json:"FileSummary" xml:"FileSummary"`
+}
+
+type QueryDeviceFileListFileSummary1 struct {
+	FileId       string `json:"FileId" xml:"FileId"`
+	Name         string `json:"Name" xml:"Name"`
+	Size         string `json:"Size" xml:"Size"`
+	UtcCreatedOn string `json:"UtcCreatedOn" xml:"UtcCreatedOn"`
+}
+
+// CreateQueryDeviceFileListRequest creates a request to invoke QueryDeviceFileList API
+func CreateQueryDeviceFileListRequest() (request *QueryDeviceFileListRequest) {
+	request = &QueryDeviceFileListRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "QueryDeviceFileList", "iot", "openAPI")
+	return
+}
+
+// CreateQueryDeviceFileListResponse creates a response to parse from QueryDeviceFileList response
+func CreateQueryDeviceFileListResponse() (response *QueryDeviceFileListResponse) {
+	response = &QueryDeviceFileListResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 121 - 0
services/iot/query_device_group_by_device.go

@@ -0,0 +1,121 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// QueryDeviceGroupByDevice invokes the iot.QueryDeviceGroupByDevice API synchronously
+// api document: https://help.aliyun.com/api/iot/querydevicegroupbydevice.html
+func (client *Client) QueryDeviceGroupByDevice(request *QueryDeviceGroupByDeviceRequest) (response *QueryDeviceGroupByDeviceResponse, err error) {
+	response = CreateQueryDeviceGroupByDeviceResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// QueryDeviceGroupByDeviceWithChan invokes the iot.QueryDeviceGroupByDevice API asynchronously
+// api document: https://help.aliyun.com/api/iot/querydevicegroupbydevice.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryDeviceGroupByDeviceWithChan(request *QueryDeviceGroupByDeviceRequest) (<-chan *QueryDeviceGroupByDeviceResponse, <-chan error) {
+	responseChan := make(chan *QueryDeviceGroupByDeviceResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.QueryDeviceGroupByDevice(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// QueryDeviceGroupByDeviceWithCallback invokes the iot.QueryDeviceGroupByDevice API asynchronously
+// api document: https://help.aliyun.com/api/iot/querydevicegroupbydevice.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryDeviceGroupByDeviceWithCallback(request *QueryDeviceGroupByDeviceRequest, callback func(response *QueryDeviceGroupByDeviceResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *QueryDeviceGroupByDeviceResponse
+		var err error
+		defer close(result)
+		response, err = client.QueryDeviceGroupByDevice(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// QueryDeviceGroupByDeviceRequest is the request struct for api QueryDeviceGroupByDevice
+type QueryDeviceGroupByDeviceRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string `position:"Query" name:"IotInstanceId"`
+	ProductKey    string `position:"Query" name:"ProductKey"`
+	DeviceName    string `position:"Query" name:"DeviceName"`
+}
+
+// QueryDeviceGroupByDeviceResponse is the response struct for api QueryDeviceGroupByDevice
+type QueryDeviceGroupByDeviceResponse struct {
+	*responses.BaseResponse
+	RequestId    string                              `json:"RequestId" xml:"RequestId"`
+	Success      bool                                `json:"Success" xml:"Success"`
+	Code         string                              `json:"Code" xml:"Code"`
+	ErrorMessage string                              `json:"ErrorMessage" xml:"ErrorMessage"`
+	GroupInfos   QueryDeviceGroupByDeviceGroupInfos0 `json:"GroupInfos" xml:"GroupInfos"`
+}
+
+type QueryDeviceGroupByDeviceGroupInfos0 struct {
+	GroupInfo []QueryDeviceGroupByDeviceGroupInfo1 `json:"GroupInfo" xml:"GroupInfo"`
+}
+
+type QueryDeviceGroupByDeviceGroupInfo1 struct {
+	GroupId   string `json:"GroupId" xml:"GroupId"`
+	GroupName string `json:"GroupName" xml:"GroupName"`
+	UtcCreate string `json:"UtcCreate" xml:"UtcCreate"`
+	GroupDesc string `json:"GroupDesc" xml:"GroupDesc"`
+}
+
+// CreateQueryDeviceGroupByDeviceRequest creates a request to invoke QueryDeviceGroupByDevice API
+func CreateQueryDeviceGroupByDeviceRequest() (request *QueryDeviceGroupByDeviceRequest) {
+	request = &QueryDeviceGroupByDeviceRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "QueryDeviceGroupByDevice", "iot", "openAPI")
+	return
+}
+
+// CreateQueryDeviceGroupByDeviceResponse creates a response to parse from QueryDeviceGroupByDevice response
+func CreateQueryDeviceGroupByDeviceResponse() (response *QueryDeviceGroupByDeviceResponse) {
+	response = &QueryDeviceGroupByDeviceResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 129 - 0
services/iot/query_device_group_by_tags.go

@@ -0,0 +1,129 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// QueryDeviceGroupByTags invokes the iot.QueryDeviceGroupByTags API synchronously
+// api document: https://help.aliyun.com/api/iot/querydevicegroupbytags.html
+func (client *Client) QueryDeviceGroupByTags(request *QueryDeviceGroupByTagsRequest) (response *QueryDeviceGroupByTagsResponse, err error) {
+	response = CreateQueryDeviceGroupByTagsResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// QueryDeviceGroupByTagsWithChan invokes the iot.QueryDeviceGroupByTags API asynchronously
+// api document: https://help.aliyun.com/api/iot/querydevicegroupbytags.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryDeviceGroupByTagsWithChan(request *QueryDeviceGroupByTagsRequest) (<-chan *QueryDeviceGroupByTagsResponse, <-chan error) {
+	responseChan := make(chan *QueryDeviceGroupByTagsResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.QueryDeviceGroupByTags(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// QueryDeviceGroupByTagsWithCallback invokes the iot.QueryDeviceGroupByTags API asynchronously
+// api document: https://help.aliyun.com/api/iot/querydevicegroupbytags.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryDeviceGroupByTagsWithCallback(request *QueryDeviceGroupByTagsRequest, callback func(response *QueryDeviceGroupByTagsResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *QueryDeviceGroupByTagsResponse
+		var err error
+		defer close(result)
+		response, err = client.QueryDeviceGroupByTags(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// QueryDeviceGroupByTagsRequest is the request struct for api QueryDeviceGroupByTags
+type QueryDeviceGroupByTagsRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string                       `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string                       `position:"Query" name:"IotInstanceId"`
+	Tag           *[]QueryDeviceGroupByTagsTag `position:"Query" name:"Tag" type:"Repeated"`
+	CurrentPage   requests.Integer             `position:"Query" name:"CurrentPage"`
+	PageSize      requests.Integer             `position:"Query" name:"PageSize"`
+}
+
+type QueryDeviceGroupByTagsTag struct {
+	TagKey   string `name:"TagKey"`
+	TagValue string `name:"TagValue"`
+}
+
+// QueryDeviceGroupByTagsResponse is the response struct for api QueryDeviceGroupByTags
+type QueryDeviceGroupByTagsResponse struct {
+	*responses.BaseResponse
+	RequestId    string                      `json:"RequestId" xml:"RequestId"`
+	Success      bool                        `json:"Success" xml:"Success"`
+	Code         string                      `json:"Code" xml:"Code"`
+	ErrorMessage string                      `json:"ErrorMessage" xml:"ErrorMessage"`
+	Page         int                         `json:"Page" xml:"Page"`
+	PageSize     int                         `json:"PageSize" xml:"PageSize"`
+	PageCount    int                         `json:"PageCount" xml:"PageCount"`
+	Total        int                         `json:"Total" xml:"Total"`
+	Data         QueryDeviceGroupByTagsData0 `json:"Data" xml:"Data"`
+}
+
+type QueryDeviceGroupByTagsData0 struct {
+	DeviceGroup []QueryDeviceGroupByTagsDeviceGroup1 `json:"DeviceGroup" xml:"DeviceGroup"`
+}
+
+type QueryDeviceGroupByTagsDeviceGroup1 struct {
+	GroupId   string `json:"GroupId" xml:"GroupId"`
+	GroupName string `json:"GroupName" xml:"GroupName"`
+}
+
+// CreateQueryDeviceGroupByTagsRequest creates a request to invoke QueryDeviceGroupByTags API
+func CreateQueryDeviceGroupByTagsRequest() (request *QueryDeviceGroupByTagsRequest) {
+	request = &QueryDeviceGroupByTagsRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "QueryDeviceGroupByTags", "iot", "openAPI")
+	return
+}
+
+// CreateQueryDeviceGroupByTagsResponse creates a response to parse from QueryDeviceGroupByTags response
+func CreateQueryDeviceGroupByTagsResponse() (response *QueryDeviceGroupByTagsResponse) {
+	response = &QueryDeviceGroupByTagsResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 119 - 0
services/iot/query_device_group_info.go

@@ -0,0 +1,119 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// QueryDeviceGroupInfo invokes the iot.QueryDeviceGroupInfo API synchronously
+// api document: https://help.aliyun.com/api/iot/querydevicegroupinfo.html
+func (client *Client) QueryDeviceGroupInfo(request *QueryDeviceGroupInfoRequest) (response *QueryDeviceGroupInfoResponse, err error) {
+	response = CreateQueryDeviceGroupInfoResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// QueryDeviceGroupInfoWithChan invokes the iot.QueryDeviceGroupInfo API asynchronously
+// api document: https://help.aliyun.com/api/iot/querydevicegroupinfo.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryDeviceGroupInfoWithChan(request *QueryDeviceGroupInfoRequest) (<-chan *QueryDeviceGroupInfoResponse, <-chan error) {
+	responseChan := make(chan *QueryDeviceGroupInfoResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.QueryDeviceGroupInfo(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// QueryDeviceGroupInfoWithCallback invokes the iot.QueryDeviceGroupInfo API asynchronously
+// api document: https://help.aliyun.com/api/iot/querydevicegroupinfo.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryDeviceGroupInfoWithCallback(request *QueryDeviceGroupInfoRequest, callback func(response *QueryDeviceGroupInfoResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *QueryDeviceGroupInfoResponse
+		var err error
+		defer close(result)
+		response, err = client.QueryDeviceGroupInfo(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// QueryDeviceGroupInfoRequest is the request struct for api QueryDeviceGroupInfo
+type QueryDeviceGroupInfoRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string `position:"Query" name:"IotInstanceId"`
+	GroupId       string `position:"Query" name:"GroupId"`
+}
+
+// QueryDeviceGroupInfoResponse is the response struct for api QueryDeviceGroupInfo
+type QueryDeviceGroupInfoResponse struct {
+	*responses.BaseResponse
+	RequestId    string                    `json:"RequestId" xml:"RequestId"`
+	Success      bool                      `json:"Success" xml:"Success"`
+	Code         string                    `json:"Code" xml:"Code"`
+	ErrorMessage string                    `json:"ErrorMessage" xml:"ErrorMessage"`
+	Data         QueryDeviceGroupInfoData0 `json:"Data" xml:"Data"`
+}
+
+type QueryDeviceGroupInfoData0 struct {
+	GroupId      string `json:"GroupId" xml:"GroupId"`
+	UtcCreate    string `json:"UtcCreate" xml:"UtcCreate"`
+	GroupName    string `json:"GroupName" xml:"GroupName"`
+	GroupDesc    string `json:"GroupDesc" xml:"GroupDesc"`
+	DeviceCount  int    `json:"DeviceCount" xml:"DeviceCount"`
+	DeviceActive int    `json:"DeviceActive" xml:"DeviceActive"`
+	DeviceOnline int    `json:"DeviceOnline" xml:"DeviceOnline"`
+}
+
+// CreateQueryDeviceGroupInfoRequest creates a request to invoke QueryDeviceGroupInfo API
+func CreateQueryDeviceGroupInfoRequest() (request *QueryDeviceGroupInfoRequest) {
+	request = &QueryDeviceGroupInfoRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "QueryDeviceGroupInfo", "iot", "openAPI")
+	return
+}
+
+// CreateQueryDeviceGroupInfoResponse creates a response to parse from QueryDeviceGroupInfo response
+func CreateQueryDeviceGroupInfoResponse() (response *QueryDeviceGroupInfoResponse) {
+	response = &QueryDeviceGroupInfoResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 127 - 0
services/iot/query_device_group_list.go

@@ -0,0 +1,127 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// QueryDeviceGroupList invokes the iot.QueryDeviceGroupList API synchronously
+// api document: https://help.aliyun.com/api/iot/querydevicegrouplist.html
+func (client *Client) QueryDeviceGroupList(request *QueryDeviceGroupListRequest) (response *QueryDeviceGroupListResponse, err error) {
+	response = CreateQueryDeviceGroupListResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// QueryDeviceGroupListWithChan invokes the iot.QueryDeviceGroupList API asynchronously
+// api document: https://help.aliyun.com/api/iot/querydevicegrouplist.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryDeviceGroupListWithChan(request *QueryDeviceGroupListRequest) (<-chan *QueryDeviceGroupListResponse, <-chan error) {
+	responseChan := make(chan *QueryDeviceGroupListResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.QueryDeviceGroupList(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// QueryDeviceGroupListWithCallback invokes the iot.QueryDeviceGroupList API asynchronously
+// api document: https://help.aliyun.com/api/iot/querydevicegrouplist.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryDeviceGroupListWithCallback(request *QueryDeviceGroupListRequest, callback func(response *QueryDeviceGroupListResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *QueryDeviceGroupListResponse
+		var err error
+		defer close(result)
+		response, err = client.QueryDeviceGroupList(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// QueryDeviceGroupListRequest is the request struct for api QueryDeviceGroupList
+type QueryDeviceGroupListRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string           `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string           `position:"Query" name:"IotInstanceId"`
+	SuperGroupId  string           `position:"Query" name:"SuperGroupId"`
+	GroupName     string           `position:"Query" name:"GroupName"`
+	CurrentPage   requests.Integer `position:"Query" name:"CurrentPage"`
+	PageSize      requests.Integer `position:"Query" name:"PageSize"`
+}
+
+// QueryDeviceGroupListResponse is the response struct for api QueryDeviceGroupList
+type QueryDeviceGroupListResponse struct {
+	*responses.BaseResponse
+	RequestId    string                    `json:"RequestId" xml:"RequestId"`
+	Success      bool                      `json:"Success" xml:"Success"`
+	Code         string                    `json:"Code" xml:"Code"`
+	ErrorMessage string                    `json:"ErrorMessage" xml:"ErrorMessage"`
+	CurrentPage  int                       `json:"CurrentPage" xml:"CurrentPage"`
+	PageCount    int                       `json:"PageCount" xml:"PageCount"`
+	PageSize     int                       `json:"PageSize" xml:"PageSize"`
+	Total        int                       `json:"Total" xml:"Total"`
+	Data         QueryDeviceGroupListData0 `json:"Data" xml:"Data"`
+}
+
+type QueryDeviceGroupListData0 struct {
+	GroupInfo []QueryDeviceGroupListGroupInfo1 `json:"GroupInfo" xml:"GroupInfo"`
+}
+
+type QueryDeviceGroupListGroupInfo1 struct {
+	GroupId   string `json:"GroupId" xml:"GroupId"`
+	UtcCreate string `json:"UtcCreate" xml:"UtcCreate"`
+	GroupName string `json:"GroupName" xml:"GroupName"`
+	GroupDesc string `json:"GroupDesc" xml:"GroupDesc"`
+}
+
+// CreateQueryDeviceGroupListRequest creates a request to invoke QueryDeviceGroupList API
+func CreateQueryDeviceGroupListRequest() (request *QueryDeviceGroupListRequest) {
+	request = &QueryDeviceGroupListRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "QueryDeviceGroupList", "iot", "openAPI")
+	return
+}
+
+// CreateQueryDeviceGroupListResponse creates a response to parse from QueryDeviceGroupList response
+func CreateQueryDeviceGroupListResponse() (response *QueryDeviceGroupListResponse) {
+	response = &QueryDeviceGroupListResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 118 - 0
services/iot/query_device_group_tag_list.go

@@ -0,0 +1,118 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// QueryDeviceGroupTagList invokes the iot.QueryDeviceGroupTagList API synchronously
+// api document: https://help.aliyun.com/api/iot/querydevicegrouptaglist.html
+func (client *Client) QueryDeviceGroupTagList(request *QueryDeviceGroupTagListRequest) (response *QueryDeviceGroupTagListResponse, err error) {
+	response = CreateQueryDeviceGroupTagListResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// QueryDeviceGroupTagListWithChan invokes the iot.QueryDeviceGroupTagList API asynchronously
+// api document: https://help.aliyun.com/api/iot/querydevicegrouptaglist.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryDeviceGroupTagListWithChan(request *QueryDeviceGroupTagListRequest) (<-chan *QueryDeviceGroupTagListResponse, <-chan error) {
+	responseChan := make(chan *QueryDeviceGroupTagListResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.QueryDeviceGroupTagList(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// QueryDeviceGroupTagListWithCallback invokes the iot.QueryDeviceGroupTagList API asynchronously
+// api document: https://help.aliyun.com/api/iot/querydevicegrouptaglist.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryDeviceGroupTagListWithCallback(request *QueryDeviceGroupTagListRequest, callback func(response *QueryDeviceGroupTagListResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *QueryDeviceGroupTagListResponse
+		var err error
+		defer close(result)
+		response, err = client.QueryDeviceGroupTagList(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// QueryDeviceGroupTagListRequest is the request struct for api QueryDeviceGroupTagList
+type QueryDeviceGroupTagListRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string `position:"Query" name:"IotInstanceId"`
+	GroupId       string `position:"Query" name:"GroupId"`
+}
+
+// QueryDeviceGroupTagListResponse is the response struct for api QueryDeviceGroupTagList
+type QueryDeviceGroupTagListResponse struct {
+	*responses.BaseResponse
+	RequestId    string                       `json:"RequestId" xml:"RequestId"`
+	Success      bool                         `json:"Success" xml:"Success"`
+	Code         string                       `json:"Code" xml:"Code"`
+	ErrorMessage string                       `json:"ErrorMessage" xml:"ErrorMessage"`
+	Data         QueryDeviceGroupTagListData0 `json:"Data" xml:"Data"`
+}
+
+type QueryDeviceGroupTagListData0 struct {
+	GroupTagInfo []QueryDeviceGroupTagListGroupTagInfo1 `json:"GroupTagInfo" xml:"GroupTagInfo"`
+}
+
+type QueryDeviceGroupTagListGroupTagInfo1 struct {
+	TagKey   string `json:"TagKey" xml:"TagKey"`
+	TagValue string `json:"TagValue" xml:"TagValue"`
+}
+
+// CreateQueryDeviceGroupTagListRequest creates a request to invoke QueryDeviceGroupTagList API
+func CreateQueryDeviceGroupTagListRequest() (request *QueryDeviceGroupTagListRequest) {
+	request = &QueryDeviceGroupTagListRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "QueryDeviceGroupTagList", "iot", "openAPI")
+	return
+}
+
+// CreateQueryDeviceGroupTagListResponse creates a response to parse from QueryDeviceGroupTagList response
+func CreateQueryDeviceGroupTagListResponse() (response *QueryDeviceGroupTagListResponse) {
+	response = &QueryDeviceGroupTagListResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 126 - 0
services/iot/query_device_list_by_device_group.go

@@ -0,0 +1,126 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// QueryDeviceListByDeviceGroup invokes the iot.QueryDeviceListByDeviceGroup API synchronously
+// api document: https://help.aliyun.com/api/iot/querydevicelistbydevicegroup.html
+func (client *Client) QueryDeviceListByDeviceGroup(request *QueryDeviceListByDeviceGroupRequest) (response *QueryDeviceListByDeviceGroupResponse, err error) {
+	response = CreateQueryDeviceListByDeviceGroupResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// QueryDeviceListByDeviceGroupWithChan invokes the iot.QueryDeviceListByDeviceGroup API asynchronously
+// api document: https://help.aliyun.com/api/iot/querydevicelistbydevicegroup.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryDeviceListByDeviceGroupWithChan(request *QueryDeviceListByDeviceGroupRequest) (<-chan *QueryDeviceListByDeviceGroupResponse, <-chan error) {
+	responseChan := make(chan *QueryDeviceListByDeviceGroupResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.QueryDeviceListByDeviceGroup(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// QueryDeviceListByDeviceGroupWithCallback invokes the iot.QueryDeviceListByDeviceGroup API asynchronously
+// api document: https://help.aliyun.com/api/iot/querydevicelistbydevicegroup.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryDeviceListByDeviceGroupWithCallback(request *QueryDeviceListByDeviceGroupRequest, callback func(response *QueryDeviceListByDeviceGroupResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *QueryDeviceListByDeviceGroupResponse
+		var err error
+		defer close(result)
+		response, err = client.QueryDeviceListByDeviceGroup(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// QueryDeviceListByDeviceGroupRequest is the request struct for api QueryDeviceListByDeviceGroup
+type QueryDeviceListByDeviceGroupRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string           `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string           `position:"Query" name:"IotInstanceId"`
+	CurrentPage   requests.Integer `position:"Query" name:"CurrentPage"`
+	PageSize      requests.Integer `position:"Query" name:"PageSize"`
+	GroupId       string           `position:"Query" name:"GroupId"`
+}
+
+// QueryDeviceListByDeviceGroupResponse is the response struct for api QueryDeviceListByDeviceGroup
+type QueryDeviceListByDeviceGroupResponse struct {
+	*responses.BaseResponse
+	RequestId    string                            `json:"RequestId" xml:"RequestId"`
+	Success      bool                              `json:"Success" xml:"Success"`
+	Code         string                            `json:"Code" xml:"Code"`
+	ErrorMessage string                            `json:"ErrorMessage" xml:"ErrorMessage"`
+	Page         int                               `json:"Page" xml:"Page"`
+	PageSize     int                               `json:"PageSize" xml:"PageSize"`
+	PageCount    int                               `json:"PageCount" xml:"PageCount"`
+	Total        int                               `json:"Total" xml:"Total"`
+	Data         QueryDeviceListByDeviceGroupData0 `json:"Data" xml:"Data"`
+}
+
+type QueryDeviceListByDeviceGroupData0 struct {
+	SimpleDeviceInfo []QueryDeviceListByDeviceGroupSimpleDeviceInfo1 `json:"SimpleDeviceInfo" xml:"SimpleDeviceInfo"`
+}
+
+type QueryDeviceListByDeviceGroupSimpleDeviceInfo1 struct {
+	ProductName string `json:"ProductName" xml:"ProductName"`
+	ProductKey  string `json:"ProductKey" xml:"ProductKey"`
+	DeviceName  string `json:"DeviceName" xml:"DeviceName"`
+	IotId       string `json:"IotId" xml:"IotId"`
+}
+
+// CreateQueryDeviceListByDeviceGroupRequest creates a request to invoke QueryDeviceListByDeviceGroup API
+func CreateQueryDeviceListByDeviceGroupRequest() (request *QueryDeviceListByDeviceGroupRequest) {
+	request = &QueryDeviceListByDeviceGroupRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "QueryDeviceListByDeviceGroup", "iot", "openAPI")
+	return
+}
+
+// CreateQueryDeviceListByDeviceGroupResponse creates a response to parse from QueryDeviceListByDeviceGroup response
+func CreateQueryDeviceListByDeviceGroupResponse() (response *QueryDeviceListByDeviceGroupResponse) {
+	response = &QueryDeviceListByDeviceGroupResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 111 - 0
services/iot/query_device_prop.go

@@ -0,0 +1,111 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// QueryDeviceProp invokes the iot.QueryDeviceProp API synchronously
+// api document: https://help.aliyun.com/api/iot/querydeviceprop.html
+func (client *Client) QueryDeviceProp(request *QueryDevicePropRequest) (response *QueryDevicePropResponse, err error) {
+	response = CreateQueryDevicePropResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// QueryDevicePropWithChan invokes the iot.QueryDeviceProp API asynchronously
+// api document: https://help.aliyun.com/api/iot/querydeviceprop.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryDevicePropWithChan(request *QueryDevicePropRequest) (<-chan *QueryDevicePropResponse, <-chan error) {
+	responseChan := make(chan *QueryDevicePropResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.QueryDeviceProp(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// QueryDevicePropWithCallback invokes the iot.QueryDeviceProp API asynchronously
+// api document: https://help.aliyun.com/api/iot/querydeviceprop.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryDevicePropWithCallback(request *QueryDevicePropRequest, callback func(response *QueryDevicePropResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *QueryDevicePropResponse
+		var err error
+		defer close(result)
+		response, err = client.QueryDeviceProp(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// QueryDevicePropRequest is the request struct for api QueryDeviceProp
+type QueryDevicePropRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string `position:"Query" name:"IotInstanceId"`
+	IotId         string `position:"Query" name:"IotId"`
+	DeviceName    string `position:"Query" name:"DeviceName"`
+	ProductKey    string `position:"Query" name:"ProductKey"`
+}
+
+// QueryDevicePropResponse is the response struct for api QueryDeviceProp
+type QueryDevicePropResponse struct {
+	*responses.BaseResponse
+	RequestId    string `json:"RequestId" xml:"RequestId"`
+	Success      bool   `json:"Success" xml:"Success"`
+	Code         string `json:"Code" xml:"Code"`
+	ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"`
+	Props        string `json:"Props" xml:"Props"`
+}
+
+// CreateQueryDevicePropRequest creates a request to invoke QueryDeviceProp API
+func CreateQueryDevicePropRequest() (request *QueryDevicePropRequest) {
+	request = &QueryDevicePropRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "QueryDeviceProp", "iot", "openAPI")
+	return
+}
+
+// CreateQueryDevicePropResponse creates a response to parse from QueryDeviceProp response
+func CreateQueryDevicePropResponse() (response *QueryDevicePropResponse) {
+	response = &QueryDevicePropResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 136 - 0
services/iot/query_device_properties_data.go

@@ -0,0 +1,136 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// QueryDevicePropertiesData invokes the iot.QueryDevicePropertiesData API synchronously
+// api document: https://help.aliyun.com/api/iot/querydevicepropertiesdata.html
+func (client *Client) QueryDevicePropertiesData(request *QueryDevicePropertiesDataRequest) (response *QueryDevicePropertiesDataResponse, err error) {
+	response = CreateQueryDevicePropertiesDataResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// QueryDevicePropertiesDataWithChan invokes the iot.QueryDevicePropertiesData API asynchronously
+// api document: https://help.aliyun.com/api/iot/querydevicepropertiesdata.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryDevicePropertiesDataWithChan(request *QueryDevicePropertiesDataRequest) (<-chan *QueryDevicePropertiesDataResponse, <-chan error) {
+	responseChan := make(chan *QueryDevicePropertiesDataResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.QueryDevicePropertiesData(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// QueryDevicePropertiesDataWithCallback invokes the iot.QueryDevicePropertiesData API asynchronously
+// api document: https://help.aliyun.com/api/iot/querydevicepropertiesdata.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryDevicePropertiesDataWithCallback(request *QueryDevicePropertiesDataRequest, callback func(response *QueryDevicePropertiesDataResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *QueryDevicePropertiesDataResponse
+		var err error
+		defer close(result)
+		response, err = client.QueryDevicePropertiesData(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// QueryDevicePropertiesDataRequest is the request struct for api QueryDevicePropertiesData
+type QueryDevicePropertiesDataRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string           `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string           `position:"Query" name:"IotInstanceId"`
+	IotId         string           `position:"Query" name:"IotId"`
+	ProductKey    string           `position:"Query" name:"ProductKey"`
+	DeviceName    string           `position:"Query" name:"DeviceName"`
+	Identifier    []string         `position:"Query" name:"Identifier" type:"Repeated"`
+	StartTime     requests.Integer `position:"Query" name:"StartTime"`
+	EndTime       requests.Integer `position:"Query" name:"EndTime"`
+	Asc           requests.Integer `position:"Query" name:"Asc"`
+	PageSize      requests.Integer `position:"Query" name:"PageSize"`
+}
+
+// QueryDevicePropertiesDataResponse is the response struct for api QueryDevicePropertiesData
+type QueryDevicePropertiesDataResponse struct {
+	*responses.BaseResponse
+	RequestId         string                                      `json:"RequestId" xml:"RequestId"`
+	Success           bool                                        `json:"Success" xml:"Success"`
+	Code              string                                      `json:"Code" xml:"Code"`
+	ErrorMessage      string                                      `json:"ErrorMessage" xml:"ErrorMessage"`
+	NextValid         bool                                        `json:"NextValid" xml:"NextValid"`
+	NextTime          int64                                       `json:"NextTime" xml:"NextTime"`
+	PropertyDataInfos QueryDevicePropertiesDataPropertyDataInfos0 `json:"PropertyDataInfos" xml:"PropertyDataInfos"`
+}
+
+type QueryDevicePropertiesDataPropertyDataInfos0 struct {
+	PropertyDataInfo []QueryDevicePropertiesDataPropertyDataInfo1 `json:"PropertyDataInfo" xml:"PropertyDataInfo"`
+}
+
+type QueryDevicePropertiesDataPropertyDataInfo1 struct {
+	Identifier string                         `json:"Identifier" xml:"Identifier"`
+	List       QueryDevicePropertiesDataList1 `json:"List" xml:"List"`
+}
+
+type QueryDevicePropertiesDataList1 struct {
+	PropertyInfo []QueryDevicePropertiesDataPropertyInfo2 `json:"PropertyInfo" xml:"PropertyInfo"`
+}
+
+type QueryDevicePropertiesDataPropertyInfo2 struct {
+	Time  int64  `json:"Time" xml:"Time"`
+	Value string `json:"Value" xml:"Value"`
+}
+
+// CreateQueryDevicePropertiesDataRequest creates a request to invoke QueryDevicePropertiesData API
+func CreateQueryDevicePropertiesDataRequest() (request *QueryDevicePropertiesDataRequest) {
+	request = &QueryDevicePropertiesDataRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "QueryDevicePropertiesData", "iot", "openAPI")
+	return
+}
+
+// CreateQueryDevicePropertiesDataResponse creates a response to parse from QueryDevicePropertiesData response
+func CreateQueryDevicePropertiesDataResponse() (response *QueryDevicePropertiesDataResponse) {
+	response = &QueryDevicePropertiesDataResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 131 - 0
services/iot/query_device_property_data.go

@@ -0,0 +1,131 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// QueryDevicePropertyData invokes the iot.QueryDevicePropertyData API synchronously
+// api document: https://help.aliyun.com/api/iot/querydevicepropertydata.html
+func (client *Client) QueryDevicePropertyData(request *QueryDevicePropertyDataRequest) (response *QueryDevicePropertyDataResponse, err error) {
+	response = CreateQueryDevicePropertyDataResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// QueryDevicePropertyDataWithChan invokes the iot.QueryDevicePropertyData API asynchronously
+// api document: https://help.aliyun.com/api/iot/querydevicepropertydata.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryDevicePropertyDataWithChan(request *QueryDevicePropertyDataRequest) (<-chan *QueryDevicePropertyDataResponse, <-chan error) {
+	responseChan := make(chan *QueryDevicePropertyDataResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.QueryDevicePropertyData(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// QueryDevicePropertyDataWithCallback invokes the iot.QueryDevicePropertyData API asynchronously
+// api document: https://help.aliyun.com/api/iot/querydevicepropertydata.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryDevicePropertyDataWithCallback(request *QueryDevicePropertyDataRequest, callback func(response *QueryDevicePropertyDataResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *QueryDevicePropertyDataResponse
+		var err error
+		defer close(result)
+		response, err = client.QueryDevicePropertyData(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// QueryDevicePropertyDataRequest is the request struct for api QueryDevicePropertyData
+type QueryDevicePropertyDataRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string           `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string           `position:"Query" name:"IotInstanceId"`
+	IotId         string           `position:"Query" name:"IotId"`
+	ProductKey    string           `position:"Query" name:"ProductKey"`
+	DeviceName    string           `position:"Query" name:"DeviceName"`
+	Identifier    string           `position:"Query" name:"Identifier"`
+	StartTime     requests.Integer `position:"Query" name:"StartTime"`
+	EndTime       requests.Integer `position:"Query" name:"EndTime"`
+	Asc           requests.Integer `position:"Query" name:"Asc"`
+	PageSize      requests.Integer `position:"Query" name:"PageSize"`
+}
+
+// QueryDevicePropertyDataResponse is the response struct for api QueryDevicePropertyData
+type QueryDevicePropertyDataResponse struct {
+	*responses.BaseResponse
+	RequestId    string                       `json:"RequestId" xml:"RequestId"`
+	Success      bool                         `json:"Success" xml:"Success"`
+	Code         string                       `json:"Code" xml:"Code"`
+	ErrorMessage string                       `json:"ErrorMessage" xml:"ErrorMessage"`
+	Data         QueryDevicePropertyDataData0 `json:"Data" xml:"Data"`
+}
+
+type QueryDevicePropertyDataData0 struct {
+	NextValid bool                         `json:"NextValid" xml:"NextValid"`
+	NextTime  int64                        `json:"NextTime" xml:"NextTime"`
+	List      QueryDevicePropertyDataList1 `json:"List" xml:"List"`
+}
+
+type QueryDevicePropertyDataList1 struct {
+	PropertyInfo []QueryDevicePropertyDataPropertyInfo2 `json:"PropertyInfo" xml:"PropertyInfo"`
+}
+
+type QueryDevicePropertyDataPropertyInfo2 struct {
+	Time  string `json:"Time" xml:"Time"`
+	Value string `json:"Value" xml:"Value"`
+}
+
+// CreateQueryDevicePropertyDataRequest creates a request to invoke QueryDevicePropertyData API
+func CreateQueryDevicePropertyDataRequest() (request *QueryDevicePropertyDataRequest) {
+	request = &QueryDevicePropertyDataRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "QueryDevicePropertyData", "iot", "openAPI")
+	return
+}
+
+// CreateQueryDevicePropertyDataResponse creates a response to parse from QueryDevicePropertyData response
+func CreateQueryDevicePropertyDataResponse() (response *QueryDevicePropertyDataResponse) {
+	response = &QueryDevicePropertyDataResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 128 - 0
services/iot/query_device_property_status.go

@@ -0,0 +1,128 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// QueryDevicePropertyStatus invokes the iot.QueryDevicePropertyStatus API synchronously
+// api document: https://help.aliyun.com/api/iot/querydevicepropertystatus.html
+func (client *Client) QueryDevicePropertyStatus(request *QueryDevicePropertyStatusRequest) (response *QueryDevicePropertyStatusResponse, err error) {
+	response = CreateQueryDevicePropertyStatusResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// QueryDevicePropertyStatusWithChan invokes the iot.QueryDevicePropertyStatus API asynchronously
+// api document: https://help.aliyun.com/api/iot/querydevicepropertystatus.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryDevicePropertyStatusWithChan(request *QueryDevicePropertyStatusRequest) (<-chan *QueryDevicePropertyStatusResponse, <-chan error) {
+	responseChan := make(chan *QueryDevicePropertyStatusResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.QueryDevicePropertyStatus(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// QueryDevicePropertyStatusWithCallback invokes the iot.QueryDevicePropertyStatus API asynchronously
+// api document: https://help.aliyun.com/api/iot/querydevicepropertystatus.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryDevicePropertyStatusWithCallback(request *QueryDevicePropertyStatusRequest, callback func(response *QueryDevicePropertyStatusResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *QueryDevicePropertyStatusResponse
+		var err error
+		defer close(result)
+		response, err = client.QueryDevicePropertyStatus(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// QueryDevicePropertyStatusRequest is the request struct for api QueryDevicePropertyStatus
+type QueryDevicePropertyStatusRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string `position:"Query" name:"IotInstanceId"`
+	IotId         string `position:"Query" name:"IotId"`
+	ProductKey    string `position:"Query" name:"ProductKey"`
+	DeviceName    string `position:"Query" name:"DeviceName"`
+}
+
+// QueryDevicePropertyStatusResponse is the response struct for api QueryDevicePropertyStatus
+type QueryDevicePropertyStatusResponse struct {
+	*responses.BaseResponse
+	RequestId    string                         `json:"RequestId" xml:"RequestId"`
+	Success      bool                           `json:"Success" xml:"Success"`
+	Code         string                         `json:"Code" xml:"Code"`
+	ErrorMessage string                         `json:"ErrorMessage" xml:"ErrorMessage"`
+	Data         QueryDevicePropertyStatusData0 `json:"Data" xml:"Data"`
+}
+
+type QueryDevicePropertyStatusData0 struct {
+	List QueryDevicePropertyStatusList1 `json:"List" xml:"List"`
+}
+
+type QueryDevicePropertyStatusList1 struct {
+	PropertyStatusInfo []QueryDevicePropertyStatusPropertyStatusInfo2 `json:"PropertyStatusInfo" xml:"PropertyStatusInfo"`
+}
+
+type QueryDevicePropertyStatusPropertyStatusInfo2 struct {
+	Unit       string `json:"Unit" xml:"Unit"`
+	Identifier string `json:"Identifier" xml:"Identifier"`
+	DataType   string `json:"DataType" xml:"DataType"`
+	Time       string `json:"Time" xml:"Time"`
+	Value      string `json:"Value" xml:"Value"`
+	Name       string `json:"Name" xml:"Name"`
+}
+
+// CreateQueryDevicePropertyStatusRequest creates a request to invoke QueryDevicePropertyStatus API
+func CreateQueryDevicePropertyStatusRequest() (request *QueryDevicePropertyStatusRequest) {
+	request = &QueryDevicePropertyStatusRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "QueryDevicePropertyStatus", "iot", "openAPI")
+	return
+}
+
+// CreateQueryDevicePropertyStatusResponse creates a response to parse from QueryDevicePropertyStatus response
+func CreateQueryDevicePropertyStatusResponse() (response *QueryDevicePropertyStatusResponse) {
+	response = &QueryDevicePropertyStatusResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 134 - 0
services/iot/query_device_service_data.go

@@ -0,0 +1,134 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// QueryDeviceServiceData invokes the iot.QueryDeviceServiceData API synchronously
+// api document: https://help.aliyun.com/api/iot/querydeviceservicedata.html
+func (client *Client) QueryDeviceServiceData(request *QueryDeviceServiceDataRequest) (response *QueryDeviceServiceDataResponse, err error) {
+	response = CreateQueryDeviceServiceDataResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// QueryDeviceServiceDataWithChan invokes the iot.QueryDeviceServiceData API asynchronously
+// api document: https://help.aliyun.com/api/iot/querydeviceservicedata.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryDeviceServiceDataWithChan(request *QueryDeviceServiceDataRequest) (<-chan *QueryDeviceServiceDataResponse, <-chan error) {
+	responseChan := make(chan *QueryDeviceServiceDataResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.QueryDeviceServiceData(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// QueryDeviceServiceDataWithCallback invokes the iot.QueryDeviceServiceData API asynchronously
+// api document: https://help.aliyun.com/api/iot/querydeviceservicedata.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryDeviceServiceDataWithCallback(request *QueryDeviceServiceDataRequest, callback func(response *QueryDeviceServiceDataResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *QueryDeviceServiceDataResponse
+		var err error
+		defer close(result)
+		response, err = client.QueryDeviceServiceData(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// QueryDeviceServiceDataRequest is the request struct for api QueryDeviceServiceData
+type QueryDeviceServiceDataRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string           `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string           `position:"Query" name:"IotInstanceId"`
+	IotId         string           `position:"Query" name:"IotId"`
+	ProductKey    string           `position:"Query" name:"ProductKey"`
+	DeviceName    string           `position:"Query" name:"DeviceName"`
+	Identifier    string           `position:"Query" name:"Identifier"`
+	StartTime     requests.Integer `position:"Query" name:"StartTime"`
+	EndTime       requests.Integer `position:"Query" name:"EndTime"`
+	Asc           requests.Integer `position:"Query" name:"Asc"`
+	PageSize      requests.Integer `position:"Query" name:"PageSize"`
+}
+
+// QueryDeviceServiceDataResponse is the response struct for api QueryDeviceServiceData
+type QueryDeviceServiceDataResponse struct {
+	*responses.BaseResponse
+	RequestId    string                      `json:"RequestId" xml:"RequestId"`
+	Success      bool                        `json:"Success" xml:"Success"`
+	Code         string                      `json:"Code" xml:"Code"`
+	ErrorMessage string                      `json:"ErrorMessage" xml:"ErrorMessage"`
+	Data         QueryDeviceServiceDataData0 `json:"Data" xml:"Data"`
+}
+
+type QueryDeviceServiceDataData0 struct {
+	NextTime  int64                       `json:"NextTime" xml:"NextTime"`
+	NextValid bool                        `json:"NextValid" xml:"NextValid"`
+	List      QueryDeviceServiceDataList1 `json:"List" xml:"List"`
+}
+
+type QueryDeviceServiceDataList1 struct {
+	ServiceInfo []QueryDeviceServiceDataServiceInfo2 `json:"ServiceInfo" xml:"ServiceInfo"`
+}
+
+type QueryDeviceServiceDataServiceInfo2 struct {
+	Time       string `json:"Time" xml:"Time"`
+	Identifier string `json:"Identifier" xml:"Identifier"`
+	Name       string `json:"Name" xml:"Name"`
+	InputData  string `json:"InputData" xml:"InputData"`
+	OutputData string `json:"OutputData" xml:"OutputData"`
+}
+
+// CreateQueryDeviceServiceDataRequest creates a request to invoke QueryDeviceServiceData API
+func CreateQueryDeviceServiceDataRequest() (request *QueryDeviceServiceDataRequest) {
+	request = &QueryDeviceServiceDataRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "QueryDeviceServiceData", "iot", "openAPI")
+	return
+}
+
+// CreateQueryDeviceServiceDataResponse creates a response to parse from QueryDeviceServiceData response
+func CreateQueryDeviceServiceDataResponse() (response *QueryDeviceServiceDataResponse) {
+	response = &QueryDeviceServiceDataResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 115 - 0
services/iot/query_device_statistics.go

@@ -0,0 +1,115 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// QueryDeviceStatistics invokes the iot.QueryDeviceStatistics API synchronously
+// api document: https://help.aliyun.com/api/iot/querydevicestatistics.html
+func (client *Client) QueryDeviceStatistics(request *QueryDeviceStatisticsRequest) (response *QueryDeviceStatisticsResponse, err error) {
+	response = CreateQueryDeviceStatisticsResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// QueryDeviceStatisticsWithChan invokes the iot.QueryDeviceStatistics API asynchronously
+// api document: https://help.aliyun.com/api/iot/querydevicestatistics.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryDeviceStatisticsWithChan(request *QueryDeviceStatisticsRequest) (<-chan *QueryDeviceStatisticsResponse, <-chan error) {
+	responseChan := make(chan *QueryDeviceStatisticsResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.QueryDeviceStatistics(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// QueryDeviceStatisticsWithCallback invokes the iot.QueryDeviceStatistics API asynchronously
+// api document: https://help.aliyun.com/api/iot/querydevicestatistics.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryDeviceStatisticsWithCallback(request *QueryDeviceStatisticsRequest, callback func(response *QueryDeviceStatisticsResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *QueryDeviceStatisticsResponse
+		var err error
+		defer close(result)
+		response, err = client.QueryDeviceStatistics(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// QueryDeviceStatisticsRequest is the request struct for api QueryDeviceStatistics
+type QueryDeviceStatisticsRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string `position:"Query" name:"IotInstanceId"`
+	ProductKey    string `position:"Query" name:"ProductKey"`
+}
+
+// QueryDeviceStatisticsResponse is the response struct for api QueryDeviceStatistics
+type QueryDeviceStatisticsResponse struct {
+	*responses.BaseResponse
+	RequestId    string                     `json:"RequestId" xml:"RequestId"`
+	Success      bool                       `json:"Success" xml:"Success"`
+	Code         string                     `json:"Code" xml:"Code"`
+	ErrorMessage string                     `json:"ErrorMessage" xml:"ErrorMessage"`
+	Data         QueryDeviceStatisticsData0 `json:"Data" xml:"Data"`
+}
+
+type QueryDeviceStatisticsData0 struct {
+	DeviceCount int64 `json:"DeviceCount" xml:"DeviceCount"`
+	OnlineCount int64 `json:"OnlineCount" xml:"OnlineCount"`
+	ActiveCount int64 `json:"ActiveCount" xml:"ActiveCount"`
+}
+
+// CreateQueryDeviceStatisticsRequest creates a request to invoke QueryDeviceStatistics API
+func CreateQueryDeviceStatisticsRequest() (request *QueryDeviceStatisticsRequest) {
+	request = &QueryDeviceStatisticsRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "QueryDeviceStatistics", "iot", "openAPI")
+	return
+}
+
+// CreateQueryDeviceStatisticsResponse creates a response to parse from QueryDeviceStatistics response
+func CreateQueryDeviceStatisticsResponse() (response *QueryDeviceStatisticsResponse) {
+	response = &QueryDeviceStatisticsResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 122 - 0
services/iot/query_lo_ra_join_permissions.go

@@ -0,0 +1,122 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// QueryLoRaJoinPermissions invokes the iot.QueryLoRaJoinPermissions API synchronously
+// api document: https://help.aliyun.com/api/iot/querylorajoinpermissions.html
+func (client *Client) QueryLoRaJoinPermissions(request *QueryLoRaJoinPermissionsRequest) (response *QueryLoRaJoinPermissionsResponse, err error) {
+	response = CreateQueryLoRaJoinPermissionsResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// QueryLoRaJoinPermissionsWithChan invokes the iot.QueryLoRaJoinPermissions API asynchronously
+// api document: https://help.aliyun.com/api/iot/querylorajoinpermissions.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryLoRaJoinPermissionsWithChan(request *QueryLoRaJoinPermissionsRequest) (<-chan *QueryLoRaJoinPermissionsResponse, <-chan error) {
+	responseChan := make(chan *QueryLoRaJoinPermissionsResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.QueryLoRaJoinPermissions(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// QueryLoRaJoinPermissionsWithCallback invokes the iot.QueryLoRaJoinPermissions API asynchronously
+// api document: https://help.aliyun.com/api/iot/querylorajoinpermissions.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryLoRaJoinPermissionsWithCallback(request *QueryLoRaJoinPermissionsRequest, callback func(response *QueryLoRaJoinPermissionsResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *QueryLoRaJoinPermissionsResponse
+		var err error
+		defer close(result)
+		response, err = client.QueryLoRaJoinPermissions(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// QueryLoRaJoinPermissionsRequest is the request struct for api QueryLoRaJoinPermissions
+type QueryLoRaJoinPermissionsRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string `position:"Query" name:"IotInstanceId"`
+}
+
+// QueryLoRaJoinPermissionsResponse is the response struct for api QueryLoRaJoinPermissions
+type QueryLoRaJoinPermissionsResponse struct {
+	*responses.BaseResponse
+	RequestId       string                                   `json:"RequestId" xml:"RequestId"`
+	Success         bool                                     `json:"Success" xml:"Success"`
+	Code            string                                   `json:"Code" xml:"Code"`
+	ErrorMessage    string                                   `json:"ErrorMessage" xml:"ErrorMessage"`
+	ProductKey      string                                   `json:"ProductKey" xml:"ProductKey"`
+	JoinPermissions QueryLoRaJoinPermissionsJoinPermissions0 `json:"JoinPermissions" xml:"JoinPermissions"`
+}
+
+type QueryLoRaJoinPermissionsJoinPermissions0 struct {
+	JoinPermission []QueryLoRaJoinPermissionsJoinPermission1 `json:"JoinPermission" xml:"JoinPermission"`
+}
+
+type QueryLoRaJoinPermissionsJoinPermission1 struct {
+	JoinPermissionId   string `json:"JoinPermissionId" xml:"JoinPermissionId"`
+	JoinPermissionName string `json:"JoinPermissionName" xml:"JoinPermissionName"`
+	JoinPermissionType string `json:"JoinPermissionType" xml:"JoinPermissionType"`
+	OwnerAliyunPk      string `json:"OwnerAliyunPk" xml:"OwnerAliyunPk"`
+	Enabled            bool   `json:"Enabled" xml:"Enabled"`
+	ClassMode          string `json:"ClassMode" xml:"ClassMode"`
+}
+
+// CreateQueryLoRaJoinPermissionsRequest creates a request to invoke QueryLoRaJoinPermissions API
+func CreateQueryLoRaJoinPermissionsRequest() (request *QueryLoRaJoinPermissionsRequest) {
+	request = &QueryLoRaJoinPermissionsRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "QueryLoRaJoinPermissions", "iot", "openAPI")
+	return
+}
+
+// CreateQueryLoRaJoinPermissionsResponse creates a response to parse from QueryLoRaJoinPermissions response
+func CreateQueryLoRaJoinPermissionsResponse() (response *QueryLoRaJoinPermissionsResponse) {
+	response = &QueryLoRaJoinPermissionsResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 126 - 0
services/iot/query_page_by_apply_id.go

@@ -0,0 +1,126 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// QueryPageByApplyId invokes the iot.QueryPageByApplyId API synchronously
+// api document: https://help.aliyun.com/api/iot/querypagebyapplyid.html
+func (client *Client) QueryPageByApplyId(request *QueryPageByApplyIdRequest) (response *QueryPageByApplyIdResponse, err error) {
+	response = CreateQueryPageByApplyIdResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// QueryPageByApplyIdWithChan invokes the iot.QueryPageByApplyId API asynchronously
+// api document: https://help.aliyun.com/api/iot/querypagebyapplyid.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryPageByApplyIdWithChan(request *QueryPageByApplyIdRequest) (<-chan *QueryPageByApplyIdResponse, <-chan error) {
+	responseChan := make(chan *QueryPageByApplyIdResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.QueryPageByApplyId(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// QueryPageByApplyIdWithCallback invokes the iot.QueryPageByApplyId API asynchronously
+// api document: https://help.aliyun.com/api/iot/querypagebyapplyid.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryPageByApplyIdWithCallback(request *QueryPageByApplyIdRequest, callback func(response *QueryPageByApplyIdResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *QueryPageByApplyIdResponse
+		var err error
+		defer close(result)
+		response, err = client.QueryPageByApplyId(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// QueryPageByApplyIdRequest is the request struct for api QueryPageByApplyId
+type QueryPageByApplyIdRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string           `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string           `position:"Query" name:"IotInstanceId"`
+	CurrentPage   requests.Integer `position:"Query" name:"CurrentPage"`
+	PageSize      requests.Integer `position:"Query" name:"PageSize"`
+	ApplyId       requests.Integer `position:"Query" name:"ApplyId"`
+}
+
+// QueryPageByApplyIdResponse is the response struct for api QueryPageByApplyId
+type QueryPageByApplyIdResponse struct {
+	*responses.BaseResponse
+	RequestId       string                             `json:"RequestId" xml:"RequestId"`
+	Success         bool                               `json:"Success" xml:"Success"`
+	Code            string                             `json:"Code" xml:"Code"`
+	ErrorMessage    string                             `json:"ErrorMessage" xml:"ErrorMessage"`
+	PageSize        int                                `json:"PageSize" xml:"PageSize"`
+	Page            int                                `json:"Page" xml:"Page"`
+	PageCount       int                                `json:"PageCount" xml:"PageCount"`
+	Total           int                                `json:"Total" xml:"Total"`
+	ApplyDeviceList QueryPageByApplyIdApplyDeviceList0 `json:"ApplyDeviceList" xml:"ApplyDeviceList"`
+}
+
+type QueryPageByApplyIdApplyDeviceList0 struct {
+	ApplyDeviceInfo []QueryPageByApplyIdApplyDeviceInfo1 `json:"ApplyDeviceInfo" xml:"ApplyDeviceInfo"`
+}
+
+type QueryPageByApplyIdApplyDeviceInfo1 struct {
+	DeviceId     string `json:"DeviceId" xml:"DeviceId"`
+	DeviceName   string `json:"DeviceName" xml:"DeviceName"`
+	DeviceSecret string `json:"DeviceSecret" xml:"DeviceSecret"`
+	IotId        string `json:"IotId" xml:"IotId"`
+}
+
+// CreateQueryPageByApplyIdRequest creates a request to invoke QueryPageByApplyId API
+func CreateQueryPageByApplyIdRequest() (request *QueryPageByApplyIdRequest) {
+	request = &QueryPageByApplyIdRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "QueryPageByApplyId", "iot", "openAPI")
+	return
+}
+
+// CreateQueryPageByApplyIdResponse creates a response to parse from QueryPageByApplyId response
+func CreateQueryPageByApplyIdResponse() (response *QueryPageByApplyIdResponse) {
+	response = &QueryPageByApplyIdResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 128 - 0
services/iot/query_product.go

@@ -0,0 +1,128 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// QueryProduct invokes the iot.QueryProduct API synchronously
+// api document: https://help.aliyun.com/api/iot/queryproduct.html
+func (client *Client) QueryProduct(request *QueryProductRequest) (response *QueryProductResponse, err error) {
+	response = CreateQueryProductResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// QueryProductWithChan invokes the iot.QueryProduct API asynchronously
+// api document: https://help.aliyun.com/api/iot/queryproduct.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryProductWithChan(request *QueryProductRequest) (<-chan *QueryProductResponse, <-chan error) {
+	responseChan := make(chan *QueryProductResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.QueryProduct(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// QueryProductWithCallback invokes the iot.QueryProduct API asynchronously
+// api document: https://help.aliyun.com/api/iot/queryproduct.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryProductWithCallback(request *QueryProductRequest, callback func(response *QueryProductResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *QueryProductResponse
+		var err error
+		defer close(result)
+		response, err = client.QueryProduct(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// QueryProductRequest is the request struct for api QueryProduct
+type QueryProductRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string `position:"Query" name:"IotInstanceId"`
+	ProductKey    string `position:"Query" name:"ProductKey"`
+}
+
+// QueryProductResponse is the response struct for api QueryProduct
+type QueryProductResponse struct {
+	*responses.BaseResponse
+	RequestId    string            `json:"RequestId" xml:"RequestId"`
+	Success      bool              `json:"Success" xml:"Success"`
+	Code         string            `json:"Code" xml:"Code"`
+	ErrorMessage string            `json:"ErrorMessage" xml:"ErrorMessage"`
+	Data         QueryProductData0 `json:"Data" xml:"Data"`
+}
+
+type QueryProductData0 struct {
+	GmtCreate           int64  `json:"GmtCreate" xml:"GmtCreate"`
+	DataFormat          int    `json:"DataFormat" xml:"DataFormat"`
+	Description         string `json:"Description" xml:"Description"`
+	DeviceCount         int    `json:"DeviceCount" xml:"DeviceCount"`
+	NodeType            int    `json:"NodeType" xml:"NodeType"`
+	ProductKey          string `json:"ProductKey" xml:"ProductKey"`
+	ProductName         string `json:"ProductName" xml:"ProductName"`
+	ProductSecret       string `json:"ProductSecret" xml:"ProductSecret"`
+	CategoryName        string `json:"CategoryName" xml:"CategoryName"`
+	CategoryKey         string `json:"CategoryKey" xml:"CategoryKey"`
+	AliyunCommodityCode string `json:"AliyunCommodityCode" xml:"AliyunCommodityCode"`
+	Id2                 bool   `json:"Id2" xml:"Id2"`
+	ProtocolType        string `json:"ProtocolType" xml:"ProtocolType"`
+	ProductStatus       string `json:"ProductStatus" xml:"ProductStatus"`
+	Owner               bool   `json:"Owner" xml:"Owner"`
+	NetType             int    `json:"NetType" xml:"NetType"`
+}
+
+// CreateQueryProductRequest creates a request to invoke QueryProduct API
+func CreateQueryProductRequest() (request *QueryProductRequest) {
+	request = &QueryProductRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "QueryProduct", "iot", "openAPI")
+	return
+}
+
+// CreateQueryProductResponse creates a response to parse from QueryProduct response
+func CreateQueryProductResponse() (response *QueryProductResponse) {
+	response = &QueryProductResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 133 - 0
services/iot/query_product_list.go

@@ -0,0 +1,133 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// QueryProductList invokes the iot.QueryProductList API synchronously
+// api document: https://help.aliyun.com/api/iot/queryproductlist.html
+func (client *Client) QueryProductList(request *QueryProductListRequest) (response *QueryProductListResponse, err error) {
+	response = CreateQueryProductListResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// QueryProductListWithChan invokes the iot.QueryProductList API asynchronously
+// api document: https://help.aliyun.com/api/iot/queryproductlist.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryProductListWithChan(request *QueryProductListRequest) (<-chan *QueryProductListResponse, <-chan error) {
+	responseChan := make(chan *QueryProductListResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.QueryProductList(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// QueryProductListWithCallback invokes the iot.QueryProductList API asynchronously
+// api document: https://help.aliyun.com/api/iot/queryproductlist.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryProductListWithCallback(request *QueryProductListRequest, callback func(response *QueryProductListResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *QueryProductListResponse
+		var err error
+		defer close(result)
+		response, err = client.QueryProductList(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// QueryProductListRequest is the request struct for api QueryProductList
+type QueryProductListRequest struct {
+	*requests.RpcRequest
+	AccessKeyId         string           `position:"Query" name:"AccessKeyId"`
+	IotInstanceId       string           `position:"Query" name:"IotInstanceId"`
+	CurrentPage         requests.Integer `position:"Query" name:"CurrentPage"`
+	PageSize            requests.Integer `position:"Query" name:"PageSize"`
+	AliyunCommodityCode string           `position:"Query" name:"AliyunCommodityCode"`
+}
+
+// QueryProductListResponse is the response struct for api QueryProductList
+type QueryProductListResponse struct {
+	*responses.BaseResponse
+	RequestId    string                `json:"RequestId" xml:"RequestId"`
+	Success      bool                  `json:"Success" xml:"Success"`
+	Code         string                `json:"Code" xml:"Code"`
+	ErrorMessage string                `json:"ErrorMessage" xml:"ErrorMessage"`
+	Data         QueryProductListData0 `json:"Data" xml:"Data"`
+}
+
+type QueryProductListData0 struct {
+	CurrentPage int                   `json:"CurrentPage" xml:"CurrentPage"`
+	PageCount   int                   `json:"PageCount" xml:"PageCount"`
+	PageSize    int                   `json:"PageSize" xml:"PageSize"`
+	Total       int                   `json:"Total" xml:"Total"`
+	List        QueryProductListList1 `json:"List" xml:"List"`
+}
+
+type QueryProductListList1 struct {
+	ProductInfo []QueryProductListProductInfo2 `json:"ProductInfo" xml:"ProductInfo"`
+}
+
+type QueryProductListProductInfo2 struct {
+	GmtCreate   int64  `json:"GmtCreate" xml:"GmtCreate"`
+	DataFormat  int    `json:"DataFormat" xml:"DataFormat"`
+	Description string `json:"Description" xml:"Description"`
+	DeviceCount int    `json:"DeviceCount" xml:"DeviceCount"`
+	NodeType    int    `json:"NodeType" xml:"NodeType"`
+	ProductKey  string `json:"ProductKey" xml:"ProductKey"`
+	ProductName string `json:"ProductName" xml:"ProductName"`
+}
+
+// CreateQueryProductListRequest creates a request to invoke QueryProductList API
+func CreateQueryProductListRequest() (request *QueryProductListRequest) {
+	request = &QueryProductListRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "QueryProductList", "iot", "openAPI")
+	return
+}
+
+// CreateQueryProductListResponse creates a response to parse from QueryProductList response
+func CreateQueryProductListResponse() (response *QueryProductListResponse) {
+	response = &QueryProductListResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 121 - 0
services/iot/query_product_topic.go

@@ -0,0 +1,121 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// QueryProductTopic invokes the iot.QueryProductTopic API synchronously
+// api document: https://help.aliyun.com/api/iot/queryproducttopic.html
+func (client *Client) QueryProductTopic(request *QueryProductTopicRequest) (response *QueryProductTopicResponse, err error) {
+	response = CreateQueryProductTopicResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// QueryProductTopicWithChan invokes the iot.QueryProductTopic API asynchronously
+// api document: https://help.aliyun.com/api/iot/queryproducttopic.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryProductTopicWithChan(request *QueryProductTopicRequest) (<-chan *QueryProductTopicResponse, <-chan error) {
+	responseChan := make(chan *QueryProductTopicResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.QueryProductTopic(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// QueryProductTopicWithCallback invokes the iot.QueryProductTopic API asynchronously
+// api document: https://help.aliyun.com/api/iot/queryproducttopic.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryProductTopicWithCallback(request *QueryProductTopicRequest, callback func(response *QueryProductTopicResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *QueryProductTopicResponse
+		var err error
+		defer close(result)
+		response, err = client.QueryProductTopic(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// QueryProductTopicRequest is the request struct for api QueryProductTopic
+type QueryProductTopicRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string `position:"Query" name:"IotInstanceId"`
+	ProductKey    string `position:"Query" name:"ProductKey"`
+}
+
+// QueryProductTopicResponse is the response struct for api QueryProductTopic
+type QueryProductTopicResponse struct {
+	*responses.BaseResponse
+	RequestId    string                 `json:"RequestId" xml:"RequestId"`
+	Success      bool                   `json:"Success" xml:"Success"`
+	Code         string                 `json:"Code" xml:"Code"`
+	ErrorMessage string                 `json:"ErrorMessage" xml:"ErrorMessage"`
+	Data         QueryProductTopicData0 `json:"Data" xml:"Data"`
+}
+
+type QueryProductTopicData0 struct {
+	ProductTopicInfo []QueryProductTopicProductTopicInfo1 `json:"ProductTopicInfo" xml:"ProductTopicInfo"`
+}
+
+type QueryProductTopicProductTopicInfo1 struct {
+	ProductKey     string `json:"ProductKey" xml:"ProductKey"`
+	TopicShortName string `json:"TopicShortName" xml:"TopicShortName"`
+	Operation      string `json:"Operation" xml:"Operation"`
+	Desc           string `json:"Desc" xml:"Desc"`
+	Id             string `json:"Id" xml:"Id"`
+}
+
+// CreateQueryProductTopicRequest creates a request to invoke QueryProductTopic API
+func CreateQueryProductTopicRequest() (request *QueryProductTopicRequest) {
+	request = &QueryProductTopicRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "QueryProductTopic", "iot", "openAPI")
+	return
+}
+
+// CreateQueryProductTopicResponse creates a response to parse from QueryProductTopic response
+func CreateQueryProductTopicResponse() (response *QueryProductTopicResponse) {
+	response = &QueryProductTopicResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 119 - 0
services/iot/query_super_device_group.go

@@ -0,0 +1,119 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// QuerySuperDeviceGroup invokes the iot.QuerySuperDeviceGroup API synchronously
+// api document: https://help.aliyun.com/api/iot/querysuperdevicegroup.html
+func (client *Client) QuerySuperDeviceGroup(request *QuerySuperDeviceGroupRequest) (response *QuerySuperDeviceGroupResponse, err error) {
+	response = CreateQuerySuperDeviceGroupResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// QuerySuperDeviceGroupWithChan invokes the iot.QuerySuperDeviceGroup API asynchronously
+// api document: https://help.aliyun.com/api/iot/querysuperdevicegroup.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QuerySuperDeviceGroupWithChan(request *QuerySuperDeviceGroupRequest) (<-chan *QuerySuperDeviceGroupResponse, <-chan error) {
+	responseChan := make(chan *QuerySuperDeviceGroupResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.QuerySuperDeviceGroup(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// QuerySuperDeviceGroupWithCallback invokes the iot.QuerySuperDeviceGroup API asynchronously
+// api document: https://help.aliyun.com/api/iot/querysuperdevicegroup.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QuerySuperDeviceGroupWithCallback(request *QuerySuperDeviceGroupRequest, callback func(response *QuerySuperDeviceGroupResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *QuerySuperDeviceGroupResponse
+		var err error
+		defer close(result)
+		response, err = client.QuerySuperDeviceGroup(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// QuerySuperDeviceGroupRequest is the request struct for api QuerySuperDeviceGroup
+type QuerySuperDeviceGroupRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string `position:"Query" name:"IotInstanceId"`
+	GroupId       string `position:"Query" name:"GroupId"`
+}
+
+// QuerySuperDeviceGroupResponse is the response struct for api QuerySuperDeviceGroup
+type QuerySuperDeviceGroupResponse struct {
+	*responses.BaseResponse
+	RequestId    string                     `json:"RequestId" xml:"RequestId"`
+	Success      bool                       `json:"Success" xml:"Success"`
+	Code         string                     `json:"Code" xml:"Code"`
+	ErrorMessage string                     `json:"ErrorMessage" xml:"ErrorMessage"`
+	Data         QuerySuperDeviceGroupData0 `json:"Data" xml:"Data"`
+}
+
+type QuerySuperDeviceGroupData0 struct {
+	GroupInfo []QuerySuperDeviceGroupGroupInfo1 `json:"GroupInfo" xml:"GroupInfo"`
+}
+
+type QuerySuperDeviceGroupGroupInfo1 struct {
+	GroupId   string `json:"GroupId" xml:"GroupId"`
+	GroupName string `json:"GroupName" xml:"GroupName"`
+	GroupDesc string `json:"GroupDesc" xml:"GroupDesc"`
+}
+
+// CreateQuerySuperDeviceGroupRequest creates a request to invoke QuerySuperDeviceGroup API
+func CreateQuerySuperDeviceGroupRequest() (request *QuerySuperDeviceGroupRequest) {
+	request = &QuerySuperDeviceGroupRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "QuerySuperDeviceGroup", "iot", "openAPI")
+	return
+}
+
+// CreateQuerySuperDeviceGroupResponse creates a response to parse from QuerySuperDeviceGroup response
+func CreateQuerySuperDeviceGroupResponse() (response *QuerySuperDeviceGroupResponse) {
+	response = &QuerySuperDeviceGroupResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 110 - 0
services/iot/query_topic_reverse_route_table.go

@@ -0,0 +1,110 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// QueryTopicReverseRouteTable invokes the iot.QueryTopicReverseRouteTable API synchronously
+// api document: https://help.aliyun.com/api/iot/querytopicreverseroutetable.html
+func (client *Client) QueryTopicReverseRouteTable(request *QueryTopicReverseRouteTableRequest) (response *QueryTopicReverseRouteTableResponse, err error) {
+	response = CreateQueryTopicReverseRouteTableResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// QueryTopicReverseRouteTableWithChan invokes the iot.QueryTopicReverseRouteTable API asynchronously
+// api document: https://help.aliyun.com/api/iot/querytopicreverseroutetable.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryTopicReverseRouteTableWithChan(request *QueryTopicReverseRouteTableRequest) (<-chan *QueryTopicReverseRouteTableResponse, <-chan error) {
+	responseChan := make(chan *QueryTopicReverseRouteTableResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.QueryTopicReverseRouteTable(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// QueryTopicReverseRouteTableWithCallback invokes the iot.QueryTopicReverseRouteTable API asynchronously
+// api document: https://help.aliyun.com/api/iot/querytopicreverseroutetable.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryTopicReverseRouteTableWithCallback(request *QueryTopicReverseRouteTableRequest, callback func(response *QueryTopicReverseRouteTableResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *QueryTopicReverseRouteTableResponse
+		var err error
+		defer close(result)
+		response, err = client.QueryTopicReverseRouteTable(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// QueryTopicReverseRouteTableRequest is the request struct for api QueryTopicReverseRouteTable
+type QueryTopicReverseRouteTableRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string `position:"Query" name:"IotInstanceId"`
+	RegionId      string `position:"Query" name:"RegionId"`
+	Topic         string `position:"Query" name:"Topic"`
+}
+
+// QueryTopicReverseRouteTableResponse is the response struct for api QueryTopicReverseRouteTable
+type QueryTopicReverseRouteTableResponse struct {
+	*responses.BaseResponse
+	RequestId    string   `json:"RequestId" xml:"RequestId"`
+	Success      bool     `json:"Success" xml:"Success"`
+	Code         string   `json:"Code" xml:"Code"`
+	ErrorMessage string   `json:"ErrorMessage" xml:"ErrorMessage"`
+	SrcTopics    []string `json:"SrcTopics" xml:"SrcTopics"`
+}
+
+// CreateQueryTopicReverseRouteTableRequest creates a request to invoke QueryTopicReverseRouteTable API
+func CreateQueryTopicReverseRouteTableRequest() (request *QueryTopicReverseRouteTableRequest) {
+	request = &QueryTopicReverseRouteTableRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "QueryTopicReverseRouteTable", "iot", "openAPI")
+	return
+}
+
+// CreateQueryTopicReverseRouteTableResponse creates a response to parse from QueryTopicReverseRouteTable response
+func CreateQueryTopicReverseRouteTableResponse() (response *QueryTopicReverseRouteTableResponse) {
+	response = &QueryTopicReverseRouteTableResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 110 - 0
services/iot/query_topic_route_table.go

@@ -0,0 +1,110 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// QueryTopicRouteTable invokes the iot.QueryTopicRouteTable API synchronously
+// api document: https://help.aliyun.com/api/iot/querytopicroutetable.html
+func (client *Client) QueryTopicRouteTable(request *QueryTopicRouteTableRequest) (response *QueryTopicRouteTableResponse, err error) {
+	response = CreateQueryTopicRouteTableResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// QueryTopicRouteTableWithChan invokes the iot.QueryTopicRouteTable API asynchronously
+// api document: https://help.aliyun.com/api/iot/querytopicroutetable.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryTopicRouteTableWithChan(request *QueryTopicRouteTableRequest) (<-chan *QueryTopicRouteTableResponse, <-chan error) {
+	responseChan := make(chan *QueryTopicRouteTableResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.QueryTopicRouteTable(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// QueryTopicRouteTableWithCallback invokes the iot.QueryTopicRouteTable API asynchronously
+// api document: https://help.aliyun.com/api/iot/querytopicroutetable.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryTopicRouteTableWithCallback(request *QueryTopicRouteTableRequest, callback func(response *QueryTopicRouteTableResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *QueryTopicRouteTableResponse
+		var err error
+		defer close(result)
+		response, err = client.QueryTopicRouteTable(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// QueryTopicRouteTableRequest is the request struct for api QueryTopicRouteTable
+type QueryTopicRouteTableRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string `position:"Query" name:"IotInstanceId"`
+	RegionId      string `position:"Query" name:"RegionId"`
+	Topic         string `position:"Query" name:"Topic"`
+}
+
+// QueryTopicRouteTableResponse is the response struct for api QueryTopicRouteTable
+type QueryTopicRouteTableResponse struct {
+	*responses.BaseResponse
+	RequestId    string   `json:"RequestId" xml:"RequestId"`
+	Success      bool     `json:"Success" xml:"Success"`
+	Code         string   `json:"Code" xml:"Code"`
+	ErrorMessage string   `json:"ErrorMessage" xml:"ErrorMessage"`
+	DstTopics    []string `json:"DstTopics" xml:"DstTopics"`
+}
+
+// CreateQueryTopicRouteTableRequest creates a request to invoke QueryTopicRouteTable API
+func CreateQueryTopicRouteTableRequest() (request *QueryTopicRouteTableRequest) {
+	request = &QueryTopicRouteTableRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "QueryTopicRouteTable", "iot", "openAPI")
+	return
+}
+
+// CreateQueryTopicRouteTableResponse creates a response to parse from QueryTopicRouteTable response
+func CreateQueryTopicRouteTableResponse() (response *QueryTopicRouteTableResponse) {
+	response = &QueryTopicRouteTableResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 115 - 0
services/iot/r_rpc.go

@@ -0,0 +1,115 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// RRpc invokes the iot.RRpc API synchronously
+// api document: https://help.aliyun.com/api/iot/rrpc.html
+func (client *Client) RRpc(request *RRpcRequest) (response *RRpcResponse, err error) {
+	response = CreateRRpcResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// RRpcWithChan invokes the iot.RRpc API asynchronously
+// api document: https://help.aliyun.com/api/iot/rrpc.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) RRpcWithChan(request *RRpcRequest) (<-chan *RRpcResponse, <-chan error) {
+	responseChan := make(chan *RRpcResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.RRpc(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// RRpcWithCallback invokes the iot.RRpc API asynchronously
+// api document: https://help.aliyun.com/api/iot/rrpc.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) RRpcWithCallback(request *RRpcRequest, callback func(response *RRpcResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *RRpcResponse
+		var err error
+		defer close(result)
+		response, err = client.RRpc(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// RRpcRequest is the request struct for api RRpc
+type RRpcRequest struct {
+	*requests.RpcRequest
+	AccessKeyId       string           `position:"Query" name:"AccessKeyId"`
+	IotInstanceId     string           `position:"Query" name:"IotInstanceId"`
+	ProductKey        string           `position:"Query" name:"ProductKey"`
+	Timeout           requests.Integer `position:"Query" name:"Timeout"`
+	DeviceName        string           `position:"Query" name:"DeviceName"`
+	Topic             string           `position:"Query" name:"Topic"`
+	RequestBase64Byte string           `position:"Query" name:"RequestBase64Byte"`
+}
+
+// RRpcResponse is the response struct for api RRpc
+type RRpcResponse struct {
+	*responses.BaseResponse
+	RequestId         string `json:"RequestId" xml:"RequestId"`
+	Success           bool   `json:"Success" xml:"Success"`
+	Code              string `json:"Code" xml:"Code"`
+	ErrorMessage      string `json:"ErrorMessage" xml:"ErrorMessage"`
+	RrpcCode          string `json:"RrpcCode" xml:"RrpcCode"`
+	PayloadBase64Byte string `json:"PayloadBase64Byte" xml:"PayloadBase64Byte"`
+	MessageId         int64  `json:"MessageId" xml:"MessageId"`
+}
+
+// CreateRRpcRequest creates a request to invoke RRpc API
+func CreateRRpcRequest() (request *RRpcRequest) {
+	request = &RRpcRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "RRpc", "iot", "openAPI")
+	return
+}
+
+// CreateRRpcResponse creates a response to parse from RRpc response
+func CreateRRpcResponse() (response *RRpcResponse) {
+	response = &RRpcResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 123 - 0
services/iot/register_device.go

@@ -0,0 +1,123 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// RegisterDevice invokes the iot.RegisterDevice API synchronously
+// api document: https://help.aliyun.com/api/iot/registerdevice.html
+func (client *Client) RegisterDevice(request *RegisterDeviceRequest) (response *RegisterDeviceResponse, err error) {
+	response = CreateRegisterDeviceResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// RegisterDeviceWithChan invokes the iot.RegisterDevice API asynchronously
+// api document: https://help.aliyun.com/api/iot/registerdevice.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) RegisterDeviceWithChan(request *RegisterDeviceRequest) (<-chan *RegisterDeviceResponse, <-chan error) {
+	responseChan := make(chan *RegisterDeviceResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.RegisterDevice(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// RegisterDeviceWithCallback invokes the iot.RegisterDevice API asynchronously
+// api document: https://help.aliyun.com/api/iot/registerdevice.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) RegisterDeviceWithCallback(request *RegisterDeviceRequest, callback func(response *RegisterDeviceResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *RegisterDeviceResponse
+		var err error
+		defer close(result)
+		response, err = client.RegisterDevice(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// RegisterDeviceRequest is the request struct for api RegisterDevice
+type RegisterDeviceRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string `position:"Query" name:"IotInstanceId"`
+	ProductKey    string `position:"Query" name:"ProductKey"`
+	DeviceName    string `position:"Query" name:"DeviceName"`
+	DevEui        string `position:"Query" name:"DevEui"`
+	PinCode       string `position:"Query" name:"PinCode"`
+	Nickname      string `position:"Query" name:"Nickname"`
+}
+
+// RegisterDeviceResponse is the response struct for api RegisterDevice
+type RegisterDeviceResponse struct {
+	*responses.BaseResponse
+	RequestId    string              `json:"RequestId" xml:"RequestId"`
+	Success      bool                `json:"Success" xml:"Success"`
+	Code         string              `json:"Code" xml:"Code"`
+	ErrorMessage string              `json:"ErrorMessage" xml:"ErrorMessage"`
+	Data         RegisterDeviceData0 `json:"Data" xml:"Data"`
+}
+
+type RegisterDeviceData0 struct {
+	IotId        string `json:"IotId" xml:"IotId"`
+	ProductKey   string `json:"ProductKey" xml:"ProductKey"`
+	DeviceName   string `json:"DeviceName" xml:"DeviceName"`
+	DeviceSecret string `json:"DeviceSecret" xml:"DeviceSecret"`
+	DevEui       string `json:"DevEui" xml:"DevEui"`
+	JoinEui      string `json:"JoinEui" xml:"JoinEui"`
+	Nickname     string `json:"Nickname" xml:"Nickname"`
+}
+
+// CreateRegisterDeviceRequest creates a request to invoke RegisterDevice API
+func CreateRegisterDeviceRequest() (request *RegisterDeviceRequest) {
+	request = &RegisterDeviceRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "RegisterDevice", "iot", "openAPI")
+	return
+}
+
+// CreateRegisterDeviceResponse creates a response to parse from RegisterDevice response
+func CreateRegisterDeviceResponse() (response *RegisterDeviceResponse) {
+	response = &RegisterDeviceResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 111 - 0
services/iot/remove_thing_topo.go

@@ -0,0 +1,111 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// RemoveThingTopo invokes the iot.RemoveThingTopo API synchronously
+// api document: https://help.aliyun.com/api/iot/removethingtopo.html
+func (client *Client) RemoveThingTopo(request *RemoveThingTopoRequest) (response *RemoveThingTopoResponse, err error) {
+	response = CreateRemoveThingTopoResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// RemoveThingTopoWithChan invokes the iot.RemoveThingTopo API asynchronously
+// api document: https://help.aliyun.com/api/iot/removethingtopo.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) RemoveThingTopoWithChan(request *RemoveThingTopoRequest) (<-chan *RemoveThingTopoResponse, <-chan error) {
+	responseChan := make(chan *RemoveThingTopoResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.RemoveThingTopo(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// RemoveThingTopoWithCallback invokes the iot.RemoveThingTopo API asynchronously
+// api document: https://help.aliyun.com/api/iot/removethingtopo.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) RemoveThingTopoWithCallback(request *RemoveThingTopoRequest, callback func(response *RemoveThingTopoResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *RemoveThingTopoResponse
+		var err error
+		defer close(result)
+		response, err = client.RemoveThingTopo(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// RemoveThingTopoRequest is the request struct for api RemoveThingTopo
+type RemoveThingTopoRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string `position:"Query" name:"IotInstanceId"`
+	IotId         string `position:"Query" name:"IotId"`
+	ProductKey    string `position:"Query" name:"ProductKey"`
+	DeviceName    string `position:"Query" name:"DeviceName"`
+}
+
+// RemoveThingTopoResponse is the response struct for api RemoveThingTopo
+type RemoveThingTopoResponse struct {
+	*responses.BaseResponse
+	RequestId    string `json:"RequestId" xml:"RequestId"`
+	Success      bool   `json:"Success" xml:"Success"`
+	Code         string `json:"Code" xml:"Code"`
+	ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"`
+	Data         bool   `json:"Data" xml:"Data"`
+}
+
+// CreateRemoveThingTopoRequest creates a request to invoke RemoveThingTopo API
+func CreateRemoveThingTopoRequest() (request *RemoveThingTopoRequest) {
+	request = &RemoveThingTopoRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "RemoveThingTopo", "iot", "openAPI")
+	return
+}
+
+// CreateRemoveThingTopoResponse creates a response to parse from RemoveThingTopo response
+func CreateRemoveThingTopoResponse() (response *RemoveThingTopoResponse) {
+	response = &RemoveThingTopoResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 111 - 0
services/iot/save_device_prop.go

@@ -0,0 +1,111 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// SaveDeviceProp invokes the iot.SaveDeviceProp API synchronously
+// api document: https://help.aliyun.com/api/iot/savedeviceprop.html
+func (client *Client) SaveDeviceProp(request *SaveDevicePropRequest) (response *SaveDevicePropResponse, err error) {
+	response = CreateSaveDevicePropResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// SaveDevicePropWithChan invokes the iot.SaveDeviceProp API asynchronously
+// api document: https://help.aliyun.com/api/iot/savedeviceprop.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) SaveDevicePropWithChan(request *SaveDevicePropRequest) (<-chan *SaveDevicePropResponse, <-chan error) {
+	responseChan := make(chan *SaveDevicePropResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.SaveDeviceProp(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// SaveDevicePropWithCallback invokes the iot.SaveDeviceProp API asynchronously
+// api document: https://help.aliyun.com/api/iot/savedeviceprop.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) SaveDevicePropWithCallback(request *SaveDevicePropRequest, callback func(response *SaveDevicePropResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *SaveDevicePropResponse
+		var err error
+		defer close(result)
+		response, err = client.SaveDeviceProp(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// SaveDevicePropRequest is the request struct for api SaveDeviceProp
+type SaveDevicePropRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string `position:"Query" name:"IotInstanceId"`
+	IotId         string `position:"Query" name:"IotId"`
+	DeviceName    string `position:"Query" name:"DeviceName"`
+	ProductKey    string `position:"Query" name:"ProductKey"`
+	Props         string `position:"Query" name:"Props"`
+}
+
+// SaveDevicePropResponse is the response struct for api SaveDeviceProp
+type SaveDevicePropResponse struct {
+	*responses.BaseResponse
+	RequestId    string `json:"RequestId" xml:"RequestId"`
+	Success      bool   `json:"Success" xml:"Success"`
+	Code         string `json:"Code" xml:"Code"`
+	ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"`
+}
+
+// CreateSaveDevicePropRequest creates a request to invoke SaveDeviceProp API
+func CreateSaveDevicePropRequest() (request *SaveDevicePropRequest) {
+	request = &SaveDevicePropRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "SaveDeviceProp", "iot", "openAPI")
+	return
+}
+
+// CreateSaveDevicePropResponse creates a response to parse from SaveDeviceProp response
+func CreateSaveDevicePropResponse() (response *SaveDevicePropResponse) {
+	response = &SaveDevicePropResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 118 - 0
services/iot/set_device_desired_property.go

@@ -0,0 +1,118 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// SetDeviceDesiredProperty invokes the iot.SetDeviceDesiredProperty API synchronously
+// api document: https://help.aliyun.com/api/iot/setdevicedesiredproperty.html
+func (client *Client) SetDeviceDesiredProperty(request *SetDeviceDesiredPropertyRequest) (response *SetDeviceDesiredPropertyResponse, err error) {
+	response = CreateSetDeviceDesiredPropertyResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// SetDeviceDesiredPropertyWithChan invokes the iot.SetDeviceDesiredProperty API asynchronously
+// api document: https://help.aliyun.com/api/iot/setdevicedesiredproperty.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) SetDeviceDesiredPropertyWithChan(request *SetDeviceDesiredPropertyRequest) (<-chan *SetDeviceDesiredPropertyResponse, <-chan error) {
+	responseChan := make(chan *SetDeviceDesiredPropertyResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.SetDeviceDesiredProperty(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// SetDeviceDesiredPropertyWithCallback invokes the iot.SetDeviceDesiredProperty API asynchronously
+// api document: https://help.aliyun.com/api/iot/setdevicedesiredproperty.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) SetDeviceDesiredPropertyWithCallback(request *SetDeviceDesiredPropertyRequest, callback func(response *SetDeviceDesiredPropertyResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *SetDeviceDesiredPropertyResponse
+		var err error
+		defer close(result)
+		response, err = client.SetDeviceDesiredProperty(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// SetDeviceDesiredPropertyRequest is the request struct for api SetDeviceDesiredProperty
+type SetDeviceDesiredPropertyRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string `position:"Query" name:"IotInstanceId"`
+	IotId         string `position:"Query" name:"IotId"`
+	DeviceName    string `position:"Query" name:"DeviceName"`
+	ProductKey    string `position:"Query" name:"ProductKey"`
+	Items         string `position:"Query" name:"Items"`
+	Versions      string `position:"Query" name:"Versions"`
+}
+
+// SetDeviceDesiredPropertyResponse is the response struct for api SetDeviceDesiredProperty
+type SetDeviceDesiredPropertyResponse struct {
+	*responses.BaseResponse
+	RequestId    string                        `json:"RequestId" xml:"RequestId"`
+	Success      bool                          `json:"Success" xml:"Success"`
+	ErrorMessage string                        `json:"ErrorMessage" xml:"ErrorMessage"`
+	Code         string                        `json:"Code" xml:"Code"`
+	Data         SetDeviceDesiredPropertyData0 `json:"Data" xml:"Data"`
+}
+
+type SetDeviceDesiredPropertyData0 struct {
+	MessageId string `json:"MessageId" xml:"MessageId"`
+	Versions  string `json:"Versions" xml:"Versions"`
+}
+
+// CreateSetDeviceDesiredPropertyRequest creates a request to invoke SetDeviceDesiredProperty API
+func CreateSetDeviceDesiredPropertyRequest() (request *SetDeviceDesiredPropertyRequest) {
+	request = &SetDeviceDesiredPropertyRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "SetDeviceDesiredProperty", "iot", "openAPI")
+	return
+}
+
+// CreateSetDeviceDesiredPropertyResponse creates a response to parse from SetDeviceDesiredProperty response
+func CreateSetDeviceDesiredPropertyResponse() (response *SetDeviceDesiredPropertyResponse) {
+	response = &SetDeviceDesiredPropertyResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 109 - 0
services/iot/set_device_group_tags.go

@@ -0,0 +1,109 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// SetDeviceGroupTags invokes the iot.SetDeviceGroupTags API synchronously
+// api document: https://help.aliyun.com/api/iot/setdevicegrouptags.html
+func (client *Client) SetDeviceGroupTags(request *SetDeviceGroupTagsRequest) (response *SetDeviceGroupTagsResponse, err error) {
+	response = CreateSetDeviceGroupTagsResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// SetDeviceGroupTagsWithChan invokes the iot.SetDeviceGroupTags API asynchronously
+// api document: https://help.aliyun.com/api/iot/setdevicegrouptags.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) SetDeviceGroupTagsWithChan(request *SetDeviceGroupTagsRequest) (<-chan *SetDeviceGroupTagsResponse, <-chan error) {
+	responseChan := make(chan *SetDeviceGroupTagsResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.SetDeviceGroupTags(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// SetDeviceGroupTagsWithCallback invokes the iot.SetDeviceGroupTags API asynchronously
+// api document: https://help.aliyun.com/api/iot/setdevicegrouptags.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) SetDeviceGroupTagsWithCallback(request *SetDeviceGroupTagsRequest, callback func(response *SetDeviceGroupTagsResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *SetDeviceGroupTagsResponse
+		var err error
+		defer close(result)
+		response, err = client.SetDeviceGroupTags(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// SetDeviceGroupTagsRequest is the request struct for api SetDeviceGroupTags
+type SetDeviceGroupTagsRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string `position:"Query" name:"IotInstanceId"`
+	GroupId       string `position:"Query" name:"GroupId"`
+	TagString     string `position:"Query" name:"TagString"`
+}
+
+// SetDeviceGroupTagsResponse is the response struct for api SetDeviceGroupTags
+type SetDeviceGroupTagsResponse struct {
+	*responses.BaseResponse
+	RequestId    string `json:"RequestId" xml:"RequestId"`
+	Success      bool   `json:"Success" xml:"Success"`
+	Code         string `json:"Code" xml:"Code"`
+	ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"`
+}
+
+// CreateSetDeviceGroupTagsRequest creates a request to invoke SetDeviceGroupTags API
+func CreateSetDeviceGroupTagsRequest() (request *SetDeviceGroupTagsRequest) {
+	request = &SetDeviceGroupTagsRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "SetDeviceGroupTags", "iot", "openAPI")
+	return
+}
+
+// CreateSetDeviceGroupTagsResponse creates a response to parse from SetDeviceGroupTags response
+func CreateSetDeviceGroupTagsResponse() (response *SetDeviceGroupTagsResponse) {
+	response = &SetDeviceGroupTagsResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 116 - 0
services/iot/set_device_property.go

@@ -0,0 +1,116 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// SetDeviceProperty invokes the iot.SetDeviceProperty API synchronously
+// api document: https://help.aliyun.com/api/iot/setdeviceproperty.html
+func (client *Client) SetDeviceProperty(request *SetDevicePropertyRequest) (response *SetDevicePropertyResponse, err error) {
+	response = CreateSetDevicePropertyResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// SetDevicePropertyWithChan invokes the iot.SetDeviceProperty API asynchronously
+// api document: https://help.aliyun.com/api/iot/setdeviceproperty.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) SetDevicePropertyWithChan(request *SetDevicePropertyRequest) (<-chan *SetDevicePropertyResponse, <-chan error) {
+	responseChan := make(chan *SetDevicePropertyResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.SetDeviceProperty(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// SetDevicePropertyWithCallback invokes the iot.SetDeviceProperty API asynchronously
+// api document: https://help.aliyun.com/api/iot/setdeviceproperty.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) SetDevicePropertyWithCallback(request *SetDevicePropertyRequest, callback func(response *SetDevicePropertyResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *SetDevicePropertyResponse
+		var err error
+		defer close(result)
+		response, err = client.SetDeviceProperty(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// SetDevicePropertyRequest is the request struct for api SetDeviceProperty
+type SetDevicePropertyRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string `position:"Query" name:"IotInstanceId"`
+	IotId         string `position:"Query" name:"IotId"`
+	DeviceName    string `position:"Query" name:"DeviceName"`
+	ProductKey    string `position:"Query" name:"ProductKey"`
+	Items         string `position:"Query" name:"Items"`
+}
+
+// SetDevicePropertyResponse is the response struct for api SetDeviceProperty
+type SetDevicePropertyResponse struct {
+	*responses.BaseResponse
+	RequestId    string                 `json:"RequestId" xml:"RequestId"`
+	Success      bool                   `json:"Success" xml:"Success"`
+	ErrorMessage string                 `json:"ErrorMessage" xml:"ErrorMessage"`
+	Code         string                 `json:"Code" xml:"Code"`
+	Data         SetDevicePropertyData0 `json:"Data" xml:"Data"`
+}
+
+type SetDevicePropertyData0 struct {
+	MessageId string `json:"MessageId" xml:"MessageId"`
+}
+
+// CreateSetDevicePropertyRequest creates a request to invoke SetDeviceProperty API
+func CreateSetDevicePropertyRequest() (request *SetDevicePropertyRequest) {
+	request = &SetDevicePropertyRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "SetDeviceProperty", "iot", "openAPI")
+	return
+}
+
+// CreateSetDevicePropertyResponse creates a response to parse from SetDeviceProperty response
+func CreateSetDevicePropertyResponse() (response *SetDevicePropertyResponse) {
+	response = &SetDevicePropertyResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 110 - 0
services/iot/set_devices_property.go

@@ -0,0 +1,110 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// SetDevicesProperty invokes the iot.SetDevicesProperty API synchronously
+// api document: https://help.aliyun.com/api/iot/setdevicesproperty.html
+func (client *Client) SetDevicesProperty(request *SetDevicesPropertyRequest) (response *SetDevicesPropertyResponse, err error) {
+	response = CreateSetDevicesPropertyResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// SetDevicesPropertyWithChan invokes the iot.SetDevicesProperty API asynchronously
+// api document: https://help.aliyun.com/api/iot/setdevicesproperty.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) SetDevicesPropertyWithChan(request *SetDevicesPropertyRequest) (<-chan *SetDevicesPropertyResponse, <-chan error) {
+	responseChan := make(chan *SetDevicesPropertyResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.SetDevicesProperty(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// SetDevicesPropertyWithCallback invokes the iot.SetDevicesProperty API asynchronously
+// api document: https://help.aliyun.com/api/iot/setdevicesproperty.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) SetDevicesPropertyWithCallback(request *SetDevicesPropertyRequest, callback func(response *SetDevicesPropertyResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *SetDevicesPropertyResponse
+		var err error
+		defer close(result)
+		response, err = client.SetDevicesProperty(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// SetDevicesPropertyRequest is the request struct for api SetDevicesProperty
+type SetDevicesPropertyRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string   `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string   `position:"Query" name:"IotInstanceId"`
+	DeviceName    []string `position:"Query" name:"DeviceName" type:"Repeated"`
+	ProductKey    string   `position:"Query" name:"ProductKey"`
+	Items         string   `position:"Query" name:"Items"`
+}
+
+// SetDevicesPropertyResponse is the response struct for api SetDevicesProperty
+type SetDevicesPropertyResponse struct {
+	*responses.BaseResponse
+	RequestId    string `json:"RequestId" xml:"RequestId"`
+	Success      bool   `json:"Success" xml:"Success"`
+	ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"`
+	Code         string `json:"Code" xml:"Code"`
+}
+
+// CreateSetDevicesPropertyRequest creates a request to invoke SetDevicesProperty API
+func CreateSetDevicesPropertyRequest() (request *SetDevicesPropertyRequest) {
+	request = &SetDevicesPropertyRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "SetDevicesProperty", "iot", "openAPI")
+	return
+}
+
+// CreateSetDevicesPropertyResponse creates a response to parse from SetDevicesProperty response
+func CreateSetDevicesPropertyResponse() (response *SetDevicesPropertyResponse) {
+	response = &SetDevicesPropertyResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 108 - 0
services/iot/start_rule.go

@@ -0,0 +1,108 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// StartRule invokes the iot.StartRule API synchronously
+// api document: https://help.aliyun.com/api/iot/startrule.html
+func (client *Client) StartRule(request *StartRuleRequest) (response *StartRuleResponse, err error) {
+	response = CreateStartRuleResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// StartRuleWithChan invokes the iot.StartRule API asynchronously
+// api document: https://help.aliyun.com/api/iot/startrule.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) StartRuleWithChan(request *StartRuleRequest) (<-chan *StartRuleResponse, <-chan error) {
+	responseChan := make(chan *StartRuleResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.StartRule(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// StartRuleWithCallback invokes the iot.StartRule API asynchronously
+// api document: https://help.aliyun.com/api/iot/startrule.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) StartRuleWithCallback(request *StartRuleRequest, callback func(response *StartRuleResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *StartRuleResponse
+		var err error
+		defer close(result)
+		response, err = client.StartRule(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// StartRuleRequest is the request struct for api StartRule
+type StartRuleRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string           `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string           `position:"Query" name:"IotInstanceId"`
+	RuleId        requests.Integer `position:"Query" name:"RuleId"`
+}
+
+// StartRuleResponse is the response struct for api StartRule
+type StartRuleResponse struct {
+	*responses.BaseResponse
+	RequestId    string `json:"RequestId" xml:"RequestId"`
+	Success      bool   `json:"Success" xml:"Success"`
+	Code         string `json:"Code" xml:"Code"`
+	ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"`
+}
+
+// CreateStartRuleRequest creates a request to invoke StartRule API
+func CreateStartRuleRequest() (request *StartRuleRequest) {
+	request = &StartRuleRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "StartRule", "iot", "openAPI")
+	return
+}
+
+// CreateStartRuleResponse creates a response to parse from StartRule response
+func CreateStartRuleResponse() (response *StartRuleResponse) {
+	response = &StartRuleResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 108 - 0
services/iot/stop_rule.go

@@ -0,0 +1,108 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// StopRule invokes the iot.StopRule API synchronously
+// api document: https://help.aliyun.com/api/iot/stoprule.html
+func (client *Client) StopRule(request *StopRuleRequest) (response *StopRuleResponse, err error) {
+	response = CreateStopRuleResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// StopRuleWithChan invokes the iot.StopRule API asynchronously
+// api document: https://help.aliyun.com/api/iot/stoprule.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) StopRuleWithChan(request *StopRuleRequest) (<-chan *StopRuleResponse, <-chan error) {
+	responseChan := make(chan *StopRuleResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.StopRule(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// StopRuleWithCallback invokes the iot.StopRule API asynchronously
+// api document: https://help.aliyun.com/api/iot/stoprule.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) StopRuleWithCallback(request *StopRuleRequest, callback func(response *StopRuleResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *StopRuleResponse
+		var err error
+		defer close(result)
+		response, err = client.StopRule(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// StopRuleRequest is the request struct for api StopRule
+type StopRuleRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string           `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string           `position:"Query" name:"IotInstanceId"`
+	RuleId        requests.Integer `position:"Query" name:"RuleId"`
+}
+
+// StopRuleResponse is the response struct for api StopRule
+type StopRuleResponse struct {
+	*responses.BaseResponse
+	RequestId    string `json:"RequestId" xml:"RequestId"`
+	Success      bool   `json:"Success" xml:"Success"`
+	Code         string `json:"Code" xml:"Code"`
+	ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"`
+}
+
+// CreateStopRuleRequest creates a request to invoke StopRule API
+func CreateStopRuleRequest() (request *StopRuleRequest) {
+	request = &StopRuleRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "StopRule", "iot", "openAPI")
+	return
+}
+
+// CreateStopRuleResponse creates a response to parse from StopRule response
+func CreateStopRuleResponse() (response *StopRuleResponse) {
+	response = &StopRuleResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 109 - 0
services/iot/update_device_group.go

@@ -0,0 +1,109 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// UpdateDeviceGroup invokes the iot.UpdateDeviceGroup API synchronously
+// api document: https://help.aliyun.com/api/iot/updatedevicegroup.html
+func (client *Client) UpdateDeviceGroup(request *UpdateDeviceGroupRequest) (response *UpdateDeviceGroupResponse, err error) {
+	response = CreateUpdateDeviceGroupResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// UpdateDeviceGroupWithChan invokes the iot.UpdateDeviceGroup API asynchronously
+// api document: https://help.aliyun.com/api/iot/updatedevicegroup.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UpdateDeviceGroupWithChan(request *UpdateDeviceGroupRequest) (<-chan *UpdateDeviceGroupResponse, <-chan error) {
+	responseChan := make(chan *UpdateDeviceGroupResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.UpdateDeviceGroup(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// UpdateDeviceGroupWithCallback invokes the iot.UpdateDeviceGroup API asynchronously
+// api document: https://help.aliyun.com/api/iot/updatedevicegroup.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UpdateDeviceGroupWithCallback(request *UpdateDeviceGroupRequest, callback func(response *UpdateDeviceGroupResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *UpdateDeviceGroupResponse
+		var err error
+		defer close(result)
+		response, err = client.UpdateDeviceGroup(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// UpdateDeviceGroupRequest is the request struct for api UpdateDeviceGroup
+type UpdateDeviceGroupRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string `position:"Query" name:"IotInstanceId"`
+	GroupId       string `position:"Query" name:"GroupId"`
+	GroupDesc     string `position:"Query" name:"GroupDesc"`
+}
+
+// UpdateDeviceGroupResponse is the response struct for api UpdateDeviceGroup
+type UpdateDeviceGroupResponse struct {
+	*responses.BaseResponse
+	RequestId    string `json:"RequestId" xml:"RequestId"`
+	Success      bool   `json:"Success" xml:"Success"`
+	Code         string `json:"Code" xml:"Code"`
+	ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"`
+}
+
+// CreateUpdateDeviceGroupRequest creates a request to invoke UpdateDeviceGroup API
+func CreateUpdateDeviceGroupRequest() (request *UpdateDeviceGroupRequest) {
+	request = &UpdateDeviceGroupRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "UpdateDeviceGroup", "iot", "openAPI")
+	return
+}
+
+// CreateUpdateDeviceGroupResponse creates a response to parse from UpdateDeviceGroup response
+func CreateUpdateDeviceGroupResponse() (response *UpdateDeviceGroupResponse) {
+	response = &UpdateDeviceGroupResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 110 - 0
services/iot/update_device_shadow.go

@@ -0,0 +1,110 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// UpdateDeviceShadow invokes the iot.UpdateDeviceShadow API synchronously
+// api document: https://help.aliyun.com/api/iot/updatedeviceshadow.html
+func (client *Client) UpdateDeviceShadow(request *UpdateDeviceShadowRequest) (response *UpdateDeviceShadowResponse, err error) {
+	response = CreateUpdateDeviceShadowResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// UpdateDeviceShadowWithChan invokes the iot.UpdateDeviceShadow API asynchronously
+// api document: https://help.aliyun.com/api/iot/updatedeviceshadow.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UpdateDeviceShadowWithChan(request *UpdateDeviceShadowRequest) (<-chan *UpdateDeviceShadowResponse, <-chan error) {
+	responseChan := make(chan *UpdateDeviceShadowResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.UpdateDeviceShadow(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// UpdateDeviceShadowWithCallback invokes the iot.UpdateDeviceShadow API asynchronously
+// api document: https://help.aliyun.com/api/iot/updatedeviceshadow.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UpdateDeviceShadowWithCallback(request *UpdateDeviceShadowRequest, callback func(response *UpdateDeviceShadowResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *UpdateDeviceShadowResponse
+		var err error
+		defer close(result)
+		response, err = client.UpdateDeviceShadow(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// UpdateDeviceShadowRequest is the request struct for api UpdateDeviceShadow
+type UpdateDeviceShadowRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string `position:"Query" name:"IotInstanceId"`
+	DeviceName    string `position:"Query" name:"DeviceName"`
+	ProductKey    string `position:"Query" name:"ProductKey"`
+	ShadowMessage string `position:"Query" name:"ShadowMessage"`
+}
+
+// UpdateDeviceShadowResponse is the response struct for api UpdateDeviceShadow
+type UpdateDeviceShadowResponse struct {
+	*responses.BaseResponse
+	RequestId    string `json:"RequestId" xml:"RequestId"`
+	Success      bool   `json:"Success" xml:"Success"`
+	Code         string `json:"Code" xml:"Code"`
+	ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"`
+}
+
+// CreateUpdateDeviceShadowRequest creates a request to invoke UpdateDeviceShadow API
+func CreateUpdateDeviceShadowRequest() (request *UpdateDeviceShadowRequest) {
+	request = &UpdateDeviceShadowRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "UpdateDeviceShadow", "iot", "openAPI")
+	return
+}
+
+// CreateUpdateDeviceShadowResponse creates a response to parse from UpdateDeviceShadow response
+func CreateUpdateDeviceShadowResponse() (response *UpdateDeviceShadowResponse) {
+	response = &UpdateDeviceShadowResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 110 - 0
services/iot/update_product.go

@@ -0,0 +1,110 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// UpdateProduct invokes the iot.UpdateProduct API synchronously
+// api document: https://help.aliyun.com/api/iot/updateproduct.html
+func (client *Client) UpdateProduct(request *UpdateProductRequest) (response *UpdateProductResponse, err error) {
+	response = CreateUpdateProductResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// UpdateProductWithChan invokes the iot.UpdateProduct API asynchronously
+// api document: https://help.aliyun.com/api/iot/updateproduct.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UpdateProductWithChan(request *UpdateProductRequest) (<-chan *UpdateProductResponse, <-chan error) {
+	responseChan := make(chan *UpdateProductResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.UpdateProduct(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// UpdateProductWithCallback invokes the iot.UpdateProduct API asynchronously
+// api document: https://help.aliyun.com/api/iot/updateproduct.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UpdateProductWithCallback(request *UpdateProductRequest, callback func(response *UpdateProductResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *UpdateProductResponse
+		var err error
+		defer close(result)
+		response, err = client.UpdateProduct(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// UpdateProductRequest is the request struct for api UpdateProduct
+type UpdateProductRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string `position:"Query" name:"IotInstanceId"`
+	ProductKey    string `position:"Query" name:"ProductKey"`
+	ProductName   string `position:"Query" name:"ProductName"`
+	Description   string `position:"Query" name:"Description"`
+}
+
+// UpdateProductResponse is the response struct for api UpdateProduct
+type UpdateProductResponse struct {
+	*responses.BaseResponse
+	RequestId    string `json:"RequestId" xml:"RequestId"`
+	Success      bool   `json:"Success" xml:"Success"`
+	Code         string `json:"Code" xml:"Code"`
+	ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"`
+}
+
+// CreateUpdateProductRequest creates a request to invoke UpdateProduct API
+func CreateUpdateProductRequest() (request *UpdateProductRequest) {
+	request = &UpdateProductRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "UpdateProduct", "iot", "openAPI")
+	return
+}
+
+// CreateUpdateProductResponse creates a response to parse from UpdateProduct response
+func CreateUpdateProductResponse() (response *UpdateProductResponse) {
+	response = &UpdateProductResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 124 - 0
services/iot/update_product_tags.go

@@ -0,0 +1,124 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// UpdateProductTags invokes the iot.UpdateProductTags API synchronously
+// api document: https://help.aliyun.com/api/iot/updateproducttags.html
+func (client *Client) UpdateProductTags(request *UpdateProductTagsRequest) (response *UpdateProductTagsResponse, err error) {
+	response = CreateUpdateProductTagsResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// UpdateProductTagsWithChan invokes the iot.UpdateProductTags API asynchronously
+// api document: https://help.aliyun.com/api/iot/updateproducttags.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UpdateProductTagsWithChan(request *UpdateProductTagsRequest) (<-chan *UpdateProductTagsResponse, <-chan error) {
+	responseChan := make(chan *UpdateProductTagsResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.UpdateProductTags(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// UpdateProductTagsWithCallback invokes the iot.UpdateProductTags API asynchronously
+// api document: https://help.aliyun.com/api/iot/updateproducttags.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UpdateProductTagsWithCallback(request *UpdateProductTagsRequest, callback func(response *UpdateProductTagsResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *UpdateProductTagsResponse
+		var err error
+		defer close(result)
+		response, err = client.UpdateProductTags(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// UpdateProductTagsRequest is the request struct for api UpdateProductTags
+type UpdateProductTagsRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string                         `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string                         `position:"Query" name:"IotInstanceId"`
+	ProductKey    string                         `position:"Query" name:"ProductKey"`
+	ProductTag    *[]UpdateProductTagsProductTag `position:"Query" name:"ProductTag" type:"Repeated"`
+}
+
+type UpdateProductTagsProductTag struct {
+	TagKey   string `name:"TagKey"`
+	TagValue string `name:"TagValue"`
+}
+
+// UpdateProductTagsResponse is the response struct for api UpdateProductTags
+type UpdateProductTagsResponse struct {
+	*responses.BaseResponse
+	RequestId          string                               `json:"RequestId" xml:"RequestId"`
+	Success            bool                                 `json:"Success" xml:"Success"`
+	ErrorMessage       string                               `json:"ErrorMessage" xml:"ErrorMessage"`
+	Code               string                               `json:"Code" xml:"Code"`
+	InvalidProductTags UpdateProductTagsInvalidProductTags0 `json:"InvalidProductTags" xml:"InvalidProductTags"`
+}
+
+type UpdateProductTagsInvalidProductTags0 struct {
+	ProductTag []UpdateProductTagsProductTag1 `json:"ProductTag" xml:"ProductTag"`
+}
+
+type UpdateProductTagsProductTag1 struct {
+	TagKey   string `json:"TagKey" xml:"TagKey"`
+	TagValue string `json:"TagValue" xml:"TagValue"`
+}
+
+// CreateUpdateProductTagsRequest creates a request to invoke UpdateProductTags API
+func CreateUpdateProductTagsRequest() (request *UpdateProductTagsRequest) {
+	request = &UpdateProductTagsRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "UpdateProductTags", "iot", "openAPI")
+	return
+}
+
+// CreateUpdateProductTagsResponse creates a response to parse from UpdateProductTags response
+func CreateUpdateProductTagsResponse() (response *UpdateProductTagsResponse) {
+	response = &UpdateProductTagsResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 111 - 0
services/iot/update_product_topic.go

@@ -0,0 +1,111 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// UpdateProductTopic invokes the iot.UpdateProductTopic API synchronously
+// api document: https://help.aliyun.com/api/iot/updateproducttopic.html
+func (client *Client) UpdateProductTopic(request *UpdateProductTopicRequest) (response *UpdateProductTopicResponse, err error) {
+	response = CreateUpdateProductTopicResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// UpdateProductTopicWithChan invokes the iot.UpdateProductTopic API asynchronously
+// api document: https://help.aliyun.com/api/iot/updateproducttopic.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UpdateProductTopicWithChan(request *UpdateProductTopicRequest) (<-chan *UpdateProductTopicResponse, <-chan error) {
+	responseChan := make(chan *UpdateProductTopicResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.UpdateProductTopic(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// UpdateProductTopicWithCallback invokes the iot.UpdateProductTopic API asynchronously
+// api document: https://help.aliyun.com/api/iot/updateproducttopic.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UpdateProductTopicWithCallback(request *UpdateProductTopicRequest, callback func(response *UpdateProductTopicResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *UpdateProductTopicResponse
+		var err error
+		defer close(result)
+		response, err = client.UpdateProductTopic(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// UpdateProductTopicRequest is the request struct for api UpdateProductTopic
+type UpdateProductTopicRequest struct {
+	*requests.RpcRequest
+	AccessKeyId    string `position:"Query" name:"AccessKeyId"`
+	IotInstanceId  string `position:"Query" name:"IotInstanceId"`
+	Desc           string `position:"Query" name:"Desc"`
+	Operation      string `position:"Query" name:"Operation"`
+	TopicShortName string `position:"Query" name:"TopicShortName"`
+	TopicId        string `position:"Query" name:"TopicId"`
+}
+
+// UpdateProductTopicResponse is the response struct for api UpdateProductTopic
+type UpdateProductTopicResponse struct {
+	*responses.BaseResponse
+	RequestId    string `json:"RequestId" xml:"RequestId"`
+	Success      bool   `json:"Success" xml:"Success"`
+	Code         string `json:"Code" xml:"Code"`
+	ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"`
+}
+
+// CreateUpdateProductTopicRequest creates a request to invoke UpdateProductTopic API
+func CreateUpdateProductTopicRequest() (request *UpdateProductTopicRequest) {
+	request = &UpdateProductTopicRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "UpdateProductTopic", "iot", "openAPI")
+	return
+}
+
+// CreateUpdateProductTopicResponse creates a response to parse from UpdateProductTopic response
+func CreateUpdateProductTopicResponse() (response *UpdateProductTopicResponse) {
+	response = &UpdateProductTopicResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 115 - 0
services/iot/update_rule.go

@@ -0,0 +1,115 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// UpdateRule invokes the iot.UpdateRule API synchronously
+// api document: https://help.aliyun.com/api/iot/updaterule.html
+func (client *Client) UpdateRule(request *UpdateRuleRequest) (response *UpdateRuleResponse, err error) {
+	response = CreateUpdateRuleResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// UpdateRuleWithChan invokes the iot.UpdateRule API asynchronously
+// api document: https://help.aliyun.com/api/iot/updaterule.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UpdateRuleWithChan(request *UpdateRuleRequest) (<-chan *UpdateRuleResponse, <-chan error) {
+	responseChan := make(chan *UpdateRuleResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.UpdateRule(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// UpdateRuleWithCallback invokes the iot.UpdateRule API asynchronously
+// api document: https://help.aliyun.com/api/iot/updaterule.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UpdateRuleWithCallback(request *UpdateRuleRequest, callback func(response *UpdateRuleResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *UpdateRuleResponse
+		var err error
+		defer close(result)
+		response, err = client.UpdateRule(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// UpdateRuleRequest is the request struct for api UpdateRule
+type UpdateRuleRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string           `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string           `position:"Query" name:"IotInstanceId"`
+	RuleId        requests.Integer `position:"Query" name:"RuleId"`
+	Select        string           `position:"Query" name:"Select"`
+	ShortTopic    string           `position:"Query" name:"ShortTopic"`
+	Where         string           `position:"Query" name:"Where"`
+	ProductKey    string           `position:"Query" name:"ProductKey"`
+	Name          string           `position:"Query" name:"Name"`
+	RuleDesc      string           `position:"Query" name:"RuleDesc"`
+	TopicType     requests.Integer `position:"Query" name:"TopicType"`
+}
+
+// UpdateRuleResponse is the response struct for api UpdateRule
+type UpdateRuleResponse struct {
+	*responses.BaseResponse
+	RequestId    string `json:"RequestId" xml:"RequestId"`
+	Success      bool   `json:"Success" xml:"Success"`
+	Code         string `json:"Code" xml:"Code"`
+	ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"`
+}
+
+// CreateUpdateRuleRequest creates a request to invoke UpdateRule API
+func CreateUpdateRuleRequest() (request *UpdateRuleRequest) {
+	request = &UpdateRuleRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "UpdateRule", "iot", "openAPI")
+	return
+}
+
+// CreateUpdateRuleResponse creates a response to parse from UpdateRule response
+func CreateUpdateRuleResponse() (response *UpdateRuleResponse) {
+	response = &UpdateRuleResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 110 - 0
services/iot/update_rule_action.go

@@ -0,0 +1,110 @@
+//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.
+
+package iot
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// UpdateRuleAction invokes the iot.UpdateRuleAction API synchronously
+// api document: https://help.aliyun.com/api/iot/updateruleaction.html
+func (client *Client) UpdateRuleAction(request *UpdateRuleActionRequest) (response *UpdateRuleActionResponse, err error) {
+	response = CreateUpdateRuleActionResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// UpdateRuleActionWithChan invokes the iot.UpdateRuleAction API asynchronously
+// api document: https://help.aliyun.com/api/iot/updateruleaction.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UpdateRuleActionWithChan(request *UpdateRuleActionRequest) (<-chan *UpdateRuleActionResponse, <-chan error) {
+	responseChan := make(chan *UpdateRuleActionResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.UpdateRuleAction(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// UpdateRuleActionWithCallback invokes the iot.UpdateRuleAction API asynchronously
+// api document: https://help.aliyun.com/api/iot/updateruleaction.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UpdateRuleActionWithCallback(request *UpdateRuleActionRequest, callback func(response *UpdateRuleActionResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *UpdateRuleActionResponse
+		var err error
+		defer close(result)
+		response, err = client.UpdateRuleAction(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// UpdateRuleActionRequest is the request struct for api UpdateRuleAction
+type UpdateRuleActionRequest struct {
+	*requests.RpcRequest
+	AccessKeyId   string           `position:"Query" name:"AccessKeyId"`
+	IotInstanceId string           `position:"Query" name:"IotInstanceId"`
+	ActionId      requests.Integer `position:"Query" name:"ActionId"`
+	Type          string           `position:"Query" name:"Type"`
+	Configuration string           `position:"Query" name:"Configuration"`
+}
+
+// UpdateRuleActionResponse is the response struct for api UpdateRuleAction
+type UpdateRuleActionResponse struct {
+	*responses.BaseResponse
+	RequestId    string `json:"RequestId" xml:"RequestId"`
+	Code         string `json:"Code" xml:"Code"`
+	Success      bool   `json:"Success" xml:"Success"`
+	ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"`
+}
+
+// CreateUpdateRuleActionRequest creates a request to invoke UpdateRuleAction API
+func CreateUpdateRuleActionRequest() (request *UpdateRuleActionRequest) {
+	request = &UpdateRuleActionRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "UpdateRuleAction", "iot", "openAPI")
+	return
+}
+
+// CreateUpdateRuleActionResponse creates a response to parse from UpdateRuleAction response
+func CreateUpdateRuleActionResponse() (response *UpdateRuleActionResponse) {
+	response = &UpdateRuleActionResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}