Browse Source

Add filed internalDomain for api get token.

sdk-team 6 years ago
parent
commit
16c2ef3e1f

+ 3 - 0
ChangeLog.txt

@@ -1,3 +1,6 @@
+2019-07-15 Version: 1.60.66
+- Add filed `internalDomain` for api `get token`.
+
 2019-07-12 Version: 1.60.65
 - Public api AddLivePullStreamInfoConfig.
 

+ 106 - 0
services/arms/get_ip_or_hosts.go

@@ -0,0 +1,106 @@
+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"
+)
+
+// GetIpOrHosts invokes the arms.GetIpOrHosts API synchronously
+// api document: https://help.aliyun.com/api/arms/getiporhosts.html
+func (client *Client) GetIpOrHosts(request *GetIpOrHostsRequest) (response *GetIpOrHostsResponse, err error) {
+	response = CreateGetIpOrHostsResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// GetIpOrHostsWithChan invokes the arms.GetIpOrHosts API asynchronously
+// api document: https://help.aliyun.com/api/arms/getiporhosts.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetIpOrHostsWithChan(request *GetIpOrHostsRequest) (<-chan *GetIpOrHostsResponse, <-chan error) {
+	responseChan := make(chan *GetIpOrHostsResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.GetIpOrHosts(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// GetIpOrHostsWithCallback invokes the arms.GetIpOrHosts API asynchronously
+// api document: https://help.aliyun.com/api/arms/getiporhosts.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetIpOrHostsWithCallback(request *GetIpOrHostsRequest, callback func(response *GetIpOrHostsResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *GetIpOrHostsResponse
+		var err error
+		defer close(result)
+		response, err = client.GetIpOrHosts(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// GetIpOrHostsRequest is the request struct for api GetIpOrHosts
+type GetIpOrHostsRequest struct {
+	*requests.RpcRequest
+	EndTime     requests.Integer `position:"Query" name:"EndTime"`
+	ServiceName string           `position:"Query" name:"ServiceName"`
+	StartTime   requests.Integer `position:"Query" name:"StartTime"`
+}
+
+// GetIpOrHostsResponse is the response struct for api GetIpOrHosts
+type GetIpOrHostsResponse struct {
+	*responses.BaseResponse
+	RequestId string             `json:"RequestId" xml:"RequestId"`
+	Data      DataInGetIpOrHosts `json:"Data" xml:"Data"`
+}
+
+// CreateGetIpOrHostsRequest creates a request to invoke GetIpOrHosts API
+func CreateGetIpOrHostsRequest() (request *GetIpOrHostsRequest) {
+	request = &GetIpOrHostsRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("ARMS", "2019-02-19", "GetIpOrHosts", "", "")
+	return
+}
+
+// CreateGetIpOrHostsResponse creates a response to parse from GetIpOrHosts response
+func CreateGetIpOrHostsResponse() (response *GetIpOrHostsResponse) {
+	response = &GetIpOrHostsResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 104 - 0
services/arms/get_token.go

@@ -0,0 +1,104 @@
+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"
+)
+
+// GetToken invokes the arms.GetToken API synchronously
+// api document: https://help.aliyun.com/api/arms/gettoken.html
+func (client *Client) GetToken(request *GetTokenRequest) (response *GetTokenResponse, err error) {
+	response = CreateGetTokenResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// GetTokenWithChan invokes the arms.GetToken API asynchronously
+// api document: https://help.aliyun.com/api/arms/gettoken.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetTokenWithChan(request *GetTokenRequest) (<-chan *GetTokenResponse, <-chan error) {
+	responseChan := make(chan *GetTokenResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.GetToken(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// GetTokenWithCallback invokes the arms.GetToken API asynchronously
+// api document: https://help.aliyun.com/api/arms/gettoken.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetTokenWithCallback(request *GetTokenRequest, callback func(response *GetTokenResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *GetTokenResponse
+		var err error
+		defer close(result)
+		response, err = client.GetToken(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// GetTokenRequest is the request struct for api GetToken
+type GetTokenRequest struct {
+	*requests.RpcRequest
+	AppType string `position:"Query" name:"AppType"`
+}
+
+// GetTokenResponse is the response struct for api GetToken
+type GetTokenResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	Data      Data   `json:"Data" xml:"Data"`
+}
+
+// CreateGetTokenRequest creates a request to invoke GetToken API
+func CreateGetTokenRequest() (request *GetTokenRequest) {
+	request = &GetTokenRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("ARMS", "2019-02-19", "GetToken", "", "")
+	return
+}
+
+// CreateGetTokenResponse creates a response to parse from GetToken response
+func CreateGetTokenResponse() (response *GetTokenResponse) {
+	response = &GetTokenResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 1 - 1
services/arms/search_trace_count.go

@@ -76,7 +76,7 @@ func (client *Client) SearchTraceCountWithCallback(request *SearchTraceCountRequ
 // SearchTraceCountRequest is the request struct for api SearchTraceCount
 type SearchTraceCountRequest struct {
 	*requests.RpcRequest
-	InstanceId    string                 `position:"Query" name:"InstanceId"`
+	ServiceIp     string                 `position:"Query" name:"ServiceIp"`
 	OperationName string                 `position:"Query" name:"OperationName"`
 	AppType       string                 `position:"Query" name:"AppType"`
 	EndTime       requests.Integer       `position:"Query" name:"EndTime"`

+ 2 - 2
services/arms/struct_call_chain_info.go

@@ -19,10 +19,10 @@ package arms
 type CallChainInfo struct {
 	TraceID       string                 `json:"TraceID" xml:"TraceID"`
 	OperationName string                 `json:"OperationName" xml:"OperationName"`
-	Duration      int                    `json:"Duration" xml:"Duration"`
+	Duration      int64                  `json:"Duration" xml:"Duration"`
 	ServiceName   string                 `json:"ServiceName" xml:"ServiceName"`
 	ServiceIp     string                 `json:"ServiceIp" xml:"ServiceIp"`
-	Timestamp     int                    `json:"Timestamp" xml:"Timestamp"`
+	Timestamp     int64                  `json:"Timestamp" xml:"Timestamp"`
 	RpcId         string                 `json:"RpcId" xml:"RpcId"`
 	ResultCode    string                 `json:"ResultCode" xml:"ResultCode"`
 	HaveStack     bool                   `json:"HaveStack" xml:"HaveStack"`

+ 7 - 3
services/arms/struct_data.go

@@ -17,7 +17,11 @@ package arms
 
 // Data is a nested struct in arms response
 type Data struct {
-	Count    int      `json:"Count" xml:"Count"`
-	Services Services `json:"Services" xml:"Services"`
-	Details  Details  `json:"Details" xml:"Details"`
+	Domain         string   `json:"Domain" xml:"Domain"`
+	LicenseKey     string   `json:"LicenseKey" xml:"LicenseKey"`
+	InternalDomain string   `json:"InternalDomain" xml:"InternalDomain"`
+	Pid            string   `json:"Pid" xml:"Pid"`
+	Count          int64    `json:"Count" xml:"Count"`
+	Services       Services `json:"Services" xml:"Services"`
+	Details        Details  `json:"Details" xml:"Details"`
 }

+ 21 - 0
services/arms/struct_data_in_get_ip_or_hosts.go

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

+ 1 - 1
services/arms/struct_log_event.go

@@ -17,6 +17,6 @@ package arms
 
 // LogEvent is a nested struct in arms response
 type LogEvent struct {
-	Timestamp    int                    `json:"Timestamp" xml:"Timestamp"`
+	Timestamp    int64                  `json:"Timestamp" xml:"Timestamp"`
 	TagEntryList TagEntryListInGetTrace `json:"TagEntryList" xml:"TagEntryList"`
 }

+ 1 - 1
services/arms/struct_trace_info.go

@@ -22,5 +22,5 @@ type TraceInfo struct {
 	Duration      int    `json:"Duration" xml:"Duration"`
 	ServiceName   string `json:"ServiceName" xml:"ServiceName"`
 	ServiceIp     string `json:"ServiceIp" xml:"ServiceIp"`
-	Timestamp     int    `json:"Timestamp" xml:"Timestamp"`
+	Timestamp     int64  `json:"Timestamp" xml:"Timestamp"`
 }