Java 类com.amazonaws.services.elasticloadbalancing.model.DeleteLoadBalancerRequest 实例源码

项目:primecloud-controller    文件:AwsLoadBalancerProcess.java   
public void deleteLoadBalancer(AwsProcessClient awsProcessClient, Long loadBalancerNo) {
    AwsLoadBalancer awsLoadBalancer = awsLoadBalancerDao.read(loadBalancerNo);

    // ロードバランサの削除
    DeleteLoadBalancerRequest request = new DeleteLoadBalancerRequest();
    request.withLoadBalancerName(awsLoadBalancer.getName());
    awsProcessClient.getElbClient().deleteLoadBalancer(request);

    if (log.isInfoEnabled()) {
        log.info(MessageUtils.getMessage("IPROCESS-200112", awsLoadBalancer.getName()));
    }

    // イベントログ出力
    processLogger.debug(null, null, "AwsElbDelete", new Object[] {
            awsProcessClient.getPlatform().getPlatformName(), awsLoadBalancer.getName() });

    // データベース更新
    awsLoadBalancer = awsLoadBalancerDao.read(loadBalancerNo);
    awsLoadBalancer.setDnsName(null);
    awsLoadBalancerDao.update(awsLoadBalancer);
}
项目:photon-model    文件:AWSLoadBalancerService.java   
private DeferredResult<AWSLoadBalancerContext> deleteLoadBalancer(
        AWSLoadBalancerContext context) {
    DeleteLoadBalancerRequest request = new DeleteLoadBalancerRequest()
            .withLoadBalancerName(context.loadBalancerStateExpanded.name);

    String message = "Delete AWS Load Balancer with name ["
            + context.loadBalancerStateExpanded.name + "]";
    AWSDeferredResultAsyncHandler<DeleteLoadBalancerRequest, DeleteLoadBalancerResult> handler =
            new AWSDeferredResultAsyncHandler<>(this, message);

    context.client.deleteLoadBalancerAsync(request, handler);

    return handler.toDeferredResult().thenApply(ignore -> context);
}
项目:photon-model    文件:TestAWSSetupUtils.java   
public static void deleteLBsUsingLBClient(AmazonElasticLoadBalancingAsyncClient client,
        VerificationHost host,
        String lbName) throws Throwable {

    DeleteLoadBalancerRequest deleteLoadBalancerRequest = new DeleteLoadBalancerRequest()
            .withLoadBalancerName(lbName);
    try {
        client.deleteLoadBalancer(deleteLoadBalancerRequest);
    } catch (Exception e) {
        host.log(Level.SEVERE, "Error encountered in deleting load balancer on AWS: %s",
                Utils.toString(e));
    }
}
项目:photon-model    文件:AWSLoadBalancerServiceTest.java   
private void deleteAwsLoadBalancer(String name) {
    if (this.isMock) {
        return;
    }

    try {
        DeleteLoadBalancerRequest deleteRequest = new DeleteLoadBalancerRequest(name);
        this.client.deleteLoadBalancer(deleteRequest);
    } catch (Exception e) {
        this.host.log("Exception deleting a load balancer '%s': %s", name, e.toString());
    }
}
项目:cloud-runner    文件:ElasticLoadBalancing.java   
public static void deleteLoadBalancer(String name) {
    if (name == null || name.trim().length() == 0)
        throw new RuntimeException(
                "The name of the load balancer cannot be empty!");

    connect();

    DeleteLoadBalancerRequest req = new DeleteLoadBalancerRequest();
    req.setLoadBalancerName(name);
    client.deleteLoadBalancer(req);
}
项目:cmn-project    文件:ElasticLoadBalancing.java   
public void deleteELB(String elbName) {
    logger.info("delete elb, elbName={}", elbName);
    elb.deleteLoadBalancer(new DeleteLoadBalancerRequest(elbName));
}