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.45-release
1.2.46-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.45-release</version>
<version>1.2.46-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.45-release</version>
<version>1.2.46-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.45-release</version>
<version>1.2.46-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.45-release</version>
<version>1.2.46-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.45-release</version>
<version>1.2.46-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,18 +5,18 @@
<parent>
<artifactId>ucloud-sdk-java</artifactId>
<groupId>cn.ucloud</groupId>
<version>1.2.45-release</version>
<version>1.2.46-release</version>
</parent>

<modelVersion>4.0.0</modelVersion>
<artifactId>ucloud-sdk-java-cloudwatch</artifactId>
<version>1.2.45-release</version>
<version>1.2.46-release</version>

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

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
import cn.ucloud.cloudwatch.models.CreateAlertStrategyTemplateResponse;
import cn.ucloud.cloudwatch.models.DeleteAlertStrategyTemplateRequest;
import cn.ucloud.cloudwatch.models.DeleteAlertStrategyTemplateResponse;
import cn.ucloud.cloudwatch.models.EnableAlertStrategyRequest;
import cn.ucloud.cloudwatch.models.EnableAlertStrategyResponse;
import cn.ucloud.cloudwatch.models.GetProductMetricsRequest;
import cn.ucloud.cloudwatch.models.GetProductMetricsResponse;
import cn.ucloud.cloudwatch.models.ListAlertRecordRequest;
Expand All @@ -31,6 +33,8 @@
import cn.ucloud.cloudwatch.models.ListAlertStrategyTemplateResponse;
import cn.ucloud.cloudwatch.models.ListMonitorProductRequest;
import cn.ucloud.cloudwatch.models.ListMonitorProductResponse;
import cn.ucloud.cloudwatch.models.ModifyAlertStrategyRemarkRequest;
import cn.ucloud.cloudwatch.models.ModifyAlertStrategyRemarkResponse;
import cn.ucloud.cloudwatch.models.QueryMetricDataSetRequest;
import cn.ucloud.cloudwatch.models.QueryMetricDataSetResponse;
import cn.ucloud.cloudwatch.models.QueryMetricDataSummaryRequest;
Expand Down Expand Up @@ -91,7 +95,7 @@ public CreateAlertStrategyTemplateResponse createAlertStrategyTemplate(
}

/**
* DeleteAlertStrategyTemplate - 删除告警策略模板
* DeleteAlertStrategyTemplate - 删除告警条件模板
*
* @param request Request object
* @throws UCloudException Exception
Expand All @@ -103,6 +107,19 @@ public DeleteAlertStrategyTemplateResponse deleteAlertStrategyTemplate(
this.invoke(request, DeleteAlertStrategyTemplateResponse.class);
}

/**
* EnableAlertStrategy - 是否启用告警策略
*
* @param request Request object
* @throws UCloudException Exception
*/
public EnableAlertStrategyResponse enableAlertStrategy(EnableAlertStrategyRequest request)
throws UCloudException {
request.setAction("EnableAlertStrategy");
return (EnableAlertStrategyResponse)
this.invoke(request, EnableAlertStrategyResponse.class);
}

/**
* GetProductMetrics - 获取云产品关联的指标列表
*
Expand Down Expand Up @@ -164,6 +181,19 @@ public ListMonitorProductResponse listMonitorProduct(ListMonitorProductRequest r
return (ListMonitorProductResponse) this.invoke(request, ListMonitorProductResponse.class);
}

/**
* ModifyAlertStrategyRemark - 修改告警策略备注
*
* @param request Request object
* @throws UCloudException Exception
*/
public ModifyAlertStrategyRemarkResponse modifyAlertStrategyRemark(
ModifyAlertStrategyRemarkRequest request) throws UCloudException {
request.setAction("ModifyAlertStrategyRemark");
return (ModifyAlertStrategyRemarkResponse)
this.invoke(request, ModifyAlertStrategyRemarkResponse.class);
}

/**
* QueryMetricDataSet - 查询监控指标数据集
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
import cn.ucloud.cloudwatch.models.CreateAlertStrategyTemplateResponse;
import cn.ucloud.cloudwatch.models.DeleteAlertStrategyTemplateRequest;
import cn.ucloud.cloudwatch.models.DeleteAlertStrategyTemplateResponse;
import cn.ucloud.cloudwatch.models.EnableAlertStrategyRequest;
import cn.ucloud.cloudwatch.models.EnableAlertStrategyResponse;
import cn.ucloud.cloudwatch.models.GetProductMetricsRequest;
import cn.ucloud.cloudwatch.models.GetProductMetricsResponse;
import cn.ucloud.cloudwatch.models.ListAlertRecordRequest;
Expand All @@ -31,6 +33,8 @@
import cn.ucloud.cloudwatch.models.ListAlertStrategyTemplateResponse;
import cn.ucloud.cloudwatch.models.ListMonitorProductRequest;
import cn.ucloud.cloudwatch.models.ListMonitorProductResponse;
import cn.ucloud.cloudwatch.models.ModifyAlertStrategyRemarkRequest;
import cn.ucloud.cloudwatch.models.ModifyAlertStrategyRemarkResponse;
import cn.ucloud.cloudwatch.models.QueryMetricDataSetRequest;
import cn.ucloud.cloudwatch.models.QueryMetricDataSetResponse;
import cn.ucloud.cloudwatch.models.QueryMetricDataSummaryRequest;
Expand Down Expand Up @@ -75,14 +79,23 @@ public CreateAlertStrategyTemplateResponse createAlertStrategyTemplate(
CreateAlertStrategyTemplateRequest request) throws UCloudException;

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

/**
* EnableAlertStrategy - 是否启用告警策略
*
* @param request Request object
* @throws UCloudException Exception
*/
public EnableAlertStrategyResponse enableAlertStrategy(EnableAlertStrategyRequest request)
throws UCloudException;

/**
* GetProductMetrics - 获取云产品关联的指标列表
*
Expand Down Expand Up @@ -128,6 +141,15 @@ public ListAlertStrategyTemplateResponse listAlertStrategyTemplate(
public ListMonitorProductResponse listMonitorProduct(ListMonitorProductRequest request)
throws UCloudException;

/**
* ModifyAlertStrategyRemark - 修改告警策略备注
*
* @param request Request object
* @throws UCloudException Exception
*/
public ModifyAlertStrategyRemarkResponse modifyAlertStrategyRemark(
ModifyAlertStrategyRemarkRequest request) throws UCloudException;

/**
* QueryMetricDataSet - 查询监控指标数据集
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,6 @@ public class CreateAlertStrategyRequest extends Request {
@UCloudParam("ResourceGroupIDs")
private List<Integer> resourceGroupIDs;

/** */
@UCloudParam("Tags")
private List<Tags> tags;

/** 模板id.对应TemplateId=2 */
@UCloudParam("TemplateId")
private Integer templateId;
Expand Down Expand Up @@ -149,14 +145,6 @@ public void setResourceGroupIDs(List<Integer> resourceGroupIDs) {
this.resourceGroupIDs = resourceGroupIDs;
}

public List<Tags> getTags() {
return tags;
}

public void setTags(List<Tags> tags) {
this.tags = tags;
}

public Integer getTemplateId() {
return templateId;
}
Expand Down Expand Up @@ -319,43 +307,4 @@ public void setSendInterval(Integer sendInterval) {
this.sendInterval = sendInterval;
}
}

public static class Tags extends Request {

/** 数据点tag key */
@UCloudParam("Key")
private String key;

/** 数据点tag operator 包含= 不包含!= */
@UCloudParam("Operator")
private String operator;

/** 数据点tag value */
@UCloudParam("Values")
private List<String> values;

public String getKey() {
return key;
}

public void setKey(String key) {
this.key = key;
}

public String getOperator() {
return operator;
}

public void setOperator(String operator) {
this.operator = operator;
}

public List<String> getValues() {
return values;
}

public void setValues(List<String> values) {
this.values = values;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/**
* 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;

public class EnableAlertStrategyRequest extends Request {

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

/** 告警策略id */
@NotEmpty
@UCloudParam("AlertStrategyID")
private Integer alertStrategyID;

/** 启用状态0 停用 1 启用 */
@NotEmpty
@UCloudParam("Status")
private Integer status;

public String getProjectId() {
return projectId;
}

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

public Integer getAlertStrategyID() {
return alertStrategyID;
}

public void setAlertStrategyID(Integer alertStrategyID) {
this.alertStrategyID = alertStrategyID;
}

public Integer getStatus() {
return status;
}

public void setStatus(Integer status) {
this.status = status;
}
}
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 EnableAlertStrategyResponse extends Response {

/** 返回数据 */
@SerializedName("Data")
private AlertStrategyId data;

public AlertStrategyId getData() {
return data;
}

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

public static class AlertStrategyId extends Response {

/** 告警策略id */
@SerializedName("AlertStrategyID")
private Integer alertStrategyID;

public Integer getAlertStrategyID() {
return alertStrategyID;
}

public void setAlertStrategyID(Integer alertStrategyID) {
this.alertStrategyID = alertStrategyID;
}
}
}
Loading
Loading