Skip to content

Commit ca3acda

Browse files
authored
Merge pull request #121 from ucloud-bot/codegen/1754467339
sdk: rolling update for 1.2.46-release
2 parents e16b87a + 1200712 commit ca3acda

File tree

51 files changed

+414
-226
lines changed

Some content is hidden

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

51 files changed

+414
-226
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.2.45-release
1+
1.2.46-release

examples/generic/pom.xml

Lines changed: 2 additions & 2 deletions
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.45-release</version>
10+
<version>1.2.46-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.45-release</version>
21+
<version>1.2.46-release</version>
2222
</dependency>
2323
</dependencies>
2424
</project>

examples/uhost/pom.xml

Lines changed: 2 additions & 2 deletions
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.45-release</version>
10+
<version>1.2.46-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.45-release</version>
21+
<version>1.2.46-release</version>
2222
</dependency>
2323
</dependencies>
2424
</project>

pom.xml

Lines changed: 1 addition & 1 deletion
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.45-release</version>
10+
<version>1.2.46-release</version>
1111
<modules>
1212
<module>ucloud-sdk-java-common</module>
1313
<module>ucloud-sdk-java-cloudwatch</module>

ucloud-sdk-java-cloudwatch/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@
55
<parent>
66
<artifactId>ucloud-sdk-java</artifactId>
77
<groupId>cn.ucloud</groupId>
8-
<version>1.2.45-release</version>
8+
<version>1.2.46-release</version>
99
</parent>
1010

1111
<modelVersion>4.0.0</modelVersion>
1212
<artifactId>ucloud-sdk-java-cloudwatch</artifactId>
13-
<version>1.2.45-release</version>
13+
<version>1.2.46-release</version>
1414

1515
<dependencies>
1616
<dependency>
1717
<groupId>cn.ucloud</groupId>
1818
<artifactId>ucloud-sdk-java-common</artifactId>
19-
<version>1.2.45-release</version>
19+
<version>1.2.46-release</version>
2020
</dependency>
2121

2222
<dependency>

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

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
import cn.ucloud.cloudwatch.models.CreateAlertStrategyTemplateResponse;
2222
import cn.ucloud.cloudwatch.models.DeleteAlertStrategyTemplateRequest;
2323
import cn.ucloud.cloudwatch.models.DeleteAlertStrategyTemplateResponse;
24+
import cn.ucloud.cloudwatch.models.EnableAlertStrategyRequest;
25+
import cn.ucloud.cloudwatch.models.EnableAlertStrategyResponse;
2426
import cn.ucloud.cloudwatch.models.GetProductMetricsRequest;
2527
import cn.ucloud.cloudwatch.models.GetProductMetricsResponse;
2628
import cn.ucloud.cloudwatch.models.ListAlertRecordRequest;
@@ -31,6 +33,8 @@
3133
import cn.ucloud.cloudwatch.models.ListAlertStrategyTemplateResponse;
3234
import cn.ucloud.cloudwatch.models.ListMonitorProductRequest;
3335
import cn.ucloud.cloudwatch.models.ListMonitorProductResponse;
36+
import cn.ucloud.cloudwatch.models.ModifyAlertStrategyRemarkRequest;
37+
import cn.ucloud.cloudwatch.models.ModifyAlertStrategyRemarkResponse;
3438
import cn.ucloud.cloudwatch.models.QueryMetricDataSetRequest;
3539
import cn.ucloud.cloudwatch.models.QueryMetricDataSetResponse;
3640
import cn.ucloud.cloudwatch.models.QueryMetricDataSummaryRequest;
@@ -91,7 +95,7 @@ public CreateAlertStrategyTemplateResponse createAlertStrategyTemplate(
9195
}
9296

9397
/**
94-
* DeleteAlertStrategyTemplate - 删除告警策略模板
98+
* DeleteAlertStrategyTemplate - 删除告警条件模板
9599
*
96100
* @param request Request object
97101
* @throws UCloudException Exception
@@ -103,6 +107,19 @@ public DeleteAlertStrategyTemplateResponse deleteAlertStrategyTemplate(
103107
this.invoke(request, DeleteAlertStrategyTemplateResponse.class);
104108
}
105109

110+
/**
111+
* EnableAlertStrategy - 是否启用告警策略
112+
*
113+
* @param request Request object
114+
* @throws UCloudException Exception
115+
*/
116+
public EnableAlertStrategyResponse enableAlertStrategy(EnableAlertStrategyRequest request)
117+
throws UCloudException {
118+
request.setAction("EnableAlertStrategy");
119+
return (EnableAlertStrategyResponse)
120+
this.invoke(request, EnableAlertStrategyResponse.class);
121+
}
122+
106123
/**
107124
* GetProductMetrics - 获取云产品关联的指标列表
108125
*
@@ -164,6 +181,19 @@ public ListMonitorProductResponse listMonitorProduct(ListMonitorProductRequest r
164181
return (ListMonitorProductResponse) this.invoke(request, ListMonitorProductResponse.class);
165182
}
166183

184+
/**
185+
* ModifyAlertStrategyRemark - 修改告警策略备注
186+
*
187+
* @param request Request object
188+
* @throws UCloudException Exception
189+
*/
190+
public ModifyAlertStrategyRemarkResponse modifyAlertStrategyRemark(
191+
ModifyAlertStrategyRemarkRequest request) throws UCloudException {
192+
request.setAction("ModifyAlertStrategyRemark");
193+
return (ModifyAlertStrategyRemarkResponse)
194+
this.invoke(request, ModifyAlertStrategyRemarkResponse.class);
195+
}
196+
167197
/**
168198
* QueryMetricDataSet - 查询监控指标数据集
169199
*

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

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
import cn.ucloud.cloudwatch.models.CreateAlertStrategyTemplateResponse;
2222
import cn.ucloud.cloudwatch.models.DeleteAlertStrategyTemplateRequest;
2323
import cn.ucloud.cloudwatch.models.DeleteAlertStrategyTemplateResponse;
24+
import cn.ucloud.cloudwatch.models.EnableAlertStrategyRequest;
25+
import cn.ucloud.cloudwatch.models.EnableAlertStrategyResponse;
2426
import cn.ucloud.cloudwatch.models.GetProductMetricsRequest;
2527
import cn.ucloud.cloudwatch.models.GetProductMetricsResponse;
2628
import cn.ucloud.cloudwatch.models.ListAlertRecordRequest;
@@ -31,6 +33,8 @@
3133
import cn.ucloud.cloudwatch.models.ListAlertStrategyTemplateResponse;
3234
import cn.ucloud.cloudwatch.models.ListMonitorProductRequest;
3335
import cn.ucloud.cloudwatch.models.ListMonitorProductResponse;
36+
import cn.ucloud.cloudwatch.models.ModifyAlertStrategyRemarkRequest;
37+
import cn.ucloud.cloudwatch.models.ModifyAlertStrategyRemarkResponse;
3438
import cn.ucloud.cloudwatch.models.QueryMetricDataSetRequest;
3539
import cn.ucloud.cloudwatch.models.QueryMetricDataSetResponse;
3640
import cn.ucloud.cloudwatch.models.QueryMetricDataSummaryRequest;
@@ -75,14 +79,23 @@ public CreateAlertStrategyTemplateResponse createAlertStrategyTemplate(
7579
CreateAlertStrategyTemplateRequest request) throws UCloudException;
7680

7781
/**
78-
* DeleteAlertStrategyTemplate - 删除告警策略模板
82+
* DeleteAlertStrategyTemplate - 删除告警条件模板
7983
*
8084
* @param request Request object
8185
* @throws UCloudException Exception
8286
*/
8387
public DeleteAlertStrategyTemplateResponse deleteAlertStrategyTemplate(
8488
DeleteAlertStrategyTemplateRequest request) throws UCloudException;
8589

90+
/**
91+
* EnableAlertStrategy - 是否启用告警策略
92+
*
93+
* @param request Request object
94+
* @throws UCloudException Exception
95+
*/
96+
public EnableAlertStrategyResponse enableAlertStrategy(EnableAlertStrategyRequest request)
97+
throws UCloudException;
98+
8699
/**
87100
* GetProductMetrics - 获取云产品关联的指标列表
88101
*
@@ -128,6 +141,15 @@ public ListAlertStrategyTemplateResponse listAlertStrategyTemplate(
128141
public ListMonitorProductResponse listMonitorProduct(ListMonitorProductRequest request)
129142
throws UCloudException;
130143

144+
/**
145+
* ModifyAlertStrategyRemark - 修改告警策略备注
146+
*
147+
* @param request Request object
148+
* @throws UCloudException Exception
149+
*/
150+
public ModifyAlertStrategyRemarkResponse modifyAlertStrategyRemark(
151+
ModifyAlertStrategyRemarkRequest request) throws UCloudException;
152+
131153
/**
132154
* QueryMetricDataSet - 查询监控指标数据集
133155
*

ucloud-sdk-java-cloudwatch/src/main/java/cn/ucloud/cloudwatch/models/CreateAlertStrategyRequest.java

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,6 @@ public class CreateAlertStrategyRequest extends Request {
5757
@UCloudParam("ResourceGroupIDs")
5858
private List<Integer> resourceGroupIDs;
5959

60-
/** */
61-
@UCloudParam("Tags")
62-
private List<Tags> tags;
63-
6460
/** 模板id.对应TemplateId=2 */
6561
@UCloudParam("TemplateId")
6662
private Integer templateId;
@@ -149,14 +145,6 @@ public void setResourceGroupIDs(List<Integer> resourceGroupIDs) {
149145
this.resourceGroupIDs = resourceGroupIDs;
150146
}
151147

152-
public List<Tags> getTags() {
153-
return tags;
154-
}
155-
156-
public void setTags(List<Tags> tags) {
157-
this.tags = tags;
158-
}
159-
160148
public Integer getTemplateId() {
161149
return templateId;
162150
}
@@ -319,43 +307,4 @@ public void setSendInterval(Integer sendInterval) {
319307
this.sendInterval = sendInterval;
320308
}
321309
}
322-
323-
public static class Tags extends Request {
324-
325-
/** 数据点tag key */
326-
@UCloudParam("Key")
327-
private String key;
328-
329-
/** 数据点tag operator 包含= 不包含!= */
330-
@UCloudParam("Operator")
331-
private String operator;
332-
333-
/** 数据点tag value */
334-
@UCloudParam("Values")
335-
private List<String> values;
336-
337-
public String getKey() {
338-
return key;
339-
}
340-
341-
public void setKey(String key) {
342-
this.key = key;
343-
}
344-
345-
public String getOperator() {
346-
return operator;
347-
}
348-
349-
public void setOperator(String operator) {
350-
this.operator = operator;
351-
}
352-
353-
public List<String> getValues() {
354-
return values;
355-
}
356-
357-
public void setValues(List<String> values) {
358-
this.values = values;
359-
}
360-
}
361310
}
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
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.annotation.NotEmpty;
18+
import cn.ucloud.common.annotation.UCloudParam;
19+
import cn.ucloud.common.request.Request;
20+
21+
public class EnableAlertStrategyRequest extends Request {
22+
23+
/**
24+
* 项目ID。不填写为默认项目,子帐号必须填写。
25+
* 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list)
26+
*/
27+
@NotEmpty
28+
@UCloudParam("ProjectId")
29+
private String projectId;
30+
31+
/** 告警策略id */
32+
@NotEmpty
33+
@UCloudParam("AlertStrategyID")
34+
private Integer alertStrategyID;
35+
36+
/** 启用状态0 停用 1 启用 */
37+
@NotEmpty
38+
@UCloudParam("Status")
39+
private Integer status;
40+
41+
public String getProjectId() {
42+
return projectId;
43+
}
44+
45+
public void setProjectId(String projectId) {
46+
this.projectId = projectId;
47+
}
48+
49+
public Integer getAlertStrategyID() {
50+
return alertStrategyID;
51+
}
52+
53+
public void setAlertStrategyID(Integer alertStrategyID) {
54+
this.alertStrategyID = alertStrategyID;
55+
}
56+
57+
public Integer getStatus() {
58+
return status;
59+
}
60+
61+
public void setStatus(Integer status) {
62+
this.status = status;
63+
}
64+
}
Lines changed: 49 additions & 0 deletions
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 EnableAlertStrategyResponse extends Response {
22+
23+
/** 返回数据 */
24+
@SerializedName("Data")
25+
private AlertStrategyId data;
26+
27+
public AlertStrategyId getData() {
28+
return data;
29+
}
30+
31+
public void setData(AlertStrategyId data) {
32+
this.data = data;
33+
}
34+
35+
public static class AlertStrategyId extends Response {
36+
37+
/** 告警策略id */
38+
@SerializedName("AlertStrategyID")
39+
private Integer alertStrategyID;
40+
41+
public Integer getAlertStrategyID() {
42+
return alertStrategyID;
43+
}
44+
45+
public void setAlertStrategyID(Integer alertStrategyID) {
46+
this.alertStrategyID = alertStrategyID;
47+
}
48+
}
49+
}

0 commit comments

Comments
 (0)