Merge pull request #11296 from zhaoxiangchun/feature/zxc-jdcloud-monitor

feat: support jdcloud pull monitor metric
This commit is contained in:
Zexi Li
2021-06-03 18:10:29 +08:00
committed by GitHub
274 changed files with 12628 additions and 6 deletions
+1 -1
View File
@@ -154,7 +154,7 @@ require (
yunion.io/x/ovsdb v0.0.0-20200526071744-27bf0940cbc7
yunion.io/x/pkg v0.0.0-20210218105412-13a69f60034c
yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e
yunion.io/x/sqlchemy v0.0.0-20210401131841-cdb9ab689824
yunion.io/x/sqlchemy v0.0.0-20210519174758-cb08030e2008
yunion.io/x/structarg v0.0.0-20200720093445-9f850fa222ce
)
+2 -3
View File
@@ -749,7 +749,6 @@ golang.org/x/sys v0.0.0-20190830023255-19e00faab6ad/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20191003212358-c178f38b412c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -931,7 +930,7 @@ yunion.io/x/pkg v0.0.0-20210218105412-13a69f60034c h1:J/joqbA1N2mAlOl0Uqd4LpAq3+
yunion.io/x/pkg v0.0.0-20210218105412-13a69f60034c/go.mod h1:t6rEGG2sQ4J7DhFxSZVOTjNd0YO/KlfWQyK1W4tog+E=
yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e h1:v+EzIadodSwkdZ/7bremd7J8J50Cise/HCylsOJngmo=
yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e/go.mod h1:0iFKpOs1y4lbCxeOmq3Xx/0AcQoewVPwj62eRluioEo=
yunion.io/x/sqlchemy v0.0.0-20210401131841-cdb9ab689824 h1:3/VcCiO+vr3+zZFLNvre41ARF2xE6NVq6Ue7JPFuJvU=
yunion.io/x/sqlchemy v0.0.0-20210401131841-cdb9ab689824/go.mod h1:FTdwPdGhMgh4E+UFXc9klI1Ok34fMuybTT+jLhOaIjI=
yunion.io/x/sqlchemy v0.0.0-20210519174758-cb08030e2008 h1:h3jv9rx8LhvuuRigVee6vPveMtIybbz66jaMkutCtF4=
yunion.io/x/sqlchemy v0.0.0-20210519174758-cb08030e2008/go.mod h1:FTdwPdGhMgh4E+UFXc9klI1Ok34fMuybTT+jLhOaIjI=
yunion.io/x/structarg v0.0.0-20200720093445-9f850fa222ce h1:kU8xE7O5uZ1GSJVMZHoJ+jrNL7csUQHYGyAPW9QfNpE=
yunion.io/x/structarg v0.0.0-20200720093445-9f850fa222ce/go.mod h1:EP6NSv2C0zzqBDTKumv8hPWLb3XvgMZDHQRfyuOrQng=
+42
View File
@@ -0,0 +1,42 @@
package jdcloud
import (
jc_apis "github.com/jdcloud-api/jdcloud-sdk-go/services/monitor/apis"
client "github.com/jdcloud-api/jdcloud-sdk-go/services/monitor/client"
)
type DescribeMetricDataRequest struct {
*jc_apis.DescribeMetricDataRequest
}
type DescribeMetricDataResponse struct {
*jc_apis.DescribeMetricDataResponse
}
func (r *SRegion) GetMetricsData(req *DescribeMetricDataRequest) (*DescribeMetricDataResponse, error) {
if len(req.RegionId) == 0 {
req.RegionId = r.GetId()
}
monitorClient := client.NewMonitorClient(r.Credential)
response, err := monitorClient.DescribeMetricData(req.DescribeMetricDataRequest)
if err != nil {
return nil, err
}
return &DescribeMetricDataResponse{response}, err
}
func NewDescribeMetricDataRequestWithAllParams(
regionId string,
metric string,
startTime *string,
endTime *string,
timeInterval *string,
serviceCode *string,
resourceId string,
) *DescribeMetricDataRequest {
var aggrType, downSampleType = "avg", "avg"
request := new(DescribeMetricDataRequest)
request.DescribeMetricDataRequest = jc_apis.NewDescribeMetricDataRequestWithAllParams(regionId, metric, &aggrType, &downSampleType, startTime, endTime,
timeInterval, nil, nil, nil, serviceCode, nil, resourceId)
return request
}
+27
View File
@@ -0,0 +1,27 @@
package shell
import (
"yunion.io/x/onecloud/pkg/multicloud/jdcloud"
"yunion.io/x/onecloud/pkg/util/shellutils"
)
func init() {
type DescribeMetricDataOptions struct {
/* 监控项英文标识(id) */
Metric string `help:"metric name"json:"metric"`
TimeInterval string `help:"time interval" choices:"1h|6h|12h|1d|3d|7d|14d" json:"timeInterval"`
ServiceCode string `help:"resource code" choices:"vm" json:"serviceCode"`
ResourceId string `help:"resource id" json:"resourceId"`
}
shellutils.R(&DescribeMetricDataOptions{}, "metric-list", "list metric", func(cli *jdcloud.SRegion,
args *DescribeMetricDataOptions) error {
request := jdcloud.NewDescribeMetricDataRequestWithAllParams(cli.GetId(),
args.Metric, nil, nil, &args.TimeInterval, &args.ServiceCode, args.ResourceId)
response, err := cli.GetMetricsData(request)
if err != nil {
return err
}
printList(response.Result.MetricDatas, 0, 0, 0, nil)
return nil
})
}
@@ -0,0 +1,269 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package apis
import (
"github.com/jdcloud-api/jdcloud-sdk-go/core"
monitor "github.com/jdcloud-api/jdcloud-sdk-go/services/monitor/models"
)
type CreateAlarmRequest struct {
core.JDCloudRequest
/* 弹性伸缩组Id。注:仅ag\asg产品线内部使用 (Optional) */
AutoScalingPolicyId *string `json:"autoScalingPolicyId"`
/* 告警通知联系人 (Optional) */
BaseContact []monitor.BaseContact `json:"baseContact"`
/* 幂等性校验参数,最长36位,若两个请求clientToken相等,则返回第一次创建的规则id,只创建一次规则 */
ClientToken string `json:"clientToken"`
/* 数据所有者,1云监控控制台; 2云鼎。默认为1 (Optional) */
DataOwner *int64 `json:"dataOwner"`
/* 资源维度,可用的维度请使用 describeProductsForAlarm接口查询 (Optional) */
Dimension *string `json:"dimension"`
/* 是否启用, 1表示启用规则,0表示禁用规则,默认为1 (Optional) */
Enabled *int64 `json:"enabled"`
/* url回调设置数组 (Optional) */
MultiWebHook []monitor.WebHookOption `json:"multiWebHook"`
/* 通知策略 (Optional) */
NoticeOption []monitor.NoticeOption `json:"noticeOption"`
/* 资源类型, 可用的资源类型列表请使用 describeProductsForAlarm接口查询。 */
Product string `json:"product"`
/* */
ResourceOption *monitor.ResourceOption `json:"resourceOption"`
/* 规则名称,规则名称,最大长度42个字符,只允许中英文、数字、''-''和"_" */
RuleName string `json:"ruleName"`
/* */
RuleOption *monitor.RuleOption `json:"ruleOption"`
/* 规则类型, 默认为resourceMonitor (Optional) */
RuleType *string `json:"ruleType"`
/* 资源维度,指定监控数据实例的维度标签,如resourceId=id。(请确认资源的监控数据带有该标签,否则规则会报数据不足) (Optional) */
Tags *interface{} `json:"tags"`
/* (Optional) */
WebHookOption *monitor.WebHookOption `json:"webHookOption"`
}
/*
* param clientToken: 幂等性校验参数,最长36位,若两个请求clientToken相等,则返回第一次创建的规则id,只创建一次规则 (Required)
* param product: 资源类型, 可用的资源类型列表请使用 describeProductsForAlarm接口查询。 (Required)
* param resourceOption: (Required)
* param ruleName: 规则名称,规则名称,最大长度42个字符,只允许中英文、数字、''-''和"_" (Required)
* param ruleOption: (Required)
*
* @Deprecated, not compatible when mandatory parameters changed
*/
func NewCreateAlarmRequest(
clientToken string,
product string,
resourceOption *monitor.ResourceOption,
ruleName string,
ruleOption *monitor.RuleOption,
) *CreateAlarmRequest {
return &CreateAlarmRequest{
JDCloudRequest: core.JDCloudRequest{
URL: "/groupAlarms",
Method: "POST",
Header: nil,
Version: "v2",
},
ClientToken: clientToken,
Product: product,
ResourceOption: resourceOption,
RuleName: ruleName,
RuleOption: ruleOption,
}
}
/*
* param autoScalingPolicyId: 弹性伸缩组Id。注:仅ag\asg产品线内部使用 (Optional)
* param baseContact: 告警通知联系人 (Optional)
* param clientToken: 幂等性校验参数,最长36位,若两个请求clientToken相等,则返回第一次创建的规则id,只创建一次规则 (Required)
* param dataOwner: 数据所有者,1云监控控制台; 2云鼎。默认为1 (Optional)
* param dimension: 资源维度,可用的维度请使用 describeProductsForAlarm接口查询 (Optional)
* param enabled: 是否启用, 1表示启用规则,0表示禁用规则,默认为1 (Optional)
* param multiWebHook: url回调设置数组 (Optional)
* param noticeOption: 通知策略 (Optional)
* param product: 资源类型, 可用的资源类型列表请使用 describeProductsForAlarm接口查询。 (Required)
* param resourceOption: (Required)
* param ruleName: 规则名称,规则名称,最大长度42个字符,只允许中英文、数字、''-''和"_" (Required)
* param ruleOption: (Required)
* param ruleType: 规则类型, 默认为resourceMonitor (Optional)
* param tags: 资源维度,指定监控数据实例的维度标签,如resourceId=id。(请确认资源的监控数据带有该标签,否则规则会报数据不足) (Optional)
* param webHookOption: (Optional)
*/
func NewCreateAlarmRequestWithAllParams(
autoScalingPolicyId *string,
baseContact []monitor.BaseContact,
clientToken string,
dataOwner *int64,
dimension *string,
enabled *int64,
multiWebHook []monitor.WebHookOption,
noticeOption []monitor.NoticeOption,
product string,
resourceOption *monitor.ResourceOption,
ruleName string,
ruleOption *monitor.RuleOption,
ruleType *string,
tags *interface{},
webHookOption *monitor.WebHookOption,
) *CreateAlarmRequest {
return &CreateAlarmRequest{
JDCloudRequest: core.JDCloudRequest{
URL: "/groupAlarms",
Method: "POST",
Header: nil,
Version: "v2",
},
AutoScalingPolicyId: autoScalingPolicyId,
BaseContact: baseContact,
ClientToken: clientToken,
DataOwner: dataOwner,
Dimension: dimension,
Enabled: enabled,
MultiWebHook: multiWebHook,
NoticeOption: noticeOption,
Product: product,
ResourceOption: resourceOption,
RuleName: ruleName,
RuleOption: ruleOption,
RuleType: ruleType,
Tags: tags,
WebHookOption: webHookOption,
}
}
/* This constructor has better compatible ability when API parameters changed */
func NewCreateAlarmRequestWithoutParam() *CreateAlarmRequest {
return &CreateAlarmRequest{
JDCloudRequest: core.JDCloudRequest{
URL: "/groupAlarms",
Method: "POST",
Header: nil,
Version: "v2",
},
}
}
/* param autoScalingPolicyId: 弹性伸缩组Id。注:仅ag\asg产品线内部使用(Optional) */
func (r *CreateAlarmRequest) SetAutoScalingPolicyId(autoScalingPolicyId string) {
r.AutoScalingPolicyId = &autoScalingPolicyId
}
/* param baseContact: 告警通知联系人(Optional) */
func (r *CreateAlarmRequest) SetBaseContact(baseContact []monitor.BaseContact) {
r.BaseContact = baseContact
}
/* param clientToken: 幂等性校验参数,最长36位,若两个请求clientToken相等,则返回第一次创建的规则id,只创建一次规则(Required) */
func (r *CreateAlarmRequest) SetClientToken(clientToken string) {
r.ClientToken = clientToken
}
/* param dataOwner: 数据所有者,1云监控控制台; 2云鼎。默认为1(Optional) */
func (r *CreateAlarmRequest) SetDataOwner(dataOwner int64) {
r.DataOwner = &dataOwner
}
/* param dimension: 资源维度,可用的维度请使用 describeProductsForAlarm接口查询(Optional) */
func (r *CreateAlarmRequest) SetDimension(dimension string) {
r.Dimension = &dimension
}
/* param enabled: 是否启用, 1表示启用规则,0表示禁用规则,默认为1(Optional) */
func (r *CreateAlarmRequest) SetEnabled(enabled int64) {
r.Enabled = &enabled
}
/* param multiWebHook: url回调设置数组(Optional) */
func (r *CreateAlarmRequest) SetMultiWebHook(multiWebHook []monitor.WebHookOption) {
r.MultiWebHook = multiWebHook
}
/* param noticeOption: 通知策略(Optional) */
func (r *CreateAlarmRequest) SetNoticeOption(noticeOption []monitor.NoticeOption) {
r.NoticeOption = noticeOption
}
/* param product: 资源类型, 可用的资源类型列表请使用 describeProductsForAlarm接口查询。(Required) */
func (r *CreateAlarmRequest) SetProduct(product string) {
r.Product = product
}
/* param resourceOption: (Required) */
func (r *CreateAlarmRequest) SetResourceOption(resourceOption *monitor.ResourceOption) {
r.ResourceOption = resourceOption
}
/* param ruleName: 规则名称,规则名称,最大长度42个字符,只允许中英文、数字、''-''和"_"(Required) */
func (r *CreateAlarmRequest) SetRuleName(ruleName string) {
r.RuleName = ruleName
}
/* param ruleOption: (Required) */
func (r *CreateAlarmRequest) SetRuleOption(ruleOption *monitor.RuleOption) {
r.RuleOption = ruleOption
}
/* param ruleType: 规则类型, 默认为resourceMonitor(Optional) */
func (r *CreateAlarmRequest) SetRuleType(ruleType string) {
r.RuleType = &ruleType
}
/* param tags: 资源维度,指定监控数据实例的维度标签,如resourceId=id。(请确认资源的监控数据带有该标签,否则规则会报数据不足)(Optional) */
func (r *CreateAlarmRequest) SetTags(tags interface{}) {
r.Tags = &tags
}
/* param webHookOption: (Optional) */
func (r *CreateAlarmRequest) SetWebHookOption(webHookOption *monitor.WebHookOption) {
r.WebHookOption = webHookOption
}
// GetRegionId returns path parameter 'regionId' if exist,
// otherwise return empty string
func (r CreateAlarmRequest) GetRegionId() string {
return ""
}
type CreateAlarmResponse struct {
RequestID string `json:"requestId"`
Error core.ErrorResponse `json:"error"`
Result CreateAlarmResult `json:"result"`
}
type CreateAlarmResult struct {
AlarmId string `json:"alarmId"`
RuleIds []int64 `json:"ruleIds"`
}
@@ -0,0 +1,101 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package apis
import (
"github.com/jdcloud-api/jdcloud-sdk-go/core"
)
type DeleteAlarmsRequest struct {
core.JDCloudRequest
/* 规则id */
AlarmId string `json:"alarmId"`
}
/*
* param alarmId: 规则id (Required)
*
* @Deprecated, not compatible when mandatory parameters changed
*/
func NewDeleteAlarmsRequest(
alarmId string,
) *DeleteAlarmsRequest {
return &DeleteAlarmsRequest{
JDCloudRequest: core.JDCloudRequest{
URL: "/groupAlarms/{alarmId}",
Method: "DELETE",
Header: nil,
Version: "v2",
},
AlarmId: alarmId,
}
}
/*
* param alarmId: 规则id (Required)
*/
func NewDeleteAlarmsRequestWithAllParams(
alarmId string,
) *DeleteAlarmsRequest {
return &DeleteAlarmsRequest{
JDCloudRequest: core.JDCloudRequest{
URL: "/groupAlarms/{alarmId}",
Method: "DELETE",
Header: nil,
Version: "v2",
},
AlarmId: alarmId,
}
}
/* This constructor has better compatible ability when API parameters changed */
func NewDeleteAlarmsRequestWithoutParam() *DeleteAlarmsRequest {
return &DeleteAlarmsRequest{
JDCloudRequest: core.JDCloudRequest{
URL: "/groupAlarms/{alarmId}",
Method: "DELETE",
Header: nil,
Version: "v2",
},
}
}
/* param alarmId: 规则id(Required) */
func (r *DeleteAlarmsRequest) SetAlarmId(alarmId string) {
r.AlarmId = alarmId
}
// GetRegionId returns path parameter 'regionId' if exist,
// otherwise return empty string
func (r DeleteAlarmsRequest) GetRegionId() string {
return ""
}
type DeleteAlarmsResponse struct {
RequestID string `json:"requestId"`
Error core.ErrorResponse `json:"error"`
Result DeleteAlarmsResult `json:"result"`
}
type DeleteAlarmsResult struct {
Success bool `json:"success"`
}
@@ -0,0 +1,120 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package apis
import (
"github.com/jdcloud-api/jdcloud-sdk-go/core"
monitor "github.com/jdcloud-api/jdcloud-sdk-go/services/monitor/models"
)
type DescribeAlarmRequest struct {
core.JDCloudRequest
/* 规则id */
AlarmId string `json:"alarmId"`
}
/*
* param alarmId: 规则id (Required)
*
* @Deprecated, not compatible when mandatory parameters changed
*/
func NewDescribeAlarmRequest(
alarmId string,
) *DescribeAlarmRequest {
return &DescribeAlarmRequest{
JDCloudRequest: core.JDCloudRequest{
URL: "/groupAlarms/{alarmId}",
Method: "GET",
Header: nil,
Version: "v2",
},
AlarmId: alarmId,
}
}
/*
* param alarmId: 规则id (Required)
*/
func NewDescribeAlarmRequestWithAllParams(
alarmId string,
) *DescribeAlarmRequest {
return &DescribeAlarmRequest{
JDCloudRequest: core.JDCloudRequest{
URL: "/groupAlarms/{alarmId}",
Method: "GET",
Header: nil,
Version: "v2",
},
AlarmId: alarmId,
}
}
/* This constructor has better compatible ability when API parameters changed */
func NewDescribeAlarmRequestWithoutParam() *DescribeAlarmRequest {
return &DescribeAlarmRequest{
JDCloudRequest: core.JDCloudRequest{
URL: "/groupAlarms/{alarmId}",
Method: "GET",
Header: nil,
Version: "v2",
},
}
}
/* param alarmId: 规则id(Required) */
func (r *DescribeAlarmRequest) SetAlarmId(alarmId string) {
r.AlarmId = alarmId
}
// GetRegionId returns path parameter 'regionId' if exist,
// otherwise return empty string
func (r DescribeAlarmRequest) GetRegionId() string {
return ""
}
type DescribeAlarmResponse struct {
RequestID string `json:"requestId"`
Error core.ErrorResponse `json:"error"`
Result DescribeAlarmResult `json:"result"`
}
type DescribeAlarmResult struct {
AlarmId string `json:"alarmId"`
AlarmStatus int64 `json:"alarmStatus"`
AlarmStatusList []int64 `json:"alarmStatusList"`
BaseContact []monitor.BaseContact `json:"baseContact"`
CreateTime string `json:"createTime"`
Dimension string `json:"dimension"`
DimensionName string `json:"dimensionName"`
Enabled int64 `json:"enabled"`
MultiWebHook []monitor.WebHookOption `json:"multiWebHook"`
NoticeOption []monitor.NoticeOption `json:"noticeOption"`
Product string `json:"product"`
ProductName string `json:"productName"`
ResourceOption monitor.ResourceOption `json:"resourceOption"`
RuleName string `json:"ruleName"`
RuleOption monitor.RuleOptionDetail `json:"ruleOption"`
RuleType string `json:"ruleType"`
RuleVersion string `json:"ruleVersion"`
Tags interface{} `json:"tags"`
WebHookOption monitor.WebHookOption `json:"webHookOption"`
}
@@ -0,0 +1,136 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package apis
import (
"github.com/jdcloud-api/jdcloud-sdk-go/core"
monitor "github.com/jdcloud-api/jdcloud-sdk-go/services/monitor/models"
)
type DescribeAlarmContactsRequest struct {
core.JDCloudRequest
/* 规则id */
AlarmId string `json:"alarmId"`
/* 当前所在页,默认为1 (Optional) */
PageNumber *int `json:"pageNumber"`
/* 页面大小,默认为20;取值范围[1, 100] (Optional) */
PageSize *int `json:"pageSize"`
/* 联系人类型。0,联系人分组; 1,联系人 (Optional) */
ReferenceType *int `json:"referenceType"`
}
/*
* param alarmId: 规则id (Required)
*
* @Deprecated, not compatible when mandatory parameters changed
*/
func NewDescribeAlarmContactsRequest(
alarmId string,
) *DescribeAlarmContactsRequest {
return &DescribeAlarmContactsRequest{
JDCloudRequest: core.JDCloudRequest{
URL: "/groupAlarms/{alarmId}/contacts",
Method: "GET",
Header: nil,
Version: "v2",
},
AlarmId: alarmId,
}
}
/*
* param alarmId: 规则id (Required)
* param pageNumber: 当前所在页,默认为1 (Optional)
* param pageSize: 页面大小,默认为20;取值范围[1, 100] (Optional)
* param referenceType: 联系人类型。0,联系人分组; 1,联系人 (Optional)
*/
func NewDescribeAlarmContactsRequestWithAllParams(
alarmId string,
pageNumber *int,
pageSize *int,
referenceType *int,
) *DescribeAlarmContactsRequest {
return &DescribeAlarmContactsRequest{
JDCloudRequest: core.JDCloudRequest{
URL: "/groupAlarms/{alarmId}/contacts",
Method: "GET",
Header: nil,
Version: "v2",
},
AlarmId: alarmId,
PageNumber: pageNumber,
PageSize: pageSize,
ReferenceType: referenceType,
}
}
/* This constructor has better compatible ability when API parameters changed */
func NewDescribeAlarmContactsRequestWithoutParam() *DescribeAlarmContactsRequest {
return &DescribeAlarmContactsRequest{
JDCloudRequest: core.JDCloudRequest{
URL: "/groupAlarms/{alarmId}/contacts",
Method: "GET",
Header: nil,
Version: "v2",
},
}
}
/* param alarmId: 规则id(Required) */
func (r *DescribeAlarmContactsRequest) SetAlarmId(alarmId string) {
r.AlarmId = alarmId
}
/* param pageNumber: 当前所在页,默认为1(Optional) */
func (r *DescribeAlarmContactsRequest) SetPageNumber(pageNumber int) {
r.PageNumber = &pageNumber
}
/* param pageSize: 页面大小,默认为20;取值范围[1, 100](Optional) */
func (r *DescribeAlarmContactsRequest) SetPageSize(pageSize int) {
r.PageSize = &pageSize
}
/* param referenceType: 联系人类型。0,联系人分组; 1,联系人(Optional) */
func (r *DescribeAlarmContactsRequest) SetReferenceType(referenceType int) {
r.ReferenceType = &referenceType
}
// GetRegionId returns path parameter 'regionId' if exist,
// otherwise return empty string
func (r DescribeAlarmContactsRequest) GetRegionId() string {
return ""
}
type DescribeAlarmContactsResponse struct {
RequestID string `json:"requestId"`
Error core.ErrorResponse `json:"error"`
Result DescribeAlarmContactsResult `json:"result"`
}
type DescribeAlarmContactsResult struct {
ContactsList []monitor.DescribedNoticeContacts `json:"contactsList"`
Total int64 `json:"total"`
}
@@ -0,0 +1,252 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package apis
import (
"github.com/jdcloud-api/jdcloud-sdk-go/core"
monitor "github.com/jdcloud-api/jdcloud-sdk-go/services/monitor/models"
)
type DescribeAlarmHistoryRequest struct {
core.JDCloudRequest
/* 当前所在页,默认为1 (Optional) */
PageNumber *int `json:"pageNumber"`
/* 页面大小,默认为20;取值范围[1, 100] (Optional) */
PageSize *int `json:"pageSize"`
/* 数据所有者,1云监控控制台; 2云鼎。默认为1 (Optional) */
DataOwner *int `json:"dataOwner"`
/* 产品线标识,同一个产品线下可能存在多个product,如(redis下有redis2.8cluster、redis4.0) (Optional) */
ServiceCode *string `json:"serviceCode"`
/* 产品标识,默认返回该product下所有dimension的数据。eg:product=redis2.8cluster(redis2.8cluster产品下包含redis2.8-shard与redis2.8-proxy、redis2.8-instance多个维度)。 (Optional) */
Product *string `json:"product"`
/* 维度标识、指定该参数时,查询只返回该维度的数据。如redis2.8cluster下存在实例、分片等多个维度 (Optional) */
Dimension *string `json:"dimension"`
/* 根据region筛选对应region的资源的报警历史 (Optional) */
Region *string `json:"region"`
/* 正在报警, 取值为1 (Optional) */
IsAlarming *int `json:"isAlarming"`
/* 报警的状态,1为报警恢复、2为报警、4为报警恢复无数据 (Optional) */
Status *int `json:"status"`
/* 开始时间 (Optional) */
StartTime *string `json:"startTime"`
/* 结束时间 (Optional) */
EndTime *string `json:"endTime"`
/* 规则类型,默认查询1, 1表示资源监控,6表示站点监控,7表示可用性监控 (Optional) */
RuleType *int `json:"ruleType"`
/* 规则名称模糊搜索 (Optional) */
RuleName *string `json:"ruleName"`
/* serviceCodes - 产品线servicecode,精确匹配,支持多个
resourceIds - 资源Id,精确匹配,支持多个(必须指定serviceCode才会在该serviceCode下根据resourceIds过滤,否则该参数不生效)
alarmIds - 规则Id,精确匹配,支持多个 (Optional) */
Filters []monitor.Filter `json:"filters"`
}
/*
*
* @Deprecated, not compatible when mandatory parameters changed
*/
func NewDescribeAlarmHistoryRequest(
) *DescribeAlarmHistoryRequest {
return &DescribeAlarmHistoryRequest{
JDCloudRequest: core.JDCloudRequest{
URL: "/groupAlarmsHistory",
Method: "GET",
Header: nil,
Version: "v2",
},
}
}
/*
* param pageNumber: 当前所在页,默认为1 (Optional)
* param pageSize: 页面大小,默认为20;取值范围[1, 100] (Optional)
* param dataOwner: 数据所有者,1云监控控制台; 2云鼎。默认为1 (Optional)
* param serviceCode: 产品线标识,同一个产品线下可能存在多个product,如(redis下有redis2.8cluster、redis4.0) (Optional)
* param product: 产品标识,默认返回该product下所有dimension的数据。eg:product=redis2.8cluster(redis2.8cluster产品下包含redis2.8-shard与redis2.8-proxy、redis2.8-instance多个维度)。 (Optional)
* param dimension: 维度标识、指定该参数时,查询只返回该维度的数据。如redis2.8cluster下存在实例、分片等多个维度 (Optional)
* param region: 根据region筛选对应region的资源的报警历史 (Optional)
* param isAlarming: 正在报警, 取值为1 (Optional)
* param status: 报警的状态,1为报警恢复、2为报警、4为报警恢复无数据 (Optional)
* param startTime: 开始时间 (Optional)
* param endTime: 结束时间 (Optional)
* param ruleType: 规则类型,默认查询1, 1表示资源监控,6表示站点监控,7表示可用性监控 (Optional)
* param ruleName: 规则名称模糊搜索 (Optional)
* param filters: serviceCodes - 产品线servicecode,精确匹配,支持多个
resourceIds - 资源Id,精确匹配,支持多个(必须指定serviceCode才会在该serviceCode下根据resourceIds过滤,否则该参数不生效)
alarmIds - 规则Id,精确匹配,支持多个 (Optional)
*/
func NewDescribeAlarmHistoryRequestWithAllParams(
pageNumber *int,
pageSize *int,
dataOwner *int,
serviceCode *string,
product *string,
dimension *string,
region *string,
isAlarming *int,
status *int,
startTime *string,
endTime *string,
ruleType *int,
ruleName *string,
filters []monitor.Filter,
) *DescribeAlarmHistoryRequest {
return &DescribeAlarmHistoryRequest{
JDCloudRequest: core.JDCloudRequest{
URL: "/groupAlarmsHistory",
Method: "GET",
Header: nil,
Version: "v2",
},
PageNumber: pageNumber,
PageSize: pageSize,
DataOwner: dataOwner,
ServiceCode: serviceCode,
Product: product,
Dimension: dimension,
Region: region,
IsAlarming: isAlarming,
Status: status,
StartTime: startTime,
EndTime: endTime,
RuleType: ruleType,
RuleName: ruleName,
Filters: filters,
}
}
/* This constructor has better compatible ability when API parameters changed */
func NewDescribeAlarmHistoryRequestWithoutParam() *DescribeAlarmHistoryRequest {
return &DescribeAlarmHistoryRequest{
JDCloudRequest: core.JDCloudRequest{
URL: "/groupAlarmsHistory",
Method: "GET",
Header: nil,
Version: "v2",
},
}
}
/* param pageNumber: 当前所在页,默认为1(Optional) */
func (r *DescribeAlarmHistoryRequest) SetPageNumber(pageNumber int) {
r.PageNumber = &pageNumber
}
/* param pageSize: 页面大小,默认为20;取值范围[1, 100](Optional) */
func (r *DescribeAlarmHistoryRequest) SetPageSize(pageSize int) {
r.PageSize = &pageSize
}
/* param dataOwner: 数据所有者,1云监控控制台; 2云鼎。默认为1(Optional) */
func (r *DescribeAlarmHistoryRequest) SetDataOwner(dataOwner int) {
r.DataOwner = &dataOwner
}
/* param serviceCode: 产品线标识,同一个产品线下可能存在多个product,如(redis下有redis2.8cluster、redis4.0)(Optional) */
func (r *DescribeAlarmHistoryRequest) SetServiceCode(serviceCode string) {
r.ServiceCode = &serviceCode
}
/* param product: 产品标识,默认返回该product下所有dimension的数据。eg:product=redis2.8cluster(redis2.8cluster产品下包含redis2.8-shard与redis2.8-proxy、redis2.8-instance多个维度)。(Optional) */
func (r *DescribeAlarmHistoryRequest) SetProduct(product string) {
r.Product = &product
}
/* param dimension: 维度标识、指定该参数时,查询只返回该维度的数据。如redis2.8cluster下存在实例、分片等多个维度(Optional) */
func (r *DescribeAlarmHistoryRequest) SetDimension(dimension string) {
r.Dimension = &dimension
}
/* param region: 根据region筛选对应region的资源的报警历史(Optional) */
func (r *DescribeAlarmHistoryRequest) SetRegion(region string) {
r.Region = &region
}
/* param isAlarming: 正在报警, 取值为1(Optional) */
func (r *DescribeAlarmHistoryRequest) SetIsAlarming(isAlarming int) {
r.IsAlarming = &isAlarming
}
/* param status: 报警的状态,1为报警恢复、2为报警、4为报警恢复无数据(Optional) */
func (r *DescribeAlarmHistoryRequest) SetStatus(status int) {
r.Status = &status
}
/* param startTime: 开始时间(Optional) */
func (r *DescribeAlarmHistoryRequest) SetStartTime(startTime string) {
r.StartTime = &startTime
}
/* param endTime: 结束时间(Optional) */
func (r *DescribeAlarmHistoryRequest) SetEndTime(endTime string) {
r.EndTime = &endTime
}
/* param ruleType: 规则类型,默认查询1, 1表示资源监控,6表示站点监控,7表示可用性监控(Optional) */
func (r *DescribeAlarmHistoryRequest) SetRuleType(ruleType int) {
r.RuleType = &ruleType
}
/* param ruleName: 规则名称模糊搜索(Optional) */
func (r *DescribeAlarmHistoryRequest) SetRuleName(ruleName string) {
r.RuleName = &ruleName
}
/* param filters: serviceCodes - 产品线servicecode,精确匹配,支持多个
resourceIds - 资源Id,精确匹配,支持多个(必须指定serviceCode才会在该serviceCode下根据resourceIds过滤,否则该参数不生效)
alarmIds - 规则Id,精确匹配,支持多个(Optional) */
func (r *DescribeAlarmHistoryRequest) SetFilters(filters []monitor.Filter) {
r.Filters = filters
}
// GetRegionId returns path parameter 'regionId' if exist,
// otherwise return empty string
func (r DescribeAlarmHistoryRequest) GetRegionId() string {
return ""
}
type DescribeAlarmHistoryResponse struct {
RequestID string `json:"requestId"`
Error core.ErrorResponse `json:"error"`
Result DescribeAlarmHistoryResult `json:"result"`
}
type DescribeAlarmHistoryResult struct {
AlarmHistoryList []monitor.DescribedAlarmHistory `json:"alarmHistoryList"`
NumberPages int64 `json:"numberPages"`
NumberRecords int64 `json:"numberRecords"`
PageNumber int64 `json:"pageNumber"`
PageSize int64 `json:"pageSize"`
}
@@ -0,0 +1,222 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package apis
import (
"github.com/jdcloud-api/jdcloud-sdk-go/core"
monitor "github.com/jdcloud-api/jdcloud-sdk-go/services/monitor/models"
)
type DescribeAlarmsRequest struct {
core.JDCloudRequest
/* 当前所在页,默认为1 (Optional) */
PageNumber *int `json:"pageNumber"`
/* 页面大小,默认为20;取值范围[1, 100] (Optional) */
PageSize *int `json:"pageSize"`
/* 数据所有者,1云监控控制台; 2云鼎。默认为1 (Optional) */
DataOwner *int `json:"dataOwner"`
/* 产品线标识,同一个产品线下可能存在多个product,如(redis下有redis2.8cluster、redis4.0) (Optional) */
ServiceCode *string `json:"serviceCode"`
/* 产品标识,如redis下分多个产品(redis2.8cluster、redis4.0)。同时指定serviceCode与product时,product优先生效 (Optional) */
Product *string `json:"product"`
/* 产品下的维度标识,指定dimension时必须指定product (Optional) */
Dimension *string `json:"dimension"`
/* 规则名称 (Optional) */
RuleName *string `json:"ruleName"`
/* 规则类型, 1表示资源监控,6表示站点监控,7表示可用性监控 (Optional) */
RuleType *int `json:"ruleType"`
/* 规则状态:1为启用,0为禁用 (Optional) */
Enabled *int `json:"enabled"`
/* 资源的规则状态 2:报警、4:数据不足 (Optional) */
RuleStatus *int `json:"ruleStatus"`
/* 服务码或资源Id列表
products - 产品product,精确匹配,支持多个
resourceIds - 资源Id,精确匹配,支持多个(必须指定serviceCode、product或dimension,否则该参数不生效)
alarmIds - 规则id,精确匹配,支持多个 (Optional) */
Filters []monitor.Filter `json:"filters"`
}
/*
*
* @Deprecated, not compatible when mandatory parameters changed
*/
func NewDescribeAlarmsRequest(
) *DescribeAlarmsRequest {
return &DescribeAlarmsRequest{
JDCloudRequest: core.JDCloudRequest{
URL: "/groupAlarms",
Method: "GET",
Header: nil,
Version: "v2",
},
}
}
/*
* param pageNumber: 当前所在页,默认为1 (Optional)
* param pageSize: 页面大小,默认为20;取值范围[1, 100] (Optional)
* param dataOwner: 数据所有者,1云监控控制台; 2云鼎。默认为1 (Optional)
* param serviceCode: 产品线标识,同一个产品线下可能存在多个product,如(redis下有redis2.8cluster、redis4.0) (Optional)
* param product: 产品标识,如redis下分多个产品(redis2.8cluster、redis4.0)。同时指定serviceCode与product时,product优先生效 (Optional)
* param dimension: 产品下的维度标识,指定dimension时必须指定product (Optional)
* param ruleName: 规则名称 (Optional)
* param ruleType: 规则类型, 1表示资源监控,6表示站点监控,7表示可用性监控 (Optional)
* param enabled: 规则状态:1为启用,0为禁用 (Optional)
* param ruleStatus: 资源的规则状态 2:报警、4:数据不足 (Optional)
* param filters: 服务码或资源Id列表
products - 产品product,精确匹配,支持多个
resourceIds - 资源Id,精确匹配,支持多个(必须指定serviceCode、product或dimension,否则该参数不生效)
alarmIds - 规则id,精确匹配,支持多个 (Optional)
*/
func NewDescribeAlarmsRequestWithAllParams(
pageNumber *int,
pageSize *int,
dataOwner *int,
serviceCode *string,
product *string,
dimension *string,
ruleName *string,
ruleType *int,
enabled *int,
ruleStatus *int,
filters []monitor.Filter,
) *DescribeAlarmsRequest {
return &DescribeAlarmsRequest{
JDCloudRequest: core.JDCloudRequest{
URL: "/groupAlarms",
Method: "GET",
Header: nil,
Version: "v2",
},
PageNumber: pageNumber,
PageSize: pageSize,
DataOwner: dataOwner,
ServiceCode: serviceCode,
Product: product,
Dimension: dimension,
RuleName: ruleName,
RuleType: ruleType,
Enabled: enabled,
RuleStatus: ruleStatus,
Filters: filters,
}
}
/* This constructor has better compatible ability when API parameters changed */
func NewDescribeAlarmsRequestWithoutParam() *DescribeAlarmsRequest {
return &DescribeAlarmsRequest{
JDCloudRequest: core.JDCloudRequest{
URL: "/groupAlarms",
Method: "GET",
Header: nil,
Version: "v2",
},
}
}
/* param pageNumber: 当前所在页,默认为1(Optional) */
func (r *DescribeAlarmsRequest) SetPageNumber(pageNumber int) {
r.PageNumber = &pageNumber
}
/* param pageSize: 页面大小,默认为20;取值范围[1, 100](Optional) */
func (r *DescribeAlarmsRequest) SetPageSize(pageSize int) {
r.PageSize = &pageSize
}
/* param dataOwner: 数据所有者,1云监控控制台; 2云鼎。默认为1(Optional) */
func (r *DescribeAlarmsRequest) SetDataOwner(dataOwner int) {
r.DataOwner = &dataOwner
}
/* param serviceCode: 产品线标识,同一个产品线下可能存在多个product,如(redis下有redis2.8cluster、redis4.0)(Optional) */
func (r *DescribeAlarmsRequest) SetServiceCode(serviceCode string) {
r.ServiceCode = &serviceCode
}
/* param product: 产品标识,如redis下分多个产品(redis2.8cluster、redis4.0)。同时指定serviceCode与product时,product优先生效(Optional) */
func (r *DescribeAlarmsRequest) SetProduct(product string) {
r.Product = &product
}
/* param dimension: 产品下的维度标识,指定dimension时必须指定product(Optional) */
func (r *DescribeAlarmsRequest) SetDimension(dimension string) {
r.Dimension = &dimension
}
/* param ruleName: 规则名称(Optional) */
func (r *DescribeAlarmsRequest) SetRuleName(ruleName string) {
r.RuleName = &ruleName
}
/* param ruleType: 规则类型, 1表示资源监控,6表示站点监控,7表示可用性监控(Optional) */
func (r *DescribeAlarmsRequest) SetRuleType(ruleType int) {
r.RuleType = &ruleType
}
/* param enabled: 规则状态:1为启用,0为禁用(Optional) */
func (r *DescribeAlarmsRequest) SetEnabled(enabled int) {
r.Enabled = &enabled
}
/* param ruleStatus: 资源的规则状态 2:报警、4:数据不足(Optional) */
func (r *DescribeAlarmsRequest) SetRuleStatus(ruleStatus int) {
r.RuleStatus = &ruleStatus
}
/* param filters: 服务码或资源Id列表
products - 产品product,精确匹配,支持多个
resourceIds - 资源Id,精确匹配,支持多个(必须指定serviceCode、product或dimension,否则该参数不生效)
alarmIds - 规则id,精确匹配,支持多个(Optional) */
func (r *DescribeAlarmsRequest) SetFilters(filters []monitor.Filter) {
r.Filters = filters
}
// GetRegionId returns path parameter 'regionId' if exist,
// otherwise return empty string
func (r DescribeAlarmsRequest) GetRegionId() string {
return ""
}
type DescribeAlarmsResponse struct {
RequestID string `json:"requestId"`
Error core.ErrorResponse `json:"error"`
Result DescribeAlarmsResult `json:"result"`
}
type DescribeAlarmsResult struct {
AlarmList []monitor.DescribeGroupAlarm `json:"alarmList"`
NumberPages int64 `json:"numberPages"`
NumberRecords int64 `json:"numberRecords"`
PageNumber int64 `json:"pageNumber"`
PageSize int64 `json:"pageSize"`
}
@@ -0,0 +1,163 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package apis
import (
"github.com/jdcloud-api/jdcloud-sdk-go/core"
monitor "github.com/jdcloud-api/jdcloud-sdk-go/services/monitor/models"
)
type DescribeCustomMetricDataRequest struct {
core.JDCloudRequest
/* region */
RegionId string `json:"regionId"`
/* namespace */
NamespaceUID string `json:"namespaceUID"`
/* 查询时间范围的结束时间, UTC时间,格式:2016-12-11T00:00:00+0800(为空时,将由startTime与timeInterval计算得出) (Optional) */
EndTime *string `json:"endTime"`
/* */
Query *monitor.QueryOption `json:"query"`
/* 查询时间范围的开始时间, UTC时间,格式:2016-12-11T00:00:00+0800 (Optional) */
StartTime *string `json:"startTime"`
/* 时间间隔:1h,6h,12h,1d,3d,7d,14d,固定时间间隔,timeInterval默认为1h,当前时间往 前1h (Optional) */
TimeInterval *string `json:"timeInterval"`
}
/*
* param regionId: region (Required)
* param namespaceUID: namespace (Required)
* param query: (Required)
*
* @Deprecated, not compatible when mandatory parameters changed
*/
func NewDescribeCustomMetricDataRequest(
regionId string,
namespaceUID string,
query *monitor.QueryOption,
) *DescribeCustomMetricDataRequest {
return &DescribeCustomMetricDataRequest{
JDCloudRequest: core.JDCloudRequest{
URL: "/regions/{regionId}/namespaces/{namespaceUID}/metricData",
Method: "POST",
Header: nil,
Version: "v2",
},
RegionId: regionId,
NamespaceUID: namespaceUID,
Query: query,
}
}
/*
* param regionId: region (Required)
* param namespaceUID: namespace (Required)
* param endTime: 查询时间范围的结束时间, UTC时间,格式:2016-12-11T00:00:00+0800(为空时,将由startTime与timeInterval计算得出) (Optional)
* param query: (Required)
* param startTime: 查询时间范围的开始时间, UTC时间,格式:2016-12-11T00:00:00+0800 (Optional)
* param timeInterval: 时间间隔:1h,6h,12h,1d,3d,7d,14d,固定时间间隔,timeInterval默认为1h,当前时间往 前1h (Optional)
*/
func NewDescribeCustomMetricDataRequestWithAllParams(
regionId string,
namespaceUID string,
endTime *string,
query *monitor.QueryOption,
startTime *string,
timeInterval *string,
) *DescribeCustomMetricDataRequest {
return &DescribeCustomMetricDataRequest{
JDCloudRequest: core.JDCloudRequest{
URL: "/regions/{regionId}/namespaces/{namespaceUID}/metricData",
Method: "POST",
Header: nil,
Version: "v2",
},
RegionId: regionId,
NamespaceUID: namespaceUID,
EndTime: endTime,
Query: query,
StartTime: startTime,
TimeInterval: timeInterval,
}
}
/* This constructor has better compatible ability when API parameters changed */
func NewDescribeCustomMetricDataRequestWithoutParam() *DescribeCustomMetricDataRequest {
return &DescribeCustomMetricDataRequest{
JDCloudRequest: core.JDCloudRequest{
URL: "/regions/{regionId}/namespaces/{namespaceUID}/metricData",
Method: "POST",
Header: nil,
Version: "v2",
},
}
}
/* param regionId: region(Required) */
func (r *DescribeCustomMetricDataRequest) SetRegionId(regionId string) {
r.RegionId = regionId
}
/* param namespaceUID: namespace(Required) */
func (r *DescribeCustomMetricDataRequest) SetNamespaceUID(namespaceUID string) {
r.NamespaceUID = namespaceUID
}
/* param endTime: 查询时间范围的结束时间, UTC时间,格式:2016-12-11T00:00:00+0800(为空时,将由startTime与timeInterval计算得出)(Optional) */
func (r *DescribeCustomMetricDataRequest) SetEndTime(endTime string) {
r.EndTime = &endTime
}
/* param query: (Required) */
func (r *DescribeCustomMetricDataRequest) SetQuery(query *monitor.QueryOption) {
r.Query = query
}
/* param startTime: 查询时间范围的开始时间, UTC时间,格式:2016-12-11T00:00:00+0800(Optional) */
func (r *DescribeCustomMetricDataRequest) SetStartTime(startTime string) {
r.StartTime = &startTime
}
/* param timeInterval: 时间间隔:1h,6h,12h,1d,3d,7d,14d,固定时间间隔,timeInterval默认为1h,当前时间往 前1h(Optional) */
func (r *DescribeCustomMetricDataRequest) SetTimeInterval(timeInterval string) {
r.TimeInterval = &timeInterval
}
// GetRegionId returns path parameter 'regionId' if exist,
// otherwise return empty string
func (r DescribeCustomMetricDataRequest) GetRegionId() string {
return r.RegionId
}
type DescribeCustomMetricDataResponse struct {
RequestID string `json:"requestId"`
Error core.ErrorResponse `json:"error"`
Result DescribeCustomMetricDataResult `json:"result"`
}
type DescribeCustomMetricDataResult struct {
MetricDatas []monitor.MetricDataItemCm `json:"metricDatas"`
}
@@ -0,0 +1,240 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package apis
import (
"github.com/jdcloud-api/jdcloud-sdk-go/core"
monitor "github.com/jdcloud-api/jdcloud-sdk-go/services/monitor/models"
)
type DescribeMetricDataRequest struct {
core.JDCloudRequest
/* 地域 Id */
RegionId string `json:"regionId"`
/* 监控项英文标识(id) */
Metric string `json:"metric"`
/* 聚合方式,用于不同时间轴上的聚合。如balance产品同一个resourceId下存在port=80和port=8080等多种维度。可选值参考:sum、avg、min、max (Optional) */
AggrType *string `json:"aggrType"`
/* 采样方式,用于在时间轴维度上将聚合周期内的数据聚合为一个点。可选值参考:sum(聚合周期内的数据求和)、avg(求平均)、last(最新值)、min(最小值)、max(最大值) (Optional) */
DownSampleType *string `json:"downSampleType"`
/* 查询时间范围的开始时间, UTC时间,格式:2016-12-11T00:00:00+0800(注意在url中+要转译为%2B故url中为2016-12-11T00:00:00%2B0800) (Optional) */
StartTime *string `json:"startTime"`
/* 查询时间范围的结束时间, UTC时间,格式:2016-12-11T00:00:00+0800(为空时,将由startTime与timeInterval计算得出)(注意在url中+要转译为%2B故url中为2016-12-11T00:00:00%2B0800) (Optional) */
EndTime *string `json:"endTime"`
/* 时间间隔:1h,6h,12h,1d,3d,7d,14d,固定时间间隔,timeInterval默认为1h,当前时间往 前1h (Optional) */
TimeInterval *string `json:"timeInterval"`
/* 监控指标数据的维度信息,根据tags来筛选指标数据不同的维度 (Optional) */
Tags []monitor.TagFilter `json:"tags"`
/* 是否对查询的tags分组 (Optional) */
GroupBy *bool `json:"groupBy"`
/* 是否求速率。仅对累积类型指标有意义 (Optional) */
Rate *bool `json:"rate"`
/* 资源的类型,取值vm, lb, ip, database 等,<a href="https://docs.jdcloud.com/cn/monitoring/api/describeservices?content=API&SOP=JDCloud">describeServices</a>:查询己接入云监控的产品线列表 (Optional) */
ServiceCode *string `json:"serviceCode"`
/* 资源的维度。查询serviceCode下可用的维度请使用describeServices接口 (Optional) */
Dimension *string `json:"dimension"`
/* 资源的uuid */
ResourceId string `json:"resourceId"`
}
/*
* param regionId: 地域 Id (Required)
* param metric: 监控项英文标识(id) (Required)
* param resourceId: 资源的uuid (Required)
*
* @Deprecated, not compatible when mandatory parameters changed
*/
func NewDescribeMetricDataRequest(
regionId string,
metric string,
resourceId string,
) *DescribeMetricDataRequest {
return &DescribeMetricDataRequest{
JDCloudRequest: core.JDCloudRequest{
URL: "/regions/{regionId}/metrics/{metric}/metricData",
Method: "GET",
Header: nil,
Version: "v2",
},
RegionId: regionId,
Metric: metric,
ResourceId: resourceId,
}
}
/*
* param regionId: 地域 Id (Required)
* param metric: 监控项英文标识(id) (Required)
* param aggrType: 聚合方式,用于不同时间轴上的聚合。如balance产品同一个resourceId下存在port=80和port=8080等多种维度。可选值参考:sum、avg、min、max (Optional)
* param downSampleType: 采样方式,用于在时间轴维度上将聚合周期内的数据聚合为一个点。可选值参考:sum(聚合周期内的数据求和)、avg(求平均)、last(最新值)、min(最小值)、max(最大值) (Optional)
* param startTime: 查询时间范围的开始时间, UTC时间,格式:2016-12-11T00:00:00+0800(注意在url中+要转译为%2B故url中为2016-12-11T00:00:00%2B0800) (Optional)
* param endTime: 查询时间范围的结束时间, UTC时间,格式:2016-12-11T00:00:00+0800(为空时,将由startTime与timeInterval计算得出)(注意在url中+要转译为%2B故url中为2016-12-11T00:00:00%2B0800) (Optional)
* param timeInterval: 时间间隔:1h,6h,12h,1d,3d,7d,14d,固定时间间隔,timeInterval默认为1h,当前时间往 前1h (Optional)
* param tags: 监控指标数据的维度信息,根据tags来筛选指标数据不同的维度 (Optional)
* param groupBy: 是否对查询的tags分组 (Optional)
* param rate: 是否求速率。仅对累积类型指标有意义 (Optional)
* param serviceCode: 资源的类型,取值vm, lb, ip, database 等,<a href="https://docs.jdcloud.com/cn/monitoring/api/describeservices?content=API&SOP=JDCloud">describeServices</a>:查询己接入云监控的产品线列表 (Optional)
* param dimension: 资源的维度。查询serviceCode下可用的维度请使用describeServices接口 (Optional)
* param resourceId: 资源的uuid (Required)
*/
func NewDescribeMetricDataRequestWithAllParams(
regionId string,
metric string,
aggrType *string,
downSampleType *string,
startTime *string,
endTime *string,
timeInterval *string,
tags []monitor.TagFilter,
groupBy *bool,
rate *bool,
serviceCode *string,
dimension *string,
resourceId string,
) *DescribeMetricDataRequest {
return &DescribeMetricDataRequest{
JDCloudRequest: core.JDCloudRequest{
URL: "/regions/{regionId}/metrics/{metric}/metricData",
Method: "GET",
Header: nil,
Version: "v2",
},
RegionId: regionId,
Metric: metric,
AggrType: aggrType,
DownSampleType: downSampleType,
StartTime: startTime,
EndTime: endTime,
TimeInterval: timeInterval,
Tags: tags,
GroupBy: groupBy,
Rate: rate,
ServiceCode: serviceCode,
Dimension: dimension,
ResourceId: resourceId,
}
}
/* This constructor has better compatible ability when API parameters changed */
func NewDescribeMetricDataRequestWithoutParam() *DescribeMetricDataRequest {
return &DescribeMetricDataRequest{
JDCloudRequest: core.JDCloudRequest{
URL: "/regions/{regionId}/metrics/{metric}/metricData",
Method: "GET",
Header: nil,
Version: "v2",
},
}
}
/* param regionId: 地域 Id(Required) */
func (r *DescribeMetricDataRequest) SetRegionId(regionId string) {
r.RegionId = regionId
}
/* param metric: 监控项英文标识(id)(Required) */
func (r *DescribeMetricDataRequest) SetMetric(metric string) {
r.Metric = metric
}
/* param aggrType: 聚合方式,用于不同时间轴上的聚合。如balance产品同一个resourceId下存在port=80和port=8080等多种维度。可选值参考:sum、avg、min、max(Optional) */
func (r *DescribeMetricDataRequest) SetAggrType(aggrType string) {
r.AggrType = &aggrType
}
/* param downSampleType: 采样方式,用于在时间轴维度上将聚合周期内的数据聚合为一个点。可选值参考:sum(聚合周期内的数据求和)、avg(求平均)、last(最新值)、min(最小值)、max(最大值)(Optional) */
func (r *DescribeMetricDataRequest) SetDownSampleType(downSampleType string) {
r.DownSampleType = &downSampleType
}
/* param startTime: 查询时间范围的开始时间, UTC时间,格式:2016-12-11T00:00:00+0800(注意在url中+要转译为%2B故url中为2016-12-11T00:00:00%2B0800)(Optional) */
func (r *DescribeMetricDataRequest) SetStartTime(startTime string) {
r.StartTime = &startTime
}
/* param endTime: 查询时间范围的结束时间, UTC时间,格式:2016-12-11T00:00:00+0800(为空时,将由startTime与timeInterval计算得出)(注意在url中+要转译为%2B故url中为2016-12-11T00:00:00%2B0800)(Optional) */
func (r *DescribeMetricDataRequest) SetEndTime(endTime string) {
r.EndTime = &endTime
}
/* param timeInterval: 时间间隔:1h,6h,12h,1d,3d,7d,14d,固定时间间隔,timeInterval默认为1h,当前时间往 前1h(Optional) */
func (r *DescribeMetricDataRequest) SetTimeInterval(timeInterval string) {
r.TimeInterval = &timeInterval
}
/* param tags: 监控指标数据的维度信息,根据tags来筛选指标数据不同的维度(Optional) */
func (r *DescribeMetricDataRequest) SetTags(tags []monitor.TagFilter) {
r.Tags = tags
}
/* param groupBy: 是否对查询的tags分组(Optional) */
func (r *DescribeMetricDataRequest) SetGroupBy(groupBy bool) {
r.GroupBy = &groupBy
}
/* param rate: 是否求速率。仅对累积类型指标有意义(Optional) */
func (r *DescribeMetricDataRequest) SetRate(rate bool) {
r.Rate = &rate
}
/* param serviceCode: 资源的类型,取值vm, lb, ip, database 等,<a href="https://docs.jdcloud.com/cn/monitoring/api/describeservices?content=API&SOP=JDCloud">describeServices</a>:查询己接入云监控的产品线列表(Optional) */
func (r *DescribeMetricDataRequest) SetServiceCode(serviceCode string) {
r.ServiceCode = &serviceCode
}
/* param dimension: 资源的维度。查询serviceCode下可用的维度请使用describeServices接口(Optional) */
func (r *DescribeMetricDataRequest) SetDimension(dimension string) {
r.Dimension = &dimension
}
/* param resourceId: 资源的uuid(Required) */
func (r *DescribeMetricDataRequest) SetResourceId(resourceId string) {
r.ResourceId = resourceId
}
// GetRegionId returns path parameter 'regionId' if exist,
// otherwise return empty string
func (r DescribeMetricDataRequest) GetRegionId() string {
return r.RegionId
}
type DescribeMetricDataResponse struct {
RequestID string `json:"requestId"`
Error core.ErrorResponse `json:"error"`
Result DescribeMetricDataResult `json:"result"`
}
type DescribeMetricDataResult struct {
MetricDatas []monitor.MetricData `json:"metricDatas"`
}
@@ -0,0 +1,124 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package apis
import (
"github.com/jdcloud-api/jdcloud-sdk-go/core"
monitor "github.com/jdcloud-api/jdcloud-sdk-go/services/monitor/models"
)
type DescribeMetricsRequest struct {
core.JDCloudRequest
/* 资源的类型,取值vm, lb, ip, database 等。<a href="https://docs.jdcloud.com/cn/monitoring/api/describeservices?content=API&SOP=JDCloud">describeServices</a>:查询己接入云监控的产品线列表 */
ServiceCode string `json:"serviceCode"`
/* (Optional) */
Dimension *string `json:"dimension"`
/* metric的类型,取值0(控制台展示)、1(内部使用,控制台不展示)、2(所有).默认取0 (Optional) */
Type *int `json:"type"`
}
/*
* param serviceCode: 资源的类型,取值vm, lb, ip, database 等。<a href="https://docs.jdcloud.com/cn/monitoring/api/describeservices?content=API&SOP=JDCloud">describeServices</a>:查询己接入云监控的产品线列表 (Required)
*
* @Deprecated, not compatible when mandatory parameters changed
*/
func NewDescribeMetricsRequest(
serviceCode string,
) *DescribeMetricsRequest {
return &DescribeMetricsRequest{
JDCloudRequest: core.JDCloudRequest{
URL: "/metrics",
Method: "GET",
Header: nil,
Version: "v2",
},
ServiceCode: serviceCode,
}
}
/*
* param serviceCode: 资源的类型,取值vm, lb, ip, database 等。<a href="https://docs.jdcloud.com/cn/monitoring/api/describeservices?content=API&SOP=JDCloud">describeServices</a>:查询己接入云监控的产品线列表 (Required)
* param dimension: (Optional)
* param type_: metric的类型,取值0(控制台展示)、1(内部使用,控制台不展示)、2(所有).默认取0 (Optional)
*/
func NewDescribeMetricsRequestWithAllParams(
serviceCode string,
dimension *string,
type_ *int,
) *DescribeMetricsRequest {
return &DescribeMetricsRequest{
JDCloudRequest: core.JDCloudRequest{
URL: "/metrics",
Method: "GET",
Header: nil,
Version: "v2",
},
ServiceCode: serviceCode,
Dimension: dimension,
Type: type_,
}
}
/* This constructor has better compatible ability when API parameters changed */
func NewDescribeMetricsRequestWithoutParam() *DescribeMetricsRequest {
return &DescribeMetricsRequest{
JDCloudRequest: core.JDCloudRequest{
URL: "/metrics",
Method: "GET",
Header: nil,
Version: "v2",
},
}
}
/* param serviceCode: 资源的类型,取值vm, lb, ip, database 等。<a href="https://docs.jdcloud.com/cn/monitoring/api/describeservices?content=API&SOP=JDCloud">describeServices</a>:查询己接入云监控的产品线列表(Required) */
func (r *DescribeMetricsRequest) SetServiceCode(serviceCode string) {
r.ServiceCode = serviceCode
}
/* param dimension: (Optional) */
func (r *DescribeMetricsRequest) SetDimension(dimension string) {
r.Dimension = &dimension
}
/* param type_: metric的类型,取值0(控制台展示)、1(内部使用,控制台不展示)、2(所有).默认取0(Optional) */
func (r *DescribeMetricsRequest) SetType(type_ int) {
r.Type = &type_
}
// GetRegionId returns path parameter 'regionId' if exist,
// otherwise return empty string
func (r DescribeMetricsRequest) GetRegionId() string {
return ""
}
type DescribeMetricsResponse struct {
RequestID string `json:"requestId"`
Error core.ErrorResponse `json:"error"`
Result DescribeMetricsResult `json:"result"`
}
type DescribeMetricsResult struct {
Metrics []monitor.MetricDetail `json:"metrics"`
}
@@ -0,0 +1,132 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package apis
import (
"github.com/jdcloud-api/jdcloud-sdk-go/core"
monitor "github.com/jdcloud-api/jdcloud-sdk-go/services/monitor/models"
)
type DescribeMetricsForAlarmRequest struct {
core.JDCloudRequest
/* 产品线 (Optional) */
ServiceCode *string `json:"serviceCode"`
/* 产品类型,如redis2.8cluster(集群)\redis2.8MS(主从)。当serviceCode与product同时指定时,product优先级更高 (Optional) */
Product *string `json:"product"`
/* 产品维度,必须指定serviceCode或product才生效。 (Optional) */
Dimension *string `json:"dimension"`
/* metric类型,取值0、1;默认值:0(常规指标,用于控制台创建报警规则)、1(其它) (Optional) */
MetricType *int `json:"metricType"`
}
/*
*
* @Deprecated, not compatible when mandatory parameters changed
*/
func NewDescribeMetricsForAlarmRequest(
) *DescribeMetricsForAlarmRequest {
return &DescribeMetricsForAlarmRequest{
JDCloudRequest: core.JDCloudRequest{
URL: "/groupAlarms:metrics",
Method: "GET",
Header: nil,
Version: "v2",
},
}
}
/*
* param serviceCode: 产品线 (Optional)
* param product: 产品类型,如redis2.8cluster(集群)\redis2.8MS(主从)。当serviceCode与product同时指定时,product优先级更高 (Optional)
* param dimension: 产品维度,必须指定serviceCode或product才生效。 (Optional)
* param metricType: metric类型,取值0、1;默认值:0(常规指标,用于控制台创建报警规则)、1(其它) (Optional)
*/
func NewDescribeMetricsForAlarmRequestWithAllParams(
serviceCode *string,
product *string,
dimension *string,
metricType *int,
) *DescribeMetricsForAlarmRequest {
return &DescribeMetricsForAlarmRequest{
JDCloudRequest: core.JDCloudRequest{
URL: "/groupAlarms:metrics",
Method: "GET",
Header: nil,
Version: "v2",
},
ServiceCode: serviceCode,
Product: product,
Dimension: dimension,
MetricType: metricType,
}
}
/* This constructor has better compatible ability when API parameters changed */
func NewDescribeMetricsForAlarmRequestWithoutParam() *DescribeMetricsForAlarmRequest {
return &DescribeMetricsForAlarmRequest{
JDCloudRequest: core.JDCloudRequest{
URL: "/groupAlarms:metrics",
Method: "GET",
Header: nil,
Version: "v2",
},
}
}
/* param serviceCode: 产品线(Optional) */
func (r *DescribeMetricsForAlarmRequest) SetServiceCode(serviceCode string) {
r.ServiceCode = &serviceCode
}
/* param product: 产品类型,如redis2.8cluster(集群)\redis2.8MS(主从)。当serviceCode与product同时指定时,product优先级更高(Optional) */
func (r *DescribeMetricsForAlarmRequest) SetProduct(product string) {
r.Product = &product
}
/* param dimension: 产品维度,必须指定serviceCode或product才生效。(Optional) */
func (r *DescribeMetricsForAlarmRequest) SetDimension(dimension string) {
r.Dimension = &dimension
}
/* param metricType: metric类型,取值0、1;默认值:0(常规指标,用于控制台创建报警规则)、1(其它)(Optional) */
func (r *DescribeMetricsForAlarmRequest) SetMetricType(metricType int) {
r.MetricType = &metricType
}
// GetRegionId returns path parameter 'regionId' if exist,
// otherwise return empty string
func (r DescribeMetricsForAlarmRequest) GetRegionId() string {
return ""
}
type DescribeMetricsForAlarmResponse struct {
RequestID string `json:"requestId"`
Error core.ErrorResponse `json:"error"`
Result DescribeMetricsForAlarmResult `json:"result"`
}
type DescribeMetricsForAlarmResult struct {
Metrics []monitor.RuleMetricDetail `json:"metrics"`
}
@@ -0,0 +1,110 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package apis
import (
"github.com/jdcloud-api/jdcloud-sdk-go/core"
monitor "github.com/jdcloud-api/jdcloud-sdk-go/services/monitor/models"
)
type DescribeProductsForAlarmRequest struct {
core.JDCloudRequest
/* 产品线,从产品线维度筛选 (Optional) */
ServiceCode *string `json:"serviceCode"`
/* 产品类型,从产品维度筛选、如redis2.8cluster\redis2.8instance。当serviceCode与product同时指定时,product优先级更高 (Optional) */
Product *string `json:"product"`
}
/*
*
* @Deprecated, not compatible when mandatory parameters changed
*/
func NewDescribeProductsForAlarmRequest(
) *DescribeProductsForAlarmRequest {
return &DescribeProductsForAlarmRequest{
JDCloudRequest: core.JDCloudRequest{
URL: "/groupAlarms:products",
Method: "GET",
Header: nil,
Version: "v2",
},
}
}
/*
* param serviceCode: 产品线,从产品线维度筛选 (Optional)
* param product: 产品类型,从产品维度筛选、如redis2.8cluster\redis2.8instance。当serviceCode与product同时指定时,product优先级更高 (Optional)
*/
func NewDescribeProductsForAlarmRequestWithAllParams(
serviceCode *string,
product *string,
) *DescribeProductsForAlarmRequest {
return &DescribeProductsForAlarmRequest{
JDCloudRequest: core.JDCloudRequest{
URL: "/groupAlarms:products",
Method: "GET",
Header: nil,
Version: "v2",
},
ServiceCode: serviceCode,
Product: product,
}
}
/* This constructor has better compatible ability when API parameters changed */
func NewDescribeProductsForAlarmRequestWithoutParam() *DescribeProductsForAlarmRequest {
return &DescribeProductsForAlarmRequest{
JDCloudRequest: core.JDCloudRequest{
URL: "/groupAlarms:products",
Method: "GET",
Header: nil,
Version: "v2",
},
}
}
/* param serviceCode: 产品线,从产品线维度筛选(Optional) */
func (r *DescribeProductsForAlarmRequest) SetServiceCode(serviceCode string) {
r.ServiceCode = &serviceCode
}
/* param product: 产品类型,从产品维度筛选、如redis2.8cluster\redis2.8instance。当serviceCode与product同时指定时,product优先级更高(Optional) */
func (r *DescribeProductsForAlarmRequest) SetProduct(product string) {
r.Product = &product
}
// GetRegionId returns path parameter 'regionId' if exist,
// otherwise return empty string
func (r DescribeProductsForAlarmRequest) GetRegionId() string {
return ""
}
type DescribeProductsForAlarmResponse struct {
RequestID string `json:"requestId"`
Error core.ErrorResponse `json:"error"`
Result DescribeProductsForAlarmResult `json:"result"`
}
type DescribeProductsForAlarmResult struct {
ProductList []monitor.Product `json:"productList"`
}
@@ -0,0 +1,113 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package apis
import (
"github.com/jdcloud-api/jdcloud-sdk-go/core"
monitor "github.com/jdcloud-api/jdcloud-sdk-go/services/monitor/models"
)
type DescribeServicesRequest struct {
core.JDCloudRequest
/* 服务码列表
filter name 为serviceCodes表示查询多个产品线的规则 (Optional) */
Filters []monitor.Filter `json:"filters"`
/* 要查询的产品线类型 0:all 1:资源监控 2:其它 默认:1。若指定了查询的serviceCode,则忽略该参数 (Optional) */
ProductType *int `json:"productType"`
}
/*
*
* @Deprecated, not compatible when mandatory parameters changed
*/
func NewDescribeServicesRequest(
) *DescribeServicesRequest {
return &DescribeServicesRequest{
JDCloudRequest: core.JDCloudRequest{
URL: "/services",
Method: "GET",
Header: nil,
Version: "v2",
},
}
}
/*
* param filters: 服务码列表
filter name 为serviceCodes表示查询多个产品线的规则 (Optional)
* param productType: 要查询的产品线类型 0:all 1:资源监控 2:其它 默认:1。若指定了查询的serviceCode,则忽略该参数 (Optional)
*/
func NewDescribeServicesRequestWithAllParams(
filters []monitor.Filter,
productType *int,
) *DescribeServicesRequest {
return &DescribeServicesRequest{
JDCloudRequest: core.JDCloudRequest{
URL: "/services",
Method: "GET",
Header: nil,
Version: "v2",
},
Filters: filters,
ProductType: productType,
}
}
/* This constructor has better compatible ability when API parameters changed */
func NewDescribeServicesRequestWithoutParam() *DescribeServicesRequest {
return &DescribeServicesRequest{
JDCloudRequest: core.JDCloudRequest{
URL: "/services",
Method: "GET",
Header: nil,
Version: "v2",
},
}
}
/* param filters: 服务码列表
filter name 为serviceCodes表示查询多个产品线的规则(Optional) */
func (r *DescribeServicesRequest) SetFilters(filters []monitor.Filter) {
r.Filters = filters
}
/* param productType: 要查询的产品线类型 0:all 1:资源监控 2:其它 默认:1。若指定了查询的serviceCode,则忽略该参数(Optional) */
func (r *DescribeServicesRequest) SetProductType(productType int) {
r.ProductType = &productType
}
// GetRegionId returns path parameter 'regionId' if exist,
// otherwise return empty string
func (r DescribeServicesRequest) GetRegionId() string {
return ""
}
type DescribeServicesResponse struct {
RequestID string `json:"requestId"`
Error core.ErrorResponse `json:"error"`
Result DescribeServicesResult `json:"result"`
}
type DescribeServicesResult struct {
Services []monitor.ServiceInfoV2 `json:"services"`
}
@@ -0,0 +1,199 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package apis
import (
"github.com/jdcloud-api/jdcloud-sdk-go/core"
monitor "github.com/jdcloud-api/jdcloud-sdk-go/services/monitor/models"
)
type DescribeTagValuesRequest struct {
core.JDCloudRequest
/* region */
RegionId string `json:"regionId"`
/* region */
TagKey string `json:"tagKey"`
/* serviceCode */
ServiceCode string `json:"serviceCode"`
/* 资源标识 */
ResourceId string `json:"resourceId"`
/* metric (Optional) */
Metric *string `json:"metric"`
/* 查询时间范围的开始时间(如不传,则默认为1时前), UTC时间,格式:2016-12-11T00:00:00+0800(注意在url中+,:要转译,如2019-10-23T10%3A33%3A31%2B0800)。对于非连续的时序数据,开始时间无法保证准确性 (Optional) */
StartTime *string `json:"startTime"`
/* 查询时间范围的结束时间(如不传,则默认为当前), UTC时间,格式:2016-12-11T00:00:00+0800(注意在url中+,:要转译,如2019-10-23T10%3A33%3A31%2B0800).对于非连续的时序数据,结束时间无法保证准确性 (Optional) */
EndTime *string `json:"endTime"`
/* 时间间隔:1h,6h,12h,1d,3d,7d,14d,固定时间间隔,timeInterval默认为1h,当前时间往 前1h (Optional) */
TimeInterval *string `json:"timeInterval"`
/* 根据tags进行筛选(传入*和不传的效果一致) (Optional) */
Tags []monitor.TagFilter `json:"tags"`
}
/*
* param regionId: region (Required)
* param tagKey: region (Required)
* param serviceCode: serviceCode (Required)
* param resourceId: 资源标识 (Required)
*
* @Deprecated, not compatible when mandatory parameters changed
*/
func NewDescribeTagValuesRequest(
regionId string,
tagKey string,
serviceCode string,
resourceId string,
) *DescribeTagValuesRequest {
return &DescribeTagValuesRequest{
JDCloudRequest: core.JDCloudRequest{
URL: "/regions/{regionId}/tagValues/{tagKey}",
Method: "GET",
Header: nil,
Version: "v2",
},
RegionId: regionId,
TagKey: tagKey,
ServiceCode: serviceCode,
ResourceId: resourceId,
}
}
/*
* param regionId: region (Required)
* param tagKey: region (Required)
* param serviceCode: serviceCode (Required)
* param resourceId: 资源标识 (Required)
* param metric: metric (Optional)
* param startTime: 查询时间范围的开始时间(如不传,则默认为1时前), UTC时间,格式:2016-12-11T00:00:00+0800(注意在url中+,:要转译,如2019-10-23T10%3A33%3A31%2B0800)。对于非连续的时序数据,开始时间无法保证准确性 (Optional)
* param endTime: 查询时间范围的结束时间(如不传,则默认为当前), UTC时间,格式:2016-12-11T00:00:00+0800(注意在url中+,:要转译,如2019-10-23T10%3A33%3A31%2B0800).对于非连续的时序数据,结束时间无法保证准确性 (Optional)
* param timeInterval: 时间间隔:1h,6h,12h,1d,3d,7d,14d,固定时间间隔,timeInterval默认为1h,当前时间往 前1h (Optional)
* param tags: 根据tags进行筛选(传入*和不传的效果一致) (Optional)
*/
func NewDescribeTagValuesRequestWithAllParams(
regionId string,
tagKey string,
serviceCode string,
resourceId string,
metric *string,
startTime *string,
endTime *string,
timeInterval *string,
tags []monitor.TagFilter,
) *DescribeTagValuesRequest {
return &DescribeTagValuesRequest{
JDCloudRequest: core.JDCloudRequest{
URL: "/regions/{regionId}/tagValues/{tagKey}",
Method: "GET",
Header: nil,
Version: "v2",
},
RegionId: regionId,
TagKey: tagKey,
ServiceCode: serviceCode,
ResourceId: resourceId,
Metric: metric,
StartTime: startTime,
EndTime: endTime,
TimeInterval: timeInterval,
Tags: tags,
}
}
/* This constructor has better compatible ability when API parameters changed */
func NewDescribeTagValuesRequestWithoutParam() *DescribeTagValuesRequest {
return &DescribeTagValuesRequest{
JDCloudRequest: core.JDCloudRequest{
URL: "/regions/{regionId}/tagValues/{tagKey}",
Method: "GET",
Header: nil,
Version: "v2",
},
}
}
/* param regionId: region(Required) */
func (r *DescribeTagValuesRequest) SetRegionId(regionId string) {
r.RegionId = regionId
}
/* param tagKey: region(Required) */
func (r *DescribeTagValuesRequest) SetTagKey(tagKey string) {
r.TagKey = tagKey
}
/* param serviceCode: serviceCode(Required) */
func (r *DescribeTagValuesRequest) SetServiceCode(serviceCode string) {
r.ServiceCode = serviceCode
}
/* param resourceId: 资源标识(Required) */
func (r *DescribeTagValuesRequest) SetResourceId(resourceId string) {
r.ResourceId = resourceId
}
/* param metric: metric(Optional) */
func (r *DescribeTagValuesRequest) SetMetric(metric string) {
r.Metric = &metric
}
/* param startTime: 查询时间范围的开始时间(如不传,则默认为1时前), UTC时间,格式:2016-12-11T00:00:00+0800(注意在url中+,:要转译,如2019-10-23T10%3A33%3A31%2B0800)。对于非连续的时序数据,开始时间无法保证准确性(Optional) */
func (r *DescribeTagValuesRequest) SetStartTime(startTime string) {
r.StartTime = &startTime
}
/* param endTime: 查询时间范围的结束时间(如不传,则默认为当前), UTC时间,格式:2016-12-11T00:00:00+0800(注意在url中+,:要转译,如2019-10-23T10%3A33%3A31%2B0800).对于非连续的时序数据,结束时间无法保证准确性(Optional) */
func (r *DescribeTagValuesRequest) SetEndTime(endTime string) {
r.EndTime = &endTime
}
/* param timeInterval: 时间间隔:1h,6h,12h,1d,3d,7d,14d,固定时间间隔,timeInterval默认为1h,当前时间往 前1h(Optional) */
func (r *DescribeTagValuesRequest) SetTimeInterval(timeInterval string) {
r.TimeInterval = &timeInterval
}
/* param tags: 根据tags进行筛选(传入*和不传的效果一致)(Optional) */
func (r *DescribeTagValuesRequest) SetTags(tags []monitor.TagFilter) {
r.Tags = tags
}
// GetRegionId returns path parameter 'regionId' if exist,
// otherwise return empty string
func (r DescribeTagValuesRequest) GetRegionId() string {
return r.RegionId
}
type DescribeTagValuesResponse struct {
RequestID string `json:"requestId"`
Error core.ErrorResponse `json:"error"`
Result DescribeTagValuesResult `json:"result"`
}
type DescribeTagValuesResult struct {
TagValues []string `json:"tagValues"`
}
@@ -0,0 +1,112 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package apis
import (
"github.com/jdcloud-api/jdcloud-sdk-go/core"
)
type EnableAlarmsRequest struct {
core.JDCloudRequest
/* 告警规则的ID列表 */
AlarmIds []string `json:"alarmIds"`
/* 启用:1,禁用0, (Optional) */
State *int `json:"state"`
}
/*
* param alarmIds: 告警规则的ID列表 (Required)
*
* @Deprecated, not compatible when mandatory parameters changed
*/
func NewEnableAlarmsRequest(
alarmIds []string,
) *EnableAlarmsRequest {
return &EnableAlarmsRequest{
JDCloudRequest: core.JDCloudRequest{
URL: "/groupAlarms:switch",
Method: "POST",
Header: nil,
Version: "v2",
},
AlarmIds: alarmIds,
}
}
/*
* param alarmIds: 告警规则的ID列表 (Required)
* param state: 启用:1,禁用0, (Optional)
*/
func NewEnableAlarmsRequestWithAllParams(
alarmIds []string,
state *int,
) *EnableAlarmsRequest {
return &EnableAlarmsRequest{
JDCloudRequest: core.JDCloudRequest{
URL: "/groupAlarms:switch",
Method: "POST",
Header: nil,
Version: "v2",
},
AlarmIds: alarmIds,
State: state,
}
}
/* This constructor has better compatible ability when API parameters changed */
func NewEnableAlarmsRequestWithoutParam() *EnableAlarmsRequest {
return &EnableAlarmsRequest{
JDCloudRequest: core.JDCloudRequest{
URL: "/groupAlarms:switch",
Method: "POST",
Header: nil,
Version: "v2",
},
}
}
/* param alarmIds: 告警规则的ID列表(Required) */
func (r *EnableAlarmsRequest) SetAlarmIds(alarmIds []string) {
r.AlarmIds = alarmIds
}
/* param state: 启用:1,禁用0,(Optional) */
func (r *EnableAlarmsRequest) SetState(state int) {
r.State = &state
}
// GetRegionId returns path parameter 'regionId' if exist,
// otherwise return empty string
func (r EnableAlarmsRequest) GetRegionId() string {
return ""
}
type EnableAlarmsResponse struct {
RequestID string `json:"requestId"`
Error core.ErrorResponse `json:"error"`
Result EnableAlarmsResult `json:"result"`
}
type EnableAlarmsResult struct {
Success bool `json:"success"`
}
@@ -0,0 +1,232 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package apis
import (
"github.com/jdcloud-api/jdcloud-sdk-go/core"
monitor "github.com/jdcloud-api/jdcloud-sdk-go/services/monitor/models"
)
type LastDownsampleRequest struct {
core.JDCloudRequest
/* 地域 Id */
RegionId string `json:"regionId"`
/* 监控项英文标识(id) */
Metric string `json:"metric"`
/* 资源的类型,取值vm, lb, ip, database 等。可用的serviceCode请使用describeServices接口查询 */
ServiceCode string `json:"serviceCode"`
/* 资源的维度。serviceCode下可用的dimension请使用describeServices接口查询 (Optional) */
Dimension *string `json:"dimension"`
/* 资源的uuid,支持多个resourceId批量查询,每个id用竖线分隔。 如:id1|id2|id3|id4 */
ResourceId string `json:"resourceId"`
/* 自定义标签 (Optional) */
Tags []monitor.TagFilter `json:"tags"`
/* 查询时间范围的开始时间, UTC时间,格式:2016-12-11T00:00:00+0800(早于30d时,将被重置为30d)(注意在url中+要转译为%2B故url中为2016-12-11T00:00:00%2B0800) (Optional) */
StartTime *string `json:"startTime"`
/* 查询时间范围的结束时间, UTC时间,格式:2016-12-11T00:00:00+0800(为空时,将由startTime与timeInterval计算得出)(注意在url中+要转译为%2B故url中为2016-12-11T00:00:00%2B0800) (Optional) */
EndTime *string `json:"endTime"`
/* 查询的时间间隔,最大不超过30天,支持分钟级别,小时级别,天级别,例如:1m、1h、1d (Optional) */
TimeInterval *string `json:"timeInterval"`
/* 聚合方式:max avg min等,用于不同维度之间聚合 (Optional) */
AggrType *string `json:"aggrType"`
/* 聚合方式:max avg min等,用于将维度内一个周期数据聚合为一个点的聚合方式,默认last (Optional) */
DownAggrType *string `json:"downAggrType"`
/* 时间偏移,可传入30s、1m、1h、1d等数字+单位的形式(其中s秒,m分,h时,d天),当业务侧数据上报存在延迟时,可以传入该参数,该参数会使查询的时间段整体向前偏移.偏移后的开始时间若早于30天前,则开始时间自动设置为30天前;若偏移后结束时间早于30天前,则无效 (Optional) */
TimeOffset *string `json:"timeOffset"`
}
/*
* param regionId: 地域 Id (Required)
* param metric: 监控项英文标识(id) (Required)
* param serviceCode: 资源的类型,取值vm, lb, ip, database 等。可用的serviceCode请使用describeServices接口查询 (Required)
* param resourceId: 资源的uuid,支持多个resourceId批量查询,每个id用竖线分隔。 如:id1|id2|id3|id4 (Required)
*
* @Deprecated, not compatible when mandatory parameters changed
*/
func NewLastDownsampleRequest(
regionId string,
metric string,
serviceCode string,
resourceId string,
) *LastDownsampleRequest {
return &LastDownsampleRequest{
JDCloudRequest: core.JDCloudRequest{
URL: "/regions/{regionId}/metrics/{metric}/lastDownsample",
Method: "GET",
Header: nil,
Version: "v2",
},
RegionId: regionId,
Metric: metric,
ServiceCode: serviceCode,
ResourceId: resourceId,
}
}
/*
* param regionId: 地域 Id (Required)
* param metric: 监控项英文标识(id) (Required)
* param serviceCode: 资源的类型,取值vm, lb, ip, database 等。可用的serviceCode请使用describeServices接口查询 (Required)
* param dimension: 资源的维度。serviceCode下可用的dimension请使用describeServices接口查询 (Optional)
* param resourceId: 资源的uuid,支持多个resourceId批量查询,每个id用竖线分隔。 如:id1|id2|id3|id4 (Required)
* param tags: 自定义标签 (Optional)
* param startTime: 查询时间范围的开始时间, UTC时间,格式:2016-12-11T00:00:00+0800(早于30d时,将被重置为30d)(注意在url中+要转译为%2B故url中为2016-12-11T00:00:00%2B0800) (Optional)
* param endTime: 查询时间范围的结束时间, UTC时间,格式:2016-12-11T00:00:00+0800(为空时,将由startTime与timeInterval计算得出)(注意在url中+要转译为%2B故url中为2016-12-11T00:00:00%2B0800) (Optional)
* param timeInterval: 查询的时间间隔,最大不超过30天,支持分钟级别,小时级别,天级别,例如:1m、1h、1d (Optional)
* param aggrType: 聚合方式:max avg min等,用于不同维度之间聚合 (Optional)
* param downAggrType: 聚合方式:max avg min等,用于将维度内一个周期数据聚合为一个点的聚合方式,默认last (Optional)
* param timeOffset: 时间偏移,可传入30s、1m、1h、1d等数字+单位的形式(其中s秒,m分,h时,d天),当业务侧数据上报存在延迟时,可以传入该参数,该参数会使查询的时间段整体向前偏移.偏移后的开始时间若早于30天前,则开始时间自动设置为30天前;若偏移后结束时间早于30天前,则无效 (Optional)
*/
func NewLastDownsampleRequestWithAllParams(
regionId string,
metric string,
serviceCode string,
dimension *string,
resourceId string,
tags []monitor.TagFilter,
startTime *string,
endTime *string,
timeInterval *string,
aggrType *string,
downAggrType *string,
timeOffset *string,
) *LastDownsampleRequest {
return &LastDownsampleRequest{
JDCloudRequest: core.JDCloudRequest{
URL: "/regions/{regionId}/metrics/{metric}/lastDownsample",
Method: "GET",
Header: nil,
Version: "v2",
},
RegionId: regionId,
Metric: metric,
ServiceCode: serviceCode,
Dimension: dimension,
ResourceId: resourceId,
Tags: tags,
StartTime: startTime,
EndTime: endTime,
TimeInterval: timeInterval,
AggrType: aggrType,
DownAggrType: downAggrType,
TimeOffset: timeOffset,
}
}
/* This constructor has better compatible ability when API parameters changed */
func NewLastDownsampleRequestWithoutParam() *LastDownsampleRequest {
return &LastDownsampleRequest{
JDCloudRequest: core.JDCloudRequest{
URL: "/regions/{regionId}/metrics/{metric}/lastDownsample",
Method: "GET",
Header: nil,
Version: "v2",
},
}
}
/* param regionId: 地域 Id(Required) */
func (r *LastDownsampleRequest) SetRegionId(regionId string) {
r.RegionId = regionId
}
/* param metric: 监控项英文标识(id)(Required) */
func (r *LastDownsampleRequest) SetMetric(metric string) {
r.Metric = metric
}
/* param serviceCode: 资源的类型,取值vm, lb, ip, database 等。可用的serviceCode请使用describeServices接口查询(Required) */
func (r *LastDownsampleRequest) SetServiceCode(serviceCode string) {
r.ServiceCode = serviceCode
}
/* param dimension: 资源的维度。serviceCode下可用的dimension请使用describeServices接口查询(Optional) */
func (r *LastDownsampleRequest) SetDimension(dimension string) {
r.Dimension = &dimension
}
/* param resourceId: 资源的uuid,支持多个resourceId批量查询,每个id用竖线分隔。 如:id1|id2|id3|id4(Required) */
func (r *LastDownsampleRequest) SetResourceId(resourceId string) {
r.ResourceId = resourceId
}
/* param tags: 自定义标签(Optional) */
func (r *LastDownsampleRequest) SetTags(tags []monitor.TagFilter) {
r.Tags = tags
}
/* param startTime: 查询时间范围的开始时间, UTC时间,格式:2016-12-11T00:00:00+0800(早于30d时,将被重置为30d)(注意在url中+要转译为%2B故url中为2016-12-11T00:00:00%2B0800)(Optional) */
func (r *LastDownsampleRequest) SetStartTime(startTime string) {
r.StartTime = &startTime
}
/* param endTime: 查询时间范围的结束时间, UTC时间,格式:2016-12-11T00:00:00+0800(为空时,将由startTime与timeInterval计算得出)(注意在url中+要转译为%2B故url中为2016-12-11T00:00:00%2B0800)(Optional) */
func (r *LastDownsampleRequest) SetEndTime(endTime string) {
r.EndTime = &endTime
}
/* param timeInterval: 查询的时间间隔,最大不超过30天,支持分钟级别,小时级别,天级别,例如:1m、1h、1d(Optional) */
func (r *LastDownsampleRequest) SetTimeInterval(timeInterval string) {
r.TimeInterval = &timeInterval
}
/* param aggrType: 聚合方式:max avg min等,用于不同维度之间聚合(Optional) */
func (r *LastDownsampleRequest) SetAggrType(aggrType string) {
r.AggrType = &aggrType
}
/* param downAggrType: 聚合方式:max avg min等,用于将维度内一个周期数据聚合为一个点的聚合方式,默认last(Optional) */
func (r *LastDownsampleRequest) SetDownAggrType(downAggrType string) {
r.DownAggrType = &downAggrType
}
/* param timeOffset: 时间偏移,可传入30s、1m、1h、1d等数字+单位的形式(其中s秒,m分,h时,d天),当业务侧数据上报存在延迟时,可以传入该参数,该参数会使查询的时间段整体向前偏移.偏移后的开始时间若早于30天前,则开始时间自动设置为30天前;若偏移后结束时间早于30天前,则无效(Optional) */
func (r *LastDownsampleRequest) SetTimeOffset(timeOffset string) {
r.TimeOffset = &timeOffset
}
// GetRegionId returns path parameter 'regionId' if exist,
// otherwise return empty string
func (r LastDownsampleRequest) GetRegionId() string {
return r.RegionId
}
type LastDownsampleResponse struct {
RequestID string `json:"requestId"`
Error core.ErrorResponse `json:"error"`
Result LastDownsampleResult `json:"result"`
}
type LastDownsampleResult struct {
Items []monitor.LastDownsampleRespItem `json:"items"`
}
@@ -0,0 +1,100 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package apis
import (
"github.com/jdcloud-api/jdcloud-sdk-go/core"
monitor "github.com/jdcloud-api/jdcloud-sdk-go/services/monitor/models"
)
type PutCustomMetricDataRequest struct {
core.JDCloudRequest
/* 数据参数 (Optional) */
MetricDataList []monitor.MetricDataCm `json:"metricDataList"`
}
/*
*
* @Deprecated, not compatible when mandatory parameters changed
*/
func NewPutCustomMetricDataRequest(
) *PutCustomMetricDataRequest {
return &PutCustomMetricDataRequest{
JDCloudRequest: core.JDCloudRequest{
URL: "/customMetrics",
Method: "POST",
Header: nil,
Version: "v2",
},
}
}
/*
* param metricDataList: 数据参数 (Optional)
*/
func NewPutCustomMetricDataRequestWithAllParams(
metricDataList []monitor.MetricDataCm,
) *PutCustomMetricDataRequest {
return &PutCustomMetricDataRequest{
JDCloudRequest: core.JDCloudRequest{
URL: "/customMetrics",
Method: "POST",
Header: nil,
Version: "v2",
},
MetricDataList: metricDataList,
}
}
/* This constructor has better compatible ability when API parameters changed */
func NewPutCustomMetricDataRequestWithoutParam() *PutCustomMetricDataRequest {
return &PutCustomMetricDataRequest{
JDCloudRequest: core.JDCloudRequest{
URL: "/customMetrics",
Method: "POST",
Header: nil,
Version: "v2",
},
}
}
/* param metricDataList: 数据参数(Optional) */
func (r *PutCustomMetricDataRequest) SetMetricDataList(metricDataList []monitor.MetricDataCm) {
r.MetricDataList = metricDataList
}
// GetRegionId returns path parameter 'regionId' if exist,
// otherwise return empty string
func (r PutCustomMetricDataRequest) GetRegionId() string {
return ""
}
type PutCustomMetricDataResponse struct {
RequestID string `json:"requestId"`
Error core.ErrorResponse `json:"error"`
Result PutCustomMetricDataResult `json:"result"`
}
type PutCustomMetricDataResult struct {
Success bool `json:"success"`
ErrMetricDataList []monitor.MetricDataList `json:"errMetricDataList"`
}
@@ -0,0 +1,100 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package apis
import (
"github.com/jdcloud-api/jdcloud-sdk-go/core"
monitor "github.com/jdcloud-api/jdcloud-sdk-go/services/monitor/models"
)
type PutMetricDataRequest struct {
core.JDCloudRequest
/* 数据参数 (Optional) */
MetricDataList []monitor.MetricDataCm `json:"metricDataList"`
}
/*
*
* @Deprecated, not compatible when mandatory parameters changed
*/
func NewPutMetricDataRequest(
) *PutMetricDataRequest {
return &PutMetricDataRequest{
JDCloudRequest: core.JDCloudRequest{
URL: "/customMetrics",
Method: "POST",
Header: nil,
Version: "v2",
},
}
}
/*
* param metricDataList: 数据参数 (Optional)
*/
func NewPutMetricDataRequestWithAllParams(
metricDataList []monitor.MetricDataCm,
) *PutMetricDataRequest {
return &PutMetricDataRequest{
JDCloudRequest: core.JDCloudRequest{
URL: "/customMetrics",
Method: "POST",
Header: nil,
Version: "v2",
},
MetricDataList: metricDataList,
}
}
/* This constructor has better compatible ability when API parameters changed */
func NewPutMetricDataRequestWithoutParam() *PutMetricDataRequest {
return &PutMetricDataRequest{
JDCloudRequest: core.JDCloudRequest{
URL: "/customMetrics",
Method: "POST",
Header: nil,
Version: "v2",
},
}
}
/* param metricDataList: 数据参数(Optional) */
func (r *PutMetricDataRequest) SetMetricDataList(metricDataList []monitor.MetricDataCm) {
r.MetricDataList = metricDataList
}
// GetRegionId returns path parameter 'regionId' if exist,
// otherwise return empty string
func (r PutMetricDataRequest) GetRegionId() string {
return ""
}
type PutMetricDataResponse struct {
RequestID string `json:"requestId"`
Error core.ErrorResponse `json:"error"`
Result PutMetricDataResult `json:"result"`
}
type PutMetricDataResult struct {
Success bool `json:"success"`
ErrMetricDataList []monitor.MetricDataList `json:"errMetricDataList"`
}
@@ -0,0 +1,270 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package apis
import (
"github.com/jdcloud-api/jdcloud-sdk-go/core"
monitor "github.com/jdcloud-api/jdcloud-sdk-go/services/monitor/models"
)
type UpdateAlarmRequest struct {
core.JDCloudRequest
/* 规则id */
AlarmId string `json:"alarmId"`
/* 弹性伸缩组Id。注:仅ag\asg产品线内部使用 (Optional) */
AutoScalingPolicyId *string `json:"autoScalingPolicyId"`
/* 告警通知联系人 (Optional) */
BaseContact []monitor.BaseContact `json:"baseContact"`
/* 数据所有者,1云监控控制台; 2云鼎。默认为1 (Optional) */
DataOwner *int64 `json:"dataOwner"`
/* 资源维度,可用的维度请使用 describeProductsForAlarm接口查询 (Optional) */
Dimension *string `json:"dimension"`
/* 是否启用, 1表示启用规则,0表示禁用规则,默认为1 (Optional) */
Enabled *int64 `json:"enabled"`
/* url回调设置数组 (Optional) */
MultiWebHook []monitor.WebHookOption `json:"multiWebHook"`
/* 通知策略 (Optional) */
NoticeOption []monitor.NoticeOption `json:"noticeOption"`
/* 资源类型, 可用的资源类型列表请使用 describeProductsForAlarm接口查询。 */
Product string `json:"product"`
/* */
ResourceOption *monitor.ResourceOption `json:"resourceOption"`
/* 规则名称,规则名称,最大长度42个字符,只允许中英文、数字、''-''和"_" */
RuleName string `json:"ruleName"`
/* */
RuleOption *monitor.RuleOption `json:"ruleOption"`
/* 规则类型, 默认为resourceMonitor (Optional) */
RuleType *string `json:"ruleType"`
/* 资源维度,指定监控数据实例的维度标签,如resourceId=id。(请确认资源的监控数据带有该标签,否则规则会报数据不足) (Optional) */
Tags *interface{} `json:"tags"`
/* (Optional) */
WebHookOption *monitor.WebHookOption `json:"webHookOption"`
}
/*
* param alarmId: 规则id (Required)
* param product: 资源类型, 可用的资源类型列表请使用 describeProductsForAlarm接口查询。 (Required)
* param resourceOption: (Required)
* param ruleName: 规则名称,规则名称,最大长度42个字符,只允许中英文、数字、''-''和"_" (Required)
* param ruleOption: (Required)
*
* @Deprecated, not compatible when mandatory parameters changed
*/
func NewUpdateAlarmRequest(
alarmId string,
product string,
resourceOption *monitor.ResourceOption,
ruleName string,
ruleOption *monitor.RuleOption,
) *UpdateAlarmRequest {
return &UpdateAlarmRequest{
JDCloudRequest: core.JDCloudRequest{
URL: "/groupAlarms/{alarmId}",
Method: "PUT",
Header: nil,
Version: "v2",
},
AlarmId: alarmId,
Product: product,
ResourceOption: resourceOption,
RuleName: ruleName,
RuleOption: ruleOption,
}
}
/*
* param alarmId: 规则id (Required)
* param autoScalingPolicyId: 弹性伸缩组Id。注:仅ag\asg产品线内部使用 (Optional)
* param baseContact: 告警通知联系人 (Optional)
* param dataOwner: 数据所有者,1云监控控制台; 2云鼎。默认为1 (Optional)
* param dimension: 资源维度,可用的维度请使用 describeProductsForAlarm接口查询 (Optional)
* param enabled: 是否启用, 1表示启用规则,0表示禁用规则,默认为1 (Optional)
* param multiWebHook: url回调设置数组 (Optional)
* param noticeOption: 通知策略 (Optional)
* param product: 资源类型, 可用的资源类型列表请使用 describeProductsForAlarm接口查询。 (Required)
* param resourceOption: (Required)
* param ruleName: 规则名称,规则名称,最大长度42个字符,只允许中英文、数字、''-''和"_" (Required)
* param ruleOption: (Required)
* param ruleType: 规则类型, 默认为resourceMonitor (Optional)
* param tags: 资源维度,指定监控数据实例的维度标签,如resourceId=id。(请确认资源的监控数据带有该标签,否则规则会报数据不足) (Optional)
* param webHookOption: (Optional)
*/
func NewUpdateAlarmRequestWithAllParams(
alarmId string,
autoScalingPolicyId *string,
baseContact []monitor.BaseContact,
dataOwner *int64,
dimension *string,
enabled *int64,
multiWebHook []monitor.WebHookOption,
noticeOption []monitor.NoticeOption,
product string,
resourceOption *monitor.ResourceOption,
ruleName string,
ruleOption *monitor.RuleOption,
ruleType *string,
tags *interface{},
webHookOption *monitor.WebHookOption,
) *UpdateAlarmRequest {
return &UpdateAlarmRequest{
JDCloudRequest: core.JDCloudRequest{
URL: "/groupAlarms/{alarmId}",
Method: "PUT",
Header: nil,
Version: "v2",
},
AlarmId: alarmId,
AutoScalingPolicyId: autoScalingPolicyId,
BaseContact: baseContact,
DataOwner: dataOwner,
Dimension: dimension,
Enabled: enabled,
MultiWebHook: multiWebHook,
NoticeOption: noticeOption,
Product: product,
ResourceOption: resourceOption,
RuleName: ruleName,
RuleOption: ruleOption,
RuleType: ruleType,
Tags: tags,
WebHookOption: webHookOption,
}
}
/* This constructor has better compatible ability when API parameters changed */
func NewUpdateAlarmRequestWithoutParam() *UpdateAlarmRequest {
return &UpdateAlarmRequest{
JDCloudRequest: core.JDCloudRequest{
URL: "/groupAlarms/{alarmId}",
Method: "PUT",
Header: nil,
Version: "v2",
},
}
}
/* param alarmId: 规则id(Required) */
func (r *UpdateAlarmRequest) SetAlarmId(alarmId string) {
r.AlarmId = alarmId
}
/* param autoScalingPolicyId: 弹性伸缩组Id。注:仅ag\asg产品线内部使用(Optional) */
func (r *UpdateAlarmRequest) SetAutoScalingPolicyId(autoScalingPolicyId string) {
r.AutoScalingPolicyId = &autoScalingPolicyId
}
/* param baseContact: 告警通知联系人(Optional) */
func (r *UpdateAlarmRequest) SetBaseContact(baseContact []monitor.BaseContact) {
r.BaseContact = baseContact
}
/* param dataOwner: 数据所有者,1云监控控制台; 2云鼎。默认为1(Optional) */
func (r *UpdateAlarmRequest) SetDataOwner(dataOwner int64) {
r.DataOwner = &dataOwner
}
/* param dimension: 资源维度,可用的维度请使用 describeProductsForAlarm接口查询(Optional) */
func (r *UpdateAlarmRequest) SetDimension(dimension string) {
r.Dimension = &dimension
}
/* param enabled: 是否启用, 1表示启用规则,0表示禁用规则,默认为1(Optional) */
func (r *UpdateAlarmRequest) SetEnabled(enabled int64) {
r.Enabled = &enabled
}
/* param multiWebHook: url回调设置数组(Optional) */
func (r *UpdateAlarmRequest) SetMultiWebHook(multiWebHook []monitor.WebHookOption) {
r.MultiWebHook = multiWebHook
}
/* param noticeOption: 通知策略(Optional) */
func (r *UpdateAlarmRequest) SetNoticeOption(noticeOption []monitor.NoticeOption) {
r.NoticeOption = noticeOption
}
/* param product: 资源类型, 可用的资源类型列表请使用 describeProductsForAlarm接口查询。(Required) */
func (r *UpdateAlarmRequest) SetProduct(product string) {
r.Product = product
}
/* param resourceOption: (Required) */
func (r *UpdateAlarmRequest) SetResourceOption(resourceOption *monitor.ResourceOption) {
r.ResourceOption = resourceOption
}
/* param ruleName: 规则名称,规则名称,最大长度42个字符,只允许中英文、数字、''-''和"_"(Required) */
func (r *UpdateAlarmRequest) SetRuleName(ruleName string) {
r.RuleName = ruleName
}
/* param ruleOption: (Required) */
func (r *UpdateAlarmRequest) SetRuleOption(ruleOption *monitor.RuleOption) {
r.RuleOption = ruleOption
}
/* param ruleType: 规则类型, 默认为resourceMonitor(Optional) */
func (r *UpdateAlarmRequest) SetRuleType(ruleType string) {
r.RuleType = &ruleType
}
/* param tags: 资源维度,指定监控数据实例的维度标签,如resourceId=id。(请确认资源的监控数据带有该标签,否则规则会报数据不足)(Optional) */
func (r *UpdateAlarmRequest) SetTags(tags interface{}) {
r.Tags = &tags
}
/* param webHookOption: (Optional) */
func (r *UpdateAlarmRequest) SetWebHookOption(webHookOption *monitor.WebHookOption) {
r.WebHookOption = webHookOption
}
// GetRegionId returns path parameter 'regionId' if exist,
// otherwise return empty string
func (r UpdateAlarmRequest) GetRegionId() string {
return ""
}
type UpdateAlarmResponse struct {
RequestID string `json:"requestId"`
Error core.ErrorResponse `json:"error"`
Result UpdateAlarmResult `json:"result"`
}
type UpdateAlarmResult struct {
AlarmId string `json:"alarmId"`
RuleIds []int64 `json:"ruleIds"`
Success bool `json:"success"`
}
@@ -0,0 +1,419 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package client
import (
"github.com/jdcloud-api/jdcloud-sdk-go/core"
monitor "github.com/jdcloud-api/jdcloud-sdk-go/services/monitor/apis"
"encoding/json"
"errors"
)
type MonitorClient struct {
core.JDCloudClient
}
func NewMonitorClient(credential *core.Credential) *MonitorClient {
if credential == nil {
return nil
}
config := core.NewConfig()
config.SetEndpoint("monitor.jdcloud-api.com")
return &MonitorClient{
core.JDCloudClient{
Credential: *credential,
Config: *config,
ServiceName: "monitor",
Revision: "2.4.5",
Logger: core.NewDefaultLogger(core.LogInfo),
}}
}
func (c *MonitorClient) SetConfig(config *core.Config) {
c.Config = *config
}
func (c *MonitorClient) SetLogger(logger core.Logger) {
c.Logger = logger
}
func (c *MonitorClient) DisableLogger() {
c.Logger = core.NewDummyLogger()
}
/* 创建报警规则 */
func (c *MonitorClient) CreateAlarm(request *monitor.CreateAlarmRequest) (*monitor.CreateAlarmResponse, error) {
if request == nil {
return nil, errors.New("Request object is nil. ")
}
resp, err := c.Send(request, c.ServiceName)
if err != nil {
return nil, err
}
jdResp := &monitor.CreateAlarmResponse{}
err = json.Unmarshal(resp, jdResp)
if err != nil {
c.Logger.Log(core.LogError, "Unmarshal json failed, resp: %s", string(resp))
return nil, err
}
return jdResp, err
}
/* 查看某资源单个监控项数据,metric介绍:<a href="https://docs.jdcloud.com/cn/monitoring/metrics">Metrics</a>,可以使用接口<a href="https://docs.jdcloud.com/cn/monitoring/metrics">describeMetrics</a>:查询产品线可用的metric列表。 */
func (c *MonitorClient) DescribeMetricData(request *monitor.DescribeMetricDataRequest) (*monitor.DescribeMetricDataResponse, error) {
if request == nil {
return nil, errors.New("Request object is nil. ")
}
resp, err := c.Send(request, c.ServiceName)
if err != nil {
return nil, err
}
jdResp := &monitor.DescribeMetricDataResponse{}
err = json.Unmarshal(resp, jdResp)
if err != nil {
c.Logger.Log(core.LogError, "Unmarshal json failed, resp: %s", string(resp))
return nil, err
}
return jdResp, err
}
/* 查询监控图可用的产品线列表 */
func (c *MonitorClient) DescribeServices(request *monitor.DescribeServicesRequest) (*monitor.DescribeServicesResponse, error) {
if request == nil {
return nil, errors.New("Request object is nil. ")
}
resp, err := c.Send(request, c.ServiceName)
if err != nil {
return nil, err
}
jdResp := &monitor.DescribeServicesResponse{}
err = json.Unmarshal(resp, jdResp)
if err != nil {
c.Logger.Log(core.LogError, "Unmarshal json failed, resp: %s", string(resp))
return nil, err
}
return jdResp, err
}
/* 查询可用于创建监控规则的指标列表,metric介绍:<a href="https://docs.jdcloud.com/cn/monitoring/metrics">Metrics</a> */
func (c *MonitorClient) DescribeMetricsForAlarm(request *monitor.DescribeMetricsForAlarmRequest) (*monitor.DescribeMetricsForAlarmResponse, error) {
if request == nil {
return nil, errors.New("Request object is nil. ")
}
resp, err := c.Send(request, c.ServiceName)
if err != nil {
return nil, err
}
jdResp := &monitor.DescribeMetricsForAlarmResponse{}
err = json.Unmarshal(resp, jdResp)
if err != nil {
c.Logger.Log(core.LogError, "Unmarshal json failed, resp: %s", string(resp))
return nil, err
}
return jdResp, err
}
/* 查询规则的报警联系人 */
func (c *MonitorClient) DescribeAlarmContacts(request *monitor.DescribeAlarmContactsRequest) (*monitor.DescribeAlarmContactsResponse, error) {
if request == nil {
return nil, errors.New("Request object is nil. ")
}
resp, err := c.Send(request, c.ServiceName)
if err != nil {
return nil, err
}
jdResp := &monitor.DescribeAlarmContactsResponse{}
err = json.Unmarshal(resp, jdResp)
if err != nil {
c.Logger.Log(core.LogError, "Unmarshal json failed, resp: %s", string(resp))
return nil, err
}
return jdResp, err
}
/* 查询报警历史 */
func (c *MonitorClient) DescribeAlarmHistory(request *monitor.DescribeAlarmHistoryRequest) (*monitor.DescribeAlarmHistoryResponse, error) {
if request == nil {
return nil, errors.New("Request object is nil. ")
}
resp, err := c.Send(request, c.ServiceName)
if err != nil {
return nil, err
}
jdResp := &monitor.DescribeAlarmHistoryResponse{}
err = json.Unmarshal(resp, jdResp)
if err != nil {
c.Logger.Log(core.LogError, "Unmarshal json failed, resp: %s", string(resp))
return nil, err
}
return jdResp, err
}
/* 查询规则详情 */
func (c *MonitorClient) DescribeAlarm(request *monitor.DescribeAlarmRequest) (*monitor.DescribeAlarmResponse, error) {
if request == nil {
return nil, errors.New("Request object is nil. ")
}
resp, err := c.Send(request, c.ServiceName)
if err != nil {
return nil, err
}
jdResp := &monitor.DescribeAlarmResponse{}
err = json.Unmarshal(resp, jdResp)
if err != nil {
c.Logger.Log(core.LogError, "Unmarshal json failed, resp: %s", string(resp))
return nil, err
}
return jdResp, err
}
/* 删除规则 */
func (c *MonitorClient) DeleteAlarms(request *monitor.DeleteAlarmsRequest) (*monitor.DeleteAlarmsResponse, error) {
if request == nil {
return nil, errors.New("Request object is nil. ")
}
resp, err := c.Send(request, c.ServiceName)
if err != nil {
return nil, err
}
jdResp := &monitor.DeleteAlarmsResponse{}
err = json.Unmarshal(resp, jdResp)
if err != nil {
c.Logger.Log(core.LogError, "Unmarshal json failed, resp: %s", string(resp))
return nil, err
}
return jdResp, err
}
/* 根据不同的聚合方式将metric的数据聚合为一个点。downAggrType:last(最后一个点)、max(最大值)、min(最小值)、avg(平均值)。该接口返回值为上报metric的原始值,没有做单位转换。metric介绍:<a href="https://docs.jdcloud.com/cn/monitoring/metrics">Metrics</a> */
func (c *MonitorClient) LastDownsample(request *monitor.LastDownsampleRequest) (*monitor.LastDownsampleResponse, error) {
if request == nil {
return nil, errors.New("Request object is nil. ")
}
resp, err := c.Send(request, c.ServiceName)
if err != nil {
return nil, err
}
jdResp := &monitor.LastDownsampleResponse{}
err = json.Unmarshal(resp, jdResp)
if err != nil {
c.Logger.Log(core.LogError, "Unmarshal json failed, resp: %s", string(resp))
return nil, err
}
return jdResp, err
}
/* 查询可用于创建监控规则的产品列表 */
func (c *MonitorClient) DescribeProductsForAlarm(request *monitor.DescribeProductsForAlarmRequest) (*monitor.DescribeProductsForAlarmResponse, error) {
if request == nil {
return nil, errors.New("Request object is nil. ")
}
resp, err := c.Send(request, c.ServiceName)
if err != nil {
return nil, err
}
jdResp := &monitor.DescribeProductsForAlarmResponse{}
err = json.Unmarshal(resp, jdResp)
if err != nil {
c.Logger.Log(core.LogError, "Unmarshal json failed, resp: %s", string(resp))
return nil, err
}
return jdResp, err
}
/* 修改已创建的报警规则 */
func (c *MonitorClient) UpdateAlarm(request *monitor.UpdateAlarmRequest) (*monitor.UpdateAlarmResponse, error) {
if request == nil {
return nil, errors.New("Request object is nil. ")
}
resp, err := c.Send(request, c.ServiceName)
if err != nil {
return nil, err
}
jdResp := &monitor.UpdateAlarmResponse{}
err = json.Unmarshal(resp, jdResp)
if err != nil {
c.Logger.Log(core.LogError, "Unmarshal json failed, resp: %s", string(resp))
return nil, err
}
return jdResp, err
}
/* 通过指定维度查询自定义监控的数据 */
func (c *MonitorClient) DescribeCustomMetricData(request *monitor.DescribeCustomMetricDataRequest) (*monitor.DescribeCustomMetricDataResponse, error) {
if request == nil {
return nil, errors.New("Request object is nil. ")
}
resp, err := c.Send(request, c.ServiceName)
if err != nil {
return nil, err
}
jdResp := &monitor.DescribeCustomMetricDataResponse{}
err = json.Unmarshal(resp, jdResp)
if err != nil {
c.Logger.Log(core.LogError, "Unmarshal json failed, resp: %s", string(resp))
return nil, err
}
return jdResp, err
}
/* 启用、禁用规则 */
func (c *MonitorClient) EnableAlarms(request *monitor.EnableAlarmsRequest) (*monitor.EnableAlarmsResponse, error) {
if request == nil {
return nil, errors.New("Request object is nil. ")
}
resp, err := c.Send(request, c.ServiceName)
if err != nil {
return nil, err
}
jdResp := &monitor.EnableAlarmsResponse{}
err = json.Unmarshal(resp, jdResp)
if err != nil {
c.Logger.Log(core.LogError, "Unmarshal json failed, resp: %s", string(resp))
return nil, err
}
return jdResp, err
}
/* 查询某资源下指定tag key的tag value */
func (c *MonitorClient) DescribeTagValues(request *monitor.DescribeTagValuesRequest) (*monitor.DescribeTagValuesResponse, error) {
if request == nil {
return nil, errors.New("Request object is nil. ")
}
resp, err := c.Send(request, c.ServiceName)
if err != nil {
return nil, err
}
jdResp := &monitor.DescribeTagValuesResponse{}
err = json.Unmarshal(resp, jdResp)
if err != nil {
c.Logger.Log(core.LogError, "Unmarshal json failed, resp: %s", string(resp))
return nil, err
}
return jdResp, err
}
/* 该接口为自定义监控数据上报的接口,方便您将自己采集的时序数据上报到云监控。不同region域名上报不同region的数据,参考:<a href="https://docs.jdcloud.com/cn/monitoring/reporting-monitoring-data">调用说明</a>可上报原始数据和已聚合的统计数据。支持批量上报方式。单次请求最多包含 50 个数据点;数据大小不超过 256k。 */
func (c *MonitorClient) PutCustomMetricData(request *monitor.PutCustomMetricDataRequest) (*monitor.PutCustomMetricDataResponse, error) {
if request == nil {
return nil, errors.New("Request object is nil. ")
}
resp, err := c.Send(request, c.ServiceName)
if err != nil {
return nil, err
}
jdResp := &monitor.PutCustomMetricDataResponse{}
err = json.Unmarshal(resp, jdResp)
if err != nil {
c.Logger.Log(core.LogError, "Unmarshal json failed, resp: %s", string(resp))
return nil, err
}
return jdResp, err
}
/* 该接口为自定义监控数据上报的接口,方便您将自己采集的时序数据上报到云监控。不同region域名上报不同region的数据,参考:<a href="https://docs.jdcloud.com/cn/monitoring/reporting-monitoring-data">调用说明</a>可上报原始数据和已聚合的统计数据。支持批量上报方式。单次请求最多包含 50 个数据点;数据大小不超过 256k。 */
func (c *MonitorClient) PutMetricData(request *monitor.PutMetricDataRequest) (*monitor.PutMetricDataResponse, error) {
if request == nil {
return nil, errors.New("Request object is nil. ")
}
resp, err := c.Send(request, c.ServiceName)
if err != nil {
return nil, err
}
jdResp := &monitor.PutMetricDataResponse{}
err = json.Unmarshal(resp, jdResp)
if err != nil {
c.Logger.Log(core.LogError, "Unmarshal json failed, resp: %s", string(resp))
return nil, err
}
return jdResp, err
}
/* 查询规则列表 */
func (c *MonitorClient) DescribeAlarms(request *monitor.DescribeAlarmsRequest) (*monitor.DescribeAlarmsResponse, error) {
if request == nil {
return nil, errors.New("Request object is nil. ")
}
resp, err := c.Send(request, c.ServiceName)
if err != nil {
return nil, err
}
jdResp := &monitor.DescribeAlarmsResponse{}
err = json.Unmarshal(resp, jdResp)
if err != nil {
c.Logger.Log(core.LogError, "Unmarshal json failed, resp: %s", string(resp))
return nil, err
}
return jdResp, err
}
/* 根据产品线查询可用监控项列表,metric介绍:<a href="https://docs.jdcloud.com/cn/monitoring/metrics">Metrics</a> */
func (c *MonitorClient) DescribeMetrics(request *monitor.DescribeMetricsRequest) (*monitor.DescribeMetricsResponse, error) {
if request == nil {
return nil, errors.New("Request object is nil. ")
}
resp, err := c.Send(request, c.ServiceName)
if err != nil {
return nil, err
}
jdResp := &monitor.DescribeMetricsResponse{}
err = json.Unmarshal(resp, jdResp)
if err != nil {
c.Logger.Log(core.LogError, "Unmarshal json failed, resp: %s", string(resp))
return nil, err
}
return jdResp, err
}
@@ -0,0 +1,42 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type AddTagsSpec struct {
/* 应用码。调用此API前需找云监控提供 */
AppCode string `json:"appCode"`
/* 组id。须确保在一个APP范围内全局唯一 */
GroupCode string `json:"groupCode"`
/* 资源列表。总资源不能超过100个 */
ResourceIds []string `json:"resourceIds"`
/* 资源的产品线 */
ServiceCode string `json:"serviceCode"`
/* 打标签操作所属产品线的serviceCode */
SrcServiceCode string `json:"srcServiceCode"`
/* 标签名称。调用此API前需要与云监控确认可以使用的标签名称 */
TagK string `json:"tagK"`
/* 标签值 */
TagV string `json:"tagV"`
}
@@ -0,0 +1,30 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type AlarmNofityConfig struct {
/* ark节点 */
ArkNode string `json:"arkNode"`
/* 通知channle名称 */
ChannelName string `json:"channelName"`
/* 通知channle目的地url */
ChannelUrl string `json:"channelUrl"`
}
@@ -0,0 +1,30 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type AlarmUsage struct {
/* 规则类型:resourceMonitor资源监控;customMetric自定义监控;oneclickAlarm一键报警 (Optional) */
AlarmType string `json:"alarmType"`
/* 总个数 (Optional) */
AllCount int64 `json:"allCount"`
/* 启用个数 (Optional) */
EnableCount int64 `json:"enableCount"`
}
@@ -0,0 +1,84 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type AlarmVo struct {
/* 监控项单位 (Optional) */
CalculateUnit string `json:"calculateUnit"`
/* 统计方法:平均值=avg、最大值=max、最小值=min (Optional) */
Calculation string `json:"calculation"`
/* 联系人列表 (Optional) */
Contacts []BaseContact `json:"contacts"`
/* (Optional) */
CreateTime string `json:"createTime"`
/* 是否删除 1正常,0删除 (Optional) */
Deleted int64 `json:"deleted"`
/* downSample (Optional) */
DownSample string `json:"downSample"`
/* 规则ID (Optional) */
Id int64 `json:"id"`
/* 监控项 (Optional) */
Metric string `json:"metric"`
/* 监控项ID (Optional) */
MetricId int64 `json:"metricId"`
/* 监控项名称 (Optional) */
MetricName string `json:"metricName"`
/* (Optional) */
NoticeLevel NoticeLevel `json:"noticeLevel"`
/* 通知周期 (Optional) */
NoticePeriod int64 `json:"noticePeriod"`
/* 报警比较符,只能为以下几种lte(<=),lt(<),gt(>),gte(>=),eq(==),ne(!=) (Optional) */
Operation string `json:"operation"`
/* 统计周期(单位:分钟) (Optional) */
Period int64 `json:"period"`
/* 规则类型 (Optional) */
RuleType int64 `json:"ruleType"`
/* 规则所属资源类型 (Optional) */
ServiceCode string `json:"serviceCode"`
/* 监控项附属信息 (Optional) */
Tag string `json:"tag"`
/* 多值标签 (Optional) */
Tags interface{} `json:"tags"`
/* 阈值 (Optional) */
Threshold float64 `json:"threshold"`
/* 连续多少次后报警 (Optional) */
Times int64 `json:"times"`
/* (Optional) */
UpdateTime string `json:"updateTime"`
}
@@ -0,0 +1,36 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type AlertChannel struct {
/* (Optional) */
Created string `json:"created"`
/* channel id (Optional) */
Uid string `json:"uid"`
/* alert channel类型 (Optional) */
AlertChannelType string `json:"alertChannelType"`
/* 名称 (Optional) */
Name string `json:"name"`
/* 详情 (Optional) */
Settings interface{} `json:"settings"`
}
@@ -0,0 +1,33 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type AlertResource struct {
/* 报警个数 (Optional) */
AlertCount int64 `json:"alertCount"`
/* 产品 (Optional) */
Product string `json:"product"`
/* 产品名称 (Optional) */
ProductName string `json:"productName"`
/* 资源id (Optional) */
ResourceId string `json:"resourceId"`
}
@@ -0,0 +1,39 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type Annotation struct {
/* (Optional) */
Custom interface{} `json:"custom"`
/* (Optional) */
Description string `json:"description"`
/* (Optional) */
EndTime int64 `json:"endTime"`
/* (Optional) */
Notes string `json:"notes"`
/* (Optional) */
StartTime int64 `json:"startTime"`
/* (Optional) */
Tsuid string `json:"tsuid"`
}
@@ -0,0 +1,27 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type Attrs struct {
/* (Optional) */
Key string `json:"key"`
/* (Optional) */
Value []string `json:"value"`
}
@@ -0,0 +1,27 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type BaseContact struct {
/* 联系人id。 注:ReferenceType=2时,联系人id请填0 */
ReferenceId int64 `json:"referenceId"`
/* 联系人id类型:0,联系人分组id;1,联系人id,2,pin帐号主联系人 */
ReferenceType int64 `json:"referenceType"`
}
@@ -0,0 +1,63 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type BaseRule struct {
/* 弹性伸缩组ID (Optional) */
AutoScalingPolicyId string `json:"autoScalingPolicyId"`
/* 单位 */
CalculateUnit string `json:"calculateUnit"`
/* 统计方法,必须与定义的metric一致,可选值列表:avg,sum,max,min */
Calculation string `json:"calculation"`
/* 降采样函数 */
DownSample string `json:"downSample"`
/* 监控项唯一标识,可根据DescribeMetricsForCreateAlarm接口查询各产品线可用的监控项(创建规则时使用Metric字段)。格式:metric:downsample */
Metric string `json:"metric"`
/* (Optional) */
NoticeLevel NoticeLevel `json:"noticeLevel"`
/* 通知周期,单位:小时 */
NoticePeriod int64 `json:"noticePeriod"`
/* 报警比较符,只能为以下几种lte(<=),lt(<),gt(>),gte(>=),eq(==),ne(!=) */
Operation string `json:"operation"`
/* 查询指标的周期,单位为分钟,目前支持的取值:1,2,5,10,15,30,60 */
Period int64 `json:"period"`
/* 规则名称,规则名称,最大长度42个字符,只允许中英文、数字、''-''和"_" (Optional) */
RuleName string `json:"ruleName"`
/* 规则类型, 1云监控的规则, 6站点监控。默认为1 (Optional) */
RuleType int64 `json:"ruleType"`
/* 多值标签 (Optional) */
Tags interface{} `json:"tags"`
/* 报警阈值,目前只开放数值类型功能 */
Threshold float64 `json:"threshold"`
/* 连续探测几次都满足阈值条件时报警,可选值:1,2,3,5,10,15,30,60 */
Times int64 `json:"times"`
}
@@ -0,0 +1,63 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type BaseRuleT struct {
/* 弹性伸缩组ID (Optional) */
AutoScalingPolicyId string `json:"autoScalingPolicyId"`
/* 监控项单位 (Optional) */
CalculateUnit string `json:"calculateUnit"`
/* 统计方法,必须与定义的metric一致,可选值列表:avg,sum,max,min */
Calculation string `json:"calculation"`
/* 降采样函数 (Optional) */
DownSample string `json:"downSample"`
/* 监控项唯一标识,可根据DescribeMetricsForCreateAlarm接口查询各产品线可用的监控项(创建规则时使用Metric字段)。格式:metric:downsample */
Metric string `json:"metric"`
/* 监控项ID (Optional) */
MetricId int64 `json:"metricId"`
/* (Optional) */
NoticeLevel NoticeLevel `json:"noticeLevel"`
/* 通知周期,单位:小时 */
NoticePeriod int64 `json:"noticePeriod"`
/* 报警比较符,只能为以下几种lte(<=),lt(<),gt(>),gte(>=),eq(==),ne(!=) */
Operation string `json:"operation"`
/* 查询指标的周期,单位为分钟,目前支持的取值:1, 2,5,10,15,30,60 */
Period int64 `json:"period"`
/* 规则类型, 1表示云监控,2表示弹性伸缩,3表示AG,4表示AutoHeal,5表示自定义监控,6表示hawkeye */
RuleType int64 `json:"ruleType"`
/* 多值标签 (Optional) */
Tags interface{} `json:"tags"`
/* 报警阈值,目前只开放数值类型功能 */
Threshold float64 `json:"threshold"`
/* 连续探测几次都满足阈值条件时报警,可选值:1,2,3,5,10,15,30,60 */
Times int64 `json:"times"`
}
@@ -0,0 +1,42 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type BasicCustomRule struct {
/* 统计方法,必须与定义的metric一致,可选值列表:avg,sum,max,min */
Calculation string `json:"calculation"`
/* 监控项metric */
Metric string `json:"metric"`
/* (Optional) */
NoticeLevel NoticeLevel `json:"noticeLevel"`
/* 报警比较符,只能为以下几种lte(<=),lt(<),gt(>),gte(>=),eq(==),ne(!=) */
Operation string `json:"operation"`
/* 查询指标的周期,单位为分钟,目前支持的取值:1,2,5,10,15,30,60 */
Period int64 `json:"period"`
/* 报警阈值,目前只开放数值类型功能 */
Threshold float64 `json:"threshold"`
/* 连续探测几次都满足阈值条件时报警,可选值:1,2,3,5,10,15,30,60 */
Times int64 `json:"times"`
}
@@ -0,0 +1,33 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type BasicDatasource struct {
/* customHttpHeader (Optional) */
CustomHttpHeader interface{} `json:"customHttpHeader"`
/* (Optional) */
OpentsdbExtend OpentsdbExtend `json:"opentsdbExtend"`
/* jdcloud-monitor-opentsdb 后续可能会有其它。如jdcloud-monitor-prometheus等 */
PluginType string `json:"pluginType"`
/* 数据源地址 */
Url string `json:"url"`
}
@@ -0,0 +1,45 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type BasicRule struct {
/* 统计方法,必须与定义的metric一致,可选值列表:avg,sum,max,min */
Calculation string `json:"calculation"`
/* 降采样函数 (Optional) */
DownSample *string `json:"downSample"`
/* 监控项唯一标识,可根据DescribeMetricsForCreateAlarm接口查询各产品线可用的监控项(创建规则时使用Metric字段)。格式:metric:downsample */
Metric string `json:"metric"`
/* (Optional) */
NoticeLevel *NoticeLevel `json:"noticeLevel"`
/* 报警比较符,只能为以下几种lte(<=),lt(<),gt(>),gte(>=),eq(==),ne(!=) */
Operation string `json:"operation"`
/* 查询指标的周期,单位为分钟,目前支持的取值:1,2,5,10,15,30,60 */
Period int64 `json:"period"`
/* 报警阈值,目前只开放数值类型功能 */
Threshold float64 `json:"threshold"`
/* 连续探测几次都满足阈值条件时报警,可选值:1,2,3,5,10,15,30,60 */
Times int64 `json:"times"`
}
@@ -0,0 +1,51 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type BasicRuleDetail struct {
/* 指标的计算单位,比如bit/s、%、k等 (Optional) */
CalculateUnit string `json:"calculateUnit"`
/* 统计方法,必须与定义的metric一致,可选值列表:avg,sum,max,min */
Calculation string `json:"calculation"`
/* 降采样函数 (Optional) */
DownSample string `json:"downSample"`
/* 监控项唯一标识,可根据DescribeMetricsForCreateAlarm接口查询各产品线可用的监控项(创建规则时使用Metric字段)。格式:metric:downsample */
Metric string `json:"metric"`
/* 监控项名称 */
MetricName string `json:"metricName"`
/* (Optional) */
NoticeLevel NoticeLevel `json:"noticeLevel"`
/* 报警比较符,只能为以下几种lte(<=),lt(<),gt(>),gte(>=),eq(==),ne(!=) */
Operation string `json:"operation"`
/* 查询指标的周期,单位为分钟,目前支持的取值:1,2,5,10,15,30,60 */
Period int64 `json:"period"`
/* 报警阈值,目前只开放数值类型功能 */
Threshold float64 `json:"threshold"`
/* 连续探测几次都满足阈值条件时报警,可选值:1,2,3,5,10,15,30,60 */
Times int64 `json:"times"`
}
@@ -0,0 +1,30 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type BatchUpdateWidgetError struct {
/* (Optional) */
DashboardId string `json:"dashboardId"`
/* (Optional) */
Error string `json:"error"`
/* (Optional) */
WidgetId string `json:"widgetId"`
}
@@ -0,0 +1,24 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type BatchUpdateWidgetSpec struct {
/* (Optional) */
List []Widget `json:"list"`
}
@@ -0,0 +1,30 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type Chart struct {
/* 监控图名称 (Optional) */
ChartName string `json:"chartName"`
/* 监控图单位 (Optional) */
ChartUnit string `json:"chartUnit"`
/* 监控图包含的指标 (Optional) */
Include []string `json:"include"`
}
@@ -0,0 +1,30 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type ChartDetail struct {
/* 监控图名称 (Optional) */
ChartName string `json:"chartName"`
/* 监控图单位 (Optional) */
ChartUnit string `json:"chartUnit"`
/* 监控图包含的指标 (Optional) */
Include []string `json:"include"`
}
@@ -0,0 +1,30 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type ChartDimension struct {
/* 分组groupCode (Optional) */
Dimension string `json:"dimension"`
/* 分组名称 (Optional) */
DimensionName string `json:"dimensionName"`
/* 分组下metric对应的tags (Optional) */
Tags interface{} `json:"tags"`
}
@@ -0,0 +1,39 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type ChartDimensionDetail struct {
/* 监控图的展示方式 (Optional) */
Charts []ChartDetail `json:"charts"`
/* 维度dimension (Optional) */
Dimension string `json:"dimension"`
/* 分组名称 (Optional) */
DimensionName string `json:"dimensionName"`
/* 产品线 (Optional) */
ServiceCode string `json:"serviceCode"`
/* 分组名称 (Optional) */
ServiceName string `json:"serviceName"`
/* 分组下metric对应的tags (Optional) */
Tags interface{} `json:"tags"`
}
@@ -0,0 +1,27 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type CloudMonitorAccessList struct {
/* 是否允许选择全部 (Optional) */
AllowedAll bool `json:"allowedAll"`
/* serviceCode列表 (Optional) */
ServiceCodes []CloudMonitorServiceCodeItem `json:"serviceCodes"`
}
@@ -0,0 +1,27 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type CloudMonitorOption struct {
/* 1-all 2-指定权限 (Optional) */
ControllerType int64 `json:"controllerType"`
/* 个数最多20个 (Optional) */
ServiceCodes []string `json:"serviceCodes"`
}
@@ -0,0 +1,27 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type CloudMonitorServiceCodeItem struct {
/* serviceCode (Optional) */
ServiceCode string `json:"serviceCode"`
/* serviceCode (Optional) */
ServiceName string `json:"serviceName"`
}
@@ -0,0 +1,102 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type CmAlarm struct {
/* 统计方法:平均值=avg、最大值=max、最小值=min (Optional) */
Calculation string `json:"calculation"`
/* (Optional) */
ContactGroups []string `json:"contactGroups"`
/* (Optional) */
ContactPersons []string `json:"contactPersons"`
/* (Optional) */
CreateTime string `json:"createTime"`
/* 启用禁用 1启用,0禁用 (Optional) */
Enabled int64 `json:"enabled"`
/* 规则id (Optional) */
Id string `json:"id"`
/* 监控项 (Optional) */
Metric string `json:"metric"`
/* 规则id监控项名称 (Optional) */
MetricName string `json:"metricName"`
/* 命名空间 (Optional) */
Namespace string `json:"namespace"`
/* 命名空间id (Optional) */
NamespaceUID string `json:"namespaceUID"`
/* 通知周期 单位:小时 (Optional) */
NoticePeriod int64 `json:"noticePeriod"`
/* (Optional) */
NoticeTime string `json:"noticeTime"`
/* 对象 (Optional) */
Obj string `json:"obj"`
/* 对象id (Optional) */
ObjUID string `json:"objUID"`
/* >=、>、<、<=、=、!= (Optional) */
Operation string `json:"operation"`
/* 统计周期(单位:分钟) (Optional) */
Period int64 `json:"period"`
/* 地域信息 (Optional) */
Region string `json:"region"`
/* 此规则所应用的资源id (Optional) */
ResourceId string `json:"resourceId"`
/* root rule id (Optional) */
RootRuleId int64 `json:"rootRuleId"`
/* rule id (Optional) */
RuleId int64 `json:"ruleId"`
/* 规则名称 (Optional) */
RuleName string `json:"ruleName"`
/* 报警规则对应的产品 (Optional) */
ServiceCode string `json:"serviceCode"`
/* 监控项状态:1正常,2告警,4数据不足 (Optional) */
Status int64 `json:"status"`
/* 监控项附属信息 (Optional) */
Tag string `json:"tag"`
/* 阈值 (Optional) */
Threshold float64 `json:"threshold"`
/* 连续多少次后报警 (Optional) */
Times int64 `json:"times"`
/* 报警值 (Optional) */
Value float64 `json:"value"`
}
@@ -0,0 +1,99 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type CmAlarmHistory struct {
/* 统计方法:平均值=avg、最大值=max、最小值=min (Optional) */
Calculation string `json:"calculation"`
/* (Optional) */
ContactGroups []string `json:"contactGroups"`
/* (Optional) */
ContactPersons []string `json:"contactPersons"`
/* 该规则是否已经被删除,1表示已经被删除,0表示未删除,被删除的规则,在使用查询规则的接口时,将不会被检索到 (Optional) */
Deleted int64 `json:"deleted"`
/* 启用禁用 1启用,0禁用 (Optional) */
Enabled int64 `json:"enabled"`
/* 规则id (Optional) */
Id string `json:"id"`
/* 监控项 (Optional) */
Metric string `json:"metric"`
/* 规则id监控项名称 (Optional) */
MetricName string `json:"metricName"`
/* 命名空间 (Optional) */
Namespace string `json:"namespace"`
/* 命名空间id (Optional) */
NamespaceUID string `json:"namespaceUID"`
/* 通知周期 单位:小时 (Optional) */
NoticePeriod int64 `json:"noticePeriod"`
/* (Optional) */
NoticeTime string `json:"noticeTime"`
/* 对象 (Optional) */
Obj string `json:"obj"`
/* 对象id (Optional) */
ObjUID string `json:"objUID"`
/* >=、>、<、<=、=、!= (Optional) */
Operation string `json:"operation"`
/* 统计周期(单位:分钟) (Optional) */
Period int64 `json:"period"`
/* 地域信息 (Optional) */
Region string `json:"region"`
/* 此规则所应用的资源id (Optional) */
ResourceId string `json:"resourceId"`
/* root rule id (Optional) */
RootRuleId int64 `json:"rootRuleId"`
/* rule id (Optional) */
RuleId int64 `json:"ruleId"`
/* 规则名称 (Optional) */
RuleName string `json:"ruleName"`
/* 报警规则对应的产品 (Optional) */
ServiceCode string `json:"serviceCode"`
/* 监控项附属信息 (Optional) */
Tag string `json:"tag"`
/* 阈值 (Optional) */
Threshold float64 `json:"threshold"`
/* 连续多少次后报警 (Optional) */
Times int64 `json:"times"`
/* 报警值 (Optional) */
Value float64 `json:"value"`
}
@@ -0,0 +1,30 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type ConfigNotificationSpec struct {
/* 事件操作类型、 create、update、delete */
ActionType string `json:"actionType"`
/* (Optional) */
MsgDetail AlarmNofityConfig `json:"msgDetail"`
/* 事件类型、 nofityChannelMsg(通知渠道配置消息) */
MsgType string `json:"msgType"`
}
@@ -0,0 +1,27 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type Contact struct {
/* 联系人类型。"group"表示群组,"user"表示用户, "self"表示发给pin自己 */
Category string `json:"category"`
/* 联系人ID */
Id int64 `json:"id"`
}
@@ -0,0 +1,66 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type CreateAlarmSpec struct {
/* 弹性伸缩组Id。注:仅ag\asg产品线内部使用 (Optional) */
AutoScalingPolicyId string `json:"autoScalingPolicyId"`
/* 告警通知联系人 (Optional) */
BaseContact []BaseContact `json:"baseContact"`
/* 幂等性校验参数,最长36位,若两个请求clientToken相等,则返回第一次创建的规则id,只创建一次规则 */
ClientToken string `json:"clientToken"`
/* 数据所有者,1云监控控制台; 2云鼎。默认为1 (Optional) */
DataOwner int64 `json:"dataOwner"`
/* 资源维度,可用的维度请使用 describeProductsForAlarm接口查询 (Optional) */
Dimension string `json:"dimension"`
/* 是否启用, 1表示启用规则,0表示禁用规则,默认为1 (Optional) */
Enabled int64 `json:"enabled"`
/* url回调设置数组 (Optional) */
MultiWebHook []WebHookOption `json:"multiWebHook"`
/* 通知策略 (Optional) */
NoticeOption []NoticeOption `json:"noticeOption"`
/* 资源类型, 可用的资源类型列表请使用 describeProductsForAlarm接口查询。 */
Product string `json:"product"`
/* */
ResourceOption ResourceOption `json:"resourceOption"`
/* 规则名称,规则名称,最大长度42个字符,只允许中英文、数字、''-''和"_" */
RuleName string `json:"ruleName"`
/* */
RuleOption RuleOption `json:"ruleOption"`
/* 规则类型, 默认为resourceMonitor (Optional) */
RuleType string `json:"ruleType"`
/* 资源维度,指定监控数据实例的维度标签,如resourceId=id。(请确认资源的监控数据带有该标签,否则规则会报数据不足) (Optional) */
Tags interface{} `json:"tags"`
/* (Optional) */
WebHookOption WebHookOption `json:"webHookOption"`
}
@@ -0,0 +1,60 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type CreateCmAlarmParam struct {
/* 统计方法,必须与定义的metric一致,可选值列表:avg,max,sum,min */
Calculation string `json:"calculation"`
/* 报警规则通知的联系组,必须在控制台上已创建,例如" ['联系组1','联系组2']" (Optional) */
ContactGroups []string `json:"contactGroups"`
/* 报警规则通知的联系人,必须在控制台上已创建,例如 [“联系人1”,”联系人2”] (Optional) */
ContactPersons []string `json:"contactPersons"`
/* 取样频次 (Optional) */
DownSample string `json:"downSample"`
/* 根据产品线查询可用监控项列表 接口 返回的Metric字段 */
MetricUID string `json:"metricUID"`
/* 命名空间 */
NamespaceUID string `json:"namespaceUID"`
/* 通知周期 单位:小时 (Optional) */
NoticePeriod int64 `json:"noticePeriod"`
/* 报警规则对应实例列表,每次最多100个,例如"['resourceId1','resourceId2']" */
ObjUIDs []string `json:"objUIDs"`
/* 报警比较符,只能为以下几种<=,<,>,>=,==,!= */
Operation string `json:"operation"`
/* 查询指标的周期,单位为分钟,目前支持的取值:2,5,15,30,60 */
Period int64 `json:"period"`
/* 规则名称,最大长度42个字符,只允许中英文、数字、''-''和"_" (Optional) */
RuleName string `json:"ruleName"`
/* 报警阈值,目前只开放数值类型功能 */
Threshold float64 `json:"threshold"`
/* 连续探测几次都满足阈值条件时报警,可选值:1,2,3,5 */
Times int64 `json:"times"`
}
@@ -0,0 +1,27 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type CreateCmAlarmSpec struct {
/* 幂等性校验参数,最长36位,若两个请求clientToken相等,则返回第一次创建的规则id,保证只创建一次规则 */
ClientToken string `json:"clientToken"`
/* */
CreateCmAlarmSpec CreateCustomAlarmParam `json:"createCmAlarmSpec"`
}
@@ -0,0 +1,58 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type CreateCustomAlarmParam struct {
/* 聚合方式,多个维度聚合成1个维度时,多维度值之间的聚合方式。可选值:sum、avg、min、max */
AggrType string `json:"aggrType"`
/* 告警通知联系人 (Optional) */
BaseContact []BaseContact `json:"baseContact"`
/* 数据所有者,1云监控控制台; 2云鼎。默认为1
in: query (Optional) */
DataOwner int64 `json:"dataOwner"`
/* 资源维度,指定监控数据实例的维度标签,如resourceId=id。(请确认资源的监控数据带有该标签,否则规则会报数据不足),至少指定一个 */
Dimensions []DimensionsParam `json:"dimensions"`
/* 是否启用, 1表示启用规则,0表示禁用规则,默认为1 (Optional) */
Enabled int64 `json:"enabled"`
/* 回调数组 (Optional) */
MultiWebHook []WebHookOption `json:"multiWebHook"`
/* 命名空间 */
Namespace string `json:"namespace"`
/* 通知策略 (Optional) */
NoticeOption []NoticeOption `json:"noticeOption"`
/* 规则绑定资源所在地域 */
Region string `json:"region"`
/* 规则名称,规则名称,最大长度42个字符,只允许中英文、数字、''-''和"_" */
RuleName string `json:"ruleName"`
/* 规则的触发条件设置选项 */
RuleOption []BasicCustomRule `json:"ruleOption"`
/* (Optional) */
WebHookOption WebHookOption `json:"webHookOption"`
}
@@ -0,0 +1,36 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type CreateCustomQuerySpec struct {
/* 幂等性校验参数,最长36位 */
ClientToken string `json:"clientToken"`
/* 快捷检索条件名称,长度为32个字符,只允许中文、数字、大小写字母、英文下划线“_”及中划线“-”,且不允许重名 */
Name string `json:"name"`
/* 命名空间 */
Namespace string `json:"namespace"`
/* */
QueryOption QueryOptionCreate `json:"queryOption"`
/* */
RegionId string `json:"regionId"`
}
@@ -0,0 +1,24 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type CreateDashboardSpec struct {
/* (Optional) */
Name string `json:"name"`
}
@@ -0,0 +1,36 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type CreateDynamicSpec struct {
/* 幂等性校验参数 */
ClientToken string `json:"clientToken"`
/* 产品动态中文描述 */
DynamicDetailCN string `json:"dynamicDetailCN"`
/* 产品动态英文描述 */
DynamicDetailEN string `json:"dynamicDetailEN"`
/* 产品动态类型 1-新产品 2-新功能 3-功能调整 4-其它 */
DynamicType int64 `json:"dynamicType"`
/* 产品动态链接地址 (Optional) */
DynamicUrl string `json:"dynamicUrl"`
}
@@ -0,0 +1,36 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type CreateGrafanaDashboardSpec struct {
/* (Optional) */
Description string `json:"description"`
/* FolderId,文件夹id,默认为0 (Optional) */
FolderId int64 `json:"folderId"`
/* Params, 模板参数名称及指定值,key为名称、value为指定值 */
Params interface{} `json:"params"`
/* templateUid */
TemplateUid string `json:"templateUid"`
/* Title */
Title string `json:"title"`
}
@@ -0,0 +1,24 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type CreateGrafanaFolderReq struct {
/* 文件夹列表 */
Title string `json:"title"`
}
@@ -0,0 +1,51 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type CreatePanelSpec struct {
/* 该panel所属dashboard的uid */
DashboardUid string `json:"dashboardUid"`
/* 该panel所属维度 (Optional) */
Dimension string `json:"dimension"`
/* 该panel包含的metric */
PanelMetrics []PanelMetricForCreate `json:"panelMetrics"`
/* 该panel的名字 (Optional) */
PanelName string `json:"panelName"`
/* 资源id列表,与标签服务互斥,且资源id列表与标签服务列表至少传一个 (Optional) */
PanelResources []PanelResource `json:"panelResources"`
/* 标签服务列表,与资源id列表互斥,且资源id列表与标签服务列表至少传一个 (Optional) */
PanelTagResources []PanelTagResource `json:"panelTagResources"`
/* topN的数量,图表类型为3(topN表格)时必填 (Optional) */
PanelTopNum int64 `json:"panelTopNum"`
/* 该panel的类型,1-折线图(明细);2-折线图(汇总);3-topN表格 */
PanelType int64 `json:"panelType"`
/* 该panel所属产品 */
Product string `json:"product"`
/* 依据tag过滤(维度) (Optional) */
Tags []TagFilter `json:"tags"`
}
@@ -0,0 +1,39 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type CreateTemplateRequestV2 struct {
/* 幂等性校验参数,最长36位 */
ClientToken string `json:"clientToken"`
/* 模板描述 (Optional) */
Description string `json:"description"`
/* 模板资源类型下的维度,如果该资源分维度,则必须传入此参数 (Optional) */
Dimension string `json:"dimension"`
/* 模板的资源类型 */
Product string `json:"product"`
/* 模板名称,长度1-32个字符,只允许中英文、数字、''-''和"_" */
TemplateName string `json:"templateName"`
/* 模板内包含的规则 */
TemplateRules []BasicRule `json:"templateRules"`
}
@@ -0,0 +1,27 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type CreateTemplateResponseEnd struct {
/* 是否创建成功 (Optional) */
Success bool `json:"success"`
/* 创建成功的模板id (Optional) */
TemplateId int64 `json:"templateId"`
}
@@ -0,0 +1,39 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type CreateTemplateSpec struct {
/* 幂等性校验参数,最长36位 */
ClientToken string `json:"clientToken"`
/* 模板描述 (Optional) */
Description string `json:"description"`
/* 规则的资源类型 */
RuleServiceCode string `json:"ruleServiceCode"`
/* 模板的资源类型 */
ServiceCode string `json:"serviceCode"`
/* 模板名称,长度1-32个字符,只允许中英文、数字、''-''和"_" */
TemplateName string `json:"templateName"`
/* 模板内包含的规则 */
TemplateRules []BaseRuleT `json:"templateRules"`
}
@@ -0,0 +1,57 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type CreateWidgetSpec struct {
/* (Optional) */
Aggregated string `json:"aggregated"`
/* (Optional) */
CreatedTime int64 `json:"createdTime"`
/* (Optional) */
DashboardId string `json:"dashboardId"`
/* (Optional) */
Metrics []WidgetMetric `json:"metrics"`
/* (Optional) */
Name string `json:"name"`
/* (Optional) */
Position WidgetPosition `json:"position"`
/* (Optional) */
Resources WidgetResources `json:"resources"`
/* (Optional) */
ServiceCode string `json:"serviceCode"`
/* (Optional) */
TopN int `json:"topN"`
/* (Optional) */
Type string `json:"type"`
/* (Optional) */
UpdatedTime int64 `json:"updatedTime"`
/* (Optional) */
WidgetId string `json:"widgetId"`
}
@@ -0,0 +1,33 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type CustomMetricStatus struct {
/* 影响资源个数 (Optional) */
Count int64 `json:"count"`
/* 命名空间数量 (Optional) */
NamespaceCount int64 `json:"namespaceCount"`
/* 地域 (Optional) */
Region string `json:"region"`
/* 服务状态 (Optional) */
Status string `json:"status"`
}
@@ -0,0 +1,39 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type CustomQuery struct {
/* 快捷检索条件名称,长度为32个字符,只允许中文、数字、大小写字母、英文下划线“_”及中划线“-”,且不允许重名 (Optional) */
Name string `json:"name"`
/* 命名空间 (Optional) */
Namespace string `json:"namespace"`
/* 命名空间名字 (Optional) */
NamespaceName string `json:"namespaceName"`
/* (Optional) */
Query DescribeQueryOption `json:"query"`
/* 快捷检索条件Uuid (Optional) */
QueryUuid string `json:"queryUuid"`
/* 地域 (Optional) */
Region string `json:"region"`
}
@@ -0,0 +1,36 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type CustomReportDetailsInfo struct {
/* 该命名空间下metric的数量 (Optional) */
MetricCount int64 `json:"metricCount"`
/* 命名空间名称 (Optional) */
NamespaceName string `json:"namespaceName"`
/* 命名空间 (Optional) */
NamespaceUid string `json:"namespaceUid"`
/* 该命名空间下监控对象的数量 (Optional) */
ObjectCount int64 `json:"objectCount"`
/* 该namespace的上报详情 (Optional) */
ReportInfo []NsReportInfo `json:"reportInfo"`
}
@@ -0,0 +1,48 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type CustomRuleDetail struct {
/* 指标的计算单位,比如bit/s、%、k等 (Optional) */
CalculateUnit string `json:"calculateUnit"`
/* 统计方法,必须与定义的metric一致,可选值列表:avg,sum,max,min */
Calculation string `json:"calculation"`
/* 监控项metric */
Metric string `json:"metric"`
/* 监控项名称 (Optional) */
MetricName string `json:"metricName"`
/* (Optional) */
NoticeLevel NoticeLevel `json:"noticeLevel"`
/* 报警比较符,只能为以下几种lte(<=),lt(<),gt(>),gte(>=),eq(==),ne(!=) */
Operation string `json:"operation"`
/* 查询指标的周期,单位为分钟,目前支持的取值:1,2,5,10,15,30,60 */
Period int64 `json:"period"`
/* 报警阈值,目前只开放数值类型功能 */
Threshold float64 `json:"threshold"`
/* 连续探测几次都满足阈值条件时报警,可选值:1,2,3,5,10,15,30,60 */
Times int64 `json:"times"`
}
@@ -0,0 +1,42 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type Dashboard struct {
/* (Optional) */
CreatedTime int64 `json:"createdTime"`
/* (Optional) */
DashboardId string `json:"dashboardId"`
/* (Optional) */
Focused string `json:"focused"`
/* (Optional) */
Name string `json:"name"`
/* (Optional) */
Pin string `json:"pin"`
/* (Optional) */
UpdatedTime int64 `json:"updatedTime"`
/* (Optional) */
WidgetCount int64 `json:"widgetCount"`
}
@@ -0,0 +1,42 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type DashboardInfo struct {
/* (Optional) */
Description string `json:"description"`
/* (Optional) */
Id int64 `json:"id"`
/* (Optional) */
Tags []string `json:"tags"`
/* (Optional) */
Timezone string `json:"timezone"`
/* (Optional) */
Title string `json:"title"`
/* (Optional) */
Uid string `json:"uid"`
/* (Optional) */
Version int64 `json:"version"`
}
@@ -0,0 +1,27 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type DataInfoB struct {
/* (Optional) */
Key string `json:"key"`
/* (Optional) */
Value string `json:"value"`
}
@@ -0,0 +1,33 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type DataMappingB struct {
/* (Optional) */
InstanceId string `json:"instanceId"`
/* (Optional) */
InstanceName string `json:"instanceName"`
/* (Optional) */
InstanceStatus string `json:"instanceStatus"`
/* (Optional) */
ResourceId string `json:"resourceId"`
}
@@ -0,0 +1,27 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type DataPoint struct {
/* 时间戳 (Optional) */
Timestamp int64 `json:"timestamp"`
/* 值 (Optional) */
Value interface{} `json:"value"`
}
@@ -0,0 +1,27 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type DataPointByTag struct {
/* (Optional) */
Timestamp int64 `json:"timestamp"`
/* (Optional) */
Value interface{} `json:"value"`
}
@@ -0,0 +1,33 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type DataPointX struct {
/* 监控指标名称,长度不超过255字节,只允许英文、数字、下划线_、点., [0-9][a-z] [A-Z] [. _ ], 其它会返回err */
Metric string `json:"metric"`
/* 数据维度,数据类型为map类型,最多五个标签,尽量不传或少传。总长度不大于255字节,只允许英文、数字、下划线_、点., [0-9][a-z] [A-Z] [. _ ], 其它会返回err (Optional) */
Tags *interface{} `json:"tags"`
/* 秒级时间戳,早于当前时间30天的不能写入;建议的上报时间戳:上报时间间隔的整数倍,如上报间隔为5s,则建议上报的时间戳为 timestamp = current timestamp - (current timestamp % time interval) = 1487647187 - (1487647187 % 5) = 1487647187 -2 = 1487647185 */
Timestamp int64 `json:"timestamp"`
/* 监控的值。number or string。最大值为long.MAX_VALUE=9223372036854775807=263-1。累计类型的指标,累计到最大值后需要翻转为0,重新开始计数。翻转后不影响速率的计算。 */
Value interface{} `json:"value"`
}
@@ -0,0 +1,31 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type DataTag struct {
/* 1 进数据点打tag,如果数据点存在该tag,予以覆盖,2进行数据点打tag,如果数据存在该tag,跳过不予处理,3 对于数据点中存在tag进行改名称,
例如:{"tagKey":"resourceId","tagValue":"nodeId","operation":3},原数据点名称resourceId:"ia-adx01"改名成nodeId:"ia-adx01" (Optional) */
Operation int64 `json:"operation"`
/* (Optional) */
TagKey string `json:"tagKey"`
/* (Optional) */
TagValue string `json:"tagValue"`
}
@@ -0,0 +1,36 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type Datasource struct {
/* customHttpHeader (Optional) */
CustomHttpHeader interface{} `json:"customHttpHeader"`
/* 数据源名称 */
Name string `json:"name"`
/* (Optional) */
OpentsdbExtend OpentsdbExtend `json:"opentsdbExtend"`
/* jdcloud-monitor-opentsdb 后续可能会有其它。如jdcloud-monitor-prometheus等 */
PluginType string `json:"pluginType"`
/* 数据源地址 */
Url string `json:"url"`
}
@@ -0,0 +1,42 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type DatasourceDetail struct {
/* 数据源id (Optional) */
DatasourceId int `json:"datasourceId"`
/* 是否是默认数据源 (Optional) */
IsDefault bool `json:"isDefault"`
/* 数据源名称 (Optional) */
Name string `json:"name"`
/* (Optional) */
OpentsdbExtend OpentsdbExtend `json:"opentsdbExtend"`
/* orgId (Optional) */
OrgId int `json:"orgId"`
/* 插件类型 (Optional) */
PluginType string `json:"pluginType"`
/* 数据源地址 (Optional) */
Url string `json:"url"`
}
@@ -0,0 +1,33 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type DatasourceToken struct {
/* ark节点名称 */
ArkNode string `json:"arkNode"`
/* (Optional) */
CloudMonitorOption CloudMonitorOption `json:"cloudMonitorOption"`
/* cloudmonitor\hawkeye\deeplog */
DatasourceType string `json:"datasourceType"`
/* orgId (Optional) */
OrgId int `json:"orgId"`
}
@@ -0,0 +1,27 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type DateAlertCount struct {
/* 报警个数 (Optional) */
AlertCount int64 `json:"alertCount"`
/* (Optional) */
Date string `json:"date"`
}
@@ -0,0 +1,21 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type DeepLogOption struct {
}
@@ -0,0 +1,25 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type DeleteAlarmsSpec struct {
/* filter name为'ids'为要删除的告警id
in: query */
Filters []Filter `json:"filters"`
}
@@ -0,0 +1,24 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type DeleteDashboardsSpec struct {
/* filters, name为dashboardUids, values为dashboardUid列表,精确匹配,支持多个 */
Filters []Filter `json:"filters"`
}
@@ -0,0 +1,24 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type DeleteDataBackSpec struct {
/* 要删除数据的key (Optional) */
Key []string `json:"key"`
}
@@ -0,0 +1,24 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type DeleteGrafanaDashboardsSpec struct {
/* filters, name为dashboardUids, values为dashboardUid列表,精确匹配,支持多个 (Optional) */
Filters []Filter `json:"filters"`
}
@@ -0,0 +1,24 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type DeleteGrafanaTemplatesSpec struct {
/* filters, name为templateUids, values为templateUids列表,精确匹配,支持多个 */
Filters []Filter `json:"filters"`
}
@@ -0,0 +1,24 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type DeleteTemplateResponseEnd struct {
/* 是否删除成功 (Optional) */
Success bool `json:"success"`
}
@@ -0,0 +1,24 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type DeleteTemplateSpec struct {
/* filters, name为templateUids, values为templateUids列表,精确匹配,支持多个 */
Filters []Filter `json:"filters"`
}
@@ -0,0 +1,60 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type DescribeAlarmHistoryDetail struct {
/* 报警规则ID (Optional) */
AlarmId string `json:"alarmId"`
/* 资源维度 (Optional) */
Dimension interface{} `json:"dimension"`
/* 告警持续次数 (Optional) */
DurationTimes int64 `json:"durationTimes"`
/* 命名空间 (Optional) */
Namespace string `json:"namespace"`
/* 命名空间名称 (Optional) */
NamespaceName string `json:"namespaceName"`
/* 告警持续时间,单位分钟 (Optional) */
NoticeDurationTime int64 `json:"noticeDurationTime"`
/* 触发的告警级别。从低到高分别为‘common’, ‘critical’, ‘fatal’ (Optional) */
NoticeLevelTriggered string `json:"noticeLevelTriggered"`
/* 告警时间 (Optional) */
NoticeTime string `json:"noticeTime"`
/* 告警通知人 (Optional) */
Receivers []NoticeReceiver `json:"receivers"`
/* 规则绑定资源所在地域 (Optional) */
Region string `json:"region"`
/* (Optional) */
Rule CustomRuleDetail `json:"rule"`
/* 告警类型 1-告警恢复 2-告警 4-数据不足 (Optional) */
Status int64 `json:"status"`
/* 告警值 (Optional) */
Value float64 `json:"value"`
}
@@ -0,0 +1,27 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type DescribeAlarmHistoryResponseEnd struct {
/* 告警历史列表 (Optional) */
AlarmHistoryList []DescribedAlarmHistory `json:"alarmHistoryList"`
/* 总数 (Optional) */
Total int64 `json:"total"`
}
@@ -0,0 +1,40 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type DescribeCMMetricsDataSpec struct {
/* (Optional) */
AggrType string `json:"aggrType"`
/* 查询时间范围的结束时间, UTC时间,格式:2016-12-11T00:00:00+0800(为空时,将由startTime与timeInterval计算得出)(注意在url中+要转译为%2B故url中为2016-12-11T00:00:00%2B0800)
in: query (Optional) */
EndTime string `json:"endTime"`
/* metric id列表
in: query (Optional) */
MetricUID []string `json:"metricUID"`
/* 查询时间范围的开始时间, UTC时间,格式:2016-12-11T00:00:00+0800(早于30d时,将被重置为30d)(注意在url中+要转译为%2B故url中为2016-12-11T00:00:00%2B0800)
in: query (Optional) */
StartTime string `json:"startTime"`
/* 时间间隔:1h,6h,12h,1d,3d,7d,14d,固定时间间隔,timeInterval 与 endTime 至少填一项
in: query (Optional) */
TimeInterval string `json:"timeInterval"`
}
@@ -0,0 +1,61 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type DescribeCustomAlarmDetail struct {
/* 聚合方式,多个维度聚合成1个维度时,多维度值之间的聚合方式。可选值:sum、avg、min、max (Optional) */
AggrType string `json:"aggrType"`
/* 报警规则ID (Optional) */
AlarmId string `json:"alarmId"`
/* 规则状态,当一个规则下同时存在报警、数据不足、正常的资源时,规则状态按 报警>数据不足>正常的优先级展示
监控项状态:-1 未启用 1正常,2告警,4数据不足 (Optional) */
AlarmStatus int64 `json:"alarmStatus"`
/* 创建时间 (Optional) */
CreateTime string `json:"createTime"`
/* 资源维度,指定监控数据实例的维度标签,如resourceId=id。(请确认资源的监控数据带有该标签,否则规则会报数据不足),至少指定一个 (Optional) */
Dimensions []DimensionParamDetail `json:"dimensions"`
/* 拼接好的资源维度信息 (Optional) */
DimensionsText string `json:"dimensionsText"`
/* 是否启用, 1表示启用规则,0表示禁用规则,默认为1 (Optional) */
Enabled int64 `json:"enabled"`
/* 命名空间 (Optional) */
Namespace string `json:"namespace"`
/* 命名空间名称 (Optional) */
NamespaceName string `json:"namespaceName"`
/* 规则绑定资源所在地域 (Optional) */
Region string `json:"region"`
/* 规则名称 (Optional) */
RuleName string `json:"ruleName"`
/* 规则的触发条件设置选项 (Optional) */
RuleOption []CustomRuleDetail `json:"ruleOption"`
/* 规则版本 v1 v2 (Optional) */
RuleVersion string `json:"ruleVersion"`
}
@@ -0,0 +1,33 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type DescribeCustomMetricDataSpec struct {
/* 查询时间范围的结束时间, UTC时间,格式:2016-12-11T00:00:00+0800(为空时,将由startTime与timeInterval计算得出) (Optional) */
EndTime string `json:"endTime"`
/* */
Query QueryOption `json:"query"`
/* 查询时间范围的开始时间, UTC时间,格式:2016-12-11T00:00:00+0800 (Optional) */
StartTime string `json:"startTime"`
/* 时间间隔:1h,6h,12h,1d,3d,7d,14d,固定时间间隔,timeInterval默认为1h,当前时间往 前1h (Optional) */
TimeInterval string `json:"timeInterval"`
}
@@ -0,0 +1,32 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type DescribeDashboardsSpec struct {
/* folderIds-文件夹Id,精确匹配,支持单个; (Optional) */
Filters []Filter `json:"filters"`
/* 当前所在页,默认为1
in: query (Optional) */
PageNumber int64 `json:"pageNumber"`
/* 页面大小,默认为20;取值范围[1, 100]
in: query (Optional) */
PageSize int64 `json:"pageSize"`
}
@@ -0,0 +1,42 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type DescribeDatasourceEnd struct {
/* 数据源id (Optional) */
DatasourceId int `json:"datasourceId"`
/* 是否是默认数据源 (Optional) */
IsDefault bool `json:"isDefault"`
/* 其它属性 (Optional) */
JsonData interface{} `json:"jsonData"`
/* 数据源名称 (Optional) */
Name string `json:"name"`
/* orgId (Optional) */
OrgId int `json:"orgId"`
/* 插件类型 (Optional) */
PluginType string `json:"pluginType"`
/* 数据源地址 (Optional) */
Url string `json:"url"`
}
@@ -0,0 +1,24 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type DescribeDatasourcesEnd struct {
/* 数据源列表 (Optional) */
Datasources []DescribeDatasourceEnd `json:"datasources"`
}
@@ -0,0 +1,32 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type DescribeGrafanaDashboardsSpec struct {
/* folderIds-文件夹Id,精确匹配,支持单个; (Optional) */
Filters []Filter `json:"filters"`
/* 当前所在页,默认为1
in: query (Optional) */
PageNumber int64 `json:"pageNumber"`
/* 页面大小,默认为20;取值范围[1, 100]
in: query (Optional) */
PageSize int64 `json:"pageSize"`
}
@@ -0,0 +1,37 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type DescribeGrafanaTemplatesSpec struct {
/* 模板uid列表或数据源类型
templateUids-模板uids,精确匹配,支持多个;
datasourceType-数据源类型,精确匹配,支持多个(云监控:cloudmonitor,hawkeye:hawkeye,deeplog:deeplog) (Optional) */
Filters []Filter `json:"filters"`
/* 当前所在页,默认为1
in: query (Optional) */
PageNumber int64 `json:"pageNumber"`
/* 页面大小,默认为20;取值范围[1, 100]
in: query (Optional) */
PageSize int64 `json:"pageSize"`
/* 模板类型,0表示系统、1表示自定义,默认为0 (Optional) */
TemplateType int64 `json:"templateType"`
}
@@ -0,0 +1,67 @@
// Copyright 2018 JDCLOUD.COM
//
// 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.
//
// NOTE: This class is auto generated by the jdcloud code generator program.
package models
type DescribeGroupAlarm struct {
/* 报警规则ID (Optional) */
AlarmId string `json:"alarmId"`
/* 规则状态,当一个规则下同时存在报警、数据不足、正常的资源时,规则状态按 报警>数据不足>正常的优先级展示
监控项状态:-1 未启用 1正常,2告警,4数据不足 (Optional) */
AlarmStatus int64 `json:"alarmStatus"`
/* 规则的状态列表,可能同时存在多个:1正常,2告警,4数据不足 (Optional) */
AlarmStatusList []int64 `json:"alarmStatusList"`
/* 创建时间 (Optional) */
CreateTime string `json:"createTime"`
/* 资源维度 (Optional) */
Dimension string `json:"dimension"`
/* 资源维度名称 (Optional) */
DimensionName string `json:"dimensionName"`
/* 是否启用, 1表示启用规则,0表示禁用规则,默认为1 (Optional) */
Enabled int64 `json:"enabled"`
/* 资源类型 */
Product string `json:"product"`
/* 资源类型名称 (Optional) */
ProductName string `json:"productName"`
/* */
ResourceOption ResourceOption `json:"resourceOption"`
/* 规则名称,规则名称,最大长度42个字符,只允许中英文、数字、''-''和"_" */
RuleName string `json:"ruleName"`
/* */
RuleOption RuleOptionDetail `json:"ruleOption"`
/* 规则类型, 默认为resourceMonitor (Optional) */
RuleType string `json:"ruleType"`
/* 规则版本 v1 v2 (Optional) */
RuleVersion string `json:"ruleVersion"`
/* 资源维度,指定监控数据实例的维度标签,如resourceId=id。(请确认资源的监控数据带有该标签,否则规则会报数据不足) (Optional) */
Tags interface{} `json:"tags"`
}

Some files were not shown because too many files have changed in this diff Show More