Example usage for com.amazonaws.services.elasticbeanstalk.model UpdateEnvironmentResult getEnvironmentId

List of usage examples for com.amazonaws.services.elasticbeanstalk.model UpdateEnvironmentResult getEnvironmentId

Introduction

In this page you can find the example usage for com.amazonaws.services.elasticbeanstalk.model UpdateEnvironmentResult getEnvironmentId.

Prototype


public String getEnvironmentId() 

Source Link

Document

The ID of this environment.

Usage

From source file:jetbrains.buildServer.runner.elasticbeanstalk.AWSClient.java

License:Apache License

@SuppressWarnings("ConstantConditions")
private void doUpdateAndWait(@NotNull String environmentName, @NotNull String versionLabel, boolean wait,
        @Nullable Integer waitTimeoutSec, @Nullable Integer waitIntervalSec) {
    try {/*from   w  w w.  j  a  v  a2 s.  c  o m*/
        UpdateEnvironmentRequest request = new UpdateEnvironmentRequest().withEnvironmentName(environmentName)
                .withVersionLabel(versionLabel);

        long startTime = System.currentTimeMillis();

        UpdateEnvironmentResult result = myElasticBeanstalkClient.updateEnvironment(request);

        String environmentId = result.getEnvironmentId();

        myListener.deploymentStarted(environmentId, environmentName, versionLabel);

        if (wait) {
            waitForDeployment(environmentId, versionLabel, startTime, waitTimeoutSec, waitIntervalSec);
        }
    } catch (Throwable t) {
        processFailure(t);
    }
}