伸缩组接口 -奇异果体育app竞彩官网下载
更新时间:2020-07-01
查询伸缩组列表
查询所有伸缩组的详细信息
public static void listasgroup(asgroupclient asgroupclient, string groupname, string marker, int maxkeys) {
listasgrouprequest listasgrouprequest = new listasgrouprequest();
// 可选,伸缩组名称
listasgrouprequest.setgroupname(groupname);
// 可选,批量获取列表的查询的起始位置,是一个由系统生成的字符串
listasgrouprequest.setmarker(marker);
// 可选,每页包含的最大数量,最大数量通常不超过1000。缺省值为1000
listasgrouprequest.setmaxkeys(maxkeys);
listasgroupresponse listasgroupresponse = asgroupclient.listasgroup(listasgrouprequest);
}
查询伸缩组详情
查询单个伸缩组的详细信息
public static void getasgroup(asgroupclient asgroupclient, string groupid) {
getasgrouprequest getasgrouprequest = new getasgrouprequest();
// 必填,待查询的伸缩组id
getasgrouprequest.setgroupid(groupid);
getasgroupresponse asgroup = asgroupclient.getasgroup(getasgrouprequest);
}
伸缩组扩容
在指定伸缩组下添加节点
public static void increaseasgroup(asgroupclient asgroupclient, string groupid, int nodecount) {
increaseasgrouprequest increaseasgrouprequest = new increaseasgrouprequest();
// 待添加节点的伸缩组id
increaseasgrouprequest.setgroupid(groupid);
// 新增节点数量
increaseasgrouprequest.setnodecount(nodecount);
increaseasgroupresponse increaseasgroupresponse = asgroupclient.increaseasgroup(increaseasgrouprequest);
}
伸缩组缩容
用于伸缩组下节点的缩容
public static void decreaseasgroup(asgroupclient asgroupclient, string groupid, int actionnum) {
decreaseasgrouprequest decreaseasgrouprequest = new decreaseasgrouprequest();
// 待执行缩容行为的伸缩组id
decreaseasgrouprequest.setgroupid(groupid);
// 减少节点数量
decreaseasgrouprequest.setactionnum(actionnum);
decreaseasgroupresponse decreaseasgroupresponse = asgroupclient.decreaseasgroup(decreaseasgrouprequest);
}
- 当前伸缩组处于运行中状态,触发成功并返回taskid
- 当前伸缩组不处于运行中状态,触发失败并返回失败信息
伸缩组节点数量调
用于伸缩组下节点的数量调整
public static void adjustasgroup(asgroupclient asgroupclient, string groupid, int actionnum) {
adjustasgrouprequest adjustasgrouprequest = new adjustasgrouprequest();
// 待执行调整行为的伸缩组id
adjustasgrouprequest.setgroupid(groupid);
// 节点数量调整为
adjustasgrouprequest.setactionnum(actionnum);
adjustasgroupresponse adjustasgroupresponse = asgroupclient.adjustasgroup(adjustasgrouprequest);
}
- 当前伸缩组处于运行中状态,触发成功并返回taskid
- 当前伸缩组不处于运行中状态,触发失败并返回失败信息
查询伸缩组下节点列表
查询指定伸缩组下节点的详细信息
public static void listasnode(asgroupclient asgroupclient, string groupid, string marker, int maxkeys) {
listasnoderequest listasnoderequest = new listasnoderequest();
// 必填,伸缩组id
listasnoderequest.setgroupid(groupid);
// 选填,批量获取列表的查询的起始位置,是一个由系统生成的字符串
listasnoderequest.setmarker(marker);
// 选填,每页包含的最大数量,最大数量通常不超过1000。缺省值为1000
listasnoderequest.setmaxkeys(maxkeys);
listasnoderesponse listasnoderesponse = asgroupclient.listasnode(listasnoderequest);
}