فهرست منبع

BSSOPENAPI SDK Auto Released By xiaocun.zxc,Version:1.56.14

Signed-off-by: haowei.yao <haowei.yao@alibaba-inc.com>
haowei.yao 6 سال پیش
والد
کامیت
95deed3548

+ 5 - 0
ChangeLog.txt

@@ -1,3 +1,8 @@
+2019-04-22 Version: 1.56.14
+1, This is an example of release-log.
+2, Please strictly follow this format to edit in English.
+3, Format:Number + , + Space + Description
+
 2019-04-22 Version: 1.56.13
 1, Add CreateDBCluster interface;
 2, Add CreateDBNodes interface;

+ 28 - 5
services/bssopenapi/client.go

@@ -18,6 +18,7 @@ package bssopenapi
 import (
 	"github.com/aliyun/alibaba-cloud-sdk-go/sdk"
 	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth/credentials/provider"
 )
 
 // Client is the sdk client struct, each func corresponds to an OpenAPI
@@ -32,6 +33,20 @@ func NewClient() (client *Client, err error) {
 	return
 }
 
+// NewClientWithProvider creates a sdk client with providers
+// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
+func NewClientWithProvider(regionId string, providers ...provider.Provider) (client *Client, err error) {
+	client = &Client{}
+	var pc provider.Provider
+	if len(providers) == 0 {
+		pc = provider.DefaultChain
+	} else {
+		pc = provider.NewProviderChain(providers)
+	}
+	err = client.InitWithProviderChain(regionId, pc)
+	return
+}
+
 // NewClientWithOptions creates a sdk client with regionId/sdkConfig/credential
 // this is the common api to create a sdk client
 func NewClientWithOptions(regionId string, config *sdk.Config, credential auth.Credential) (client *Client, err error) {
@@ -41,7 +56,7 @@ func NewClientWithOptions(regionId string, config *sdk.Config, credential auth.C
 }
 
 // NewClientWithAccessKey is a shortcut to create sdk client with accesskey
-// usage: https://help.aliyun.com/document_detail/66217.html
+// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
 func NewClientWithAccessKey(regionId, accessKeyId, accessKeySecret string) (client *Client, err error) {
 	client = &Client{}
 	err = client.InitWithAccessKey(regionId, accessKeyId, accessKeySecret)
@@ -49,7 +64,7 @@ func NewClientWithAccessKey(regionId, accessKeyId, accessKeySecret string) (clie
 }
 
 // NewClientWithStsToken is a shortcut to create sdk client with sts token
-// usage: https://help.aliyun.com/document_detail/66222.html
+// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
 func NewClientWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToken string) (client *Client, err error) {
 	client = &Client{}
 	err = client.InitWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToken)
@@ -57,15 +72,23 @@ func NewClientWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToke
 }
 
 // NewClientWithRamRoleArn is a shortcut to create sdk client with ram roleArn
-// usage: https://help.aliyun.com/document_detail/66222.html
+// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
 func NewClientWithRamRoleArn(regionId string, accessKeyId, accessKeySecret, roleArn, roleSessionName string) (client *Client, err error) {
 	client = &Client{}
 	err = client.InitWithRamRoleArn(regionId, accessKeyId, accessKeySecret, roleArn, roleSessionName)
 	return
 }
 
+// NewClientWithRamRoleArn is a shortcut to create sdk client with ram roleArn and policy
+// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
+func NewClientWithRamRoleArnAndPolicy(regionId string, accessKeyId, accessKeySecret, roleArn, roleSessionName, policy string) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithRamRoleArnAndPolicy(regionId, accessKeyId, accessKeySecret, roleArn, roleSessionName, policy)
+	return
+}
+
 // NewClientWithEcsRamRole is a shortcut to create sdk client with ecs ram role
-// usage: https://help.aliyun.com/document_detail/66223.html
+// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
 func NewClientWithEcsRamRole(regionId string, roleName string) (client *Client, err error) {
 	client = &Client{}
 	err = client.InitWithEcsRamRole(regionId, roleName)
@@ -73,7 +96,7 @@ func NewClientWithEcsRamRole(regionId string, roleName string) (client *Client,
 }
 
 // NewClientWithRsaKeyPair is a shortcut to create sdk client with rsa key pair
-// attention: rsa key pair auth is only Japan regions available
+// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
 func NewClientWithRsaKeyPair(regionId string, publicKeyId, privateKey string, sessionExpiration int) (client *Client, err error) {
 	client = &Client{}
 	err = client.InitWithRsaKeyPair(regionId, publicKeyId, privateKey, sessionExpiration)

+ 0 - 2
services/bssopenapi/query_evaluate_list.go

@@ -80,7 +80,6 @@ type QueryEvaluateListRequest struct {
 	OutBizId        string           `position:"Query" name:"OutBizId"`
 	SortType        requests.Integer `position:"Query" name:"SortType"`
 	BizTypeList     *[]string        `position:"Query" name:"BizTypeList"  type:"Repeated"`
-	CallerBid       requests.Integer `position:"Query" name:"callerBid"`
 	Type            requests.Integer `position:"Query" name:"Type"`
 	OwnerId         requests.Integer `position:"Query" name:"OwnerId"`
 	PageNum         requests.Integer `position:"Query" name:"PageNum"`
@@ -91,7 +90,6 @@ type QueryEvaluateListRequest struct {
 	BillCycle       string           `position:"Query" name:"BillCycle"`
 	StartAmount     requests.Integer `position:"Query" name:"StartAmount"`
 	StartBizTime    string           `position:"Query" name:"StartBizTime"`
-	CallerUid       requests.Integer `position:"Query" name:"callerUid"`
 }
 
 // QueryEvaluateListResponse is the response struct for api QueryEvaluateList

+ 1 - 3
services/bssopenapi/query_invoicing_customer_list.go

@@ -76,9 +76,7 @@ func (client *Client) QueryInvoicingCustomerListWithCallback(request *QueryInvoi
 // QueryInvoicingCustomerListRequest is the request struct for api QueryInvoicingCustomerList
 type QueryInvoicingCustomerListRequest struct {
 	*requests.RpcRequest
-	CallerBid requests.Integer `position:"Query" name:"callerBid"`
-	OwnerId   requests.Integer `position:"Query" name:"OwnerId"`
-	CallerUid requests.Integer `position:"Query" name:"callerUid"`
+	OwnerId requests.Integer `position:"Query" name:"OwnerId"`
 }
 
 // QueryInvoicingCustomerListResponse is the response struct for api QueryInvoicingCustomerList

+ 113 - 0
services/bssopenapi/query_user_oms_data.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"
+)
+
+// QueryUserOmsData invokes the bssopenapi.QueryUserOmsData API synchronously
+// api document: https://help.aliyun.com/api/bssopenapi/queryuseromsdata.html
+func (client *Client) QueryUserOmsData(request *QueryUserOmsDataRequest) (response *QueryUserOmsDataResponse, err error) {
+	response = CreateQueryUserOmsDataResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// QueryUserOmsDataWithChan invokes the bssopenapi.QueryUserOmsData API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/queryuseromsdata.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryUserOmsDataWithChan(request *QueryUserOmsDataRequest) (<-chan *QueryUserOmsDataResponse, <-chan error) {
+	responseChan := make(chan *QueryUserOmsDataResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.QueryUserOmsData(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// QueryUserOmsDataWithCallback invokes the bssopenapi.QueryUserOmsData API asynchronously
+// api document: https://help.aliyun.com/api/bssopenapi/queryuseromsdata.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryUserOmsDataWithCallback(request *QueryUserOmsDataRequest, callback func(response *QueryUserOmsDataResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *QueryUserOmsDataResponse
+		var err error
+		defer close(result)
+		response, err = client.QueryUserOmsData(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// QueryUserOmsDataRequest is the request struct for api QueryUserOmsData
+type QueryUserOmsDataRequest struct {
+	*requests.RpcRequest
+	DataType  string           `position:"Query" name:"DataType"`
+	Marker    string           `position:"Query" name:"Marker"`
+	PageSize  requests.Integer `position:"Query" name:"PageSize"`
+	EndTime   string           `position:"Query" name:"EndTime"`
+	StartTime string           `position:"Query" name:"StartTime"`
+	OwnerId   requests.Integer `position:"Query" name:"OwnerId"`
+	Table     string           `position:"Query" name:"Table"`
+}
+
+// QueryUserOmsDataResponse is the response struct for api QueryUserOmsData
+type QueryUserOmsDataResponse 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      DataInQueryUserOmsData `json:"Data" xml:"Data"`
+}
+
+// CreateQueryUserOmsDataRequest creates a request to invoke QueryUserOmsData API
+func CreateQueryUserOmsDataRequest() (request *QueryUserOmsDataRequest) {
+	request = &QueryUserOmsDataRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryUserOmsData", "", "")
+	return
+}
+
+// CreateQueryUserOmsDataResponse creates a response to parse from QueryUserOmsData response
+func CreateQueryUserOmsDataResponse() (response *QueryUserOmsDataResponse) {
+	response = &QueryUserOmsDataResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 1 - 0
services/bssopenapi/struct_customer_invoice.go

@@ -37,4 +37,5 @@ type CustomerInvoice struct {
 	TitleChangeInstructions string `json:"TitleChangeInstructions" xml:"TitleChangeInstructions"`
 	IssueType               int    `json:"IssueType" xml:"IssueType"`
 	Type                    int    `json:"Type" xml:"Type"`
+	DefaultRemark           string `json:"DefaultRemark" xml:"DefaultRemark"`
 }

+ 56 - 52
services/bssopenapi/struct_data.go

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

+ 23 - 0
services/bssopenapi/struct_data_in_query_user_oms_data.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.
+
+// DataInQueryUserOmsData is a nested struct in bssopenapi response
+type DataInQueryUserOmsData struct {
+	Marker  string   `json:"Marker" xml:"Marker"`
+	HostId  string   `json:"HostId" xml:"HostId"`
+	OmsData []string `json:"OmsData" xml:"OmsData"`
+}

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

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

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