소스 검색

Merge branch 'master' into eci

Jackson Tian 6 년 전
부모
커밋
5a011d6155
100개의 변경된 파일4290개의 추가작업 그리고 468개의 파일을 삭제
  1. 24 0
      .github/ISSUE_TEMPLATE/Bug_Report.md
  2. 23 0
      .github/ISSUE_TEMPLATE/Bug_Report_zh.md
  3. 1 0
      .travis.yml
  4. 173 0
      ChangeLog.txt
  5. 12 12
      Gopkg.lock
  6. 2 2
      Gopkg.toml
  7. 7 0
      README.md
  8. 5 0
      README_zh.md
  9. 1 0
      appveyor.yml
  10. 12 7
      integration/api_test.go
  11. 29 0
      integration/base.go
  12. 67 0
      integration/core_test.go
  13. 12 0
      sdk/auth/credentials/sts_role_arn_credential.go
  14. 7 0
      sdk/auth/credentials/sts_role_arn_credential_test.go
  15. 1 1
      sdk/auth/signers/signer_ecs_ram_role.go
  16. 1 1
      sdk/auth/signers/signer_ecs_ram_role_test.go
  17. 3 0
      sdk/auth/signers/signer_ram_role_arn.go
  18. 1 1
      sdk/auth/signers/signer_ram_role_arn_test.go
  19. 146 3
      sdk/client.go
  20. 92 11
      sdk/client_test.go
  21. 42 42
      sdk/config_test.go
  22. 1 1
      sdk/errors/server_error_test.go
  23. 1 1
      sdk/errors/signature_does_not_match_wrapper.go
  24. 1 1
      sdk/errors/signature_does_not_match_wrapper_test.go
  25. 58 9
      sdk/requests/acs_request.go
  26. 55 0
      sdk/requests/acs_request_test.go
  27. 2 2
      sdk/requests/roa_request.go
  28. 7 2
      sdk/responses/json_parser.go
  29. 2 20
      sdk/utils/utils.go
  30. 0 33
      sdk/utils/utils_test.go
  31. 81 0
      services/actiontrail/client.go
  32. 117 0
      services/actiontrail/create_trail.go
  33. 103 0
      services/actiontrail/delete_trail.go
  34. 103 0
      services/actiontrail/describe_regions.go
  35. 105 0
      services/actiontrail/describe_trails.go
  36. 108 0
      services/actiontrail/get_trail_status.go
  37. 120 0
      services/actiontrail/lookup_events.go
  38. 105 0
      services/actiontrail/start_logging.go
  39. 105 0
      services/actiontrail/stop_logging.go
  40. 21 0
      services/actiontrail/struct_events.go
  41. 21 0
      services/actiontrail/struct_region.go
  42. 21 0
      services/actiontrail/struct_region_item.go
  43. 21 0
      services/actiontrail/struct_regions.go
  44. 21 0
      services/actiontrail/struct_trail_list.go
  45. 32 0
      services/actiontrail/struct_trail_list_item.go
  46. 119 0
      services/actiontrail/update_trail.go
  47. 115 0
      services/bssopenapi/apply_invoice.go
  48. 5 5
      services/bssopenapi/get_order_detail.go
  49. 5 5
      services/bssopenapi/query_available_instances.go
  50. 116 0
      services/bssopenapi/query_bill.go
  51. 110 0
      services/bssopenapi/query_bill_overview.go
  52. 107 0
      services/bssopenapi/query_customer_address_list.go
  53. 120 0
      services/bssopenapi/query_evaluate_list.go
  54. 115 0
      services/bssopenapi/query_instance_bill.go
  55. 5 5
      services/bssopenapi/query_instance_gaap_cost.go
  56. 107 0
      services/bssopenapi/query_invoicing_customer_list.go
  57. 5 5
      services/bssopenapi/query_monthly_instance_consumption.go
  58. 5 5
      services/bssopenapi/query_orders.go
  59. 108 0
      services/bssopenapi/query_price.go
  60. 5 5
      services/bssopenapi/query_product_list.go
  61. 5 5
      services/bssopenapi/query_redeem.go
  62. 5 5
      services/bssopenapi/query_settlement_bill.go
  63. 21 0
      services/bssopenapi/struct_applicable_products.go
  64. 40 0
      services/bssopenapi/struct_customer_invoice.go
  65. 32 0
      services/bssopenapi/struct_customer_invoice_address.go
  66. 21 0
      services/bssopenapi/struct_customer_invoice_address_list.go
  67. 21 0
      services/bssopenapi/struct_customer_invoice_list.go
  68. 52 43
      services/bssopenapi/struct_data.go
  69. 0 25
      services/bssopenapi/struct_data_in_get_order_detail.go
  70. 0 24
      services/bssopenapi/struct_data_in_query_available_instances.go
  71. 0 25
      services/bssopenapi/struct_data_in_query_instance_gaap_cost.go
  72. 0 25
      services/bssopenapi/struct_data_in_query_monthly_instance_consumption.go
  73. 0 25
      services/bssopenapi/struct_data_in_query_orders.go
  74. 0 24
      services/bssopenapi/struct_data_in_query_product_list.go
  75. 24 0
      services/bssopenapi/struct_data_in_query_redeem.go
  76. 0 25
      services/bssopenapi/struct_data_in_query_settlement_bill.go
  77. 41 0
      services/bssopenapi/struct_evaluate.go
  78. 21 0
      services/bssopenapi/struct_evaluate_list.go
  79. 29 26
      services/bssopenapi/struct_instance.go
  80. 33 0
      services/bssopenapi/struct_instance_in_query_resource_package_instances.go
  81. 1 1
      services/bssopenapi/struct_instances.go
  82. 5 2
      services/bssopenapi/struct_item.go
  83. 45 0
      services/bssopenapi/struct_item_in_query_instance_bill.go
  84. 21 0
      services/bssopenapi/struct_items_in_query_bill.go
  85. 21 0
      services/bssopenapi/struct_items_in_query_bill_overview.go
  86. 21 0
      services/bssopenapi/struct_items_in_query_instance_bill.go
  87. 112 0
      services/cdn/batch_set_cdn_domain_server_certificate.go
  88. 106 0
      services/cdn/delete_specific_config.go
  89. 106 0
      services/cdn/describe_cdn_types.go
  90. 112 0
      services/cdn/describe_domain_cc_attack_info.go
  91. 3 3
      services/cdn/describe_domain_flow_data.go
  92. 114 0
      services/cdn/describe_domain_slow_ratio.go
  93. 5 5
      services/cdn/describe_domain_top_refer_visit.go
  94. 5 5
      services/cdn/describe_domain_top_url_visit.go
  95. 108 0
      services/cdn/describe_user_cdn_status.go
  96. 104 0
      services/cdn/describe_user_custom_log_config.go
  97. 19 12
      services/cdn/describe_user_domains.go
  98. 109 0
      services/cdn/modify_path_cache_expired_config.go
  99. 2 2
      services/cdn/push_object_cache.go
  100. 7 7
      services/cdn/set_path_cache_expired_config.go

+ 24 - 0
.github/ISSUE_TEMPLATE/Bug_Report.md

@@ -0,0 +1,24 @@
+---
+name: "Bug Report"
+about: Create a report to help us improve
+---
+
+<!--
+Thank you for reporting a possible bug in Alibaba Cloud GO SDK
+Please fill in as much of the template below as you can.
+
+Product and API: the product and API you are working on when bug occurs
+Platform: output of `uname -a` (UNIX), or version and 32 or 64-bit (Windows)
+How to Reproduce: If possible, please provide code that demonstrates the problem,
+keeping it as simple and free of external dependencies as you can.
+
+If crash, please provide the stack trace.
+
+If build error, please provide compiler information: compiler and version, etc
+-->
+
+* **Product and API**:
+* **Platform**:
+* **How to Reproduce**
+
+<!-- Please provide more details below this comment. -->

+ 23 - 0
.github/ISSUE_TEMPLATE/Bug_Report_zh.md

@@ -0,0 +1,23 @@
+---
+name: "缺陷问题反馈"
+about: 提交缺陷问题反馈
+
+---
+
+<!--
+感谢提交问题反馈。
+请提供尽量全面的信息协助问题定位修复。
+
+产品和接口:问题发生时工作所在的产品和调用的API
+最小代码: 如果可能,请提供一份最小问题复现代码
+平台:操作系统信息,类型,版本
+
+如果崩溃,请提供错误栈。
+如果编译出错,请提供 cmake 版本,编译器版本,编译命令等信息。
+-->
+
+* **产品和接口**:
+* **平台**:
+* **最小代码**:
+
+<!-- 请提供其他可能协助问题定位的信息 -->

+ 1 - 0
.travis.yml

@@ -3,6 +3,7 @@ language: go
 go:
   - 1.10.x
   - 1.11.x
+  - 1.12.x
 
 branches: # build only on these branches
   only:

+ 173 - 0
ChangeLog.txt

@@ -1,3 +1,176 @@
+2019-03-11 Version: 1.53.22
+1,  add agency infomation
+2,  update sdk core resources
+
+2019-03-11 Version: 1.53.21
+1, Add face grouping feature .
+2, Add head pose and face quality.
+
+
+2019-03-11 Version: 1.53.20
+1, Update aliyun-java-sdk-core version.
+
+2019-03-08 Version: 1.53.19
+1, Publish instance spec describe api.
+
+2019-03-08 Version: 1.53.18
+1, This is an example of release-log.
+2, Please strictly follow this format to edit in English.
+3, Format:Number + , + Space + Description
+
+2019-03-07 Version: 1.53.17
+1, Fix go api miss service_code problem
+
+2019-03-07 Version: 1.53.16
+1, Change service code to acr
+
+2019-03-07 Version: 1.53.15
+1, Publish instance describe and release apis.
+
+2019-03-06 Version: 1.53.14
+1, Release ActionTrail Go API.
+
+2019-03-06 Version: 1.53.13
+1, Update Service Code.
+
+2019-03-05 Version: 1.53.12
+1, Update the SDK version to 1.2.4
+
+2019-03-04 Version: 1.53.11
+1, This is an example of release-log.
+2, Please strictly follow this format to edit in English.
+3, Format:Number + , + Space + Description
+
+2019-03-01 Version: 1.53.10
+1, This is an example of release-log.
+2, Please strictly follow this format to edit in English.
+3, Format:Number + , + Space + Description
+
+2019-03-01 Version: 1.53.9
+1, Support Build Function Compute Backend By SDK
+
+2019-03-01 Version: 1.53.8
+1, Add API QueryRegionConfig
+2, Add API SynchronizeResource
+
+2019-02-28 Version: 1.53.7
+1, Add new apis named ListTranscodeTask, GetTranscodeTask, GetTranscodeSummary.
+2, Add the new field named TranscodeTemplateIds and ForceDelGroup to DeleteTranscodeTemplateGroup api request, and add a new field named NonExistTranscodeTemplateIds to the api response.
+3, Add a new field named Rotate in VideoStream of Mezzanine struct to GetMezzanineInfo api response .
+4, Add a new field named Status in ImageInfo to GetImageInfo api response.
+5, Add a new field named CustomMediaInfo to UpdateVideoInfo, GetVideoInfo and SearchMedia api to support the custom mediaInfo feature.
+6, Add a new filed named PlayInfoList and some Audit fields to SearchMedia api response.
+7, Clean up an api named DeleteTranscodeTemplates, which is replaced with the api named DeleteTranscodeTemplateGroup.
+
+2019-02-27 Version: 1.53.6
+1, Add three APIs for tag. APIs : TagResources, UntagResources, ListTagResources.
+
+2019-02-27 Version: 1.53.5
+1, Update Config API.
+
+2019-02-26 Version: 1.53.4
+1, Industry brain v1.3.7 release
+2, Add asynchronous APIs
+3, version 1.3.7
+
+2019-02-26 Version: 1.53.3
+1, Add interface of tag.
+2, Add tag info in DescribeDBClusters and DescribeDBClusterAttribute.
+
+2019-02-25 Version: 1.53.2
+1, add opensearch to GO sdk
+
+2019-02-22 Version: 1.53.1
+1, Fixed QueryAvailableInstances response unmarshal problem
+
+2019-02-21 Version: 1.53.0
+1, New DeleteDeviceGroup interface.
+2, New DeleteDeviceAllGroup interface.
+3, New GroupId fields for QuerySyncPicSchedule input parameter.
+4, New GroupId fields for QueryAddUserInfo input parameter.
+
+2019-02-20 Version: 1.52.2
+1, Add code and message to inovkeService API
+2, User could check code and message to get more specific information
+3, 1.0.0 alpha release
+
+2019-02-18 Version: 1.52.1
+1, Initialization release SDK. EDAS now supports SDK implemented by current programming language.
+
+2019-02-18 Version: 1.52.0
+1, Instantiation: adding the property of instance.
+2, Replace the "ProducerId" and "ConsumerId" properties with "GROUP_ID".
+3, Remove parameter OnsRegionId to simplified usage.
+
+2019-02-18 Version: 1.51.28
+1, industrial-brain release.
+2, publish SDK to public package stores.
+3, 1.0.0 including all APIs in doc.
+
+2019-02-18 Version: 1.51.27
+1, Add DryRun into StartInstance, StopInstance and RebootInstance.
+2, Add snapshot operations: ExportSnapshot and ImportSnapshot
+
+2019-02-17 Version: 1.51.26
+1,  API definition support 'ForceNonceCheck', 'DisableInternet' parameter settings
+
+
+2019-02-15 Version: 1.51.25
+1, Modify DescribeDBInstances LastDowngradeTime DataType
+
+2019-02-14 Version: 1.51.24
+1, Update DescribeCdnTypes.
+
+2019-02-14 Version: 1.51.23
+1, Update DescribeTopDomainsByFlow.
+
+2019-01-30 Version: 1.51.22
+1, Add a new api called GetURLUploadInfos to query the upload task of UploadMediaByURL.
+2, Clean up the old api related to the CDN of VoD that is going offline, such as DescribeDomainBpsData, is replaced with the new CDN api.
+3, Clean up the old AI related apis of VoD, such as SubmitAIASRJob, is replaced with the new AI api.
+4, Clean up an api called GetVideoPlayInfo, which is used by the old player SDKs that are no longer supported.
+5, Clean up some apis that used only by the VoD console to avoid misuse, such as OpenVodService.
+
+2019-01-30 Version: 1.51.21
+1, Add a new pop interface to support deleting item by skuId which is defined by users to distinguish items
+
+2019-01-30 Version: 1.51.20
+1, Add a new pop interface to support deleting item by skuId which is defined by users to distinguish items
+
+2019-01-30 Version: 1.51.19
+1, Add a new pop interface to support deleting item by skuId which is defined by users to distinguish items
+
+2019-01-30 Version: 1.51.18
+1, Add a new pop interface to support deleting item by skuId which is defined by users to distinguish items
+
+2019-01-30 Version: 1.51.17
+1, Add a new pop interface to support deleting item by skuId which is defined by users to distinguish items
+
+2019-01-29 Version: 1.51.16
+1, Add a new pop interface to support deleting item by skuId which is defined by users to distinguish items
+
+2019-01-29 Version: 1.51.15
+1, This is an example of release-log.
+2, Please strictly follow this format to edit in English.
+3, Format:Number + , + Space + Description
+
+2019-01-29 Version: 1.51.14
+1, Make obsolete api offline.
+2, Fix some bug.
+
+
+2019-01-28 Version: 1.51.13
+1, Release 3 new Alibaba Cloud Bill API(QueryBillOverview、QueryBill、QueryInstanceBill). 
+2, Kindly suggest replace to new APIs who is using the old ones(QueryMonthlyBill、QuerySettlementBill、QueryMonthlyInstanceConsumption).
+
+2019-01-28 Version: 1.51.12
+1, Support modify vSwitch of scalingGroup.
+2, Support new target tracking scaling rule.
+
+2019-01-28 Version: 1.51.11
+1, modify DescribeSlowLogs OpenApi.
+
+
 2019-01-23 Version: 1.51.10
 1, release new version
 

+ 12 - 12
Gopkg.lock

@@ -2,12 +2,12 @@
 
 
 [[projects]]
-  digest = "1:a2c1d0e43bd3baaa071d1b9ed72c27d78169b2b269f71c105ac4ba34b1be4a39"
+  digest = "1:ffe9824d294da03b391f44e1ae8281281b4afc1bdaa9588c9097785e3af10cec"
   name = "github.com/davecgh/go-spew"
   packages = ["spew"]
   pruneopts = "UT"
-  revision = "346938d642f2ec3594ed81d874461961cd0faa76"
-  version = "v1.1.0"
+  revision = "8991bc29aa16c548c550c7ff78260e27b9ab7c73"
+  version = "v1.1.1"
 
 [[projects]]
   digest = "1:b87714e57a511d88f307aba7d5b63522da12bed0a050889c81272fc50f71100e"
@@ -18,12 +18,12 @@
   version = "0.2.2"
 
 [[projects]]
-  digest = "1:b1d4df033414c1a0d85fa7037b9aaf03746314811c860a95ea2d5fd481cd6c35"
+  digest = "1:3e551bbb3a7c0ab2a2bf4660e7fcad16db089fdcfbb44b0199e62838038623ea"
   name = "github.com/json-iterator/go"
   packages = ["."]
   pruneopts = "UT"
-  revision = "ca39e5af3ece67bbcda3d0f4f56a8e24d9f2dad4"
-  version = "1.1.3"
+  revision = "1624edc4454b8682399def8740d46db5e4362ba4"
+  version = "v1.1.5"
 
 [[projects]]
   digest = "1:33422d238f147d247752996a26574ac48dcf472976eda7f5134015f06bf16563"
@@ -34,12 +34,12 @@
   version = "1.0.3"
 
 [[projects]]
-  digest = "1:d711dfcf661439f1ef0b202a02e8a1ff4deac48f26f34253520dcdbecbd7c5f1"
+  digest = "1:e32bdbdb7c377a07a9a46378290059822efdce5c8d96fe71940d87cb4f918855"
   name = "github.com/modern-go/reflect2"
   packages = ["."]
   pruneopts = "UT"
-  revision = "1df9eeb2bb81f327b96228865c5687bc2194af3f"
-  version = "1.0.0"
+  revision = "4b7aa43c6742a2c18fdef89dd197aaae7dac7ccd"
+  version = "1.0.1"
 
 [[projects]]
   digest = "1:0028cb19b2e4c3112225cd871870f2d9cf49b9b4276531f03438a88e94be86fe"
@@ -58,12 +58,12 @@
   version = "v1.2.0"
 
 [[projects]]
-  digest = "1:f85e109eda8f6080877185d1c39e98dd8795e1780c08beca28304b87fd855a1c"
+  digest = "1:972c2427413d41a1e06ca4897e8528e5a1622894050e2f527b38ddf0f343f759"
   name = "github.com/stretchr/testify"
   packages = ["assert"]
   pruneopts = "UT"
-  revision = "12b6f73e6084dad08a7c6e575284b177ecafbc71"
-  version = "v1.2.1"
+  revision = "ffdc059bfe9ce6a4e144ba849dbedead332c6053"
+  version = "v1.3.0"
 
 [solve-meta]
   analyzer-name = "dep"

+ 2 - 2
Gopkg.toml

@@ -36,7 +36,7 @@
 
 [[constraint]]
   name = "github.com/json-iterator/go"
-  version = "1.0.4"
+  version = "v1.1.5"
 
 [[constraint]]
   name = "github.com/satori/go.uuid"
@@ -44,7 +44,7 @@
 
 [[constraint]]
   name = "github.com/stretchr/testify"
-  version = "1.1.4"
+  version = "v1.3.0"
 
 [prune]
   go-tests = true

+ 7 - 0
README.md

@@ -1,5 +1,6 @@
 # Alibaba Cloud Go Software Development Kit
 
+[![Codacy Badge](https://api.codacy.com/project/badge/Grade/291a39e242364b04ad442f0cce0e30d5)](https://app.codacy.com/app/aliyun/alibaba-cloud-sdk-go?utm_source=github.com&utm_medium=referral&utm_content=aliyun/alibaba-cloud-sdk-go&utm_campaign=Badge_Grade_Dashboard)
 [![Travis Build Status](https://travis-ci.org/aliyun/alibaba-cloud-sdk-go.svg?branch=master)](https://travis-ci.org/aliyun/alibaba-cloud-sdk-go)
 [![Appveyor Build status](https://ci.appveyor.com/api/projects/status/hmhx3lawe4v2ii5c?svg=true)](https://ci.appveyor.com/project/wenzuochao/alibaba-cloud-sdk-go)
 [![Go Report Card](https://goreportcard.com/badge/github.com/aliyun/alibaba-cloud-sdk-go)](https://goreportcard.com/report/github.com/aliyun/alibaba-cloud-sdk-go)
@@ -92,6 +93,10 @@ func main() {
 
 When you create an instance of client, you need to fill out three parameters: `Region ID`、`Access Key ID` and `Access Key Secret`. You can get `Access Key ID` and `Access Key Secret` from console, and get `Region ID` from [region list](https://help.aliyun.com/document_detail/40654.html?spm=5176.doc52740.2.8.FogWrd)
 
+## Dubug
+
+If the request has occured an error, you can view the HTTP request process by adding the environment variable `DEBUG=sdk`.
+
 ## Keepalive
 Alibaba Cloud Go SDK uses primordial `net/http` of Go language to send and accept requests,so it's  configuration is the same as `net/http`'s,you can use config to deliver configuration to the bottomed httpClient.
 
@@ -190,6 +195,7 @@ func main() {
 
 	client, err := sdk.NewClientWithAccessKey("cn-hangzhou", os.Getenv("ACCESS_KEY_ID"), os.Getenv("ACCESS_KEY_SECRET"))
 	if err != nil {
+		// Handle exceptions
 		panic(err)
 	}
 
@@ -203,6 +209,7 @@ func main() {
 
 	response, err := client.ProcessCommonRequest(request)
 	if err != nil {
+		// Handle exceptions
 		panic(err)
 	}
 

+ 5 - 0
README_zh.md

@@ -83,6 +83,9 @@ func main() {
 
 在创建Client实例时,您需要填写3个参数:`Region ID`、`Access Key ID`和`Access Key Secret`。`Access Key ID`和`Access Key Secret`可以从控制台获得;而`Region ID`可以从[地域列表](https://help.aliyun.com/document_detail/40654.html?spm=5176.doc52740.2.8.FogWrd)中获得
 
+## Debug
+
+如果您发送的请求出错,您可以通过添加环境变量 `DEBUG=sdk` 来查看 HTTP 请求过程。
 
 ## Keepalive
 阿里云 Go SDK 底层使用 Go 语言原生的 `net/http` 收发请求,因此配置方式与 `net/http`相同,您可以通过 config 直接将配置传递给底层的 httpClient
@@ -182,6 +185,7 @@ func main() {
 
 	client, err := sdk.NewClientWithAccessKey("cn-hangzhou", os.Getenv("ACCESS_KEY_ID"), os.Getenv("ACCESS_KEY_SECRET"))
 	if err != nil {
+		// 异常处理
 		panic(err)
 	}
 
@@ -195,6 +199,7 @@ func main() {
 
 	response, err := client.ProcessCommonRequest(request)
 	if err != nil {
+		// 异常处理
 		panic(err)
 	}
 

+ 1 - 0
appveyor.yml

@@ -29,3 +29,4 @@ environment:
   matrix:
     - go: 1.10.x
     - go: 1.11.x
+    - go: 1.12.x

+ 12 - 7
integration/api_test.go

@@ -2,6 +2,7 @@ package integration
 
 import (
 	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/services/bssopenapi"
 	"github.com/aliyun/alibaba-cloud-sdk-go/services/cdn"
 	"github.com/aliyun/alibaba-cloud-sdk-go/services/cs"
 	"github.com/aliyun/alibaba-cloud-sdk-go/services/ecs"
@@ -9,7 +10,6 @@ import (
 	"github.com/aliyun/alibaba-cloud-sdk-go/services/rds"
 	"github.com/aliyun/alibaba-cloud-sdk-go/services/slb"
 	"github.com/aliyun/alibaba-cloud-sdk-go/services/vpc"
-
 	"github.com/stretchr/testify/assert"
 
 	"net/http"
@@ -30,7 +30,6 @@ func Test_DescribeClusteWithROArequestWithXMLWithGet(t *testing.T) {
 	request := cs.CreateDescribeClusterDetailRequest()
 	request.SetContentType("XML")
 	request.SetScheme("HTTPS")
-	request.SetDomain("cs.aliyuncs.com")
 	response, err := client.DescribeClusterDetail(request)
 	assert.NotNil(t, err)
 	assert.Equal(t, 400, response.GetHttpStatus())
@@ -43,7 +42,6 @@ func Test_ScaleClusterWithROArequestWithXMLWithPUT(t *testing.T) {
 	request := cs.CreateScaleClusterRequest()
 	request.SetContentType("XML")
 	request.SetScheme("HTTPS")
-	request.SetDomain("cs.aliyuncs.com")
 	response, err := client.ScaleCluster(request)
 	assert.NotNil(t, err)
 	assert.Equal(t, 400, response.GetHttpStatus())
@@ -56,7 +54,6 @@ func Test_CreateClusterTokenWithROArequestWithXMLWithPOST(t *testing.T) {
 	request := cs.CreateCreateClusterTokenRequest()
 	request.SetContentType("XML")
 	request.SetScheme("HTTPS")
-	request.SetDomain("cs.aliyuncs.com")
 	response, err := client.CreateClusterToken(request)
 	assert.NotNil(t, err)
 	assert.Equal(t, 400, response.GetHttpStatus())
@@ -69,7 +66,6 @@ func Test_DeleteClusterWithROArequestWithXMLWithDelete(t *testing.T) {
 	request := cs.CreateDeleteClusterRequest()
 	request.SetContentType("XML")
 	request.SetScheme("HTTPS")
-	request.SetDomain("cs.aliyuncs.com")
 	response, err := client.DeleteCluster(request)
 	assert.NotNil(t, err)
 	assert.Equal(t, 400, response.GetHttpStatus())
@@ -82,7 +78,6 @@ func Test_DeleteClusterWithROArequestWithJSONWithDelete(t *testing.T) {
 	request := cs.CreateDeleteClusterRequest()
 	request.SetContentType("JSON")
 	request.SetScheme("HTTPS")
-	request.SetDomain("cs.aliyuncs.com")
 	response, err := client.DeleteCluster(request)
 	assert.NotNil(t, err)
 	assert.Equal(t, 400, response.GetHttpStatus())
@@ -95,7 +90,6 @@ func Test_ScaleClusterWithROArequestWithJSONWithPUT(t *testing.T) {
 	request := cs.CreateScaleClusterRequest()
 	request.SetContentType("JSON")
 	request.SetScheme("HTTPS")
-	request.SetDomain("cs.aliyuncs.com")
 	response, err := client.ScaleCluster(request)
 	assert.NotNil(t, err)
 	assert.Equal(t, 400, response.GetHttpStatus())
@@ -264,3 +258,14 @@ func Test_DescribeRegionsWithRPCrequestWith3XX(t *testing.T) {
 	assert.Equal(t, 307, response.GetHttpStatus())
 	assert.Equal(t, "{\"error\"}", response.GetHttpContentString())
 }
+
+func Test_QueryAvaliableInstances(t *testing.T) {
+	client, err := bssopenapi.NewClientWithAccessKey(os.Getenv("REGION_ID"), os.Getenv("ACCESS_KEY_ID"), os.Getenv("ACCESS_KEY_SECRET"))
+	assert.Nil(t, err)
+	request := bssopenapi.CreateQueryAvailableInstancesRequest()
+	request.Domain = "business.aliyuncs.com"
+	response, err := client.QueryAvailableInstances(request)
+	assert.Nil(t, err)
+	assert.True(t, response.IsSuccess())
+	assert.Equal(t, 36, len(response.RequestId))
+}

+ 29 - 0
integration/base.go

@@ -111,6 +111,35 @@ func createAttachPolicyToUser() error {
 	return nil
 }
 
+func createAttachPolicyToRole() error {
+	listRequest := ram.CreateListPoliciesForRoleRequest()
+	listRequest.RoleName = rolename
+	listRequest.Scheme = "HTTPS"
+	client, err := ram.NewClientWithAccessKey(os.Getenv("REGION_ID"), os.Getenv("ACCESS_KEY_ID"), os.Getenv("ACCESS_KEY_SECRET"))
+	if err != nil {
+		return err
+	}
+	listResponse, err := client.ListPoliciesForRole(listRequest)
+	if err != nil {
+		return err
+	}
+	for _, policy := range listResponse.Policies.Policy {
+		if policy.PolicyName == "AdministratorAccess" {
+			return nil
+		}
+	}
+	createRequest := ram.CreateAttachPolicyToRoleRequest()
+	createRequest.Scheme = "HTTPS"
+	createRequest.PolicyName = "AdministratorAccess"
+	createRequest.RoleName = rolename
+	createRequest.PolicyType = "System"
+	_, err = client.AttachPolicyToRole(createRequest)
+	if err != nil {
+		return err
+	}
+	return nil
+}
+
 func createAccessKey() (string, string, error) {
 	client, err := ram.NewClientWithAccessKey(os.Getenv("REGION_ID"), os.Getenv("ACCESS_KEY_ID"), os.Getenv("ACCESS_KEY_SECRET"))
 	if err != nil {

+ 67 - 0
integration/core_test.go

@@ -3,6 +3,7 @@ package integration
 import (
 	"os"
 	"testing"
+	"time"
 
 	"github.com/aliyun/alibaba-cloud-sdk-go/sdk"
 
@@ -137,3 +138,69 @@ func Test_DescribeClusterDetailWithCommonRequestWithROAWithHTTPS(t *testing.T) {
 	assert.NotNil(t, err)
 	assert.Contains(t, err.Error(), "Request url is invalid")
 }
+
+func Test_DescribeClusterDetailWithCommonRequestWithTimeout(t *testing.T) {
+	client, err := sdk.NewClientWithAccessKey(os.Getenv("REGION_ID"), os.Getenv("ACCESS_KEY_ID"), os.Getenv("ACCESS_KEY_SECRET"))
+	assert.Nil(t, err)
+	request := requests.NewCommonRequest()
+	request.Domain = "cs.aliyuncs.com"
+	request.Version = "2015-12-15"
+	request.SetScheme("HTTPS")
+	request.PathPattern = "/clusters/[ClusterId]"
+	request.QueryParams["RegionId"] = os.Getenv("REGION_ID")
+	request.ReadTimeout = 1 * time.Millisecond
+	request.ConnectTimeout = 1 * time.Millisecond
+	request.TransToAcsRequest()
+	_, err = client.ProcessCommonRequest(request)
+	assert.NotNil(t, err)
+	assert.Contains(t, err.Error(), "Connect timeout. Please set a valid ConnectTimeout.")
+
+	request.ConnectTimeout = 1 * time.Second
+	_, err = client.ProcessCommonRequest(request)
+	assert.NotNil(t, err)
+	assert.Contains(t, err.Error(), "Read timeout. Please set a valid ReadTimeout.")
+}
+
+func Test_CreateInstanceWithCommonRequestWithPolicy(t *testing.T) {
+	err := createAttachPolicyToRole()
+	assert.Nil(t, err)
+
+	subaccesskeyid, subaccesskeysecret, err := createAccessKey()
+	assert.Nil(t, err)
+	client, err := sdk.NewClientWithRamRoleArnAndPolicy(os.Getenv("REGION_ID"), subaccesskeyid, subaccesskeysecret, rolearn, "alice_test", "")
+	assert.Nil(t, err)
+	request := requests.NewCommonRequest()
+	request.Method = "POST"
+	request.Product = "Ecs"
+	request.Domain = "ecs.aliyuncs.com"
+	request.Version = "2014-05-26"
+	request.SetScheme("HTTPS")
+	request.ApiName = "CreateInstance"
+	request.QueryParams["ImageId"] = "win2008r2_64_ent_sp1_en-us_40G_alibase_20170915.vhd"
+	request.QueryParams["InstanceType"] = "ecs.g5.large"
+	request.TransToAcsRequest()
+	_, err = client.ProcessCommonRequest(request)
+	assert.NotNil(t, err)
+	assert.Contains(t, err.Error(), "This resource type is not supported; please try other resource types.")
+
+	policy := `{
+    "Version": "1",
+    "Statement": [
+        {
+            "Action": "rds:*",
+            "Resource": "*",
+            "Effect": "Allow"
+        },
+        {
+            "Action": "dms:LoginDatabase",
+            "Resource": "acs:rds:*:*:*",
+            "Effect": "Allow"
+        }
+    ]
+}`
+	client, err = sdk.NewClientWithRamRoleArnAndPolicy(os.Getenv("REGION_ID"), subaccesskeyid, subaccesskeysecret, rolearn, "alice_test", policy)
+	assert.Nil(t, err)
+	_, err = client.ProcessCommonRequest(request)
+	assert.NotNil(t, err)
+	assert.Contains(t, err.Error(), "User not authorized to operate on the specified resource, or this API doesn't support RAM.")
+}

+ 12 - 0
sdk/auth/credentials/sts_role_arn_credential.go

@@ -15,6 +15,7 @@ type RamRoleArnCredential struct {
 	RoleArn               string
 	RoleSessionName       string
 	RoleSessionExpiration int
+	Policy                string
 }
 
 // Deprecated: Use RamRoleArnCredential in this package instead.
@@ -47,3 +48,14 @@ func NewRamRoleArnCredential(accessKeyId, accessKeySecret, roleArn, roleSessionN
 		RoleSessionExpiration: roleSessionExpiration,
 	}
 }
+
+func NewRamRoleArnWithPolicyCredential(accessKeyId, accessKeySecret, roleArn, roleSessionName, policy string, roleSessionExpiration int) *RamRoleArnCredential {
+	return &RamRoleArnCredential{
+		AccessKeyId:           accessKeyId,
+		AccessKeySecret:       accessKeySecret,
+		RoleArn:               roleArn,
+		RoleSessionName:       roleSessionName,
+		RoleSessionExpiration: roleSessionExpiration,
+		Policy:                policy,
+	}
+}

+ 7 - 0
sdk/auth/credentials/sts_role_arn_credential_test.go

@@ -25,4 +25,11 @@ func TestRoleArnCredential(t *testing.T) {
 	assert.Equal(t, "roleArn", r.RoleArn)
 	assert.Equal(t, "roleSessionName", r.RoleSessionName)
 	assert.Equal(t, 3600, r.RoleSessionExpiration)
+	p := NewRamRoleArnWithPolicyCredential("accessKeyId", "accessKeySecret", "roleArn", "roleSessionName", "test", 3600)
+	assert.Equal(t, "accessKeyId", p.AccessKeyId)
+	assert.Equal(t, "accessKeySecret", p.AccessKeySecret)
+	assert.Equal(t, "roleArn", p.RoleArn)
+	assert.Equal(t, "test", p.Policy)
+	assert.Equal(t, "roleSessionName", p.RoleSessionName)
+	assert.Equal(t, 3600, p.RoleSessionExpiration)
 }

+ 1 - 1
sdk/auth/signers/signer_ecs_ram_role.go

@@ -88,7 +88,7 @@ func (signer *EcsRamRoleSigner) GetExtraParam() map[string]string {
 }
 
 func (signer *EcsRamRoleSigner) Sign(stringToSign, secretSuffix string) string {
-	secret := signer.sessionCredential.AccessKeyId + secretSuffix
+	secret := signer.sessionCredential.AccessKeySecret + secretSuffix
 	return ShaHmac1(stringToSign, secret)
 }
 

+ 1 - 1
sdk/auth/signers/signer_ecs_ram_role_test.go

@@ -177,7 +177,7 @@ func Test_EcsRamRoleSigner_GetAccessKeyId_Success(t *testing.T) {
 	// the expiration should not changed. hit cache
 	assert.Equal(t, expiration, s.credentialExpiration)
 
-	assert.Equal(t, "1cZAkOls5YUecgvzbeEbfGy1wFw=", s.Sign("string to sign", "/"))
+	assert.Equal(t, "dcM4bWGEoD5QUp9xhLW3SfcWfgs=", s.Sign("string to sign", "/"))
 	s.sessionCredential.StsToken = ""
 	assert.Len(t, s.GetExtraParam(), 0)
 }

+ 3 - 0
sdk/auth/signers/signer_ram_role_arn.go

@@ -119,6 +119,9 @@ func (signer *RamRoleArnSigner) buildCommonRequest() (request *requests.CommonRe
 	request.ApiName = "AssumeRole"
 	request.Scheme = requests.HTTPS
 	request.QueryParams["RoleArn"] = signer.credential.RoleArn
+	if signer.credential.Policy != "" {
+		request.QueryParams["Policy"] = signer.credential.Policy
+	}
 	request.QueryParams["RoleSessionName"] = signer.credential.RoleSessionName
 	request.QueryParams["DurationSeconds"] = strconv.Itoa(signer.credentialExpiration)
 	return

+ 1 - 1
sdk/auth/signers/signer_ram_role_arn_test.go

@@ -176,7 +176,7 @@ func Test_RamRoleArn_GetAccessKeyIdAndSign(t *testing.T) {
 }
 
 func Test_RamRoleArn_GetExtraParam_Fail(t *testing.T) {
-	c := credentials.NewRamRoleArnCredential("accessKeyId", "accessKeySecret", "roleArn", "roleSessionName", 3600)
+	c := credentials.NewRamRoleArnWithPolicyCredential("accessKeyId", "accessKeySecret", "roleArn", "roleSessionName", "policy", 3600)
 	// mock 200 response and valid json and valid result
 	s, err := NewRamRoleArnSigner(c, func(*requests.CommonRequest, interface{}) (response *responses.CommonResponse, err error) {
 		res := responses.NewCommonResponse()

+ 146 - 3
sdk/client.go

@@ -15,11 +15,15 @@
 package sdk
 
 import (
+	"context"
 	"fmt"
+	"net"
 	"net/http"
+	"runtime"
 	"strconv"
 	"strings"
 	"sync"
+	"time"
 
 	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth"
 	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth/credentials"
@@ -38,6 +42,10 @@ func init() {
 
 // Version this value will be replaced while build: -ldflags="-X sdk.version=x.x.x"
 var Version = "0.0.1"
+var defaultConnectTimeout = 10 * time.Second
+var defaultReadTimeout = 5 * time.Second
+
+var DefaultUserAgent = fmt.Sprintf("AlibabaCloud (%s; %s) Golang/%s Core/%s", runtime.GOOS, runtime.GOARCH, strings.Trim(runtime.Version(), "go"), Version)
 
 var hookDo = func(fn func(req *http.Request) (*http.Response, error)) func(req *http.Request) (*http.Response, error) {
 	return fn
@@ -47,9 +55,12 @@ var hookDo = func(fn func(req *http.Request) (*http.Response, error)) func(req *
 type Client struct {
 	regionId       string
 	config         *Config
+	userAgent      map[string]string
 	signer         auth.Signer
 	httpClient     *http.Client
 	asyncTaskQueue chan func()
+	readTimeout    time.Duration
+	connectTimeout time.Duration
 
 	debug     bool
 	isRunning bool
@@ -85,6 +96,22 @@ func (client *Client) InitWithOptions(regionId string, config *Config, credentia
 	return
 }
 
+func (client *Client) SetReadTimeout(readTimeout time.Duration) {
+	client.readTimeout = readTimeout
+}
+
+func (client *Client) SetConnectTimeout(connectTimeout time.Duration) {
+	client.connectTimeout = connectTimeout
+}
+
+func (client *Client) GetReadTimeout() time.Duration {
+	return client.readTimeout
+}
+
+func (client *Client) GetConnectTimeout() time.Duration {
+	return client.connectTimeout
+}
+
 // EnableAsync enable the async task queue
 func (client *Client) EnableAsync(routinePoolSize, maxTaskQueueSize int) {
 	client.asyncTaskQueue = make(chan func(), maxTaskQueueSize)
@@ -132,6 +159,18 @@ func (client *Client) InitWithRamRoleArn(regionId, accessKeyId, accessKeySecret,
 	return client.InitWithOptions(regionId, config, credential)
 }
 
+func (client *Client) InitWithRamRoleArnAndPolicy(regionId, accessKeyId, accessKeySecret, roleArn, roleSessionName, policy string) (err error) {
+	config := client.InitClientConfig()
+	credential := &credentials.RamRoleArnCredential{
+		AccessKeyId:     accessKeyId,
+		AccessKeySecret: accessKeySecret,
+		RoleArn:         roleArn,
+		RoleSessionName: roleSessionName,
+		Policy:          policy,
+	}
+	return client.InitWithOptions(regionId, config, credential)
+}
+
 func (client *Client) InitWithRsaKeyPair(regionId, publicKeyId, privateKey string, sessionExpiration int) (err error) {
 	config := client.InitClientConfig()
 	credential := &credentials.RsaKeyPairCredential{
@@ -202,22 +241,113 @@ func (client *Client) buildRequestWithSigner(request requests.AcsRequest, signer
 		finalSigner = client.signer
 	}
 	httpRequest, err = buildHttpRequest(request, finalSigner, regionId)
-	if client.config.UserAgent != "" {
-		httpRequest.Header.Set("User-Agent", client.config.UserAgent)
+	if err == nil {
+		userAgent := DefaultUserAgent + getSendUserAgent(client.config.UserAgent, client.userAgent, request.GetUserAgent())
+		httpRequest.Header.Set("User-Agent", userAgent)
 	}
+
 	return
 }
 
+func getSendUserAgent(configUserAgent string, clientUserAgent, requestUserAgent map[string]string) string {
+	realUserAgent := ""
+	for key1, value1 := range clientUserAgent {
+		for key2, _ := range requestUserAgent {
+			if key1 == key2 {
+				key1 = ""
+			}
+		}
+		if key1 != "" {
+			realUserAgent += fmt.Sprintf(" %s/%s", key1, value1)
+
+		}
+	}
+	for key, value := range requestUserAgent {
+		realUserAgent += fmt.Sprintf(" %s/%s", key, value)
+	}
+	if configUserAgent != "" {
+		return realUserAgent + fmt.Sprintf(" Extra/%s", configUserAgent)
+	}
+	return realUserAgent
+}
+
+func (client *Client) AppendUserAgent(key, value string) {
+	newkey := true
+
+	if client.userAgent == nil {
+		client.userAgent = make(map[string]string)
+	}
+	if strings.ToLower(key) != "core" && strings.ToLower(key) != "go" {
+		for tag, _ := range client.userAgent {
+			if tag == key {
+				client.userAgent[tag] = value
+				newkey = false
+			}
+		}
+		if newkey {
+			client.userAgent[key] = value
+		}
+	}
+}
+
 func (client *Client) BuildRequestWithSigner(request requests.AcsRequest, signer auth.Signer) (err error) {
 	_, err = client.buildRequestWithSigner(request, signer)
 	return
 }
 
+func (client *Client) getTimeout(request requests.AcsRequest) (time.Duration, time.Duration) {
+	readTimeout := defaultReadTimeout
+	connectTimeout := defaultConnectTimeout
+
+	reqReadTimeout := request.GetReadTimeout()
+	reqConnectTimeout := request.GetConnectTimeout()
+	if reqReadTimeout != 0*time.Millisecond {
+		readTimeout = reqReadTimeout
+	} else if client.readTimeout != 0*time.Millisecond {
+		readTimeout = client.readTimeout
+	}
+
+	if reqConnectTimeout != 0*time.Millisecond {
+		connectTimeout = reqConnectTimeout
+	} else if client.connectTimeout != 0*time.Millisecond {
+		connectTimeout = client.connectTimeout
+	}
+	return readTimeout, connectTimeout
+}
+
+func Timeout(connectTimeout, readTimeout time.Duration) func(cxt context.Context, net, addr string) (c net.Conn, err error) {
+	return func(ctx context.Context, network, address string) (net.Conn, error) {
+		conn, err := (&net.Dialer{
+			Timeout:   connectTimeout,
+			KeepAlive: 0 * time.Second,
+			DualStack: true,
+		}).DialContext(ctx, network, address)
+
+		if err == nil {
+			conn.SetDeadline(time.Now().Add(readTimeout))
+		}
+
+		return conn, err
+	}
+}
+func (client *Client) setTimeout(request requests.AcsRequest) {
+	readTimeout, connectTimeout := client.getTimeout(request)
+	if trans, ok := client.httpClient.Transport.(*http.Transport); ok && trans != nil {
+		trans.DialContext = Timeout(connectTimeout, readTimeout)
+		client.httpClient.Transport = trans
+	} else {
+		client.httpClient.Transport = &http.Transport{
+			DialContext: Timeout(connectTimeout, readTimeout),
+		}
+	}
+}
 func (client *Client) DoActionWithSigner(request requests.AcsRequest, response responses.AcsResponse, signer auth.Signer) (err error) {
 	httpRequest, err := client.buildRequestWithSigner(request, signer)
 	if err != nil {
 		return
 	}
+	client.setTimeout(request)
+
 	var httpResponse *http.Response
 	for retryTimes := 0; retryTimes <= client.config.MaxRetryTime; retryTimes++ {
 		debug("> %s %s %s", httpRequest.Method, httpRequest.URL.RequestURI(), httpRequest.Proto)
@@ -240,13 +370,19 @@ func (client *Client) DoActionWithSigner(request requests.AcsRequest, response r
 				return
 			} else if retryTimes >= client.config.MaxRetryTime {
 				// timeout but reached the max retry times, return
-				timeoutErrorMsg := fmt.Sprintf(errors.TimeoutErrorMessage, strconv.Itoa(retryTimes+1), strconv.Itoa(retryTimes+1))
+				var timeoutErrorMsg string
+				if strings.Contains(err.Error(), "read tcp") {
+					timeoutErrorMsg = fmt.Sprintf(errors.TimeoutErrorMessage, strconv.Itoa(retryTimes+1), strconv.Itoa(retryTimes+1)) + " Read timeout. Please set a valid ReadTimeout."
+				} else {
+					timeoutErrorMsg = fmt.Sprintf(errors.TimeoutErrorMessage, strconv.Itoa(retryTimes+1), strconv.Itoa(retryTimes+1)) + " Connect timeout. Please set a valid ConnectTimeout."
+				}
 				err = errors.NewClientError(errors.TimeoutErrorCode, timeoutErrorMsg, err)
 				return
 			}
 		}
 		//  if status code >= 500 or timeout, will trigger retry
 		if client.config.AutoRetry && (err != nil || isServerError(httpResponse)) {
+			client.setTimeout(request)
 			// rewrite signatureNonce and signature
 			httpRequest, err = client.buildRequestWithSigner(request, signer)
 			// buildHttpRequest(request, finalSigner, regionId)
@@ -257,6 +393,7 @@ func (client *Client) DoActionWithSigner(request requests.AcsRequest, response r
 		}
 		break
 	}
+
 	err = responses.Unmarshal(response, httpResponse, request.GetAcceptFormat())
 	// wrap server errors
 	if serverErr, ok := err.(*errors.ServerError); ok {
@@ -345,6 +482,12 @@ func NewClientWithRamRoleArn(regionId string, accessKeyId, accessKeySecret, role
 	return
 }
 
+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
+}
+
 func NewClientWithEcsRamRole(regionId string, roleName string) (client *Client, err error) {
 	client = &Client{}
 	err = client.InitWithEcsRamRole(regionId, roleName)

+ 92 - 11
sdk/client_test.go

@@ -81,6 +81,12 @@ func Test_NewClientWithOptions(t *testing.T) {
 	assert.NotNil(t, client)
 }
 
+func Test_NewClientWithPolicy(t *testing.T) {
+	client, err := NewClientWithRamRoleArnAndPolicy("regionid", "acesskeyid", "accesskeysecret", "roleArn", "sessionName", "policy")
+	assert.Nil(t, err)
+	assert.NotNil(t, client)
+}
+
 func Test_NewClientWithAccessKey(t *testing.T) {
 	client, err := NewClientWithAccessKey("regionid", "acesskeyid", "accesskeysecret")
 	assert.Nil(t, err)
@@ -169,17 +175,38 @@ func Test_DoAction_Timeout(t *testing.T) {
 	request.QueryParams["PageSize"] = "30"
 	request.TransToAcsRequest()
 	response := responses.NewCommonResponse()
-	origTestHookDo := hookDo
-	defer func() { hookDo = origTestHookDo }()
-	hookDo = func(fn func(req *http.Request) (*http.Response, error)) func(req *http.Request) (*http.Response, error) {
-		return func(req *http.Request) (*http.Response, error) {
-			return mockResponse(200, "")
-		}
-	}
 	err = client.DoAction(request, response)
-	assert.Nil(t, err)
-	assert.Equal(t, 200, response.GetHttpStatus())
-	assert.Equal(t, "", response.GetHttpContentString())
+	assert.NotNil(t, err)
+	assert.Contains(t, err.Error(), "Specified access key is not found.")
+
+	client.SetReadTimeout(1 * time.Millisecond)
+	assert.Equal(t, 1*time.Millisecond, client.GetReadTimeout())
+	err = client.DoAction(request, response)
+	assert.NotNil(t, err)
+	assert.Contains(t, err.Error(), "Read timeout. Please set a valid ReadTimeout.")
+
+	client.SetConnectTimeout(1 * time.Millisecond)
+	assert.Equal(t, 1*time.Millisecond, client.GetConnectTimeout())
+	err = client.DoAction(request, response)
+	assert.NotNil(t, err)
+	assert.Contains(t, err.Error(), "Connect timeout. Please set a valid ConnectTimeout.")
+
+	client.SetReadTimeout(10 * time.Second)
+	client.SetConnectTimeout(10 * time.Second)
+	err = client.DoAction(request, response)
+	assert.NotNil(t, err)
+	assert.Contains(t, err.Error(), "Specified access key is not found.")
+
+	request.SetReadTimeout(1 * time.Millisecond)
+	err = client.DoAction(request, response)
+	assert.NotNil(t, err)
+	assert.Contains(t, err.Error(), "Read timeout. Please set a valid ReadTimeout.")
+
+	request.SetConnectTimeout(1 * time.Millisecond)
+	err = client.DoAction(request, response)
+	assert.NotNil(t, err)
+	assert.Contains(t, err.Error(), "Connect timeout. Please set a valid ConnectTimeout.")
+
 	client.Shutdown()
 	assert.Equal(t, false, client.isRunning)
 }
@@ -274,7 +301,6 @@ func TestClient_BuildRequestWithSigner1(t *testing.T) {
 	signer := &signertest{
 		name: "signer",
 	}
-	client.config.UserAgent = "user_agent"
 	err = client.BuildRequestWithSigner(request, signer)
 	assert.Nil(t, err)
 }
@@ -299,6 +325,61 @@ func TestClient_ProcessCommonRequestWithSigner(t *testing.T) {
 	assert.NotNil(t, err)
 }
 
+func TestClient_AppendUserAgent(t *testing.T) {
+	client, err := NewClientWithAccessKey("regionid", "acesskeyid", "accesskeysecret")
+	assert.Nil(t, err)
+	assert.NotNil(t, client)
+	assert.Equal(t, true, client.isRunning)
+	request := requests.NewCommonRequest()
+	request.Domain = "ecs.aliyuncs.com"
+	request.Version = "2014-05-26"
+	request.ApiName = "DescribeInstanceStatus"
+
+	request.RegionId = "regionid"
+	signer := &signertest{
+		name: "signer",
+	}
+	request.TransToAcsRequest()
+	httpRequest, err := client.buildRequestWithSigner(request, signer)
+	assert.Nil(t, err)
+	assert.Equal(t, DefaultUserAgent, httpRequest.Header.Get("User-Agent"))
+
+	client.AppendUserAgent("test", "1.01")
+	httpRequest, err = client.buildRequestWithSigner(request, signer)
+	assert.Equal(t, DefaultUserAgent+" test/1.01", httpRequest.Header.Get("User-Agent"))
+
+	request.AppendUserAgent("test", "2.01")
+	httpRequest, err = client.buildRequestWithSigner(request, signer)
+	assert.Equal(t, DefaultUserAgent+" test/2.01", httpRequest.Header.Get("User-Agent"))
+
+	request.AppendUserAgent("test", "2.02")
+	httpRequest, err = client.buildRequestWithSigner(request, signer)
+	assert.Equal(t, DefaultUserAgent+" test/2.02", httpRequest.Header.Get("User-Agent"))
+
+	client.AppendUserAgent("test", "2.01")
+	httpRequest, err = client.buildRequestWithSigner(request, signer)
+	assert.Equal(t, DefaultUserAgent+" test/2.02", httpRequest.Header.Get("User-Agent"))
+
+	client.AppendUserAgent("core", "1.01")
+	httpRequest, err = client.buildRequestWithSigner(request, signer)
+	assert.Equal(t, DefaultUserAgent+" test/2.02", httpRequest.Header.Get("User-Agent"))
+
+	request.AppendUserAgent("core", "1.01")
+	httpRequest, err = client.buildRequestWithSigner(request, signer)
+	assert.Equal(t, DefaultUserAgent+" test/2.02", httpRequest.Header.Get("User-Agent"))
+
+	request1 := requests.NewCommonRequest()
+	request1.Domain = "ecs.aliyuncs.com"
+	request1.Version = "2014-05-26"
+	request1.ApiName = "DescribeRegions"
+	request1.RegionId = "regionid"
+	request1.AppendUserAgent("sys", "1.01")
+	request1.TransToAcsRequest()
+	httpRequest, err = client.buildRequestWithSigner(request1, signer)
+	assert.Nil(t, err)
+	assert.Equal(t, DefaultUserAgent+" test/2.01 sys/1.01", httpRequest.Header.Get("User-Agent"))
+}
+
 func TestClient_ProcessCommonRequestWithSigner_Error(t *testing.T) {
 	client, err := NewClientWithAccessKey("regionid", "acesskeyid", "accesskeysecret")
 	assert.Nil(t, err)

+ 42 - 42
sdk/config_test.go

@@ -1,52 +1,52 @@
 package sdk
 
 import (
-  "net/http"
-  "testing"
-  "time"
+	"net/http"
+	"testing"
+	"time"
 
-  "github.com/stretchr/testify/assert"
+	"github.com/stretchr/testify/assert"
 )
 
 func Test_Config(t *testing.T) {
-  config := NewConfig()
-  assert.NotNil(t, config, "NewConfig failed")
-  assert.Equal(t, true, config.AutoRetry, "Default AutoRetry should be true")
-  assert.Equal(t, 3, config.MaxRetryTime, "Default MaxRetryTime should be 3")
-  assert.Equal(t, "", config.UserAgent, "Default UserAgent should be empty")
-  assert.Equal(t, false, config.Debug, "Default AutoRetry should be false")
-  assert.Equal(t, time.Duration(10000000000), config.Timeout, "Default Timeout should be 10000000000")
-  assert.Equal(t, (*http.Transport)(nil), config.HttpTransport, "Default HttpTransport should be nil")
-  assert.Equal(t, false, config.EnableAsync, "Default EnableAsync should be false")
-  assert.Equal(t, 1000, config.MaxTaskQueueSize, "Default MaxTaskQueueSize should be 1000")
-  assert.Equal(t, 5, config.GoRoutinePoolSize, "Default GoRoutinePoolSize should be 5")
-  assert.Equal(t, "HTTP", config.Scheme, "Default Scheme should be HTTP")
+	config := NewConfig()
+	assert.NotNil(t, config, "NewConfig failed")
+	assert.Equal(t, true, config.AutoRetry, "Default AutoRetry should be true")
+	assert.Equal(t, 3, config.MaxRetryTime, "Default MaxRetryTime should be 3")
+	assert.Equal(t, "", config.UserAgent, "Default UserAgent should be empty")
+	assert.Equal(t, false, config.Debug, "Default AutoRetry should be false")
+	assert.Equal(t, time.Duration(10000000000), config.Timeout, "Default Timeout should be 10000000000")
+	assert.Equal(t, (*http.Transport)(nil), config.HttpTransport, "Default HttpTransport should be nil")
+	assert.Equal(t, false, config.EnableAsync, "Default EnableAsync should be false")
+	assert.Equal(t, 1000, config.MaxTaskQueueSize, "Default MaxTaskQueueSize should be 1000")
+	assert.Equal(t, 5, config.GoRoutinePoolSize, "Default GoRoutinePoolSize should be 5")
+	assert.Equal(t, "HTTP", config.Scheme, "Default Scheme should be HTTP")
 
-  transport := &http.Transport{
-    MaxIdleConns:       10,
-    IdleConnTimeout:    30 * time.Second,
-    DisableCompression: true,
-  }
-  config.
-    WithAutoRetry(false).
-    WithMaxRetryTime(0).
-    WithUserAgent("new user agent").
-    WithDebug(true).
-    WithTimeout(time.Duration(500000)).
-    WithHttpTransport(transport).
-    WithEnableAsync(true).
-    WithMaxTaskQueueSize(1).
-    WithGoRoutinePoolSize(10).
-    WithScheme("HTTPS")
+	transport := &http.Transport{
+		MaxIdleConns:       10,
+		IdleConnTimeout:    30 * time.Second,
+		DisableCompression: true,
+	}
+	config.
+		WithAutoRetry(false).
+		WithMaxRetryTime(0).
+		WithUserAgent("new user agent").
+		WithDebug(true).
+		WithTimeout(time.Duration(500000)).
+		WithHttpTransport(transport).
+		WithEnableAsync(true).
+		WithMaxTaskQueueSize(1).
+		WithGoRoutinePoolSize(10).
+		WithScheme("HTTPS")
 
-  assert.Equal(t, 0, config.MaxRetryTime)
-  assert.Equal(t, false, config.AutoRetry)
-  assert.Equal(t, "new user agent", config.UserAgent)
-  assert.Equal(t, true, config.Debug)
-  assert.Equal(t, time.Duration(500000), config.Timeout)
-  assert.Equal(t, transport, config.HttpTransport)
-  assert.Equal(t, true, config.EnableAsync)
-  assert.Equal(t, 1, config.MaxTaskQueueSize)
-  assert.Equal(t, 10, config.GoRoutinePoolSize)
-  assert.Equal(t, "HTTPS", config.Scheme)
+	assert.Equal(t, 0, config.MaxRetryTime)
+	assert.Equal(t, false, config.AutoRetry)
+	assert.Equal(t, "new user agent", config.UserAgent)
+	assert.Equal(t, true, config.Debug)
+	assert.Equal(t, time.Duration(500000), config.Timeout)
+	assert.Equal(t, transport, config.HttpTransport)
+	assert.Equal(t, true, config.EnableAsync)
+	assert.Equal(t, 1, config.MaxTaskQueueSize)
+	assert.Equal(t, 10, config.GoRoutinePoolSize)
+	assert.Equal(t, "HTTPS", config.Scheme)
 }

+ 1 - 1
sdk/errors/server_error_test.go

@@ -55,7 +55,7 @@ func TestWrapServerError(t *testing.T) {
 	m = make(map[string]string)
 	m["StringToSign"] = "match"
 	WrapServerError(se, m)
-	assert.Equal(t, "Please check you AccessKeySecret", se.Recommend())
+	assert.Equal(t, "InvalidAccessKeySecret: Please check you AccessKeySecret", se.Recommend())
 
 	err = NewServerError(400, `{"Code":"Other"}`, "comment")
 	se, ok = err.(*ServerError)

+ 1 - 1
sdk/errors/signature_does_not_match_wrapper.go

@@ -27,7 +27,7 @@ func (*SignatureDostNotMatchWrapper) tryWrap(error *ServerError, wrapInfo map[st
 
 			if clientStringToSign == serverStringToSign {
 				// user secret is error
-				error.recommend = "Please check you AccessKeySecret"
+				error.recommend = "InvalidAccessKeySecret: Please check you AccessKeySecret"
 			} else {
 				debug("Client StringToSign: %s", clientStringToSign)
 				debug("Server StringToSign: %s", serverStringToSign)

+ 1 - 1
sdk/errors/signature_does_not_match_wrapper_test.go

@@ -39,5 +39,5 @@ func TestWrapMatch(t *testing.T) {
 	m["StringToSign"] = "match"
 	wrapped := wrapper.tryWrap(se, m)
 	assert.True(t, wrapped)
-	assert.Equal(t, "Please check you AccessKeySecret", se.Recommend())
+	assert.Equal(t, "InvalidAccessKeySecret: Please check you AccessKeySecret", se.Recommend())
 }

+ 58 - 9
sdk/requests/acs_request.go

@@ -19,6 +19,8 @@ import (
 	"io"
 	"reflect"
 	"strconv"
+	"strings"
+	"time"
 
 	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/errors"
 )
@@ -71,6 +73,12 @@ type AcsRequest interface {
 	GetAcceptFormat() string
 	GetLocationServiceCode() string
 	GetLocationEndpointType() string
+	GetReadTimeout() time.Duration
+	GetConnectTimeout() time.Duration
+	SetReadTimeout(readTimeout time.Duration)
+	SetConnectTimeout(connectTimeout time.Duration)
+
+	GetUserAgent() map[string]string
 
 	SetStringToSign(stringToSign string)
 	GetStringToSign() string
@@ -89,14 +97,17 @@ type AcsRequest interface {
 
 // base class
 type baseRequest struct {
-	Scheme   string
-	Method   string
-	Domain   string
-	Port     string
-	RegionId string
-
-	product string
-	version string
+	Scheme         string
+	Method         string
+	Domain         string
+	Port           string
+	RegionId       string
+	ReadTimeout    time.Duration
+	ConnectTimeout time.Duration
+
+	userAgent map[string]string
+	product   string
+	version   string
 
 	actionName string
 
@@ -123,6 +134,22 @@ func (request *baseRequest) GetFormParams() map[string]string {
 	return request.FormParams
 }
 
+func (request *baseRequest) GetReadTimeout() time.Duration {
+	return request.ReadTimeout
+}
+
+func (request *baseRequest) GetConnectTimeout() time.Duration {
+	return request.ConnectTimeout
+}
+
+func (request *baseRequest) SetReadTimeout(readTimeout time.Duration) {
+	request.ReadTimeout = readTimeout
+}
+
+func (request *baseRequest) SetConnectTimeout(connectTimeout time.Duration) {
+	request.ConnectTimeout = connectTimeout
+}
+
 func (request *baseRequest) GetContent() []byte {
 	return request.Content
 }
@@ -139,6 +166,28 @@ func (request *baseRequest) SetContent(content []byte) {
 	request.Content = content
 }
 
+func (request *baseRequest) GetUserAgent() map[string]string {
+	return request.userAgent
+}
+
+func (request *baseRequest) AppendUserAgent(key, value string) {
+	newkey := true
+	if request.userAgent == nil {
+		request.userAgent = make(map[string]string)
+	}
+	if strings.ToLower(key) != "core" && strings.ToLower(key) != "go" {
+		for tag, _ := range request.userAgent {
+			if tag == key {
+				request.userAgent[tag] = value
+				newkey = false
+			}
+		}
+		if newkey {
+			request.userAgent[key] = value
+		}
+	}
+}
+
 func (request *baseRequest) addHeaderParam(key, value string) {
 	request.Headers[key] = value
 }
@@ -268,7 +317,7 @@ func flatRepeatedList(dataValue reflect.Value, request AcsRequest, position, pre
 					for m := 0; m < repeatedFieldValue.Len(); m++ {
 						elementValue := repeatedFieldValue.Index(m)
 						key := prefix + name + "." + strconv.Itoa(m+1)
-						if elementValue.Type().String() == "string" {
+						if elementValue.Type().Kind().String() == "string" {
 							value := elementValue.String()
 							err = addParam(request, fieldPosition, key, value)
 							if err != nil {

+ 55 - 0
sdk/requests/acs_request_test.go

@@ -2,9 +2,11 @@ package requests
 
 import (
 	"bytes"
+	"fmt"
 	"io"
 	"sort"
 	"testing"
+	"time"
 
 	"github.com/stretchr/testify/assert"
 )
@@ -86,9 +88,25 @@ func Test_AcsRequest(t *testing.T) {
 	r.SetScheme("HTTPS")
 	assert.Equal(t, "HTTPS", r.GetScheme())
 
+	// GetReadTimeout
+	assert.Equal(t, 0*time.Second, r.GetReadTimeout())
+	r.SetReadTimeout(5 * time.Second)
+	assert.Equal(t, 5*time.Second, r.GetReadTimeout())
+
+	// GetConnectTimeout
+	assert.Equal(t, 0*time.Second, r.GetConnectTimeout())
+	r.SetConnectTimeout(5 * time.Second)
+	assert.Equal(t, 5*time.Second, r.GetConnectTimeout())
+
 	// GetPort
 	assert.Equal(t, "", r.GetPort())
 
+	// GetUserAgent
+	r.AppendUserAgent("cli", "1.01")
+	assert.Equal(t, "1.01", r.GetUserAgent()["cli"])
+	// GetUserAgent
+	r.AppendUserAgent("cli", "2.02")
+	assert.Equal(t, "2.02", r.GetUserAgent()["cli"])
 	// Content
 	assert.Equal(t, []byte(nil), r.GetContent())
 	r.SetContent([]byte("The Content"))
@@ -373,3 +391,40 @@ func Test_AcsRequest_InitParams5(t *testing.T) {
 }
 
 // > POST /?AccessKeyId=LTAIgTHQxl9boZTV&Action=CreateContainerGroup&Container.1.Arg=%3C%5B%5Dstring+Value%3E&Container.1.Command=%3C%5B%5Dstring+Value%3E&Container.1.Cpu=1&Container.1.EnvironmentVar=%3C%2A%5B%5Deci.CreateContainerGroup_EnvironmentVar+Value%3E&Container.1.Image=nginx&Container.1.LivenessProbe=%3Ceci.CreateContainerGroup_LivenessProbe+Value%3E&Container.1.Memory=2&Container.1.Name=nginx&Container.1.Port=%3C%2A%5B%5Deci.CreateContainerGroup_Port+Value%3E&Container.1.ReadinessProbe=%3Ceci.CreateContainerGroup_ReadinessProbe+Value%3E&Container.1.SecurityContext=%3Ceci.CreateContainerGroup_SecurityContext+Value%3E&Container.1.VolumeMount=%3C%2A%5B%5Deci.CreateContainerGroup_VolumeMount+Value%3E&Container.1.WorkingDir=ddd&ContainerGroupName=123&Format=JSON&RegionId=cn-shanghai&SecurityGroupId=sg-uf63nb42ltsf0gyadb8s&Signature=wH8RagWmLuOZfQ94khrEZ5yYA9M%3D&SignatureMethod=HMAC-SHA1&SignatureNonce=ec3eca4382884dbbb98c3bd7277e25c5&SignatureType=&SignatureVersion=1.0&Timestamp=2019-01-28T08%3A00%3A04Z&VSwitchId=vsw-uf6ck0dbgl3rg6i0xq8i0&Version=2018-08-08 HTTP/1.1
+
+type StartMPUTaskRequest struct {
+	*RpcRequest
+	OwnerId         Integer   `position:"Query" name:"OwnerId"`
+	AppId           string    `position:"Query" name:"AppId"`
+	ChannelId       string    `position:"Query" name:"ChannelId"`
+	TaskId          string    `position:"Query" name:"TaskId"`
+	MediaEncode     Integer   `position:"Query" name:"MediaEncode"`
+	BackgroundColor Integer   `position:"Query" name:"BackgroundColor"`
+	LayoutIds       []Integer `position:"Query" name:"LayoutIds" type:"Repeated"`
+	StreamURL       string    `position:"Query" name:"StreamURL"`
+}
+
+func Test_RPCRequest_InitParams(t *testing.T) {
+	channelID := "id"
+	r := &StartMPUTaskRequest{
+		RpcRequest: &RpcRequest{},
+	}
+	r.init()
+	r.Domain = "rtc.aliyuncs.com"
+	r.AppId = "app ID"
+	r.ChannelId = channelID
+	r.TaskId = channelID
+	r.MediaEncode = NewInteger(2)
+	r.BackgroundColor = NewInteger(0)
+	r.StreamURL = fmt.Sprintf("rtmp://video-center.alivecdn.com/galaxy/%s_%s?vhost=fast-live.chinalivestream.top", channelID, channelID)
+	var out []Integer
+	out = append(out, NewInteger(2))
+	r.LayoutIds = out
+
+	InitParams(r)
+
+	queries := r.GetQueryParams()
+
+	assert.Equal(t, "2", queries["LayoutIds.1"])
+	assert.Len(t, queries, 7)
+}

+ 2 - 2
sdk/requests/roa_request.go

@@ -134,7 +134,7 @@ func (request *RoaRequest) InitWithApiInfo(product, version, action, uriPattern,
 	request.pathPattern = uriPattern
 	request.locationServiceCode = serviceCode
 	request.locationEndpointType = endpointType
-	//request.product = product
+	request.product = product
 	//request.version = version
 	//request.actionName = action
 }
@@ -142,7 +142,7 @@ func (request *RoaRequest) InitWithApiInfo(product, version, action, uriPattern,
 func (request *RoaRequest) initWithCommonRequest(commonRequest *CommonRequest) {
 	request.baseRequest = commonRequest.baseRequest
 	request.PathParams = commonRequest.PathParams
-	//request.product = commonRequest.Product
+	request.product = commonRequest.Product
 	//request.version = commonRequest.Version
 	request.Headers["x-acs-version"] = commonRequest.Version
 	//request.actionName = commonRequest.ApiName

+ 7 - 2
sdk/responses/json_parser.go

@@ -9,7 +9,7 @@ import (
 	"sync"
 	"unsafe"
 
-	"github.com/json-iterator/go"
+	jsoniter "github.com/json-iterator/go"
 )
 
 const maxUint = ^uint(0)
@@ -22,7 +22,12 @@ var initJson = &sync.Once{}
 func initJsonParserOnce() {
 	initJson.Do(func() {
 		registerBetterFuzzyDecoder()
-		jsonParser = jsoniter.ConfigCompatibleWithStandardLibrary
+		jsonParser = jsoniter.Config{
+			EscapeHTML:             true,
+			SortMapKeys:            true,
+			ValidateJsonRawMessage: true,
+			CaseSensitive:          true,
+		}.Froze()
 	})
 }
 

+ 2 - 20
sdk/utils/utils.go

@@ -26,10 +26,6 @@ import (
 	"github.com/satori/go.uuid"
 )
 
-// if you use go 1.10 or higher, you can hack this util by these to avoid "TimeZone.zip not found" on Windows
-var LoadLocationFromTZData func(name string, data []byte) (*time.Location, error) = nil
-var TZData []byte = nil
-
 func GetUUIDV4() (uuidHex string) {
 	uuidV4 := uuid.NewV4()
 	uuidHex = hex.EncodeToString(uuidV4.Bytes())
@@ -44,29 +40,15 @@ func GetMD5Base64(bytes []byte) (base64Value string) {
 	return
 }
 
-func GetGMTLocation() (*time.Location, error) {
-	if LoadLocationFromTZData != nil && TZData != nil {
-		return LoadLocationFromTZData("GMT", TZData)
-	} else {
-		return time.LoadLocation("GMT")
-	}
-}
-
 func GetTimeInFormatISO8601() (timeStr string) {
-	gmt, err := GetGMTLocation()
+	gmt := time.FixedZone("GMT", 0)
 
-	if err != nil {
-		panic(err)
-	}
 	return time.Now().In(gmt).Format("2006-01-02T15:04:05Z")
 }
 
 func GetTimeInFormatRFC2616() (timeStr string) {
-	gmt, err := GetGMTLocation()
+	gmt := time.FixedZone("GMT", 0)
 
-	if err != nil {
-		panic(err)
-	}
 	return time.Now().In(gmt).Format("Mon, 02 Jan 2006 15:04:05 GMT")
 }
 

+ 0 - 33
sdk/utils/utils_test.go

@@ -1,9 +1,7 @@
 package utils
 
 import (
-	"fmt"
 	"regexp"
-	"strings"
 	"testing"
 	"time"
 
@@ -64,34 +62,3 @@ func TestGetUrlFormedMap(t *testing.T) {
 	s2 := GetUrlFormedMap(m)
 	assert.Equal(t, "key=value&key2=http%3A%2F%2Fdomain%2F%3Fkey%3Dvalue%26key2%3Dvalue2", s2)
 }
-
-func TestGetTimeInFormatISO8601WithTZData(t *testing.T) {
-	TZData = []byte(`"GMT"`)
-	LoadLocationFromTZData = func(name string, data []byte) (location *time.Location, e error) {
-		if strings.Contains(string(data), name) {
-			location, _ = time.LoadLocation(name)
-		}
-		e = fmt.Errorf("There is a error in test.")
-		return location, e
-	}
-	defer func() {
-		err := recover()
-		assert.NotNil(t, err)
-	}()
-	s := GetTimeInFormatISO8601()
-	assert.Equal(t, 20, len(s))
-	// 2006-01-02T15:04:05Z
-	re := regexp.MustCompile(`^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$`)
-	assert.True(t, re.MatchString(s))
-}
-
-func TestGetTimeInFormatRFC2616WithTZData(t *testing.T) {
-	defer func() {
-		err := recover()
-		assert.NotNil(t, err)
-	}()
-	s := GetTimeInFormatRFC2616()
-	assert.Equal(t, 29, len(s))
-	re := regexp.MustCompile(`^[A-Z][a-z]{2}, [0-9]{2} [A-Z][a-z]{2} [0-9]{4} [0-9]{2}:[0-9]{2}:[0-9]{2} GMT$`)
-	assert.True(t, re.MatchString(s))
-}

+ 81 - 0
services/actiontrail/client.go

@@ -0,0 +1,81 @@
+package actiontrail
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth"
+)
+
+// 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
+}
+
+// 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://help.aliyun.com/document_detail/66217.html
+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://help.aliyun.com/document_detail/66222.html
+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://help.aliyun.com/document_detail/66222.html
+func NewClientWithRamRoleArn(regionId string, accessKeyId, accessKeySecret, roleArn, roleSessionName string) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithRamRoleArn(regionId, accessKeyId, accessKeySecret, roleArn, roleSessionName)
+	return
+}
+
+// NewClientWithEcsRamRole is a shortcut to create sdk client with ecs ram role
+// usage: https://help.aliyun.com/document_detail/66223.html
+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
+// attention: rsa key pair auth is only Japan regions available
+func NewClientWithRsaKeyPair(regionId string, publicKeyId, privateKey string, sessionExpiration int) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithRsaKeyPair(regionId, publicKeyId, privateKey, sessionExpiration)
+	return
+}

+ 117 - 0
services/actiontrail/create_trail.go

@@ -0,0 +1,117 @@
+package actiontrail
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// CreateTrail invokes the actiontrail.CreateTrail API synchronously
+// api document: https://help.aliyun.com/api/actiontrail/createtrail.html
+func (client *Client) CreateTrail(request *CreateTrailRequest) (response *CreateTrailResponse, err error) {
+	response = CreateCreateTrailResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// CreateTrailWithChan invokes the actiontrail.CreateTrail API asynchronously
+// api document: https://help.aliyun.com/api/actiontrail/createtrail.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CreateTrailWithChan(request *CreateTrailRequest) (<-chan *CreateTrailResponse, <-chan error) {
+	responseChan := make(chan *CreateTrailResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.CreateTrail(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// CreateTrailWithCallback invokes the actiontrail.CreateTrail API asynchronously
+// api document: https://help.aliyun.com/api/actiontrail/createtrail.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CreateTrailWithCallback(request *CreateTrailRequest, callback func(response *CreateTrailResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *CreateTrailResponse
+		var err error
+		defer close(result)
+		response, err = client.CreateTrail(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// CreateTrailRequest is the request struct for api CreateTrail
+type CreateTrailRequest struct {
+	*requests.RpcRequest
+	SlsProjectArn   string `position:"Query" name:"SlsProjectArn"`
+	SlsWriteRoleArn string `position:"Query" name:"SlsWriteRoleArn"`
+	RoleName        string `position:"Query" name:"RoleName"`
+	Name            string `position:"Query" name:"Name"`
+	OssBucketName   string `position:"Query" name:"OssBucketName"`
+	OssKeyPrefix    string `position:"Query" name:"OssKeyPrefix"`
+	EventRW         string `position:"Query" name:"EventRW"`
+}
+
+// CreateTrailResponse is the response struct for api CreateTrail
+type CreateTrailResponse struct {
+	*responses.BaseResponse
+	RequestId       string `json:"RequestId" xml:"RequestId"`
+	Name            string `json:"Name" xml:"Name"`
+	HomeRegion      string `json:"HomeRegion" xml:"HomeRegion"`
+	OssBucketName   string `json:"OssBucketName" xml:"OssBucketName"`
+	OssKeyPrefix    string `json:"OssKeyPrefix" xml:"OssKeyPrefix"`
+	RoleName        string `json:"RoleName" xml:"RoleName"`
+	SlsProjectArn   string `json:"SlsProjectArn" xml:"SlsProjectArn"`
+	SlsWriteRoleArn string `json:"SlsWriteRoleArn" xml:"SlsWriteRoleArn"`
+	EventRW         string `json:"EventRW" xml:"EventRW"`
+}
+
+// CreateCreateTrailRequest creates a request to invoke CreateTrail API
+func CreateCreateTrailRequest() (request *CreateTrailRequest) {
+	request = &CreateTrailRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Actiontrail", "2017-12-04", "CreateTrail", "actiontrail", "openAPI")
+	return
+}
+
+// CreateCreateTrailResponse creates a response to parse from CreateTrail response
+func CreateCreateTrailResponse() (response *CreateTrailResponse) {
+	response = &CreateTrailResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 103 - 0
services/actiontrail/delete_trail.go

@@ -0,0 +1,103 @@
+package actiontrail
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// DeleteTrail invokes the actiontrail.DeleteTrail API synchronously
+// api document: https://help.aliyun.com/api/actiontrail/deletetrail.html
+func (client *Client) DeleteTrail(request *DeleteTrailRequest) (response *DeleteTrailResponse, err error) {
+	response = CreateDeleteTrailResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DeleteTrailWithChan invokes the actiontrail.DeleteTrail API asynchronously
+// api document: https://help.aliyun.com/api/actiontrail/deletetrail.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteTrailWithChan(request *DeleteTrailRequest) (<-chan *DeleteTrailResponse, <-chan error) {
+	responseChan := make(chan *DeleteTrailResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DeleteTrail(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DeleteTrailWithCallback invokes the actiontrail.DeleteTrail API asynchronously
+// api document: https://help.aliyun.com/api/actiontrail/deletetrail.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteTrailWithCallback(request *DeleteTrailRequest, callback func(response *DeleteTrailResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DeleteTrailResponse
+		var err error
+		defer close(result)
+		response, err = client.DeleteTrail(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DeleteTrailRequest is the request struct for api DeleteTrail
+type DeleteTrailRequest struct {
+	*requests.RpcRequest
+	Name string `position:"Query" name:"Name"`
+}
+
+// DeleteTrailResponse is the response struct for api DeleteTrail
+type DeleteTrailResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateDeleteTrailRequest creates a request to invoke DeleteTrail API
+func CreateDeleteTrailRequest() (request *DeleteTrailRequest) {
+	request = &DeleteTrailRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Actiontrail", "2017-12-04", "DeleteTrail", "actiontrail", "openAPI")
+	return
+}
+
+// CreateDeleteTrailResponse creates a response to parse from DeleteTrail response
+func CreateDeleteTrailResponse() (response *DeleteTrailResponse) {
+	response = &DeleteTrailResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 103 - 0
services/actiontrail/describe_regions.go

@@ -0,0 +1,103 @@
+package actiontrail
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// DescribeRegions invokes the actiontrail.DescribeRegions API synchronously
+// api document: https://help.aliyun.com/api/actiontrail/describeregions.html
+func (client *Client) DescribeRegions(request *DescribeRegionsRequest) (response *DescribeRegionsResponse, err error) {
+	response = CreateDescribeRegionsResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DescribeRegionsWithChan invokes the actiontrail.DescribeRegions API asynchronously
+// api document: https://help.aliyun.com/api/actiontrail/describeregions.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeRegionsWithChan(request *DescribeRegionsRequest) (<-chan *DescribeRegionsResponse, <-chan error) {
+	responseChan := make(chan *DescribeRegionsResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DescribeRegions(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DescribeRegionsWithCallback invokes the actiontrail.DescribeRegions API asynchronously
+// api document: https://help.aliyun.com/api/actiontrail/describeregions.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeRegionsWithCallback(request *DescribeRegionsRequest, callback func(response *DescribeRegionsResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DescribeRegionsResponse
+		var err error
+		defer close(result)
+		response, err = client.DescribeRegions(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DescribeRegionsRequest is the request struct for api DescribeRegions
+type DescribeRegionsRequest struct {
+	*requests.RpcRequest
+}
+
+// DescribeRegionsResponse is the response struct for api DescribeRegions
+type DescribeRegionsResponse struct {
+	*responses.BaseResponse
+	RequestId string  `json:"RequestId" xml:"RequestId"`
+	Regions   Regions `json:"Regions" xml:"Regions"`
+}
+
+// CreateDescribeRegionsRequest creates a request to invoke DescribeRegions API
+func CreateDescribeRegionsRequest() (request *DescribeRegionsRequest) {
+	request = &DescribeRegionsRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Actiontrail", "2017-12-04", "DescribeRegions", "actiontrail", "openAPI")
+	return
+}
+
+// CreateDescribeRegionsResponse creates a response to parse from DescribeRegions response
+func CreateDescribeRegionsResponse() (response *DescribeRegionsResponse) {
+	response = &DescribeRegionsResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 105 - 0
services/actiontrail/describe_trails.go

@@ -0,0 +1,105 @@
+package actiontrail
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// DescribeTrails invokes the actiontrail.DescribeTrails API synchronously
+// api document: https://help.aliyun.com/api/actiontrail/describetrails.html
+func (client *Client) DescribeTrails(request *DescribeTrailsRequest) (response *DescribeTrailsResponse, err error) {
+	response = CreateDescribeTrailsResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DescribeTrailsWithChan invokes the actiontrail.DescribeTrails API asynchronously
+// api document: https://help.aliyun.com/api/actiontrail/describetrails.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeTrailsWithChan(request *DescribeTrailsRequest) (<-chan *DescribeTrailsResponse, <-chan error) {
+	responseChan := make(chan *DescribeTrailsResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DescribeTrails(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DescribeTrailsWithCallback invokes the actiontrail.DescribeTrails API asynchronously
+// api document: https://help.aliyun.com/api/actiontrail/describetrails.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeTrailsWithCallback(request *DescribeTrailsRequest, callback func(response *DescribeTrailsResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DescribeTrailsResponse
+		var err error
+		defer close(result)
+		response, err = client.DescribeTrails(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DescribeTrailsRequest is the request struct for api DescribeTrails
+type DescribeTrailsRequest struct {
+	*requests.RpcRequest
+	NameList            string           `position:"Query" name:"NameList"`
+	IncludeShadowTrails requests.Boolean `position:"Query" name:"IncludeShadowTrails"`
+}
+
+// DescribeTrailsResponse is the response struct for api DescribeTrails
+type DescribeTrailsResponse struct {
+	*responses.BaseResponse
+	RequestId string          `json:"RequestId" xml:"RequestId"`
+	TrailList []TrailListItem `json:"TrailList" xml:"TrailList"`
+}
+
+// CreateDescribeTrailsRequest creates a request to invoke DescribeTrails API
+func CreateDescribeTrailsRequest() (request *DescribeTrailsRequest) {
+	request = &DescribeTrailsRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Actiontrail", "2017-12-04", "DescribeTrails", "actiontrail", "openAPI")
+	return
+}
+
+// CreateDescribeTrailsResponse creates a response to parse from DescribeTrails response
+func CreateDescribeTrailsResponse() (response *DescribeTrailsResponse) {
+	response = &DescribeTrailsResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 108 - 0
services/actiontrail/get_trail_status.go

@@ -0,0 +1,108 @@
+package actiontrail
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// GetTrailStatus invokes the actiontrail.GetTrailStatus API synchronously
+// api document: https://help.aliyun.com/api/actiontrail/gettrailstatus.html
+func (client *Client) GetTrailStatus(request *GetTrailStatusRequest) (response *GetTrailStatusResponse, err error) {
+	response = CreateGetTrailStatusResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// GetTrailStatusWithChan invokes the actiontrail.GetTrailStatus API asynchronously
+// api document: https://help.aliyun.com/api/actiontrail/gettrailstatus.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetTrailStatusWithChan(request *GetTrailStatusRequest) (<-chan *GetTrailStatusResponse, <-chan error) {
+	responseChan := make(chan *GetTrailStatusResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.GetTrailStatus(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// GetTrailStatusWithCallback invokes the actiontrail.GetTrailStatus API asynchronously
+// api document: https://help.aliyun.com/api/actiontrail/gettrailstatus.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetTrailStatusWithCallback(request *GetTrailStatusRequest, callback func(response *GetTrailStatusResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *GetTrailStatusResponse
+		var err error
+		defer close(result)
+		response, err = client.GetTrailStatus(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// GetTrailStatusRequest is the request struct for api GetTrailStatus
+type GetTrailStatusRequest struct {
+	*requests.RpcRequest
+	Name string `position:"Query" name:"Name"`
+}
+
+// GetTrailStatusResponse is the response struct for api GetTrailStatus
+type GetTrailStatusResponse struct {
+	*responses.BaseResponse
+	RequestId           string `json:"RequestId" xml:"RequestId"`
+	IsLogging           bool   `json:"IsLogging" xml:"IsLogging"`
+	LatestDeliveryError string `json:"LatestDeliveryError" xml:"LatestDeliveryError"`
+	LatestDeliveryTime  string `json:"LatestDeliveryTime" xml:"LatestDeliveryTime"`
+	StartLoggingTime    string `json:"StartLoggingTime" xml:"StartLoggingTime"`
+	StopLoggingTime     string `json:"StopLoggingTime" xml:"StopLoggingTime"`
+}
+
+// CreateGetTrailStatusRequest creates a request to invoke GetTrailStatus API
+func CreateGetTrailStatusRequest() (request *GetTrailStatusRequest) {
+	request = &GetTrailStatusRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Actiontrail", "2017-12-04", "GetTrailStatus", "actiontrail", "openAPI")
+	return
+}
+
+// CreateGetTrailStatusResponse creates a response to parse from GetTrailStatus response
+func CreateGetTrailStatusResponse() (response *GetTrailStatusResponse) {
+	response = &GetTrailStatusResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 120 - 0
services/actiontrail/lookup_events.go

@@ -0,0 +1,120 @@
+package actiontrail
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// LookupEvents invokes the actiontrail.LookupEvents API synchronously
+// api document: https://help.aliyun.com/api/actiontrail/lookupevents.html
+func (client *Client) LookupEvents(request *LookupEventsRequest) (response *LookupEventsResponse, err error) {
+	response = CreateLookupEventsResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// LookupEventsWithChan invokes the actiontrail.LookupEvents API asynchronously
+// api document: https://help.aliyun.com/api/actiontrail/lookupevents.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) LookupEventsWithChan(request *LookupEventsRequest) (<-chan *LookupEventsResponse, <-chan error) {
+	responseChan := make(chan *LookupEventsResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.LookupEvents(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// LookupEventsWithCallback invokes the actiontrail.LookupEvents API asynchronously
+// api document: https://help.aliyun.com/api/actiontrail/lookupevents.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) LookupEventsWithCallback(request *LookupEventsRequest, callback func(response *LookupEventsResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *LookupEventsResponse
+		var err error
+		defer close(result)
+		response, err = client.LookupEvents(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// LookupEventsRequest is the request struct for api LookupEvents
+type LookupEventsRequest struct {
+	*requests.RpcRequest
+	Request          string `position:"Query" name:"Request"`
+	EventAccessKeyId string `position:"Query" name:"EventAccessKeyId"`
+	EndTime          string `position:"Query" name:"EndTime"`
+	EventRW          string `position:"Query" name:"EventRW"`
+	StartTime        string `position:"Query" name:"StartTime"`
+	ResourceType     string `position:"Query" name:"ResourceType"`
+	EventName        string `position:"Query" name:"EventName"`
+	NextToken        string `position:"Query" name:"NextToken"`
+	MaxResults       string `position:"Query" name:"MaxResults"`
+	EventType        string `position:"Query" name:"EventType"`
+	ServiceName      string `position:"Query" name:"ServiceName"`
+	ResourceName     string `position:"Query" name:"ResourceName"`
+	Event            string `position:"Query" name:"Event"`
+	User             string `position:"Query" name:"User"`
+}
+
+// LookupEventsResponse is the response struct for api LookupEvents
+type LookupEventsResponse struct {
+	*responses.BaseResponse
+	RequestId string   `json:"RequestId" xml:"RequestId"`
+	NextToken string   `json:"NextToken" xml:"NextToken"`
+	StartTime string   `json:"StartTime" xml:"StartTime"`
+	EndTime   string   `json:"EndTime" xml:"EndTime"`
+	Events    []string `json:"Events" xml:"Events"`
+}
+
+// CreateLookupEventsRequest creates a request to invoke LookupEvents API
+func CreateLookupEventsRequest() (request *LookupEventsRequest) {
+	request = &LookupEventsRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Actiontrail", "2017-12-04", "LookupEvents", "actiontrail", "openAPI")
+	return
+}
+
+// CreateLookupEventsResponse creates a response to parse from LookupEvents response
+func CreateLookupEventsResponse() (response *LookupEventsResponse) {
+	response = &LookupEventsResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 105 - 0
services/actiontrail/start_logging.go

@@ -0,0 +1,105 @@
+package actiontrail
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// StartLogging invokes the actiontrail.StartLogging API synchronously
+// api document: https://help.aliyun.com/api/actiontrail/startlogging.html
+func (client *Client) StartLogging(request *StartLoggingRequest) (response *StartLoggingResponse, err error) {
+	response = CreateStartLoggingResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// StartLoggingWithChan invokes the actiontrail.StartLogging API asynchronously
+// api document: https://help.aliyun.com/api/actiontrail/startlogging.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) StartLoggingWithChan(request *StartLoggingRequest) (<-chan *StartLoggingResponse, <-chan error) {
+	responseChan := make(chan *StartLoggingResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.StartLogging(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// StartLoggingWithCallback invokes the actiontrail.StartLogging API asynchronously
+// api document: https://help.aliyun.com/api/actiontrail/startlogging.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) StartLoggingWithCallback(request *StartLoggingRequest, callback func(response *StartLoggingResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *StartLoggingResponse
+		var err error
+		defer close(result)
+		response, err = client.StartLogging(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// StartLoggingRequest is the request struct for api StartLogging
+type StartLoggingRequest struct {
+	*requests.RpcRequest
+	Name string `position:"Query" name:"Name"`
+}
+
+// StartLoggingResponse is the response struct for api StartLogging
+type StartLoggingResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	Param     string `json:"Param" xml:"Param"`
+	Result    string `json:"Result" xml:"Result"`
+}
+
+// CreateStartLoggingRequest creates a request to invoke StartLogging API
+func CreateStartLoggingRequest() (request *StartLoggingRequest) {
+	request = &StartLoggingRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Actiontrail", "2017-12-04", "StartLogging", "actiontrail", "openAPI")
+	return
+}
+
+// CreateStartLoggingResponse creates a response to parse from StartLogging response
+func CreateStartLoggingResponse() (response *StartLoggingResponse) {
+	response = &StartLoggingResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 105 - 0
services/actiontrail/stop_logging.go

@@ -0,0 +1,105 @@
+package actiontrail
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// StopLogging invokes the actiontrail.StopLogging API synchronously
+// api document: https://help.aliyun.com/api/actiontrail/stoplogging.html
+func (client *Client) StopLogging(request *StopLoggingRequest) (response *StopLoggingResponse, err error) {
+	response = CreateStopLoggingResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// StopLoggingWithChan invokes the actiontrail.StopLogging API asynchronously
+// api document: https://help.aliyun.com/api/actiontrail/stoplogging.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) StopLoggingWithChan(request *StopLoggingRequest) (<-chan *StopLoggingResponse, <-chan error) {
+	responseChan := make(chan *StopLoggingResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.StopLogging(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// StopLoggingWithCallback invokes the actiontrail.StopLogging API asynchronously
+// api document: https://help.aliyun.com/api/actiontrail/stoplogging.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) StopLoggingWithCallback(request *StopLoggingRequest, callback func(response *StopLoggingResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *StopLoggingResponse
+		var err error
+		defer close(result)
+		response, err = client.StopLogging(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// StopLoggingRequest is the request struct for api StopLogging
+type StopLoggingRequest struct {
+	*requests.RpcRequest
+	Name string `position:"Query" name:"Name"`
+}
+
+// StopLoggingResponse is the response struct for api StopLogging
+type StopLoggingResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	Param     string `json:"Param" xml:"Param"`
+	Result    string `json:"Result" xml:"Result"`
+}
+
+// CreateStopLoggingRequest creates a request to invoke StopLogging API
+func CreateStopLoggingRequest() (request *StopLoggingRequest) {
+	request = &StopLoggingRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Actiontrail", "2017-12-04", "StopLogging", "actiontrail", "openAPI")
+	return
+}
+
+// CreateStopLoggingResponse creates a response to parse from StopLogging response
+func CreateStopLoggingResponse() (response *StopLoggingResponse) {
+	response = &StopLoggingResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 21 - 0
services/actiontrail/struct_events.go

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

+ 21 - 0
services/actiontrail/struct_region.go

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

+ 21 - 0
services/actiontrail/struct_region_item.go

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

+ 21 - 0
services/actiontrail/struct_regions.go

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

+ 21 - 0
services/actiontrail/struct_trail_list.go

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

+ 32 - 0
services/actiontrail/struct_trail_list_item.go

@@ -0,0 +1,32 @@
+package actiontrail
+
+//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.
+
+// TrailListItem is a nested struct in actiontrail response
+type TrailListItem struct {
+	Name                      string `json:"Name" xml:"Name"`
+	HomeRegion                string `json:"HomeRegion" xml:"HomeRegion"`
+	RoleName                  string `json:"RoleName" xml:"RoleName"`
+	Status                    string `json:"Status" xml:"Status"`
+	IncludeGlobalServiceEvent string `json:"IncludeGlobalServiceEvent" xml:"IncludeGlobalServiceEvent"`
+	OssBucketName             string `json:"OssBucketName" xml:"OssBucketName"`
+	OssKeyPrefix              string `json:"OssKeyPrefix" xml:"OssKeyPrefix"`
+	Region                    string `json:"Region" xml:"Region"`
+	EventRW                   string `json:"EventRW" xml:"EventRW"`
+	Type                      string `json:"Type" xml:"Type"`
+	SlsWriteRoleArn           string `json:"SlsWriteRoleArn" xml:"SlsWriteRoleArn"`
+	SlsProjectArn             string `json:"SlsProjectArn" xml:"SlsProjectArn"`
+}

+ 119 - 0
services/actiontrail/update_trail.go

@@ -0,0 +1,119 @@
+package actiontrail
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// UpdateTrail invokes the actiontrail.UpdateTrail API synchronously
+// api document: https://help.aliyun.com/api/actiontrail/updatetrail.html
+func (client *Client) UpdateTrail(request *UpdateTrailRequest) (response *UpdateTrailResponse, err error) {
+	response = CreateUpdateTrailResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// UpdateTrailWithChan invokes the actiontrail.UpdateTrail API asynchronously
+// api document: https://help.aliyun.com/api/actiontrail/updatetrail.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UpdateTrailWithChan(request *UpdateTrailRequest) (<-chan *UpdateTrailResponse, <-chan error) {
+	responseChan := make(chan *UpdateTrailResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.UpdateTrail(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// UpdateTrailWithCallback invokes the actiontrail.UpdateTrail API asynchronously
+// api document: https://help.aliyun.com/api/actiontrail/updatetrail.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UpdateTrailWithCallback(request *UpdateTrailRequest, callback func(response *UpdateTrailResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *UpdateTrailResponse
+		var err error
+		defer close(result)
+		response, err = client.UpdateTrail(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// UpdateTrailRequest is the request struct for api UpdateTrail
+type UpdateTrailRequest struct {
+	*requests.RpcRequest
+	SlsProjectArn   string `position:"Query" name:"SlsProjectArn"`
+	SlsWriteRoleArn string `position:"Query" name:"SlsWriteRoleArn"`
+	RoleName        string `position:"Query" name:"RoleName"`
+	Name            string `position:"Query" name:"Name"`
+	OssBucketName   string `position:"Query" name:"OssBucketName"`
+	OssKeyPrefix    string `position:"Query" name:"OssKeyPrefix"`
+	EventRW         string `position:"Query" name:"EventRW"`
+}
+
+// UpdateTrailResponse is the response struct for api UpdateTrail
+type UpdateTrailResponse struct {
+	*responses.BaseResponse
+	RequestId       string `json:"RequestId" xml:"RequestId"`
+	Param           string `json:"Param" xml:"Param"`
+	Result          string `json:"Result" xml:"Result"`
+	Name            string `json:"Name" xml:"Name"`
+	HomeRegion      string `json:"HomeRegion" xml:"HomeRegion"`
+	OssBucketName   string `json:"OssBucketName" xml:"OssBucketName"`
+	OssKeyPrefix    string `json:"OssKeyPrefix" xml:"OssKeyPrefix"`
+	RoleName        string `json:"RoleName" xml:"RoleName"`
+	SlsProjectArn   string `json:"SlsProjectArn" xml:"SlsProjectArn"`
+	SlsWriteRoleArn string `json:"SlsWriteRoleArn" xml:"SlsWriteRoleArn"`
+	EventRW         string `json:"EventRW" xml:"EventRW"`
+}
+
+// CreateUpdateTrailRequest creates a request to invoke UpdateTrail API
+func CreateUpdateTrailRequest() (request *UpdateTrailRequest) {
+	request = &UpdateTrailRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Actiontrail", "2017-12-04", "UpdateTrail", "actiontrail", "openAPI")
+	return
+}
+
+// CreateUpdateTrailResponse creates a response to parse from UpdateTrail response
+func CreateUpdateTrailResponse() (response *UpdateTrailResponse) {
+	response = &UpdateTrailResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 115 - 0
services/bssopenapi/apply_invoice.go

@@ -0,0 +1,115 @@
+package bssopenapi
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// ApplyInvoice invokes the bssopenapi.ApplyInvoice API synchronously
+// api document: https://help.aliyun.com/api/bssopenapi/applyinvoice.html
+func (client *Client) ApplyInvoice(request *ApplyInvoiceRequest) (response *ApplyInvoiceResponse, err error) {
+	response = CreateApplyInvoiceResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// ApplyInvoiceWithChan invokes the bssopenapi.ApplyInvoice API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/applyinvoice.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ApplyInvoiceWithChan(request *ApplyInvoiceRequest) (<-chan *ApplyInvoiceResponse, <-chan error) {
+	responseChan := make(chan *ApplyInvoiceResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.ApplyInvoice(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// ApplyInvoiceWithCallback invokes the bssopenapi.ApplyInvoice API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/applyinvoice.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ApplyInvoiceWithCallback(request *ApplyInvoiceRequest, callback func(response *ApplyInvoiceResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *ApplyInvoiceResponse
+		var err error
+		defer close(result)
+		response, err = client.ApplyInvoice(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// ApplyInvoiceRequest is the request struct for api ApplyInvoice
+type ApplyInvoiceRequest struct {
+	*requests.RpcRequest
+	InvoicingType   requests.Integer `position:"Query" name:"InvoicingType"`
+	ApplyUserNick   string           `position:"Query" name:"ApplyUserNick"`
+	InvoiceByAmount requests.Boolean `position:"Query" name:"InvoiceByAmount"`
+	CustomerId      requests.Integer `position:"Query" name:"CustomerId"`
+	SelectedIds     *[]string        `position:"Query" name:"SelectedIds"  type:"Repeated"`
+	ProcessWay      requests.Integer `position:"Query" name:"ProcessWay"`
+	OwnerId         requests.Integer `position:"Query" name:"OwnerId"`
+	InvoiceAmount   requests.Integer `position:"Query" name:"InvoiceAmount"`
+	AddressId       requests.Integer `position:"Query" name:"AddressId"`
+}
+
+// ApplyInvoiceResponse is the response struct for api ApplyInvoice
+type ApplyInvoiceResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	Success   bool   `json:"Success" xml:"Success"`
+	Code      string `json:"Code" xml:"Code"`
+	Message   string `json:"Message" xml:"Message"`
+	Data      Data   `json:"Data" xml:"Data"`
+}
+
+// CreateApplyInvoiceRequest creates a request to invoke ApplyInvoice API
+func CreateApplyInvoiceRequest() (request *ApplyInvoiceRequest) {
+	request = &ApplyInvoiceRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("BssOpenApi", "2017-12-14", "ApplyInvoice", "", "")
+	return
+}
+
+// CreateApplyInvoiceResponse creates a response to parse from ApplyInvoice response
+func CreateApplyInvoiceResponse() (response *ApplyInvoiceResponse) {
+	response = &ApplyInvoiceResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 5 - 5
services/bssopenapi/get_order_detail.go

@@ -83,11 +83,11 @@ type GetOrderDetailRequest struct {
 // GetOrderDetailResponse is the response struct for api GetOrderDetail
 type GetOrderDetailResponse struct {
 	*responses.BaseResponse
-	RequestId string               `json:"RequestId" xml:"RequestId"`
-	Success   bool                 `json:"Success" xml:"Success"`
-	Code      string               `json:"Code" xml:"Code"`
-	Message   string               `json:"Message" xml:"Message"`
-	Data      DataInGetOrderDetail `json:"Data" xml:"Data"`
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	Success   bool   `json:"Success" xml:"Success"`
+	Code      string `json:"Code" xml:"Code"`
+	Message   string `json:"Message" xml:"Message"`
+	Data      Data   `json:"Data" xml:"Data"`
 }
 
 // CreateGetOrderDetailRequest creates a request to invoke GetOrderDetail API

+ 5 - 5
services/bssopenapi/query_available_instances.go

@@ -94,11 +94,11 @@ type QueryAvailableInstancesRequest struct {
 // QueryAvailableInstancesResponse is the response struct for api QueryAvailableInstances
 type QueryAvailableInstancesResponse struct {
 	*responses.BaseResponse
-	RequestId string                        `json:"RequestId" xml:"RequestId"`
-	Success   bool                          `json:"Success" xml:"Success"`
-	Code      string                        `json:"Code" xml:"Code"`
-	Message   string                        `json:"Message" xml:"Message"`
-	Data      DataInQueryAvailableInstances `json:"Data" xml:"Data"`
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	Success   bool   `json:"Success" xml:"Success"`
+	Code      string `json:"Code" xml:"Code"`
+	Message   string `json:"Message" xml:"Message"`
+	Data      Data   `json:"Data" xml:"Data"`
 }
 
 // CreateQueryAvailableInstancesRequest creates a request to invoke QueryAvailableInstances API

+ 116 - 0
services/bssopenapi/query_bill.go

@@ -0,0 +1,116 @@
+package bssopenapi
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// QueryBill invokes the bssopenapi.QueryBill API synchronously
+// api document: https://help.aliyun.com/api/bssopenapi/querybill.html
+func (client *Client) QueryBill(request *QueryBillRequest) (response *QueryBillResponse, err error) {
+	response = CreateQueryBillResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// QueryBillWithChan invokes the bssopenapi.QueryBill API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/querybill.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryBillWithChan(request *QueryBillRequest) (<-chan *QueryBillResponse, <-chan error) {
+	responseChan := make(chan *QueryBillResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.QueryBill(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// QueryBillWithCallback invokes the bssopenapi.QueryBill API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/querybill.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryBillWithCallback(request *QueryBillRequest, callback func(response *QueryBillResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *QueryBillResponse
+		var err error
+		defer close(result)
+		response, err = client.QueryBill(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// QueryBillRequest is the request struct for api QueryBill
+type QueryBillRequest struct {
+	*requests.RpcRequest
+	ProductCode            string           `position:"Query" name:"ProductCode"`
+	IsHideZeroCharge       requests.Boolean `position:"Query" name:"IsHideZeroCharge"`
+	IsDisplayLocalCurrency requests.Boolean `position:"Query" name:"IsDisplayLocalCurrency"`
+	SubscriptionType       string           `position:"Query" name:"SubscriptionType"`
+	PageSize               requests.Integer `position:"Query" name:"PageSize"`
+	BillingCycle           string           `position:"Query" name:"BillingCycle"`
+	Type                   string           `position:"Query" name:"Type"`
+	OwnerId                requests.Integer `position:"Query" name:"OwnerId"`
+	PageNum                requests.Integer `position:"Query" name:"PageNum"`
+	ProductType            string           `position:"Query" name:"ProductType"`
+}
+
+// QueryBillResponse is the response struct for api QueryBill
+type QueryBillResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	Success   bool   `json:"Success" xml:"Success"`
+	Code      string `json:"Code" xml:"Code"`
+	Message   string `json:"Message" xml:"Message"`
+	Data      Data   `json:"Data" xml:"Data"`
+}
+
+// CreateQueryBillRequest creates a request to invoke QueryBill API
+func CreateQueryBillRequest() (request *QueryBillRequest) {
+	request = &QueryBillRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryBill", "", "")
+	return
+}
+
+// CreateQueryBillResponse creates a response to parse from QueryBill response
+func CreateQueryBillResponse() (response *QueryBillResponse) {
+	response = &QueryBillResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 110 - 0
services/bssopenapi/query_bill_overview.go

@@ -0,0 +1,110 @@
+package bssopenapi
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// QueryBillOverview invokes the bssopenapi.QueryBillOverview API synchronously
+// api document: https://help.aliyun.com/api/bssopenapi/querybilloverview.html
+func (client *Client) QueryBillOverview(request *QueryBillOverviewRequest) (response *QueryBillOverviewResponse, err error) {
+	response = CreateQueryBillOverviewResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// QueryBillOverviewWithChan invokes the bssopenapi.QueryBillOverview API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/querybilloverview.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryBillOverviewWithChan(request *QueryBillOverviewRequest) (<-chan *QueryBillOverviewResponse, <-chan error) {
+	responseChan := make(chan *QueryBillOverviewResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.QueryBillOverview(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// QueryBillOverviewWithCallback invokes the bssopenapi.QueryBillOverview API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/querybilloverview.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryBillOverviewWithCallback(request *QueryBillOverviewRequest, callback func(response *QueryBillOverviewResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *QueryBillOverviewResponse
+		var err error
+		defer close(result)
+		response, err = client.QueryBillOverview(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// QueryBillOverviewRequest is the request struct for api QueryBillOverview
+type QueryBillOverviewRequest struct {
+	*requests.RpcRequest
+	ProductCode      string `position:"Query" name:"ProductCode"`
+	SubscriptionType string `position:"Query" name:"SubscriptionType"`
+	BillingCycle     string `position:"Query" name:"BillingCycle"`
+	ProductType      string `position:"Query" name:"ProductType"`
+}
+
+// QueryBillOverviewResponse is the response struct for api QueryBillOverview
+type QueryBillOverviewResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	Success   bool   `json:"Success" xml:"Success"`
+	Code      string `json:"Code" xml:"Code"`
+	Message   string `json:"Message" xml:"Message"`
+	Data      Data   `json:"Data" xml:"Data"`
+}
+
+// CreateQueryBillOverviewRequest creates a request to invoke QueryBillOverview API
+func CreateQueryBillOverviewRequest() (request *QueryBillOverviewRequest) {
+	request = &QueryBillOverviewRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryBillOverview", "", "")
+	return
+}
+
+// CreateQueryBillOverviewResponse creates a response to parse from QueryBillOverview response
+func CreateQueryBillOverviewResponse() (response *QueryBillOverviewResponse) {
+	response = &QueryBillOverviewResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 107 - 0
services/bssopenapi/query_customer_address_list.go

@@ -0,0 +1,107 @@
+package bssopenapi
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// QueryCustomerAddressList invokes the bssopenapi.QueryCustomerAddressList API synchronously
+// api document: https://help.aliyun.com/api/bssopenapi/querycustomeraddresslist.html
+func (client *Client) QueryCustomerAddressList(request *QueryCustomerAddressListRequest) (response *QueryCustomerAddressListResponse, err error) {
+	response = CreateQueryCustomerAddressListResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// QueryCustomerAddressListWithChan invokes the bssopenapi.QueryCustomerAddressList API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/querycustomeraddresslist.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryCustomerAddressListWithChan(request *QueryCustomerAddressListRequest) (<-chan *QueryCustomerAddressListResponse, <-chan error) {
+	responseChan := make(chan *QueryCustomerAddressListResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.QueryCustomerAddressList(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// QueryCustomerAddressListWithCallback invokes the bssopenapi.QueryCustomerAddressList API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/querycustomeraddresslist.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryCustomerAddressListWithCallback(request *QueryCustomerAddressListRequest, callback func(response *QueryCustomerAddressListResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *QueryCustomerAddressListResponse
+		var err error
+		defer close(result)
+		response, err = client.QueryCustomerAddressList(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// QueryCustomerAddressListRequest is the request struct for api QueryCustomerAddressList
+type QueryCustomerAddressListRequest struct {
+	*requests.RpcRequest
+	OwnerId requests.Integer `position:"Query" name:"OwnerId"`
+}
+
+// QueryCustomerAddressListResponse is the response struct for api QueryCustomerAddressList
+type QueryCustomerAddressListResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	Success   bool   `json:"Success" xml:"Success"`
+	Code      string `json:"Code" xml:"Code"`
+	Message   string `json:"Message" xml:"Message"`
+	Data      Data   `json:"Data" xml:"Data"`
+}
+
+// CreateQueryCustomerAddressListRequest creates a request to invoke QueryCustomerAddressList API
+func CreateQueryCustomerAddressListRequest() (request *QueryCustomerAddressListRequest) {
+	request = &QueryCustomerAddressListRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryCustomerAddressList", "", "")
+	return
+}
+
+// CreateQueryCustomerAddressListResponse creates a response to parse from QueryCustomerAddressList response
+func CreateQueryCustomerAddressListResponse() (response *QueryCustomerAddressListResponse) {
+	response = &QueryCustomerAddressListResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 120 - 0
services/bssopenapi/query_evaluate_list.go

@@ -0,0 +1,120 @@
+package bssopenapi
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// QueryEvaluateList invokes the bssopenapi.QueryEvaluateList API synchronously
+// api document: https://help.aliyun.com/api/bssopenapi/queryevaluatelist.html
+func (client *Client) QueryEvaluateList(request *QueryEvaluateListRequest) (response *QueryEvaluateListResponse, err error) {
+	response = CreateQueryEvaluateListResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// QueryEvaluateListWithChan invokes the bssopenapi.QueryEvaluateList API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/queryevaluatelist.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryEvaluateListWithChan(request *QueryEvaluateListRequest) (<-chan *QueryEvaluateListResponse, <-chan error) {
+	responseChan := make(chan *QueryEvaluateListResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.QueryEvaluateList(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// QueryEvaluateListWithCallback invokes the bssopenapi.QueryEvaluateList API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/queryevaluatelist.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryEvaluateListWithCallback(request *QueryEvaluateListRequest, callback func(response *QueryEvaluateListResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *QueryEvaluateListResponse
+		var err error
+		defer close(result)
+		response, err = client.QueryEvaluateList(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// QueryEvaluateListRequest is the request struct for api QueryEvaluateList
+type QueryEvaluateListRequest struct {
+	*requests.RpcRequest
+	EndSearchTime   string           `position:"Query" name:"EndSearchTime"`
+	OutBizId        string           `position:"Query" name:"OutBizId"`
+	SortType        requests.Integer `position:"Query" name:"SortType"`
+	BizTypeList     *[]string        `position:"Query" name:"BizTypeList"  type:"Repeated"`
+	Type            requests.Integer `position:"Query" name:"Type"`
+	OwnerId         requests.Integer `position:"Query" name:"OwnerId"`
+	PageNum         requests.Integer `position:"Query" name:"PageNum"`
+	StartSearchTime string           `position:"Query" name:"StartSearchTime"`
+	EndBizTime      string           `position:"Query" name:"EndBizTime"`
+	PageSize        requests.Integer `position:"Query" name:"PageSize"`
+	EndAmount       requests.Integer `position:"Query" name:"EndAmount"`
+	BillCycle       string           `position:"Query" name:"BillCycle"`
+	StartAmount     requests.Integer `position:"Query" name:"StartAmount"`
+	StartBizTime    string           `position:"Query" name:"StartBizTime"`
+}
+
+// QueryEvaluateListResponse is the response struct for api QueryEvaluateList
+type QueryEvaluateListResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	Success   bool   `json:"Success" xml:"Success"`
+	Code      string `json:"Code" xml:"Code"`
+	Message   string `json:"Message" xml:"Message"`
+	Data      Data   `json:"Data" xml:"Data"`
+}
+
+// CreateQueryEvaluateListRequest creates a request to invoke QueryEvaluateList API
+func CreateQueryEvaluateListRequest() (request *QueryEvaluateListRequest) {
+	request = &QueryEvaluateListRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryEvaluateList", "", "")
+	return
+}
+
+// CreateQueryEvaluateListResponse creates a response to parse from QueryEvaluateList response
+func CreateQueryEvaluateListResponse() (response *QueryEvaluateListResponse) {
+	response = &QueryEvaluateListResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 115 - 0
services/bssopenapi/query_instance_bill.go

@@ -0,0 +1,115 @@
+package bssopenapi
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// QueryInstanceBill invokes the bssopenapi.QueryInstanceBill API synchronously
+// api document: https://help.aliyun.com/api/bssopenapi/queryinstancebill.html
+func (client *Client) QueryInstanceBill(request *QueryInstanceBillRequest) (response *QueryInstanceBillResponse, err error) {
+	response = CreateQueryInstanceBillResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// QueryInstanceBillWithChan invokes the bssopenapi.QueryInstanceBill API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/queryinstancebill.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryInstanceBillWithChan(request *QueryInstanceBillRequest) (<-chan *QueryInstanceBillResponse, <-chan error) {
+	responseChan := make(chan *QueryInstanceBillResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.QueryInstanceBill(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// QueryInstanceBillWithCallback invokes the bssopenapi.QueryInstanceBill API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/queryinstancebill.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryInstanceBillWithCallback(request *QueryInstanceBillRequest, callback func(response *QueryInstanceBillResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *QueryInstanceBillResponse
+		var err error
+		defer close(result)
+		response, err = client.QueryInstanceBill(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// QueryInstanceBillRequest is the request struct for api QueryInstanceBill
+type QueryInstanceBillRequest struct {
+	*requests.RpcRequest
+	IsBillingItem    requests.Boolean `position:"Query" name:"IsBillingItem"`
+	ProductCode      string           `position:"Query" name:"ProductCode"`
+	IsHideZeroCharge requests.Boolean `position:"Query" name:"IsHideZeroCharge"`
+	SubscriptionType string           `position:"Query" name:"SubscriptionType"`
+	PageSize         requests.Integer `position:"Query" name:"PageSize"`
+	BillingCycle     string           `position:"Query" name:"BillingCycle"`
+	OwnerId          requests.Integer `position:"Query" name:"OwnerId"`
+	PageNum          requests.Integer `position:"Query" name:"PageNum"`
+	ProductType      string           `position:"Query" name:"ProductType"`
+}
+
+// QueryInstanceBillResponse is the response struct for api QueryInstanceBill
+type QueryInstanceBillResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	Success   bool   `json:"Success" xml:"Success"`
+	Code      string `json:"Code" xml:"Code"`
+	Message   string `json:"Message" xml:"Message"`
+	Data      Data   `json:"Data" xml:"Data"`
+}
+
+// CreateQueryInstanceBillRequest creates a request to invoke QueryInstanceBill API
+func CreateQueryInstanceBillRequest() (request *QueryInstanceBillRequest) {
+	request = &QueryInstanceBillRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryInstanceBill", "", "")
+	return
+}
+
+// CreateQueryInstanceBillResponse creates a response to parse from QueryInstanceBill response
+func CreateQueryInstanceBillResponse() (response *QueryInstanceBillResponse) {
+	response = &QueryInstanceBillResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 5 - 5
services/bssopenapi/query_instance_gaap_cost.go

@@ -87,11 +87,11 @@ type QueryInstanceGaapCostRequest struct {
 // QueryInstanceGaapCostResponse is the response struct for api QueryInstanceGaapCost
 type QueryInstanceGaapCostResponse struct {
 	*responses.BaseResponse
-	RequestId string                      `json:"RequestId" xml:"RequestId"`
-	Success   bool                        `json:"Success" xml:"Success"`
-	Code      string                      `json:"Code" xml:"Code"`
-	Message   string                      `json:"Message" xml:"Message"`
-	Data      DataInQueryInstanceGaapCost `json:"Data" xml:"Data"`
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	Success   bool   `json:"Success" xml:"Success"`
+	Code      string `json:"Code" xml:"Code"`
+	Message   string `json:"Message" xml:"Message"`
+	Data      Data   `json:"Data" xml:"Data"`
 }
 
 // CreateQueryInstanceGaapCostRequest creates a request to invoke QueryInstanceGaapCost API

+ 107 - 0
services/bssopenapi/query_invoicing_customer_list.go

@@ -0,0 +1,107 @@
+package bssopenapi
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// QueryInvoicingCustomerList invokes the bssopenapi.QueryInvoicingCustomerList API synchronously
+// api document: https://help.aliyun.com/api/bssopenapi/queryinvoicingcustomerlist.html
+func (client *Client) QueryInvoicingCustomerList(request *QueryInvoicingCustomerListRequest) (response *QueryInvoicingCustomerListResponse, err error) {
+	response = CreateQueryInvoicingCustomerListResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// QueryInvoicingCustomerListWithChan invokes the bssopenapi.QueryInvoicingCustomerList API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/queryinvoicingcustomerlist.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryInvoicingCustomerListWithChan(request *QueryInvoicingCustomerListRequest) (<-chan *QueryInvoicingCustomerListResponse, <-chan error) {
+	responseChan := make(chan *QueryInvoicingCustomerListResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.QueryInvoicingCustomerList(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// QueryInvoicingCustomerListWithCallback invokes the bssopenapi.QueryInvoicingCustomerList API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/queryinvoicingcustomerlist.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryInvoicingCustomerListWithCallback(request *QueryInvoicingCustomerListRequest, callback func(response *QueryInvoicingCustomerListResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *QueryInvoicingCustomerListResponse
+		var err error
+		defer close(result)
+		response, err = client.QueryInvoicingCustomerList(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// QueryInvoicingCustomerListRequest is the request struct for api QueryInvoicingCustomerList
+type QueryInvoicingCustomerListRequest struct {
+	*requests.RpcRequest
+	OwnerId requests.Integer `position:"Query" name:"OwnerId"`
+}
+
+// QueryInvoicingCustomerListResponse is the response struct for api QueryInvoicingCustomerList
+type QueryInvoicingCustomerListResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	Success   bool   `json:"Success" xml:"Success"`
+	Code      string `json:"Code" xml:"Code"`
+	Message   string `json:"Message" xml:"Message"`
+	Data      Data   `json:"Data" xml:"Data"`
+}
+
+// CreateQueryInvoicingCustomerListRequest creates a request to invoke QueryInvoicingCustomerList API
+func CreateQueryInvoicingCustomerListRequest() (request *QueryInvoicingCustomerListRequest) {
+	request = &QueryInvoicingCustomerListRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryInvoicingCustomerList", "", "")
+	return
+}
+
+// CreateQueryInvoicingCustomerListResponse creates a response to parse from QueryInvoicingCustomerList response
+func CreateQueryInvoicingCustomerListResponse() (response *QueryInvoicingCustomerListResponse) {
+	response = &QueryInvoicingCustomerListResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 5 - 5
services/bssopenapi/query_monthly_instance_consumption.go

@@ -88,11 +88,11 @@ type QueryMonthlyInstanceConsumptionRequest struct {
 // QueryMonthlyInstanceConsumptionResponse is the response struct for api QueryMonthlyInstanceConsumption
 type QueryMonthlyInstanceConsumptionResponse struct {
 	*responses.BaseResponse
-	RequestId string                                `json:"RequestId" xml:"RequestId"`
-	Success   bool                                  `json:"Success" xml:"Success"`
-	Code      string                                `json:"Code" xml:"Code"`
-	Message   string                                `json:"Message" xml:"Message"`
-	Data      DataInQueryMonthlyInstanceConsumption `json:"Data" xml:"Data"`
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	Success   bool   `json:"Success" xml:"Success"`
+	Code      string `json:"Code" xml:"Code"`
+	Message   string `json:"Message" xml:"Message"`
+	Data      Data   `json:"Data" xml:"Data"`
 }
 
 // CreateQueryMonthlyInstanceConsumptionRequest creates a request to invoke QueryMonthlyInstanceConsumption API

+ 5 - 5
services/bssopenapi/query_orders.go

@@ -91,11 +91,11 @@ type QueryOrdersRequest struct {
 // QueryOrdersResponse is the response struct for api QueryOrders
 type QueryOrdersResponse struct {
 	*responses.BaseResponse
-	RequestId string            `json:"RequestId" xml:"RequestId"`
-	Success   bool              `json:"Success" xml:"Success"`
-	Code      string            `json:"Code" xml:"Code"`
-	Message   string            `json:"Message" xml:"Message"`
-	Data      DataInQueryOrders `json:"Data" xml:"Data"`
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	Success   bool   `json:"Success" xml:"Success"`
+	Code      string `json:"Code" xml:"Code"`
+	Message   string `json:"Message" xml:"Message"`
+	Data      Data   `json:"Data" xml:"Data"`
 }
 
 // CreateQueryOrdersRequest creates a request to invoke QueryOrders API

+ 108 - 0
services/bssopenapi/query_price.go

@@ -0,0 +1,108 @@
+package bssopenapi
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// QueryPrice invokes the bssopenapi.QueryPrice API synchronously
+// api document: https://help.aliyun.com/api/bssopenapi/queryprice.html
+func (client *Client) QueryPrice(request *QueryPriceRequest) (response *QueryPriceResponse, err error) {
+	response = CreateQueryPriceResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// QueryPriceWithChan invokes the bssopenapi.QueryPrice API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/queryprice.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryPriceWithChan(request *QueryPriceRequest) (<-chan *QueryPriceResponse, <-chan error) {
+	responseChan := make(chan *QueryPriceResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.QueryPrice(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// QueryPriceWithCallback invokes the bssopenapi.QueryPrice API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/queryprice.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryPriceWithCallback(request *QueryPriceRequest, callback func(response *QueryPriceResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *QueryPriceResponse
+		var err error
+		defer close(result)
+		response, err = client.QueryPrice(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// QueryPriceRequest is the request struct for api QueryPrice
+type QueryPriceRequest struct {
+	*requests.RpcRequest
+	ParamStr string `position:"Query" name:"ParamStr"`
+}
+
+// QueryPriceResponse is the response struct for api QueryPrice
+type QueryPriceResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	Success   bool   `json:"Success" xml:"Success"`
+	Code      string `json:"Code" xml:"Code"`
+	Message   string `json:"Message" xml:"Message"`
+	Data      string `json:"Data" xml:"Data"`
+	ErrCode   string `json:"ErrCode" xml:"ErrCode"`
+}
+
+// CreateQueryPriceRequest creates a request to invoke QueryPrice API
+func CreateQueryPriceRequest() (request *QueryPriceRequest) {
+	request = &QueryPriceRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryPrice", "", "")
+	return
+}
+
+// CreateQueryPriceResponse creates a response to parse from QueryPrice response
+func CreateQueryPriceResponse() (response *QueryPriceResponse) {
+	response = &QueryPriceResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 5 - 5
services/bssopenapi/query_product_list.go

@@ -84,11 +84,11 @@ type QueryProductListRequest struct {
 // 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"`
-	Message   string                 `json:"Message" xml:"Message"`
-	Data      DataInQueryProductList `json:"Data" xml:"Data"`
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	Success   bool   `json:"Success" xml:"Success"`
+	Code      string `json:"Code" xml:"Code"`
+	Message   string `json:"Message" xml:"Message"`
+	Data      Data   `json:"Data" xml:"Data"`
 }
 
 // CreateQueryProductListRequest creates a request to invoke QueryProductList API

+ 5 - 5
services/bssopenapi/query_redeem.go

@@ -86,11 +86,11 @@ type QueryRedeemRequest struct {
 // QueryRedeemResponse is the response struct for api QueryRedeem
 type QueryRedeemResponse struct {
 	*responses.BaseResponse
-	RequestId string `json:"RequestId" xml:"RequestId"`
-	Success   bool   `json:"Success" xml:"Success"`
-	Code      string `json:"Code" xml:"Code"`
-	Message   string `json:"Message" xml:"Message"`
-	Data      Data   `json:"Data" xml:"Data"`
+	RequestId string            `json:"RequestId" xml:"RequestId"`
+	Success   bool              `json:"Success" xml:"Success"`
+	Code      string            `json:"Code" xml:"Code"`
+	Message   string            `json:"Message" xml:"Message"`
+	Data      DataInQueryRedeem `json:"Data" xml:"Data"`
 }
 
 // CreateQueryRedeemRequest creates a request to invoke QueryRedeem API

+ 5 - 5
services/bssopenapi/query_settlement_bill.go

@@ -92,11 +92,11 @@ type QuerySettlementBillRequest struct {
 // QuerySettlementBillResponse is the response struct for api QuerySettlementBill
 type QuerySettlementBillResponse struct {
 	*responses.BaseResponse
-	RequestId string                    `json:"RequestId" xml:"RequestId"`
-	Success   bool                      `json:"Success" xml:"Success"`
-	Code      string                    `json:"Code" xml:"Code"`
-	Message   string                    `json:"Message" xml:"Message"`
-	Data      DataInQuerySettlementBill `json:"Data" xml:"Data"`
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	Success   bool   `json:"Success" xml:"Success"`
+	Code      string `json:"Code" xml:"Code"`
+	Message   string `json:"Message" xml:"Message"`
+	Data      Data   `json:"Data" xml:"Data"`
 }
 
 // CreateQuerySettlementBillRequest creates a request to invoke QuerySettlementBill API

+ 21 - 0
services/bssopenapi/struct_applicable_products.go

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

+ 40 - 0
services/bssopenapi/struct_customer_invoice.go

@@ -0,0 +1,40 @@
+package bssopenapi
+
+//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.
+
+// CustomerInvoice is a nested struct in bssopenapi response
+type CustomerInvoice struct {
+	Id                      int    `json:"Id" xml:"Id"`
+	UserId                  int    `json:"UserId" xml:"UserId"`
+	UserNick                string `json:"UserNick" xml:"UserNick"`
+	InvoiceTitle            string `json:"InvoiceTitle" xml:"InvoiceTitle"`
+	CustomerType            int    `json:"CustomerType" xml:"CustomerType"`
+	TaxpayerType            int    `json:"TaxpayerType" xml:"TaxpayerType"`
+	Bank                    string `json:"Bank" xml:"Bank"`
+	BankNo                  string `json:"BankNo" xml:"BankNo"`
+	OperatingLicenseAddress string `json:"OperatingLicenseAddress" xml:"OperatingLicenseAddress"`
+	OperatingLicensePhone   string `json:"OperatingLicensePhone" xml:"OperatingLicensePhone"`
+	RegisterNo              string `json:"RegisterNo" xml:"RegisterNo"`
+	StartCycle              int    `json:"StartCycle" xml:"StartCycle"`
+	Status                  int    `json:"Status" xml:"Status"`
+	GmtCreate               string `json:"GmtCreate" xml:"GmtCreate"`
+	TaxationLicense         string `json:"TaxationLicense" xml:"TaxationLicense"`
+	AdjustType              int    `json:"AdjustType" xml:"AdjustType"`
+	EndCycle                int    `json:"EndCycle" xml:"EndCycle"`
+	TitleChangeInstructions string `json:"TitleChangeInstructions" xml:"TitleChangeInstructions"`
+	IssueType               int    `json:"IssueType" xml:"IssueType"`
+	Type                    int    `json:"Type" xml:"Type"`
+}

+ 32 - 0
services/bssopenapi/struct_customer_invoice_address.go

@@ -0,0 +1,32 @@
+package bssopenapi
+
+//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.
+
+// CustomerInvoiceAddress is a nested struct in bssopenapi response
+type CustomerInvoiceAddress struct {
+	Id              int    `json:"Id" xml:"Id"`
+	UserId          int    `json:"UserId" xml:"UserId"`
+	UserNick        string `json:"UserNick" xml:"UserNick"`
+	Addressee       string `json:"Addressee" xml:"Addressee"`
+	Province        string `json:"Province" xml:"Province"`
+	City            string `json:"City" xml:"City"`
+	County          string `json:"County" xml:"County"`
+	Street          string `json:"Street" xml:"Street"`
+	PostalCode      string `json:"PostalCode" xml:"PostalCode"`
+	Phone           string `json:"Phone" xml:"Phone"`
+	BizType         string `json:"BizType" xml:"BizType"`
+	DeliveryAddress string `json:"DeliveryAddress" xml:"DeliveryAddress"`
+}

+ 21 - 0
services/bssopenapi/struct_customer_invoice_address_list.go

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

+ 21 - 0
services/bssopenapi/struct_customer_invoice_list.go

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

+ 52 - 43
services/bssopenapi/struct_data.go

@@ -17,47 +17,56 @@ package bssopenapi
 
 // Data is a nested struct in bssopenapi response
 type Data struct {
-	BusinessType           string                                 `json:"BusinessType" xml:"BusinessType"`
-	TradePrice             float64                                `json:"TradePrice" xml:"TradePrice"`
-	HostId                 string                                 `json:"HostId" xml:"HostId"`
-	PageSize               int                                    `json:"PageSize" xml:"PageSize"`
-	Numerator              int                                    `json:"Numerator" xml:"Numerator"`
-	OriginalPrice          float64                                `json:"OriginalPrice" xml:"OriginalPrice"`
-	AvailableAmount        string                                 `json:"AvailableAmount" xml:"AvailableAmount"`
-	Amount                 string                                 `json:"Amount" xml:"Amount"`
-	MybankCreditAmount     string                                 `json:"MybankCreditAmount" xml:"MybankCreditAmount"`
-	OrderId                string                                 `json:"OrderId" xml:"OrderId"`
-	CreditAmount           string                                 `json:"CreditAmount" xml:"CreditAmount"`
-	ThresholdType          int                                    `json:"ThresholdType" xml:"ThresholdType"`
-	InstanceId             string                                 `json:"InstanceId" xml:"InstanceId"`
-	ItemCode               string                                 `json:"ItemCode" xml:"ItemCode"`
-	ThresholdAmount        string                                 `json:"ThresholdAmount" xml:"ThresholdAmount"`
-	BillingCycle           string                                 `json:"BillingCycle" xml:"BillingCycle"`
-	Boolean                bool                                   `json:"Boolean" xml:"Boolean"`
-	Uid                    int                                    `json:"Uid" xml:"Uid"`
-	TotalCount             int                                    `json:"TotalCount" xml:"TotalCount"`
-	OutstandingAmount      float64                                `json:"OutstandingAmount" xml:"OutstandingAmount"`
-	InvalidTimeStamp       int                                    `json:"InvalidTimeStamp" xml:"InvalidTimeStamp"`
-	Bid                    string                                 `json:"Bid" xml:"Bid"`
-	Currency               string                                 `json:"Currency" xml:"Currency"`
-	Quantity               int                                    `json:"Quantity" xml:"Quantity"`
-	AvailableCashAmount    string                                 `json:"AvailableCashAmount" xml:"AvailableCashAmount"`
-	PageNum                int                                    `json:"PageNum" xml:"PageNum"`
-	DiscountPrice          float64                                `json:"DiscountPrice" xml:"DiscountPrice"`
-	EffectTimeStamp        int                                    `json:"EffectTimeStamp" xml:"EffectTimeStamp"`
-	PrimaryAccount         string                                 `json:"PrimaryAccount" xml:"PrimaryAccount"`
-	TotalOutstandingAmount float64                                `json:"TotalOutstandingAmount" xml:"TotalOutstandingAmount"`
-	Status                 string                                 `json:"Status" xml:"Status"`
-	UserId                 int                                    `json:"UserId" xml:"UserId"`
-	Denominator            int                                    `json:"Denominator" xml:"Denominator"`
-	NewInvoiceAmount       float64                                `json:"NewInvoiceAmount" xml:"NewInvoiceAmount"`
-	ModuleList             ModuleList                             `json:"ModuleList" xml:"ModuleList"`
-	Redeem                 Redeem                                 `json:"Redeem" xml:"Redeem"`
-	Promotions             Promotions                             `json:"Promotions" xml:"Promotions"`
-	ResourcePackages       ResourcePackages                       `json:"ResourcePackages" xml:"ResourcePackages"`
-	ModuleDetails          ModuleDetailsInGetSubscriptionPrice    `json:"ModuleDetails" xml:"ModuleDetails"`
-	Modules                ModulesInQueryPriceList                `json:"Modules" xml:"Modules"`
-	AttributeList          AttributeList                          `json:"AttributeList" xml:"AttributeList"`
-	PromotionDetails       PromotionDetailsInGetSubscriptionPrice `json:"PromotionDetails" xml:"PromotionDetails"`
-	Items                  ItemsInQueryMonthlyBill                `json:"Items" xml:"Items"`
+	BusinessType               string                                 `json:"BusinessType" xml:"BusinessType"`
+	TradePrice                 float64                                `json:"TradePrice" xml:"TradePrice"`
+	HostId                     string                                 `json:"HostId" xml:"HostId"`
+	OriginalPrice              float64                                `json:"OriginalPrice" xml:"OriginalPrice"`
+	OrderId                    string                                 `json:"OrderId" xml:"OrderId"`
+	TotalCount                 int                                    `json:"TotalCount" xml:"TotalCount"`
+	BillingCycle               string                                 `json:"BillingCycle" xml:"BillingCycle"`
+	Uid                        int                                    `json:"Uid" xml:"Uid"`
+	OutstandingAmount          float64                                `json:"OutstandingAmount" xml:"OutstandingAmount"`
+	InvalidTimeStamp           int                                    `json:"InvalidTimeStamp" xml:"InvalidTimeStamp"`
+	Quantity                   int                                    `json:"Quantity" xml:"Quantity"`
+	AvailableCashAmount        string                                 `json:"AvailableCashAmount" xml:"AvailableCashAmount"`
+	EffectTimeStamp            int                                    `json:"EffectTimeStamp" xml:"EffectTimeStamp"`
+	PrimaryAccount             string                                 `json:"PrimaryAccount" xml:"PrimaryAccount"`
+	HostName                   string                                 `json:"HostName" xml:"HostName"`
+	TotalOutstandingAmount     float64                                `json:"TotalOutstandingAmount" xml:"TotalOutstandingAmount"`
+	Status                     string                                 `json:"Status" xml:"Status"`
+	UserId                     int                                    `json:"UserId" xml:"UserId"`
+	NewInvoiceAmount           float64                                `json:"NewInvoiceAmount" xml:"NewInvoiceAmount"`
+	Numerator                  int                                    `json:"Numerator" xml:"Numerator"`
+	AvailableAmount            string                                 `json:"AvailableAmount" xml:"AvailableAmount"`
+	PageSize                   int                                    `json:"PageSize" xml:"PageSize"`
+	Amount                     string                                 `json:"Amount" xml:"Amount"`
+	MybankCreditAmount         string                                 `json:"MybankCreditAmount" xml:"MybankCreditAmount"`
+	CreditAmount               string                                 `json:"CreditAmount" xml:"CreditAmount"`
+	ThresholdType              int                                    `json:"ThresholdType" xml:"ThresholdType"`
+	AccountID                  string                                 `json:"AccountID" xml:"AccountID"`
+	InstanceId                 string                                 `json:"InstanceId" xml:"InstanceId"`
+	ItemCode                   string                                 `json:"ItemCode" xml:"ItemCode"`
+	ThresholdAmount            string                                 `json:"ThresholdAmount" xml:"ThresholdAmount"`
+	InvoiceApplyId             int                                    `json:"InvoiceApplyId" xml:"InvoiceApplyId"`
+	Boolean                    bool                                   `json:"Boolean" xml:"Boolean"`
+	PageNum                    int                                    `json:"PageNum" xml:"PageNum"`
+	Bid                        string                                 `json:"Bid" xml:"Bid"`
+	Currency                   string                                 `json:"Currency" xml:"Currency"`
+	DiscountPrice              float64                                `json:"DiscountPrice" xml:"DiscountPrice"`
+	AccountName                string                                 `json:"AccountName" xml:"AccountName"`
+	Denominator                int                                    `json:"Denominator" xml:"Denominator"`
+	ModuleList                 ModuleList                             `json:"ModuleList" xml:"ModuleList"`
+	InstanceList               []Instance                             `json:"InstanceList" xml:"InstanceList"`
+	OrderList                  OrderListInQueryOrders                 `json:"OrderList" xml:"OrderList"`
+	Modules                    ModulesInQueryInstanceGaapCost         `json:"Modules" xml:"Modules"`
+	Items                      ItemsInQueryInstanceBill               `json:"Items" xml:"Items"`
+	ResourcePackages           ResourcePackages                       `json:"ResourcePackages" xml:"ResourcePackages"`
+	ProductList                ProductList                            `json:"ProductList" xml:"ProductList"`
+	ModuleDetails              ModuleDetailsInGetSubscriptionPrice    `json:"ModuleDetails" xml:"ModuleDetails"`
+	PromotionDetails           PromotionDetailsInGetSubscriptionPrice `json:"PromotionDetails" xml:"PromotionDetails"`
+	CustomerInvoiceList        CustomerInvoiceList                    `json:"CustomerInvoiceList" xml:"CustomerInvoiceList"`
+	EvaluateList               EvaluateList                           `json:"EvaluateList" xml:"EvaluateList"`
+	Promotions                 Promotions                             `json:"Promotions" xml:"Promotions"`
+	CustomerInvoiceAddressList CustomerInvoiceAddressList             `json:"CustomerInvoiceAddressList" xml:"CustomerInvoiceAddressList"`
+	AttributeList              AttributeList                          `json:"AttributeList" xml:"AttributeList"`
 }

+ 0 - 25
services/bssopenapi/struct_data_in_get_order_detail.go

@@ -1,25 +0,0 @@
-package bssopenapi
-
-//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.
-
-// DataInGetOrderDetail is a nested struct in bssopenapi response
-type DataInGetOrderDetail struct {
-	HostName   string                    `json:"HostName" xml:"HostName"`
-	PageNum    int                       `json:"PageNum" xml:"PageNum"`
-	PageSize   int                       `json:"PageSize" xml:"PageSize"`
-	TotalCount int                       `json:"TotalCount" xml:"TotalCount"`
-	OrderList  OrderListInGetOrderDetail `json:"OrderList" xml:"OrderList"`
-}

+ 0 - 24
services/bssopenapi/struct_data_in_query_available_instances.go

@@ -1,24 +0,0 @@
-package bssopenapi
-
-//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.
-
-// DataInQueryAvailableInstances is a nested struct in bssopenapi response
-type DataInQueryAvailableInstances struct {
-	PageNum      int        `json:"PageNum" xml:"PageNum"`
-	PageSize     int        `json:"PageSize" xml:"PageSize"`
-	TotalCount   int        `json:"TotalCount" xml:"TotalCount"`
-	InstanceList []Instance `json:"InstanceList" xml:"InstanceList"`
-}

+ 0 - 25
services/bssopenapi/struct_data_in_query_instance_gaap_cost.go

@@ -1,25 +0,0 @@
-package bssopenapi
-
-//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.
-
-// DataInQueryInstanceGaapCost is a nested struct in bssopenapi response
-type DataInQueryInstanceGaapCost struct {
-	HostId     string                         `json:"HostId" xml:"HostId"`
-	PageNum    int                            `json:"PageNum" xml:"PageNum"`
-	PageSize   int                            `json:"PageSize" xml:"PageSize"`
-	TotalCount int                            `json:"TotalCount" xml:"TotalCount"`
-	Modules    ModulesInQueryInstanceGaapCost `json:"Modules" xml:"Modules"`
-}

+ 0 - 25
services/bssopenapi/struct_data_in_query_monthly_instance_consumption.go

@@ -1,25 +0,0 @@
-package bssopenapi
-
-//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.
-
-// DataInQueryMonthlyInstanceConsumption is a nested struct in bssopenapi response
-type DataInQueryMonthlyInstanceConsumption struct {
-	PageNum      int                                    `json:"PageNum" xml:"PageNum"`
-	PageSize     int                                    `json:"PageSize" xml:"PageSize"`
-	TotalCount   int                                    `json:"TotalCount" xml:"TotalCount"`
-	BillingCycle string                                 `json:"BillingCycle" xml:"BillingCycle"`
-	Items        ItemsInQueryMonthlyInstanceConsumption `json:"Items" xml:"Items"`
-}

+ 0 - 25
services/bssopenapi/struct_data_in_query_orders.go

@@ -1,25 +0,0 @@
-package bssopenapi
-
-//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.
-
-// DataInQueryOrders is a nested struct in bssopenapi response
-type DataInQueryOrders struct {
-	HostName   string                 `json:"HostName" xml:"HostName"`
-	PageNum    int                    `json:"PageNum" xml:"PageNum"`
-	PageSize   int                    `json:"PageSize" xml:"PageSize"`
-	TotalCount int                    `json:"TotalCount" xml:"TotalCount"`
-	OrderList  OrderListInQueryOrders `json:"OrderList" xml:"OrderList"`
-}

+ 0 - 24
services/bssopenapi/struct_data_in_query_product_list.go

@@ -1,24 +0,0 @@
-package bssopenapi
-
-//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.
-
-// DataInQueryProductList is a nested struct in bssopenapi response
-type DataInQueryProductList struct {
-	TotalCount  int         `json:"TotalCount" xml:"TotalCount"`
-	PageNum     int         `json:"PageNum" xml:"PageNum"`
-	PageSize    int         `json:"PageSize" xml:"PageSize"`
-	ProductList ProductList `json:"ProductList" xml:"ProductList"`
-}

+ 24 - 0
services/bssopenapi/struct_data_in_query_redeem.go

@@ -0,0 +1,24 @@
+package bssopenapi
+
+//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.
+
+// DataInQueryRedeem is a nested struct in bssopenapi response
+type DataInQueryRedeem struct {
+	PageNum    int    `json:"PageNum" xml:"PageNum"`
+	PageSize   int    `json:"PageSize" xml:"PageSize"`
+	TotalCount int    `json:"TotalCount" xml:"TotalCount"`
+	Redeem     Redeem `json:"Redeem" xml:"Redeem"`
+}

+ 0 - 25
services/bssopenapi/struct_data_in_query_settlement_bill.go

@@ -1,25 +0,0 @@
-package bssopenapi
-
-//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.
-
-// DataInQuerySettlementBill is a nested struct in bssopenapi response
-type DataInQuerySettlementBill struct {
-	PageNum      int                        `json:"PageNum" xml:"PageNum"`
-	PageSize     int                        `json:"PageSize" xml:"PageSize"`
-	TotalCount   int                        `json:"TotalCount" xml:"TotalCount"`
-	BillingCycle string                     `json:"BillingCycle" xml:"BillingCycle"`
-	Items        ItemsInQuerySettlementBill `json:"Items" xml:"Items"`
-}

+ 41 - 0
services/bssopenapi/struct_evaluate.go

@@ -0,0 +1,41 @@
+package bssopenapi
+
+//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.
+
+// Evaluate is a nested struct in bssopenapi response
+type Evaluate struct {
+	Id                 int    `json:"Id" xml:"Id"`
+	GmtCreate          string `json:"GmtCreate" xml:"GmtCreate"`
+	GmtModified        string `json:"GmtModified" xml:"GmtModified"`
+	UserId             int    `json:"UserId" xml:"UserId"`
+	UserNick           string `json:"UserNick" xml:"UserNick"`
+	OutBizId           string `json:"OutBizId" xml:"OutBizId"`
+	BillId             int    `json:"BillId" xml:"BillId"`
+	ItemId             int    `json:"ItemId" xml:"ItemId"`
+	BillCycle          string `json:"BillCycle" xml:"BillCycle"`
+	BizType            string `json:"BizType" xml:"BizType"`
+	OriginalAmount     int    `json:"OriginalAmount" xml:"OriginalAmount"`
+	PresentAmount      int    `json:"PresentAmount" xml:"PresentAmount"`
+	CanInvoiceAmount   int    `json:"CanInvoiceAmount" xml:"CanInvoiceAmount"`
+	InvoicedAmount     int    `json:"InvoicedAmount" xml:"InvoicedAmount"`
+	OffsetCostAmount   int    `json:"OffsetCostAmount" xml:"OffsetCostAmount"`
+	OffsetAcceptAmount int    `json:"OffsetAcceptAmount" xml:"OffsetAcceptAmount"`
+	Status             int    `json:"Status" xml:"Status"`
+	OpId               string `json:"OpId" xml:"OpId"`
+	Name               string `json:"Name" xml:"Name"`
+	BizTime            string `json:"BizTime" xml:"BizTime"`
+	Type               int    `json:"Type" xml:"Type"`
+}

+ 21 - 0
services/bssopenapi/struct_evaluate_list.go

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

+ 29 - 26
services/bssopenapi/struct_instance.go

@@ -17,30 +17,33 @@ package bssopenapi
 
 // Instance is a nested struct in bssopenapi response
 type Instance struct {
-	Region              string `json:"Region" xml:"Region"`
-	ExpectedReleaseTime string `json:"ExpectedReleaseTime" xml:"ExpectedReleaseTime"`
-	CreateTime          string `json:"CreateTime" xml:"CreateTime"`
-	OwnerId             int    `json:"OwnerId" xml:"OwnerId"`
-	TotalAmount         string `json:"TotalAmount" xml:"TotalAmount"`
-	RenewStatus         string `json:"RenewStatus" xml:"RenewStatus"`
-	SubStatus           string `json:"SubStatus" xml:"SubStatus"`
-	InstanceId          string `json:"InstanceId" xml:"InstanceId"`
-	TotalAmountUnit     string `json:"TotalAmountUnit" xml:"TotalAmountUnit"`
-	SubscriptionType    string `json:"SubscriptionType" xml:"SubscriptionType"`
-	RemainingAmountUnit string `json:"RemainingAmountUnit" xml:"RemainingAmountUnit"`
-	StopTime            string `json:"StopTime" xml:"StopTime"`
-	Seller              string `json:"Seller" xml:"Seller"`
-	Remark              string `json:"Remark" xml:"Remark"`
-	ProductType         string `json:"ProductType" xml:"ProductType"`
-	ProductCode         string `json:"ProductCode" xml:"ProductCode"`
-	RenewalDuration     int    `json:"RenewalDuration" xml:"RenewalDuration"`
-	RenewalDurationUnit string `json:"RenewalDurationUnit" xml:"RenewalDurationUnit"`
-	RemainingAmount     string `json:"RemainingAmount" xml:"RemainingAmount"`
-	EffectiveTime       string `json:"EffectiveTime" xml:"EffectiveTime"`
-	ExpiryTime          string `json:"ExpiryTime" xml:"ExpiryTime"`
-	EndTime             string `json:"EndTime" xml:"EndTime"`
-	SellerId            int    `json:"SellerId" xml:"SellerId"`
-	InstanceID          string `json:"InstanceID" xml:"InstanceID"`
-	ReleaseTime         string `json:"ReleaseTime" xml:"ReleaseTime"`
-	Status              string `json:"Status" xml:"Status"`
+	Region              string   `json:"Region" xml:"Region"`
+	ExpectedReleaseTime string   `json:"ExpectedReleaseTime" xml:"ExpectedReleaseTime"`
+	PackageType         string   `json:"PackageType" xml:"PackageType"`
+	DeductType          string   `json:"DeductType" xml:"DeductType"`
+	CreateTime          string   `json:"CreateTime" xml:"CreateTime"`
+	OwnerId             int      `json:"OwnerId" xml:"OwnerId"`
+	TotalAmount         string   `json:"TotalAmount" xml:"TotalAmount"`
+	RenewStatus         string   `json:"RenewStatus" xml:"RenewStatus"`
+	SubStatus           string   `json:"SubStatus" xml:"SubStatus"`
+	InstanceId          string   `json:"InstanceId" xml:"InstanceId"`
+	TotalAmountUnit     string   `json:"TotalAmountUnit" xml:"TotalAmountUnit"`
+	SubscriptionType    string   `json:"SubscriptionType" xml:"SubscriptionType"`
+	RemainingAmountUnit string   `json:"RemainingAmountUnit" xml:"RemainingAmountUnit"`
+	StopTime            string   `json:"StopTime" xml:"StopTime"`
+	Seller              string   `json:"Seller" xml:"Seller"`
+	Remark              string   `json:"Remark" xml:"Remark"`
+	ProductType         string   `json:"ProductType" xml:"ProductType"`
+	ProductCode         string   `json:"ProductCode" xml:"ProductCode"`
+	RenewalDuration     int      `json:"RenewalDuration" xml:"RenewalDuration"`
+	RenewalDurationUnit string   `json:"RenewalDurationUnit" xml:"RenewalDurationUnit"`
+	RemainingAmount     string   `json:"RemainingAmount" xml:"RemainingAmount"`
+	EffectiveTime       string   `json:"EffectiveTime" xml:"EffectiveTime"`
+	ExpiryTime          string   `json:"ExpiryTime" xml:"ExpiryTime"`
+	EndTime             string   `json:"EndTime" xml:"EndTime"`
+	SellerId            int      `json:"SellerId" xml:"SellerId"`
+	InstanceID          string   `json:"InstanceID" xml:"InstanceID"`
+	ReleaseTime         string   `json:"ReleaseTime" xml:"ReleaseTime"`
+	Status              string   `json:"Status" xml:"Status"`
+	ApplicableProducts  []string `json:"ApplicableProducts" xml:"ApplicableProducts"`
 }

+ 33 - 0
services/bssopenapi/struct_instance_in_query_resource_package_instances.go

@@ -0,0 +1,33 @@
+package bssopenapi
+
+//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.
+
+// InstanceInQueryResourcePackageInstances is a nested struct in bssopenapi response
+type InstanceInQueryResourcePackageInstances struct {
+	InstanceId          string             `json:"InstanceId" xml:"InstanceId"`
+	Region              string             `json:"Region" xml:"Region"`
+	TotalAmount         string             `json:"TotalAmount" xml:"TotalAmount"`
+	TotalAmountUnit     string             `json:"TotalAmountUnit" xml:"TotalAmountUnit"`
+	RemainingAmount     string             `json:"RemainingAmount" xml:"RemainingAmount"`
+	RemainingAmountUnit string             `json:"RemainingAmountUnit" xml:"RemainingAmountUnit"`
+	EffectiveTime       string             `json:"EffectiveTime" xml:"EffectiveTime"`
+	ExpiryTime          string             `json:"ExpiryTime" xml:"ExpiryTime"`
+	Remark              string             `json:"Remark" xml:"Remark"`
+	PackageType         string             `json:"PackageType" xml:"PackageType"`
+	Status              string             `json:"Status" xml:"Status"`
+	DeductType          string             `json:"DeductType" xml:"DeductType"`
+	ApplicableProducts  ApplicableProducts `json:"ApplicableProducts" xml:"ApplicableProducts"`
+}

+ 1 - 1
services/bssopenapi/struct_instances.go

@@ -17,5 +17,5 @@ package bssopenapi
 
 // Instances is a nested struct in bssopenapi response
 type Instances struct {
-	Instance []Instance `json:"Instance" xml:"Instance"`
+	Instance []InstanceInQueryResourcePackageInstances `json:"Instance" xml:"Instance"`
 }

+ 5 - 2
services/bssopenapi/struct_item.go

@@ -23,6 +23,7 @@ type Item struct {
 	UsageStartTime              string  `json:"UsageStartTime" xml:"UsageStartTime"`
 	SuborderID                  string  `json:"SuborderID" xml:"SuborderID"`
 	SolutionCode                string  `json:"SolutionCode" xml:"SolutionCode"`
+	ProductDetail               string  `json:"ProductDetail" xml:"ProductDetail"`
 	Promotion                   string  `json:"Promotion" xml:"Promotion"`
 	Seller                      string  `json:"Seller" xml:"Seller"`
 	PretaxAmountLocal           float64 `json:"PretaxAmountLocal" xml:"PretaxAmountLocal"`
@@ -31,12 +32,13 @@ type Item struct {
 	Quantity                    string  `json:"Quantity" xml:"Quantity"`
 	InvoiceDiscount             float64 `json:"InvoiceDiscount" xml:"InvoiceDiscount"`
 	MybankPaymentAmount         float64 `json:"MybankPaymentAmount" xml:"MybankPaymentAmount"`
-	InstanceID                  string  `json:"InstanceID" xml:"InstanceID"`
 	PretaxGrossAmount           float64 `json:"PretaxGrossAmount" xml:"PretaxGrossAmount"`
+	InstanceID                  string  `json:"InstanceID" xml:"InstanceID"`
 	RecordID                    string  `json:"RecordID" xml:"RecordID"`
 	Config                      string  `json:"Config" xml:"Config"`
 	Status                      string  `json:"Status" xml:"Status"`
 	Item                        string  `json:"Item" xml:"Item"`
+	ProductName                 string  `json:"ProductName" xml:"ProductName"`
 	Region                      string  `json:"Region" xml:"Region"`
 	PaymentAmount               float64 `json:"PaymentAmount" xml:"PaymentAmount"`
 	UsageEndTime                string  `json:"UsageEndTime" xml:"UsageEndTime"`
@@ -59,8 +61,9 @@ type Item struct {
 	ProductType                 string  `json:"ProductType" xml:"ProductType"`
 	AccountDiscount             float64 `json:"AccountDiscount" xml:"AccountDiscount"`
 	Currency                    string  `json:"Currency" xml:"Currency"`
-	OriginalOrderID             string  `json:"OriginalOrderID" xml:"OriginalOrderID"`
 	DeductedByPrepaidCard       float64 `json:"DeductedByPrepaidCard" xml:"DeductedByPrepaidCard"`
+	OriginalOrderID             string  `json:"OriginalOrderID" xml:"OriginalOrderID"`
+	PaymentTransactionID        string  `json:"PaymentTransactionID" xml:"PaymentTransactionID"`
 	OrderID                     string  `json:"OrderID" xml:"OrderID"`
 	OrderType                   string  `json:"OrderType" xml:"OrderType"`
 	DeductedByCoupons           float64 `json:"DeductedByCoupons" xml:"DeductedByCoupons"`

+ 45 - 0
services/bssopenapi/struct_item_in_query_instance_bill.go

@@ -0,0 +1,45 @@
+package bssopenapi
+
+//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.
+
+// ItemInQueryInstanceBill is a nested struct in bssopenapi response
+type ItemInQueryInstanceBill struct {
+	InstanceID                string  `json:"InstanceID" xml:"InstanceID"`
+	ServicePeriod             float64 `json:"ServicePeriod" xml:"ServicePeriod"`
+	BillingType               string  `json:"BillingType" xml:"BillingType"`
+	CostUnit                  string  `json:"CostUnit" xml:"CostUnit"`
+	ProductCode               string  `json:"ProductCode" xml:"ProductCode"`
+	ProductType               string  `json:"ProductType" xml:"ProductType"`
+	SubscriptionType          string  `json:"SubscriptionType" xml:"SubscriptionType"`
+	ProductName               string  `json:"ProductName" xml:"ProductName"`
+	ProductDetail             string  `json:"ProductDetail" xml:"ProductDetail"`
+	OwnerID                   int     `json:"OwnerID" xml:"OwnerID"`
+	BillingItem               string  `json:"BillingItem" xml:"BillingItem"`
+	ListPrice                 float64 `json:"ListPrice" xml:"ListPrice"`
+	ListPriceUnit             string  `json:"ListPriceUnit" xml:"ListPriceUnit"`
+	Usage                     float64 `json:"Usage" xml:"Usage"`
+	UsageUnit                 string  `json:"UsageUnit" xml:"UsageUnit"`
+	DeductedByResourcePackage float64 `json:"DeductedByResourcePackage" xml:"DeductedByResourcePackage"`
+	PretaxGrossAmount         float64 `json:"PretaxGrossAmount" xml:"PretaxGrossAmount"`
+	InvoiceDiscount           float64 `json:"InvoiceDiscount" xml:"InvoiceDiscount"`
+	DeductedByCoupons         float64 `json:"DeductedByCoupons" xml:"DeductedByCoupons"`
+	PretaxAmount              float64 `json:"PretaxAmount" xml:"PretaxAmount"`
+	DeductedByCashCoupons     float64 `json:"DeductedByCashCoupons" xml:"DeductedByCashCoupons"`
+	DeductedByPrepaidCard     float64 `json:"DeductedByPrepaidCard" xml:"DeductedByPrepaidCard"`
+	PaymentAmount             float64 `json:"PaymentAmount" xml:"PaymentAmount"`
+	OutstandingAmount         float64 `json:"OutstandingAmount" xml:"OutstandingAmount"`
+	Currency                  string  `json:"Currency" xml:"Currency"`
+}

+ 21 - 0
services/bssopenapi/struct_items_in_query_bill.go

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

+ 21 - 0
services/bssopenapi/struct_items_in_query_bill_overview.go

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

+ 21 - 0
services/bssopenapi/struct_items_in_query_instance_bill.go

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

+ 112 - 0
services/cdn/batch_set_cdn_domain_server_certificate.go

@@ -0,0 +1,112 @@
+package cdn
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// BatchSetCdnDomainServerCertificate invokes the cdn.BatchSetCdnDomainServerCertificate API synchronously
+// api document: https://help.aliyun.com/api/cdn/batchsetcdndomainservercertificate.html
+func (client *Client) BatchSetCdnDomainServerCertificate(request *BatchSetCdnDomainServerCertificateRequest) (response *BatchSetCdnDomainServerCertificateResponse, err error) {
+	response = CreateBatchSetCdnDomainServerCertificateResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// BatchSetCdnDomainServerCertificateWithChan invokes the cdn.BatchSetCdnDomainServerCertificate API asynchronously
+// api document: https://help.aliyun.com/api/cdn/batchsetcdndomainservercertificate.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) BatchSetCdnDomainServerCertificateWithChan(request *BatchSetCdnDomainServerCertificateRequest) (<-chan *BatchSetCdnDomainServerCertificateResponse, <-chan error) {
+	responseChan := make(chan *BatchSetCdnDomainServerCertificateResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.BatchSetCdnDomainServerCertificate(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// BatchSetCdnDomainServerCertificateWithCallback invokes the cdn.BatchSetCdnDomainServerCertificate API asynchronously
+// api document: https://help.aliyun.com/api/cdn/batchsetcdndomainservercertificate.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) BatchSetCdnDomainServerCertificateWithCallback(request *BatchSetCdnDomainServerCertificateRequest, callback func(response *BatchSetCdnDomainServerCertificateResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *BatchSetCdnDomainServerCertificateResponse
+		var err error
+		defer close(result)
+		response, err = client.BatchSetCdnDomainServerCertificate(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// BatchSetCdnDomainServerCertificateRequest is the request struct for api BatchSetCdnDomainServerCertificate
+type BatchSetCdnDomainServerCertificateRequest struct {
+	*requests.RpcRequest
+	ForceSet      string           `position:"Query" name:"ForceSet"`
+	SecurityToken string           `position:"Query" name:"SecurityToken"`
+	CertType      string           `position:"Query" name:"CertType"`
+	SSLPub        string           `position:"Query" name:"SSLPub"`
+	CertName      string           `position:"Query" name:"CertName"`
+	SSLProtocol   string           `position:"Query" name:"SSLProtocol"`
+	DomainName    string           `position:"Query" name:"DomainName"`
+	OwnerId       requests.Integer `position:"Query" name:"OwnerId"`
+	Region        string           `position:"Query" name:"Region"`
+	SSLPri        string           `position:"Query" name:"SSLPri"`
+}
+
+// BatchSetCdnDomainServerCertificateResponse is the response struct for api BatchSetCdnDomainServerCertificate
+type BatchSetCdnDomainServerCertificateResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateBatchSetCdnDomainServerCertificateRequest creates a request to invoke BatchSetCdnDomainServerCertificate API
+func CreateBatchSetCdnDomainServerCertificateRequest() (request *BatchSetCdnDomainServerCertificateRequest) {
+	request = &BatchSetCdnDomainServerCertificateRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Cdn", "2018-05-10", "BatchSetCdnDomainServerCertificate", "", "")
+	return
+}
+
+// CreateBatchSetCdnDomainServerCertificateResponse creates a response to parse from BatchSetCdnDomainServerCertificate response
+func CreateBatchSetCdnDomainServerCertificateResponse() (response *BatchSetCdnDomainServerCertificateResponse) {
+	response = &BatchSetCdnDomainServerCertificateResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 106 - 0
services/cdn/delete_specific_config.go

@@ -0,0 +1,106 @@
+package cdn
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// DeleteSpecificConfig invokes the cdn.DeleteSpecificConfig API synchronously
+// api document: https://help.aliyun.com/api/cdn/deletespecificconfig.html
+func (client *Client) DeleteSpecificConfig(request *DeleteSpecificConfigRequest) (response *DeleteSpecificConfigResponse, err error) {
+	response = CreateDeleteSpecificConfigResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DeleteSpecificConfigWithChan invokes the cdn.DeleteSpecificConfig API asynchronously
+// api document: https://help.aliyun.com/api/cdn/deletespecificconfig.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteSpecificConfigWithChan(request *DeleteSpecificConfigRequest) (<-chan *DeleteSpecificConfigResponse, <-chan error) {
+	responseChan := make(chan *DeleteSpecificConfigResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DeleteSpecificConfig(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DeleteSpecificConfigWithCallback invokes the cdn.DeleteSpecificConfig API asynchronously
+// api document: https://help.aliyun.com/api/cdn/deletespecificconfig.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteSpecificConfigWithCallback(request *DeleteSpecificConfigRequest, callback func(response *DeleteSpecificConfigResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DeleteSpecificConfigResponse
+		var err error
+		defer close(result)
+		response, err = client.DeleteSpecificConfig(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DeleteSpecificConfigRequest is the request struct for api DeleteSpecificConfig
+type DeleteSpecificConfigRequest struct {
+	*requests.RpcRequest
+	SecurityToken string           `position:"Query" name:"SecurityToken"`
+	ConfigId      string           `position:"Query" name:"ConfigId"`
+	DomainName    string           `position:"Query" name:"DomainName"`
+	OwnerId       requests.Integer `position:"Query" name:"OwnerId"`
+}
+
+// DeleteSpecificConfigResponse is the response struct for api DeleteSpecificConfig
+type DeleteSpecificConfigResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateDeleteSpecificConfigRequest creates a request to invoke DeleteSpecificConfig API
+func CreateDeleteSpecificConfigRequest() (request *DeleteSpecificConfigRequest) {
+	request = &DeleteSpecificConfigRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Cdn", "2018-05-10", "DeleteSpecificConfig", "", "")
+	return
+}
+
+// CreateDeleteSpecificConfigResponse creates a response to parse from DeleteSpecificConfig response
+func CreateDeleteSpecificConfigResponse() (response *DeleteSpecificConfigResponse) {
+	response = &DeleteSpecificConfigResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 106 - 0
services/cdn/describe_cdn_types.go

@@ -0,0 +1,106 @@
+package cdn
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// DescribeCdnTypes invokes the cdn.DescribeCdnTypes API synchronously
+// api document: https://help.aliyun.com/api/cdn/describecdntypes.html
+func (client *Client) DescribeCdnTypes(request *DescribeCdnTypesRequest) (response *DescribeCdnTypesResponse, err error) {
+	response = CreateDescribeCdnTypesResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DescribeCdnTypesWithChan invokes the cdn.DescribeCdnTypes API asynchronously
+// api document: https://help.aliyun.com/api/cdn/describecdntypes.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeCdnTypesWithChan(request *DescribeCdnTypesRequest) (<-chan *DescribeCdnTypesResponse, <-chan error) {
+	responseChan := make(chan *DescribeCdnTypesResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DescribeCdnTypes(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DescribeCdnTypesWithCallback invokes the cdn.DescribeCdnTypes API asynchronously
+// api document: https://help.aliyun.com/api/cdn/describecdntypes.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeCdnTypesWithCallback(request *DescribeCdnTypesRequest, callback func(response *DescribeCdnTypesResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DescribeCdnTypesResponse
+		var err error
+		defer close(result)
+		response, err = client.DescribeCdnTypes(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DescribeCdnTypesRequest is the request struct for api DescribeCdnTypes
+type DescribeCdnTypesRequest struct {
+	*requests.RpcRequest
+	SecurityToken string           `position:"Query" name:"SecurityToken"`
+	OwnerAccount  string           `position:"Query" name:"OwnerAccount"`
+	OwnerId       requests.Integer `position:"Query" name:"OwnerId"`
+}
+
+// DescribeCdnTypesResponse is the response struct for api DescribeCdnTypes
+type DescribeCdnTypesResponse struct {
+	*responses.BaseResponse
+	RequestId string   `json:"RequestId" xml:"RequestId"`
+	CdnTypes  CdnTypes `json:"CdnTypes" xml:"CdnTypes"`
+}
+
+// CreateDescribeCdnTypesRequest creates a request to invoke DescribeCdnTypes API
+func CreateDescribeCdnTypesRequest() (request *DescribeCdnTypesRequest) {
+	request = &DescribeCdnTypesRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Cdn", "2018-05-10", "DescribeCdnTypes", "", "")
+	return
+}
+
+// CreateDescribeCdnTypesResponse creates a response to parse from DescribeCdnTypes response
+func CreateDescribeCdnTypesResponse() (response *DescribeCdnTypesResponse) {
+	response = &DescribeCdnTypesResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 112 - 0
services/cdn/describe_domain_cc_attack_info.go

@@ -0,0 +1,112 @@
+package cdn
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// DescribeDomainCCAttackInfo invokes the cdn.DescribeDomainCCAttackInfo API synchronously
+// api document: https://help.aliyun.com/api/cdn/describedomainccattackinfo.html
+func (client *Client) DescribeDomainCCAttackInfo(request *DescribeDomainCCAttackInfoRequest) (response *DescribeDomainCCAttackInfoResponse, err error) {
+	response = CreateDescribeDomainCCAttackInfoResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DescribeDomainCCAttackInfoWithChan invokes the cdn.DescribeDomainCCAttackInfo API asynchronously
+// api document: https://help.aliyun.com/api/cdn/describedomainccattackinfo.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeDomainCCAttackInfoWithChan(request *DescribeDomainCCAttackInfoRequest) (<-chan *DescribeDomainCCAttackInfoResponse, <-chan error) {
+	responseChan := make(chan *DescribeDomainCCAttackInfoResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DescribeDomainCCAttackInfo(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DescribeDomainCCAttackInfoWithCallback invokes the cdn.DescribeDomainCCAttackInfo API asynchronously
+// api document: https://help.aliyun.com/api/cdn/describedomainccattackinfo.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeDomainCCAttackInfoWithCallback(request *DescribeDomainCCAttackInfoRequest, callback func(response *DescribeDomainCCAttackInfoResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DescribeDomainCCAttackInfoResponse
+		var err error
+		defer close(result)
+		response, err = client.DescribeDomainCCAttackInfo(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DescribeDomainCCAttackInfoRequest is the request struct for api DescribeDomainCCAttackInfo
+type DescribeDomainCCAttackInfoRequest struct {
+	*requests.RpcRequest
+	SecurityToken string           `position:"Query" name:"SecurityToken"`
+	DomainName    string           `position:"Query" name:"DomainName"`
+	EndTime       string           `position:"Query" name:"EndTime"`
+	StartTime     string           `position:"Query" name:"StartTime"`
+	OwnerId       requests.Integer `position:"Query" name:"OwnerId"`
+}
+
+// DescribeDomainCCAttackInfoResponse is the response struct for api DescribeDomainCCAttackInfo
+type DescribeDomainCCAttackInfoResponse struct {
+	*responses.BaseResponse
+	RequestId           string              `json:"RequestId" xml:"RequestId"`
+	DomainName          string              `json:"DomainName" xml:"DomainName"`
+	StartTime           string              `json:"StartTime" xml:"StartTime"`
+	EndTime             string              `json:"EndTime" xml:"EndTime"`
+	AttackIpDataList    AttackIpDataList    `json:"AttackIpDataList" xml:"AttackIpDataList"`
+	AttackedUrlDataList AttackedUrlDataList `json:"AttackedUrlDataList" xml:"AttackedUrlDataList"`
+}
+
+// CreateDescribeDomainCCAttackInfoRequest creates a request to invoke DescribeDomainCCAttackInfo API
+func CreateDescribeDomainCCAttackInfoRequest() (request *DescribeDomainCCAttackInfoRequest) {
+	request = &DescribeDomainCCAttackInfoRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Cdn", "2014-11-11", "DescribeDomainCCAttackInfo", "", "")
+	return
+}
+
+// CreateDescribeDomainCCAttackInfoResponse creates a response to parse from DescribeDomainCCAttackInfo response
+func CreateDescribeDomainCCAttackInfoResponse() (response *DescribeDomainCCAttackInfoResponse) {
+	response = &DescribeDomainCCAttackInfoResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 3 - 3
services/cdn/describe_domain_flow_data.go

@@ -76,17 +76,17 @@ func (client *Client) DescribeDomainFlowDataWithCallback(request *DescribeDomain
 // DescribeDomainFlowDataRequest is the request struct for api DescribeDomainFlowData
 type DescribeDomainFlowDataRequest struct {
 	*requests.RpcRequest
+	DomainType     string           `position:"Query" name:"DomainType"`
 	FixTimeGap     string           `position:"Query" name:"FixTimeGap"`
+	SecurityToken  string           `position:"Query" name:"SecurityToken"`
 	TimeMerge      string           `position:"Query" name:"TimeMerge"`
 	DomainName     string           `position:"Query" name:"DomainName"`
 	EndTime        string           `position:"Query" name:"EndTime"`
 	LocationNameEn string           `position:"Query" name:"LocationNameEn"`
+	Interval       string           `position:"Query" name:"Interval"`
 	StartTime      string           `position:"Query" name:"StartTime"`
 	IspNameEn      string           `position:"Query" name:"IspNameEn"`
 	OwnerId        requests.Integer `position:"Query" name:"OwnerId"`
-	DomainType     string           `position:"Query" name:"DomainType"`
-	SecurityToken  string           `position:"Query" name:"SecurityToken"`
-	Interval       string           `position:"Query" name:"Interval"`
 }
 
 // DescribeDomainFlowDataResponse is the response struct for api DescribeDomainFlowData

+ 114 - 0
services/cdn/describe_domain_slow_ratio.go

@@ -0,0 +1,114 @@
+package cdn
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// DescribeDomainSlowRatio invokes the cdn.DescribeDomainSlowRatio API synchronously
+// api document: https://help.aliyun.com/api/cdn/describedomainslowratio.html
+func (client *Client) DescribeDomainSlowRatio(request *DescribeDomainSlowRatioRequest) (response *DescribeDomainSlowRatioResponse, err error) {
+	response = CreateDescribeDomainSlowRatioResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DescribeDomainSlowRatioWithChan invokes the cdn.DescribeDomainSlowRatio API asynchronously
+// api document: https://help.aliyun.com/api/cdn/describedomainslowratio.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeDomainSlowRatioWithChan(request *DescribeDomainSlowRatioRequest) (<-chan *DescribeDomainSlowRatioResponse, <-chan error) {
+	responseChan := make(chan *DescribeDomainSlowRatioResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DescribeDomainSlowRatio(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DescribeDomainSlowRatioWithCallback invokes the cdn.DescribeDomainSlowRatio API asynchronously
+// api document: https://help.aliyun.com/api/cdn/describedomainslowratio.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeDomainSlowRatioWithCallback(request *DescribeDomainSlowRatioRequest, callback func(response *DescribeDomainSlowRatioResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DescribeDomainSlowRatioResponse
+		var err error
+		defer close(result)
+		response, err = client.DescribeDomainSlowRatio(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DescribeDomainSlowRatioRequest is the request struct for api DescribeDomainSlowRatio
+type DescribeDomainSlowRatioRequest struct {
+	*requests.RpcRequest
+	StartTime  string           `position:"Query" name:"StartTime"`
+	PageNumber requests.Integer `position:"Query" name:"PageNumber"`
+	PageSize   requests.Integer `position:"Query" name:"PageSize"`
+	DomainName string           `position:"Query" name:"DomainName"`
+	EndTime    string           `position:"Query" name:"EndTime"`
+	OwnerId    requests.Integer `position:"Query" name:"OwnerId"`
+}
+
+// DescribeDomainSlowRatioResponse is the response struct for api DescribeDomainSlowRatio
+type DescribeDomainSlowRatioResponse struct {
+	*responses.BaseResponse
+	EndTime                  string                   `json:"EndTime" xml:"EndTime"`
+	DataInterval             int                      `json:"DataInterval" xml:"DataInterval"`
+	PageNumber               int                      `json:"PageNumber" xml:"PageNumber"`
+	PageSize                 int                      `json:"PageSize" xml:"PageSize"`
+	TotalCount               int                      `json:"TotalCount" xml:"TotalCount"`
+	StartTime                string                   `json:"StartTime" xml:"StartTime"`
+	SlowRatioDataPerInterval SlowRatioDataPerInterval `json:"SlowRatioDataPerInterval" xml:"SlowRatioDataPerInterval"`
+}
+
+// CreateDescribeDomainSlowRatioRequest creates a request to invoke DescribeDomainSlowRatio API
+func CreateDescribeDomainSlowRatioRequest() (request *DescribeDomainSlowRatioRequest) {
+	request = &DescribeDomainSlowRatioRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Cdn", "2014-11-11", "DescribeDomainSlowRatio", "", "")
+	return
+}
+
+// CreateDescribeDomainSlowRatioResponse creates a response to parse from DescribeDomainSlowRatio response
+func CreateDescribeDomainSlowRatioResponse() (response *DescribeDomainSlowRatioResponse) {
+	response = &DescribeDomainSlowRatioResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 5 - 5
services/cdn/describe_domain_top_refer_visit.go

@@ -76,11 +76,11 @@ func (client *Client) DescribeDomainTopReferVisitWithCallback(request *DescribeD
 // DescribeDomainTopReferVisitRequest is the request struct for api DescribeDomainTopReferVisit
 type DescribeDomainTopReferVisitRequest struct {
 	*requests.RpcRequest
-	SecurityToken string           `position:"Query" name:"SecurityToken"`
-	DomainName    string           `position:"Query" name:"DomainName"`
-	SortBy        string           `position:"Query" name:"SortBy"`
-	StartTime     string           `position:"Query" name:"StartTime"`
-	OwnerId       requests.Integer `position:"Query" name:"OwnerId"`
+	StartTime  string           `position:"Query" name:"StartTime"`
+	Percent    string           `position:"Query" name:"Percent"`
+	DomainName string           `position:"Query" name:"DomainName"`
+	OwnerId    requests.Integer `position:"Query" name:"OwnerId"`
+	SortBy     string           `position:"Query" name:"SortBy"`
 }
 
 // DescribeDomainTopReferVisitResponse is the response struct for api DescribeDomainTopReferVisit

+ 5 - 5
services/cdn/describe_domain_top_url_visit.go

@@ -76,11 +76,11 @@ func (client *Client) DescribeDomainTopUrlVisitWithCallback(request *DescribeDom
 // DescribeDomainTopUrlVisitRequest is the request struct for api DescribeDomainTopUrlVisit
 type DescribeDomainTopUrlVisitRequest struct {
 	*requests.RpcRequest
-	SecurityToken string           `position:"Query" name:"SecurityToken"`
-	DomainName    string           `position:"Query" name:"DomainName"`
-	SortBy        string           `position:"Query" name:"SortBy"`
-	StartTime     string           `position:"Query" name:"StartTime"`
-	OwnerId       requests.Integer `position:"Query" name:"OwnerId"`
+	StartTime  string           `position:"Query" name:"StartTime"`
+	Percent    string           `position:"Query" name:"Percent"`
+	DomainName string           `position:"Query" name:"DomainName"`
+	OwnerId    requests.Integer `position:"Query" name:"OwnerId"`
+	SortBy     string           `position:"Query" name:"SortBy"`
 }
 
 // DescribeDomainTopUrlVisitResponse is the response struct for api DescribeDomainTopUrlVisit

+ 108 - 0
services/cdn/describe_user_cdn_status.go

@@ -0,0 +1,108 @@
+package cdn
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// DescribeUserCdnStatus invokes the cdn.DescribeUserCdnStatus API synchronously
+// api document: https://help.aliyun.com/api/cdn/describeusercdnstatus.html
+func (client *Client) DescribeUserCdnStatus(request *DescribeUserCdnStatusRequest) (response *DescribeUserCdnStatusResponse, err error) {
+	response = CreateDescribeUserCdnStatusResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DescribeUserCdnStatusWithChan invokes the cdn.DescribeUserCdnStatus API asynchronously
+// api document: https://help.aliyun.com/api/cdn/describeusercdnstatus.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeUserCdnStatusWithChan(request *DescribeUserCdnStatusRequest) (<-chan *DescribeUserCdnStatusResponse, <-chan error) {
+	responseChan := make(chan *DescribeUserCdnStatusResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DescribeUserCdnStatus(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DescribeUserCdnStatusWithCallback invokes the cdn.DescribeUserCdnStatus API asynchronously
+// api document: https://help.aliyun.com/api/cdn/describeusercdnstatus.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeUserCdnStatusWithCallback(request *DescribeUserCdnStatusRequest, callback func(response *DescribeUserCdnStatusResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DescribeUserCdnStatusResponse
+		var err error
+		defer close(result)
+		response, err = client.DescribeUserCdnStatus(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DescribeUserCdnStatusRequest is the request struct for api DescribeUserCdnStatus
+type DescribeUserCdnStatusRequest struct {
+	*requests.RpcRequest
+	SecurityToken string           `position:"Query" name:"SecurityToken"`
+	OwnerId       requests.Integer `position:"Query" name:"OwnerId"`
+}
+
+// DescribeUserCdnStatusResponse is the response struct for api DescribeUserCdnStatus
+type DescribeUserCdnStatusResponse struct {
+	*responses.BaseResponse
+	RequestId     string `json:"RequestId" xml:"RequestId"`
+	Enabled       bool   `json:"Enabled" xml:"Enabled"`
+	OnService     bool   `json:"OnService" xml:"OnService"`
+	InDebt        bool   `json:"InDebt" xml:"InDebt"`
+	InDebtOverdue bool   `json:"InDebtOverdue" xml:"InDebtOverdue"`
+}
+
+// CreateDescribeUserCdnStatusRequest creates a request to invoke DescribeUserCdnStatus API
+func CreateDescribeUserCdnStatusRequest() (request *DescribeUserCdnStatusRequest) {
+	request = &DescribeUserCdnStatusRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Cdn", "2018-05-10", "DescribeUserCdnStatus", "", "")
+	return
+}
+
+// CreateDescribeUserCdnStatusResponse creates a response to parse from DescribeUserCdnStatus response
+func CreateDescribeUserCdnStatusResponse() (response *DescribeUserCdnStatusResponse) {
+	response = &DescribeUserCdnStatusResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 104 - 0
services/cdn/describe_user_custom_log_config.go

@@ -0,0 +1,104 @@
+package cdn
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// DescribeUserCustomLogConfig invokes the cdn.DescribeUserCustomLogConfig API synchronously
+// api document: https://help.aliyun.com/api/cdn/describeusercustomlogconfig.html
+func (client *Client) DescribeUserCustomLogConfig(request *DescribeUserCustomLogConfigRequest) (response *DescribeUserCustomLogConfigResponse, err error) {
+	response = CreateDescribeUserCustomLogConfigResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DescribeUserCustomLogConfigWithChan invokes the cdn.DescribeUserCustomLogConfig API asynchronously
+// api document: https://help.aliyun.com/api/cdn/describeusercustomlogconfig.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeUserCustomLogConfigWithChan(request *DescribeUserCustomLogConfigRequest) (<-chan *DescribeUserCustomLogConfigResponse, <-chan error) {
+	responseChan := make(chan *DescribeUserCustomLogConfigResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DescribeUserCustomLogConfig(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DescribeUserCustomLogConfigWithCallback invokes the cdn.DescribeUserCustomLogConfig API asynchronously
+// api document: https://help.aliyun.com/api/cdn/describeusercustomlogconfig.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeUserCustomLogConfigWithCallback(request *DescribeUserCustomLogConfigRequest, callback func(response *DescribeUserCustomLogConfigResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DescribeUserCustomLogConfigResponse
+		var err error
+		defer close(result)
+		response, err = client.DescribeUserCustomLogConfig(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DescribeUserCustomLogConfigRequest is the request struct for api DescribeUserCustomLogConfig
+type DescribeUserCustomLogConfigRequest struct {
+	*requests.RpcRequest
+	OwnerId requests.Integer `position:"Query" name:"OwnerId"`
+}
+
+// DescribeUserCustomLogConfigResponse is the response struct for api DescribeUserCustomLogConfig
+type DescribeUserCustomLogConfigResponse struct {
+	*responses.BaseResponse
+	RequestId string    `json:"RequestId" xml:"RequestId"`
+	ConfigIds ConfigIds `json:"ConfigIds" xml:"ConfigIds"`
+}
+
+// CreateDescribeUserCustomLogConfigRequest creates a request to invoke DescribeUserCustomLogConfig API
+func CreateDescribeUserCustomLogConfigRequest() (request *DescribeUserCustomLogConfigRequest) {
+	request = &DescribeUserCustomLogConfigRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Cdn", "2014-11-11", "DescribeUserCustomLogConfig", "", "")
+	return
+}
+
+// CreateDescribeUserCustomLogConfigResponse creates a response to parse from DescribeUserCustomLogConfig response
+func CreateDescribeUserCustomLogConfigResponse() (response *DescribeUserCustomLogConfigResponse) {
+	response = &DescribeUserCustomLogConfigResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 19 - 12
services/cdn/describe_user_domains.go

@@ -76,18 +76,25 @@ func (client *Client) DescribeUserDomainsWithCallback(request *DescribeUserDomai
 // DescribeUserDomainsRequest is the request struct for api DescribeUserDomains
 type DescribeUserDomainsRequest struct {
 	*requests.RpcRequest
-	FuncFilter       string           `position:"Query" name:"FuncFilter"`
-	DomainName       string           `position:"Query" name:"DomainName"`
-	OwnerId          requests.Integer `position:"Query" name:"OwnerId"`
-	FuncId           string           `position:"Query" name:"FuncId"`
-	PageNumber       requests.Integer `position:"Query" name:"PageNumber"`
-	DomainStatus     string           `position:"Query" name:"DomainStatus"`
-	DomainSearchType string           `position:"Query" name:"DomainSearchType"`
-	CheckDomainShow  requests.Boolean `position:"Query" name:"CheckDomainShow"`
-	ResourceGroupId  string           `position:"Query" name:"ResourceGroupId"`
-	SecurityToken    string           `position:"Query" name:"SecurityToken"`
-	CdnType          string           `position:"Query" name:"CdnType"`
-	PageSize         requests.Integer `position:"Query" name:"PageSize"`
+	FuncFilter       string                    `position:"Query" name:"FuncFilter"`
+	DomainName       string                    `position:"Query" name:"DomainName"`
+	OwnerId          requests.Integer          `position:"Query" name:"OwnerId"`
+	FuncId           string                    `position:"Query" name:"FuncId"`
+	PageNumber       requests.Integer          `position:"Query" name:"PageNumber"`
+	DomainStatus     string                    `position:"Query" name:"DomainStatus"`
+	DomainSearchType string                    `position:"Query" name:"DomainSearchType"`
+	CheckDomainShow  requests.Boolean          `position:"Query" name:"CheckDomainShow"`
+	ResourceGroupId  string                    `position:"Query" name:"ResourceGroupId"`
+	SecurityToken    string                    `position:"Query" name:"SecurityToken"`
+	CdnType          string                    `position:"Query" name:"CdnType"`
+	PageSize         requests.Integer          `position:"Query" name:"PageSize"`
+	Tag              *[]DescribeUserDomainsTag `position:"Query" name:"Tag"  type:"Repeated"`
+}
+
+// DescribeUserDomainsTag is a repeated param struct in DescribeUserDomainsRequest
+type DescribeUserDomainsTag struct {
+	Value string `name:"Value"`
+	Key   string `name:"Key"`
 }
 
 // DescribeUserDomainsResponse is the response struct for api DescribeUserDomains

+ 109 - 0
services/cdn/modify_path_cache_expired_config.go

@@ -0,0 +1,109 @@
+package cdn
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// ModifyPathCacheExpiredConfig invokes the cdn.ModifyPathCacheExpiredConfig API synchronously
+// api document: https://help.aliyun.com/api/cdn/modifypathcacheexpiredconfig.html
+func (client *Client) ModifyPathCacheExpiredConfig(request *ModifyPathCacheExpiredConfigRequest) (response *ModifyPathCacheExpiredConfigResponse, err error) {
+	response = CreateModifyPathCacheExpiredConfigResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// ModifyPathCacheExpiredConfigWithChan invokes the cdn.ModifyPathCacheExpiredConfig API asynchronously
+// api document: https://help.aliyun.com/api/cdn/modifypathcacheexpiredconfig.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ModifyPathCacheExpiredConfigWithChan(request *ModifyPathCacheExpiredConfigRequest) (<-chan *ModifyPathCacheExpiredConfigResponse, <-chan error) {
+	responseChan := make(chan *ModifyPathCacheExpiredConfigResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.ModifyPathCacheExpiredConfig(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// ModifyPathCacheExpiredConfigWithCallback invokes the cdn.ModifyPathCacheExpiredConfig API asynchronously
+// api document: https://help.aliyun.com/api/cdn/modifypathcacheexpiredconfig.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ModifyPathCacheExpiredConfigWithCallback(request *ModifyPathCacheExpiredConfigRequest, callback func(response *ModifyPathCacheExpiredConfigResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *ModifyPathCacheExpiredConfigResponse
+		var err error
+		defer close(result)
+		response, err = client.ModifyPathCacheExpiredConfig(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// ModifyPathCacheExpiredConfigRequest is the request struct for api ModifyPathCacheExpiredConfig
+type ModifyPathCacheExpiredConfigRequest struct {
+	*requests.RpcRequest
+	SecurityToken string           `position:"Query" name:"SecurityToken"`
+	ConfigID      string           `position:"Query" name:"ConfigID"`
+	DomainName    string           `position:"Query" name:"DomainName"`
+	Weight        string           `position:"Query" name:"Weight"`
+	CacheContent  string           `position:"Query" name:"CacheContent"`
+	OwnerId       requests.Integer `position:"Query" name:"OwnerId"`
+	TTL           string           `position:"Query" name:"TTL"`
+}
+
+// ModifyPathCacheExpiredConfigResponse is the response struct for api ModifyPathCacheExpiredConfig
+type ModifyPathCacheExpiredConfigResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateModifyPathCacheExpiredConfigRequest creates a request to invoke ModifyPathCacheExpiredConfig API
+func CreateModifyPathCacheExpiredConfigRequest() (request *ModifyPathCacheExpiredConfigRequest) {
+	request = &ModifyPathCacheExpiredConfigRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Cdn", "2014-11-11", "ModifyPathCacheExpiredConfig", "", "")
+	return
+}
+
+// CreateModifyPathCacheExpiredConfigResponse creates a response to parse from ModifyPathCacheExpiredConfig response
+func CreateModifyPathCacheExpiredConfigResponse() (response *ModifyPathCacheExpiredConfigResponse) {
+	response = &ModifyPathCacheExpiredConfigResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 2 - 2
services/cdn/push_object_cache.go

@@ -85,8 +85,8 @@ type PushObjectCacheRequest struct {
 // PushObjectCacheResponse is the response struct for api PushObjectCache
 type PushObjectCacheResponse struct {
 	*responses.BaseResponse
-	RequestId     string `json:"RequestId" xml:"RequestId"`
-	PreloadTaskId string `json:"PreloadTaskId" xml:"PreloadTaskId"`
+	RequestId  string `json:"RequestId" xml:"RequestId"`
+	PushTaskId string `json:"PushTaskId" xml:"PushTaskId"`
 }
 
 // CreatePushObjectCacheRequest creates a request to invoke PushObjectCache API

+ 7 - 7
services/cdn/set_path_cache_expired_config.go

@@ -76,12 +76,12 @@ func (client *Client) SetPathCacheExpiredConfigWithCallback(request *SetPathCach
 // SetPathCacheExpiredConfigRequest is the request struct for api SetPathCacheExpiredConfig
 type SetPathCacheExpiredConfigRequest struct {
 	*requests.RpcRequest
-	DomainName   string           `position:"Query" name:"DomainName"`
-	Weight       string           `position:"Query" name:"Weight"`
-	CacheContent string           `position:"Query" name:"CacheContent"`
-	OwnerId      requests.Integer `position:"Query" name:"OwnerId"`
-	TTL          string           `position:"Query" name:"TTL"`
-	ConfigId     requests.Integer `position:"Query" name:"ConfigId"`
+	SecurityToken string           `position:"Query" name:"SecurityToken"`
+	DomainName    string           `position:"Query" name:"DomainName"`
+	Weight        string           `position:"Query" name:"Weight"`
+	CacheContent  string           `position:"Query" name:"CacheContent"`
+	OwnerId       requests.Integer `position:"Query" name:"OwnerId"`
+	TTL           string           `position:"Query" name:"TTL"`
 }
 
 // SetPathCacheExpiredConfigResponse is the response struct for api SetPathCacheExpiredConfig
@@ -95,7 +95,7 @@ func CreateSetPathCacheExpiredConfigRequest() (request *SetPathCacheExpiredConfi
 	request = &SetPathCacheExpiredConfigRequest{
 		RpcRequest: &requests.RpcRequest{},
 	}
-	request.InitWithApiInfo("Cdn", "2018-05-10", "SetPathCacheExpiredConfig", "", "")
+	request.InitWithApiInfo("Cdn", "2014-11-11", "SetPathCacheExpiredConfig", "", "")
 	return
 }
 

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.