Forráskód Böngészése

CMS SDK Auto Released By kun.dang,Version:1.60.21

Signed-off-by: sdk-team <sdk-team@alibabacloud.com>
sdk-team 6 éve
szülő
commit
d471c41f6e

+ 4 - 0
ChangeLog.txt

@@ -1,3 +1,7 @@
+2019-05-24 Version: 1.60.21
+1, The list of site monitoring probes adds ISP and city fields in English.
+2, Fixed the capitalization problem of Describe MetricData and Describe Site Monitor Statistics API metricName.
+
 2019-05-23 Version: 1.60.20
 1, Fixed bug of the JSON list in GO sdk.
 

+ 108 - 0
services/cms/delete_metric_rule_targets.go

@@ -0,0 +1,108 @@
+package cms
+
+//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"
+)
+
+// DeleteMetricRuleTargets invokes the cms.DeleteMetricRuleTargets API synchronously
+// api document: https://help.aliyun.com/api/cms/deletemetricruletargets.html
+func (client *Client) DeleteMetricRuleTargets(request *DeleteMetricRuleTargetsRequest) (response *DeleteMetricRuleTargetsResponse, err error) {
+	response = CreateDeleteMetricRuleTargetsResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DeleteMetricRuleTargetsWithChan invokes the cms.DeleteMetricRuleTargets API asynchronously
+// api document: https://help.aliyun.com/api/cms/deletemetricruletargets.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteMetricRuleTargetsWithChan(request *DeleteMetricRuleTargetsRequest) (<-chan *DeleteMetricRuleTargetsResponse, <-chan error) {
+	responseChan := make(chan *DeleteMetricRuleTargetsResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DeleteMetricRuleTargets(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DeleteMetricRuleTargetsWithCallback invokes the cms.DeleteMetricRuleTargets API asynchronously
+// api document: https://help.aliyun.com/api/cms/deletemetricruletargets.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteMetricRuleTargetsWithCallback(request *DeleteMetricRuleTargetsRequest, callback func(response *DeleteMetricRuleTargetsResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DeleteMetricRuleTargetsResponse
+		var err error
+		defer close(result)
+		response, err = client.DeleteMetricRuleTargets(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DeleteMetricRuleTargetsRequest is the request struct for api DeleteMetricRuleTargets
+type DeleteMetricRuleTargetsRequest struct {
+	*requests.RpcRequest
+	TargetIds *[]string `position:"Query" name:"TargetIds"  type:"Repeated"`
+	RuleId    string    `position:"Query" name:"RuleId"`
+}
+
+// DeleteMetricRuleTargetsResponse is the response struct for api DeleteMetricRuleTargets
+type DeleteMetricRuleTargetsResponse struct {
+	*responses.BaseResponse
+	Success   bool    `json:"Success" xml:"Success"`
+	Code      string  `json:"Code" xml:"Code"`
+	Message   string  `json:"Message" xml:"Message"`
+	RequestId string  `json:"RequestId" xml:"RequestId"`
+	FailIds   FailIds `json:"FailIds" xml:"FailIds"`
+}
+
+// CreateDeleteMetricRuleTargetsRequest creates a request to invoke DeleteMetricRuleTargets API
+func CreateDeleteMetricRuleTargetsRequest() (request *DeleteMetricRuleTargetsRequest) {
+	request = &DeleteMetricRuleTargetsRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Cms", "2019-01-01", "DeleteMetricRuleTargets", "cms", "openAPI")
+	return
+}
+
+// CreateDeleteMetricRuleTargetsResponse creates a response to parse from DeleteMetricRuleTargets response
+func CreateDeleteMetricRuleTargetsResponse() (response *DeleteMetricRuleTargetsResponse) {
+	response = &DeleteMetricRuleTargetsResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 106 - 0
services/cms/describe_metric_rule_targets.go

@@ -0,0 +1,106 @@
+package cms
+
+//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"
+)
+
+// DescribeMetricRuleTargets invokes the cms.DescribeMetricRuleTargets API synchronously
+// api document: https://help.aliyun.com/api/cms/describemetricruletargets.html
+func (client *Client) DescribeMetricRuleTargets(request *DescribeMetricRuleTargetsRequest) (response *DescribeMetricRuleTargetsResponse, err error) {
+	response = CreateDescribeMetricRuleTargetsResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DescribeMetricRuleTargetsWithChan invokes the cms.DescribeMetricRuleTargets API asynchronously
+// api document: https://help.aliyun.com/api/cms/describemetricruletargets.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeMetricRuleTargetsWithChan(request *DescribeMetricRuleTargetsRequest) (<-chan *DescribeMetricRuleTargetsResponse, <-chan error) {
+	responseChan := make(chan *DescribeMetricRuleTargetsResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DescribeMetricRuleTargets(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DescribeMetricRuleTargetsWithCallback invokes the cms.DescribeMetricRuleTargets API asynchronously
+// api document: https://help.aliyun.com/api/cms/describemetricruletargets.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeMetricRuleTargetsWithCallback(request *DescribeMetricRuleTargetsRequest, callback func(response *DescribeMetricRuleTargetsResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DescribeMetricRuleTargetsResponse
+		var err error
+		defer close(result)
+		response, err = client.DescribeMetricRuleTargets(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DescribeMetricRuleTargetsRequest is the request struct for api DescribeMetricRuleTargets
+type DescribeMetricRuleTargetsRequest struct {
+	*requests.RpcRequest
+	RuleId string `position:"Query" name:"RuleId"`
+}
+
+// DescribeMetricRuleTargetsResponse is the response struct for api DescribeMetricRuleTargets
+type DescribeMetricRuleTargetsResponse struct {
+	*responses.BaseResponse
+	Code      string                             `json:"Code" xml:"Code"`
+	Message   string                             `json:"Message" xml:"Message"`
+	RequestId string                             `json:"RequestId" xml:"RequestId"`
+	Targets   TargetsInDescribeMetricRuleTargets `json:"Targets" xml:"Targets"`
+}
+
+// CreateDescribeMetricRuleTargetsRequest creates a request to invoke DescribeMetricRuleTargets API
+func CreateDescribeMetricRuleTargetsRequest() (request *DescribeMetricRuleTargetsRequest) {
+	request = &DescribeMetricRuleTargetsRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Cms", "2019-01-01", "DescribeMetricRuleTargets", "cms", "openAPI")
+	return
+}
+
+// CreateDescribeMetricRuleTargetsResponse creates a response to parse from DescribeMetricRuleTargets response
+func CreateDescribeMetricRuleTargetsResponse() (response *DescribeMetricRuleTargetsResponse) {
+	response = &DescribeMetricRuleTargetsResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 1 - 1
services/cms/describe_site_monitor_data.go

@@ -82,7 +82,7 @@ type DescribeSiteMonitorDataRequest struct {
 	EndTime    string           `position:"Query" name:"EndTime"`
 	StartTime  string           `position:"Query" name:"StartTime"`
 	Type       string           `position:"Query" name:"Type"`
-	MetricName string           `position:"Query" name:"metricName"`
+	MetricName string           `position:"Query" name:"MetricName"`
 	TaskId     string           `position:"Query" name:"TaskId"`
 }
 

+ 1 - 0
services/cms/describe_site_monitor_statistics.go

@@ -77,6 +77,7 @@ func (client *Client) DescribeSiteMonitorStatisticsWithCallback(request *Describ
 type DescribeSiteMonitorStatisticsRequest struct {
 	*requests.RpcRequest
 	TimeRange  string `position:"Query" name:"TimeRange"`
+	StartTime  string `position:"Query" name:"StartTime"`
 	MetricName string `position:"Query" name:"MetricName"`
 	TaskId     string `position:"Query" name:"TaskId"`
 }

+ 115 - 0
services/cms/put_metric_rule_targets.go

@@ -0,0 +1,115 @@
+package cms
+
+//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"
+)
+
+// PutMetricRuleTargets invokes the cms.PutMetricRuleTargets API synchronously
+// api document: https://help.aliyun.com/api/cms/putmetricruletargets.html
+func (client *Client) PutMetricRuleTargets(request *PutMetricRuleTargetsRequest) (response *PutMetricRuleTargetsResponse, err error) {
+	response = CreatePutMetricRuleTargetsResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// PutMetricRuleTargetsWithChan invokes the cms.PutMetricRuleTargets API asynchronously
+// api document: https://help.aliyun.com/api/cms/putmetricruletargets.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) PutMetricRuleTargetsWithChan(request *PutMetricRuleTargetsRequest) (<-chan *PutMetricRuleTargetsResponse, <-chan error) {
+	responseChan := make(chan *PutMetricRuleTargetsResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.PutMetricRuleTargets(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// PutMetricRuleTargetsWithCallback invokes the cms.PutMetricRuleTargets API asynchronously
+// api document: https://help.aliyun.com/api/cms/putmetricruletargets.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) PutMetricRuleTargetsWithCallback(request *PutMetricRuleTargetsRequest, callback func(response *PutMetricRuleTargetsResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *PutMetricRuleTargetsResponse
+		var err error
+		defer close(result)
+		response, err = client.PutMetricRuleTargets(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// PutMetricRuleTargetsRequest is the request struct for api PutMetricRuleTargets
+type PutMetricRuleTargetsRequest struct {
+	*requests.RpcRequest
+	RuleId  string                         `position:"Query" name:"RuleId"`
+	Targets *[]PutMetricRuleTargetsTargets `position:"Query" name:"Targets"  type:"Repeated"`
+}
+
+// PutMetricRuleTargetsTargets is a repeated param struct in PutMetricRuleTargetsRequest
+type PutMetricRuleTargetsTargets struct {
+	Level string `name:"Level"`
+	Id    string `name:"Id"`
+	Arn   string `name:"Arn"`
+}
+
+// PutMetricRuleTargetsResponse is the response struct for api PutMetricRuleTargets
+type PutMetricRuleTargetsResponse struct {
+	*responses.BaseResponse
+	Success   bool     `json:"Success" xml:"Success"`
+	Code      string   `json:"Code" xml:"Code"`
+	Message   string   `json:"Message" xml:"Message"`
+	RequestId string   `json:"RequestId" xml:"RequestId"`
+	FailData  FailData `json:"FailData" xml:"FailData"`
+}
+
+// CreatePutMetricRuleTargetsRequest creates a request to invoke PutMetricRuleTargets API
+func CreatePutMetricRuleTargetsRequest() (request *PutMetricRuleTargetsRequest) {
+	request = &PutMetricRuleTargetsRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Cms", "2019-01-01", "PutMetricRuleTargets", "cms", "openAPI")
+	return
+}
+
+// CreatePutMetricRuleTargetsResponse creates a response to parse from PutMetricRuleTargets response
+func CreatePutMetricRuleTargetsResponse() (response *PutMetricRuleTargetsResponse) {
+	response = &PutMetricRuleTargetsResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 1 - 0
services/cms/struct_alarm.go

@@ -26,6 +26,7 @@ type Alarm struct {
 	RuleId              string      `json:"RuleId" xml:"RuleId"`
 	ComparisonOperator  string      `json:"ComparisonOperator" xml:"ComparisonOperator"`
 	MailSubject         string      `json:"MailSubject" xml:"MailSubject"`
+	SourceType          string      `json:"SourceType" xml:"SourceType"`
 	EnableState         bool        `json:"EnableState" xml:"EnableState"`
 	GroupId             string      `json:"GroupId" xml:"GroupId"`
 	EvaluationCount     string      `json:"EvaluationCount" xml:"EvaluationCount"`

+ 21 - 0
services/cms/struct_fail_data.go

@@ -0,0 +1,21 @@
+package cms
+
+//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.
+
+// FailData is a nested struct in cms response
+type FailData struct {
+	Targets TargetsInPutMetricRuleTargets `json:"Targets" xml:"Targets"`
+}

+ 21 - 0
services/cms/struct_fail_ids.go

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

+ 4 - 0
services/cms/struct_isp_city.go

@@ -21,8 +21,12 @@ type IspCity struct {
 	CityNameZhCN string `json:"CityName.zh_CN" xml:"CityName.zh_CN"`
 	IspName      string `json:"IspName" xml:"IspName"`
 	RegionZhCN   string `json:"Region.zh_CN" xml:"Region.zh_CN"`
+	IspNameEn    string `json:"IspName.en" xml:"IspName.en"`
+	CountryEn    string `json:"Country.en" xml:"Country.en"`
 	CountryZhCN  string `json:"Country.zh_CN" xml:"Country.zh_CN"`
+	CityNameEn   string `json:"CityName.en" xml:"CityName.en"`
 	Isp          string `json:"Isp" xml:"Isp"`
+	RegionEn     string `json:"Region.en" xml:"Region.en"`
 	CityName     string `json:"CityName" xml:"CityName"`
 	City         string `json:"City" xml:"City"`
 }

+ 23 - 0
services/cms/struct_target.go

@@ -0,0 +1,23 @@
+package cms
+
+//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.
+
+// Target is a nested struct in cms response
+type Target struct {
+	Arn   string `json:"Arn" xml:"Arn"`
+	Level string `json:"Level" xml:"Level"`
+	Id    string `json:"Id" xml:"Id"`
+}

+ 21 - 0
services/cms/struct_target_ids.go

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

+ 21 - 0
services/cms/struct_targets_in_describe_metric_rule_targets.go

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

+ 21 - 0
services/cms/struct_targets_in_put_metric_rule_targets.go

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