|
|
@@ -20,24 +20,24 @@ import (
|
|
|
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
|
|
|
)
|
|
|
|
|
|
-// DescribePayInfo invokes the waf_openapi.DescribePayInfo API synchronously
|
|
|
-// api document: https://help.aliyun.com/api/waf-openapi/describepayinfo.html
|
|
|
-func (client *Client) DescribePayInfo(request *DescribePayInfoRequest) (response *DescribePayInfoResponse, err error) {
|
|
|
- response = CreateDescribePayInfoResponse()
|
|
|
+// DescribeInstanceInfo invokes the waf_openapi.DescribeInstanceInfo API synchronously
|
|
|
+// api document: https://help.aliyun.com/api/waf-openapi/describeinstanceinfo.html
|
|
|
+func (client *Client) DescribeInstanceInfo(request *DescribeInstanceInfoRequest) (response *DescribeInstanceInfoResponse, err error) {
|
|
|
+ response = CreateDescribeInstanceInfoResponse()
|
|
|
err = client.DoAction(request, response)
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-// DescribePayInfoWithChan invokes the waf_openapi.DescribePayInfo API asynchronously
|
|
|
-// api document: https://help.aliyun.com/api/waf-openapi/describepayinfo.html
|
|
|
+// DescribeInstanceInfoWithChan invokes the waf_openapi.DescribeInstanceInfo API asynchronously
|
|
|
+// api document: https://help.aliyun.com/api/waf-openapi/describeinstanceinfo.html
|
|
|
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
|
|
|
-func (client *Client) DescribePayInfoWithChan(request *DescribePayInfoRequest) (<-chan *DescribePayInfoResponse, <-chan error) {
|
|
|
- responseChan := make(chan *DescribePayInfoResponse, 1)
|
|
|
+func (client *Client) DescribeInstanceInfoWithChan(request *DescribeInstanceInfoRequest) (<-chan *DescribeInstanceInfoResponse, <-chan error) {
|
|
|
+ responseChan := make(chan *DescribeInstanceInfoResponse, 1)
|
|
|
errChan := make(chan error, 1)
|
|
|
err := client.AddAsyncTask(func() {
|
|
|
defer close(responseChan)
|
|
|
defer close(errChan)
|
|
|
- response, err := client.DescribePayInfo(request)
|
|
|
+ response, err := client.DescribeInstanceInfo(request)
|
|
|
if err != nil {
|
|
|
errChan <- err
|
|
|
} else {
|
|
|
@@ -52,16 +52,16 @@ func (client *Client) DescribePayInfoWithChan(request *DescribePayInfoRequest) (
|
|
|
return responseChan, errChan
|
|
|
}
|
|
|
|
|
|
-// DescribePayInfoWithCallback invokes the waf_openapi.DescribePayInfo API asynchronously
|
|
|
-// api document: https://help.aliyun.com/api/waf-openapi/describepayinfo.html
|
|
|
+// DescribeInstanceInfoWithCallback invokes the waf_openapi.DescribeInstanceInfo API asynchronously
|
|
|
+// api document: https://help.aliyun.com/api/waf-openapi/describeinstanceinfo.html
|
|
|
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
|
|
|
-func (client *Client) DescribePayInfoWithCallback(request *DescribePayInfoRequest, callback func(response *DescribePayInfoResponse, err error)) <-chan int {
|
|
|
+func (client *Client) DescribeInstanceInfoWithCallback(request *DescribeInstanceInfoRequest, callback func(response *DescribeInstanceInfoResponse, err error)) <-chan int {
|
|
|
result := make(chan int, 1)
|
|
|
err := client.AddAsyncTask(func() {
|
|
|
- var response *DescribePayInfoResponse
|
|
|
+ var response *DescribeInstanceInfoResponse
|
|
|
var err error
|
|
|
defer close(result)
|
|
|
- response, err = client.DescribePayInfo(request)
|
|
|
+ response, err = client.DescribeInstanceInfo(request)
|
|
|
callback(response, err)
|
|
|
result <- 1
|
|
|
})
|
|
|
@@ -73,8 +73,8 @@ func (client *Client) DescribePayInfoWithCallback(request *DescribePayInfoReques
|
|
|
return result
|
|
|
}
|
|
|
|
|
|
-// DescribePayInfoRequest is the request struct for api DescribePayInfo
|
|
|
-type DescribePayInfoRequest struct {
|
|
|
+// DescribeInstanceInfoRequest is the request struct for api DescribeInstanceInfo
|
|
|
+type DescribeInstanceInfoRequest struct {
|
|
|
*requests.RpcRequest
|
|
|
SourceIp string `position:"Query" name:"SourceIp"`
|
|
|
InstanceSource string `position:"Query" name:"InstanceSource"`
|
|
|
@@ -82,25 +82,25 @@ type DescribePayInfoRequest struct {
|
|
|
Region string `position:"Query" name:"Region"`
|
|
|
}
|
|
|
|
|
|
-// DescribePayInfoResponse is the response struct for api DescribePayInfo
|
|
|
-type DescribePayInfoResponse struct {
|
|
|
+// DescribeInstanceInfoResponse is the response struct for api DescribeInstanceInfo
|
|
|
+type DescribeInstanceInfoResponse struct {
|
|
|
*responses.BaseResponse
|
|
|
- RequestId string `json:"RequestId" xml:"RequestId"`
|
|
|
- Result Result `json:"Result" xml:"Result"`
|
|
|
+ RequestId string `json:"RequestId" xml:"RequestId"`
|
|
|
+ InstanceInfo InstanceInfo `json:"InstanceInfo" xml:"InstanceInfo"`
|
|
|
}
|
|
|
|
|
|
-// CreateDescribePayInfoRequest creates a request to invoke DescribePayInfo API
|
|
|
-func CreateDescribePayInfoRequest() (request *DescribePayInfoRequest) {
|
|
|
- request = &DescribePayInfoRequest{
|
|
|
+// CreateDescribeInstanceInfoRequest creates a request to invoke DescribeInstanceInfo API
|
|
|
+func CreateDescribeInstanceInfoRequest() (request *DescribeInstanceInfoRequest) {
|
|
|
+ request = &DescribeInstanceInfoRequest{
|
|
|
RpcRequest: &requests.RpcRequest{},
|
|
|
}
|
|
|
- request.InitWithApiInfo("waf-openapi", "2018-01-17", "DescribePayInfo", "waf", "openAPI")
|
|
|
+ request.InitWithApiInfo("waf-openapi", "2019-09-10", "DescribeInstanceInfo", "waf", "openAPI")
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-// CreateDescribePayInfoResponse creates a response to parse from DescribePayInfo response
|
|
|
-func CreateDescribePayInfoResponse() (response *DescribePayInfoResponse) {
|
|
|
- response = &DescribePayInfoResponse{
|
|
|
+// CreateDescribeInstanceInfoResponse creates a response to parse from DescribeInstanceInfo response
|
|
|
+func CreateDescribeInstanceInfoResponse() (response *DescribeInstanceInfoResponse) {
|
|
|
+ response = &DescribeInstanceInfoResponse{
|
|
|
BaseResponse: &responses.BaseResponse{},
|
|
|
}
|
|
|
return
|