提交应用变配

支持kvstore、kvstore_prepaid_public_cn、tair、ecs、rds资源变配

注意事项

  • 支持部署完成的应用

示例代码

      CommonRequest request = new CommonRequest();
      request.setSysMethod(MethodType.POST);
      request.setSysDomain("bpstudio.cn-hangzhou.aliyuncs.com");
      request.setSysVersion("2021-09-31");
      request.setSysAction("ModifyApplicationSpec");
      List<Map<String, Object>> instanceSpec = new ArrayList<>();

      //kvstore
      Map<String, Object> configuration1 = new HashMap<>();
      Map<String, Object> p1 = new HashMap<>();
      //升级配置UPGRADE,降级配置DOWNGRADE
      configuration1.put("orderType", "UPGRADE");
      //分片数
      configuration1.put("number", "");
      //实例规格
      configuration1.put("instance_class", "");
      //kvstore实例id
      p1.put("InstanceId", "");
      p1.put("Configuration", JSON.toJSONString(configuration1));
      instanceSpec.add(p1);


      /**
       * kvstore_prepaid_public_cn 或 tair
       *
       */
      Map<String, Object> configuration2 = new HashMap<>();
      Map<String, Object> p2 = new HashMap<>();
      //升级配置UPGRADE,降级配置DOWNGRADE
      configuration2.put("orderType", "UPGRADE");
      //分片数量
      configuration2.put("shard_quantity", "");
      //分片规格
      configuration2.put("shard_class", "");
      //kvstore_prepaid_public_cn或tair实例id
      p2.put("InstanceId", "");
      p2.put("Configuration", JSON.toJSONString(configuration2));
      instanceSpec.add(p2);


      /**
       * ecs变配
       */
      Map<String, Object> configuration3 = new HashMap<>();
      Map<String, Object> p3 = new HashMap<>();
      ///1.预付费 升级配置Upgrade,降级配置Downgrade,2.后付费只支持Upgrade
      configuration3.put("orderType", "Upgrade");
      //实例规格
      configuration3.put("instance_type", "");
      //ecs实例id
      p3.put("InstanceId", "");
      p3.put("Configuration", JSON.toJSONString(configuration3));
      instanceSpec.add(p3);


      /**
       * rds变配
       */
      Map<String, Object> configuration4 = new HashMap<>();
      Map<String, Object> p4 = new HashMap<>();
      //升级配置UPGRADE,降级配置DOWNGRADE
      configuration4.put("orderType", "UPGRADE");
      //实例规格
      configuration4.put("instance_type", "");
      //容量
      configuration4.put("instance_storage", "");
      //rds实例id
      p4.put("InstanceId", "");
      p4.put("Configuration", JSON.toJSONString(configuration4));
      instanceSpec.add(p4);


      request.putQueryParameter("InstanceSpec", JSON.toJSONString(instanceSpec));
      //应用id
      request.putQueryParameter("ApplicationId", "");
      try {
          CommonResponse response = client.getCommonResponse(request);
          System.out.println(response.getData());
      } catch (ClientException e) {
          e.printStackTrace();
      }