software.amazon.awssdk.services.elasticbeanstalk.DefaultElasticBeanstalkAsyncClient Maven / Gradle / Ivy
/*
* Copyright 2014-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package software.amazon.awssdk.services.elasticbeanstalk;
import java.util.concurrent.CompletableFuture;
import java.util.function.Consumer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.annotations.SdkInternalApi;
import software.amazon.awssdk.awscore.AwsRequestOverrideConfiguration;
import software.amazon.awssdk.awscore.client.handler.AwsAsyncClientHandler;
import software.amazon.awssdk.awscore.exception.AwsServiceException;
import software.amazon.awssdk.core.ApiName;
import software.amazon.awssdk.core.client.config.SdkClientConfiguration;
import software.amazon.awssdk.core.client.handler.AsyncClientHandler;
import software.amazon.awssdk.core.client.handler.ClientExecutionParams;
import software.amazon.awssdk.core.http.HttpResponseHandler;
import software.amazon.awssdk.core.util.VersionInfo;
import software.amazon.awssdk.protocols.core.ExceptionMetadata;
import software.amazon.awssdk.protocols.query.AwsQueryProtocolFactory;
import software.amazon.awssdk.services.elasticbeanstalk.model.AbortEnvironmentUpdateRequest;
import software.amazon.awssdk.services.elasticbeanstalk.model.AbortEnvironmentUpdateResponse;
import software.amazon.awssdk.services.elasticbeanstalk.model.ApplyEnvironmentManagedActionRequest;
import software.amazon.awssdk.services.elasticbeanstalk.model.ApplyEnvironmentManagedActionResponse;
import software.amazon.awssdk.services.elasticbeanstalk.model.CheckDnsAvailabilityRequest;
import software.amazon.awssdk.services.elasticbeanstalk.model.CheckDnsAvailabilityResponse;
import software.amazon.awssdk.services.elasticbeanstalk.model.CodeBuildNotInServiceRegionException;
import software.amazon.awssdk.services.elasticbeanstalk.model.ComposeEnvironmentsRequest;
import software.amazon.awssdk.services.elasticbeanstalk.model.ComposeEnvironmentsResponse;
import software.amazon.awssdk.services.elasticbeanstalk.model.CreateApplicationRequest;
import software.amazon.awssdk.services.elasticbeanstalk.model.CreateApplicationResponse;
import software.amazon.awssdk.services.elasticbeanstalk.model.CreateApplicationVersionRequest;
import software.amazon.awssdk.services.elasticbeanstalk.model.CreateApplicationVersionResponse;
import software.amazon.awssdk.services.elasticbeanstalk.model.CreateConfigurationTemplateRequest;
import software.amazon.awssdk.services.elasticbeanstalk.model.CreateConfigurationTemplateResponse;
import software.amazon.awssdk.services.elasticbeanstalk.model.CreateEnvironmentRequest;
import software.amazon.awssdk.services.elasticbeanstalk.model.CreateEnvironmentResponse;
import software.amazon.awssdk.services.elasticbeanstalk.model.CreatePlatformVersionRequest;
import software.amazon.awssdk.services.elasticbeanstalk.model.CreatePlatformVersionResponse;
import software.amazon.awssdk.services.elasticbeanstalk.model.CreateStorageLocationRequest;
import software.amazon.awssdk.services.elasticbeanstalk.model.CreateStorageLocationResponse;
import software.amazon.awssdk.services.elasticbeanstalk.model.DeleteApplicationRequest;
import software.amazon.awssdk.services.elasticbeanstalk.model.DeleteApplicationResponse;
import software.amazon.awssdk.services.elasticbeanstalk.model.DeleteApplicationVersionRequest;
import software.amazon.awssdk.services.elasticbeanstalk.model.DeleteApplicationVersionResponse;
import software.amazon.awssdk.services.elasticbeanstalk.model.DeleteConfigurationTemplateRequest;
import software.amazon.awssdk.services.elasticbeanstalk.model.DeleteConfigurationTemplateResponse;
import software.amazon.awssdk.services.elasticbeanstalk.model.DeleteEnvironmentConfigurationRequest;
import software.amazon.awssdk.services.elasticbeanstalk.model.DeleteEnvironmentConfigurationResponse;
import software.amazon.awssdk.services.elasticbeanstalk.model.DeletePlatformVersionRequest;
import software.amazon.awssdk.services.elasticbeanstalk.model.DeletePlatformVersionResponse;
import software.amazon.awssdk.services.elasticbeanstalk.model.DescribeAccountAttributesRequest;
import software.amazon.awssdk.services.elasticbeanstalk.model.DescribeAccountAttributesResponse;
import software.amazon.awssdk.services.elasticbeanstalk.model.DescribeApplicationVersionsRequest;
import software.amazon.awssdk.services.elasticbeanstalk.model.DescribeApplicationVersionsResponse;
import software.amazon.awssdk.services.elasticbeanstalk.model.DescribeApplicationsRequest;
import software.amazon.awssdk.services.elasticbeanstalk.model.DescribeApplicationsResponse;
import software.amazon.awssdk.services.elasticbeanstalk.model.DescribeConfigurationOptionsRequest;
import software.amazon.awssdk.services.elasticbeanstalk.model.DescribeConfigurationOptionsResponse;
import software.amazon.awssdk.services.elasticbeanstalk.model.DescribeConfigurationSettingsRequest;
import software.amazon.awssdk.services.elasticbeanstalk.model.DescribeConfigurationSettingsResponse;
import software.amazon.awssdk.services.elasticbeanstalk.model.DescribeEnvironmentHealthRequest;
import software.amazon.awssdk.services.elasticbeanstalk.model.DescribeEnvironmentHealthResponse;
import software.amazon.awssdk.services.elasticbeanstalk.model.DescribeEnvironmentManagedActionHistoryRequest;
import software.amazon.awssdk.services.elasticbeanstalk.model.DescribeEnvironmentManagedActionHistoryResponse;
import software.amazon.awssdk.services.elasticbeanstalk.model.DescribeEnvironmentManagedActionsRequest;
import software.amazon.awssdk.services.elasticbeanstalk.model.DescribeEnvironmentManagedActionsResponse;
import software.amazon.awssdk.services.elasticbeanstalk.model.DescribeEnvironmentResourcesRequest;
import software.amazon.awssdk.services.elasticbeanstalk.model.DescribeEnvironmentResourcesResponse;
import software.amazon.awssdk.services.elasticbeanstalk.model.DescribeEnvironmentsRequest;
import software.amazon.awssdk.services.elasticbeanstalk.model.DescribeEnvironmentsResponse;
import software.amazon.awssdk.services.elasticbeanstalk.model.DescribeEventsRequest;
import software.amazon.awssdk.services.elasticbeanstalk.model.DescribeEventsResponse;
import software.amazon.awssdk.services.elasticbeanstalk.model.DescribeInstancesHealthRequest;
import software.amazon.awssdk.services.elasticbeanstalk.model.DescribeInstancesHealthResponse;
import software.amazon.awssdk.services.elasticbeanstalk.model.DescribePlatformVersionRequest;
import software.amazon.awssdk.services.elasticbeanstalk.model.DescribePlatformVersionResponse;
import software.amazon.awssdk.services.elasticbeanstalk.model.ElasticBeanstalkException;
import software.amazon.awssdk.services.elasticbeanstalk.model.ElasticBeanstalkRequest;
import software.amazon.awssdk.services.elasticbeanstalk.model.ElasticBeanstalkServiceException;
import software.amazon.awssdk.services.elasticbeanstalk.model.InsufficientPrivilegesException;
import software.amazon.awssdk.services.elasticbeanstalk.model.InvalidRequestException;
import software.amazon.awssdk.services.elasticbeanstalk.model.ListAvailableSolutionStacksRequest;
import software.amazon.awssdk.services.elasticbeanstalk.model.ListAvailableSolutionStacksResponse;
import software.amazon.awssdk.services.elasticbeanstalk.model.ListPlatformVersionsRequest;
import software.amazon.awssdk.services.elasticbeanstalk.model.ListPlatformVersionsResponse;
import software.amazon.awssdk.services.elasticbeanstalk.model.ListTagsForResourceRequest;
import software.amazon.awssdk.services.elasticbeanstalk.model.ListTagsForResourceResponse;
import software.amazon.awssdk.services.elasticbeanstalk.model.ManagedActionInvalidStateException;
import software.amazon.awssdk.services.elasticbeanstalk.model.OperationInProgressException;
import software.amazon.awssdk.services.elasticbeanstalk.model.PlatformVersionStillReferencedException;
import software.amazon.awssdk.services.elasticbeanstalk.model.RebuildEnvironmentRequest;
import software.amazon.awssdk.services.elasticbeanstalk.model.RebuildEnvironmentResponse;
import software.amazon.awssdk.services.elasticbeanstalk.model.RequestEnvironmentInfoRequest;
import software.amazon.awssdk.services.elasticbeanstalk.model.RequestEnvironmentInfoResponse;
import software.amazon.awssdk.services.elasticbeanstalk.model.ResourceNotFoundException;
import software.amazon.awssdk.services.elasticbeanstalk.model.ResourceTypeNotSupportedException;
import software.amazon.awssdk.services.elasticbeanstalk.model.RestartAppServerRequest;
import software.amazon.awssdk.services.elasticbeanstalk.model.RestartAppServerResponse;
import software.amazon.awssdk.services.elasticbeanstalk.model.RetrieveEnvironmentInfoRequest;
import software.amazon.awssdk.services.elasticbeanstalk.model.RetrieveEnvironmentInfoResponse;
import software.amazon.awssdk.services.elasticbeanstalk.model.S3LocationNotInServiceRegionException;
import software.amazon.awssdk.services.elasticbeanstalk.model.S3SubscriptionRequiredException;
import software.amazon.awssdk.services.elasticbeanstalk.model.SourceBundleDeletionException;
import software.amazon.awssdk.services.elasticbeanstalk.model.SwapEnvironmentCNAMEsResponse;
import software.amazon.awssdk.services.elasticbeanstalk.model.SwapEnvironmentCnamEsRequest;
import software.amazon.awssdk.services.elasticbeanstalk.model.TerminateEnvironmentRequest;
import software.amazon.awssdk.services.elasticbeanstalk.model.TerminateEnvironmentResponse;
import software.amazon.awssdk.services.elasticbeanstalk.model.TooManyApplicationVersionsException;
import software.amazon.awssdk.services.elasticbeanstalk.model.TooManyApplicationsException;
import software.amazon.awssdk.services.elasticbeanstalk.model.TooManyBucketsException;
import software.amazon.awssdk.services.elasticbeanstalk.model.TooManyConfigurationTemplatesException;
import software.amazon.awssdk.services.elasticbeanstalk.model.TooManyEnvironmentsException;
import software.amazon.awssdk.services.elasticbeanstalk.model.TooManyPlatformsException;
import software.amazon.awssdk.services.elasticbeanstalk.model.TooManyTagsException;
import software.amazon.awssdk.services.elasticbeanstalk.model.UpdateApplicationRequest;
import software.amazon.awssdk.services.elasticbeanstalk.model.UpdateApplicationResourceLifecycleRequest;
import software.amazon.awssdk.services.elasticbeanstalk.model.UpdateApplicationResourceLifecycleResponse;
import software.amazon.awssdk.services.elasticbeanstalk.model.UpdateApplicationResponse;
import software.amazon.awssdk.services.elasticbeanstalk.model.UpdateApplicationVersionRequest;
import software.amazon.awssdk.services.elasticbeanstalk.model.UpdateApplicationVersionResponse;
import software.amazon.awssdk.services.elasticbeanstalk.model.UpdateConfigurationTemplateRequest;
import software.amazon.awssdk.services.elasticbeanstalk.model.UpdateConfigurationTemplateResponse;
import software.amazon.awssdk.services.elasticbeanstalk.model.UpdateEnvironmentRequest;
import software.amazon.awssdk.services.elasticbeanstalk.model.UpdateEnvironmentResponse;
import software.amazon.awssdk.services.elasticbeanstalk.model.UpdateTagsForResourceRequest;
import software.amazon.awssdk.services.elasticbeanstalk.model.UpdateTagsForResourceResponse;
import software.amazon.awssdk.services.elasticbeanstalk.model.ValidateConfigurationSettingsRequest;
import software.amazon.awssdk.services.elasticbeanstalk.model.ValidateConfigurationSettingsResponse;
import software.amazon.awssdk.services.elasticbeanstalk.paginators.DescribeEventsPublisher;
import software.amazon.awssdk.services.elasticbeanstalk.transform.AbortEnvironmentUpdateRequestMarshaller;
import software.amazon.awssdk.services.elasticbeanstalk.transform.ApplyEnvironmentManagedActionRequestMarshaller;
import software.amazon.awssdk.services.elasticbeanstalk.transform.CheckDnsAvailabilityRequestMarshaller;
import software.amazon.awssdk.services.elasticbeanstalk.transform.ComposeEnvironmentsRequestMarshaller;
import software.amazon.awssdk.services.elasticbeanstalk.transform.CreateApplicationRequestMarshaller;
import software.amazon.awssdk.services.elasticbeanstalk.transform.CreateApplicationVersionRequestMarshaller;
import software.amazon.awssdk.services.elasticbeanstalk.transform.CreateConfigurationTemplateRequestMarshaller;
import software.amazon.awssdk.services.elasticbeanstalk.transform.CreateEnvironmentRequestMarshaller;
import software.amazon.awssdk.services.elasticbeanstalk.transform.CreatePlatformVersionRequestMarshaller;
import software.amazon.awssdk.services.elasticbeanstalk.transform.CreateStorageLocationRequestMarshaller;
import software.amazon.awssdk.services.elasticbeanstalk.transform.DeleteApplicationRequestMarshaller;
import software.amazon.awssdk.services.elasticbeanstalk.transform.DeleteApplicationVersionRequestMarshaller;
import software.amazon.awssdk.services.elasticbeanstalk.transform.DeleteConfigurationTemplateRequestMarshaller;
import software.amazon.awssdk.services.elasticbeanstalk.transform.DeleteEnvironmentConfigurationRequestMarshaller;
import software.amazon.awssdk.services.elasticbeanstalk.transform.DeletePlatformVersionRequestMarshaller;
import software.amazon.awssdk.services.elasticbeanstalk.transform.DescribeAccountAttributesRequestMarshaller;
import software.amazon.awssdk.services.elasticbeanstalk.transform.DescribeApplicationVersionsRequestMarshaller;
import software.amazon.awssdk.services.elasticbeanstalk.transform.DescribeApplicationsRequestMarshaller;
import software.amazon.awssdk.services.elasticbeanstalk.transform.DescribeConfigurationOptionsRequestMarshaller;
import software.amazon.awssdk.services.elasticbeanstalk.transform.DescribeConfigurationSettingsRequestMarshaller;
import software.amazon.awssdk.services.elasticbeanstalk.transform.DescribeEnvironmentHealthRequestMarshaller;
import software.amazon.awssdk.services.elasticbeanstalk.transform.DescribeEnvironmentManagedActionHistoryRequestMarshaller;
import software.amazon.awssdk.services.elasticbeanstalk.transform.DescribeEnvironmentManagedActionsRequestMarshaller;
import software.amazon.awssdk.services.elasticbeanstalk.transform.DescribeEnvironmentResourcesRequestMarshaller;
import software.amazon.awssdk.services.elasticbeanstalk.transform.DescribeEnvironmentsRequestMarshaller;
import software.amazon.awssdk.services.elasticbeanstalk.transform.DescribeEventsRequestMarshaller;
import software.amazon.awssdk.services.elasticbeanstalk.transform.DescribeInstancesHealthRequestMarshaller;
import software.amazon.awssdk.services.elasticbeanstalk.transform.DescribePlatformVersionRequestMarshaller;
import software.amazon.awssdk.services.elasticbeanstalk.transform.ListAvailableSolutionStacksRequestMarshaller;
import software.amazon.awssdk.services.elasticbeanstalk.transform.ListPlatformVersionsRequestMarshaller;
import software.amazon.awssdk.services.elasticbeanstalk.transform.ListTagsForResourceRequestMarshaller;
import software.amazon.awssdk.services.elasticbeanstalk.transform.RebuildEnvironmentRequestMarshaller;
import software.amazon.awssdk.services.elasticbeanstalk.transform.RequestEnvironmentInfoRequestMarshaller;
import software.amazon.awssdk.services.elasticbeanstalk.transform.RestartAppServerRequestMarshaller;
import software.amazon.awssdk.services.elasticbeanstalk.transform.RetrieveEnvironmentInfoRequestMarshaller;
import software.amazon.awssdk.services.elasticbeanstalk.transform.SwapEnvironmentCnamEsRequestMarshaller;
import software.amazon.awssdk.services.elasticbeanstalk.transform.TerminateEnvironmentRequestMarshaller;
import software.amazon.awssdk.services.elasticbeanstalk.transform.UpdateApplicationRequestMarshaller;
import software.amazon.awssdk.services.elasticbeanstalk.transform.UpdateApplicationResourceLifecycleRequestMarshaller;
import software.amazon.awssdk.services.elasticbeanstalk.transform.UpdateApplicationVersionRequestMarshaller;
import software.amazon.awssdk.services.elasticbeanstalk.transform.UpdateConfigurationTemplateRequestMarshaller;
import software.amazon.awssdk.services.elasticbeanstalk.transform.UpdateEnvironmentRequestMarshaller;
import software.amazon.awssdk.services.elasticbeanstalk.transform.UpdateTagsForResourceRequestMarshaller;
import software.amazon.awssdk.services.elasticbeanstalk.transform.ValidateConfigurationSettingsRequestMarshaller;
import software.amazon.awssdk.utils.CompletableFutureUtils;
/**
* Internal implementation of {@link ElasticBeanstalkAsyncClient}.
*
* @see ElasticBeanstalkAsyncClient#builder()
*/
@Generated("software.amazon.awssdk:codegen")
@SdkInternalApi
final class DefaultElasticBeanstalkAsyncClient implements ElasticBeanstalkAsyncClient {
private static final Logger log = LoggerFactory.getLogger(DefaultElasticBeanstalkAsyncClient.class);
private final AsyncClientHandler clientHandler;
private final AwsQueryProtocolFactory protocolFactory;
private final SdkClientConfiguration clientConfiguration;
protected DefaultElasticBeanstalkAsyncClient(SdkClientConfiguration clientConfiguration) {
this.clientHandler = new AwsAsyncClientHandler(clientConfiguration);
this.clientConfiguration = clientConfiguration;
this.protocolFactory = init();
}
@Override
public final String serviceName() {
return SERVICE_NAME;
}
/**
*
* Cancels in-progress environment configuration update or application version deployment.
*
*
* @param abortEnvironmentUpdateRequest
* @return A Java Future containing the result of the AbortEnvironmentUpdate operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - InsufficientPrivilegesException The specified account does not have sufficient privileges for one or
* more AWS services.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ElasticBeanstalkException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ElasticBeanstalkAsyncClient.AbortEnvironmentUpdate
* @see AWS API Documentation
*/
@Override
public CompletableFuture abortEnvironmentUpdate(
AbortEnvironmentUpdateRequest abortEnvironmentUpdateRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(AbortEnvironmentUpdateResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("AbortEnvironmentUpdate")
.withMarshaller(new AbortEnvironmentUpdateRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(abortEnvironmentUpdateRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Applies a scheduled managed action immediately. A managed action can be applied only if its status is
* Scheduled
. Get the status and action ID of a managed action with
* DescribeEnvironmentManagedActions.
*
*
* @param applyEnvironmentManagedActionRequest
* Request to execute a scheduled managed action immediately.
* @return A Java Future containing the result of the ApplyEnvironmentManagedAction operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ElasticBeanstalkServiceException A generic service exception has occurred.
* - ManagedActionInvalidStateException Cannot modify the managed action in its current state.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ElasticBeanstalkException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ElasticBeanstalkAsyncClient.ApplyEnvironmentManagedAction
* @see AWS API Documentation
*/
@Override
public CompletableFuture applyEnvironmentManagedAction(
ApplyEnvironmentManagedActionRequest applyEnvironmentManagedActionRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(ApplyEnvironmentManagedActionResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ApplyEnvironmentManagedAction")
.withMarshaller(new ApplyEnvironmentManagedActionRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(applyEnvironmentManagedActionRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Checks if the specified CNAME is available.
*
*
* @param checkDnsAvailabilityRequest
* Results message indicating whether a CNAME is available.
* @return A Java Future containing the result of the CheckDNSAvailability operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ElasticBeanstalkException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ElasticBeanstalkAsyncClient.CheckDNSAvailability
* @see AWS API Documentation
*/
@Override
public CompletableFuture checkDNSAvailability(
CheckDnsAvailabilityRequest checkDnsAvailabilityRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(CheckDnsAvailabilityResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CheckDNSAvailability")
.withMarshaller(new CheckDnsAvailabilityRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(checkDnsAvailabilityRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Create or update a group of environments that each run a separate component of a single application. Takes a list
* of version labels that specify application source bundles for each of the environments to create or update. The
* name of each environment and other required information must be included in the source bundles in an environment
* manifest named env.yaml
. See Compose
* Environments for details.
*
*
* @param composeEnvironmentsRequest
* Request to create or update a group of environments.
* @return A Java Future containing the result of the ComposeEnvironments operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - TooManyEnvironmentsException The specified account has reached its limit of environments.
* - InsufficientPrivilegesException The specified account does not have sufficient privileges for one or
* more AWS services.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ElasticBeanstalkException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ElasticBeanstalkAsyncClient.ComposeEnvironments
* @see AWS API Documentation
*/
@Override
public CompletableFuture composeEnvironments(
ComposeEnvironmentsRequest composeEnvironmentsRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(ComposeEnvironmentsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ComposeEnvironments")
.withMarshaller(new ComposeEnvironmentsRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(composeEnvironmentsRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Creates an application that has one configuration template named default
and no application
* versions.
*
*
* @param createApplicationRequest
* Request to create an application.
* @return A Java Future containing the result of the CreateApplication operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - TooManyApplicationsException The specified account has reached its limit of applications.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ElasticBeanstalkException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ElasticBeanstalkAsyncClient.CreateApplication
* @see AWS API Documentation
*/
@Override
public CompletableFuture createApplication(CreateApplicationRequest createApplicationRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(CreateApplicationResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateApplication")
.withMarshaller(new CreateApplicationRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(createApplicationRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Creates an application version for the specified application. You can create an application version from a source
* bundle in Amazon S3, a commit in AWS CodeCommit, or the output of an AWS CodeBuild build as follows:
*
*
* Specify a commit in an AWS CodeCommit repository with SourceBuildInformation
.
*
*
* Specify a build in an AWS CodeBuild with SourceBuildInformation
and BuildConfiguration
.
*
*
* Specify a source bundle in S3 with SourceBundle
*
*
* Omit both SourceBuildInformation
and SourceBundle
to use the default sample
* application.
*
*
*
* Once you create an application version with a specified Amazon S3 bucket and key location, you cannot change that
* Amazon S3 location. If you change the Amazon S3 location, you receive an exception when you attempt to launch an
* environment from the application version.
*
*
*
* @param createApplicationVersionRequest
* @return A Java Future containing the result of the CreateApplicationVersion operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - TooManyApplicationsException The specified account has reached its limit of applications.
* - TooManyApplicationVersionsException The specified account has reached its limit of application
* versions.
* - InsufficientPrivilegesException The specified account does not have sufficient privileges for one or
* more AWS services.
* - S3LocationNotInServiceRegionException The specified S3 bucket does not belong to the S3 region in
* which the service is running. The following regions are supported:
*
* -
*
* IAD/us-east-1
*
*
* -
*
* PDX/us-west-2
*
*
* -
*
* DUB/eu-west-1
*
*
* - CodeBuildNotInServiceRegionException AWS CodeBuild is not available in the specified region.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ElasticBeanstalkException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ElasticBeanstalkAsyncClient.CreateApplicationVersion
* @see AWS API Documentation
*/
@Override
public CompletableFuture createApplicationVersion(
CreateApplicationVersionRequest createApplicationVersionRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(CreateApplicationVersionResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateApplicationVersion")
.withMarshaller(new CreateApplicationVersionRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(createApplicationVersionRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Creates a configuration template. Templates are associated with a specific application and are used to deploy
* different versions of the application with the same configuration settings.
*
*
* Templates aren't associated with any environment. The EnvironmentName
response element is always
* null
.
*
*
* Related Topics
*
*
* -
*
*
* -
*
*
* -
*
*
*
*
* @param createConfigurationTemplateRequest
* Request to create a configuration template.
* @return A Java Future containing the result of the CreateConfigurationTemplate operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - InsufficientPrivilegesException The specified account does not have sufficient privileges for one or
* more AWS services.
* - TooManyBucketsException The specified account has reached its limit of Amazon S3 buckets.
* - TooManyConfigurationTemplatesException The specified account has reached its limit of configuration
* templates.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ElasticBeanstalkException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ElasticBeanstalkAsyncClient.CreateConfigurationTemplate
* @see AWS API Documentation
*/
@Override
public CompletableFuture createConfigurationTemplate(
CreateConfigurationTemplateRequest createConfigurationTemplateRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(CreateConfigurationTemplateResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateConfigurationTemplate")
.withMarshaller(new CreateConfigurationTemplateRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(createConfigurationTemplateRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Launches an environment for the specified application using the specified configuration.
*
*
* @param createEnvironmentRequest
* @return A Java Future containing the result of the CreateEnvironment operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - TooManyEnvironmentsException The specified account has reached its limit of environments.
* - InsufficientPrivilegesException The specified account does not have sufficient privileges for one or
* more AWS services.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ElasticBeanstalkException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ElasticBeanstalkAsyncClient.CreateEnvironment
* @see AWS API Documentation
*/
@Override
public CompletableFuture createEnvironment(CreateEnvironmentRequest createEnvironmentRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(CreateEnvironmentResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateEnvironment")
.withMarshaller(new CreateEnvironmentRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(createEnvironmentRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Create a new version of your custom platform.
*
*
* @param createPlatformVersionRequest
* Request to create a new platform version.
* @return A Java Future containing the result of the CreatePlatformVersion operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - InsufficientPrivilegesException The specified account does not have sufficient privileges for one or
* more AWS services.
* - ElasticBeanstalkServiceException A generic service exception has occurred.
* - TooManyPlatformsException You have exceeded the maximum number of allowed platforms associated with
* the account.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ElasticBeanstalkException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ElasticBeanstalkAsyncClient.CreatePlatformVersion
* @see AWS API Documentation
*/
@Override
public CompletableFuture createPlatformVersion(
CreatePlatformVersionRequest createPlatformVersionRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(CreatePlatformVersionResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreatePlatformVersion")
.withMarshaller(new CreatePlatformVersionRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(createPlatformVersionRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Creates a bucket in Amazon S3 to store application versions, logs, and other files used by Elastic Beanstalk
* environments. The Elastic Beanstalk console and EB CLI call this API the first time you create an environment in
* a region. If the storage location already exists, CreateStorageLocation
still returns the bucket
* name but does not create a new bucket.
*
*
* @param createStorageLocationRequest
* @return A Java Future containing the result of the CreateStorageLocation operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - TooManyBucketsException The specified account has reached its limit of Amazon S3 buckets.
* - S3SubscriptionRequiredException The specified account does not have a subscription to Amazon S3.
* - InsufficientPrivilegesException The specified account does not have sufficient privileges for one or
* more AWS services.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ElasticBeanstalkException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ElasticBeanstalkAsyncClient.CreateStorageLocation
* @see AWS API Documentation
*/
@Override
public CompletableFuture createStorageLocation(
CreateStorageLocationRequest createStorageLocationRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(CreateStorageLocationResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateStorageLocation")
.withMarshaller(new CreateStorageLocationRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(createStorageLocationRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Deletes the specified application along with all associated versions and configurations. The application versions
* will not be deleted from your Amazon S3 bucket.
*
*
*
* You cannot delete an application that has a running environment.
*
*
*
* @param deleteApplicationRequest
* Request to delete an application.
* @return A Java Future containing the result of the DeleteApplication operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - OperationInProgressException Unable to perform the specified operation because another operation that
* effects an element in this activity is already in progress.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ElasticBeanstalkException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ElasticBeanstalkAsyncClient.DeleteApplication
* @see AWS API Documentation
*/
@Override
public CompletableFuture deleteApplication(DeleteApplicationRequest deleteApplicationRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DeleteApplicationResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteApplication")
.withMarshaller(new DeleteApplicationRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(deleteApplicationRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Deletes the specified version from the specified application.
*
*
*
* You cannot delete an application version that is associated with a running environment.
*
*
*
* @param deleteApplicationVersionRequest
* Request to delete an application version.
* @return A Java Future containing the result of the DeleteApplicationVersion operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - SourceBundleDeletionException Unable to delete the Amazon S3 source bundle associated with the
* application version. The application version was deleted successfully.
* - InsufficientPrivilegesException The specified account does not have sufficient privileges for one or
* more AWS services.
* - OperationInProgressException Unable to perform the specified operation because another operation that
* effects an element in this activity is already in progress.
* - S3LocationNotInServiceRegionException The specified S3 bucket does not belong to the S3 region in
* which the service is running. The following regions are supported:
*
* -
*
* IAD/us-east-1
*
*
* -
*
* PDX/us-west-2
*
*
* -
*
* DUB/eu-west-1
*
*
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ElasticBeanstalkException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ElasticBeanstalkAsyncClient.DeleteApplicationVersion
* @see AWS API Documentation
*/
@Override
public CompletableFuture deleteApplicationVersion(
DeleteApplicationVersionRequest deleteApplicationVersionRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DeleteApplicationVersionResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteApplicationVersion")
.withMarshaller(new DeleteApplicationVersionRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(deleteApplicationVersionRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Deletes the specified configuration template.
*
*
*
* When you launch an environment using a configuration template, the environment gets a copy of the template. You
* can delete or modify the environment's copy of the template without affecting the running environment.
*
*
*
* @param deleteConfigurationTemplateRequest
* Request to delete a configuration template.
* @return A Java Future containing the result of the DeleteConfigurationTemplate operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - OperationInProgressException Unable to perform the specified operation because another operation that
* effects an element in this activity is already in progress.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ElasticBeanstalkException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ElasticBeanstalkAsyncClient.DeleteConfigurationTemplate
* @see AWS API Documentation
*/
@Override
public CompletableFuture deleteConfigurationTemplate(
DeleteConfigurationTemplateRequest deleteConfigurationTemplateRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DeleteConfigurationTemplateResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteConfigurationTemplate")
.withMarshaller(new DeleteConfigurationTemplateRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(deleteConfigurationTemplateRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Deletes the draft configuration associated with the running environment.
*
*
* Updating a running environment with any configuration changes creates a draft configuration set. You can get the
* draft configuration using DescribeConfigurationSettings while the update is in progress or if the update
* fails. The DeploymentStatus
for the draft configuration indicates whether the deployment is in
* process or has failed. The draft configuration remains in existence until it is deleted with this action.
*
*
* @param deleteEnvironmentConfigurationRequest
* Request to delete a draft environment configuration.
* @return A Java Future containing the result of the DeleteEnvironmentConfiguration operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ElasticBeanstalkException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ElasticBeanstalkAsyncClient.DeleteEnvironmentConfiguration
* @see AWS API Documentation
*/
@Override
public CompletableFuture deleteEnvironmentConfiguration(
DeleteEnvironmentConfigurationRequest deleteEnvironmentConfigurationRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DeleteEnvironmentConfigurationResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteEnvironmentConfiguration")
.withMarshaller(new DeleteEnvironmentConfigurationRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(deleteEnvironmentConfigurationRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Deletes the specified version of a custom platform.
*
*
* @param deletePlatformVersionRequest
* @return A Java Future containing the result of the DeletePlatformVersion operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - OperationInProgressException Unable to perform the specified operation because another operation that
* effects an element in this activity is already in progress.
* - InsufficientPrivilegesException The specified account does not have sufficient privileges for one or
* more AWS services.
* - ElasticBeanstalkServiceException A generic service exception has occurred.
* - PlatformVersionStillReferencedException You cannot delete the platform version because there are
* still environments running on it.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ElasticBeanstalkException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ElasticBeanstalkAsyncClient.DeletePlatformVersion
* @see AWS API Documentation
*/
@Override
public CompletableFuture deletePlatformVersion(
DeletePlatformVersionRequest deletePlatformVersionRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DeletePlatformVersionResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeletePlatformVersion")
.withMarshaller(new DeletePlatformVersionRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(deletePlatformVersionRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns attributes related to AWS Elastic Beanstalk that are associated with the calling AWS account.
*
*
* The result currently has one set of attributes—resource quotas.
*
*
* @param describeAccountAttributesRequest
* @return A Java Future containing the result of the DescribeAccountAttributes operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - InsufficientPrivilegesException The specified account does not have sufficient privileges for one or
* more AWS services.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ElasticBeanstalkException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ElasticBeanstalkAsyncClient.DescribeAccountAttributes
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeAccountAttributes(
DescribeAccountAttributesRequest describeAccountAttributesRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeAccountAttributesResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeAccountAttributes")
.withMarshaller(new DescribeAccountAttributesRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(describeAccountAttributesRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Retrieve a list of application versions.
*
*
* @param describeApplicationVersionsRequest
* Request to describe application versions.
* @return A Java Future containing the result of the DescribeApplicationVersions operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ElasticBeanstalkException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ElasticBeanstalkAsyncClient.DescribeApplicationVersions
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeApplicationVersions(
DescribeApplicationVersionsRequest describeApplicationVersionsRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeApplicationVersionsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeApplicationVersions")
.withMarshaller(new DescribeApplicationVersionsRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(describeApplicationVersionsRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns the descriptions of existing applications.
*
*
* @param describeApplicationsRequest
* Request to describe one or more applications.
* @return A Java Future containing the result of the DescribeApplications operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ElasticBeanstalkException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ElasticBeanstalkAsyncClient.DescribeApplications
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeApplications(
DescribeApplicationsRequest describeApplicationsRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeApplicationsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeApplications")
.withMarshaller(new DescribeApplicationsRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(describeApplicationsRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Describes the configuration options that are used in a particular configuration template or environment, or that
* a specified solution stack defines. The description includes the values the options, their default values, and an
* indication of the required action on a running environment if an option value is changed.
*
*
* @param describeConfigurationOptionsRequest
* Result message containing a list of application version descriptions.
* @return A Java Future containing the result of the DescribeConfigurationOptions operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - TooManyBucketsException The specified account has reached its limit of Amazon S3 buckets.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ElasticBeanstalkException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ElasticBeanstalkAsyncClient.DescribeConfigurationOptions
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeConfigurationOptions(
DescribeConfigurationOptionsRequest describeConfigurationOptionsRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeConfigurationOptionsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeConfigurationOptions")
.withMarshaller(new DescribeConfigurationOptionsRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(describeConfigurationOptionsRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns a description of the settings for the specified configuration set, that is, either a configuration
* template or the configuration set associated with a running environment.
*
*
* When describing the settings for the configuration set associated with a running environment, it is possible to
* receive two sets of setting descriptions. One is the deployed configuration set, and the other is a draft
* configuration of an environment that is either in the process of deployment or that failed to deploy.
*
*
* Related Topics
*
*
* -
*
*
*
*
* @param describeConfigurationSettingsRequest
* Result message containing all of the configuration settings for a specified solution stack or
* configuration template.
* @return A Java Future containing the result of the DescribeConfigurationSettings operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - TooManyBucketsException The specified account has reached its limit of Amazon S3 buckets.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ElasticBeanstalkException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ElasticBeanstalkAsyncClient.DescribeConfigurationSettings
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeConfigurationSettings(
DescribeConfigurationSettingsRequest describeConfigurationSettingsRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeConfigurationSettingsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeConfigurationSettings")
.withMarshaller(new DescribeConfigurationSettingsRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(describeConfigurationSettingsRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns information about the overall health of the specified environment. The DescribeEnvironmentHealth
* operation is only available with AWS Elastic Beanstalk Enhanced Health.
*
*
* @param describeEnvironmentHealthRequest
* See the example below to learn how to create a request body.
* @return A Java Future containing the result of the DescribeEnvironmentHealth operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - InvalidRequestException One or more input parameters is not valid. Please correct the input
* parameters and try the operation again.
* - ElasticBeanstalkServiceException A generic service exception has occurred.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ElasticBeanstalkException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ElasticBeanstalkAsyncClient.DescribeEnvironmentHealth
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeEnvironmentHealth(
DescribeEnvironmentHealthRequest describeEnvironmentHealthRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeEnvironmentHealthResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeEnvironmentHealth")
.withMarshaller(new DescribeEnvironmentHealthRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(describeEnvironmentHealthRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Lists an environment's completed and failed managed actions.
*
*
* @param describeEnvironmentManagedActionHistoryRequest
* Request to list completed and failed managed actions.
* @return A Java Future containing the result of the DescribeEnvironmentManagedActionHistory operation returned by
* the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ElasticBeanstalkServiceException A generic service exception has occurred.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ElasticBeanstalkException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ElasticBeanstalkAsyncClient.DescribeEnvironmentManagedActionHistory
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeEnvironmentManagedActionHistory(
DescribeEnvironmentManagedActionHistoryRequest describeEnvironmentManagedActionHistoryRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeEnvironmentManagedActionHistoryResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeEnvironmentManagedActionHistory")
.withMarshaller(new DescribeEnvironmentManagedActionHistoryRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(describeEnvironmentManagedActionHistoryRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Lists an environment's upcoming and in-progress managed actions.
*
*
* @param describeEnvironmentManagedActionsRequest
* Request to list an environment's upcoming and in-progress managed actions.
* @return A Java Future containing the result of the DescribeEnvironmentManagedActions operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ElasticBeanstalkServiceException A generic service exception has occurred.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ElasticBeanstalkException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ElasticBeanstalkAsyncClient.DescribeEnvironmentManagedActions
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeEnvironmentManagedActions(
DescribeEnvironmentManagedActionsRequest describeEnvironmentManagedActionsRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeEnvironmentManagedActionsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeEnvironmentManagedActions")
.withMarshaller(new DescribeEnvironmentManagedActionsRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(describeEnvironmentManagedActionsRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns AWS resources for this environment.
*
*
* @param describeEnvironmentResourcesRequest
* Request to describe the resources in an environment.
* @return A Java Future containing the result of the DescribeEnvironmentResources operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - InsufficientPrivilegesException The specified account does not have sufficient privileges for one or
* more AWS services.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ElasticBeanstalkException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ElasticBeanstalkAsyncClient.DescribeEnvironmentResources
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeEnvironmentResources(
DescribeEnvironmentResourcesRequest describeEnvironmentResourcesRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeEnvironmentResourcesResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeEnvironmentResources")
.withMarshaller(new DescribeEnvironmentResourcesRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(describeEnvironmentResourcesRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns descriptions for existing environments.
*
*
* @param describeEnvironmentsRequest
* Request to describe one or more environments.
* @return A Java Future containing the result of the DescribeEnvironments operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ElasticBeanstalkException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ElasticBeanstalkAsyncClient.DescribeEnvironments
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeEnvironments(
DescribeEnvironmentsRequest describeEnvironmentsRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeEnvironmentsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeEnvironments")
.withMarshaller(new DescribeEnvironmentsRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(describeEnvironmentsRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns list of event descriptions matching criteria up to the last 6 weeks.
*
*
*
* This action returns the most recent 1,000 events from the specified NextToken
.
*
*
*
* @param describeEventsRequest
* Request to retrieve a list of events for an environment.
* @return A Java Future containing the result of the DescribeEvents operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ElasticBeanstalkException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ElasticBeanstalkAsyncClient.DescribeEvents
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeEvents(DescribeEventsRequest describeEventsRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeEventsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeEvents")
.withMarshaller(new DescribeEventsRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(describeEventsRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns list of event descriptions matching criteria up to the last 6 weeks.
*
*
*
* This action returns the most recent 1,000 events from the specified NextToken
.
*
*
*
* This is a variant of
* {@link #describeEvents(software.amazon.awssdk.services.elasticbeanstalk.model.DescribeEventsRequest)} operation.
* The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will
* internally handle making service calls for you.
*
*
* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
* and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
* failures only after you start streaming the data. The subscribe method should be called as a request to start
* streaming data. For more info, see
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the
* starting request.
*
*
*
* The following are few ways to use the response class:
*
* 1) Using the subscribe helper method
*
*
* {@code
* software.amazon.awssdk.services.elasticbeanstalk.paginators.DescribeEventsPublisher publisher = client.describeEventsPaginator(request);
* CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.elasticbeanstalk.paginators.DescribeEventsPublisher publisher = client.describeEventsPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
*
*
* public void onNext(software.amazon.awssdk.services.elasticbeanstalk.model.DescribeEventsResponse response) { //... };
* });}
*
*
* As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
*
* Note: If you prefer to have control on service calls, use the
* {@link #describeEvents(software.amazon.awssdk.services.elasticbeanstalk.model.DescribeEventsRequest)}
* operation.
*
*
* @param describeEventsRequest
* Request to retrieve a list of events for an environment.
* @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ElasticBeanstalkException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ElasticBeanstalkAsyncClient.DescribeEvents
* @see AWS API Documentation
*/
public DescribeEventsPublisher describeEventsPaginator(DescribeEventsRequest describeEventsRequest) {
return new DescribeEventsPublisher(this, applyPaginatorUserAgent(describeEventsRequest));
}
/**
*
* Retrieves detailed information about the health of instances in your AWS Elastic Beanstalk. This operation
* requires enhanced health
* reporting.
*
*
* @param describeInstancesHealthRequest
* Parameters for a call to DescribeInstancesHealth
.
* @return A Java Future containing the result of the DescribeInstancesHealth operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - InvalidRequestException One or more input parameters is not valid. Please correct the input
* parameters and try the operation again.
* - ElasticBeanstalkServiceException A generic service exception has occurred.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ElasticBeanstalkException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ElasticBeanstalkAsyncClient.DescribeInstancesHealth
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeInstancesHealth(
DescribeInstancesHealthRequest describeInstancesHealthRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeInstancesHealthResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeInstancesHealth")
.withMarshaller(new DescribeInstancesHealthRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(describeInstancesHealthRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Describes the version of the platform.
*
*
* @param describePlatformVersionRequest
* @return A Java Future containing the result of the DescribePlatformVersion operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - InsufficientPrivilegesException The specified account does not have sufficient privileges for one or
* more AWS services.
* - ElasticBeanstalkServiceException A generic service exception has occurred.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ElasticBeanstalkException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ElasticBeanstalkAsyncClient.DescribePlatformVersion
* @see AWS API Documentation
*/
@Override
public CompletableFuture describePlatformVersion(
DescribePlatformVersionRequest describePlatformVersionRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribePlatformVersionResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribePlatformVersion")
.withMarshaller(new DescribePlatformVersionRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(describePlatformVersionRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns a list of the available solution stack names, with the public version first and then in reverse
* chronological order.
*
*
* @param listAvailableSolutionStacksRequest
* @return A Java Future containing the result of the ListAvailableSolutionStacks operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ElasticBeanstalkException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ElasticBeanstalkAsyncClient.ListAvailableSolutionStacks
* @see AWS API Documentation
*/
@Override
public CompletableFuture listAvailableSolutionStacks(
ListAvailableSolutionStacksRequest listAvailableSolutionStacksRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(ListAvailableSolutionStacksResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ListAvailableSolutionStacks")
.withMarshaller(new ListAvailableSolutionStacksRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(listAvailableSolutionStacksRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Lists the available platforms.
*
*
* @param listPlatformVersionsRequest
* @return A Java Future containing the result of the ListPlatformVersions operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - InsufficientPrivilegesException The specified account does not have sufficient privileges for one or
* more AWS services.
* - ElasticBeanstalkServiceException A generic service exception has occurred.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ElasticBeanstalkException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ElasticBeanstalkAsyncClient.ListPlatformVersions
* @see AWS API Documentation
*/
@Override
public CompletableFuture listPlatformVersions(
ListPlatformVersionsRequest listPlatformVersionsRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(ListPlatformVersionsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ListPlatformVersions")
.withMarshaller(new ListPlatformVersionsRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(listPlatformVersionsRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns the tags applied to an AWS Elastic Beanstalk resource. The response contains a list of tag key-value
* pairs.
*
*
* Currently, Elastic Beanstalk only supports tagging of Elastic Beanstalk environments. For details about
* environment tagging, see Tagging Resources in
* Your Elastic Beanstalk Environment.
*
*
* @param listTagsForResourceRequest
* @return A Java Future containing the result of the ListTagsForResource operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - InsufficientPrivilegesException The specified account does not have sufficient privileges for one or
* more AWS services.
* - ResourceNotFoundException A resource doesn't exist for the specified Amazon Resource Name (ARN).
* - ResourceTypeNotSupportedException The type of the specified Amazon Resource Name (ARN) isn't
* supported for this operation.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ElasticBeanstalkException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ElasticBeanstalkAsyncClient.ListTagsForResource
* @see AWS API Documentation
*/
@Override
public CompletableFuture listTagsForResource(
ListTagsForResourceRequest listTagsForResourceRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(ListTagsForResourceResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ListTagsForResource")
.withMarshaller(new ListTagsForResourceRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(listTagsForResourceRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Deletes and recreates all of the AWS resources (for example: the Auto Scaling group, load balancer, etc.) for a
* specified environment and forces a restart.
*
*
* @param rebuildEnvironmentRequest
* @return A Java Future containing the result of the RebuildEnvironment operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - InsufficientPrivilegesException The specified account does not have sufficient privileges for one or
* more AWS services.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ElasticBeanstalkException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ElasticBeanstalkAsyncClient.RebuildEnvironment
* @see AWS API Documentation
*/
@Override
public CompletableFuture rebuildEnvironment(RebuildEnvironmentRequest rebuildEnvironmentRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(RebuildEnvironmentResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("RebuildEnvironment")
.withMarshaller(new RebuildEnvironmentRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(rebuildEnvironmentRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Initiates a request to compile the specified type of information of the deployed environment.
*
*
* Setting the InfoType
to tail
compiles the last lines from the application server log
* files of every Amazon EC2 instance in your environment.
*
*
* Setting the InfoType
to bundle
compresses the application server log files for every
* Amazon EC2 instance into a .zip
file. Legacy and .NET containers do not support bundle logs.
*
*
* Use RetrieveEnvironmentInfo to obtain the set of logs.
*
*
* Related Topics
*
*
* -
*
*
*
*
* @param requestEnvironmentInfoRequest
* Request to retrieve logs from an environment and store them in your Elastic Beanstalk storage bucket.
* @return A Java Future containing the result of the RequestEnvironmentInfo operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ElasticBeanstalkException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ElasticBeanstalkAsyncClient.RequestEnvironmentInfo
* @see AWS API Documentation
*/
@Override
public CompletableFuture requestEnvironmentInfo(
RequestEnvironmentInfoRequest requestEnvironmentInfoRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(RequestEnvironmentInfoResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("RequestEnvironmentInfo")
.withMarshaller(new RequestEnvironmentInfoRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(requestEnvironmentInfoRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Causes the environment to restart the application container server running on each Amazon EC2 instance.
*
*
* @param restartAppServerRequest
* @return A Java Future containing the result of the RestartAppServer operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ElasticBeanstalkException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ElasticBeanstalkAsyncClient.RestartAppServer
* @see AWS API Documentation
*/
@Override
public CompletableFuture restartAppServer(RestartAppServerRequest restartAppServerRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(RestartAppServerResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("RestartAppServer")
.withMarshaller(new RestartAppServerRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(restartAppServerRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Retrieves the compiled information from a RequestEnvironmentInfo request.
*
*
* Related Topics
*
*
* -
*
*
*
*
* @param retrieveEnvironmentInfoRequest
* Request to download logs retrieved with RequestEnvironmentInfo.
* @return A Java Future containing the result of the RetrieveEnvironmentInfo operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ElasticBeanstalkException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ElasticBeanstalkAsyncClient.RetrieveEnvironmentInfo
* @see AWS API Documentation
*/
@Override
public CompletableFuture retrieveEnvironmentInfo(
RetrieveEnvironmentInfoRequest retrieveEnvironmentInfoRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(RetrieveEnvironmentInfoResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("RetrieveEnvironmentInfo")
.withMarshaller(new RetrieveEnvironmentInfoRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(retrieveEnvironmentInfoRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Swaps the CNAMEs of two environments.
*
*
* @param swapEnvironmentCnamEsRequest
* Swaps the CNAMEs of two environments.
* @return A Java Future containing the result of the SwapEnvironmentCNAMEs operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ElasticBeanstalkException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ElasticBeanstalkAsyncClient.SwapEnvironmentCNAMEs
* @see AWS API Documentation
*/
@Override
public CompletableFuture swapEnvironmentCNAMEs(
SwapEnvironmentCnamEsRequest swapEnvironmentCnamEsRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(SwapEnvironmentCNAMEsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("SwapEnvironmentCNAMEs")
.withMarshaller(new SwapEnvironmentCnamEsRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(swapEnvironmentCnamEsRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Terminates the specified environment.
*
*
* @param terminateEnvironmentRequest
* Request to terminate an environment.
* @return A Java Future containing the result of the TerminateEnvironment operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - InsufficientPrivilegesException The specified account does not have sufficient privileges for one or
* more AWS services.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ElasticBeanstalkException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ElasticBeanstalkAsyncClient.TerminateEnvironment
* @see AWS API Documentation
*/
@Override
public CompletableFuture terminateEnvironment(
TerminateEnvironmentRequest terminateEnvironmentRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(TerminateEnvironmentResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("TerminateEnvironment")
.withMarshaller(new TerminateEnvironmentRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(terminateEnvironmentRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Updates the specified application to have the specified properties.
*
*
*
* If a property (for example, description
) is not provided, the value remains unchanged. To clear
* these properties, specify an empty string.
*
*
*
* @param updateApplicationRequest
* Request to update an application.
* @return A Java Future containing the result of the UpdateApplication operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ElasticBeanstalkException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ElasticBeanstalkAsyncClient.UpdateApplication
* @see AWS API Documentation
*/
@Override
public CompletableFuture updateApplication(UpdateApplicationRequest updateApplicationRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(UpdateApplicationResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("UpdateApplication")
.withMarshaller(new UpdateApplicationRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(updateApplicationRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Modifies lifecycle settings for an application.
*
*
* @param updateApplicationResourceLifecycleRequest
* @return A Java Future containing the result of the UpdateApplicationResourceLifecycle operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - InsufficientPrivilegesException The specified account does not have sufficient privileges for one or
* more AWS services.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ElasticBeanstalkException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ElasticBeanstalkAsyncClient.UpdateApplicationResourceLifecycle
* @see AWS API Documentation
*/
@Override
public CompletableFuture updateApplicationResourceLifecycle(
UpdateApplicationResourceLifecycleRequest updateApplicationResourceLifecycleRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(UpdateApplicationResourceLifecycleResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("UpdateApplicationResourceLifecycle")
.withMarshaller(new UpdateApplicationResourceLifecycleRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(updateApplicationResourceLifecycleRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Updates the specified application version to have the specified properties.
*
*
*
* If a property (for example, description
) is not provided, the value remains unchanged. To clear
* properties, specify an empty string.
*
*
*
* @param updateApplicationVersionRequest
* @return A Java Future containing the result of the UpdateApplicationVersion operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ElasticBeanstalkException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ElasticBeanstalkAsyncClient.UpdateApplicationVersion
* @see AWS API Documentation
*/
@Override
public CompletableFuture updateApplicationVersion(
UpdateApplicationVersionRequest updateApplicationVersionRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(UpdateApplicationVersionResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("UpdateApplicationVersion")
.withMarshaller(new UpdateApplicationVersionRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(updateApplicationVersionRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Updates the specified configuration template to have the specified properties or configuration option values.
*
*
*
* If a property (for example, ApplicationName
) is not provided, its value remains unchanged. To clear
* such properties, specify an empty string.
*
*
*
* Related Topics
*
*
* -
*
*
*
*
* @param updateConfigurationTemplateRequest
* The result message containing the options for the specified solution stack.
* @return A Java Future containing the result of the UpdateConfigurationTemplate operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - InsufficientPrivilegesException The specified account does not have sufficient privileges for one or
* more AWS services.
* - TooManyBucketsException The specified account has reached its limit of Amazon S3 buckets.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ElasticBeanstalkException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ElasticBeanstalkAsyncClient.UpdateConfigurationTemplate
* @see AWS API Documentation
*/
@Override
public CompletableFuture updateConfigurationTemplate(
UpdateConfigurationTemplateRequest updateConfigurationTemplateRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(UpdateConfigurationTemplateResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("UpdateConfigurationTemplate")
.withMarshaller(new UpdateConfigurationTemplateRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(updateConfigurationTemplateRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Updates the environment description, deploys a new application version, updates the configuration settings to an
* entirely new configuration template, or updates select configuration option values in the running environment.
*
*
* Attempting to update both the release and configuration is not allowed and AWS Elastic Beanstalk returns an
* InvalidParameterCombination
error.
*
*
* When updating the configuration settings to a new template or individual settings, a draft configuration is
* created and DescribeConfigurationSettings for this environment returns two setting descriptions with
* different DeploymentStatus
values.
*
*
* @param updateEnvironmentRequest
* Request to update an environment.
* @return A Java Future containing the result of the UpdateEnvironment operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - InsufficientPrivilegesException The specified account does not have sufficient privileges for one or
* more AWS services.
* - TooManyBucketsException The specified account has reached its limit of Amazon S3 buckets.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ElasticBeanstalkException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ElasticBeanstalkAsyncClient.UpdateEnvironment
* @see AWS API Documentation
*/
@Override
public CompletableFuture updateEnvironment(UpdateEnvironmentRequest updateEnvironmentRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(UpdateEnvironmentResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("UpdateEnvironment")
.withMarshaller(new UpdateEnvironmentRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(updateEnvironmentRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Update the list of tags applied to an AWS Elastic Beanstalk resource. Two lists can be passed:
* TagsToAdd
for tags to add or update, and TagsToRemove
.
*
*
* Currently, Elastic Beanstalk only supports tagging of Elastic Beanstalk environments. For details about
* environment tagging, see Tagging Resources in
* Your Elastic Beanstalk Environment.
*
*
* If you create a custom IAM user policy to control permission to this operation, specify one of the following two
* virtual actions (or both) instead of the API operation name:
*
*
* - elasticbeanstalk:AddTags
* -
*
* Controls permission to call UpdateTagsForResource
and pass a list of tags to add in the
* TagsToAdd
parameter.
*
*
* - elasticbeanstalk:RemoveTags
* -
*
* Controls permission to call UpdateTagsForResource
and pass a list of tag keys to remove in the
* TagsToRemove
parameter.
*
*
*
*
* For details about creating a custom user policy, see Creating a Custom User Policy.
*
*
* @param updateTagsForResourceRequest
* @return A Java Future containing the result of the UpdateTagsForResource operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - InsufficientPrivilegesException The specified account does not have sufficient privileges for one or
* more AWS services.
* - OperationInProgressException Unable to perform the specified operation because another operation that
* effects an element in this activity is already in progress.
* - TooManyTagsException The number of tags in the resource would exceed the number of tags that each
* resource can have.
*
* To calculate this, the operation considers both the number of tags the resource already has and the tags
* this operation would add if it succeeded.
* - ResourceNotFoundException A resource doesn't exist for the specified Amazon Resource Name (ARN).
* - ResourceTypeNotSupportedException The type of the specified Amazon Resource Name (ARN) isn't
* supported for this operation.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ElasticBeanstalkException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ElasticBeanstalkAsyncClient.UpdateTagsForResource
* @see AWS API Documentation
*/
@Override
public CompletableFuture updateTagsForResource(
UpdateTagsForResourceRequest updateTagsForResourceRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(UpdateTagsForResourceResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("UpdateTagsForResource")
.withMarshaller(new UpdateTagsForResourceRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(updateTagsForResourceRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Takes a set of configuration settings and either a configuration template or environment, and determines whether
* those values are valid.
*
*
* This action returns a list of messages indicating any errors or warnings associated with the selection of option
* values.
*
*
* @param validateConfigurationSettingsRequest
* A list of validation messages for a specified configuration template.
* @return A Java Future containing the result of the ValidateConfigurationSettings operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - InsufficientPrivilegesException The specified account does not have sufficient privileges for one or
* more AWS services.
* - TooManyBucketsException The specified account has reached its limit of Amazon S3 buckets.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ElasticBeanstalkException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample ElasticBeanstalkAsyncClient.ValidateConfigurationSettings
* @see AWS API Documentation
*/
@Override
public CompletableFuture validateConfigurationSettings(
ValidateConfigurationSettingsRequest validateConfigurationSettingsRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(ValidateConfigurationSettingsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ValidateConfigurationSettings")
.withMarshaller(new ValidateConfigurationSettingsRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(validateConfigurationSettingsRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
@Override
public void close() {
clientHandler.close();
}
private AwsQueryProtocolFactory init() {
return AwsQueryProtocolFactory
.builder()
.registerModeledException(
ExceptionMetadata.builder().errorCode("S3LocationNotInServiceRegionException")
.exceptionBuilderSupplier(S3LocationNotInServiceRegionException::builder).httpStatusCode(400)
.build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("InvalidRequestException")
.exceptionBuilderSupplier(InvalidRequestException::builder).httpStatusCode(400).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("ManagedActionInvalidStateException")
.exceptionBuilderSupplier(ManagedActionInvalidStateException::builder).httpStatusCode(400)
.build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("InsufficientPrivilegesException")
.exceptionBuilderSupplier(InsufficientPrivilegesException::builder).httpStatusCode(403).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("TooManyPlatformsException")
.exceptionBuilderSupplier(TooManyPlatformsException::builder).httpStatusCode(400).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("TooManyApplicationVersionsException")
.exceptionBuilderSupplier(TooManyApplicationVersionsException::builder).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("CodeBuildNotInServiceRegionException")
.exceptionBuilderSupplier(CodeBuildNotInServiceRegionException::builder).httpStatusCode(400)
.build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("S3SubscriptionRequiredException")
.exceptionBuilderSupplier(S3SubscriptionRequiredException::builder).httpStatusCode(400).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("SourceBundleDeletionFailure")
.exceptionBuilderSupplier(SourceBundleDeletionException::builder).httpStatusCode(400).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("TooManyConfigurationTemplatesException")
.exceptionBuilderSupplier(TooManyConfigurationTemplatesException::builder).httpStatusCode(400)
.build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("ResourceTypeNotSupportedException")
.exceptionBuilderSupplier(ResourceTypeNotSupportedException::builder).httpStatusCode(400).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("TooManyTagsException")
.exceptionBuilderSupplier(TooManyTagsException::builder).httpStatusCode(400).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("ResourceNotFoundException")
.exceptionBuilderSupplier(ResourceNotFoundException::builder).httpStatusCode(400).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("TooManyApplicationsException")
.exceptionBuilderSupplier(TooManyApplicationsException::builder).httpStatusCode(400).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("OperationInProgressFailure")
.exceptionBuilderSupplier(OperationInProgressException::builder).httpStatusCode(400).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("TooManyEnvironmentsException")
.exceptionBuilderSupplier(TooManyEnvironmentsException::builder).httpStatusCode(400).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("TooManyBucketsException")
.exceptionBuilderSupplier(TooManyBucketsException::builder).httpStatusCode(400).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("ElasticBeanstalkServiceException")
.exceptionBuilderSupplier(ElasticBeanstalkServiceException::builder).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("PlatformVersionStillReferencedException")
.exceptionBuilderSupplier(PlatformVersionStillReferencedException::builder).httpStatusCode(400)
.build()).clientConfiguration(clientConfiguration)
.defaultServiceExceptionSupplier(ElasticBeanstalkException::builder).build();
}
private T applyPaginatorUserAgent(T request) {
Consumer userAgentApplier = b -> b.addApiName(ApiName.builder()
.version(VersionInfo.SDK_VERSION).name("PAGINATED").build());
AwsRequestOverrideConfiguration overrideConfiguration = request.overrideConfiguration()
.map(c -> c.toBuilder().applyMutation(userAgentApplier).build())
.orElse((AwsRequestOverrideConfiguration.builder().applyMutation(userAgentApplier).build()));
return (T) request.toBuilder().overrideConfiguration(overrideConfiguration).build();
}
}