Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.2.80-release
1.2.81-release
4 changes: 2 additions & 2 deletions examples/generic/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<artifactId>ucloud-sdk-java</artifactId>
<groupId>cn.ucloud</groupId>
<version>1.2.80-release</version>
<version>1.2.81-release</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand All @@ -19,7 +19,7 @@
<dependency>
<groupId>cn.ucloud</groupId>
<artifactId>ucloud-sdk-java-common</artifactId>
<version>1.2.80-release</version>
<version>1.2.81-release</version>
</dependency>
</dependencies>
</project>
4 changes: 2 additions & 2 deletions examples/uhost/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<artifactId>ucloud-sdk-java</artifactId>
<groupId>cn.ucloud</groupId>
<version>1.2.80-release</version>
<version>1.2.81-release</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand All @@ -19,7 +19,7 @@
<dependency>
<groupId>cn.ucloud</groupId>
<artifactId>ucloud-sdk-java-uhost</artifactId>
<version>1.2.80-release</version>
<version>1.2.81-release</version>
</dependency>
</dependencies>
</project>
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<groupId>cn.ucloud</groupId>
<artifactId>ucloud-sdk-java</artifactId>
<packaging>pom</packaging>
<version>1.2.80-release</version>
<version>1.2.81-release</version>
<modules>
<module>ucloud-sdk-java-common</module>
<module>ucloud-sdk-java-cloudwatch</module>
Expand Down
6 changes: 3 additions & 3 deletions ucloud-sdk-java-cloudwatch/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@
<parent>
<artifactId>ucloud-sdk-java</artifactId>
<groupId>cn.ucloud</groupId>
<version>1.2.80-release</version>
<version>1.2.81-release</version>
</parent>

<modelVersion>4.0.0</modelVersion>
<artifactId>ucloud-sdk-java-cloudwatch</artifactId>
<name>ucloud-sdk-java</name>
<version>1.2.80-release</version>
<version>1.2.81-release</version>

<dependencies>
<dependency>
<groupId>cn.ucloud</groupId>
<artifactId>ucloud-sdk-java-common</artifactId>
<version>1.2.80-release</version>
<version>1.2.81-release</version>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
import cn.ucloud.cloudwatch.models.DeleteAlertStrategyTemplateResponse;
import cn.ucloud.cloudwatch.models.EnableAlertStrategyRequest;
import cn.ucloud.cloudwatch.models.EnableAlertStrategyResponse;
import cn.ucloud.cloudwatch.models.GetMetricDataAggregationMethodRequest;
import cn.ucloud.cloudwatch.models.GetMetricDataAggregationMethodResponse;
import cn.ucloud.cloudwatch.models.GetProductMetricsRequest;
import cn.ucloud.cloudwatch.models.GetProductMetricsResponse;
import cn.ucloud.cloudwatch.models.ListAlertRecordRequest;
Expand Down Expand Up @@ -120,6 +122,19 @@ public EnableAlertStrategyResponse enableAlertStrategy(EnableAlertStrategyReques
this.invoke(request, EnableAlertStrategyResponse.class);
}

/**
* GetMetricDataAggregationMethod - 获取指标数据聚合方式
*
* @param request Request object
* @throws UCloudException Exception
*/
public GetMetricDataAggregationMethodResponse getMetricDataAggregationMethod(
GetMetricDataAggregationMethodRequest request) throws UCloudException {
request.setAction("GetMetricDataAggregationMethod");
return (GetMetricDataAggregationMethodResponse)
this.invoke(request, GetMetricDataAggregationMethodResponse.class);
}

/**
* GetProductMetrics - 获取云产品关联的指标列表
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
import cn.ucloud.cloudwatch.models.DeleteAlertStrategyTemplateResponse;
import cn.ucloud.cloudwatch.models.EnableAlertStrategyRequest;
import cn.ucloud.cloudwatch.models.EnableAlertStrategyResponse;
import cn.ucloud.cloudwatch.models.GetMetricDataAggregationMethodRequest;
import cn.ucloud.cloudwatch.models.GetMetricDataAggregationMethodResponse;
import cn.ucloud.cloudwatch.models.GetProductMetricsRequest;
import cn.ucloud.cloudwatch.models.GetProductMetricsResponse;
import cn.ucloud.cloudwatch.models.ListAlertRecordRequest;
Expand Down Expand Up @@ -96,6 +98,15 @@ public DeleteAlertStrategyTemplateResponse deleteAlertStrategyTemplate(
public EnableAlertStrategyResponse enableAlertStrategy(EnableAlertStrategyRequest request)
throws UCloudException;

/**
* GetMetricDataAggregationMethod - 获取指标数据聚合方式
*
* @param request Request object
* @throws UCloudException Exception
*/
public GetMetricDataAggregationMethodResponse getMetricDataAggregationMethod(
GetMetricDataAggregationMethodRequest request) throws UCloudException;

/**
* GetProductMetrics - 获取云产品关联的指标列表
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@

public class BindAlertStrategyRequest extends Request {

/** 项目ID */
/**
* 项目ID。不填写为默认项目,子帐号必须填写。
* 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list)
*/
@NotEmpty
@UCloudParam("ProjectId")
private String projectId;
Expand All @@ -36,7 +39,7 @@ public class BindAlertStrategyRequest extends Request {
@UCloudParam("Resources")
private List<String> resources;

/** 产品类型名称 */
/** 产品唯一标识,参见 [产品概览](https://docs.ucloud.cn/cloudwatch/metric/intro) */
@NotEmpty
@UCloudParam("ProductKey")
private String productKey;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,17 @@ public class CreateAlertStrategyRequest extends Request {
@UCloudParam("Name")
private String name;

/** 产品类型。参考ListMonitorProduct获取监控对象类型列表 */
/** 产品唯一标识,参见 [产品概览](https://docs.ucloud.cn/cloudwatch/metric/intro) */
@NotEmpty
@UCloudParam("ProductKey")
private String productKey;

/** 绑定资源类型 1 资源组 2 资源 */
/** 绑定资源类型 1 - 资源组 2 - 资源 */
@NotEmpty
@UCloudParam("ObjectType")
private Integer objectType;

/** 条件设置方式 1. 手动配置 2.选择模版 */
/** 条件设置方式 1 - 手动配置 2 - 选择模版 */
@NotEmpty
@UCloudParam("ConfigMode")
private Integer configMode;
Expand All @@ -57,15 +57,15 @@ public class CreateAlertStrategyRequest extends Request {
@UCloudParam("ResourceGroupIDs")
private List<Integer> resourceGroupIDs;

/** 模板id.对应TemplateId=2 */
/** 模板id.对应ConfigMode=2时候需要填写 */
@UCloudParam("TemplateId")
private Integer templateId;

/** */
@UCloudParam("RuleSet")
private List<RuleSet> ruleSet;

/** 通知类型 通知组 group 通知人 user */
/** 通知类型。 枚举值: group - 通知组 user - 通知人 */
@UCloudParam("NotifyType")
private String notifyType;

Expand All @@ -77,18 +77,22 @@ public class CreateAlertStrategyRequest extends Request {
@UCloudParam("NotifyGroupIDs")
private List<Integer> notifyGroupIDs;

/** 通知渠道 短信sms 邮件email 回调webhook */
/** 通知渠道。 枚举值: sms - 短信 email - 邮件 webhook - 回调 */
@UCloudParam("NotifyChannelDs")
private List<String> notifyChannelDs;

/** 通知渠道回调webhook 回调语言 中文cn 英文en */
/** 当通知渠道=回调webhook时,需要设置回调语言。 枚举值: cn - 中文 en - 英文 */
@UCloudParam("CallbackLanguage")
private String callbackLanguage;

/** 回调语言url */
/** 回调URL地址 */
@UCloudParam("CallbackUrls")
private List<String> callbackUrls;

/** 通知模板id */
@UCloudParam("NotifyTemplateId")
private String notifyTemplateId;

public String getProjectId() {
return projectId;
}
Expand Down Expand Up @@ -209,13 +213,21 @@ public void setCallbackUrls(List<String> callbackUrls) {
this.callbackUrls = callbackUrls;
}

public String getNotifyTemplateId() {
return notifyTemplateId;
}

public void setNotifyTemplateId(String notifyTemplateId) {
this.notifyTemplateId = notifyTemplateId;
}

public static class RuleSet extends Request {

/** 规则指标ID。参考该类型产品下返回的指标列表GetProductMetrics */
@UCloudParam("MetricID")
private Integer metricID;

/** 阈值比较方式。 枚举值比较方式: 1->= 2-<= 3-> 4-< 5-== 6-!= */
/** 阈值比较方式。 枚举值: 1:>= 2<= 3> 4< 5== 6!= */
@UCloudParam("ThresholdCompare")
private Integer thresholdCompare;

Expand All @@ -227,15 +239,15 @@ public static class RuleSet extends Request {
@UCloudParam("TriggerCount")
private Integer triggerCount;

/** 触发周期。枚举值:continuous连续 exponent 指数 single 不重复 */
/** 触发周期。枚举值continuous - 连续 exponent - 指数 single - 不重复 */
@UCloudParam("SendPeriodType")
private String sendPeriodType;

/** 告警等级。枚举值:P0,P1,P2,P3 */
@UCloudParam("Level")
private String level;

/** 告警状态。枚举值:0-关闭 1-开启 */
/** 告警状态。 枚举值 0 - 关闭 1 - 开启 */
@UCloudParam("Status")
private Integer status;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class CreateAlertStrategyTemplateRequest extends Request {
@UCloudParam("Name")
private String name;

/** 产品类型。参考ListMonitorProduct获取监控对象类型列表 */
/** 产品唯一标识,参见 [产品概览](https://docs.ucloud.cn/cloudwatch/metric/intro) */
@NotEmpty
@UCloudParam("ProductKey")
private String productKey;
Expand Down Expand Up @@ -94,7 +94,7 @@ public static class RuleSet extends Request {
@UCloudParam("MetricID")
private Integer metricID;

/** 阈值比较方式。 枚举值比较方式: 1->= 2-<= 3-> 4-< 5-== 6-!= */
/** 阈值比较方式。 枚举值: 1>= 2<= 3> 4< 5== 6!= */
@NotEmpty
@UCloudParam("ThresholdCompare")
private Integer thresholdCompare;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/**
* Copyright 2021 UCloud Technology Co., Ltd.
*
* <p>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
*
* <p>http://www.apache.org/licenses/LICENSE-2.0
*
* <p>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.
*/
package cn.ucloud.cloudwatch.models;


import cn.ucloud.common.annotation.UCloudParam;
import cn.ucloud.common.request.Request;

public class GetMetricDataAggregationMethodRequest extends Request {

/** 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) */
@UCloudParam("Region")
private String region;

/** 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) */
@UCloudParam("Zone")
private String zone;

/**
* 项目ID。不填写为默认项目,子帐号必须填写。
* 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list)
*/
@UCloudParam("ProjectId")
private String projectId;

public String getRegion() {
return region;
}

public void setRegion(String region) {
this.region = region;
}

public String getZone() {
return zone;
}

public void setZone(String zone) {
this.zone = zone;
}

public String getProjectId() {
return projectId;
}

public void setProjectId(String projectId) {
this.projectId = projectId;
}
}
Loading
Loading