Skip to content

Commit ef01d78

Browse files
authored
sdk: rolling update for 1.2.37-release (#102)
1 parent dbacd25 commit ef01d78

File tree

88 files changed

+2981
-1292
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+2981
-1292
lines changed

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.2.36-release
1+
1.2.37-release

examples/generic/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<parent>
88
<artifactId>ucloud-sdk-java</artifactId>
99
<groupId>cn.ucloud</groupId>
10-
<version>1.2.36-release</version>
10+
<version>1.2.37-release</version>
1111
</parent>
1212

1313
<modelVersion>4.0.0</modelVersion>
@@ -18,7 +18,7 @@
1818
<dependency>
1919
<groupId>cn.ucloud</groupId>
2020
<artifactId>ucloud-sdk-java-common</artifactId>
21-
<version>1.2.36-release</version>
21+
<version>1.2.37-release</version>
2222
</dependency>
2323
</dependencies>
2424
</project>

examples/uhost/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<parent>
88
<artifactId>ucloud-sdk-java</artifactId>
99
<groupId>cn.ucloud</groupId>
10-
<version>1.2.36-release</version>
10+
<version>1.2.37-release</version>
1111
</parent>
1212

1313
<modelVersion>4.0.0</modelVersion>
@@ -18,7 +18,7 @@
1818
<dependency>
1919
<groupId>cn.ucloud</groupId>
2020
<artifactId>ucloud-sdk-java-uhost</artifactId>
21-
<version>1.2.36-release</version>
21+
<version>1.2.37-release</version>
2222
</dependency>
2323
</dependencies>
2424
</project>

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<groupId>cn.ucloud</groupId>
88
<artifactId>ucloud-sdk-java</artifactId>
99
<packaging>pom</packaging>
10-
<version>1.2.36-release</version>
10+
<version>1.2.37-release</version>
1111
<modules>
1212
<module>ucloud-sdk-java-common</module>
1313
<module>ucloud-sdk-java-cloudwatch</module>

ucloud-sdk-java-cloudwatch/pom.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@
66
<parent>
77
<artifactId>ucloud-sdk-java</artifactId>
88
<groupId>cn.ucloud</groupId>
9-
<version>1.2.36-release</version>
9+
<version>1.2.37-release</version>
1010
</parent>
1111

1212
<modelVersion>4.0.0</modelVersion>
1313
<artifactId>ucloud-sdk-java-cloudwatch</artifactId>
14-
<version>1.2.36-release</version>
14+
<version>1.2.37-release</version>
1515

1616
<dependencies>
1717
<dependency>
1818
<groupId>cn.ucloud</groupId>
1919
<artifactId>ucloud-sdk-java-common</artifactId>
20-
<version>1.2.36-release</version>
20+
<version>1.2.37-release</version>
2121
</dependency>
2222

2323
<dependency>

ucloud-sdk-java-cloudwatch/src/main/java/cn/ucloud/cloudwatch/client/CloudWatchClient.java

+30
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@
1515

1616
import cn.ucloud.cloudwatch.models.BindAlertStrategyRequest;
1717
import cn.ucloud.cloudwatch.models.BindAlertStrategyResponse;
18+
import cn.ucloud.cloudwatch.models.CreateAlertStrategyTemplateRequest;
19+
import cn.ucloud.cloudwatch.models.CreateAlertStrategyTemplateResponse;
20+
import cn.ucloud.cloudwatch.models.DeleteAlertStrategyTemplateRequest;
21+
import cn.ucloud.cloudwatch.models.DeleteAlertStrategyTemplateResponse;
1822
import cn.ucloud.cloudwatch.models.GetProductMetricsRequest;
1923
import cn.ucloud.cloudwatch.models.GetProductMetricsResponse;
2024
import cn.ucloud.cloudwatch.models.ListAlertRecordRequest;
@@ -52,6 +56,32 @@ public BindAlertStrategyResponse bindAlertStrategy(BindAlertStrategyRequest requ
5256
return (BindAlertStrategyResponse) this.invoke(request, BindAlertStrategyResponse.class);
5357
}
5458

59+
/**
60+
* CreateAlertStrategyTemplate - 新建条件模板
61+
*
62+
* @param request Request object
63+
* @throws UCloudException Exception
64+
*/
65+
public CreateAlertStrategyTemplateResponse createAlertStrategyTemplate(
66+
CreateAlertStrategyTemplateRequest request) throws UCloudException {
67+
request.setAction("CreateAlertStrategyTemplate");
68+
return (CreateAlertStrategyTemplateResponse)
69+
this.invoke(request, CreateAlertStrategyTemplateResponse.class);
70+
}
71+
72+
/**
73+
* DeleteAlertStrategyTemplate - 删除告警策略模板
74+
*
75+
* @param request Request object
76+
* @throws UCloudException Exception
77+
*/
78+
public DeleteAlertStrategyTemplateResponse deleteAlertStrategyTemplate(
79+
DeleteAlertStrategyTemplateRequest request) throws UCloudException {
80+
request.setAction("DeleteAlertStrategyTemplate");
81+
return (DeleteAlertStrategyTemplateResponse)
82+
this.invoke(request, DeleteAlertStrategyTemplateResponse.class);
83+
}
84+
5585
/**
5686
* GetProductMetrics - 获取云产品关联的指标列表
5787
*

ucloud-sdk-java-cloudwatch/src/main/java/cn/ucloud/cloudwatch/client/CloudWatchClientInterface.java

+22
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@
1515

1616
import cn.ucloud.cloudwatch.models.BindAlertStrategyRequest;
1717
import cn.ucloud.cloudwatch.models.BindAlertStrategyResponse;
18+
import cn.ucloud.cloudwatch.models.CreateAlertStrategyTemplateRequest;
19+
import cn.ucloud.cloudwatch.models.CreateAlertStrategyTemplateResponse;
20+
import cn.ucloud.cloudwatch.models.DeleteAlertStrategyTemplateRequest;
21+
import cn.ucloud.cloudwatch.models.DeleteAlertStrategyTemplateResponse;
1822
import cn.ucloud.cloudwatch.models.GetProductMetricsRequest;
1923
import cn.ucloud.cloudwatch.models.GetProductMetricsResponse;
2024
import cn.ucloud.cloudwatch.models.ListAlertRecordRequest;
@@ -44,6 +48,24 @@ public interface CloudWatchClientInterface extends Client {
4448
public BindAlertStrategyResponse bindAlertStrategy(BindAlertStrategyRequest request)
4549
throws UCloudException;
4650

51+
/**
52+
* CreateAlertStrategyTemplate - 新建条件模板
53+
*
54+
* @param request Request object
55+
* @throws UCloudException Exception
56+
*/
57+
public CreateAlertStrategyTemplateResponse createAlertStrategyTemplate(
58+
CreateAlertStrategyTemplateRequest request) throws UCloudException;
59+
60+
/**
61+
* DeleteAlertStrategyTemplate - 删除告警策略模板
62+
*
63+
* @param request Request object
64+
* @throws UCloudException Exception
65+
*/
66+
public DeleteAlertStrategyTemplateResponse deleteAlertStrategyTemplate(
67+
DeleteAlertStrategyTemplateRequest request) throws UCloudException;
68+
4769
/**
4870
* GetProductMetrics - 获取云产品关联的指标列表
4971
*
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,195 @@
1+
/**
2+
* Copyright 2021 UCloud Technology Co., Ltd.
3+
*
4+
* <p>Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
5+
* except in compliance with the License. You may obtain a copy of the License at
6+
*
7+
* <p>http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* <p>Unless required by applicable law or agreed to in writing, software distributed under the
10+
* License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
11+
* express or implied. See the License for the specific language governing permissions and
12+
* limitations under the License.
13+
*/
14+
package cn.ucloud.cloudwatch.models;
15+
16+
import cn.ucloud.common.annotation.NotEmpty;
17+
import cn.ucloud.common.annotation.UCloudParam;
18+
import cn.ucloud.common.request.Request;
19+
20+
import java.util.List;
21+
22+
public class CreateAlertStrategyTemplateRequest extends Request {
23+
24+
/**
25+
* 项目ID。不填写为默认项目,子帐号必须填写。
26+
* 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list)
27+
*/
28+
@NotEmpty
29+
@UCloudParam("ProjectId")
30+
private String projectId;
31+
32+
/** 告警模板名称。最大长度64个字符 */
33+
@NotEmpty
34+
@UCloudParam("Name")
35+
private String name;
36+
37+
/** 产品类型。参考ListMonitorProduct获取监控对象类型列表 */
38+
@NotEmpty
39+
@UCloudParam("ProductKey")
40+
private String productKey;
41+
42+
/** */
43+
@UCloudParam("RuleSet")
44+
private List<RuleSet> ruleSet;
45+
46+
/** 备注 */
47+
@UCloudParam("Remark")
48+
private String remark;
49+
50+
public String getProjectId() {
51+
return projectId;
52+
}
53+
54+
public void setProjectId(String projectId) {
55+
this.projectId = projectId;
56+
}
57+
58+
public String getName() {
59+
return name;
60+
}
61+
62+
public void setName(String name) {
63+
this.name = name;
64+
}
65+
66+
public String getProductKey() {
67+
return productKey;
68+
}
69+
70+
public void setProductKey(String productKey) {
71+
this.productKey = productKey;
72+
}
73+
74+
public List<RuleSet> getRuleSet() {
75+
return ruleSet;
76+
}
77+
78+
public void setRuleSet(List<RuleSet> ruleSet) {
79+
this.ruleSet = ruleSet;
80+
}
81+
82+
public String getRemark() {
83+
return remark;
84+
}
85+
86+
public void setRemark(String remark) {
87+
this.remark = remark;
88+
}
89+
90+
public static class RuleSet extends Request {
91+
92+
/** 规则指标ID。参考该类型产品下返回的指标列表GetProductMetrics */
93+
@NotEmpty
94+
@UCloudParam("MetricID")
95+
private Integer metricID;
96+
97+
/** 阈值比较方式。 枚举值比较方式: 1->= 2-<= 3-> 4-< 5-== 6-!= */
98+
@NotEmpty
99+
@UCloudParam("ThresholdCompare")
100+
private Integer thresholdCompare;
101+
102+
/** 触发阈值 */
103+
@NotEmpty
104+
@UCloudParam("ThresholdValue")
105+
private Integer thresholdValue;
106+
107+
/** 触发次数 */
108+
@NotEmpty
109+
@UCloudParam("TriggerCount")
110+
private Integer triggerCount;
111+
112+
/** 触发周期。枚举值:continuous连续 exponent 指数 single 不重复 */
113+
@NotEmpty
114+
@UCloudParam("SendPeriodType")
115+
private String sendPeriodType;
116+
117+
/** 告警等级。枚举值:P0,P1,P2,P3 */
118+
@NotEmpty
119+
@UCloudParam("Level")
120+
private String level;
121+
122+
/** 告警状态。枚举值:0-关闭 1-开启 */
123+
@NotEmpty
124+
@UCloudParam("Status")
125+
private Integer status;
126+
127+
/** 沉默周期(告警周期选择为连续时必填) */
128+
@UCloudParam("SendInterval")
129+
private Integer sendInterval;
130+
131+
public Integer getMetricID() {
132+
return metricID;
133+
}
134+
135+
public void setMetricID(Integer metricID) {
136+
this.metricID = metricID;
137+
}
138+
139+
public Integer getThresholdCompare() {
140+
return thresholdCompare;
141+
}
142+
143+
public void setThresholdCompare(Integer thresholdCompare) {
144+
this.thresholdCompare = thresholdCompare;
145+
}
146+
147+
public Integer getThresholdValue() {
148+
return thresholdValue;
149+
}
150+
151+
public void setThresholdValue(Integer thresholdValue) {
152+
this.thresholdValue = thresholdValue;
153+
}
154+
155+
public Integer getTriggerCount() {
156+
return triggerCount;
157+
}
158+
159+
public void setTriggerCount(Integer triggerCount) {
160+
this.triggerCount = triggerCount;
161+
}
162+
163+
public String getSendPeriodType() {
164+
return sendPeriodType;
165+
}
166+
167+
public void setSendPeriodType(String sendPeriodType) {
168+
this.sendPeriodType = sendPeriodType;
169+
}
170+
171+
public String getLevel() {
172+
return level;
173+
}
174+
175+
public void setLevel(String level) {
176+
this.level = level;
177+
}
178+
179+
public Integer getStatus() {
180+
return status;
181+
}
182+
183+
public void setStatus(Integer status) {
184+
this.status = status;
185+
}
186+
187+
public Integer getSendInterval() {
188+
return sendInterval;
189+
}
190+
191+
public void setSendInterval(Integer sendInterval) {
192+
this.sendInterval = sendInterval;
193+
}
194+
}
195+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/**
2+
* Copyright 2021 UCloud Technology Co., Ltd.
3+
*
4+
* <p>Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
5+
* except in compliance with the License. You may obtain a copy of the License at
6+
*
7+
* <p>http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* <p>Unless required by applicable law or agreed to in writing, software distributed under the
10+
* License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
11+
* express or implied. See the License for the specific language governing permissions and
12+
* limitations under the License.
13+
*/
14+
package cn.ucloud.cloudwatch.models;
15+
16+
17+
import cn.ucloud.common.response.Response;
18+
19+
import com.google.gson.annotations.SerializedName;
20+
21+
public class CreateAlertStrategyTemplateResponse extends Response {
22+
23+
/** 创建告警模板返回对象 */
24+
@SerializedName("Data")
25+
private AlertTemplate data;
26+
27+
public AlertTemplate getData() {
28+
return data;
29+
}
30+
31+
public void setData(AlertTemplate data) {
32+
this.data = data;
33+
}
34+
35+
public static class AlertTemplate extends Response {
36+
37+
/** 告警模板ID */
38+
@SerializedName("TemplateID")
39+
private Integer templateID;
40+
41+
public Integer getTemplateID() {
42+
return templateID;
43+
}
44+
45+
public void setTemplateID(Integer templateID) {
46+
this.templateID = templateID;
47+
}
48+
}
49+
}

0 commit comments

Comments
 (0)