Skip to content

Commit

Permalink
Add solution to response for GetAlerts Api.
Browse files Browse the repository at this point in the history
  • Loading branch information
sdk-team committed May 26, 2023
1 parent ba5606e commit 64dbcca
Show file tree
Hide file tree
Showing 53 changed files with 1,979 additions and 84 deletions.
3 changes: 3 additions & 0 deletions aliyun-java-sdk-arms/ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
2023-05-26 Version: 2.8.34
- Add solution to response for GetAlerts Api.

2023-03-28 Version: 2.8.33
- Support duration compare type options for CreateOrUpdateAlertRule interface.

Expand Down
2 changes: 1 addition & 1 deletion aliyun-java-sdk-arms/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>com.aliyun</groupId>
<artifactId>aliyun-java-sdk-arms</artifactId>
<packaging>jar</packaging>
<version>2.8.33</version>
<version>2.8.34</version>
<name>aliyun-java-sdk-arms</name>
<url>http://www.aliyun.com</url>
<description>Aliyun Open API SDK for Java
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package com.aliyuncs.arms.model.v20190808;

import com.aliyuncs.RpcAcsRequest;
import java.util.List;
import com.aliyuncs.http.MethodType;
import com.aliyuncs.arms.Endpoint;

Expand Down Expand Up @@ -55,6 +56,8 @@ public class CreateOrUpdateAlertRuleRequest extends RpcAcsRequest<CreateOrUpdate

private String labels;

private List<Tags> tagss;

private String alertType;

private String alertCheckType;
Expand Down Expand Up @@ -238,6 +241,20 @@ public void setLabels(String labels) {
}
}

public List<Tags> getTagss() {
return this.tagss;
}

public void setTagss(List<Tags> tagss) {
this.tagss = tagss;
if (tagss != null) {
for (int depth1 = 0; depth1 < tagss.size(); depth1++) {
putBodyParameter("Tags." + (depth1 + 1) + ".Value" , tagss.get(depth1).getValue());
putBodyParameter("Tags." + (depth1 + 1) + ".Key" , tagss.get(depth1).getKey());
}
}
}

public String getAlertType() {
return this.alertType;
}
Expand Down Expand Up @@ -291,6 +308,29 @@ public void setPids(String pids) {
if(pids != null){
putBodyParameter("Pids", pids);
}
}

public static class Tags {

private String value;

private String key;

public String getValue() {
return this.value;
}

public void setValue(String value) {
this.value = value;
}

public String getKey() {
return this.key;
}

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

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ public static class AlertRule {

private List<AnnotationsItem> annotations;

private List<Tag> tags;

private List<String> pids;

private AlertRuleContent alertRuleContent;
Expand Down Expand Up @@ -263,6 +265,14 @@ public void setAnnotations(List<AnnotationsItem> annotations) {
this.annotations = annotations;
}

public List<Tag> getTags() {
return this.tags;
}

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

public List<String> getPids() {
return this.pids;
}
Expand Down Expand Up @@ -333,6 +343,29 @@ public void setValue(String value) {
}
}

public static class Tag {

private String key;

private String value;

public String getKey() {
return this.key;
}

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

public String getValue() {
return this.value;
}

public void setValue(String value) {
this.value = value;
}
}

public static class AlertRuleContent {

private String condition;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,8 @@ public static class NotifyObjectsItem {

private String notifyObjectName;

private List<String> notifyChannels1;

public String getNotifyObjectType() {
return this.notifyObjectType;
}
Expand All @@ -309,6 +311,14 @@ public String getNotifyObjectName() {
public void setNotifyObjectName(String notifyObjectName) {
this.notifyObjectName = notifyObjectName;
}

public List<String> getNotifyChannels1() {
return this.notifyChannels1;
}

public void setNotifyChannels1(List<String> notifyChannels1) {
this.notifyChannels1 = notifyChannels1;
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package com.aliyuncs.arms.model.v20190808;

import com.aliyuncs.RpcAcsRequest;
import java.util.List;
import com.aliyuncs.http.MethodType;
import com.aliyuncs.arms.Endpoint;

Expand All @@ -41,6 +42,8 @@ public class CreatePrometheusAlertRuleRequest extends RpcAcsRequest<CreatePromet

private String labels;

private List<Tags> tagss;

private String duration;

private String notifyType;
Expand Down Expand Up @@ -141,6 +144,20 @@ public void setLabels(String labels) {
}
}

public List<Tags> getTagss() {
return this.tagss;
}

public void setTagss(List<Tags> tagss) {
this.tagss = tagss;
if (tagss != null) {
for (int depth1 = 0; depth1 < tagss.size(); depth1++) {
putQueryParameter("Tags." + (depth1 + 1) + ".Value" , tagss.get(depth1).getValue());
putQueryParameter("Tags." + (depth1 + 1) + ".Key" , tagss.get(depth1).getKey());
}
}
}

public String getDuration() {
return this.duration;
}
Expand All @@ -161,6 +178,29 @@ public void setNotifyType(String notifyType) {
if(notifyType != null){
putQueryParameter("NotifyType", notifyType);
}
}

public static class Tags {

private String value;

private String key;

public String getValue() {
return this.value;
}

public void setValue(String value) {
this.value = value;
}

public String getKey() {
return this.key;
}

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

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ public class CreatePrometheusInstanceRequest extends RpcAcsRequest<CreatePrometh

private String grafanaInstanceId;

private Boolean allSubClustersSuccess;

private String clusterName;

private String securityGroupId;
Expand Down Expand Up @@ -65,6 +67,17 @@ public void setGrafanaInstanceId(String grafanaInstanceId) {
}
}

public Boolean getAllSubClustersSuccess() {
return this.allSubClustersSuccess;
}

public void setAllSubClustersSuccess(Boolean allSubClustersSuccess) {
this.allSubClustersSuccess = allSubClustersSuccess;
if(allSubClustersSuccess != null){
putQueryParameter("AllSubClustersSuccess", allSubClustersSuccess.toString());
}
}

public String getClusterName() {
return this.clusterName;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
/*
* 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 com.aliyuncs.arms.model.v20190808;

import com.aliyuncs.RpcAcsRequest;
import com.aliyuncs.http.MethodType;
import com.aliyuncs.arms.Endpoint;

/**
* @author auto create
* @version
*/
public class CreatePrometheusMonitoringRequest extends RpcAcsRequest<CreatePrometheusMonitoringResponse> {


private String configYaml;

private String clusterId;

private String type;

private String status;
public CreatePrometheusMonitoringRequest() {
super("ARMS", "2019-08-08", "CreatePrometheusMonitoring", "arms");
setMethod(MethodType.POST);
try {
com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointMap").set(this, Endpoint.endpointMap);
com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointRegional").set(this, Endpoint.endpointRegionalType);
} catch (Exception e) {}
}

public String getConfigYaml() {
return this.configYaml;
}

public void setConfigYaml(String configYaml) {
this.configYaml = configYaml;
if(configYaml != null){
putBodyParameter("ConfigYaml", configYaml);
}
}

public String getClusterId() {
return this.clusterId;
}

public void setClusterId(String clusterId) {
this.clusterId = clusterId;
if(clusterId != null){
putQueryParameter("ClusterId", clusterId);
}
}

public String getType() {
return this.type;
}

public void setType(String type) {
this.type = type;
if(type != null){
putQueryParameter("Type", type);
}
}

public String getStatus() {
return this.status;
}

public void setStatus(String status) {
this.status = status;
if(status != null){
putQueryParameter("Status", status);
}
}

@Override
public Class<CreatePrometheusMonitoringResponse> getResponseClass() {
return CreatePrometheusMonitoringResponse.class;
}

}
Loading

0 comments on commit 64dbcca

Please sign in to comment.