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. + */ +package cn.ucloud.umon.client; + +import cn.ucloud.common.client.DefaultClient; +import cn.ucloud.common.config.Config; +import cn.ucloud.common.credential.Credential; +import cn.ucloud.common.exception.UCloudException; +import cn.ucloud.umon.models.BindAlarmTemplateRequest; +import cn.ucloud.umon.models.BindAlarmTemplateResponse; +import cn.ucloud.umon.models.DescribeResourceMetricRequest; +import cn.ucloud.umon.models.DescribeResourceMetricResponse; +import cn.ucloud.umon.models.GetAlarmRecordListRequest; +import cn.ucloud.umon.models.GetAlarmRecordListResponse; +import cn.ucloud.umon.models.GetAlarmTemplateListRequest; +import cn.ucloud.umon.models.GetAlarmTemplateListResponse; +import cn.ucloud.umon.models.GetMetricOverviewRequest; +import cn.ucloud.umon.models.GetMetricOverviewResponse; +import cn.ucloud.umon.models.GetMetricRequest; +import cn.ucloud.umon.models.GetMetricResponse; +import cn.ucloud.umon.models.GetResourceAlarmTemplateRequest; +import cn.ucloud.umon.models.GetResourceAlarmTemplateResponse; +import cn.ucloud.umon.models.UnbindAlarmTemplateRequest; +import cn.ucloud.umon.models.UnbindAlarmTemplateResponse; + +/** This client is used to call actions of **UMon** service */ +public class UMonClient extends DefaultClient implements UMonClientInterface { + public UMonClient(Config config, Credential credential) { + super(config, credential); + } + + /** + * BindAlarmTemplate - 绑定告警模板 + * + * @param request Request object + * @throws UCloudException Exception + */ + public BindAlarmTemplateResponse bindAlarmTemplate(BindAlarmTemplateRequest request) + throws UCloudException { + request.setAction("BindAlarmTemplate"); + return (BindAlarmTemplateResponse) this.invoke(request, BindAlarmTemplateResponse.class); + } + + /** + * DescribeResourceMetric - 获取资源支持监控指标信息 + * + * @param request Request object + * @throws UCloudException Exception + */ + public DescribeResourceMetricResponse describeResourceMetric( + DescribeResourceMetricRequest request) throws UCloudException { + request.setAction("DescribeResourceMetric"); + return (DescribeResourceMetricResponse) + this.invoke(request, DescribeResourceMetricResponse.class); + } + + /** + * GetAlarmRecordList - 获取告警记录列表 + * + * @param request Request object + * @throws UCloudException Exception + */ + public GetAlarmRecordListResponse getAlarmRecordList(GetAlarmRecordListRequest request) + throws UCloudException { + request.setAction("GetAlarmRecordList"); + return (GetAlarmRecordListResponse) this.invoke(request, GetAlarmRecordListResponse.class); + } + + /** + * GetAlarmTemplateList - 获取告警模板列表 + * + * @param request Request object + * @throws UCloudException Exception + */ + public GetAlarmTemplateListResponse getAlarmTemplateList(GetAlarmTemplateListRequest request) + throws UCloudException { + request.setAction("GetAlarmTemplateList"); + return (GetAlarmTemplateListResponse) + this.invoke(request, GetAlarmTemplateListResponse.class); + } + + /** + * GetMetric - 获取监控数据 + * + * @param request Request object + * @throws UCloudException Exception + */ + public GetMetricResponse getMetric(GetMetricRequest request) throws UCloudException { + request.setAction("GetMetric"); + return (GetMetricResponse) this.invoke(request, GetMetricResponse.class); + } + + /** + * GetMetricOverview - 获取监控概况数据 + * + * @param request Request object + * @throws UCloudException Exception + */ + public GetMetricOverviewResponse getMetricOverview(GetMetricOverviewRequest request) + throws UCloudException { + request.setAction("GetMetricOverview"); + return (GetMetricOverviewResponse) this.invoke(request, GetMetricOverviewResponse.class); + } + + /** + * GetResourceAlarmTemplate - 获取资源绑定的告警模板 + * + * @param request Request object + * @throws UCloudException Exception + */ + public GetResourceAlarmTemplateResponse getResourceAlarmTemplate( + GetResourceAlarmTemplateRequest request) throws UCloudException { + request.setAction("GetResourceAlarmTemplate"); + return (GetResourceAlarmTemplateResponse) + this.invoke(request, GetResourceAlarmTemplateResponse.class); + } + + /** + * UnbindAlarmTemplate - 解绑告警模板 + * + * @param request Request object + * @throws UCloudException Exception + */ + public UnbindAlarmTemplateResponse unbindAlarmTemplate(UnbindAlarmTemplateRequest request) + throws UCloudException { + request.setAction("UnbindAlarmTemplate"); + return (UnbindAlarmTemplateResponse) + this.invoke(request, UnbindAlarmTemplateResponse.class); + } +} diff --git a/ucloud-sdk-java-umon/src/main/java/cn/ucloud/umon/client/UMonClientInterface.java b/ucloud-sdk-java-umon/src/main/java/cn/ucloud/umon/client/UMonClientInterface.java new file mode 100644 index 00000000..880ed132 --- /dev/null +++ b/ucloud-sdk-java-umon/src/main/java/cn/ucloud/umon/client/UMonClientInterface.java @@ -0,0 +1,108 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *
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. + */ +package cn.ucloud.umon.client; + +import cn.ucloud.common.client.Client; +import cn.ucloud.common.exception.UCloudException; +import cn.ucloud.umon.models.BindAlarmTemplateRequest; +import cn.ucloud.umon.models.BindAlarmTemplateResponse; +import cn.ucloud.umon.models.DescribeResourceMetricRequest; +import cn.ucloud.umon.models.DescribeResourceMetricResponse; +import cn.ucloud.umon.models.GetAlarmRecordListRequest; +import cn.ucloud.umon.models.GetAlarmRecordListResponse; +import cn.ucloud.umon.models.GetAlarmTemplateListRequest; +import cn.ucloud.umon.models.GetAlarmTemplateListResponse; +import cn.ucloud.umon.models.GetMetricOverviewRequest; +import cn.ucloud.umon.models.GetMetricOverviewResponse; +import cn.ucloud.umon.models.GetMetricRequest; +import cn.ucloud.umon.models.GetMetricResponse; +import cn.ucloud.umon.models.GetResourceAlarmTemplateRequest; +import cn.ucloud.umon.models.GetResourceAlarmTemplateResponse; +import cn.ucloud.umon.models.UnbindAlarmTemplateRequest; +import cn.ucloud.umon.models.UnbindAlarmTemplateResponse; + +/** This client is used to call actions of **UMon** service */ +public interface UMonClientInterface extends Client { + + /** + * BindAlarmTemplate - 绑定告警模板 + * + * @param request Request object + * @throws UCloudException Exception + */ + public BindAlarmTemplateResponse bindAlarmTemplate(BindAlarmTemplateRequest request) + throws UCloudException; + + /** + * DescribeResourceMetric - 获取资源支持监控指标信息 + * + * @param request Request object + * @throws UCloudException Exception + */ + public DescribeResourceMetricResponse describeResourceMetric( + DescribeResourceMetricRequest request) throws UCloudException; + + /** + * GetAlarmRecordList - 获取告警记录列表 + * + * @param request Request object + * @throws UCloudException Exception + */ + public GetAlarmRecordListResponse getAlarmRecordList(GetAlarmRecordListRequest request) + throws UCloudException; + + /** + * GetAlarmTemplateList - 获取告警模板列表 + * + * @param request Request object + * @throws UCloudException Exception + */ + public GetAlarmTemplateListResponse getAlarmTemplateList(GetAlarmTemplateListRequest request) + throws UCloudException; + + /** + * GetMetric - 获取监控数据 + * + * @param request Request object + * @throws UCloudException Exception + */ + public GetMetricResponse getMetric(GetMetricRequest request) throws UCloudException; + + /** + * GetMetricOverview - 获取监控概况数据 + * + * @param request Request object + * @throws UCloudException Exception + */ + public GetMetricOverviewResponse getMetricOverview(GetMetricOverviewRequest request) + throws UCloudException; + + /** + * GetResourceAlarmTemplate - 获取资源绑定的告警模板 + * + * @param request Request object + * @throws UCloudException Exception + */ + public GetResourceAlarmTemplateResponse getResourceAlarmTemplate( + GetResourceAlarmTemplateRequest request) throws UCloudException; + + /** + * UnbindAlarmTemplate - 解绑告警模板 + * + * @param request Request object + * @throws UCloudException Exception + */ + public UnbindAlarmTemplateResponse unbindAlarmTemplate(UnbindAlarmTemplateRequest request) + throws UCloudException; +} diff --git a/ucloud-sdk-java-umon/src/main/java/cn/ucloud/umon/models/BindAlarmTemplateRequest.java b/ucloud-sdk-java-umon/src/main/java/cn/ucloud/umon/models/BindAlarmTemplateRequest.java new file mode 100644 index 00000000..9de54462 --- /dev/null +++ b/ucloud-sdk-java-umon/src/main/java/cn/ucloud/umon/models/BindAlarmTemplateRequest.java @@ -0,0 +1,102 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *
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.
+ */
+package cn.ucloud.umon.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 BindAlarmTemplateRequest extends Request {
+
+ /** 地域。 参见 [地域和可用区列表](../summary/regionlist.html) */
+ @NotEmpty
+ @UCloudParam("Region")
+ private String region;
+
+ /**
+ * 可用区,如下资源类型不需要: 'eip', 'sharebandwidth', 'ulb', 'ulb-vserver', 'ulb-server', 'vserver', 'ugc',
+ * 'upath','ugaa'
+ */
+ @UCloudParam("Zone")
+ private String zone;
+
+ /** 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) */
+ @UCloudParam("ProjectId")
+ private String projectId;
+
+ /** 告警模板id,调用GetAlarmTemplateList获取 */
+ @NotEmpty
+ @UCloudParam("AlarmTemplateId")
+ private String alarmTemplateId;
+
+ /** 资源类型,同DescribeResourceMetric支持的类型,请参考DescribeResourceMetric中的可选资源类型 */
+ @NotEmpty
+ @UCloudParam("ResourceType")
+ private String resourceType;
+
+ /** 短资源id列表 */
+ @NotEmpty
+ @UCloudParam("ResourceId")
+ private List 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.
+ */
+package cn.ucloud.umon.models;
+
+
+
+import cn.ucloud.common.response.Response;
+
+public class BindAlarmTemplateResponse extends Response {}
diff --git a/ucloud-sdk-java-umon/src/main/java/cn/ucloud/umon/models/DescribeResourceMetricRequest.java b/ucloud-sdk-java-umon/src/main/java/cn/ucloud/umon/models/DescribeResourceMetricRequest.java
new file mode 100644
index 00000000..f7934696
--- /dev/null
+++ b/ucloud-sdk-java-umon/src/main/java/cn/ucloud/umon/models/DescribeResourceMetricRequest.java
@@ -0,0 +1,48 @@
+/**
+ * Copyright 2021 UCloud Technology Co., Ltd.
+ *
+ * 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.
+ */
+package cn.ucloud.umon.models;
+
+
+import cn.ucloud.common.annotation.NotEmpty;
+import cn.ucloud.common.annotation.UCloudParam;
+import cn.ucloud.common.request.Request;
+
+public class DescribeResourceMetricRequest extends Request {
+
+ /**
+ * 资源类型 支持如下类型: dbaudit:数据库审计; docker:容器服务; docker_node:容器服务节点; eip:弹性IP; fortress:堡垒机;
+ * hybridcloud_lan:混合云局域网; hybridcloud_port:混合云交换机端口; hybridcloud_port_sum:混合云外网总出口; mq:消息队列;
+ * natgw:NAT网关; phost:物理云主机; sharebandwidth:共享带宽; uaiservice:AI在线服务; ucdn:云分发; udb:云数据库;
+ * uddb:分布式数据库; uddbac:UDDB分析节点; uddbmd:分布式数据库中间件; uddbnode:分布式数据库节点; udisk:云硬盘;
+ * udisk_rssd:RSSD云硬盘; udisk_ssd:SSD云硬盘(数据盘); udisk_sys:普通云硬盘(系统盘); udpn:高速通道; udset:私有专区资源池;
+ * udset_uhost:资源池主机; udw:云数据仓库; udw_node:云数据仓库节点; ues:ES服务; ues_node:elasticsearch服务节点;
+ * ufile:对象存储; ufs:文件存储; ugaa:全球动态加速; ugc:通用计算; uhadoop:托管Hadoop集群; uhadoop_host:托管Hadoop集群;
+ * uhost:云主机; ukafka:Kafka消息队列; ukafka_host:分布式消息节点; ukv:容量型KV存储; ulb:负载均衡; ulb-server:真实服务节点;
+ * ulb-vserver:虚拟服务节点; umem:云内存存储; umemcache:单机版memcache; upath:加速线路; uredis:云内存存储; utsdb:时序数据库;
+ * vpntunnel:vpn隧道; vserver:虚拟服务节点;
+ *
+ * 各产品支持监控项,请查看:https://docs.ucloud.cn/api/umon-api/get_metric
+ */
+ @NotEmpty
+ @UCloudParam("ResourceType")
+ private String resourceType;
+
+ public String getResourceType() {
+ return resourceType;
+ }
+
+ public void setResourceType(String resourceType) {
+ this.resourceType = resourceType;
+ }
+}
diff --git a/ucloud-sdk-java-umon/src/main/java/cn/ucloud/umon/models/DescribeResourceMetricResponse.java b/ucloud-sdk-java-umon/src/main/java/cn/ucloud/umon/models/DescribeResourceMetricResponse.java
new file mode 100644
index 00000000..1f8d020f
--- /dev/null
+++ b/ucloud-sdk-java-umon/src/main/java/cn/ucloud/umon/models/DescribeResourceMetricResponse.java
@@ -0,0 +1,35 @@
+/**
+ * Copyright 2021 UCloud Technology Co., Ltd.
+ *
+ * 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.
+ */
+package cn.ucloud.umon.models;
+
+import cn.ucloud.common.response.Response;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.util.List;
+
+public class DescribeResourceMetricResponse extends Response {
+
+ /** 指标信息集合 */
+ @SerializedName("DataSet")
+ private List 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.
+ */
+package cn.ucloud.umon.models;
+
+
+import cn.ucloud.common.annotation.UCloudParam;
+import cn.ucloud.common.request.Request;
+
+public class GetAlarmRecordListRequest extends Request {
+
+ /**
+ * 项目ID。不填写为默认项目,子帐号必须填写。
+ * 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list)
+ */
+ @UCloudParam("ProjectId")
+ private String projectId;
+
+ /** 开始时间,时间戳 */
+ @UCloudParam("BeginTime")
+ private Integer beginTime;
+
+ /** 结束时间,时间戳(当前仅支持获取时间间隔在31天内的告警记录) */
+ @UCloudParam("EndTime")
+ private Integer endTime;
+
+ public String getProjectId() {
+ return projectId;
+ }
+
+ public void setProjectId(String projectId) {
+ this.projectId = projectId;
+ }
+
+ public Integer getBeginTime() {
+ return beginTime;
+ }
+
+ public void setBeginTime(Integer beginTime) {
+ this.beginTime = beginTime;
+ }
+
+ public Integer getEndTime() {
+ return endTime;
+ }
+
+ public void setEndTime(Integer endTime) {
+ this.endTime = endTime;
+ }
+}
diff --git a/ucloud-sdk-java-umon/src/main/java/cn/ucloud/umon/models/GetAlarmRecordListResponse.java b/ucloud-sdk-java-umon/src/main/java/cn/ucloud/umon/models/GetAlarmRecordListResponse.java
new file mode 100644
index 00000000..9682897b
--- /dev/null
+++ b/ucloud-sdk-java-umon/src/main/java/cn/ucloud/umon/models/GetAlarmRecordListResponse.java
@@ -0,0 +1,170 @@
+/**
+ * Copyright 2021 UCloud Technology Co., Ltd.
+ *
+ * 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.
+ */
+package cn.ucloud.umon.models;
+
+import cn.ucloud.common.response.Response;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.util.List;
+
+public class GetAlarmRecordListResponse extends Response {
+
+ /** 告警记录列表 */
+ @SerializedName("DataSet")
+ private List 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.
+ */
+package cn.ucloud.umon.models;
+
+
+import cn.ucloud.common.annotation.NotEmpty;
+import cn.ucloud.common.annotation.UCloudParam;
+import cn.ucloud.common.request.Request;
+
+public class GetAlarmTemplateListRequest extends Request {
+
+ /** 地域。 参见 [地域和可用区列表](../summary/regionlist.html) */
+ @NotEmpty
+ @UCloudParam("Region")
+ private String region;
+
+ /** 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list) */
+ @UCloudParam("ProjectId")
+ private String projectId;
+
+ /** 返回数据长度,默认为20 */
+ @UCloudParam("Limit")
+ private Integer limit;
+
+ /** 列表起始位置偏移量,默认为0 */
+ @UCloudParam("Offset")
+ private Integer offset;
+
+ public String getRegion() {
+ return region;
+ }
+
+ public void setRegion(String region) {
+ this.region = region;
+ }
+
+ public String getProjectId() {
+ return projectId;
+ }
+
+ public void setProjectId(String projectId) {
+ this.projectId = projectId;
+ }
+
+ public Integer getLimit() {
+ return limit;
+ }
+
+ public void setLimit(Integer limit) {
+ this.limit = limit;
+ }
+
+ public Integer getOffset() {
+ return offset;
+ }
+
+ public void setOffset(Integer offset) {
+ this.offset = offset;
+ }
+}
diff --git a/ucloud-sdk-java-umon/src/main/java/cn/ucloud/umon/models/GetAlarmTemplateListResponse.java b/ucloud-sdk-java-umon/src/main/java/cn/ucloud/umon/models/GetAlarmTemplateListResponse.java
new file mode 100644
index 00000000..765c2b79
--- /dev/null
+++ b/ucloud-sdk-java-umon/src/main/java/cn/ucloud/umon/models/GetAlarmTemplateListResponse.java
@@ -0,0 +1,134 @@
+/**
+ * Copyright 2021 UCloud Technology Co., Ltd.
+ *
+ * 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.
+ */
+package cn.ucloud.umon.models;
+
+import cn.ucloud.common.response.Response;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.util.List;
+
+public class GetAlarmTemplateListResponse extends Response {
+
+ /** 总数量 */
+ @SerializedName("TotalCount")
+ private Integer totalCount;
+
+ /** 告警模板列表 */
+ @SerializedName("DataSet")
+ private List 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.
+ */
+package cn.ucloud.umon.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 GetMetricOverviewRequest extends Request {
+
+ /** 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) */
+ @NotEmpty
+ @UCloudParam("Region")
+ private String region;
+
+ /** 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) */
+ @NotEmpty
+ @UCloudParam("Zone")
+ private String zone;
+
+ /** 项目ID,不填为默认项目。子账户必须填写项目ID */
+ @UCloudParam("ProjectId")
+ private String projectId;
+
+ /** 资源类型 */
+ @NotEmpty
+ @UCloudParam("ResourceType")
+ private String resourceType;
+
+ /** 监控指标名称,若省略则返回所有监控指标数据 */
+ @UCloudParam("MetricName")
+ private List 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.
+ */
+package cn.ucloud.umon.models;
+
+import cn.ucloud.common.response.Response;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.util.List;
+
+public class GetMetricOverviewResponse extends Response {
+
+ /** JSON格式监控数据列表 */
+ @SerializedName("DataSet")
+ private List 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.
+ */
+package cn.ucloud.umon.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 GetMetricRequest extends Request {
+
+ /** 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) */
+ @NotEmpty
+ @UCloudParam("Region")
+ private String region;
+
+ /** 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) */
+ @NotEmpty
+ @UCloudParam("Zone")
+ private String zone;
+
+ /** 项目ID,不填为默认项目。子账户必须填写项目ID */
+ @UCloudParam("ProjectId")
+ private String projectId;
+
+ /** 资源类型 */
+ @NotEmpty
+ @UCloudParam("ResourceType")
+ private String resourceType;
+
+ /** 指标名称(不同ResourceType对应不同的MetricName) */
+ @NotEmpty
+ @UCloudParam("MetricName")
+ private List 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.
+ */
+package cn.ucloud.umon.models;
+
+
+import cn.ucloud.common.response.Response;
+
+import com.google.gson.annotations.SerializedName;
+
+public class GetMetricResponse extends Response {
+
+ /** 数据 */
+ @SerializedName("DataSets")
+ private DataSet dataSets;
+
+ public DataSet getDataSets() {
+ return dataSets;
+ }
+
+ public void setDataSets(DataSet dataSets) {
+ this.dataSets = dataSets;
+ }
+
+ public static class DataSet extends Response {
+
+ /** 时间戳 */
+ @SerializedName("Timestamp")
+ private Integer timestamp;
+
+ /** 值 */
+ @SerializedName("Value")
+ private Integer value;
+
+ /** 数据源IP地址 */
+ @SerializedName("IP")
+ private String ip;
+
+ public Integer getTimestamp() {
+ return timestamp;
+ }
+
+ public void setTimestamp(Integer timestamp) {
+ this.timestamp = timestamp;
+ }
+
+ public Integer getValue() {
+ return value;
+ }
+
+ public void setValue(Integer value) {
+ this.value = value;
+ }
+
+ public String getIP() {
+ return ip;
+ }
+
+ public void setIP(String ip) {
+ this.ip = ip;
+ }
+ }
+}
diff --git a/ucloud-sdk-java-umon/src/main/java/cn/ucloud/umon/models/GetResourceAlarmTemplateRequest.java b/ucloud-sdk-java-umon/src/main/java/cn/ucloud/umon/models/GetResourceAlarmTemplateRequest.java
new file mode 100644
index 00000000..14379d67
--- /dev/null
+++ b/ucloud-sdk-java-umon/src/main/java/cn/ucloud/umon/models/GetResourceAlarmTemplateRequest.java
@@ -0,0 +1,77 @@
+/**
+ * Copyright 2021 UCloud Technology Co., Ltd.
+ *
+ * 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.
+ */
+package cn.ucloud.umon.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 GetResourceAlarmTemplateRequest extends Request {
+
+ /** 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) */
+ @NotEmpty
+ @UCloudParam("Region")
+ private String region;
+
+ /**
+ * 项目ID。不填写为默认项目,子帐号必须填写。
+ * 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list)
+ */
+ @UCloudParam("ProjectId")
+ private String projectId;
+
+ /** 资源类型(与DescribeResourceMetric中一致) */
+ @NotEmpty
+ @UCloudParam("ResourceType")
+ private String resourceType;
+
+ /** 资源id列表 */
+ @NotEmpty
+ @UCloudParam("ResourceId")
+ private List 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.
+ */
+package cn.ucloud.umon.models;
+
+import cn.ucloud.common.response.Response;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.util.List;
+
+public class GetResourceAlarmTemplateResponse extends Response {
+
+ /** 请见ResourceTemplateBound */
+ @SerializedName("DataSet")
+ private List 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.
+ */
+package cn.ucloud.umon.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 UnbindAlarmTemplateRequest extends Request {
+
+ /** 地域。 参见 [地域和可用区列表](../summary/regionlist.html) */
+ @NotEmpty
+ @UCloudParam("Region")
+ private String region;
+
+ /** 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) */
+ @UCloudParam("ProjectId")
+ private String projectId;
+
+ /** 资源类型,同DescribeResourceMetric支持的类型,请参考DescribeResourceMetric中的可选资源类型 */
+ @NotEmpty
+ @UCloudParam("ResourceType")
+ private String resourceType;
+
+ /** 资源id */
+ @NotEmpty
+ @UCloudParam("ResourceId")
+ private List 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.
+ */
+package cn.ucloud.umon.models;
+
+
+
+import cn.ucloud.common.response.Response;
+
+public class UnbindAlarmTemplateResponse extends Response {}
diff --git a/ucloud-sdk-java-umongodb/pom.xml b/ucloud-sdk-java-umongodb/pom.xml
index aa312b67..90c27013 100644
--- a/ucloud-sdk-java-umongodb/pom.xml
+++ b/ucloud-sdk-java-umongodb/pom.xml
@@ -5,18 +5,18 @@