云服务器BCC

    部署集

    查询部署集列表

    查询用户的部署集列表

    public static void listDeploySet(BccClient bccClient) {
        ListDeploySetResponse listDeploySetResponse = bccClient.listDeploySet();
    }

    创建部署集

    创建部署集

    public static void createDeploySet(BccClient bccClient, String name, String desc, String strategy) {
    
        CreateDeploySetRequest createDeploySetRequest = new CreateDeploySetRequest();
        // 部署集名称
        createDeploySetRequest.setName(name);
    
        // 部署集描述
        createDeploySetRequest.setDesc(desc);
    
        // 部署集策略(HOST_HA:宿主机,RACK_HA:机架,TOR_HA:交换机)
        createDeploySetRequest.setStrategy(strategy);
    
        CreateDeploySetResponse deploySet = bccClient.createDeploySet(createDeploySetRequest);
    }

    删除部署集

    删除部署集

    public static void deleteDeploySet(BccClient bccClient, String deployId) {
    
        DeleteDeploySetRequest deleteDeploySetRequest = new DeleteDeploySetRequest();
    
        // 部署集id
        deleteDeploySetRequest.setDeployId(deployId);
    
        bccClient.deleteDeploySet(deleteDeploySetRequest);
    }

    修改部署集

    修改部署集

    public static void updateDeploySet(BccClient bccClient, String deployId, String name, String desc) {
        
        UpdateDeploySetRequest updateDeploySetRequest = new UpdateDeploySetRequest();
    
        // 部署集id
        updateDeploySetRequest.setDeployId(deployId);
    
        // 部署集名称
        updateDeploySetRequest.setName(name);
    
        // 部署集描述
        updateDeploySetRequest.setDesc(desc);
    
        bccClient.updateDeploySet(updateDeploySetRequest);
    }
    上一篇
    安全组
    下一篇
    密钥对