Przeglądaj źródła

Merge branch 'master' of github.com:aliyun/alibaba-cloud-sdk-go

yixiong.jxy 7 lat temu
rodzic
commit
bc0b738ca9
100 zmienionych plików z 5493 dodań i 185 usunięć
  1. 261 0
      ChangeLog.txt
  2. 16 1
      Gopkg.lock
  3. 34 0
      sdk/auth/credentials/providers/chain.go
  4. 122 0
      sdk/auth/credentials/providers/chain_test.go
  5. 62 0
      sdk/auth/credentials/providers/configuration.go
  6. 167 0
      sdk/auth/credentials/providers/configuration_test.go
  7. 65 0
      sdk/auth/credentials/providers/env.go
  8. 215 0
      sdk/auth/credentials/providers/env_test.go
  9. 86 0
      sdk/auth/credentials/providers/instance_metadata.go
  10. 65 0
      sdk/auth/credentials/providers/instance_metadata_test.go
  11. 3 3
      sdk/auth/roa_signature_composer.go
  12. 3 1
      sdk/client.go
  13. 1 1
      sdk/endpoints/location_resolver.go
  14. 1 1
      sdk/errors/client_error.go
  15. 1 0
      sdk/requests/acs_reqeust.go
  16. 3 1
      sdk/requests/roa_request.go
  17. 1 1
      sdk/requests/rpc_request.go
  18. 7 7
      sdk/requests/types.go
  19. 8 8
      sdk/requests/types_test.go
  20. 5 0
      sdk/responses/response.go
  21. 21 19
      services/arms/arms_query_data_set.go
  22. 120 0
      services/arms/metric_query.go
  23. 0 122
      services/arms/where_in_dim_query.go
  24. 81 0
      services/bssopenapi/client.go
  25. 120 0
      services/bssopenapi/create_instance.go
  26. 114 0
      services/bssopenapi/create_resource_package.go
  27. 110 0
      services/bssopenapi/describe_pricing_module.go
  28. 108 0
      services/bssopenapi/describe_resource_package_product.go
  29. 108 0
      services/bssopenapi/get_order_detail.go
  30. 119 0
      services/bssopenapi/get_pay_as_you_go_price.go
  31. 113 0
      services/bssopenapi/get_resource_package_price.go
  32. 125 0
      services/bssopenapi/get_subscription_price.go
  33. 119 0
      services/bssopenapi/modify_instance.go
  34. 106 0
      services/bssopenapi/query_account_balance.go
  35. 119 0
      services/bssopenapi/query_available_instances.go
  36. 109 0
      services/bssopenapi/query_cash_coupons.go
  37. 112 0
      services/bssopenapi/query_instance_gaap_cost.go
  38. 107 0
      services/bssopenapi/query_monthly_bill.go
  39. 113 0
      services/bssopenapi/query_monthly_instance_consumption.go
  40. 116 0
      services/bssopenapi/query_orders.go
  41. 109 0
      services/bssopenapi/query_prepaid_cards.go
  42. 111 0
      services/bssopenapi/query_price_list.go
  43. 109 0
      services/bssopenapi/query_product_list.go
  44. 115 0
      services/bssopenapi/query_resource_package_instances.go
  45. 116 0
      services/bssopenapi/query_settlement_bill.go
  46. 112 0
      services/bssopenapi/renew_instance.go
  47. 113 0
      services/bssopenapi/set_renewal.go
  48. 23 0
      services/bssopenapi/struct_attribute.go
  49. 21 0
      services/bssopenapi/struct_attribute_list.go
  50. 23 0
      services/bssopenapi/struct_available_duration.go
  51. 21 0
      services/bssopenapi/struct_available_durations.go
  52. 30 0
      services/bssopenapi/struct_cash_coupon.go
  53. 21 0
      services/bssopenapi/struct_config_list.go
  54. 51 0
      services/bssopenapi/struct_data.go
  55. 22 0
      services/bssopenapi/struct_data_in_create_resource_package.go
  56. 21 0
      services/bssopenapi/struct_data_in_query_cash_coupons.go
  57. 21 0
      services/bssopenapi/struct_data_in_query_prepaid_cards.go
  58. 25 0
      services/bssopenapi/struct_data_in_query_resource_package_instances.go
  59. 46 0
      services/bssopenapi/struct_instance.go
  60. 21 0
      services/bssopenapi/struct_instance_list.go
  61. 21 0
      services/bssopenapi/struct_instances.go
  62. 69 0
      services/bssopenapi/struct_item.go
  63. 21 0
      services/bssopenapi/struct_items_in_query_monthly_bill.go
  64. 21 0
      services/bssopenapi/struct_items_in_query_monthly_instance_consumption.go
  65. 21 0
      services/bssopenapi/struct_items_in_query_settlement_bill.go
  66. 80 0
      services/bssopenapi/struct_module.go
  67. 25 0
      services/bssopenapi/struct_module_detail.go
  68. 21 0
      services/bssopenapi/struct_module_details_in_get_pay_as_you_go_price.go
  69. 21 0
      services/bssopenapi/struct_module_details_in_get_subscription_price.go
  70. 21 0
      services/bssopenapi/struct_module_list.go
  71. 21 0
      services/bssopenapi/struct_modules_in_query_instance_gaap_cost.go
  72. 21 0
      services/bssopenapi/struct_modules_in_query_price_list.go
  73. 42 0
      services/bssopenapi/struct_order.go
  74. 21 0
      services/bssopenapi/struct_order_list_in_get_order_detail.go
  75. 21 0
      services/bssopenapi/struct_order_list_in_query_orders.go
  76. 24 0
      services/bssopenapi/struct_package_type.go
  77. 21 0
      services/bssopenapi/struct_package_types.go
  78. 30 0
      services/bssopenapi/struct_prepaid_card.go
  79. 24 0
      services/bssopenapi/struct_product.go
  80. 21 0
      services/bssopenapi/struct_product_list.go
  81. 22 0
      services/bssopenapi/struct_promotion.go
  82. 23 0
      services/bssopenapi/struct_promotion_detail.go
  83. 21 0
      services/bssopenapi/struct_promotion_details_in_get_pay_as_you_go_price.go
  84. 21 0
      services/bssopenapi/struct_promotion_details_in_get_subscription_price.go
  85. 21 0
      services/bssopenapi/struct_promotions.go
  86. 21 0
      services/bssopenapi/struct_properties.go
  87. 22 0
      services/bssopenapi/struct_property.go
  88. 24 0
      services/bssopenapi/struct_resource_package.go
  89. 21 0
      services/bssopenapi/struct_resource_packages.go
  90. 23 0
      services/bssopenapi/struct_specification.go
  91. 21 0
      services/bssopenapi/struct_specifications.go
  92. 27 0
      services/bssopenapi/struct_tier_price.go
  93. 21 0
      services/bssopenapi/struct_tier_prices.go
  94. 108 0
      services/bssopenapi/subscribe_detail.go
  95. 108 0
      services/bssopenapi/subscribe_export_to_oss.go
  96. 105 0
      services/bssopenapi/unsubscribe_export_to_oss.go
  97. 3 3
      services/cbn/associate_cen_bandwidth_package.go
  98. 5 5
      services/cbn/attach_cen_child_instance.go
  99. 3 3
      services/cbn/create_cen.go
  100. 9 9
      services/cbn/create_cen_bandwidth_package.go

+ 261 - 0
ChangeLog.txt

@@ -1,3 +1,264 @@
+2018-10-16 Version: 1.32.3
+1, This version add MetricQuery interface to support retcode and apm metric query.
+
+2018-10-16 Version: 1.32.2
+1, This version add MetricQuery interface to support retcode and apm metric query.
+
+2018-10-16 Version: 1.32.1
+1, This version add MetricQuery interface to support retcode and apm metric query.
+
+2018-10-16 Version: 1.32.0
+1, Delete deprecated and unusable apis : AddIpRange, UnbindIpRange, BindIpRange, DescribeIntranetAttributeKb, DescribeIpRanges, ModifyIntranetBandwidthKb, DescribeEventDetail, CheckAutoSnapshotPolicy, CheckDiskEnableAutoSnapshotValidation, DescribeAutoSnapshotPolicy
+2, Add instance topology api DescribeInstanceTopology
+3, Add mount point in DescribeDisksFullStatus
+
+
+2018-10-12 Version: 1.31.8
+1, ModifyCenAttribute supports ProtectionLevel.
+2, New APIs: PublishRouteEntries/WithdrawPublishedRouteEntries/DescribePublishedRouteEntries
+
+2018-10-11 Version: 1.31.7
+1, Add a new api called DeleteMezzanines to clear mezzanine infos and storages.
+2, Add the field called PlayConfig to GetVideoPlayAuth and GetPlayInfo api request.
+3, Add a new api called UpdateImageInfos to update image information.
+
+2018-10-10 Version: 1.31.6
+1, add UpdateProject api, support update CU, ServiceRole
+2, PutProject not support edit
+3, CreateOfficeConversionTask api now supports FitToPagesTall, FitToPagesWide
+4, Remove paramater Engines, Indexers from project apis
+
+2018-10-09 Version: 1.31.5
+1, v1.0.0-->v1.0.1
+2, provider new region:beijing/shenzhen/zhangjiakou
+3, provider service for VPC user;
+
+2018-09-30 Version: 1.31.4
+1, This is an example of release-log.
+2, Please strictly follow this format to edit in English.
+3, Format:Number + , + Space + Description
+
+2018-09-29 Version: 1.31.3
+1, Sync cdn api.
+
+2018-09-29 Version: 1.31.2
+1, This is an example of release-log.
+2, Please strictly follow this format to edit in English.
+3, Format:Number + , + Space + Description
+
+2018-09-29 Version: 1.31.1
+1, This is an example of release-log.
+2, Please strictly follow this format to edit in English.
+3, Format:Number + , + Space + Description
+
+2018-09-27 Version: 1.31.0
+1, Add new API ListQueues, modify API SetAutoScaleConfig to support queue related features.
+
+2018-09-27 Version: 1.30.8
+1, modify getFaces Api
+
+2018-09-27 Version: 1.30.7
+1, modify getFaces Api
+
+2018-09-25 Version: 1.30.6
+1, Add GetHotlineRecord and QueryHotlineRecord interface, version 1.0.0
+
+2018-09-25 Version: 1.30.5
+1, Fix bug in GetVerifyToken and SubmitMaterials API.
+
+2018-09-22 Version: 1.30.4
+1, update
+
+2018-09-20 Version: 1.30.3
+1, Fix publish failure for Java, Python and C# SDK.
+
+2018-09-20 Version: 1.30.2
+1, BssOpenApi first deploy.
+
+2018-09-20 Version: 1.30.1
+1, BssOpenApi first deploy.
+
+2018-09-19 Version: 1.30.0
+1, Add ens api, include SaveSingleTaskForDisassociatingEns, SaveSingleTaskForAssociatingEns, QueryLocalEnsAssociation and QueryEnsAssociation.
+
+2018-09-17 Version: 1.29.10
+1, Add field for AddCasterVideoResource, DescribeCasterVideoResources, ModifyCasterVideoResource.
+
+
+2018-09-17 Version: 1.29.9
+1, describeRegions modify.
+
+2018-09-17 Version: 1.29.8
+1, ModifySecurityIps support WhitelistNetworkType 
+
+2018-09-16 Version: 1.29.7
+1, add CheckInstanceExist OpenApi.
+
+2018-09-14 Version: 1.29.6
+1, Add DedicatedHost Feature
+
+2018-09-13 Version: 1.29.5
+1, modify CheckDBInstance OpenApi
+
+2018-09-13 Version: 1.29.4
+1, Add CreateChannelToken.
+
+
+2018-09-11 Version: 1.29.3
+1, add CheckDBInstance OpenApi.
+
+2018-09-06 Version: 1.29.2
+1, fixed DescirbeRegions zoneId date type.
+
+2018-09-06 Version: 1.29.1
+1, AutoScaling support launchTemplate.
+
+2018-09-05 Version: 1.29.0
+1, Add new APIs with control policy for querying price
+
+2018-09-03 Version: 1.28.3
+1, voice identify interface
+2, client upload credentials interface
+
+2018-09-03 Version: 1.28.2
+1, Add new service API:FindServiceStatisticalData, which can support query service statistical data.
+
+2018-08-31 Version: 1.28.1
+1, The CreateInstance supported VPC IpAddress.
+
+2018-08-28 Version: 1.28.0
+1, Add new APIs for profiling application performance: GetCloudMetricProfiling, etc.
+2, Add new APIs to support Shifter container applications: AddContainerApp, etc.
+
+2018-08-28 Version: 1.27.6
+1, Add param for DescribeRegions,support AcceptLanguage,RegionEndpoint.
+
+2018-08-27 Version: 1.27.5
+1, add Ess alarm task api, CreateAlarm, DeleteAlarm, DescribeAlarms, DeleteAlarm, EnableAlarm, DisableAlarm
+
+
+2018-08-27 Version: 1.27.4
+1, createInstance supported IpAddress param.
+
+2018-08-24 Version: 1.27.3
+1, Add api: DetectQRCode
+
+2018-08-23 Version: 1.27.2
+1, RunInstance add privateIpAddress.
+
+2018-08-23 Version: 1.27.1
+1, This is an example of release-log.
+2, Please strictly follow this format to edit in English.
+3, Format:Number + , + Space + Description
+
+2018-08-23 Version: 1.27.0
+1, Add CreateVpnGateway API.
+2, Add product Ipv6Translator.
+
+
+2018-08-22 Version: 1.26.2
+1, upgrade mongodb sdk.
+
+2018-08-22 Version: 1.26.0
+1, Add api CreateSimulatedSystemEvents, support creating one or more simulated system events.
+2, Add api CancelSimulatedSystemEvents, support cancelling one or more simulated system events.
+
+2018-08-21 Version: 1.25.8
+1, DeleteFaceSearchImageByIdRequest add field: srcUri(String).
+2, CreateFaceSetResponse  add field: faces(Long).
+3, GetFaceSetResponse add field: faces(Long).
+4, Fix class Blurness in IndexFaceResponse.
+
+2018-08-21 Version: 1.25.7
+1, Repair describeLaunchTemplateVersions securityEnhancementStrategy type
+
+2018-08-17 Version: 1.25.6
+1, Add a new api called DeleteImage to clear the image resource.
+2, Add the field called AdditionType and OutputType to GetMezzanineInfo api request.
+3, Add the field called OutputType to GetMezzanineInfo api response.
+4, Add the field called CreationTime and ModificationTime to GetPlayInfo api response.
+
+2018-08-17 Version: 1.25.5
+1, New apkpubkey fields for queryauthentication output parameter.
+2, New packagename fields for queryauthentication output parameter.
+3, New clientId fields for queryauthentication output parameter.
+
+2018-08-16 Version: 1.25.4
+1, ModifyScalingConfiguration add imageName.
+2, CreateScalingConfiguration add imageName.
+
+2018-08-15 Version: 1.25.3
+1, Fix bug in GetMaterials API.
+2, GetVerifyToken added a new param VerifyConfigs
+
+2018-08-15 Version: 1.25.2
+1, Add domain operation api AddLiveDomain,DeleteLiveDomain,DescribeLiveDomainDetail,StartLiveDomain,StopLiveDomain.
+2, Add certificate operation api DescribeLiveCertificateDetail,DescribeLiveCertificateList,SetLiveDomainCertificate.
+3, Add domain config api BatchSetLiveDomainConfigs,BatchDeleteLiveDomainConfigs,DeleteLiveSpecificConfig,DescribeLiveDomainConfigs.
+
+2018-08-15 Version: 1.25.1
+1, Update ecs tag to 20 maximum
+
+
+2018-08-13 Version: 1.25.0
+1, New userinfo fields for registerface input parameter.
+2, New userinfo fields for updateface input parameter.
+3, New userinfo fields for queryface output parameter.
+
+2018-08-13 Version: 1.24.7
+1, Add cross domain support.
+2, Add parameter SerialNumber to interface RebootSmartAccessGateway.
+
+2018-08-08 Version: 1.24.6
+1, The official release 4.0.0
+
+2018-08-08 Version: 1.24.5
+1, Update FC apis.
+
+2018-08-08 Version: 1.24.4
+1, First release.
+
+2018-08-05 Version: 1.24.3
+1, Add Interface SubmitSubtitleJob
+2, Support convert ttml、stl subtitle to vtt
+
+2018-08-04 Version: 1.24.2
+1, Add a new api called SetAuditSecurityIp to set audit security ip.
+2, Add a new api called ListAuditSecurityIp to query audit security ip list.
+3, Add a new api called UploadMediaByURL to bulk upload media based on urls.
+4, Add the field called StorageLocation and TemplateGroupId to GetVideoInfo api response.
+5, Add the field called StorageLocation and TemplateGroupId to GetVideoInfos api response.
+6, Add the field called OutputType and Status to GetPlayInfo api response.
+
+2018-08-04 Version: 1.24.1
+1, CreateOfficeConversionTask add TgtFilePages field to specify the final uploaded page
+
+2018-08-03 Version: 1.24.0
+1, Add new API AddLocalNodes, for adding local machine to a hybrid cluster
+
+2018-08-02 Version: 1.23.7
+1, Add parameter(GroupId) for CreateNotifyPolicy,GetNotifyPolicy,DeleteNotifyPolicy,ListNotifyPolicy.
+
+2018-08-01 Version: 1.23.6
+1, Add parameter(DryRun) for CreateAlarm and UpdateAlarm.
+
+2018-08-01 Version: 1.23.5
+1, Add api: MoPenQueryCanvas, MoPenDoRecognize, MoPenSendMqttMessage, MoPenFindGroup
+
+2018-08-01 Version: 1.23.4
+1, Support describePrice for market image, add return detailInfo in interface describePrice
+
+2018-07-26 Version: 1.23.3
+1, Add RemoveTerminals API.
+
+2018-07-26 Version: 1.23.2
+1, Add new API: SendDryRunSystemEvent,PutMetricAlarm,DescribeAlarmsForDimensions,DescribeAlarms.
+
+2018-07-26 Version: 1.23.1
+1, Add BatchGetJobMetricInfo API.
+2, Add BatchGetPluginConfigInfo API.
+3, Add GetJobTopology API.
+
 2018-07-13 Version: 1.23.0
 1, New APIs for batch executing commands in cluster: InvokeShellCommand, ListCommands, etc.
 2, New APIs for HybridCluster (link E-HPC with cluster in local IDC): CreateHybridCluster, etc.

+ 16 - 1
Gopkg.lock

@@ -55,9 +55,24 @@
   revision = "12b6f73e6084dad08a7c6e575284b177ecafbc71"
   version = "v1.2.1"
 
+[[projects]]
+  branch = "master"
+  name = "golang.org/x/crypto"
+  packages = ["ssh/terminal"]
+  revision = "614d502a4dac94afa3a6ce146bd1736da82514c6"
+
+[[projects]]
+  branch = "master"
+  name = "golang.org/x/sys"
+  packages = [
+    "unix",
+    "windows"
+  ]
+  revision = "d99a578cf41bfccdeaf48b0845c823a4b8b0ad5e"
+
 [solve-meta]
   analyzer-name = "dep"
   analyzer-version = 1
-  inputs-digest = "96660ce7f50e00da6200e363b7b0d129c5f57e3f2307bab1dbfe386f6737534f"
+  inputs-digest = "bc688a70dca76f7e57da66641e374b6fcd0c715afb0b38f71cbfaebdbd02075f"
   solver-name = "gps-cdcl"
   solver-version = 1

+ 34 - 0
sdk/auth/credentials/providers/chain.go

@@ -0,0 +1,34 @@
+package providers
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth"
+)
+
+type Provider interface {
+	Retrieve() (auth.Credential, error)
+}
+
+// NewChainProvider will attempt to use its given providers in the order
+// in which they're provided. It will return credentials for the first
+// provider that doesn't return an error.
+func NewChainProvider(providers []Provider) Provider {
+	return &ChainProvider{
+		Providers: providers,
+	}
+}
+
+type ChainProvider struct {
+	Providers []Provider
+}
+
+func (p *ChainProvider) Retrieve() (auth.Credential, error) {
+	var lastErr error
+	for _, provider := range p.Providers {
+		creds, err := provider.Retrieve()
+		if err == nil {
+			return creds, nil
+		}
+		lastErr = err
+	}
+	return nil, lastErr
+}

+ 122 - 0
sdk/auth/credentials/providers/chain_test.go

@@ -0,0 +1,122 @@
+package providers
+
+import (
+	"errors"
+	"testing"
+
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth/credentials"
+)
+
+func TestNewChainProvider_Retrieve_UseFirstCredential(t *testing.T) {
+
+	accessKeyCredProvider := &TestProvider{
+		Credential: &credentials.AccessKeyCredential{},
+		Err:        nil,
+	}
+
+	stsTokenCredProvider := &TestProvider{
+		Credential: &credentials.StsTokenCredential{},
+		Err:        nil,
+	}
+
+	roleCredential := &TestProvider{
+		Credential: &credentials.EcsRamRoleCredential{},
+		Err:        nil,
+	}
+
+	credential, err := NewChainProvider([]Provider{accessKeyCredProvider, stsTokenCredProvider, roleCredential}).Retrieve()
+	if err != nil {
+		t.Fatal(err)
+	}
+
+	if _, ok := credential.(*credentials.AccessKeyCredential); !ok {
+		t.Fatal("expected access key credential")
+	}
+}
+
+func TestNewChainProvider_Retrieve_UseSecondCredential(t *testing.T) {
+
+	accessKeyCredProvider := &TestProvider{
+		Credential: nil,
+		Err:        errors.New("I don't work"),
+	}
+
+	stsTokenCredProvider := &TestProvider{
+		Credential: &credentials.StsTokenCredential{},
+		Err:        nil,
+	}
+
+	roleCredential := &TestProvider{
+		Credential: &credentials.EcsRamRoleCredential{},
+		Err:        nil,
+	}
+
+	credential, err := NewChainProvider([]Provider{accessKeyCredProvider, stsTokenCredProvider, roleCredential}).Retrieve()
+	if err != nil {
+		t.Fatal(err)
+	}
+
+	if _, ok := credential.(*credentials.StsTokenCredential); !ok {
+		t.Fatal("expected sts token credential")
+	}
+}
+
+func TestNewChainProvider_Retrieve_UseThirdCredential(t *testing.T) {
+
+	accessKeyCredProvider := &TestProvider{
+		Credential: nil,
+		Err:        errors.New("I don't work"),
+	}
+
+	stsTokenCredProvider := &TestProvider{
+		Credential: nil,
+		Err:        errors.New("I don't work"),
+	}
+
+	roleCredential := &TestProvider{
+		Credential: &credentials.EcsRamRoleCredential{},
+		Err:        nil,
+	}
+
+	credential, err := NewChainProvider([]Provider{accessKeyCredProvider, stsTokenCredProvider, roleCredential}).Retrieve()
+	if err != nil {
+		t.Fatal(err)
+	}
+
+	if _, ok := credential.(*credentials.EcsRamRoleCredential); !ok {
+		t.Fatal("expected ecs ram role credential")
+	}
+}
+
+func TestNewChainProvider_Retrieve_NoneWork(t *testing.T) {
+
+	accessKeyCredProvider := &TestProvider{
+		Credential: nil,
+		Err:        errors.New("I don't work"),
+	}
+
+	stsTokenCredProvider := &TestProvider{
+		Credential: nil,
+		Err:        errors.New("I don't work"),
+	}
+
+	roleCredential := &TestProvider{
+		Credential: nil,
+		Err:        errors.New("I don't work"),
+	}
+
+	_, err := NewChainProvider([]Provider{accessKeyCredProvider, stsTokenCredProvider, roleCredential}).Retrieve()
+	if err == nil {
+		t.Fatal("expected error")
+	}
+}
+
+type TestProvider struct {
+	Credential auth.Credential
+	Err        error
+}
+
+func (p *TestProvider) Retrieve() (auth.Credential, error) {
+	return p.Credential, p.Err
+}

+ 62 - 0
sdk/auth/credentials/providers/configuration.go

@@ -0,0 +1,62 @@
+package providers
+
+import (
+	"errors"
+
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth/credentials"
+)
+
+var (
+	ErrNoValidCredentialsFound = errors.New("no valid credentials were found")
+)
+
+type Configuration struct {
+	AccessKeyID           string
+	AccessKeySecret       string
+	AccessKeyStsToken     string
+	RoleArn               string
+	RoleSessionName       string
+	RoleSessionExpiration *int
+	PrivateKey            string
+	PublicKeyID           string
+	SessionExpiration     *int
+	RoleName              string
+}
+
+func NewConfigurationCredentialProvider(configuration *Configuration) Provider {
+	return &ConfigurationProvider{
+		Configuration: configuration,
+	}
+}
+
+type ConfigurationProvider struct {
+	Configuration *Configuration
+}
+
+// Retrieve walks through all currently supported credential types and attempts to build them
+// using the given configuration.
+func (p *ConfigurationProvider) Retrieve() (auth.Credential, error) {
+
+	if p.Configuration.AccessKeyID != "" && p.Configuration.AccessKeySecret != "" {
+
+		if p.Configuration.RoleArn != "" && p.Configuration.RoleSessionName != "" && p.Configuration.RoleSessionExpiration != nil {
+			return credentials.NewRamRoleArnCredential(p.Configuration.AccessKeyID, p.Configuration.AccessKeySecret, p.Configuration.RoleArn, p.Configuration.RoleSessionName, *p.Configuration.RoleSessionExpiration), nil
+		}
+
+		if p.Configuration.AccessKeyStsToken != "" {
+			return credentials.NewStsTokenCredential(p.Configuration.AccessKeyID, p.Configuration.AccessKeySecret, p.Configuration.AccessKeyStsToken), nil
+		}
+
+		return credentials.NewAccessKeyCredential(p.Configuration.AccessKeyID, p.Configuration.AccessKeySecret), nil
+	}
+
+	if p.Configuration.RoleName != "" {
+		return credentials.NewEcsRamRoleCredential(p.Configuration.RoleName), nil
+	}
+
+	if p.Configuration.PrivateKey != "" && p.Configuration.PublicKeyID != "" && p.Configuration.SessionExpiration != nil {
+		return credentials.NewRsaKeyPairCredential(p.Configuration.PrivateKey, p.Configuration.PublicKeyID, *p.Configuration.SessionExpiration), nil
+	}
+	return nil, ErrNoValidCredentialsFound
+}

+ 167 - 0
sdk/auth/credentials/providers/configuration_test.go

@@ -0,0 +1,167 @@
+package providers
+
+import (
+	"testing"
+
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth/credentials"
+)
+
+func TestConfigurationProvider_Retrieve_NewRamRoleArnCredential(t *testing.T) {
+
+	expectedAccesKeyId := "access-key-id"
+	expectedAccessKeySecret := "access-key-secret"
+	expectedRoleArn := "role-arn"
+	expectedRoleSessionName := "role-session-name"
+	expectedRoleSessionExpiration := 1
+
+	configuration := &Configuration{
+		AccessKeyID:           expectedAccesKeyId,
+		AccessKeySecret:       expectedAccessKeySecret,
+		RoleArn:               expectedRoleArn,
+		RoleSessionName:       expectedRoleSessionName,
+		RoleSessionExpiration: &expectedRoleSessionExpiration,
+	}
+	credential, err := NewConfigurationCredentialProvider(configuration).Retrieve()
+	if err != nil {
+		t.Fatal(err)
+	}
+	ramRoleArnCredential, ok := credential.(*credentials.RamRoleArnCredential)
+	if !ok {
+		t.Fatal("expected AccessKeyCredential")
+	}
+
+	if ramRoleArnCredential.AccessKeyId != expectedAccesKeyId {
+		t.Fatalf("expected AccessKeyId %s but received %s", expectedAccesKeyId, ramRoleArnCredential.AccessKeyId)
+	}
+	if ramRoleArnCredential.AccessKeySecret != expectedAccessKeySecret {
+		t.Fatalf("expected AccessKeySecret %s but received %s", expectedAccessKeySecret, ramRoleArnCredential.AccessKeySecret)
+	}
+	if ramRoleArnCredential.RoleArn != expectedRoleArn {
+		t.Fatalf("expected RoleArn %s but received %s", expectedRoleArn, ramRoleArnCredential.RoleArn)
+	}
+	if ramRoleArnCredential.RoleSessionName != expectedRoleSessionName {
+		t.Fatalf("expected RoleSessionName %s but received %s", expectedRoleSessionName, ramRoleArnCredential.RoleSessionName)
+	}
+	if ramRoleArnCredential.RoleSessionExpiration != expectedRoleSessionExpiration {
+		t.Fatalf("expected expectedRoleSessionExpiration %d but received %d", expectedRoleSessionExpiration, ramRoleArnCredential.RoleSessionExpiration)
+	}
+}
+
+func TestConfigurationProvider_Retrieve_NewStsTokenCredential(t *testing.T) {
+
+	expectedAccesKeyId := "access-key-id"
+	expectedAccessKeySecret := "access-key-secret"
+	expectedAccessKeyStsToken := "access-key-sts-token"
+
+	configuration := &Configuration{
+		AccessKeyID:       expectedAccesKeyId,
+		AccessKeySecret:   expectedAccessKeySecret,
+		AccessKeyStsToken: expectedAccessKeyStsToken,
+	}
+	credential, err := NewConfigurationCredentialProvider(configuration).Retrieve()
+	if err != nil {
+		t.Fatal(err)
+	}
+	stsTokenCredential, ok := credential.(*credentials.StsTokenCredential)
+	if !ok {
+		t.Fatal("expected AccessKeyCredential")
+	}
+
+	if stsTokenCredential.AccessKeyId != expectedAccesKeyId {
+		t.Fatalf("expected AccessKeyId %s but received %s", expectedAccesKeyId, stsTokenCredential.AccessKeyId)
+	}
+	if stsTokenCredential.AccessKeySecret != expectedAccessKeySecret {
+		t.Fatalf("expected AccessKeySecret %s but received %s", expectedAccessKeySecret, stsTokenCredential.AccessKeySecret)
+	}
+	if stsTokenCredential.AccessKeyStsToken != expectedAccessKeyStsToken {
+		t.Fatalf("expected AccessKeyStsToken %s but received %s", expectedAccessKeyStsToken, stsTokenCredential.AccessKeyStsToken)
+	}
+}
+
+func TestConfigurationProvider_Retrieve_NewAccessKeyCredential(t *testing.T) {
+
+	expectedAccesKeyId := "access-key-id"
+	expectedAccessKeySecret := "access-key-secret"
+
+	configuration := &Configuration{
+		AccessKeyID:     expectedAccesKeyId,
+		AccessKeySecret: expectedAccessKeySecret,
+	}
+	credential, err := NewConfigurationCredentialProvider(configuration).Retrieve()
+	if err != nil {
+		t.Fatal(err)
+	}
+	accessKeyCredential, ok := credential.(*credentials.AccessKeyCredential)
+	if !ok {
+		t.Fatal("expected AccessKeyCredential")
+	}
+
+	if accessKeyCredential.AccessKeyId != expectedAccesKeyId {
+		t.Fatalf("expected AccessKeyId %s but received %s", expectedAccesKeyId, accessKeyCredential.AccessKeyId)
+	}
+	if accessKeyCredential.AccessKeySecret != expectedAccessKeySecret {
+		t.Fatalf("expected AccessKeySecret %s but received %s", expectedAccessKeySecret, accessKeyCredential.AccessKeySecret)
+	}
+}
+
+func TestConfigurationProvider_Retrieve_NewEcsRamRoleCredential(t *testing.T) {
+
+	expectedRoleName := "role-name"
+
+	configuration := &Configuration{
+		RoleName: expectedRoleName,
+	}
+	credential, err := NewConfigurationCredentialProvider(configuration).Retrieve()
+	if err != nil {
+		t.Fatal(err)
+	}
+	ecsRamRoleCredential, ok := credential.(*credentials.EcsRamRoleCredential)
+	if !ok {
+		t.Fatal("expected AccessKeyCredential")
+	}
+
+	if ecsRamRoleCredential.RoleName != expectedRoleName {
+		t.Fatalf("expected RoleName %s but received %s", expectedRoleName, ecsRamRoleCredential.RoleName)
+	}
+}
+
+func TestConfigurationProvider_Retrieve_NewRsaKeyPairCredential(t *testing.T) {
+
+	expectedPrivateKey := "private-key"
+	expectedPublicKeyId := "public-key-id"
+	expectedSessionExpiration := 1
+
+	configuration := &Configuration{
+		PrivateKey:        expectedPrivateKey,
+		PublicKeyID:       expectedPublicKeyId,
+		SessionExpiration: &expectedSessionExpiration,
+	}
+	credential, err := NewConfigurationCredentialProvider(configuration).Retrieve()
+	if err != nil {
+		t.Fatal(err)
+	}
+	rsaKeyPairCredential, ok := credential.(*credentials.RsaKeyPairCredential)
+	if !ok {
+		t.Fatal("expected AccessKeyCredential")
+	}
+
+	if rsaKeyPairCredential.PrivateKey != expectedPrivateKey {
+		t.Fatalf("expected PrivateKey %s but received %s", expectedPrivateKey, rsaKeyPairCredential.PrivateKey)
+	}
+	if rsaKeyPairCredential.PublicKeyId != expectedPublicKeyId {
+		t.Fatalf("expected PublicKeyId %s but received %s", expectedPublicKeyId, rsaKeyPairCredential.PublicKeyId)
+	}
+	if rsaKeyPairCredential.SessionExpiration != expectedSessionExpiration {
+		t.Fatalf("expected SessionExpiration %d but received %d", expectedSessionExpiration, rsaKeyPairCredential.SessionExpiration)
+	}
+}
+
+func TestConfigurationProvider_Retrieve_ErrNoValidCredentialsFound(t *testing.T) {
+	_, err := NewConfigurationCredentialProvider(&Configuration{}).Retrieve()
+	if err == nil {
+		t.Fatal("expected ErrNoValidCredentialsFound for empty configuration")
+	}
+	if err != ErrNoValidCredentialsFound {
+		t.Fatal("expected ErrNoValidCredentialsFound for empty configuration")
+	}
+}

+ 65 - 0
sdk/auth/credentials/providers/env.go

@@ -0,0 +1,65 @@
+package providers
+
+import (
+	"fmt"
+	"os"
+	"strconv"
+
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth"
+)
+
+const (
+	EnvVarAccessKeyID           = "ALICLOUD_ACCESS_KEY"
+	EnvVarAccessKeySecret       = "ALICLOUD_SECRET_KEY"
+	EnvVarAccessKeyStsToken     = "ALICLOUD_ACCESS_KEY_STS_TOKEN"
+	EnvVarRoleArn               = "ALICLOUD_ROLE_ARN"
+	EnvVarRoleSessionName       = "ALICLOUD_ROLE_SESSION_NAME"
+	EnvVarRoleSessionExpiration = "ALICLOUD_ROLE_SESSION_EXPIRATION"
+	EnvVarPrivateKey            = "ALICLOUD_PRIVATE_KEY"
+	EnvVarPublicKeyID           = "ALICLOUD_PUBLIC_KEY_ID"
+	EnvVarSessionExpiration     = "ALICLOUD_SESSION_EXPIRATION"
+	EnvVarRoleName              = "ALICLOUD_ROLE_NAME"
+)
+
+func NewEnvCredentialProvider() Provider {
+	return &EnvProvider{}
+}
+
+type EnvProvider struct{}
+
+func (p *EnvProvider) Retrieve() (auth.Credential, error) {
+	roleSessionExpiration, err := envVarToInt(EnvVarRoleSessionExpiration)
+	if err != nil {
+		return nil, err
+	}
+	sessionExpiration, err := envVarToInt(EnvVarSessionExpiration)
+	if err != nil {
+		return nil, err
+	}
+	c := &Configuration{
+		AccessKeyID:           os.Getenv(EnvVarAccessKeyID),
+		AccessKeySecret:       os.Getenv(EnvVarAccessKeySecret),
+		AccessKeyStsToken:     os.Getenv(EnvVarAccessKeyStsToken),
+		RoleArn:               os.Getenv(EnvVarRoleArn),
+		RoleSessionName:       os.Getenv(EnvVarRoleSessionName),
+		RoleSessionExpiration: &roleSessionExpiration,
+		PrivateKey:            os.Getenv(EnvVarPrivateKey),
+		PublicKeyID:           os.Getenv(EnvVarPublicKeyID),
+		SessionExpiration:     &sessionExpiration,
+		RoleName:              os.Getenv(EnvVarRoleName),
+	}
+	return NewConfigurationCredentialProvider(c).Retrieve()
+}
+
+func envVarToInt(envVar string) (int, error) {
+	asInt := 0
+	asStr := os.Getenv(envVar)
+	if asStr != "" {
+		if i, err := strconv.Atoi(asStr); err != nil {
+			return 0, fmt.Errorf("error parsing %s: %s", envVar, err)
+		} else {
+			asInt = i
+		}
+	}
+	return asInt, nil
+}

+ 215 - 0
sdk/auth/credentials/providers/env_test.go

@@ -0,0 +1,215 @@
+package providers
+
+import (
+	"os"
+	"strconv"
+	"testing"
+
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth/credentials"
+)
+
+func TestEnvProvider_Retrieve_NewRamRoleArnCredential(t *testing.T) {
+
+	expectedAccesKeyId := "access-key-id"
+	expectedAccessKeySecret := "access-key-secret"
+	expectedRoleArn := "role-arn"
+	expectedRoleSessionName := "role-session-name"
+	expectedRoleSessionExpiration := 1
+
+	if err := os.Setenv(EnvVarAccessKeyID, expectedAccesKeyId); err != nil {
+		t.Fatal(err)
+	}
+	defer os.Unsetenv(EnvVarAccessKeyID)
+
+	if err := os.Setenv(EnvVarAccessKeySecret, expectedAccessKeySecret); err != nil {
+		t.Fatal(err)
+	}
+	defer os.Unsetenv(EnvVarAccessKeySecret)
+
+	if err := os.Setenv(EnvVarRoleArn, expectedRoleArn); err != nil {
+		t.Fatal(err)
+	}
+	defer os.Unsetenv(EnvVarRoleArn)
+
+	if err := os.Setenv(EnvVarRoleSessionName, expectedRoleSessionName); err != nil {
+		t.Fatal(err)
+	}
+	defer os.Unsetenv(EnvVarRoleSessionName)
+
+	if err := os.Setenv(EnvVarRoleSessionExpiration, strconv.Itoa(expectedRoleSessionExpiration)); err != nil {
+		t.Fatal(err)
+	}
+	defer os.Unsetenv(EnvVarRoleSessionExpiration)
+
+	credential, err := NewEnvCredentialProvider().Retrieve()
+	if err != nil {
+		t.Fatal(err)
+	}
+	ramRoleArnCredential, ok := credential.(*credentials.RamRoleArnCredential)
+	if !ok {
+		t.Fatal("expected AccessKeyCredential")
+	}
+
+	if ramRoleArnCredential.AccessKeyId != expectedAccesKeyId {
+		t.Fatalf("expected AccessKeyId %s but received %s", expectedAccesKeyId, ramRoleArnCredential.AccessKeyId)
+	}
+	if ramRoleArnCredential.AccessKeySecret != expectedAccessKeySecret {
+		t.Fatalf("expected AccessKeySecret %s but received %s", expectedAccessKeySecret, ramRoleArnCredential.AccessKeySecret)
+	}
+	if ramRoleArnCredential.RoleArn != expectedRoleArn {
+		t.Fatalf("expected RoleArn %s but received %s", expectedRoleArn, ramRoleArnCredential.RoleArn)
+	}
+	if ramRoleArnCredential.RoleSessionName != expectedRoleSessionName {
+		t.Fatalf("expected RoleSessionName %s but received %s", expectedRoleSessionName, ramRoleArnCredential.RoleSessionName)
+	}
+	if ramRoleArnCredential.RoleSessionExpiration != expectedRoleSessionExpiration {
+		t.Fatalf("expected RoleSessionExpiration %d but received %d", expectedRoleSessionExpiration, ramRoleArnCredential.RoleSessionExpiration)
+	}
+}
+
+func TestEnvProvider_Retrieve_NewStsTokenCredential(t *testing.T) {
+
+	expectedAccesKeyId := "access-key-id"
+	expectedAccessKeySecret := "access-key-secret"
+	expectedAccessKeyStsToken := "access-key-sts-token"
+
+	if err := os.Setenv(EnvVarAccessKeyID, expectedAccesKeyId); err != nil {
+		t.Fatal(err)
+	}
+	defer os.Unsetenv(EnvVarAccessKeyID)
+
+	if err := os.Setenv(EnvVarAccessKeySecret, expectedAccessKeySecret); err != nil {
+		t.Fatal(err)
+	}
+	defer os.Unsetenv(EnvVarAccessKeySecret)
+
+	if err := os.Setenv(EnvVarAccessKeyStsToken, expectedAccessKeyStsToken); err != nil {
+		t.Fatal(err)
+	}
+	defer os.Unsetenv(EnvVarAccessKeyStsToken)
+
+	credential, err := NewEnvCredentialProvider().Retrieve()
+	if err != nil {
+		t.Fatal(err)
+	}
+	stsTokenCredential, ok := credential.(*credentials.StsTokenCredential)
+	if !ok {
+		t.Fatal("expected AccessKeyCredential")
+	}
+
+	if stsTokenCredential.AccessKeyId != expectedAccesKeyId {
+		t.Fatalf("expected AccessKeyId %s but received %s", expectedAccesKeyId, stsTokenCredential.AccessKeyId)
+	}
+	if stsTokenCredential.AccessKeySecret != expectedAccessKeySecret {
+		t.Fatalf("expected AccessKeySecret %s but received %s", expectedAccessKeySecret, stsTokenCredential.AccessKeySecret)
+	}
+	if stsTokenCredential.AccessKeyStsToken != expectedAccessKeyStsToken {
+		t.Fatalf("expected AccessKeyStsToken %s but received %s", expectedAccessKeyStsToken, stsTokenCredential.AccessKeyStsToken)
+	}
+}
+
+func TestEnvProvider_Retrieve_NewAccessKeyCredential(t *testing.T) {
+
+	expectedAccesKeyId := "access-key-id"
+	expectedAccessKeySecret := "access-key-secret"
+
+	if err := os.Setenv(EnvVarAccessKeyID, expectedAccesKeyId); err != nil {
+		t.Fatal(err)
+	}
+	defer os.Unsetenv(EnvVarAccessKeyID)
+
+	if err := os.Setenv(EnvVarAccessKeySecret, expectedAccessKeySecret); err != nil {
+		t.Fatal(err)
+	}
+	defer os.Unsetenv(EnvVarAccessKeySecret)
+
+	credential, err := NewEnvCredentialProvider().Retrieve()
+	if err != nil {
+		t.Fatal(err)
+	}
+	accessKeyCredential, ok := credential.(*credentials.AccessKeyCredential)
+	if !ok {
+		t.Fatal("expected AccessKeyCredential")
+	}
+
+	if accessKeyCredential.AccessKeyId != expectedAccesKeyId {
+		t.Fatalf("expected AccessKeyId %s but received %s", expectedAccesKeyId, accessKeyCredential.AccessKeyId)
+	}
+	if accessKeyCredential.AccessKeySecret != expectedAccessKeySecret {
+		t.Fatalf("expected AccessKeySecret %s but received %s", expectedAccessKeySecret, accessKeyCredential.AccessKeySecret)
+	}
+}
+
+func TestEnvProvider_Retrieve_NewEcsRamRoleCredential(t *testing.T) {
+
+	expectedRoleName := "role-name"
+
+	if err := os.Setenv(EnvVarRoleName, expectedRoleName); err != nil {
+		t.Fatal(err)
+	}
+	defer os.Unsetenv(EnvVarRoleName)
+
+	credential, err := NewEnvCredentialProvider().Retrieve()
+	if err != nil {
+		t.Fatal(err)
+	}
+	ecsRamRoleCredential, ok := credential.(*credentials.EcsRamRoleCredential)
+	if !ok {
+		t.Fatal("expected AccessKeyCredential")
+	}
+
+	if ecsRamRoleCredential.RoleName != expectedRoleName {
+		t.Fatalf("expected RoleName %s but received %s", expectedRoleName, ecsRamRoleCredential.RoleName)
+	}
+}
+
+func TestEnvProvider_Retrieve_NewRsaKeyPairCredential(t *testing.T) {
+
+	expectedPrivateKey := "private-key"
+	expectedPublicKeyId := "public-key-id"
+	expectedSessionExpiration := 1
+
+	if err := os.Setenv(EnvVarPrivateKey, expectedPrivateKey); err != nil {
+		t.Fatal(err)
+	}
+	defer os.Unsetenv(EnvVarPrivateKey)
+
+	if err := os.Setenv(EnvVarPublicKeyID, expectedPublicKeyId); err != nil {
+		t.Fatal(err)
+	}
+	defer os.Unsetenv(EnvVarPublicKeyID)
+
+	if err := os.Setenv(EnvVarSessionExpiration, strconv.Itoa(expectedSessionExpiration)); err != nil {
+		t.Fatal(err)
+	}
+	defer os.Unsetenv(EnvVarSessionExpiration)
+
+	credential, err := NewEnvCredentialProvider().Retrieve()
+	if err != nil {
+		t.Fatal(err)
+	}
+	rsaKeyPairCredential, ok := credential.(*credentials.RsaKeyPairCredential)
+	if !ok {
+		t.Fatal("expected AccessKeyCredential")
+	}
+
+	if rsaKeyPairCredential.PrivateKey != expectedPrivateKey {
+		t.Fatalf("expected PrivateKey %s but received %s", expectedPrivateKey, rsaKeyPairCredential.PrivateKey)
+	}
+	if rsaKeyPairCredential.PublicKeyId != expectedPublicKeyId {
+		t.Fatalf("expected PublicKeyId %s but received %s", expectedPublicKeyId, rsaKeyPairCredential.PublicKeyId)
+	}
+	if rsaKeyPairCredential.SessionExpiration != expectedSessionExpiration {
+		t.Fatalf("expected SessionExpiration %d but received %d", expectedSessionExpiration, rsaKeyPairCredential.SessionExpiration)
+	}
+}
+
+func TestEnvProvider_Retrieve_ErrNoValidCredentialsFound(t *testing.T) {
+	_, err := NewEnvCredentialProvider().Retrieve()
+	if err == nil {
+		t.Fatal("expected ErrNoValidCredentialsFound for empty configuration")
+	}
+	if err != ErrNoValidCredentialsFound {
+		t.Fatal("expected ErrNoValidCredentialsFound for empty configuration")
+	}
+}

+ 86 - 0
sdk/auth/credentials/providers/instance_metadata.go

@@ -0,0 +1,86 @@
+package providers
+
+import (
+	"encoding/json"
+	"errors"
+	"fmt"
+	"io/ioutil"
+	"net/http"
+
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth/credentials"
+)
+
+var securityCredURL = "http://100.100.100.200/latest/meta-data/ram/security-credentials/"
+
+func NewInstanceMetadataProvider() Provider {
+	return &InstanceMetadataProvider{}
+}
+
+type InstanceMetadataProvider struct {
+	RoleName string
+}
+
+func (p *InstanceMetadataProvider) Retrieve() (auth.Credential, error) {
+	if p.RoleName == "" {
+		// Instances can have only one role name that never changes,
+		// so attempt to populate it.
+		// If this call is executed in an environment that doesn't support instance metadata,
+		// it will time out after 30 seconds and return an err.
+		resp, err := http.Get(securityCredURL)
+		if err != nil {
+			return nil, err
+		}
+		defer resp.Body.Close()
+
+		bodyBytes, _ := ioutil.ReadAll(resp.Body)
+		if resp.StatusCode != 200 {
+			return nil, fmt.Errorf("received %d getting role name: %s", resp.StatusCode, bodyBytes)
+		}
+		roleName := string(bodyBytes)
+		if roleName == "" {
+			return nil, errors.New("unable to retrieve role name, it may be unset")
+		}
+		p.RoleName = roleName
+	}
+
+	resp, err := http.Get(securityCredURL + p.RoleName)
+	if err != nil {
+		return nil, err
+	}
+	defer resp.Body.Close()
+
+	if resp.StatusCode != 200 {
+		return nil, fmt.Errorf("received %d getting security credentials for %s", resp.StatusCode, p.RoleName)
+	}
+	body := make(map[string]interface{})
+	if err := json.NewDecoder(resp.Body).Decode(&body); err != nil {
+		return nil, err
+	}
+
+	accessKeyID, err := extractString(body, "AccessKeyId")
+	if err != nil {
+		return nil, err
+	}
+	accessKeySecret, err := extractString(body, "AccessKeySecret")
+	if err != nil {
+		return nil, err
+	}
+	securityToken, err := extractString(body, "SecurityToken")
+	if err != nil {
+		return nil, err
+	}
+	return credentials.NewStsTokenCredential(accessKeyID, accessKeySecret, securityToken), nil
+}
+
+func extractString(m map[string]interface{}, key string) (string, error) {
+	raw, ok := m[key]
+	if !ok {
+		return "", fmt.Errorf("%s not in %+v", key, m)
+	}
+	str, ok := raw.(string)
+	if !ok {
+		return "", fmt.Errorf("%s is not a string in %+v", key, m)
+	}
+	return str, nil
+}

+ 65 - 0
sdk/auth/credentials/providers/instance_metadata_test.go

@@ -0,0 +1,65 @@
+package providers
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth/credentials"
+	"net/http"
+	"net/http/httptest"
+	"strings"
+	"testing"
+)
+
+func TestInstanceMetadataProvider_Retrieve_Success(t *testing.T) {
+
+	// Start a test server locally.
+	ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+
+		body := "unsupported path: " + r.URL.Path
+		status := 500
+
+		switch r.URL.Path {
+		case "/latest/meta-data/ram/security-credentials/":
+			body = "ELK"
+			status = 200
+		case "/latest/meta-data/ram/security-credentials/ELK":
+			body = ` {
+			  "AccessKeyId" : "STS.L4aBSCSJVMuKg5U1vFDw",
+			  "AccessKeySecret" : "wyLTSmsyPGP1ohvvw8xYgB29dlGI8KMiH2pKCNZ9",
+			  "Expiration" : "2018-08-20T22:30:02Z",
+			  "SecurityToken" : "CAESrAIIARKAAShQquMnLIlbvEcIxO6wCoqJufs8sWwieUxu45hS9AvKNEte8KRUWiJWJ6Y+YHAPgNwi7yfRecMFydL2uPOgBI7LDio0RkbYLmJfIxHM2nGBPdml7kYEOXmJp2aDhbvvwVYIyt/8iES/R6N208wQh0Pk2bu+/9dvalp6wOHF4gkFGhhTVFMuTDRhQlNDU0pWTXVLZzVVMXZGRHciBTQzMjc0KgVhbGljZTCpnJjwySk6BlJzYU1ENUJuCgExGmkKBUFsbG93Eh8KDEFjdGlvbkVxdWFscxIGQWN0aW9uGgcKBW9zczoqEj8KDlJlc291cmNlRXF1YWxzEghSZXNvdXJjZRojCiFhY3M6b3NzOio6NDMyNzQ6c2FtcGxlYm94L2FsaWNlLyo=",
+			  "LastUpdated" : "2018-08-20T16:30:01Z",
+			  "Code" : "Success"
+			}`
+			status = 200
+		}
+		w.Write([]byte(body))
+		w.WriteHeader(status)
+	}))
+	defer ts.Close()
+
+	// Update our securityCredURL to point at our local test server.
+	originalSecurityCredURL := securityCredURL
+	securityCredURL = strings.Replace(securityCredURL, "http://100.100.100.200", ts.URL, -1)
+	defer func() {
+		securityCredURL = originalSecurityCredURL
+	}()
+
+	credential, err := NewInstanceMetadataProvider().Retrieve()
+	if err != nil {
+		t.Fatal(err)
+	}
+
+	stsTokenCredential, ok := credential.(*credentials.StsTokenCredential)
+	if !ok {
+		t.Fatal("expected AccessKeyCredential")
+	}
+
+	if stsTokenCredential.AccessKeyId != "STS.L4aBSCSJVMuKg5U1vFDw" {
+		t.Fatalf("expected AccessKeyId STS.L4aBSCSJVMuKg5U1vFDw but received %s", stsTokenCredential.AccessKeyId)
+	}
+	if stsTokenCredential.AccessKeySecret != "wyLTSmsyPGP1ohvvw8xYgB29dlGI8KMiH2pKCNZ9" {
+		t.Fatalf("expected AccessKeySecret wyLTSmsyPGP1ohvvw8xYgB29dlGI8KMiH2pKCNZ9 but received %s", stsTokenCredential.AccessKeySecret)
+	}
+	if !strings.HasPrefix(stsTokenCredential.AccessKeyStsToken, "CAESrAIIARKAA") {
+		t.Fatalf("expected AccessKeyStsToken starting with CAESrAIIARKAA but received %s", stsTokenCredential.AccessKeyStsToken)
+	}
+}

+ 3 - 3
sdk/auth/roa_signature_composer.go

@@ -42,9 +42,9 @@ func completeROASignParams(request requests.AcsRequest, signer Signer, regionId
 
 	// complete query params
 	queryParams := request.GetQueryParams()
-	if _, ok := queryParams["RegionId"]; !ok {
-		queryParams["RegionId"] = regionId
-	}
+	//if _, ok := queryParams["RegionId"]; !ok {
+	//	queryParams["RegionId"] = regionId
+	//}
 	if extraParam := signer.GetExtraParam(); extraParam != nil {
 		for key, value := range extraParam {
 			if key == "SecurityToken" {

+ 3 - 1
sdk/client.go

@@ -250,7 +250,9 @@ func (client *Client) DoActionWithSigner(request requests.AcsRequest, response r
 		var timeout bool
 		// receive error
 		if err != nil {
-			if timeout = isTimeout(err); !timeout {
+			if !client.config.AutoRetry {
+				return
+			} else if timeout = isTimeout(err); !timeout {
 				// if not timeout error, return
 				return
 			} else if retryTimes >= client.config.MaxRetryTime {

+ 1 - 1
sdk/endpoints/location_resolver.go

@@ -57,7 +57,7 @@ func (resolver *LocationResolver) TryResolve(param *ResolveParam) (endpoint stri
 	getEndpointRequest.Product = "Location"
 	getEndpointRequest.Version = "2015-06-12"
 	getEndpointRequest.ApiName = "DescribeEndpoints"
-	getEndpointRequest.Domain = "location.aliyuncs.com"
+	getEndpointRequest.Domain = "location-readonly.aliyuncs.com"
 	getEndpointRequest.Method = "GET"
 	getEndpointRequest.Scheme = requests.HTTPS
 

+ 1 - 1
sdk/errors/client_error.go

@@ -24,7 +24,7 @@ const (
 	UnsupportedCredentialErrorMessage = "Specified credential (type = %s) is not supported, please check"
 
 	CanNotResolveEndpointErrorCode    = "SDK.CanNotResolveEndpoint"
-	CanNotResolveEndpointErrorMessage = "Can not resolve endpoint(param = %s), please check the user guide\n %s"
+	CanNotResolveEndpointErrorMessage = "Can not resolve endpoint(param = %s), please check your accessKey with secret, and read the user guide\n %s"
 
 	UnsupportedParamPositionErrorCode    = "SDK.UnsupportedParamPosition"
 	UnsupportedParamPositionErrorMessage = "Specified param position (%s) is not supported, please upgrade sdk and retry"

+ 1 - 0
sdk/requests/acs_reqeust.go

@@ -226,6 +226,7 @@ func defaultBaseRequest() (request *baseRequest) {
 		Headers: map[string]string{
 			"x-sdk-client":      "golang/1.0.0",
 			"x-sdk-invoke-type": "normal",
+			"Accept-Encoding": "identity",
 		},
 		FormParams: make(map[string]string),
 	}

+ 3 - 1
sdk/requests/roa_request.go

@@ -77,7 +77,9 @@ func (request *RoaRequest) buildQueries(needParamEncode bool) string {
 	// append urlBuilder
 	urlBuilder := bytes.Buffer{}
 	urlBuilder.WriteString(path)
-	urlBuilder.WriteString("?")
+	if len(queryKeys) > 0 {
+		urlBuilder.WriteString("?")
+	}
 	for i := 0; i < len(queryKeys); i++ {
 		queryKey := queryKeys[i]
 		urlBuilder.WriteString(queryKey)

+ 1 - 1
sdk/requests/rpc_request.go

@@ -52,7 +52,7 @@ func (request *RpcRequest) GetQueries() string {
 }
 
 func (request *RpcRequest) BuildUrl() string {
-	return strings.ToLower(request.Scheme) + "://" + request.Domain + request.BuildQueries()
+	return strings.ToLower(request.Scheme) + "://" + request.Domain + ":" + request.Port + request.BuildQueries()
 }
 
 func (request *RpcRequest) GetUrl() string {

+ 7 - 7
sdk/requests/types.go

@@ -8,11 +8,11 @@ func NewInteger(integer int) Integer {
 	return Integer(strconv.Itoa(integer))
 }
 
-func (integer Integer) hasValue() bool {
+func (integer Integer) HasValue() bool {
 	return integer != ""
 }
 
-func (integer Integer) getValue() (int, error) {
+func (integer Integer) GetValue() (int, error) {
 	return strconv.Atoi(string(integer))
 }
 
@@ -20,7 +20,7 @@ func NewInteger64(integer int64) Integer {
 	return Integer(strconv.FormatInt(integer, 10))
 }
 
-func (integer Integer) getValue64() (int64, error) {
+func (integer Integer) GetValue64() (int64, error) {
 	return strconv.ParseInt(string(integer), 10, 0)
 }
 
@@ -30,11 +30,11 @@ func NewBoolean(bool bool) Boolean {
 	return Boolean(strconv.FormatBool(bool))
 }
 
-func (boolean Boolean) hasValue() bool {
+func (boolean Boolean) HasValue() bool {
 	return boolean != ""
 }
 
-func (boolean Boolean) getValue() (bool, error) {
+func (boolean Boolean) GetValue() (bool, error) {
 	return strconv.ParseBool(string(boolean))
 }
 
@@ -44,10 +44,10 @@ func NewFloat(f float64) Float {
 	return Float(strconv.FormatFloat(f, 'f', 6, 64))
 }
 
-func (float Float) hasValue() bool {
+func (float Float) HasValue() bool {
 	return float != ""
 }
 
-func (float Float) getValue() (float64, error) {
+func (float Float) GetValue() (float64, error) {
 	return strconv.ParseFloat(string(float), 64)
 }

+ 8 - 8
sdk/requests/types_test.go

@@ -7,8 +7,8 @@ import (
 
 func TestNewInteger(t *testing.T) {
 	integer := NewInteger(123123)
-	assert.True(t, integer.hasValue())
-	value, err := integer.getValue()
+	assert.True(t, integer.HasValue())
+	value, err := integer.GetValue()
 	assert.Nil(t, err)
 	assert.Equal(t, 123123, value)
 	var expected Integer
@@ -18,8 +18,8 @@ func TestNewInteger(t *testing.T) {
 
 func TestNewInteger64(t *testing.T) {
 	long := NewInteger64(123123123123123123)
-	assert.True(t, long.hasValue())
-	value, err := long.getValue64()
+	assert.True(t, long.HasValue())
+	value, err := long.GetValue64()
 	assert.Nil(t, err)
 	assert.Equal(t, int64(123123123123123123), value)
 	var expected Integer
@@ -29,8 +29,8 @@ func TestNewInteger64(t *testing.T) {
 
 func TestNewBoolean(t *testing.T) {
 	boolean := NewBoolean(false)
-	assert.True(t, boolean.hasValue())
-	value, err := boolean.getValue()
+	assert.True(t, boolean.HasValue())
+	value, err := boolean.GetValue()
 	assert.Nil(t, err)
 	assert.Equal(t, false, value)
 	var expected Boolean
@@ -40,8 +40,8 @@ func TestNewBoolean(t *testing.T) {
 
 func TestNewFloat(t *testing.T) {
 	float := NewFloat(123123.123123)
-	assert.True(t, float.hasValue())
-	value, err := float.getValue()
+	assert.True(t, float.HasValue())
+	value, err := float.GetValue()
 	assert.Nil(t, err)
 	assert.Equal(t, 123123.123123, value)
 	var expected Float

+ 5 - 0
sdk/responses/response.go

@@ -47,6 +47,11 @@ func Unmarshal(response AcsResponse, httpResponse *http.Response, format string)
 		// common response need not unmarshal
 		return
 	}
+
+	if len(response.GetHttpContentBytes()) == 0 {
+		return
+	}
+
 	if strings.ToUpper(format) == "JSON" {
 		initJsonParserOnce()
 		err = jsonParser.Unmarshal(response.GetHttpContentBytes(), response)

+ 21 - 19
services/arms/arms_query_data_set.go

@@ -76,47 +76,49 @@ func (client *Client) ARMSQueryDataSetWithCallback(request *ARMSQueryDataSetRequ
 // ARMSQueryDataSetRequest is the request struct for api ARMSQueryDataSet
 type ARMSQueryDataSetRequest struct {
 	*requests.RpcRequest
-	DatasetId     requests.Integer                `position:"Query" name:"DatasetId"`
-	IntervalInSec requests.Integer                `position:"Query" name:"IntervalInSec"`
-	DateStr       requests.Integer                `position:"Query" name:"DateStr"`
+	DateStr       string                          `position:"Query" name:"DateStr"`
 	MinTime       requests.Integer                `position:"Query" name:"MinTime"`
+	ReduceTail    requests.Boolean                `position:"Query" name:"ReduceTail"`
 	MaxTime       requests.Integer                `position:"Query" name:"MaxTime"`
-	Dimensions    *[]ARMSQueryDataSetDimensions   `position:"Query" name:"Dimensions"  type:"Repeated"`
+	OptionalDims  *[]ARMSQueryDataSetOptionalDims `position:"Query" name:"OptionalDims"  type:"Repeated"`
 	Measures      *[]string                       `position:"Query" name:"Measures"  type:"Repeated"`
+	IntervalInSec requests.Integer                `position:"Query" name:"IntervalInSec"`
 	IsDrillDown   requests.Boolean                `position:"Query" name:"IsDrillDown"`
+	HungryMode    requests.Boolean                `position:"Query" name:"HungryMode"`
+	SecurityToken string                          `position:"Query" name:"SecurityToken"`
 	OrderByKey    string                          `position:"Query" name:"OrderByKey"`
 	Limit         requests.Integer                `position:"Query" name:"Limit"`
-	ReduceTail    requests.Boolean                `position:"Query" name:"ReduceTail"`
-	HungryMode    requests.Boolean                `position:"Query" name:"HungryMode"`
 	RequiredDims  *[]ARMSQueryDataSetRequiredDims `position:"Query" name:"RequiredDims"  type:"Repeated"`
-	OptionalDims  *[]ARMSQueryDataSetOptionalDims `position:"Query" name:"OptionalDims"  type:"Repeated"`
+	DatasetId     requests.Integer                `position:"Query" name:"DatasetId"`
+	Dimensions    *[]ARMSQueryDataSetDimensions   `position:"Query" name:"Dimensions"  type:"Repeated"`
 }
 
-// ARMSQueryDataSetDimensions is a repeated param struct in ARMSQueryDataSetRequest
-type ARMSQueryDataSetDimensions struct {
-	Key   string `name:"Key"`
-	Value string `name:"Value"`
+// ARMSQueryDataSetOptionalDims is a repeated param struct in ARMSQueryDataSetRequest
+type ARMSQueryDataSetOptionalDims struct {
 	Type  string `name:"Type"`
+	Value string `name:"Value"`
+	Key   string `name:"Key"`
 }
 
 // ARMSQueryDataSetRequiredDims is a repeated param struct in ARMSQueryDataSetRequest
 type ARMSQueryDataSetRequiredDims struct {
-	Key   string `name:"Key"`
-	Value string `name:"Value"`
 	Type  string `name:"Type"`
+	Value string `name:"Value"`
+	Key   string `name:"Key"`
 }
 
-// ARMSQueryDataSetOptionalDims is a repeated param struct in ARMSQueryDataSetRequest
-type ARMSQueryDataSetOptionalDims struct {
-	Key   string `name:"Key"`
-	Value string `name:"Value"`
+// ARMSQueryDataSetDimensions is a repeated param struct in ARMSQueryDataSetRequest
+type ARMSQueryDataSetDimensions struct {
 	Type  string `name:"Type"`
+	Value string `name:"Value"`
+	Key   string `name:"Key"`
 }
 
 // ARMSQueryDataSetResponse is the response struct for api ARMSQueryDataSet
 type ARMSQueryDataSetResponse struct {
 	*responses.BaseResponse
-	Data string `json:"Data" xml:"Data"`
+	Data      string `json:"Data" xml:"Data"`
+	RequestId string `json:"RequestId" xml:"RequestId"`
 }
 
 // CreateARMSQueryDataSetRequest creates a request to invoke ARMSQueryDataSet API
@@ -124,7 +126,7 @@ func CreateARMSQueryDataSetRequest() (request *ARMSQueryDataSetRequest) {
 	request = &ARMSQueryDataSetRequest{
 		RpcRequest: &requests.RpcRequest{},
 	}
-	request.InitWithApiInfo("ARMS", "2016-11-25", "ARMSQueryDataSet", "", "")
+	request.InitWithApiInfo("ARMS", "2018-10-15", "ARMSQueryDataSet", "", "")
 	return
 }
 

+ 120 - 0
services/arms/metric_query.go

@@ -0,0 +1,120 @@
+package arms
+
+//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"
+)
+
+// MetricQuery invokes the arms.MetricQuery API synchronously
+// api document: https://help.aliyun.com/api/arms/metricquery.html
+func (client *Client) MetricQuery(request *MetricQueryRequest) (response *MetricQueryResponse, err error) {
+	response = CreateMetricQueryResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// MetricQueryWithChan invokes the arms.MetricQuery API asynchronously
+// api document: https://help.aliyun.com/api/arms/metricquery.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) MetricQueryWithChan(request *MetricQueryRequest) (<-chan *MetricQueryResponse, <-chan error) {
+	responseChan := make(chan *MetricQueryResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.MetricQuery(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// MetricQueryWithCallback invokes the arms.MetricQuery API asynchronously
+// api document: https://help.aliyun.com/api/arms/metricquery.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) MetricQueryWithCallback(request *MetricQueryRequest, callback func(response *MetricQueryResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *MetricQueryResponse
+		var err error
+		defer close(result)
+		response, err = client.MetricQuery(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// MetricQueryRequest is the request struct for api MetricQuery
+type MetricQueryRequest struct {
+	*requests.RpcRequest
+	IintervalInSec requests.Integer      `position:"Query" name:"IintervalInSec"`
+	Measures       *[]string             `position:"Query" name:"Measures"  type:"Repeated"`
+	Metric         string                `position:"Query" name:"Metric"`
+	SecurityToken  string                `position:"Query" name:"SecurityToken"`
+	Limit          requests.Integer      `position:"Query" name:"Limit"`
+	EndTime        requests.Integer      `position:"Query" name:"EndTime"`
+	OrderBy        string                `position:"Query" name:"OrderBy"`
+	StartTime      requests.Integer      `position:"Query" name:"StartTime"`
+	Filters        *[]MetricQueryFilters `position:"Query" name:"Filters"  type:"Repeated"`
+	Dimensions     *[]string             `position:"Query" name:"Dimensions"  type:"Repeated"`
+	Order          string                `position:"Query" name:"Order"`
+}
+
+// MetricQueryFilters is a repeated param struct in MetricQueryRequest
+type MetricQueryFilters struct {
+	Value string `name:"Value"`
+	Key   string `name:"Key"`
+}
+
+// MetricQueryResponse is the response struct for api MetricQuery
+type MetricQueryResponse struct {
+	*responses.BaseResponse
+	Data      string `json:"Data" xml:"Data"`
+	RequestId string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateMetricQueryRequest creates a request to invoke MetricQuery API
+func CreateMetricQueryRequest() (request *MetricQueryRequest) {
+	request = &MetricQueryRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("ARMS", "2018-10-15", "MetricQuery", "", "")
+	return
+}
+
+// CreateMetricQueryResponse creates a response to parse from MetricQuery response
+func CreateMetricQueryResponse() (response *MetricQueryResponse) {
+	response = &MetricQueryResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 0 - 122
services/arms/where_in_dim_query.go

@@ -1,122 +0,0 @@
-package arms
-
-//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"
-)
-
-// WhereInDimQuery invokes the arms.WhereInDimQuery API synchronously
-// api document: https://help.aliyun.com/api/arms/whereindimquery.html
-func (client *Client) WhereInDimQuery(request *WhereInDimQueryRequest) (response *WhereInDimQueryResponse, err error) {
-	response = CreateWhereInDimQueryResponse()
-	err = client.DoAction(request, response)
-	return
-}
-
-// WhereInDimQueryWithChan invokes the arms.WhereInDimQuery API asynchronously
-// api document: https://help.aliyun.com/api/arms/whereindimquery.html
-// asynchronous document: https://help.aliyun.com/document_detail/66220.html
-func (client *Client) WhereInDimQueryWithChan(request *WhereInDimQueryRequest) (<-chan *WhereInDimQueryResponse, <-chan error) {
-	responseChan := make(chan *WhereInDimQueryResponse, 1)
-	errChan := make(chan error, 1)
-	err := client.AddAsyncTask(func() {
-		defer close(responseChan)
-		defer close(errChan)
-		response, err := client.WhereInDimQuery(request)
-		if err != nil {
-			errChan <- err
-		} else {
-			responseChan <- response
-		}
-	})
-	if err != nil {
-		errChan <- err
-		close(responseChan)
-		close(errChan)
-	}
-	return responseChan, errChan
-}
-
-// WhereInDimQueryWithCallback invokes the arms.WhereInDimQuery API asynchronously
-// api document: https://help.aliyun.com/api/arms/whereindimquery.html
-// asynchronous document: https://help.aliyun.com/document_detail/66220.html
-func (client *Client) WhereInDimQueryWithCallback(request *WhereInDimQueryRequest, callback func(response *WhereInDimQueryResponse, err error)) <-chan int {
-	result := make(chan int, 1)
-	err := client.AddAsyncTask(func() {
-		var response *WhereInDimQueryResponse
-		var err error
-		defer close(result)
-		response, err = client.WhereInDimQuery(request)
-		callback(response, err)
-		result <- 1
-	})
-	if err != nil {
-		defer close(result)
-		callback(nil, err)
-		result <- 0
-	}
-	return result
-}
-
-// WhereInDimQueryRequest is the request struct for api WhereInDimQuery
-type WhereInDimQueryRequest struct {
-	*requests.RpcRequest
-	DatasetId     requests.Integer             `position:"Query" name:"DatasetId"`
-	IntervalInSec requests.Integer             `position:"Query" name:"IntervalInSec"`
-	DateStr       string                       `position:"Query" name:"DateStr"`
-	MinTime       requests.Integer             `position:"Query" name:"MinTime"`
-	MaxTime       requests.Integer             `position:"Query" name:"MaxTime"`
-	Dimensions    *[]WhereInDimQueryDimensions `position:"Query" name:"Dimensions"  type:"Repeated"`
-	WhereInKey    string                       `position:"Query" name:"WhereInKey"`
-	WhereInValues *[]string                    `position:"Query" name:"WhereInValues"  type:"Repeated"`
-	Measures      *[]string                    `position:"Query" name:"Measures"  type:"Repeated"`
-	IsDrillDown   requests.Boolean             `position:"Query" name:"IsDrillDown"`
-	OrderByKey    string                       `position:"Query" name:"OrderByKey"`
-	Limit         requests.Integer             `position:"Query" name:"Limit"`
-	ReduceTail    requests.Boolean             `position:"Query" name:"ReduceTail"`
-}
-
-// WhereInDimQueryDimensions is a repeated param struct in WhereInDimQueryRequest
-type WhereInDimQueryDimensions struct {
-	Key   string `name:"Key"`
-	Value string `name:"Value"`
-	Type  string `name:"Type"`
-}
-
-// WhereInDimQueryResponse is the response struct for api WhereInDimQuery
-type WhereInDimQueryResponse struct {
-	*responses.BaseResponse
-	Data string `json:"Data" xml:"Data"`
-}
-
-// CreateWhereInDimQueryRequest creates a request to invoke WhereInDimQuery API
-func CreateWhereInDimQueryRequest() (request *WhereInDimQueryRequest) {
-	request = &WhereInDimQueryRequest{
-		RpcRequest: &requests.RpcRequest{},
-	}
-	request.InitWithApiInfo("ARMS", "2016-11-25", "WhereInDimQuery", "", "")
-	return
-}
-
-// CreateWhereInDimQueryResponse creates a response to parse from WhereInDimQuery response
-func CreateWhereInDimQueryResponse() (response *WhereInDimQueryResponse) {
-	response = &WhereInDimQueryResponse{
-		BaseResponse: &responses.BaseResponse{},
-	}
-	return
-}

+ 81 - 0
services/bssopenapi/client.go

@@ -0,0 +1,81 @@
+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"
+	"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
+}

+ 120 - 0
services/bssopenapi/create_instance.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"
+)
+
+// CreateInstance invokes the bssopenapi.CreateInstance API synchronously
+// api document: https://help.aliyun.com/api/bssopenapi/createinstance.html
+func (client *Client) CreateInstance(request *CreateInstanceRequest) (response *CreateInstanceResponse, err error) {
+	response = CreateCreateInstanceResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// CreateInstanceWithChan invokes the bssopenapi.CreateInstance API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/createinstance.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CreateInstanceWithChan(request *CreateInstanceRequest) (<-chan *CreateInstanceResponse, <-chan error) {
+	responseChan := make(chan *CreateInstanceResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.CreateInstance(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// CreateInstanceWithCallback invokes the bssopenapi.CreateInstance API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/createinstance.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CreateInstanceWithCallback(request *CreateInstanceRequest, callback func(response *CreateInstanceResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *CreateInstanceResponse
+		var err error
+		defer close(result)
+		response, err = client.CreateInstance(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// CreateInstanceRequest is the request struct for api CreateInstance
+type CreateInstanceRequest struct {
+	*requests.RpcRequest
+	ProductCode      string                     `position:"Query" name:"ProductCode"`
+	Period           requests.Integer           `position:"Query" name:"Period"`
+	SubscriptionType string                     `position:"Query" name:"SubscriptionType"`
+	RenewPeriod      requests.Integer           `position:"Query" name:"RenewPeriod"`
+	RenewalStatus    string                     `position:"Query" name:"RenewalStatus"`
+	Parameter        *[]CreateInstanceParameter `position:"Query" name:"Parameter"  type:"Repeated"`
+	OwnerId          requests.Integer           `position:"Query" name:"OwnerId"`
+	ProductType      string                     `position:"Query" name:"ProductType"`
+}
+
+// CreateInstanceParameter is a repeated param struct in CreateInstanceRequest
+type CreateInstanceParameter struct {
+	Code  string `name:"Code"`
+	Value string `name:"Value"`
+}
+
+// CreateInstanceResponse is the response struct for api CreateInstance
+type CreateInstanceResponse 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"`
+}
+
+// CreateCreateInstanceRequest creates a request to invoke CreateInstance API
+func CreateCreateInstanceRequest() (request *CreateInstanceRequest) {
+	request = &CreateInstanceRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("BssOpenApi", "2017-12-14", "CreateInstance", "", "")
+	return
+}
+
+// CreateCreateInstanceResponse creates a response to parse from CreateInstance response
+func CreateCreateInstanceResponse() (response *CreateInstanceResponse) {
+	response = &CreateInstanceResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 114 - 0
services/bssopenapi/create_resource_package.go

@@ -0,0 +1,114 @@
+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"
+)
+
+// CreateResourcePackage invokes the bssopenapi.CreateResourcePackage API synchronously
+// api document: https://help.aliyun.com/api/bssopenapi/createresourcepackage.html
+func (client *Client) CreateResourcePackage(request *CreateResourcePackageRequest) (response *CreateResourcePackageResponse, err error) {
+	response = CreateCreateResourcePackageResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// CreateResourcePackageWithChan invokes the bssopenapi.CreateResourcePackage API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/createresourcepackage.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CreateResourcePackageWithChan(request *CreateResourcePackageRequest) (<-chan *CreateResourcePackageResponse, <-chan error) {
+	responseChan := make(chan *CreateResourcePackageResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.CreateResourcePackage(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// CreateResourcePackageWithCallback invokes the bssopenapi.CreateResourcePackage API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/createresourcepackage.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CreateResourcePackageWithCallback(request *CreateResourcePackageRequest, callback func(response *CreateResourcePackageResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *CreateResourcePackageResponse
+		var err error
+		defer close(result)
+		response, err = client.CreateResourcePackage(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// CreateResourcePackageRequest is the request struct for api CreateResourcePackage
+type CreateResourcePackageRequest struct {
+	*requests.RpcRequest
+	Duration      requests.Integer `position:"Query" name:"Duration"`
+	ProductCode   string           `position:"Query" name:"ProductCode"`
+	Specification string           `position:"Query" name:"Specification"`
+	OwnerId       requests.Integer `position:"Query" name:"OwnerId"`
+	PackageType   string           `position:"Query" name:"PackageType"`
+	EffectiveDate string           `position:"Query" name:"EffectiveDate"`
+	PricingCycle  string           `position:"Query" name:"PricingCycle"`
+}
+
+// CreateResourcePackageResponse is the response struct for api CreateResourcePackage
+type CreateResourcePackageResponse struct {
+	*responses.BaseResponse
+	RequestId string                      `json:"RequestId" xml:"RequestId"`
+	OrderId   int                         `json:"OrderId" xml:"OrderId"`
+	Success   bool                        `json:"Success" xml:"Success"`
+	Code      string                      `json:"Code" xml:"Code"`
+	Message   string                      `json:"Message" xml:"Message"`
+	Data      DataInCreateResourcePackage `json:"Data" xml:"Data"`
+}
+
+// CreateCreateResourcePackageRequest creates a request to invoke CreateResourcePackage API
+func CreateCreateResourcePackageRequest() (request *CreateResourcePackageRequest) {
+	request = &CreateResourcePackageRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("BssOpenApi", "2017-12-14", "CreateResourcePackage", "", "")
+	return
+}
+
+// CreateCreateResourcePackageResponse creates a response to parse from CreateResourcePackage response
+func CreateCreateResourcePackageResponse() (response *CreateResourcePackageResponse) {
+	response = &CreateResourcePackageResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 110 - 0
services/bssopenapi/describe_pricing_module.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"
+)
+
+// DescribePricingModule invokes the bssopenapi.DescribePricingModule API synchronously
+// api document: https://help.aliyun.com/api/bssopenapi/describepricingmodule.html
+func (client *Client) DescribePricingModule(request *DescribePricingModuleRequest) (response *DescribePricingModuleResponse, err error) {
+	response = CreateDescribePricingModuleResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DescribePricingModuleWithChan invokes the bssopenapi.DescribePricingModule API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/describepricingmodule.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribePricingModuleWithChan(request *DescribePricingModuleRequest) (<-chan *DescribePricingModuleResponse, <-chan error) {
+	responseChan := make(chan *DescribePricingModuleResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DescribePricingModule(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DescribePricingModuleWithCallback invokes the bssopenapi.DescribePricingModule API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/describepricingmodule.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribePricingModuleWithCallback(request *DescribePricingModuleRequest, callback func(response *DescribePricingModuleResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DescribePricingModuleResponse
+		var err error
+		defer close(result)
+		response, err = client.DescribePricingModule(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DescribePricingModuleRequest is the request struct for api DescribePricingModule
+type DescribePricingModuleRequest struct {
+	*requests.RpcRequest
+	ProductCode      string           `position:"Query" name:"ProductCode"`
+	SubscriptionType string           `position:"Query" name:"SubscriptionType"`
+	OwnerId          requests.Integer `position:"Query" name:"OwnerId"`
+	ProductType      string           `position:"Query" name:"ProductType"`
+}
+
+// DescribePricingModuleResponse is the response struct for api DescribePricingModule
+type DescribePricingModuleResponse 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"`
+}
+
+// CreateDescribePricingModuleRequest creates a request to invoke DescribePricingModule API
+func CreateDescribePricingModuleRequest() (request *DescribePricingModuleRequest) {
+	request = &DescribePricingModuleRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("BssOpenApi", "2017-12-14", "DescribePricingModule", "", "")
+	return
+}
+
+// CreateDescribePricingModuleResponse creates a response to parse from DescribePricingModule response
+func CreateDescribePricingModuleResponse() (response *DescribePricingModuleResponse) {
+	response = &DescribePricingModuleResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 108 - 0
services/bssopenapi/describe_resource_package_product.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"
+)
+
+// DescribeResourcePackageProduct invokes the bssopenapi.DescribeResourcePackageProduct API synchronously
+// api document: https://help.aliyun.com/api/bssopenapi/describeresourcepackageproduct.html
+func (client *Client) DescribeResourcePackageProduct(request *DescribeResourcePackageProductRequest) (response *DescribeResourcePackageProductResponse, err error) {
+	response = CreateDescribeResourcePackageProductResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DescribeResourcePackageProductWithChan invokes the bssopenapi.DescribeResourcePackageProduct API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/describeresourcepackageproduct.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeResourcePackageProductWithChan(request *DescribeResourcePackageProductRequest) (<-chan *DescribeResourcePackageProductResponse, <-chan error) {
+	responseChan := make(chan *DescribeResourcePackageProductResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DescribeResourcePackageProduct(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DescribeResourcePackageProductWithCallback invokes the bssopenapi.DescribeResourcePackageProduct API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/describeresourcepackageproduct.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeResourcePackageProductWithCallback(request *DescribeResourcePackageProductRequest, callback func(response *DescribeResourcePackageProductResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DescribeResourcePackageProductResponse
+		var err error
+		defer close(result)
+		response, err = client.DescribeResourcePackageProduct(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DescribeResourcePackageProductRequest is the request struct for api DescribeResourcePackageProduct
+type DescribeResourcePackageProductRequest struct {
+	*requests.RpcRequest
+	ProductCode string `position:"Query" name:"ProductCode"`
+}
+
+// DescribeResourcePackageProductResponse is the response struct for api DescribeResourcePackageProduct
+type DescribeResourcePackageProductResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	OrderId   int    `json:"OrderId" xml:"OrderId"`
+	Success   bool   `json:"Success" xml:"Success"`
+	Code      string `json:"Code" xml:"Code"`
+	Message   string `json:"Message" xml:"Message"`
+	Data      Data   `json:"Data" xml:"Data"`
+}
+
+// CreateDescribeResourcePackageProductRequest creates a request to invoke DescribeResourcePackageProduct API
+func CreateDescribeResourcePackageProductRequest() (request *DescribeResourcePackageProductRequest) {
+	request = &DescribeResourcePackageProductRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("BssOpenApi", "2017-12-14", "DescribeResourcePackageProduct", "", "")
+	return
+}
+
+// CreateDescribeResourcePackageProductResponse creates a response to parse from DescribeResourcePackageProduct response
+func CreateDescribeResourcePackageProductResponse() (response *DescribeResourcePackageProductResponse) {
+	response = &DescribeResourcePackageProductResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 108 - 0
services/bssopenapi/get_order_detail.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"
+)
+
+// GetOrderDetail invokes the bssopenapi.GetOrderDetail API synchronously
+// api document: https://help.aliyun.com/api/bssopenapi/getorderdetail.html
+func (client *Client) GetOrderDetail(request *GetOrderDetailRequest) (response *GetOrderDetailResponse, err error) {
+	response = CreateGetOrderDetailResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// GetOrderDetailWithChan invokes the bssopenapi.GetOrderDetail API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/getorderdetail.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetOrderDetailWithChan(request *GetOrderDetailRequest) (<-chan *GetOrderDetailResponse, <-chan error) {
+	responseChan := make(chan *GetOrderDetailResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.GetOrderDetail(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// GetOrderDetailWithCallback invokes the bssopenapi.GetOrderDetail API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/getorderdetail.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetOrderDetailWithCallback(request *GetOrderDetailRequest, callback func(response *GetOrderDetailResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *GetOrderDetailResponse
+		var err error
+		defer close(result)
+		response, err = client.GetOrderDetail(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// GetOrderDetailRequest is the request struct for api GetOrderDetail
+type GetOrderDetailRequest struct {
+	*requests.RpcRequest
+	OrderId string           `position:"Query" name:"OrderId"`
+	OwnerId requests.Integer `position:"Query" name:"OwnerId"`
+}
+
+// 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      Data   `json:"Data" xml:"Data"`
+}
+
+// CreateGetOrderDetailRequest creates a request to invoke GetOrderDetail API
+func CreateGetOrderDetailRequest() (request *GetOrderDetailRequest) {
+	request = &GetOrderDetailRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("BssOpenApi", "2017-12-14", "GetOrderDetail", "", "")
+	return
+}
+
+// CreateGetOrderDetailResponse creates a response to parse from GetOrderDetail response
+func CreateGetOrderDetailResponse() (response *GetOrderDetailResponse) {
+	response = &GetOrderDetailResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 119 - 0
services/bssopenapi/get_pay_as_you_go_price.go

@@ -0,0 +1,119 @@
+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"
+)
+
+// GetPayAsYouGoPrice invokes the bssopenapi.GetPayAsYouGoPrice API synchronously
+// api document: https://help.aliyun.com/api/bssopenapi/getpayasyougoprice.html
+func (client *Client) GetPayAsYouGoPrice(request *GetPayAsYouGoPriceRequest) (response *GetPayAsYouGoPriceResponse, err error) {
+	response = CreateGetPayAsYouGoPriceResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// GetPayAsYouGoPriceWithChan invokes the bssopenapi.GetPayAsYouGoPrice API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/getpayasyougoprice.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetPayAsYouGoPriceWithChan(request *GetPayAsYouGoPriceRequest) (<-chan *GetPayAsYouGoPriceResponse, <-chan error) {
+	responseChan := make(chan *GetPayAsYouGoPriceResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.GetPayAsYouGoPrice(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// GetPayAsYouGoPriceWithCallback invokes the bssopenapi.GetPayAsYouGoPrice API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/getpayasyougoprice.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetPayAsYouGoPriceWithCallback(request *GetPayAsYouGoPriceRequest, callback func(response *GetPayAsYouGoPriceResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *GetPayAsYouGoPriceResponse
+		var err error
+		defer close(result)
+		response, err = client.GetPayAsYouGoPrice(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// GetPayAsYouGoPriceRequest is the request struct for api GetPayAsYouGoPrice
+type GetPayAsYouGoPriceRequest struct {
+	*requests.RpcRequest
+	ProductCode      string                          `position:"Query" name:"ProductCode"`
+	SubscriptionType string                          `position:"Query" name:"SubscriptionType"`
+	ModuleList       *[]GetPayAsYouGoPriceModuleList `position:"Query" name:"ModuleList"  type:"Repeated"`
+	OwnerId          requests.Integer                `position:"Query" name:"OwnerId"`
+	Region           string                          `position:"Query" name:"Region"`
+	ProductType      string                          `position:"Query" name:"ProductType"`
+}
+
+// GetPayAsYouGoPriceModuleList is a repeated param struct in GetPayAsYouGoPriceRequest
+type GetPayAsYouGoPriceModuleList struct {
+	ModuleCode string `name:"ModuleCode"`
+	PriceType  string `name:"PriceType"`
+	Config     string `name:"Config"`
+}
+
+// GetPayAsYouGoPriceResponse is the response struct for api GetPayAsYouGoPrice
+type GetPayAsYouGoPriceResponse 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"`
+}
+
+// CreateGetPayAsYouGoPriceRequest creates a request to invoke GetPayAsYouGoPrice API
+func CreateGetPayAsYouGoPriceRequest() (request *GetPayAsYouGoPriceRequest) {
+	request = &GetPayAsYouGoPriceRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("BssOpenApi", "2017-12-14", "GetPayAsYouGoPrice", "", "")
+	return
+}
+
+// CreateGetPayAsYouGoPriceResponse creates a response to parse from GetPayAsYouGoPrice response
+func CreateGetPayAsYouGoPriceResponse() (response *GetPayAsYouGoPriceResponse) {
+	response = &GetPayAsYouGoPriceResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 113 - 0
services/bssopenapi/get_resource_package_price.go

@@ -0,0 +1,113 @@
+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"
+)
+
+// GetResourcePackagePrice invokes the bssopenapi.GetResourcePackagePrice API synchronously
+// api document: https://help.aliyun.com/api/bssopenapi/getresourcepackageprice.html
+func (client *Client) GetResourcePackagePrice(request *GetResourcePackagePriceRequest) (response *GetResourcePackagePriceResponse, err error) {
+	response = CreateGetResourcePackagePriceResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// GetResourcePackagePriceWithChan invokes the bssopenapi.GetResourcePackagePrice API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/getresourcepackageprice.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetResourcePackagePriceWithChan(request *GetResourcePackagePriceRequest) (<-chan *GetResourcePackagePriceResponse, <-chan error) {
+	responseChan := make(chan *GetResourcePackagePriceResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.GetResourcePackagePrice(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// GetResourcePackagePriceWithCallback invokes the bssopenapi.GetResourcePackagePrice API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/getresourcepackageprice.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetResourcePackagePriceWithCallback(request *GetResourcePackagePriceRequest, callback func(response *GetResourcePackagePriceResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *GetResourcePackagePriceResponse
+		var err error
+		defer close(result)
+		response, err = client.GetResourcePackagePrice(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// GetResourcePackagePriceRequest is the request struct for api GetResourcePackagePrice
+type GetResourcePackagePriceRequest struct {
+	*requests.RpcRequest
+	Duration      requests.Integer `position:"Query" name:"Duration"`
+	ProductCode   string           `position:"Query" name:"ProductCode"`
+	Specification string           `position:"Query" name:"Specification"`
+	OwnerId       requests.Integer `position:"Query" name:"OwnerId"`
+	PackageType   string           `position:"Query" name:"PackageType"`
+	EffectiveDate string           `position:"Query" name:"EffectiveDate"`
+	PricingCycle  string           `position:"Query" name:"PricingCycle"`
+}
+
+// GetResourcePackagePriceResponse is the response struct for api GetResourcePackagePrice
+type GetResourcePackagePriceResponse 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"`
+}
+
+// CreateGetResourcePackagePriceRequest creates a request to invoke GetResourcePackagePrice API
+func CreateGetResourcePackagePriceRequest() (request *GetResourcePackagePriceRequest) {
+	request = &GetResourcePackagePriceRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("BssOpenApi", "2017-12-14", "GetResourcePackagePrice", "", "")
+	return
+}
+
+// CreateGetResourcePackagePriceResponse creates a response to parse from GetResourcePackagePrice response
+func CreateGetResourcePackagePriceResponse() (response *GetResourcePackagePriceResponse) {
+	response = &GetResourcePackagePriceResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 125 - 0
services/bssopenapi/get_subscription_price.go

@@ -0,0 +1,125 @@
+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"
+)
+
+// GetSubscriptionPrice invokes the bssopenapi.GetSubscriptionPrice API synchronously
+// api document: https://help.aliyun.com/api/bssopenapi/getsubscriptionprice.html
+func (client *Client) GetSubscriptionPrice(request *GetSubscriptionPriceRequest) (response *GetSubscriptionPriceResponse, err error) {
+	response = CreateGetSubscriptionPriceResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// GetSubscriptionPriceWithChan invokes the bssopenapi.GetSubscriptionPrice API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/getsubscriptionprice.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetSubscriptionPriceWithChan(request *GetSubscriptionPriceRequest) (<-chan *GetSubscriptionPriceResponse, <-chan error) {
+	responseChan := make(chan *GetSubscriptionPriceResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.GetSubscriptionPrice(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// GetSubscriptionPriceWithCallback invokes the bssopenapi.GetSubscriptionPrice API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/getsubscriptionprice.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetSubscriptionPriceWithCallback(request *GetSubscriptionPriceRequest, callback func(response *GetSubscriptionPriceResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *GetSubscriptionPriceResponse
+		var err error
+		defer close(result)
+		response, err = client.GetSubscriptionPrice(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// GetSubscriptionPriceRequest is the request struct for api GetSubscriptionPrice
+type GetSubscriptionPriceRequest struct {
+	*requests.RpcRequest
+	ServicePeriodQuantity requests.Integer                  `position:"Query" name:"ServicePeriodQuantity"`
+	ProductCode           string                            `position:"Query" name:"ProductCode"`
+	InstanceId            string                            `position:"Query" name:"InstanceId"`
+	Quantity              requests.Integer                  `position:"Query" name:"Quantity"`
+	ServicePeriodUnit     string                            `position:"Query" name:"ServicePeriodUnit"`
+	SubscriptionType      string                            `position:"Query" name:"SubscriptionType"`
+	ModuleList            *[]GetSubscriptionPriceModuleList `position:"Query" name:"ModuleList"  type:"Repeated"`
+	OwnerId               requests.Integer                  `position:"Query" name:"OwnerId"`
+	Region                string                            `position:"Query" name:"Region"`
+	ProductType           string                            `position:"Query" name:"ProductType"`
+	OrderType             string                            `position:"Query" name:"OrderType"`
+}
+
+// GetSubscriptionPriceModuleList is a repeated param struct in GetSubscriptionPriceRequest
+type GetSubscriptionPriceModuleList struct {
+	ModuleCode   string `name:"ModuleCode"`
+	ModuleStatus string `name:"ModuleStatus"`
+	Tag          string `name:"Tag"`
+	Config       string `name:"Config"`
+}
+
+// GetSubscriptionPriceResponse is the response struct for api GetSubscriptionPrice
+type GetSubscriptionPriceResponse 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"`
+}
+
+// CreateGetSubscriptionPriceRequest creates a request to invoke GetSubscriptionPrice API
+func CreateGetSubscriptionPriceRequest() (request *GetSubscriptionPriceRequest) {
+	request = &GetSubscriptionPriceRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("BssOpenApi", "2017-12-14", "GetSubscriptionPrice", "", "")
+	return
+}
+
+// CreateGetSubscriptionPriceResponse creates a response to parse from GetSubscriptionPrice response
+func CreateGetSubscriptionPriceResponse() (response *GetSubscriptionPriceResponse) {
+	response = &GetSubscriptionPriceResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 119 - 0
services/bssopenapi/modify_instance.go

@@ -0,0 +1,119 @@
+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"
+)
+
+// ModifyInstance invokes the bssopenapi.ModifyInstance API synchronously
+// api document: https://help.aliyun.com/api/bssopenapi/modifyinstance.html
+func (client *Client) ModifyInstance(request *ModifyInstanceRequest) (response *ModifyInstanceResponse, err error) {
+	response = CreateModifyInstanceResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// ModifyInstanceWithChan invokes the bssopenapi.ModifyInstance API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/modifyinstance.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ModifyInstanceWithChan(request *ModifyInstanceRequest) (<-chan *ModifyInstanceResponse, <-chan error) {
+	responseChan := make(chan *ModifyInstanceResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.ModifyInstance(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// ModifyInstanceWithCallback invokes the bssopenapi.ModifyInstance API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/modifyinstance.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ModifyInstanceWithCallback(request *ModifyInstanceRequest, callback func(response *ModifyInstanceResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *ModifyInstanceResponse
+		var err error
+		defer close(result)
+		response, err = client.ModifyInstance(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// ModifyInstanceRequest is the request struct for api ModifyInstance
+type ModifyInstanceRequest struct {
+	*requests.RpcRequest
+	ProductCode      string                     `position:"Query" name:"ProductCode"`
+	InstanceId       string                     `position:"Query" name:"InstanceId"`
+	SubscriptionType string                     `position:"Query" name:"SubscriptionType"`
+	ModifyType       string                     `position:"Query" name:"ModifyType"`
+	Parameter        *[]ModifyInstanceParameter `position:"Query" name:"Parameter"  type:"Repeated"`
+	OwnerId          requests.Integer           `position:"Query" name:"OwnerId"`
+	ProductType      string                     `position:"Query" name:"ProductType"`
+}
+
+// ModifyInstanceParameter is a repeated param struct in ModifyInstanceRequest
+type ModifyInstanceParameter struct {
+	Code  string `name:"Code"`
+	Value string `name:"Value"`
+}
+
+// ModifyInstanceResponse is the response struct for api ModifyInstance
+type ModifyInstanceResponse 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"`
+}
+
+// CreateModifyInstanceRequest creates a request to invoke ModifyInstance API
+func CreateModifyInstanceRequest() (request *ModifyInstanceRequest) {
+	request = &ModifyInstanceRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("BssOpenApi", "2017-12-14", "ModifyInstance", "", "")
+	return
+}
+
+// CreateModifyInstanceResponse creates a response to parse from ModifyInstance response
+func CreateModifyInstanceResponse() (response *ModifyInstanceResponse) {
+	response = &ModifyInstanceResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 106 - 0
services/bssopenapi/query_account_balance.go

@@ -0,0 +1,106 @@
+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"
+)
+
+// QueryAccountBalance invokes the bssopenapi.QueryAccountBalance API synchronously
+// api document: https://help.aliyun.com/api/bssopenapi/queryaccountbalance.html
+func (client *Client) QueryAccountBalance(request *QueryAccountBalanceRequest) (response *QueryAccountBalanceResponse, err error) {
+	response = CreateQueryAccountBalanceResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// QueryAccountBalanceWithChan invokes the bssopenapi.QueryAccountBalance API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/queryaccountbalance.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryAccountBalanceWithChan(request *QueryAccountBalanceRequest) (<-chan *QueryAccountBalanceResponse, <-chan error) {
+	responseChan := make(chan *QueryAccountBalanceResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.QueryAccountBalance(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// QueryAccountBalanceWithCallback invokes the bssopenapi.QueryAccountBalance API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/queryaccountbalance.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryAccountBalanceWithCallback(request *QueryAccountBalanceRequest, callback func(response *QueryAccountBalanceResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *QueryAccountBalanceResponse
+		var err error
+		defer close(result)
+		response, err = client.QueryAccountBalance(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// QueryAccountBalanceRequest is the request struct for api QueryAccountBalance
+type QueryAccountBalanceRequest struct {
+	*requests.RpcRequest
+}
+
+// QueryAccountBalanceResponse is the response struct for api QueryAccountBalance
+type QueryAccountBalanceResponse 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"`
+}
+
+// CreateQueryAccountBalanceRequest creates a request to invoke QueryAccountBalance API
+func CreateQueryAccountBalanceRequest() (request *QueryAccountBalanceRequest) {
+	request = &QueryAccountBalanceRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryAccountBalance", "", "")
+	return
+}
+
+// CreateQueryAccountBalanceResponse creates a response to parse from QueryAccountBalance response
+func CreateQueryAccountBalanceResponse() (response *QueryAccountBalanceResponse) {
+	response = &QueryAccountBalanceResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 119 - 0
services/bssopenapi/query_available_instances.go

@@ -0,0 +1,119 @@
+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"
+)
+
+// QueryAvailableInstances invokes the bssopenapi.QueryAvailableInstances API synchronously
+// api document: https://help.aliyun.com/api/bssopenapi/queryavailableinstances.html
+func (client *Client) QueryAvailableInstances(request *QueryAvailableInstancesRequest) (response *QueryAvailableInstancesResponse, err error) {
+	response = CreateQueryAvailableInstancesResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// QueryAvailableInstancesWithChan invokes the bssopenapi.QueryAvailableInstances API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/queryavailableinstances.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryAvailableInstancesWithChan(request *QueryAvailableInstancesRequest) (<-chan *QueryAvailableInstancesResponse, <-chan error) {
+	responseChan := make(chan *QueryAvailableInstancesResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.QueryAvailableInstances(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// QueryAvailableInstancesWithCallback invokes the bssopenapi.QueryAvailableInstances API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/queryavailableinstances.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryAvailableInstancesWithCallback(request *QueryAvailableInstancesRequest, callback func(response *QueryAvailableInstancesResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *QueryAvailableInstancesResponse
+		var err error
+		defer close(result)
+		response, err = client.QueryAvailableInstances(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// QueryAvailableInstancesRequest is the request struct for api QueryAvailableInstances
+type QueryAvailableInstancesRequest struct {
+	*requests.RpcRequest
+	ProductCode      string           `position:"Query" name:"ProductCode"`
+	SubscriptionType string           `position:"Query" name:"SubscriptionType"`
+	OwnerId          requests.Integer `position:"Query" name:"OwnerId"`
+	PageNum          requests.Integer `position:"Query" name:"PageNum"`
+	EndTimeStart     string           `position:"Query" name:"EndTimeStart"`
+	ProductType      string           `position:"Query" name:"ProductType"`
+	CreateTimeEnd    string           `position:"Query" name:"CreateTimeEnd"`
+	InstanceIDs      string           `position:"Query" name:"InstanceIDs"`
+	EndTimeEnd       string           `position:"Query" name:"EndTimeEnd"`
+	PageSize         requests.Integer `position:"Query" name:"PageSize"`
+	CreateTimeStart  string           `position:"Query" name:"CreateTimeStart"`
+	Region           string           `position:"Query" name:"Region"`
+	RenewStatus      string           `position:"Query" name:"RenewStatus"`
+}
+
+// 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      Data   `json:"Data" xml:"Data"`
+}
+
+// CreateQueryAvailableInstancesRequest creates a request to invoke QueryAvailableInstances API
+func CreateQueryAvailableInstancesRequest() (request *QueryAvailableInstancesRequest) {
+	request = &QueryAvailableInstancesRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryAvailableInstances", "", "")
+	return
+}
+
+// CreateQueryAvailableInstancesResponse creates a response to parse from QueryAvailableInstances response
+func CreateQueryAvailableInstancesResponse() (response *QueryAvailableInstancesResponse) {
+	response = &QueryAvailableInstancesResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 109 - 0
services/bssopenapi/query_cash_coupons.go

@@ -0,0 +1,109 @@
+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"
+)
+
+// QueryCashCoupons invokes the bssopenapi.QueryCashCoupons API synchronously
+// api document: https://help.aliyun.com/api/bssopenapi/querycashcoupons.html
+func (client *Client) QueryCashCoupons(request *QueryCashCouponsRequest) (response *QueryCashCouponsResponse, err error) {
+	response = CreateQueryCashCouponsResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// QueryCashCouponsWithChan invokes the bssopenapi.QueryCashCoupons API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/querycashcoupons.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryCashCouponsWithChan(request *QueryCashCouponsRequest) (<-chan *QueryCashCouponsResponse, <-chan error) {
+	responseChan := make(chan *QueryCashCouponsResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.QueryCashCoupons(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// QueryCashCouponsWithCallback invokes the bssopenapi.QueryCashCoupons API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/querycashcoupons.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryCashCouponsWithCallback(request *QueryCashCouponsRequest, callback func(response *QueryCashCouponsResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *QueryCashCouponsResponse
+		var err error
+		defer close(result)
+		response, err = client.QueryCashCoupons(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// QueryCashCouponsRequest is the request struct for api QueryCashCoupons
+type QueryCashCouponsRequest struct {
+	*requests.RpcRequest
+	ExpiryTimeEnd   string           `position:"Query" name:"ExpiryTimeEnd"`
+	ExpiryTimeStart string           `position:"Query" name:"ExpiryTimeStart"`
+	EffectiveOrNot  requests.Boolean `position:"Query" name:"EffectiveOrNot"`
+}
+
+// QueryCashCouponsResponse is the response struct for api QueryCashCoupons
+type QueryCashCouponsResponse 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      DataInQueryCashCoupons `json:"Data" xml:"Data"`
+}
+
+// CreateQueryCashCouponsRequest creates a request to invoke QueryCashCoupons API
+func CreateQueryCashCouponsRequest() (request *QueryCashCouponsRequest) {
+	request = &QueryCashCouponsRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryCashCoupons", "", "")
+	return
+}
+
+// CreateQueryCashCouponsResponse creates a response to parse from QueryCashCoupons response
+func CreateQueryCashCouponsResponse() (response *QueryCashCouponsResponse) {
+	response = &QueryCashCouponsResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 112 - 0
services/bssopenapi/query_instance_gaap_cost.go

@@ -0,0 +1,112 @@
+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"
+)
+
+// QueryInstanceGaapCost invokes the bssopenapi.QueryInstanceGaapCost API synchronously
+// api document: https://help.aliyun.com/api/bssopenapi/queryinstancegaapcost.html
+func (client *Client) QueryInstanceGaapCost(request *QueryInstanceGaapCostRequest) (response *QueryInstanceGaapCostResponse, err error) {
+	response = CreateQueryInstanceGaapCostResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// QueryInstanceGaapCostWithChan invokes the bssopenapi.QueryInstanceGaapCost API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/queryinstancegaapcost.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryInstanceGaapCostWithChan(request *QueryInstanceGaapCostRequest) (<-chan *QueryInstanceGaapCostResponse, <-chan error) {
+	responseChan := make(chan *QueryInstanceGaapCostResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.QueryInstanceGaapCost(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// QueryInstanceGaapCostWithCallback invokes the bssopenapi.QueryInstanceGaapCost API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/queryinstancegaapcost.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryInstanceGaapCostWithCallback(request *QueryInstanceGaapCostRequest, callback func(response *QueryInstanceGaapCostResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *QueryInstanceGaapCostResponse
+		var err error
+		defer close(result)
+		response, err = client.QueryInstanceGaapCost(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// QueryInstanceGaapCostRequest is the request struct for api QueryInstanceGaapCost
+type QueryInstanceGaapCostRequest struct {
+	*requests.RpcRequest
+	ProductCode      string           `position:"Query" name:"ProductCode"`
+	SubscriptionType string           `position:"Query" name:"SubscriptionType"`
+	PageSize         requests.Integer `position:"Query" name:"PageSize"`
+	BillingCycle     string           `position:"Query" name:"BillingCycle"`
+	PageNum          requests.Integer `position:"Query" name:"PageNum"`
+	ProductType      string           `position:"Query" name:"ProductType"`
+}
+
+// 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      Data   `json:"Data" xml:"Data"`
+}
+
+// CreateQueryInstanceGaapCostRequest creates a request to invoke QueryInstanceGaapCost API
+func CreateQueryInstanceGaapCostRequest() (request *QueryInstanceGaapCostRequest) {
+	request = &QueryInstanceGaapCostRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryInstanceGaapCost", "", "")
+	return
+}
+
+// CreateQueryInstanceGaapCostResponse creates a response to parse from QueryInstanceGaapCost response
+func CreateQueryInstanceGaapCostResponse() (response *QueryInstanceGaapCostResponse) {
+	response = &QueryInstanceGaapCostResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 107 - 0
services/bssopenapi/query_monthly_bill.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"
+)
+
+// QueryMonthlyBill invokes the bssopenapi.QueryMonthlyBill API synchronously
+// api document: https://help.aliyun.com/api/bssopenapi/querymonthlybill.html
+func (client *Client) QueryMonthlyBill(request *QueryMonthlyBillRequest) (response *QueryMonthlyBillResponse, err error) {
+	response = CreateQueryMonthlyBillResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// QueryMonthlyBillWithChan invokes the bssopenapi.QueryMonthlyBill API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/querymonthlybill.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryMonthlyBillWithChan(request *QueryMonthlyBillRequest) (<-chan *QueryMonthlyBillResponse, <-chan error) {
+	responseChan := make(chan *QueryMonthlyBillResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.QueryMonthlyBill(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// QueryMonthlyBillWithCallback invokes the bssopenapi.QueryMonthlyBill API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/querymonthlybill.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryMonthlyBillWithCallback(request *QueryMonthlyBillRequest, callback func(response *QueryMonthlyBillResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *QueryMonthlyBillResponse
+		var err error
+		defer close(result)
+		response, err = client.QueryMonthlyBill(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// QueryMonthlyBillRequest is the request struct for api QueryMonthlyBill
+type QueryMonthlyBillRequest struct {
+	*requests.RpcRequest
+	BillingCycle string `position:"Query" name:"BillingCycle"`
+}
+
+// QueryMonthlyBillResponse is the response struct for api QueryMonthlyBill
+type QueryMonthlyBillResponse 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"`
+}
+
+// CreateQueryMonthlyBillRequest creates a request to invoke QueryMonthlyBill API
+func CreateQueryMonthlyBillRequest() (request *QueryMonthlyBillRequest) {
+	request = &QueryMonthlyBillRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryMonthlyBill", "", "")
+	return
+}
+
+// CreateQueryMonthlyBillResponse creates a response to parse from QueryMonthlyBill response
+func CreateQueryMonthlyBillResponse() (response *QueryMonthlyBillResponse) {
+	response = &QueryMonthlyBillResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 113 - 0
services/bssopenapi/query_monthly_instance_consumption.go

@@ -0,0 +1,113 @@
+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"
+)
+
+// QueryMonthlyInstanceConsumption invokes the bssopenapi.QueryMonthlyInstanceConsumption API synchronously
+// api document: https://help.aliyun.com/api/bssopenapi/querymonthlyinstanceconsumption.html
+func (client *Client) QueryMonthlyInstanceConsumption(request *QueryMonthlyInstanceConsumptionRequest) (response *QueryMonthlyInstanceConsumptionResponse, err error) {
+	response = CreateQueryMonthlyInstanceConsumptionResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// QueryMonthlyInstanceConsumptionWithChan invokes the bssopenapi.QueryMonthlyInstanceConsumption API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/querymonthlyinstanceconsumption.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryMonthlyInstanceConsumptionWithChan(request *QueryMonthlyInstanceConsumptionRequest) (<-chan *QueryMonthlyInstanceConsumptionResponse, <-chan error) {
+	responseChan := make(chan *QueryMonthlyInstanceConsumptionResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.QueryMonthlyInstanceConsumption(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// QueryMonthlyInstanceConsumptionWithCallback invokes the bssopenapi.QueryMonthlyInstanceConsumption API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/querymonthlyinstanceconsumption.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryMonthlyInstanceConsumptionWithCallback(request *QueryMonthlyInstanceConsumptionRequest, callback func(response *QueryMonthlyInstanceConsumptionResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *QueryMonthlyInstanceConsumptionResponse
+		var err error
+		defer close(result)
+		response, err = client.QueryMonthlyInstanceConsumption(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// QueryMonthlyInstanceConsumptionRequest is the request struct for api QueryMonthlyInstanceConsumption
+type QueryMonthlyInstanceConsumptionRequest struct {
+	*requests.RpcRequest
+	ProductCode      string           `position:"Query" name:"ProductCode"`
+	SubscriptionType string           `position:"Query" name:"SubscriptionType"`
+	PageSize         requests.Integer `position:"Query" name:"PageSize"`
+	BillingCycle     string           `position:"Query" name:"BillingCycle"`
+	PageNum          requests.Integer `position:"Query" name:"PageNum"`
+	OwnerId          requests.Integer `position:"Query" name:"OwnerId"`
+	ProductType      string           `position:"Query" name:"ProductType"`
+}
+
+// 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      Data   `json:"Data" xml:"Data"`
+}
+
+// CreateQueryMonthlyInstanceConsumptionRequest creates a request to invoke QueryMonthlyInstanceConsumption API
+func CreateQueryMonthlyInstanceConsumptionRequest() (request *QueryMonthlyInstanceConsumptionRequest) {
+	request = &QueryMonthlyInstanceConsumptionRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryMonthlyInstanceConsumption", "", "")
+	return
+}
+
+// CreateQueryMonthlyInstanceConsumptionResponse creates a response to parse from QueryMonthlyInstanceConsumption response
+func CreateQueryMonthlyInstanceConsumptionResponse() (response *QueryMonthlyInstanceConsumptionResponse) {
+	response = &QueryMonthlyInstanceConsumptionResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 116 - 0
services/bssopenapi/query_orders.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"
+)
+
+// QueryOrders invokes the bssopenapi.QueryOrders API synchronously
+// api document: https://help.aliyun.com/api/bssopenapi/queryorders.html
+func (client *Client) QueryOrders(request *QueryOrdersRequest) (response *QueryOrdersResponse, err error) {
+	response = CreateQueryOrdersResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// QueryOrdersWithChan invokes the bssopenapi.QueryOrders API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/queryorders.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryOrdersWithChan(request *QueryOrdersRequest) (<-chan *QueryOrdersResponse, <-chan error) {
+	responseChan := make(chan *QueryOrdersResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.QueryOrders(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// QueryOrdersWithCallback invokes the bssopenapi.QueryOrders API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/queryorders.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryOrdersWithCallback(request *QueryOrdersRequest, callback func(response *QueryOrdersResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *QueryOrdersResponse
+		var err error
+		defer close(result)
+		response, err = client.QueryOrders(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// QueryOrdersRequest is the request struct for api QueryOrders
+type QueryOrdersRequest struct {
+	*requests.RpcRequest
+	ProductCode      string           `position:"Query" name:"ProductCode"`
+	SubscriptionType string           `position:"Query" name:"SubscriptionType"`
+	PageSize         requests.Integer `position:"Query" name:"PageSize"`
+	PaymentStatus    string           `position:"Query" name:"PaymentStatus"`
+	CreateTimeStart  string           `position:"Query" name:"CreateTimeStart"`
+	PageNum          requests.Integer `position:"Query" name:"PageNum"`
+	OwnerId          requests.Integer `position:"Query" name:"OwnerId"`
+	ProductType      string           `position:"Query" name:"ProductType"`
+	OrderType        string           `position:"Query" name:"OrderType"`
+	CreateTimeEnd    string           `position:"Query" name:"CreateTimeEnd"`
+}
+
+// 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      Data   `json:"Data" xml:"Data"`
+}
+
+// CreateQueryOrdersRequest creates a request to invoke QueryOrders API
+func CreateQueryOrdersRequest() (request *QueryOrdersRequest) {
+	request = &QueryOrdersRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryOrders", "", "")
+	return
+}
+
+// CreateQueryOrdersResponse creates a response to parse from QueryOrders response
+func CreateQueryOrdersResponse() (response *QueryOrdersResponse) {
+	response = &QueryOrdersResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 109 - 0
services/bssopenapi/query_prepaid_cards.go

@@ -0,0 +1,109 @@
+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"
+)
+
+// QueryPrepaidCards invokes the bssopenapi.QueryPrepaidCards API synchronously
+// api document: https://help.aliyun.com/api/bssopenapi/queryprepaidcards.html
+func (client *Client) QueryPrepaidCards(request *QueryPrepaidCardsRequest) (response *QueryPrepaidCardsResponse, err error) {
+	response = CreateQueryPrepaidCardsResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// QueryPrepaidCardsWithChan invokes the bssopenapi.QueryPrepaidCards API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/queryprepaidcards.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryPrepaidCardsWithChan(request *QueryPrepaidCardsRequest) (<-chan *QueryPrepaidCardsResponse, <-chan error) {
+	responseChan := make(chan *QueryPrepaidCardsResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.QueryPrepaidCards(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// QueryPrepaidCardsWithCallback invokes the bssopenapi.QueryPrepaidCards API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/queryprepaidcards.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryPrepaidCardsWithCallback(request *QueryPrepaidCardsRequest, callback func(response *QueryPrepaidCardsResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *QueryPrepaidCardsResponse
+		var err error
+		defer close(result)
+		response, err = client.QueryPrepaidCards(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// QueryPrepaidCardsRequest is the request struct for api QueryPrepaidCards
+type QueryPrepaidCardsRequest struct {
+	*requests.RpcRequest
+	ExpiryTimeEnd   string           `position:"Query" name:"ExpiryTimeEnd"`
+	ExpiryTimeStart string           `position:"Query" name:"ExpiryTimeStart"`
+	EffectiveOrNot  requests.Boolean `position:"Query" name:"EffectiveOrNot"`
+}
+
+// QueryPrepaidCardsResponse is the response struct for api QueryPrepaidCards
+type QueryPrepaidCardsResponse 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      DataInQueryPrepaidCards `json:"Data" xml:"Data"`
+}
+
+// CreateQueryPrepaidCardsRequest creates a request to invoke QueryPrepaidCards API
+func CreateQueryPrepaidCardsRequest() (request *QueryPrepaidCardsRequest) {
+	request = &QueryPrepaidCardsRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryPrepaidCards", "", "")
+	return
+}
+
+// CreateQueryPrepaidCardsResponse creates a response to parse from QueryPrepaidCards response
+func CreateQueryPrepaidCardsResponse() (response *QueryPrepaidCardsResponse) {
+	response = &QueryPrepaidCardsResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 111 - 0
services/bssopenapi/query_price_list.go

@@ -0,0 +1,111 @@
+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"
+)
+
+// QueryPriceList invokes the bssopenapi.QueryPriceList API synchronously
+// api document: https://help.aliyun.com/api/bssopenapi/querypricelist.html
+func (client *Client) QueryPriceList(request *QueryPriceListRequest) (response *QueryPriceListResponse, err error) {
+	response = CreateQueryPriceListResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// QueryPriceListWithChan invokes the bssopenapi.QueryPriceList API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/querypricelist.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryPriceListWithChan(request *QueryPriceListRequest) (<-chan *QueryPriceListResponse, <-chan error) {
+	responseChan := make(chan *QueryPriceListResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.QueryPriceList(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// QueryPriceListWithCallback invokes the bssopenapi.QueryPriceList API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/querypricelist.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryPriceListWithCallback(request *QueryPriceListRequest, callback func(response *QueryPriceListResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *QueryPriceListResponse
+		var err error
+		defer close(result)
+		response, err = client.QueryPriceList(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// QueryPriceListRequest is the request struct for api QueryPriceList
+type QueryPriceListRequest struct {
+	*requests.RpcRequest
+	ModuleCode       string           `position:"Query" name:"ModuleCode"`
+	ProductCode      string           `position:"Query" name:"ProductCode"`
+	SubscriptionType string           `position:"Query" name:"SubscriptionType"`
+	OwnerId          requests.Integer `position:"Query" name:"OwnerId"`
+	ProductType      string           `position:"Query" name:"ProductType"`
+}
+
+// QueryPriceListResponse is the response struct for api QueryPriceList
+type QueryPriceListResponse 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"`
+}
+
+// CreateQueryPriceListRequest creates a request to invoke QueryPriceList API
+func CreateQueryPriceListRequest() (request *QueryPriceListRequest) {
+	request = &QueryPriceListRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryPriceList", "", "")
+	return
+}
+
+// CreateQueryPriceListResponse creates a response to parse from QueryPriceList response
+func CreateQueryPriceListResponse() (response *QueryPriceListResponse) {
+	response = &QueryPriceListResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 109 - 0
services/bssopenapi/query_product_list.go

@@ -0,0 +1,109 @@
+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"
+)
+
+// QueryProductList invokes the bssopenapi.QueryProductList API synchronously
+// api document: https://help.aliyun.com/api/bssopenapi/queryproductlist.html
+func (client *Client) QueryProductList(request *QueryProductListRequest) (response *QueryProductListResponse, err error) {
+	response = CreateQueryProductListResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// QueryProductListWithChan invokes the bssopenapi.QueryProductList API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/queryproductlist.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryProductListWithChan(request *QueryProductListRequest) (<-chan *QueryProductListResponse, <-chan error) {
+	responseChan := make(chan *QueryProductListResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.QueryProductList(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// QueryProductListWithCallback invokes the bssopenapi.QueryProductList API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/queryproductlist.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryProductListWithCallback(request *QueryProductListRequest, callback func(response *QueryProductListResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *QueryProductListResponse
+		var err error
+		defer close(result)
+		response, err = client.QueryProductList(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// QueryProductListRequest is the request struct for api QueryProductList
+type QueryProductListRequest struct {
+	*requests.RpcRequest
+	QueryTotalCount requests.Boolean `position:"Query" name:"QueryTotalCount"`
+	PageSize        requests.Integer `position:"Query" name:"PageSize"`
+	PageNum         requests.Integer `position:"Query" name:"PageNum"`
+}
+
+// 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      Data   `json:"Data" xml:"Data"`
+}
+
+// CreateQueryProductListRequest creates a request to invoke QueryProductList API
+func CreateQueryProductListRequest() (request *QueryProductListRequest) {
+	request = &QueryProductListRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryProductList", "", "")
+	return
+}
+
+// CreateQueryProductListResponse creates a response to parse from QueryProductList response
+func CreateQueryProductListResponse() (response *QueryProductListResponse) {
+	response = &QueryProductListResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 115 - 0
services/bssopenapi/query_resource_package_instances.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"
+)
+
+// QueryResourcePackageInstances invokes the bssopenapi.QueryResourcePackageInstances API synchronously
+// api document: https://help.aliyun.com/api/bssopenapi/queryresourcepackageinstances.html
+func (client *Client) QueryResourcePackageInstances(request *QueryResourcePackageInstancesRequest) (response *QueryResourcePackageInstancesResponse, err error) {
+	response = CreateQueryResourcePackageInstancesResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// QueryResourcePackageInstancesWithChan invokes the bssopenapi.QueryResourcePackageInstances API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/queryresourcepackageinstances.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryResourcePackageInstancesWithChan(request *QueryResourcePackageInstancesRequest) (<-chan *QueryResourcePackageInstancesResponse, <-chan error) {
+	responseChan := make(chan *QueryResourcePackageInstancesResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.QueryResourcePackageInstances(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// QueryResourcePackageInstancesWithCallback invokes the bssopenapi.QueryResourcePackageInstances API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/queryresourcepackageinstances.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryResourcePackageInstancesWithCallback(request *QueryResourcePackageInstancesRequest, callback func(response *QueryResourcePackageInstancesResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *QueryResourcePackageInstancesResponse
+		var err error
+		defer close(result)
+		response, err = client.QueryResourcePackageInstances(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// QueryResourcePackageInstancesRequest is the request struct for api QueryResourcePackageInstances
+type QueryResourcePackageInstancesRequest struct {
+	*requests.RpcRequest
+	ExpiryTimeEnd   string           `position:"Query" name:"ExpiryTimeEnd"`
+	ProductCode     string           `position:"Query" name:"ProductCode"`
+	PageSize        requests.Integer `position:"Query" name:"PageSize"`
+	OwnerId         requests.Integer `position:"Query" name:"OwnerId"`
+	ExpiryTimeStart string           `position:"Query" name:"ExpiryTimeStart"`
+	PageNum         requests.Integer `position:"Query" name:"PageNum"`
+}
+
+// QueryResourcePackageInstancesResponse is the response struct for api QueryResourcePackageInstances
+type QueryResourcePackageInstancesResponse 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"`
+	Page      int                                 `json:"Page" xml:"Page"`
+	PageSize  int                                 `json:"PageSize" xml:"PageSize"`
+	Total     int                                 `json:"Total" xml:"Total"`
+	Data      DataInQueryResourcePackageInstances `json:"Data" xml:"Data"`
+}
+
+// CreateQueryResourcePackageInstancesRequest creates a request to invoke QueryResourcePackageInstances API
+func CreateQueryResourcePackageInstancesRequest() (request *QueryResourcePackageInstancesRequest) {
+	request = &QueryResourcePackageInstancesRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryResourcePackageInstances", "", "")
+	return
+}
+
+// CreateQueryResourcePackageInstancesResponse creates a response to parse from QueryResourcePackageInstances response
+func CreateQueryResourcePackageInstancesResponse() (response *QueryResourcePackageInstancesResponse) {
+	response = &QueryResourcePackageInstancesResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 116 - 0
services/bssopenapi/query_settlement_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"
+)
+
+// QuerySettlementBill invokes the bssopenapi.QuerySettlementBill API synchronously
+// api document: https://help.aliyun.com/api/bssopenapi/querysettlementbill.html
+func (client *Client) QuerySettlementBill(request *QuerySettlementBillRequest) (response *QuerySettlementBillResponse, err error) {
+	response = CreateQuerySettlementBillResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// QuerySettlementBillWithChan invokes the bssopenapi.QuerySettlementBill API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/querysettlementbill.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QuerySettlementBillWithChan(request *QuerySettlementBillRequest) (<-chan *QuerySettlementBillResponse, <-chan error) {
+	responseChan := make(chan *QuerySettlementBillResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.QuerySettlementBill(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// QuerySettlementBillWithCallback invokes the bssopenapi.QuerySettlementBill API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/querysettlementbill.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QuerySettlementBillWithCallback(request *QuerySettlementBillRequest, callback func(response *QuerySettlementBillResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *QuerySettlementBillResponse
+		var err error
+		defer close(result)
+		response, err = client.QuerySettlementBill(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// QuerySettlementBillRequest is the request struct for api QuerySettlementBill
+type QuerySettlementBillRequest struct {
+	*requests.RpcRequest
+	ProductCode      string           `position:"Query" name:"ProductCode"`
+	SubscriptionType string           `position:"Query" name:"SubscriptionType"`
+	PageSize         requests.Integer `position:"Query" name:"PageSize"`
+	EndTime          string           `position:"Query" name:"EndTime"`
+	BillingCycle     string           `position:"Query" name:"BillingCycle"`
+	StartTime        string           `position:"Query" name:"StartTime"`
+	OwnerId          requests.Integer `position:"Query" name:"OwnerId"`
+	PageNum          requests.Integer `position:"Query" name:"PageNum"`
+	Type             string           `position:"Query" name:"Type"`
+	ProductType      string           `position:"Query" name:"ProductType"`
+}
+
+// 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      Data   `json:"Data" xml:"Data"`
+}
+
+// CreateQuerySettlementBillRequest creates a request to invoke QuerySettlementBill API
+func CreateQuerySettlementBillRequest() (request *QuerySettlementBillRequest) {
+	request = &QuerySettlementBillRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QuerySettlementBill", "", "")
+	return
+}
+
+// CreateQuerySettlementBillResponse creates a response to parse from QuerySettlementBill response
+func CreateQuerySettlementBillResponse() (response *QuerySettlementBillResponse) {
+	response = &QuerySettlementBillResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 112 - 0
services/bssopenapi/renew_instance.go

@@ -0,0 +1,112 @@
+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"
+)
+
+// RenewInstance invokes the bssopenapi.RenewInstance API synchronously
+// api document: https://help.aliyun.com/api/bssopenapi/renewinstance.html
+func (client *Client) RenewInstance(request *RenewInstanceRequest) (response *RenewInstanceResponse, err error) {
+	response = CreateRenewInstanceResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// RenewInstanceWithChan invokes the bssopenapi.RenewInstance API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/renewinstance.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) RenewInstanceWithChan(request *RenewInstanceRequest) (<-chan *RenewInstanceResponse, <-chan error) {
+	responseChan := make(chan *RenewInstanceResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.RenewInstance(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// RenewInstanceWithCallback invokes the bssopenapi.RenewInstance API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/renewinstance.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) RenewInstanceWithCallback(request *RenewInstanceRequest, callback func(response *RenewInstanceResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *RenewInstanceResponse
+		var err error
+		defer close(result)
+		response, err = client.RenewInstance(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// RenewInstanceRequest is the request struct for api RenewInstance
+type RenewInstanceRequest struct {
+	*requests.RpcRequest
+	ProductCode string           `position:"Query" name:"ProductCode"`
+	InstanceId  string           `position:"Query" name:"InstanceId"`
+	ClientToken string           `position:"Query" name:"ClientToken"`
+	RenewPeriod requests.Integer `position:"Query" name:"RenewPeriod"`
+	OwnerId     requests.Integer `position:"Query" name:"OwnerId"`
+	ProductType string           `position:"Query" name:"ProductType"`
+}
+
+// RenewInstanceResponse is the response struct for api RenewInstance
+type RenewInstanceResponse 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"`
+}
+
+// CreateRenewInstanceRequest creates a request to invoke RenewInstance API
+func CreateRenewInstanceRequest() (request *RenewInstanceRequest) {
+	request = &RenewInstanceRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("BssOpenApi", "2017-12-14", "RenewInstance", "", "")
+	return
+}
+
+// CreateRenewInstanceResponse creates a response to parse from RenewInstance response
+func CreateRenewInstanceResponse() (response *RenewInstanceResponse) {
+	response = &RenewInstanceResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 113 - 0
services/bssopenapi/set_renewal.go

@@ -0,0 +1,113 @@
+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"
+)
+
+// SetRenewal invokes the bssopenapi.SetRenewal API synchronously
+// api document: https://help.aliyun.com/api/bssopenapi/setrenewal.html
+func (client *Client) SetRenewal(request *SetRenewalRequest) (response *SetRenewalResponse, err error) {
+	response = CreateSetRenewalResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// SetRenewalWithChan invokes the bssopenapi.SetRenewal API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/setrenewal.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) SetRenewalWithChan(request *SetRenewalRequest) (<-chan *SetRenewalResponse, <-chan error) {
+	responseChan := make(chan *SetRenewalResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.SetRenewal(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// SetRenewalWithCallback invokes the bssopenapi.SetRenewal API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/setrenewal.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) SetRenewalWithCallback(request *SetRenewalRequest, callback func(response *SetRenewalResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *SetRenewalResponse
+		var err error
+		defer close(result)
+		response, err = client.SetRenewal(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// SetRenewalRequest is the request struct for api SetRenewal
+type SetRenewalRequest struct {
+	*requests.RpcRequest
+	ProductCode       string           `position:"Query" name:"ProductCode"`
+	InstanceIDs       string           `position:"Query" name:"InstanceIDs"`
+	SubscriptionType  string           `position:"Query" name:"SubscriptionType"`
+	RenewalStatus     string           `position:"Query" name:"RenewalStatus"`
+	RenewalPeriodUnit string           `position:"Query" name:"RenewalPeriodUnit"`
+	RenewalPeriod     requests.Integer `position:"Query" name:"RenewalPeriod"`
+	OwnerId           requests.Integer `position:"Query" name:"OwnerId"`
+	ProductType       string           `position:"Query" name:"ProductType"`
+}
+
+// SetRenewalResponse is the response struct for api SetRenewal
+type SetRenewalResponse 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"`
+}
+
+// CreateSetRenewalRequest creates a request to invoke SetRenewal API
+func CreateSetRenewalRequest() (request *SetRenewalRequest) {
+	request = &SetRenewalRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("BssOpenApi", "2017-12-14", "SetRenewal", "", "")
+	return
+}
+
+// CreateSetRenewalResponse creates a response to parse from SetRenewal response
+func CreateSetRenewalResponse() (response *SetRenewalResponse) {
+	response = &SetRenewalResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 23 - 0
services/bssopenapi/struct_attribute.go

@@ -0,0 +1,23 @@
+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.
+
+// Attribute is a nested struct in bssopenapi response
+type Attribute struct {
+	Code string `json:"Code" xml:"Code"`
+	Name string `json:"Name" xml:"Name"`
+	Unit string `json:"Unit" xml:"Unit"`
+}

+ 21 - 0
services/bssopenapi/struct_attribute_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.
+
+// AttributeList is a nested struct in bssopenapi response
+type AttributeList struct {
+	Attribute []Attribute `json:"Attribute" xml:"Attribute"`
+}

+ 23 - 0
services/bssopenapi/struct_available_duration.go

@@ -0,0 +1,23 @@
+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.
+
+// AvailableDuration is a nested struct in bssopenapi response
+type AvailableDuration struct {
+	Name  string `json:"Name" xml:"Name"`
+	Value int    `json:"Value" xml:"Value"`
+	Unit  string `json:"Unit" xml:"Unit"`
+}

+ 21 - 0
services/bssopenapi/struct_available_durations.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.
+
+// AvailableDurations is a nested struct in bssopenapi response
+type AvailableDurations struct {
+	AvailableDuration []AvailableDuration `json:"AvailableDuration" xml:"AvailableDuration"`
+}

+ 30 - 0
services/bssopenapi/struct_cash_coupon.go

@@ -0,0 +1,30 @@
+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.
+
+// CashCoupon is a nested struct in bssopenapi response
+type CashCoupon struct {
+	CashCouponId        int    `json:"CashCouponId" xml:"CashCouponId"`
+	CashCouponNo        string `json:"CashCouponNo" xml:"CashCouponNo"`
+	GrantedTime         string `json:"GrantedTime" xml:"GrantedTime"`
+	EffectiveTime       string `json:"EffectiveTime" xml:"EffectiveTime"`
+	ExpiryTime          string `json:"ExpiryTime" xml:"ExpiryTime"`
+	ApplicableProducts  string `json:"ApplicableProducts" xml:"ApplicableProducts"`
+	ApplicableScenarios string `json:"ApplicableScenarios" xml:"ApplicableScenarios"`
+	NominalValue        string `json:"NominalValue" xml:"NominalValue"`
+	Balance             string `json:"Balance" xml:"Balance"`
+	Status              string `json:"Status" xml:"Status"`
+}

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

+ 51 - 0
services/bssopenapi/struct_data.go

@@ -0,0 +1,51 @@
+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.
+
+// Data is a nested struct in bssopenapi response
+type Data struct {
+	TradePrice             float64                                `json:"TradePrice" xml:"TradePrice"`
+	HostId                 string                                 `json:"HostId" xml:"HostId"`
+	OriginalPrice          float64                                `json:"OriginalPrice" xml:"OriginalPrice"`
+	AvailableAmount        string                                 `json:"AvailableAmount" xml:"AvailableAmount"`
+	PageSize               int                                    `json:"PageSize" xml:"PageSize"`
+	MybankCreditAmount     string                                 `json:"MybankCreditAmount" xml:"MybankCreditAmount"`
+	OrderId                string                                 `json:"OrderId" xml:"OrderId"`
+	CreditAmount           string                                 `json:"CreditAmount" xml:"CreditAmount"`
+	InstanceId             string                                 `json:"InstanceId" xml:"InstanceId"`
+	TotalCount             int                                    `json:"TotalCount" xml:"TotalCount"`
+	BillingCycle           string                                 `json:"BillingCycle" xml:"BillingCycle"`
+	OutstandingAmount      float64                                `json:"OutstandingAmount" xml:"OutstandingAmount"`
+	PageNum                int                                    `json:"PageNum" xml:"PageNum"`
+	Currency               string                                 `json:"Currency" xml:"Currency"`
+	Quantity               int                                    `json:"Quantity" xml:"Quantity"`
+	AvailableCashAmount    string                                 `json:"AvailableCashAmount" xml:"AvailableCashAmount"`
+	DiscountPrice          float64                                `json:"DiscountPrice" xml:"DiscountPrice"`
+	HostName               string                                 `json:"HostName" xml:"HostName"`
+	TotalOutstandingAmount float64                                `json:"TotalOutstandingAmount" xml:"TotalOutstandingAmount"`
+	NewInvoiceAmount       float64                                `json:"NewInvoiceAmount" xml:"NewInvoiceAmount"`
+	ModuleList             ModuleList                             `json:"ModuleList" xml:"ModuleList"`
+	InstanceList           InstanceList                           `json:"InstanceList" xml:"InstanceList"`
+	AttributeList          AttributeList                          `json:"AttributeList" xml:"AttributeList"`
+	OrderList              OrderListInQueryOrders                 `json:"OrderList" xml:"OrderList"`
+	Modules                ModulesInQueryInstanceGaapCost         `json:"Modules" xml:"Modules"`
+	Items                  ItemsInQuerySettlementBill             `json:"Items" xml:"Items"`
+	Promotions             Promotions                             `json:"Promotions" xml:"Promotions"`
+	ResourcePackages       ResourcePackages                       `json:"ResourcePackages" xml:"ResourcePackages"`
+	ProductList            ProductList                            `json:"ProductList" xml:"ProductList"`
+	ModuleDetails          ModuleDetailsInGetSubscriptionPrice    `json:"ModuleDetails" xml:"ModuleDetails"`
+	PromotionDetails       PromotionDetailsInGetSubscriptionPrice `json:"PromotionDetails" xml:"PromotionDetails"`
+}

+ 22 - 0
services/bssopenapi/struct_data_in_create_resource_package.go

@@ -0,0 +1,22 @@
+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.
+
+// DataInCreateResourcePackage is a nested struct in bssopenapi response
+type DataInCreateResourcePackage struct {
+	OrderId    int    `json:"OrderId" xml:"OrderId"`
+	InstanceId string `json:"InstanceId" xml:"InstanceId"`
+}

+ 21 - 0
services/bssopenapi/struct_data_in_query_cash_coupons.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.
+
+// DataInQueryCashCoupons is a nested struct in bssopenapi response
+type DataInQueryCashCoupons struct {
+	CashCoupon []CashCoupon `json:"CashCoupon" xml:"CashCoupon"`
+}

+ 21 - 0
services/bssopenapi/struct_data_in_query_prepaid_cards.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.
+
+// DataInQueryPrepaidCards is a nested struct in bssopenapi response
+type DataInQueryPrepaidCards struct {
+	PrepaidCard []PrepaidCard `json:"PrepaidCard" xml:"PrepaidCard"`
+}

+ 25 - 0
services/bssopenapi/struct_data_in_query_resource_package_instances.go

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

+ 46 - 0
services/bssopenapi/struct_instance.go

@@ -0,0 +1,46 @@
+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.
+
+// 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"`
+}

+ 21 - 0
services/bssopenapi/struct_instance_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.
+
+// InstanceList is a nested struct in bssopenapi response
+type InstanceList struct {
+	Instance []Instance `json:"Instance" xml:"Instance"`
+}

+ 21 - 0
services/bssopenapi/struct_instances.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.
+
+// Instances is a nested struct in bssopenapi response
+type Instances struct {
+	Instance []Instance `json:"Instance" xml:"Instance"`
+}

+ 69 - 0
services/bssopenapi/struct_item.go

@@ -0,0 +1,69 @@
+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.
+
+// Item is a nested struct in bssopenapi response
+type Item struct {
+	Tax                         float64 `json:"Tax" xml:"Tax"`
+	PreviousBillingCycleBalance float64 `json:"PreviousBillingCycleBalance" xml:"PreviousBillingCycleBalance"`
+	PayerAccount                string  `json:"PayerAccount" xml:"PayerAccount"`
+	UsageStartTime              string  `json:"UsageStartTime" xml:"UsageStartTime"`
+	SuborderID                  string  `json:"SuborderID" xml:"SuborderID"`
+	SolutionCode                string  `json:"SolutionCode" xml:"SolutionCode"`
+	Promotion                   string  `json:"Promotion" xml:"Promotion"`
+	Seller                      string  `json:"Seller" xml:"Seller"`
+	PretaxAmountLocal           float64 `json:"PretaxAmountLocal" xml:"PretaxAmountLocal"`
+	OutstandingAmount           float64 `json:"OutstandingAmount" xml:"OutstandingAmount"`
+	ProductCode                 string  `json:"ProductCode" xml:"ProductCode"`
+	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"`
+	RecordID                    string  `json:"RecordID" xml:"RecordID"`
+	Config                      string  `json:"Config" xml:"Config"`
+	Status                      string  `json:"Status" xml:"Status"`
+	Item                        string  `json:"Item" xml:"Item"`
+	Region                      string  `json:"Region" xml:"Region"`
+	PaymentAmount               float64 `json:"PaymentAmount" xml:"PaymentAmount"`
+	UsageEndTime                string  `json:"UsageEndTime" xml:"UsageEndTime"`
+	SolutionID                  string  `json:"SolutionID" xml:"SolutionID"`
+	ClearedTime                 string  `json:"ClearedTime" xml:"ClearedTime"`
+	PaymentTime                 string  `json:"PaymentTime" xml:"PaymentTime"`
+	CreateTime                  string  `json:"CreateTime" xml:"CreateTime"`
+	LinkedCustomerOrderID       string  `json:"LinkedCustomerOrderID" xml:"LinkedCustomerOrderID"`
+	AfterTaxAmount              float64 `json:"AfterTaxAmount" xml:"AfterTaxAmount"`
+	ResourceGroup               string  `json:"ResourceGroup" xml:"ResourceGroup"`
+	Tag                         string  `json:"Tag" xml:"Tag"`
+	OwnerID                     string  `json:"OwnerID" xml:"OwnerID"`
+	SolutionName                string  `json:"SolutionName" xml:"SolutionName"`
+	SubscriptionType            string  `json:"SubscriptionType" xml:"SubscriptionType"`
+	DeductedByCashCoupons       float64 `json:"DeductedByCashCoupons" xml:"DeductedByCashCoupons"`
+	InvoiceNo                   string  `json:"InvoiceNo" xml:"InvoiceNo"`
+	DiscountAmount              float64 `json:"DiscountAmount" xml:"DiscountAmount"`
+	BillID                      string  `json:"BillID" xml:"BillID"`
+	PaymentCurrency             string  `json:"PaymentCurrency" xml:"PaymentCurrency"`
+	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"`
+	OrderID                     string  `json:"OrderID" xml:"OrderID"`
+	OrderType                   string  `json:"OrderType" xml:"OrderType"`
+	DeductedByCoupons           float64 `json:"DeductedByCoupons" xml:"DeductedByCoupons"`
+	ChargeDiscount              float64 `json:"ChargeDiscount" xml:"ChargeDiscount"`
+	PretaxAmount                float64 `json:"PretaxAmount" xml:"PretaxAmount"`
+}

+ 21 - 0
services/bssopenapi/struct_items_in_query_monthly_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.
+
+// ItemsInQueryMonthlyBill is a nested struct in bssopenapi response
+type ItemsInQueryMonthlyBill struct {
+	Item []Item `json:"Item" xml:"Item"`
+}

+ 21 - 0
services/bssopenapi/struct_items_in_query_monthly_instance_consumption.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.
+
+// ItemsInQueryMonthlyInstanceConsumption is a nested struct in bssopenapi response
+type ItemsInQueryMonthlyInstanceConsumption struct {
+	Item []Item `json:"Item" xml:"Item"`
+}

+ 21 - 0
services/bssopenapi/struct_items_in_query_settlement_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.
+
+// ItemsInQuerySettlementBill is a nested struct in bssopenapi response
+type ItemsInQuerySettlementBill struct {
+	Item []Item `json:"Item" xml:"Item"`
+}

+ 80 - 0
services/bssopenapi/struct_module.go

@@ -0,0 +1,80 @@
+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.
+
+// Module is a nested struct in bssopenapi response
+type Module struct {
+	MonthGaapDeductedByPrepaidCard   string     `json:"MonthGaapDeductedByPrepaidCard" xml:"MonthGaapDeductedByPrepaidCard"`
+	DeductedByCashCoupons            string     `json:"DeductedByCashCoupons" xml:"DeductedByCashCoupons"`
+	PayerAccount                     string     `json:"PayerAccount" xml:"PayerAccount"`
+	PriceUnit                        string     `json:"PriceUnit" xml:"PriceUnit"`
+	GaapPretaxAmountLocal            string     `json:"GaapPretaxAmountLocal" xml:"GaapPretaxAmountLocal"`
+	UsageStartDate                   string     `json:"UsageStartDate" xml:"UsageStartDate"`
+	MonthGaapPaymentAmount           string     `json:"MonthGaapPaymentAmount" xml:"MonthGaapPaymentAmount"`
+	OrderId                          string     `json:"OrderId" xml:"OrderId"`
+	UnallocatedDeductedByCoupons     string     `json:"UnallocatedDeductedByCoupons" xml:"UnallocatedDeductedByCoupons"`
+	ModuleName                       string     `json:"ModuleName" xml:"ModuleName"`
+	PretaxGrossAmount                string     `json:"PretaxGrossAmount" xml:"PretaxGrossAmount"`
+	PaymentAmount                    string     `json:"PaymentAmount" xml:"PaymentAmount"`
+	UnallocatedDeductedByCashCoupons string     `json:"UnallocatedDeductedByCashCoupons" xml:"UnallocatedDeductedByCashCoupons"`
+	PretaxAmount                     string     `json:"PretaxAmount" xml:"PretaxAmount"`
+	BillingCycle                     string     `json:"BillingCycle" xml:"BillingCycle"`
+	UnallocatedPricingDiscount       string     `json:"UnallocatedPricingDiscount" xml:"UnallocatedPricingDiscount"`
+	GaapPretaxGrossAmount            string     `json:"GaapPretaxGrossAmount" xml:"GaapPretaxGrossAmount"`
+	ProductCode                      string     `json:"ProductCode" xml:"ProductCode"`
+	InstanceID                       string     `json:"InstanceID" xml:"InstanceID"`
+	UnallocatedPretaxAmount          string     `json:"UnallocatedPretaxAmount" xml:"UnallocatedPretaxAmount"`
+	PriceType                        string     `json:"PriceType" xml:"PriceType"`
+	Config                           string     `json:"Config" xml:"Config"`
+	GaapPricingDiscount              string     `json:"GaapPricingDiscount" xml:"GaapPricingDiscount"`
+	AccountingUnit                   string     `json:"AccountingUnit" xml:"AccountingUnit"`
+	MonthGaapPretaxAmount            string     `json:"MonthGaapPretaxAmount" xml:"MonthGaapPretaxAmount"`
+	Region                           string     `json:"Region" xml:"Region"`
+	PricingDiscount                  string     `json:"PricingDiscount" xml:"PricingDiscount"`
+	GaapPretaxAmount                 string     `json:"GaapPretaxAmount" xml:"GaapPretaxAmount"`
+	ResourceGroup                    string     `json:"ResourceGroup" xml:"ResourceGroup"`
+	SubOrderId                       string     `json:"SubOrderId" xml:"SubOrderId"`
+	UnallocatedDeductedByPrepaidCard string     `json:"UnallocatedDeductedByPrepaidCard" xml:"UnallocatedDeductedByPrepaidCard"`
+	MonthGaapPretaxGrossAmount       string     `json:"MonthGaapPretaxGrossAmount" xml:"MonthGaapPretaxGrossAmount"`
+	UnallocatedPretaxGrossAmount     string     `json:"UnallocatedPretaxGrossAmount" xml:"UnallocatedPretaxGrossAmount"`
+	DeductedByCoupons                string     `json:"DeductedByCoupons" xml:"DeductedByCoupons"`
+	Tag                              string     `json:"Tag" xml:"Tag"`
+	OwnerID                          string     `json:"OwnerID" xml:"OwnerID"`
+	SubscriptionType                 string     `json:"SubscriptionType" xml:"SubscriptionType"`
+	PayTime                          string     `json:"PayTime" xml:"PayTime"`
+	GaapDeductedByPrepaidCard        string     `json:"GaapDeductedByPrepaidCard" xml:"GaapDeductedByPrepaidCard"`
+	ModuleCode                       string     `json:"ModuleCode" xml:"ModuleCode"`
+	MonthGaapPretaxAmountLocal       string     `json:"MonthGaapPretaxAmountLocal" xml:"MonthGaapPretaxAmountLocal"`
+	GaapDeductedByCashCoupons        string     `json:"GaapDeductedByCashCoupons" xml:"GaapDeductedByCashCoupons"`
+	DeductedByPrepaidCard            string     `json:"DeductedByPrepaidCard" xml:"DeductedByPrepaidCard"`
+	GaapDeductedByCoupons            string     `json:"GaapDeductedByCoupons" xml:"GaapDeductedByCoupons"`
+	PaymentCurrency                  string     `json:"PaymentCurrency" xml:"PaymentCurrency"`
+	UnallocatedPretaxAmountLocal     string     `json:"UnallocatedPretaxAmountLocal" xml:"UnallocatedPretaxAmountLocal"`
+	ProductType                      string     `json:"ProductType" xml:"ProductType"`
+	Currency                         string     `json:"Currency" xml:"Currency"`
+	MonthGaapPricingDiscount         string     `json:"MonthGaapPricingDiscount" xml:"MonthGaapPricingDiscount"`
+	UsageEndDate                     string     `json:"UsageEndDate" xml:"UsageEndDate"`
+	OrderType                        string     `json:"OrderType" xml:"OrderType"`
+	GaapPaymentAmount                string     `json:"GaapPaymentAmount" xml:"GaapPaymentAmount"`
+	MonthGaapDeductedByCoupons       string     `json:"MonthGaapDeductedByCoupons" xml:"MonthGaapDeductedByCoupons"`
+	PriceUnitQuantity                string     `json:"PriceUnitQuantity" xml:"PriceUnitQuantity"`
+	PretaxAmountLocal                string     `json:"PretaxAmountLocal" xml:"PretaxAmountLocal"`
+	BillType                         string     `json:"BillType" xml:"BillType"`
+	UnallocatedPaymentAmount         string     `json:"UnallocatedPaymentAmount" xml:"UnallocatedPaymentAmount"`
+	MonthGaapDeductedByCashCoupons   string     `json:"MonthGaapDeductedByCashCoupons" xml:"MonthGaapDeductedByCashCoupons"`
+	ConfigList                       ConfigList `json:"ConfigList" xml:"ConfigList"`
+	TierPrices                       TierPrices `json:"TierPrices" xml:"TierPrices"`
+}

+ 25 - 0
services/bssopenapi/struct_module_detail.go

@@ -0,0 +1,25 @@
+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.
+
+// ModuleDetail is a nested struct in bssopenapi response
+type ModuleDetail struct {
+	InvoiceDiscount   float64 `json:"InvoiceDiscount" xml:"InvoiceDiscount"`
+	UnitPrice         float64 `json:"UnitPrice" xml:"UnitPrice"`
+	OriginalCost      float64 `json:"OriginalCost" xml:"OriginalCost"`
+	CostAfterDiscount float64 `json:"CostAfterDiscount" xml:"CostAfterDiscount"`
+	ModuleCode        string  `json:"ModuleCode" xml:"ModuleCode"`
+}

+ 21 - 0
services/bssopenapi/struct_module_details_in_get_pay_as_you_go_price.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.
+
+// ModuleDetailsInGetPayAsYouGoPrice is a nested struct in bssopenapi response
+type ModuleDetailsInGetPayAsYouGoPrice struct {
+	ModuleDetail []ModuleDetail `json:"ModuleDetail" xml:"ModuleDetail"`
+}

+ 21 - 0
services/bssopenapi/struct_module_details_in_get_subscription_price.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.
+
+// ModuleDetailsInGetSubscriptionPrice is a nested struct in bssopenapi response
+type ModuleDetailsInGetSubscriptionPrice struct {
+	ModuleDetail []ModuleDetail `json:"ModuleDetail" xml:"ModuleDetail"`
+}

+ 21 - 0
services/bssopenapi/struct_module_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.
+
+// ModuleList is a nested struct in bssopenapi response
+type ModuleList struct {
+	Module []Module `json:"Module" xml:"Module"`
+}

+ 21 - 0
services/bssopenapi/struct_modules_in_query_instance_gaap_cost.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.
+
+// ModulesInQueryInstanceGaapCost is a nested struct in bssopenapi response
+type ModulesInQueryInstanceGaapCost struct {
+	Module []Module `json:"Module" xml:"Module"`
+}

+ 21 - 0
services/bssopenapi/struct_modules_in_query_price_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.
+
+// ModulesInQueryPriceList is a nested struct in bssopenapi response
+type ModulesInQueryPriceList struct {
+	Module []Module `json:"Module" xml:"Module"`
+}

+ 42 - 0
services/bssopenapi/struct_order.go

@@ -0,0 +1,42 @@
+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.
+
+// Order is a nested struct in bssopenapi response
+type Order struct {
+	Region            string `json:"Region" xml:"Region"`
+	UsageEndTime      string `json:"UsageEndTime" xml:"UsageEndTime"`
+	PaymentTime       string `json:"PaymentTime" xml:"PaymentTime"`
+	PaymentCurrency   string `json:"PaymentCurrency" xml:"PaymentCurrency"`
+	CreateTime        string `json:"CreateTime" xml:"CreateTime"`
+	ProductType       string `json:"ProductType" xml:"ProductType"`
+	PaymentStatus     string `json:"PaymentStatus" xml:"PaymentStatus"`
+	Currency          string `json:"Currency" xml:"Currency"`
+	SubOrderId        string `json:"SubOrderId" xml:"SubOrderId"`
+	ProductCode       string `json:"ProductCode" xml:"ProductCode"`
+	InstanceIDs       string `json:"InstanceIDs" xml:"InstanceIDs"`
+	AfterTaxAmount    string `json:"AfterTaxAmount" xml:"AfterTaxAmount"`
+	OrderId           string `json:"OrderId" xml:"OrderId"`
+	OrderType         string `json:"OrderType" xml:"OrderType"`
+	Quantity          string `json:"Quantity" xml:"Quantity"`
+	PretaxGrossAmount string `json:"PretaxGrossAmount" xml:"PretaxGrossAmount"`
+	PretaxAmountLocal string `json:"PretaxAmountLocal" xml:"PretaxAmountLocal"`
+	SubscriptionType  string `json:"SubscriptionType" xml:"SubscriptionType"`
+	Tax               string `json:"Tax" xml:"Tax"`
+	Config            string `json:"Config" xml:"Config"`
+	UsageStartTime    string `json:"UsageStartTime" xml:"UsageStartTime"`
+	PretaxAmount      string `json:"PretaxAmount" xml:"PretaxAmount"`
+}

+ 21 - 0
services/bssopenapi/struct_order_list_in_get_order_detail.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.
+
+// OrderListInGetOrderDetail is a nested struct in bssopenapi response
+type OrderListInGetOrderDetail struct {
+	Order []Order `json:"Order" xml:"Order"`
+}

+ 21 - 0
services/bssopenapi/struct_order_list_in_query_orders.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.
+
+// OrderListInQueryOrders is a nested struct in bssopenapi response
+type OrderListInQueryOrders struct {
+	Order []Order `json:"Order" xml:"Order"`
+}

+ 24 - 0
services/bssopenapi/struct_package_type.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.
+
+// PackageType is a nested struct in bssopenapi response
+type PackageType struct {
+	Name           string         `json:"Name" xml:"Name"`
+	Code           string         `json:"Code" xml:"Code"`
+	Properties     Properties     `json:"Properties" xml:"Properties"`
+	Specifications Specifications `json:"Specifications" xml:"Specifications"`
+}

+ 21 - 0
services/bssopenapi/struct_package_types.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.
+
+// PackageTypes is a nested struct in bssopenapi response
+type PackageTypes struct {
+	PackageType []PackageType `json:"PackageType" xml:"PackageType"`
+}

+ 30 - 0
services/bssopenapi/struct_prepaid_card.go

@@ -0,0 +1,30 @@
+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.
+
+// PrepaidCard is a nested struct in bssopenapi response
+type PrepaidCard struct {
+	PrepaidCardId       int    `json:"PrepaidCardId" xml:"PrepaidCardId"`
+	PrepaidCardNo       string `json:"PrepaidCardNo" xml:"PrepaidCardNo"`
+	GrantedTime         string `json:"GrantedTime" xml:"GrantedTime"`
+	EffectiveTime       string `json:"EffectiveTime" xml:"EffectiveTime"`
+	ExpiryTime          string `json:"ExpiryTime" xml:"ExpiryTime"`
+	ApplicableProducts  string `json:"ApplicableProducts" xml:"ApplicableProducts"`
+	ApplicableScenarios string `json:"ApplicableScenarios" xml:"ApplicableScenarios"`
+	NominalValue        string `json:"NominalValue" xml:"NominalValue"`
+	Balance             string `json:"Balance" xml:"Balance"`
+	Status              string `json:"Status" xml:"Status"`
+}

+ 24 - 0
services/bssopenapi/struct_product.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.
+
+// Product is a nested struct in bssopenapi response
+type Product struct {
+	ProductCode      string `json:"ProductCode" xml:"ProductCode"`
+	ProductName      string `json:"ProductName" xml:"ProductName"`
+	ProductType      string `json:"ProductType" xml:"ProductType"`
+	SubscriptionType string `json:"SubscriptionType" xml:"SubscriptionType"`
+}

+ 21 - 0
services/bssopenapi/struct_product_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.
+
+// ProductList is a nested struct in bssopenapi response
+type ProductList struct {
+	Product []Product `json:"Product" xml:"Product"`
+}

+ 22 - 0
services/bssopenapi/struct_promotion.go

@@ -0,0 +1,22 @@
+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.
+
+// Promotion is a nested struct in bssopenapi response
+type Promotion struct {
+	Id   int    `json:"Id" xml:"Id"`
+	Name string `json:"Name" xml:"Name"`
+}

+ 23 - 0
services/bssopenapi/struct_promotion_detail.go

@@ -0,0 +1,23 @@
+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.
+
+// PromotionDetail is a nested struct in bssopenapi response
+type PromotionDetail struct {
+	PromotionId   int    `json:"PromotionId" xml:"PromotionId"`
+	PromotionName string `json:"PromotionName" xml:"PromotionName"`
+	PromotionDesc string `json:"PromotionDesc" xml:"PromotionDesc"`
+}

+ 21 - 0
services/bssopenapi/struct_promotion_details_in_get_pay_as_you_go_price.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.
+
+// PromotionDetailsInGetPayAsYouGoPrice is a nested struct in bssopenapi response
+type PromotionDetailsInGetPayAsYouGoPrice struct {
+	PromotionDetail []PromotionDetail `json:"PromotionDetail" xml:"PromotionDetail"`
+}

+ 21 - 0
services/bssopenapi/struct_promotion_details_in_get_subscription_price.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.
+
+// PromotionDetailsInGetSubscriptionPrice is a nested struct in bssopenapi response
+type PromotionDetailsInGetSubscriptionPrice struct {
+	PromotionDetail []PromotionDetail `json:"PromotionDetail" xml:"PromotionDetail"`
+}

+ 21 - 0
services/bssopenapi/struct_promotions.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.
+
+// Promotions is a nested struct in bssopenapi response
+type Promotions struct {
+	Promotion []Promotion `json:"Promotion" xml:"Promotion"`
+}

+ 21 - 0
services/bssopenapi/struct_properties.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.
+
+// Properties is a nested struct in bssopenapi response
+type Properties struct {
+	Property []Property `json:"Property" xml:"Property"`
+}

+ 22 - 0
services/bssopenapi/struct_property.go

@@ -0,0 +1,22 @@
+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.
+
+// Property is a nested struct in bssopenapi response
+type Property struct {
+	Name  string `json:"Name" xml:"Name"`
+	Value string `json:"Value" xml:"Value"`
+}

+ 24 - 0
services/bssopenapi/struct_resource_package.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.
+
+// ResourcePackage is a nested struct in bssopenapi response
+type ResourcePackage struct {
+	ProductCode  string       `json:"ProductCode" xml:"ProductCode"`
+	ProductType  string       `json:"ProductType" xml:"ProductType"`
+	Name         string       `json:"Name" xml:"Name"`
+	PackageTypes PackageTypes `json:"PackageTypes" xml:"PackageTypes"`
+}

+ 21 - 0
services/bssopenapi/struct_resource_packages.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.
+
+// ResourcePackages is a nested struct in bssopenapi response
+type ResourcePackages struct {
+	ResourcePackage []ResourcePackage `json:"ResourcePackage" xml:"ResourcePackage"`
+}

+ 23 - 0
services/bssopenapi/struct_specification.go

@@ -0,0 +1,23 @@
+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.
+
+// Specification is a nested struct in bssopenapi response
+type Specification struct {
+	Name               string             `json:"Name" xml:"Name"`
+	Value              string             `json:"Value" xml:"Value"`
+	AvailableDurations AvailableDurations `json:"AvailableDurations" xml:"AvailableDurations"`
+}

+ 21 - 0
services/bssopenapi/struct_specifications.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.
+
+// Specifications is a nested struct in bssopenapi response
+type Specifications struct {
+	Specification []Specification `json:"Specification" xml:"Specification"`
+}

+ 27 - 0
services/bssopenapi/struct_tier_price.go

@@ -0,0 +1,27 @@
+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.
+
+// TierPrice is a nested struct in bssopenapi response
+type TierPrice struct {
+	TierStart   string `json:"TierStart" xml:"TierStart"`
+	StartSymbol string `json:"StartSymbol" xml:"StartSymbol"`
+	TierEnd     string `json:"TierEnd" xml:"TierEnd"`
+	EndSymbol   string `json:"EndSymbol" xml:"EndSymbol"`
+	TierType    string `json:"TierType" xml:"TierType"`
+	PriceType   string `json:"PriceType" xml:"PriceType"`
+	Price       string `json:"Price" xml:"Price"`
+}

+ 21 - 0
services/bssopenapi/struct_tier_prices.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.
+
+// TierPrices is a nested struct in bssopenapi response
+type TierPrices struct {
+	TierPrice []TierPrice `json:"TierPrice" xml:"TierPrice"`
+}

+ 108 - 0
services/bssopenapi/subscribe_detail.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"
+)
+
+// SubscribeDetail invokes the bssopenapi.SubscribeDetail API synchronously
+// api document: https://help.aliyun.com/api/bssopenapi/subscribedetail.html
+func (client *Client) SubscribeDetail(request *SubscribeDetailRequest) (response *SubscribeDetailResponse, err error) {
+	response = CreateSubscribeDetailResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// SubscribeDetailWithChan invokes the bssopenapi.SubscribeDetail API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/subscribedetail.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) SubscribeDetailWithChan(request *SubscribeDetailRequest) (<-chan *SubscribeDetailResponse, <-chan error) {
+	responseChan := make(chan *SubscribeDetailResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.SubscribeDetail(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// SubscribeDetailWithCallback invokes the bssopenapi.SubscribeDetail API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/subscribedetail.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) SubscribeDetailWithCallback(request *SubscribeDetailRequest, callback func(response *SubscribeDetailResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *SubscribeDetailResponse
+		var err error
+		defer close(result)
+		response, err = client.SubscribeDetail(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// SubscribeDetailRequest is the request struct for api SubscribeDetail
+type SubscribeDetailRequest struct {
+	*requests.RpcRequest
+	BucketOwnerId   requests.Integer `position:"Query" name:"BucketOwnerId"`
+	SubscribeType   *[]string        `position:"Query" name:"SubscribeType"  type:"Repeated"`
+	SubscribeBucket string           `position:"Query" name:"SubscribeBucket"`
+}
+
+// SubscribeDetailResponse is the response struct for api SubscribeDetail
+type SubscribeDetailResponse 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"`
+}
+
+// CreateSubscribeDetailRequest creates a request to invoke SubscribeDetail API
+func CreateSubscribeDetailRequest() (request *SubscribeDetailRequest) {
+	request = &SubscribeDetailRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("BssOpenApi", "2017-12-14", "SubscribeDetail", "", "")
+	return
+}
+
+// CreateSubscribeDetailResponse creates a response to parse from SubscribeDetail response
+func CreateSubscribeDetailResponse() (response *SubscribeDetailResponse) {
+	response = &SubscribeDetailResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 108 - 0
services/bssopenapi/subscribe_export_to_oss.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"
+)
+
+// SubscribeExportToOSS invokes the bssopenapi.SubscribeExportToOSS API synchronously
+// api document: https://help.aliyun.com/api/bssopenapi/subscribeexporttooss.html
+func (client *Client) SubscribeExportToOSS(request *SubscribeExportToOSSRequest) (response *SubscribeExportToOSSResponse, err error) {
+	response = CreateSubscribeExportToOSSResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// SubscribeExportToOSSWithChan invokes the bssopenapi.SubscribeExportToOSS API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/subscribeexporttooss.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) SubscribeExportToOSSWithChan(request *SubscribeExportToOSSRequest) (<-chan *SubscribeExportToOSSResponse, <-chan error) {
+	responseChan := make(chan *SubscribeExportToOSSResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.SubscribeExportToOSS(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// SubscribeExportToOSSWithCallback invokes the bssopenapi.SubscribeExportToOSS API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/subscribeexporttooss.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) SubscribeExportToOSSWithCallback(request *SubscribeExportToOSSRequest, callback func(response *SubscribeExportToOSSResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *SubscribeExportToOSSResponse
+		var err error
+		defer close(result)
+		response, err = client.SubscribeExportToOSS(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// SubscribeExportToOSSRequest is the request struct for api SubscribeExportToOSS
+type SubscribeExportToOSSRequest struct {
+	*requests.RpcRequest
+	BucketOwnerId   requests.Integer `position:"Query" name:"BucketOwnerId"`
+	SubscribeType   *[]string        `position:"Query" name:"SubscribeType"  type:"Repeated"`
+	SubscribeBucket string           `position:"Query" name:"SubscribeBucket"`
+}
+
+// SubscribeExportToOSSResponse is the response struct for api SubscribeExportToOSS
+type SubscribeExportToOSSResponse 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"`
+}
+
+// CreateSubscribeExportToOSSRequest creates a request to invoke SubscribeExportToOSS API
+func CreateSubscribeExportToOSSRequest() (request *SubscribeExportToOSSRequest) {
+	request = &SubscribeExportToOSSRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("BssOpenApi", "2017-12-14", "SubscribeExportToOSS", "", "")
+	return
+}
+
+// CreateSubscribeExportToOSSResponse creates a response to parse from SubscribeExportToOSS response
+func CreateSubscribeExportToOSSResponse() (response *SubscribeExportToOSSResponse) {
+	response = &SubscribeExportToOSSResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 105 - 0
services/bssopenapi/unsubscribe_export_to_oss.go

@@ -0,0 +1,105 @@
+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"
+)
+
+// UnsubscribeExportToOSS invokes the bssopenapi.UnsubscribeExportToOSS API synchronously
+// api document: https://help.aliyun.com/api/bssopenapi/unsubscribeexporttooss.html
+func (client *Client) UnsubscribeExportToOSS(request *UnsubscribeExportToOSSRequest) (response *UnsubscribeExportToOSSResponse, err error) {
+	response = CreateUnsubscribeExportToOSSResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// UnsubscribeExportToOSSWithChan invokes the bssopenapi.UnsubscribeExportToOSS API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/unsubscribeexporttooss.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UnsubscribeExportToOSSWithChan(request *UnsubscribeExportToOSSRequest) (<-chan *UnsubscribeExportToOSSResponse, <-chan error) {
+	responseChan := make(chan *UnsubscribeExportToOSSResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.UnsubscribeExportToOSS(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// UnsubscribeExportToOSSWithCallback invokes the bssopenapi.UnsubscribeExportToOSS API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/unsubscribeexporttooss.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UnsubscribeExportToOSSWithCallback(request *UnsubscribeExportToOSSRequest, callback func(response *UnsubscribeExportToOSSResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *UnsubscribeExportToOSSResponse
+		var err error
+		defer close(result)
+		response, err = client.UnsubscribeExportToOSS(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// UnsubscribeExportToOSSRequest is the request struct for api UnsubscribeExportToOSS
+type UnsubscribeExportToOSSRequest struct {
+	*requests.RpcRequest
+}
+
+// UnsubscribeExportToOSSResponse is the response struct for api UnsubscribeExportToOSS
+type UnsubscribeExportToOSSResponse 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"`
+}
+
+// CreateUnsubscribeExportToOSSRequest creates a request to invoke UnsubscribeExportToOSS API
+func CreateUnsubscribeExportToOSSRequest() (request *UnsubscribeExportToOSSRequest) {
+	request = &UnsubscribeExportToOSSRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("BssOpenApi", "2017-12-14", "UnsubscribeExportToOSS", "", "")
+	return
+}
+
+// CreateUnsubscribeExportToOSSResponse creates a response to parse from UnsubscribeExportToOSS response
+func CreateUnsubscribeExportToOSSResponse() (response *UnsubscribeExportToOSSResponse) {
+	response = &UnsubscribeExportToOSSResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 3 - 3
services/cbn/associate_cen_bandwidth_package.go

@@ -76,12 +76,12 @@ func (client *Client) AssociateCenBandwidthPackageWithCallback(request *Associat
 // AssociateCenBandwidthPackageRequest is the request struct for api AssociateCenBandwidthPackage
 type AssociateCenBandwidthPackageRequest struct {
 	*requests.RpcRequest
-	OwnerAccount          string           `position:"Query" name:"OwnerAccount"`
-	OwnerId               requests.Integer `position:"Query" name:"OwnerId"`
-	ResourceOwnerAccount  string           `position:"Query" name:"ResourceOwnerAccount"`
 	ResourceOwnerId       requests.Integer `position:"Query" name:"ResourceOwnerId"`
+	ResourceOwnerAccount  string           `position:"Query" name:"ResourceOwnerAccount"`
 	CenId                 string           `position:"Query" name:"CenId"`
 	CenBandwidthPackageId string           `position:"Query" name:"CenBandwidthPackageId"`
+	OwnerAccount          string           `position:"Query" name:"OwnerAccount"`
+	OwnerId               requests.Integer `position:"Query" name:"OwnerId"`
 }
 
 // AssociateCenBandwidthPackageResponse is the response struct for api AssociateCenBandwidthPackage

+ 5 - 5
services/cbn/attach_cen_child_instance.go

@@ -76,15 +76,15 @@ func (client *Client) AttachCenChildInstanceWithCallback(request *AttachCenChild
 // AttachCenChildInstanceRequest is the request struct for api AttachCenChildInstance
 type AttachCenChildInstanceRequest struct {
 	*requests.RpcRequest
-	OwnerAccount          string           `position:"Query" name:"OwnerAccount"`
-	OwnerId               requests.Integer `position:"Query" name:"OwnerId"`
-	ResourceOwnerAccount  string           `position:"Query" name:"ResourceOwnerAccount"`
+	ChildInstanceId       string           `position:"Query" name:"ChildInstanceId"`
 	ResourceOwnerId       requests.Integer `position:"Query" name:"ResourceOwnerId"`
+	ResourceOwnerAccount  string           `position:"Query" name:"ResourceOwnerAccount"`
 	CenId                 string           `position:"Query" name:"CenId"`
-	ChildInstanceId       string           `position:"Query" name:"ChildInstanceId"`
+	OwnerAccount          string           `position:"Query" name:"OwnerAccount"`
+	OwnerId               requests.Integer `position:"Query" name:"OwnerId"`
 	ChildInstanceType     string           `position:"Query" name:"ChildInstanceType"`
-	ChildInstanceRegionId string           `position:"Query" name:"ChildInstanceRegionId"`
 	ChildInstanceOwnerId  requests.Integer `position:"Query" name:"ChildInstanceOwnerId"`
+	ChildInstanceRegionId string           `position:"Query" name:"ChildInstanceRegionId"`
 }
 
 // AttachCenChildInstanceResponse is the response struct for api AttachCenChildInstance

+ 3 - 3
services/cbn/create_cen.go

@@ -76,13 +76,13 @@ func (client *Client) CreateCenWithCallback(request *CreateCenRequest, callback
 // CreateCenRequest is the request struct for api CreateCen
 type CreateCenRequest struct {
 	*requests.RpcRequest
-	OwnerAccount         string           `position:"Query" name:"OwnerAccount"`
-	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
-	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
 	ResourceOwnerId      requests.Integer `position:"Query" name:"ResourceOwnerId"`
+	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
 	ClientToken          string           `position:"Query" name:"ClientToken"`
+	OwnerAccount         string           `position:"Query" name:"OwnerAccount"`
 	Name                 string           `position:"Query" name:"Name"`
 	Description          string           `position:"Query" name:"Description"`
+	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
 }
 
 // CreateCenResponse is the response struct for api CreateCen

+ 9 - 9
services/cbn/create_cen_bandwidth_package.go

@@ -76,20 +76,20 @@ func (client *Client) CreateCenBandwidthPackageWithCallback(request *CreateCenBa
 // CreateCenBandwidthPackageRequest is the request struct for api CreateCenBandwidthPackage
 type CreateCenBandwidthPackageRequest struct {
 	*requests.RpcRequest
-	OwnerAccount               string           `position:"Query" name:"OwnerAccount"`
-	OwnerId                    requests.Integer `position:"Query" name:"OwnerId"`
-	ResourceOwnerAccount       string           `position:"Query" name:"ResourceOwnerAccount"`
+	GeographicRegionBId        string           `position:"Query" name:"GeographicRegionBId"`
 	ResourceOwnerId            requests.Integer `position:"Query" name:"ResourceOwnerId"`
+	Period                     requests.Integer `position:"Query" name:"Period"`
+	GeographicRegionAId        string           `position:"Query" name:"GeographicRegionAId"`
+	AutoPay                    requests.Boolean `position:"Query" name:"AutoPay"`
+	ResourceOwnerAccount       string           `position:"Query" name:"ResourceOwnerAccount"`
 	ClientToken                string           `position:"Query" name:"ClientToken"`
-	Name                       string           `position:"Query" name:"Name"`
-	Description                string           `position:"Query" name:"Description"`
 	Bandwidth                  requests.Integer `position:"Query" name:"Bandwidth"`
-	GeographicRegionAId        string           `position:"Query" name:"GeographicRegionAId"`
-	GeographicRegionBId        string           `position:"Query" name:"GeographicRegionBId"`
+	OwnerAccount               string           `position:"Query" name:"OwnerAccount"`
+	Description                string           `position:"Query" name:"Description"`
+	OwnerId                    requests.Integer `position:"Query" name:"OwnerId"`
 	BandwidthPackageChargeType string           `position:"Query" name:"BandwidthPackageChargeType"`
-	Period                     requests.Integer `position:"Query" name:"Period"`
+	Name                       string           `position:"Query" name:"Name"`
 	PricingCycle               string           `position:"Query" name:"PricingCycle"`
-	AutoPay                    requests.Boolean `position:"Query" name:"AutoPay"`
 }
 
 // CreateCenBandwidthPackageResponse is the response struct for api CreateCenBandwidthPackage

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików