查询变配需要的参数
注意事项
支持部署完成的应用
示例代码
查询ecs变配规格
CommonRequest request = new CommonRequest();
request.setSysMethod(MethodType.POST);
request.setSysDomain("bpstudio.cn-hangzhou.aliyuncs.com");
request.setSysVersion("2021-09-31");
request.setSysAction("QueryInstanceSpec4Modify");
Map<String, Object> params = Maps.newHashMap();
// 1.预付费 升级配置Upgrade,降级配置Downgrade,2.后付费只支持Upgrade
params.put("orderType", "Upgrade");
request.putQueryParameter("Parameters", toJson(params));
request.putQueryParameter("ApplicationId", "请填写应用id");
request.putQueryParameter("InstanceId", "请填写应用中ecs实例id");
//查询变配规格
request.putQueryParameter("MethodName", "describeResourcesModification");
try {
CommonResponse response = client.getCommonResponse(request);
} catch (ClientException e) {
log.error("QueryInstanceSpec4Modify:{}", toJson(request), e);
throw e;
}
查询rds变配规格
CommonRequest request = new CommonRequest();
request.setSysMethod(MethodType.POST);
request.setSysDomain("bpstudio.cn-hangzhou.aliyuncs.com");
request.setSysVersion("2021-09-31");
request.setSysAction("QueryInstanceSpec4Modify");
Map<String, Object> params = Maps.newHashMap();
//升级配置UPGRADE,降级配置DOWNGRADE
params.put("orderType", "UPGRADE");
request.putQueryParameter("Parameters", toJson(params));
request.putQueryParameter("ApplicationId", "请填写应用id");
request.putQueryParameter("InstanceId", "请填写应用中rds实例id");
//查询变配规格
request.putQueryParameter("MethodName", "listAvailableClasses");
try {
CommonResponse response = client.getCommonResponse(request);
} catch (ClientException e) {
log.error("QueryInstanceSpec4Modify:{}", toJson(request), e);
throw e;
}
查询kvstore变配规格
CommonRequest request = new CommonRequest();
request.setSysMethod(MethodType.POST);
request.setSysDomain("bpstudio.cn-hangzhou.aliyuncs.com");
request.setSysVersion("2021-09-31");
request.setSysAction("QueryInstanceSpec4Modify");
Map<String, Object> params = Maps.newHashMap();
//升级配置UPGRADE,降级配置DOWNGRADE
params.put("orderType", "UPGRADE");
request.putQueryParameter("Parameters", toJson(params));
request.putQueryParameter("ApplicationId", "请填写应用id");
request.putQueryParameter("InstanceId", "请填写应用中实例id");
//查询变配规格
request.putQueryParameter("MethodName", "getKvstoreInstanceClass");
try {
CommonResponse response = client.getCommonResponse(request);
} catch (ClientException e) {
log.error("QueryInstanceSpec4Modify:{}", toJson(request), e);
throw e;
}
查询kvstore_prepaid_public_cn变配规格
CommonRequest request = new CommonRequest();
request.setSysMethod(MethodType.POST);
request.setSysDomain("bpstudio.cn-hangzhou.aliyuncs.com");
request.setSysVersion("2021-09-31");
request.setSysAction("QueryInstanceSpec4Modify");
Map<String, Object> params = Maps.newHashMap();
//升级配置UPGRADE,降级配置DOWNGRADE
params.put("orderType", "UPGRADE");
request.putQueryParameter("Parameters", toJson(params));
request.putQueryParameter("ApplicationId", "请填写应用id");
request.putQueryParameter("InstanceId", "请填写应用中实例id");
//查询变配规格
request.putQueryParameter("MethodName", "getShardClass");
try {
CommonResponse response = client.getCommonResponse(request);
} catch (ClientException e) {
log.error("QueryInstanceSpec4Modify:{}", toJson(request), e);
throw e;
}
查询tair变配规格
CommonRequest request = new CommonRequest();
request.setSysMethod(MethodType.POST);
request.setSysDomain("bpstudio.cn-hangzhou.aliyuncs.com");
request.setSysVersion("2021-09-31");
request.setSysAction("QueryInstanceSpec4Modify");
Map<String, Object> params = Maps.newHashMap();
//升级配置UPGRADE,降级配置DOWNGRADE
params.put("orderType", "UPGRADE");
request.putQueryParameter("Parameters", toJson(params));
request.putQueryParameter("ApplicationId", "请填写应用id");
request.putQueryParameter("InstanceId", "请填写应用中实例id");
//查询变配规格
request.putQueryParameter("MethodName", "getShardClass");
try {
CommonResponse response = client.getCommonResponse(request);
} catch (ClientException e) {
log.error("QueryInstanceSpec4Modify:{}", toJson(request), e);
throw e;
}
文档内容是否对您有帮助?