Skip to content

sdk: rolling update for 1.2.37-release #102

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 31, 2025
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.36-release
1.2.37-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.36-release</version>
<version>1.2.37-release</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand All @@ -18,7 +18,7 @@
<dependency>
<groupId>cn.ucloud</groupId>
<artifactId>ucloud-sdk-java-common</artifactId>
<version>1.2.36-release</version>
<version>1.2.37-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.36-release</version>
<version>1.2.37-release</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand All @@ -18,7 +18,7 @@
<dependency>
<groupId>cn.ucloud</groupId>
<artifactId>ucloud-sdk-java-uhost</artifactId>
<version>1.2.36-release</version>
<version>1.2.37-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.36-release</version>
<version>1.2.37-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 @@ -6,18 +6,18 @@
<parent>
<artifactId>ucloud-sdk-java</artifactId>
<groupId>cn.ucloud</groupId>
<version>1.2.36-release</version>
<version>1.2.37-release</version>
</parent>

<modelVersion>4.0.0</modelVersion>
<artifactId>ucloud-sdk-java-cloudwatch</artifactId>
<version>1.2.36-release</version>
<version>1.2.37-release</version>

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

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@

import cn.ucloud.cloudwatch.models.BindAlertStrategyRequest;
import cn.ucloud.cloudwatch.models.BindAlertStrategyResponse;
import cn.ucloud.cloudwatch.models.CreateAlertStrategyTemplateRequest;
import cn.ucloud.cloudwatch.models.CreateAlertStrategyTemplateResponse;
import cn.ucloud.cloudwatch.models.DeleteAlertStrategyTemplateRequest;
import cn.ucloud.cloudwatch.models.DeleteAlertStrategyTemplateResponse;
import cn.ucloud.cloudwatch.models.GetProductMetricsRequest;
import cn.ucloud.cloudwatch.models.GetProductMetricsResponse;
import cn.ucloud.cloudwatch.models.ListAlertRecordRequest;
Expand Down Expand Up @@ -52,6 +56,32 @@ public BindAlertStrategyResponse bindAlertStrategy(BindAlertStrategyRequest requ
return (BindAlertStrategyResponse) this.invoke(request, BindAlertStrategyResponse.class);
}

/**
* CreateAlertStrategyTemplate - 新建条件模板
*
* @param request Request object
* @throws UCloudException Exception
*/
public CreateAlertStrategyTemplateResponse createAlertStrategyTemplate(
CreateAlertStrategyTemplateRequest request) throws UCloudException {
request.setAction("CreateAlertStrategyTemplate");
return (CreateAlertStrategyTemplateResponse)
this.invoke(request, CreateAlertStrategyTemplateResponse.class);
}

/**
* DeleteAlertStrategyTemplate - 删除告警策略模板
*
* @param request Request object
* @throws UCloudException Exception
*/
public DeleteAlertStrategyTemplateResponse deleteAlertStrategyTemplate(
DeleteAlertStrategyTemplateRequest request) throws UCloudException {
request.setAction("DeleteAlertStrategyTemplate");
return (DeleteAlertStrategyTemplateResponse)
this.invoke(request, DeleteAlertStrategyTemplateResponse.class);
}

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

import cn.ucloud.cloudwatch.models.BindAlertStrategyRequest;
import cn.ucloud.cloudwatch.models.BindAlertStrategyResponse;
import cn.ucloud.cloudwatch.models.CreateAlertStrategyTemplateRequest;
import cn.ucloud.cloudwatch.models.CreateAlertStrategyTemplateResponse;
import cn.ucloud.cloudwatch.models.DeleteAlertStrategyTemplateRequest;
import cn.ucloud.cloudwatch.models.DeleteAlertStrategyTemplateResponse;
import cn.ucloud.cloudwatch.models.GetProductMetricsRequest;
import cn.ucloud.cloudwatch.models.GetProductMetricsResponse;
import cn.ucloud.cloudwatch.models.ListAlertRecordRequest;
Expand Down Expand Up @@ -44,6 +48,24 @@ public interface CloudWatchClientInterface extends Client {
public BindAlertStrategyResponse bindAlertStrategy(BindAlertStrategyRequest request)
throws UCloudException;

/**
* CreateAlertStrategyTemplate - 新建条件模板
*
* @param request Request object
* @throws UCloudException Exception
*/
public CreateAlertStrategyTemplateResponse createAlertStrategyTemplate(
CreateAlertStrategyTemplateRequest request) throws UCloudException;

/**
* DeleteAlertStrategyTemplate - 删除告警策略模板
*
* @param request Request object
* @throws UCloudException Exception
*/
public DeleteAlertStrategyTemplateResponse deleteAlertStrategyTemplate(
DeleteAlertStrategyTemplateRequest request) throws UCloudException;

/**
* GetProductMetrics - 获取云产品关联的指标列表
*
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,195 @@
/**
* 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.NotEmpty;
import cn.ucloud.common.annotation.UCloudParam;
import cn.ucloud.common.request.Request;

import java.util.List;

public class CreateAlertStrategyTemplateRequest extends Request {

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

/** 告警模板名称。最大长度64个字符 */
@NotEmpty
@UCloudParam("Name")
private String name;

/** 产品类型。参考ListMonitorProduct获取监控对象类型列表 */
@NotEmpty
@UCloudParam("ProductKey")
private String productKey;

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

/** 备注 */
@UCloudParam("Remark")
private String remark;

public String getProjectId() {
return projectId;
}

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

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}

public String getProductKey() {
return productKey;
}

public void setProductKey(String productKey) {
this.productKey = productKey;
}

public List<RuleSet> getRuleSet() {
return ruleSet;
}

public void setRuleSet(List<RuleSet> ruleSet) {
this.ruleSet = ruleSet;
}

public String getRemark() {
return remark;
}

public void setRemark(String remark) {
this.remark = remark;
}

public static class RuleSet extends Request {

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

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

/** 触发阈值 */
@NotEmpty
@UCloudParam("ThresholdValue")
private Integer thresholdValue;

/** 触发次数 */
@NotEmpty
@UCloudParam("TriggerCount")
private Integer triggerCount;

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

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

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

/** 沉默周期(告警周期选择为连续时必填) */
@UCloudParam("SendInterval")
private Integer sendInterval;

public Integer getMetricID() {
return metricID;
}

public void setMetricID(Integer metricID) {
this.metricID = metricID;
}

public Integer getThresholdCompare() {
return thresholdCompare;
}

public void setThresholdCompare(Integer thresholdCompare) {
this.thresholdCompare = thresholdCompare;
}

public Integer getThresholdValue() {
return thresholdValue;
}

public void setThresholdValue(Integer thresholdValue) {
this.thresholdValue = thresholdValue;
}

public Integer getTriggerCount() {
return triggerCount;
}

public void setTriggerCount(Integer triggerCount) {
this.triggerCount = triggerCount;
}

public String getSendPeriodType() {
return sendPeriodType;
}

public void setSendPeriodType(String sendPeriodType) {
this.sendPeriodType = sendPeriodType;
}

public String getLevel() {
return level;
}

public void setLevel(String level) {
this.level = level;
}

public Integer getStatus() {
return status;
}

public void setStatus(Integer status) {
this.status = status;
}

public Integer getSendInterval() {
return sendInterval;
}

public void setSendInterval(Integer sendInterval) {
this.sendInterval = sendInterval;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/**
* 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.response.Response;

import com.google.gson.annotations.SerializedName;

public class CreateAlertStrategyTemplateResponse extends Response {

/** 创建告警模板返回对象 */
@SerializedName("Data")
private AlertTemplate data;

public AlertTemplate getData() {
return data;
}

public void setData(AlertTemplate data) {
this.data = data;
}

public static class AlertTemplate extends Response {

/** 告警模板ID */
@SerializedName("TemplateID")
private Integer templateID;

public Integer getTemplateID() {
return templateID;
}

public void setTemplateID(Integer templateID) {
this.templateID = templateID;
}
}
}
Loading
Loading