software.amazon.awssdk.services.elasticbeanstalk.DefaultElasticBeanstalkClient Maven / Gradle / Ivy
Show all versions of elasticbeanstalk Show documentation
/*
* Copyright 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.Collections;
import java.util.List;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.annotations.SdkInternalApi;
import software.amazon.awssdk.awscore.client.handler.AwsSyncClientHandler;
import software.amazon.awssdk.awscore.exception.AwsServiceException;
import software.amazon.awssdk.awscore.internal.AwsProtocolMetadata;
import software.amazon.awssdk.awscore.internal.AwsServiceProtocol;
import software.amazon.awssdk.core.RequestOverrideConfiguration;
import software.amazon.awssdk.core.SdkPlugin;
import software.amazon.awssdk.core.SdkRequest;
import software.amazon.awssdk.core.client.config.SdkClientConfiguration;
import software.amazon.awssdk.core.client.config.SdkClientOption;
import software.amazon.awssdk.core.client.handler.ClientExecutionParams;
import software.amazon.awssdk.core.client.handler.SyncClientHandler;
import software.amazon.awssdk.core.exception.SdkClientException;
import software.amazon.awssdk.core.http.HttpResponseHandler;
import software.amazon.awssdk.core.metrics.CoreMetric;
import software.amazon.awssdk.metrics.MetricCollector;
import software.amazon.awssdk.metrics.MetricPublisher;
import software.amazon.awssdk.metrics.NoOpMetricCollector;
import software.amazon.awssdk.protocols.core.ExceptionMetadata;
import software.amazon.awssdk.protocols.query.AwsQueryProtocolFactory;
import software.amazon.awssdk.services.elasticbeanstalk.internal.ElasticBeanstalkServiceClientConfigurationBuilder;
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.AssociateEnvironmentOperationsRoleRequest;
import software.amazon.awssdk.services.elasticbeanstalk.model.AssociateEnvironmentOperationsRoleResponse;
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.DisassociateEnvironmentOperationsRoleRequest;
import software.amazon.awssdk.services.elasticbeanstalk.model.DisassociateEnvironmentOperationsRoleResponse;
import software.amazon.awssdk.services.elasticbeanstalk.model.ElasticBeanstalkException;
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.ListPlatformBranchesRequest;
import software.amazon.awssdk.services.elasticbeanstalk.model.ListPlatformBranchesResponse;
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.SwapEnvironmentCnamEsRequest;
import software.amazon.awssdk.services.elasticbeanstalk.model.SwapEnvironmentCnamEsResponse;
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.transform.AbortEnvironmentUpdateRequestMarshaller;
import software.amazon.awssdk.services.elasticbeanstalk.transform.ApplyEnvironmentManagedActionRequestMarshaller;
import software.amazon.awssdk.services.elasticbeanstalk.transform.AssociateEnvironmentOperationsRoleRequestMarshaller;
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.DisassociateEnvironmentOperationsRoleRequestMarshaller;
import software.amazon.awssdk.services.elasticbeanstalk.transform.ListAvailableSolutionStacksRequestMarshaller;
import software.amazon.awssdk.services.elasticbeanstalk.transform.ListPlatformBranchesRequestMarshaller;
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.services.elasticbeanstalk.waiters.ElasticBeanstalkWaiter;
import software.amazon.awssdk.utils.Logger;
/**
* Internal implementation of {@link ElasticBeanstalkClient}.
*
* @see ElasticBeanstalkClient#builder()
*/
@Generated("software.amazon.awssdk:codegen")
@SdkInternalApi
final class DefaultElasticBeanstalkClient implements ElasticBeanstalkClient {
private static final Logger log = Logger.loggerFor(DefaultElasticBeanstalkClient.class);
private static final AwsProtocolMetadata protocolMetadata = AwsProtocolMetadata.builder()
.serviceProtocol(AwsServiceProtocol.QUERY).build();
private final SyncClientHandler clientHandler;
private final AwsQueryProtocolFactory protocolFactory;
private final SdkClientConfiguration clientConfiguration;
protected DefaultElasticBeanstalkClient(SdkClientConfiguration clientConfiguration) {
this.clientHandler = new AwsSyncClientHandler(clientConfiguration);
this.clientConfiguration = clientConfiguration;
this.protocolFactory = init();
}
/**
*
* Cancels in-progress environment configuration update or application version deployment.
*
*
* @param abortEnvironmentUpdateRequest
* @return Result of the AbortEnvironmentUpdate operation returned by the service.
* @throws InsufficientPrivilegesException
* The specified account does not have sufficient privileges for one or more AWS services.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws ElasticBeanstalkException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample ElasticBeanstalkClient.AbortEnvironmentUpdate
* @see AWS API Documentation
*/
@Override
public AbortEnvironmentUpdateResponse abortEnvironmentUpdate(AbortEnvironmentUpdateRequest abortEnvironmentUpdateRequest)
throws InsufficientPrivilegesException, AwsServiceException, SdkClientException, ElasticBeanstalkException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(AbortEnvironmentUpdateResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(abortEnvironmentUpdateRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, abortEnvironmentUpdateRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Elastic Beanstalk");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AbortEnvironmentUpdate");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("AbortEnvironmentUpdate").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(abortEnvironmentUpdateRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new AbortEnvironmentUpdateRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the ApplyEnvironmentManagedAction operation returned by the service.
* @throws ElasticBeanstalkServiceException
* A generic service exception has occurred.
* @throws ManagedActionInvalidStateException
* Cannot modify the managed action in its current state.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws ElasticBeanstalkException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample ElasticBeanstalkClient.ApplyEnvironmentManagedAction
* @see AWS API Documentation
*/
@Override
public ApplyEnvironmentManagedActionResponse applyEnvironmentManagedAction(
ApplyEnvironmentManagedActionRequest applyEnvironmentManagedActionRequest) throws ElasticBeanstalkServiceException,
ManagedActionInvalidStateException, AwsServiceException, SdkClientException, ElasticBeanstalkException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(ApplyEnvironmentManagedActionResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(applyEnvironmentManagedActionRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
applyEnvironmentManagedActionRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Elastic Beanstalk");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ApplyEnvironmentManagedAction");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ApplyEnvironmentManagedAction").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(applyEnvironmentManagedActionRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ApplyEnvironmentManagedActionRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Add or change the operations role used by an environment. After this call is made, Elastic Beanstalk uses the
* associated operations role for permissions to downstream services during subsequent calls acting on this
* environment. For more information, see Operations roles in the
* AWS Elastic Beanstalk Developer Guide.
*
*
* @param associateEnvironmentOperationsRoleRequest
* Request to add or change the operations role used by an environment.
* @return Result of the AssociateEnvironmentOperationsRole operation returned by the service.
* @throws InsufficientPrivilegesException
* The specified account does not have sufficient privileges for one or more AWS services.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws ElasticBeanstalkException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample ElasticBeanstalkClient.AssociateEnvironmentOperationsRole
* @see AWS API Documentation
*/
@Override
public AssociateEnvironmentOperationsRoleResponse associateEnvironmentOperationsRole(
AssociateEnvironmentOperationsRoleRequest associateEnvironmentOperationsRoleRequest)
throws InsufficientPrivilegesException, AwsServiceException, SdkClientException, ElasticBeanstalkException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(AssociateEnvironmentOperationsRoleResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(associateEnvironmentOperationsRoleRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
associateEnvironmentOperationsRoleRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Elastic Beanstalk");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AssociateEnvironmentOperationsRole");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("AssociateEnvironmentOperationsRole").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(associateEnvironmentOperationsRoleRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new AssociateEnvironmentOperationsRoleRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Checks if the specified CNAME is available.
*
*
* @param checkDnsAvailabilityRequest
* Results message indicating whether a CNAME is available.
* @return Result of the CheckDNSAvailability operation returned by the service.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws ElasticBeanstalkException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample ElasticBeanstalkClient.CheckDNSAvailability
* @see AWS API Documentation
*/
@Override
public CheckDnsAvailabilityResponse checkDNSAvailability(CheckDnsAvailabilityRequest checkDnsAvailabilityRequest)
throws AwsServiceException, SdkClientException, ElasticBeanstalkException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(CheckDnsAvailabilityResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(checkDnsAvailabilityRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, checkDnsAvailabilityRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Elastic Beanstalk");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CheckDNSAvailability");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CheckDNSAvailability").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(checkDnsAvailabilityRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CheckDnsAvailabilityRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the ComposeEnvironments operation returned by the service.
* @throws TooManyEnvironmentsException
* The specified account has reached its limit of environments.
* @throws InsufficientPrivilegesException
* The specified account does not have sufficient privileges for one or more AWS services.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws ElasticBeanstalkException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample ElasticBeanstalkClient.ComposeEnvironments
* @see AWS API Documentation
*/
@Override
public ComposeEnvironmentsResponse composeEnvironments(ComposeEnvironmentsRequest composeEnvironmentsRequest)
throws TooManyEnvironmentsException, InsufficientPrivilegesException, AwsServiceException, SdkClientException,
ElasticBeanstalkException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(ComposeEnvironmentsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(composeEnvironmentsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, composeEnvironmentsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Elastic Beanstalk");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ComposeEnvironments");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ComposeEnvironments").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(composeEnvironmentsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ComposeEnvironmentsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates an application that has one configuration template named default
and no application
* versions.
*
*
* @param createApplicationRequest
* Request to create an application.
* @return Result of the CreateApplication operation returned by the service.
* @throws TooManyApplicationsException
* The specified account has reached its limit of applications.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws ElasticBeanstalkException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample ElasticBeanstalkClient.CreateApplication
* @see AWS API Documentation
*/
@Override
public CreateApplicationResponse createApplication(CreateApplicationRequest createApplicationRequest)
throws TooManyApplicationsException, AwsServiceException, SdkClientException, ElasticBeanstalkException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(CreateApplicationResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createApplicationRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createApplicationRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Elastic Beanstalk");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateApplication");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateApplication").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(createApplicationRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateApplicationRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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.
*
*
*
* After you create an application version with a specified Amazon S3 bucket and key location, you can't 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 Result of the CreateApplicationVersion operation returned by the service.
* @throws TooManyApplicationsException
* The specified account has reached its limit of applications.
* @throws TooManyApplicationVersionsException
* The specified account has reached its limit of application versions.
* @throws InsufficientPrivilegesException
* The specified account does not have sufficient privileges for one or more AWS services.
* @throws 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
*
*
* @throws CodeBuildNotInServiceRegionException
* AWS CodeBuild is not available in the specified region.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws ElasticBeanstalkException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample ElasticBeanstalkClient.CreateApplicationVersion
* @see AWS API Documentation
*/
@Override
public CreateApplicationVersionResponse createApplicationVersion(
CreateApplicationVersionRequest createApplicationVersionRequest) throws TooManyApplicationsException,
TooManyApplicationVersionsException, InsufficientPrivilegesException, S3LocationNotInServiceRegionException,
CodeBuildNotInServiceRegionException, AwsServiceException, SdkClientException, ElasticBeanstalkException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(CreateApplicationVersionResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createApplicationVersionRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createApplicationVersionRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Elastic Beanstalk");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateApplicationVersion");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateApplicationVersion").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(createApplicationVersionRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateApplicationVersionRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates an AWS Elastic Beanstalk configuration template, associated with a specific Elastic Beanstalk
* application. You define application configuration settings in a configuration template. You can then use the
* configuration template 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 Result of the CreateConfigurationTemplate operation returned by the service.
* @throws InsufficientPrivilegesException
* The specified account does not have sufficient privileges for one or more AWS services.
* @throws TooManyBucketsException
* The specified account has reached its limit of Amazon S3 buckets.
* @throws TooManyConfigurationTemplatesException
* The specified account has reached its limit of configuration templates.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws ElasticBeanstalkException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample ElasticBeanstalkClient.CreateConfigurationTemplate
* @see AWS API Documentation
*/
@Override
public CreateConfigurationTemplateResponse createConfigurationTemplate(
CreateConfigurationTemplateRequest createConfigurationTemplateRequest) throws InsufficientPrivilegesException,
TooManyBucketsException, TooManyConfigurationTemplatesException, AwsServiceException, SdkClientException,
ElasticBeanstalkException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(CreateConfigurationTemplateResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createConfigurationTemplateRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createConfigurationTemplateRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Elastic Beanstalk");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateConfigurationTemplate");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateConfigurationTemplate").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(createConfigurationTemplateRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateConfigurationTemplateRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Launches an AWS Elastic Beanstalk environment for the specified application using the specified configuration.
*
*
* @param createEnvironmentRequest
* @return Result of the CreateEnvironment operation returned by the service.
* @throws TooManyEnvironmentsException
* The specified account has reached its limit of environments.
* @throws InsufficientPrivilegesException
* The specified account does not have sufficient privileges for one or more AWS services.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws ElasticBeanstalkException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample ElasticBeanstalkClient.CreateEnvironment
* @see AWS API Documentation
*/
@Override
public CreateEnvironmentResponse createEnvironment(CreateEnvironmentRequest createEnvironmentRequest)
throws TooManyEnvironmentsException, InsufficientPrivilegesException, AwsServiceException, SdkClientException,
ElasticBeanstalkException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(CreateEnvironmentResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createEnvironmentRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createEnvironmentRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Elastic Beanstalk");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateEnvironment");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateEnvironment").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(createEnvironmentRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateEnvironmentRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Create a new version of your custom platform.
*
*
* @param createPlatformVersionRequest
* Request to create a new platform version.
* @return Result of the CreatePlatformVersion operation returned by the service.
* @throws InsufficientPrivilegesException
* The specified account does not have sufficient privileges for one or more AWS services.
* @throws ElasticBeanstalkServiceException
* A generic service exception has occurred.
* @throws TooManyPlatformsException
* You have exceeded the maximum number of allowed platforms associated with the account.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws ElasticBeanstalkException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample ElasticBeanstalkClient.CreatePlatformVersion
* @see AWS API Documentation
*/
@Override
public CreatePlatformVersionResponse createPlatformVersion(CreatePlatformVersionRequest createPlatformVersionRequest)
throws InsufficientPrivilegesException, ElasticBeanstalkServiceException, TooManyPlatformsException,
AwsServiceException, SdkClientException, ElasticBeanstalkException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(CreatePlatformVersionResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createPlatformVersionRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createPlatformVersionRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Elastic Beanstalk");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreatePlatformVersion");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreatePlatformVersion").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(createPlatformVersionRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreatePlatformVersionRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the CreateStorageLocation operation returned by the service.
* @throws TooManyBucketsException
* The specified account has reached its limit of Amazon S3 buckets.
* @throws S3SubscriptionRequiredException
* The specified account does not have a subscription to Amazon S3.
* @throws InsufficientPrivilegesException
* The specified account does not have sufficient privileges for one or more AWS services.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws ElasticBeanstalkException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample ElasticBeanstalkClient.CreateStorageLocation
* @see AWS API Documentation
*/
@Override
public CreateStorageLocationResponse createStorageLocation(CreateStorageLocationRequest createStorageLocationRequest)
throws TooManyBucketsException, S3SubscriptionRequiredException, InsufficientPrivilegesException,
AwsServiceException, SdkClientException, ElasticBeanstalkException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(CreateStorageLocationResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createStorageLocationRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createStorageLocationRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Elastic Beanstalk");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateStorageLocation");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateStorageLocation").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(createStorageLocationRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateStorageLocationRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the DeleteApplication operation returned by the service.
* @throws OperationInProgressException
* Unable to perform the specified operation because another operation that effects an element in this
* activity is already in progress.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws ElasticBeanstalkException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample ElasticBeanstalkClient.DeleteApplication
* @see AWS API Documentation
*/
@Override
public DeleteApplicationResponse deleteApplication(DeleteApplicationRequest deleteApplicationRequest)
throws OperationInProgressException, AwsServiceException, SdkClientException, ElasticBeanstalkException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DeleteApplicationResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteApplicationRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteApplicationRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Elastic Beanstalk");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteApplication");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteApplication").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(deleteApplicationRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteApplicationRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the DeleteApplicationVersion operation returned by the service.
* @throws SourceBundleDeletionException
* Unable to delete the Amazon S3 source bundle associated with the application version. The application
* version was deleted successfully.
* @throws InsufficientPrivilegesException
* The specified account does not have sufficient privileges for one or more AWS services.
* @throws OperationInProgressException
* Unable to perform the specified operation because another operation that effects an element in this
* activity is already in progress.
* @throws 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
*
*
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws ElasticBeanstalkException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample ElasticBeanstalkClient.DeleteApplicationVersion
* @see AWS API Documentation
*/
@Override
public DeleteApplicationVersionResponse deleteApplicationVersion(
DeleteApplicationVersionRequest deleteApplicationVersionRequest) throws SourceBundleDeletionException,
InsufficientPrivilegesException, OperationInProgressException, S3LocationNotInServiceRegionException,
AwsServiceException, SdkClientException, ElasticBeanstalkException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DeleteApplicationVersionResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteApplicationVersionRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteApplicationVersionRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Elastic Beanstalk");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteApplicationVersion");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteApplicationVersion").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(deleteApplicationVersionRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteApplicationVersionRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the DeleteConfigurationTemplate operation returned by the service.
* @throws OperationInProgressException
* Unable to perform the specified operation because another operation that effects an element in this
* activity is already in progress.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws ElasticBeanstalkException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample ElasticBeanstalkClient.DeleteConfigurationTemplate
* @see AWS API Documentation
*/
@Override
public DeleteConfigurationTemplateResponse deleteConfigurationTemplate(
DeleteConfigurationTemplateRequest deleteConfigurationTemplateRequest) throws OperationInProgressException,
AwsServiceException, SdkClientException, ElasticBeanstalkException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DeleteConfigurationTemplateResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteConfigurationTemplateRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteConfigurationTemplateRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Elastic Beanstalk");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteConfigurationTemplate");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteConfigurationTemplate").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(deleteConfigurationTemplateRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteConfigurationTemplateRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the DeleteEnvironmentConfiguration operation returned by the service.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws ElasticBeanstalkException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample ElasticBeanstalkClient.DeleteEnvironmentConfiguration
* @see AWS API Documentation
*/
@Override
public DeleteEnvironmentConfigurationResponse deleteEnvironmentConfiguration(
DeleteEnvironmentConfigurationRequest deleteEnvironmentConfigurationRequest) throws AwsServiceException,
SdkClientException, ElasticBeanstalkException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DeleteEnvironmentConfigurationResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteEnvironmentConfigurationRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
deleteEnvironmentConfigurationRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Elastic Beanstalk");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteEnvironmentConfiguration");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteEnvironmentConfiguration").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(deleteEnvironmentConfigurationRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteEnvironmentConfigurationRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes the specified version of a custom platform.
*
*
* @param deletePlatformVersionRequest
* @return Result of the DeletePlatformVersion operation returned by the service.
* @throws OperationInProgressException
* Unable to perform the specified operation because another operation that effects an element in this
* activity is already in progress.
* @throws InsufficientPrivilegesException
* The specified account does not have sufficient privileges for one or more AWS services.
* @throws ElasticBeanstalkServiceException
* A generic service exception has occurred.
* @throws PlatformVersionStillReferencedException
* You cannot delete the platform version because there are still environments running on it.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws ElasticBeanstalkException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample ElasticBeanstalkClient.DeletePlatformVersion
* @see AWS API Documentation
*/
@Override
public DeletePlatformVersionResponse deletePlatformVersion(DeletePlatformVersionRequest deletePlatformVersionRequest)
throws OperationInProgressException, InsufficientPrivilegesException, ElasticBeanstalkServiceException,
PlatformVersionStillReferencedException, AwsServiceException, SdkClientException, ElasticBeanstalkException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DeletePlatformVersionResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deletePlatformVersionRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deletePlatformVersionRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Elastic Beanstalk");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeletePlatformVersion");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeletePlatformVersion").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(deletePlatformVersionRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeletePlatformVersionRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the DescribeAccountAttributes operation returned by the service.
* @throws InsufficientPrivilegesException
* The specified account does not have sufficient privileges for one or more AWS services.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws ElasticBeanstalkException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample ElasticBeanstalkClient.DescribeAccountAttributes
* @see AWS API Documentation
*/
@Override
public DescribeAccountAttributesResponse describeAccountAttributes(
DescribeAccountAttributesRequest describeAccountAttributesRequest) throws InsufficientPrivilegesException,
AwsServiceException, SdkClientException, ElasticBeanstalkException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeAccountAttributesResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeAccountAttributesRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, describeAccountAttributesRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Elastic Beanstalk");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeAccountAttributes");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeAccountAttributes").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(describeAccountAttributesRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DescribeAccountAttributesRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Retrieve a list of application versions.
*
*
* @param describeApplicationVersionsRequest
* Request to describe application versions.
* @return Result of the DescribeApplicationVersions operation returned by the service.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws ElasticBeanstalkException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample ElasticBeanstalkClient.DescribeApplicationVersions
* @see AWS API Documentation
*/
@Override
public DescribeApplicationVersionsResponse describeApplicationVersions(
DescribeApplicationVersionsRequest describeApplicationVersionsRequest) throws AwsServiceException,
SdkClientException, ElasticBeanstalkException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeApplicationVersionsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeApplicationVersionsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, describeApplicationVersionsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Elastic Beanstalk");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeApplicationVersions");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeApplicationVersions").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(describeApplicationVersionsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DescribeApplicationVersionsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns the descriptions of existing applications.
*
*
* @param describeApplicationsRequest
* Request to describe one or more applications.
* @return Result of the DescribeApplications operation returned by the service.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws ElasticBeanstalkException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample ElasticBeanstalkClient.DescribeApplications
* @see AWS API Documentation
*/
@Override
public DescribeApplicationsResponse describeApplications(DescribeApplicationsRequest describeApplicationsRequest)
throws AwsServiceException, SdkClientException, ElasticBeanstalkException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeApplicationsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeApplicationsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, describeApplicationsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Elastic Beanstalk");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeApplications");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DescribeApplications").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(describeApplicationsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DescribeApplicationsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the DescribeConfigurationOptions operation returned by the service.
* @throws TooManyBucketsException
* The specified account has reached its limit of Amazon S3 buckets.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws ElasticBeanstalkException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample ElasticBeanstalkClient.DescribeConfigurationOptions
* @see AWS API Documentation
*/
@Override
public DescribeConfigurationOptionsResponse describeConfigurationOptions(
DescribeConfigurationOptionsRequest describeConfigurationOptionsRequest) throws TooManyBucketsException,
AwsServiceException, SdkClientException, ElasticBeanstalkException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeConfigurationOptionsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeConfigurationOptionsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, describeConfigurationOptionsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Elastic Beanstalk");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeConfigurationOptions");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeConfigurationOptions").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(describeConfigurationOptionsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DescribeConfigurationOptionsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the DescribeConfigurationSettings operation returned by the service.
* @throws TooManyBucketsException
* The specified account has reached its limit of Amazon S3 buckets.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws ElasticBeanstalkException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample ElasticBeanstalkClient.DescribeConfigurationSettings
* @see AWS API Documentation
*/
@Override
public DescribeConfigurationSettingsResponse describeConfigurationSettings(
DescribeConfigurationSettingsRequest describeConfigurationSettingsRequest) throws TooManyBucketsException,
AwsServiceException, SdkClientException, ElasticBeanstalkException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeConfigurationSettingsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeConfigurationSettingsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
describeConfigurationSettingsRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Elastic Beanstalk");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeConfigurationSettings");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeConfigurationSettings").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(describeConfigurationSettingsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DescribeConfigurationSettingsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the DescribeEnvironmentHealth operation returned by the service.
* @throws InvalidRequestException
* One or more input parameters is not valid. Please correct the input parameters and try the operation
* again.
* @throws ElasticBeanstalkServiceException
* A generic service exception has occurred.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws ElasticBeanstalkException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample ElasticBeanstalkClient.DescribeEnvironmentHealth
* @see AWS API Documentation
*/
@Override
public DescribeEnvironmentHealthResponse describeEnvironmentHealth(
DescribeEnvironmentHealthRequest describeEnvironmentHealthRequest) throws InvalidRequestException,
ElasticBeanstalkServiceException, AwsServiceException, SdkClientException, ElasticBeanstalkException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeEnvironmentHealthResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeEnvironmentHealthRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, describeEnvironmentHealthRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Elastic Beanstalk");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeEnvironmentHealth");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeEnvironmentHealth").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(describeEnvironmentHealthRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DescribeEnvironmentHealthRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Lists an environment's completed and failed managed actions.
*
*
* @param describeEnvironmentManagedActionHistoryRequest
* Request to list completed and failed managed actions.
* @return Result of the DescribeEnvironmentManagedActionHistory operation returned by the service.
* @throws ElasticBeanstalkServiceException
* A generic service exception has occurred.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws ElasticBeanstalkException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample ElasticBeanstalkClient.DescribeEnvironmentManagedActionHistory
* @see AWS API Documentation
*/
@Override
public DescribeEnvironmentManagedActionHistoryResponse describeEnvironmentManagedActionHistory(
DescribeEnvironmentManagedActionHistoryRequest describeEnvironmentManagedActionHistoryRequest)
throws ElasticBeanstalkServiceException, AwsServiceException, SdkClientException, ElasticBeanstalkException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeEnvironmentManagedActionHistoryResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeEnvironmentManagedActionHistoryRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
describeEnvironmentManagedActionHistoryRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Elastic Beanstalk");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeEnvironmentManagedActionHistory");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeEnvironmentManagedActionHistory").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration)
.withInput(describeEnvironmentManagedActionHistoryRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DescribeEnvironmentManagedActionHistoryRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the DescribeEnvironmentManagedActions operation returned by the service.
* @throws ElasticBeanstalkServiceException
* A generic service exception has occurred.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws ElasticBeanstalkException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample ElasticBeanstalkClient.DescribeEnvironmentManagedActions
* @see AWS API Documentation
*/
@Override
public DescribeEnvironmentManagedActionsResponse describeEnvironmentManagedActions(
DescribeEnvironmentManagedActionsRequest describeEnvironmentManagedActionsRequest)
throws ElasticBeanstalkServiceException, AwsServiceException, SdkClientException, ElasticBeanstalkException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeEnvironmentManagedActionsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeEnvironmentManagedActionsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
describeEnvironmentManagedActionsRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Elastic Beanstalk");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeEnvironmentManagedActions");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeEnvironmentManagedActions").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(describeEnvironmentManagedActionsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DescribeEnvironmentManagedActionsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns AWS resources for this environment.
*
*
* @param describeEnvironmentResourcesRequest
* Request to describe the resources in an environment.
* @return Result of the DescribeEnvironmentResources operation returned by the service.
* @throws InsufficientPrivilegesException
* The specified account does not have sufficient privileges for one or more AWS services.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws ElasticBeanstalkException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample ElasticBeanstalkClient.DescribeEnvironmentResources
* @see AWS API Documentation
*/
@Override
public DescribeEnvironmentResourcesResponse describeEnvironmentResources(
DescribeEnvironmentResourcesRequest describeEnvironmentResourcesRequest) throws InsufficientPrivilegesException,
AwsServiceException, SdkClientException, ElasticBeanstalkException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeEnvironmentResourcesResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeEnvironmentResourcesRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, describeEnvironmentResourcesRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Elastic Beanstalk");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeEnvironmentResources");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeEnvironmentResources").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(describeEnvironmentResourcesRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DescribeEnvironmentResourcesRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns descriptions for existing environments.
*
*
* @param describeEnvironmentsRequest
* Request to describe one or more environments.
* @return Result of the DescribeEnvironments operation returned by the service.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws ElasticBeanstalkException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample ElasticBeanstalkClient.DescribeEnvironments
* @see AWS API Documentation
*/
@Override
public DescribeEnvironmentsResponse describeEnvironments(DescribeEnvironmentsRequest describeEnvironmentsRequest)
throws AwsServiceException, SdkClientException, ElasticBeanstalkException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeEnvironmentsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeEnvironmentsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, describeEnvironmentsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Elastic Beanstalk");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeEnvironments");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DescribeEnvironments").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(describeEnvironmentsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DescribeEnvironmentsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the DescribeEvents operation returned by the service.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws ElasticBeanstalkException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample ElasticBeanstalkClient.DescribeEvents
* @see AWS API Documentation
*/
@Override
public DescribeEventsResponse describeEvents(DescribeEventsRequest describeEventsRequest) throws AwsServiceException,
SdkClientException, ElasticBeanstalkException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeEventsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeEventsRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, describeEventsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Elastic Beanstalk");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeEvents");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DescribeEvents").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(describeEventsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DescribeEventsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the DescribeInstancesHealth operation returned by the service.
* @throws InvalidRequestException
* One or more input parameters is not valid. Please correct the input parameters and try the operation
* again.
* @throws ElasticBeanstalkServiceException
* A generic service exception has occurred.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws ElasticBeanstalkException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample ElasticBeanstalkClient.DescribeInstancesHealth
* @see AWS API Documentation
*/
@Override
public DescribeInstancesHealthResponse describeInstancesHealth(DescribeInstancesHealthRequest describeInstancesHealthRequest)
throws InvalidRequestException, ElasticBeanstalkServiceException, AwsServiceException, SdkClientException,
ElasticBeanstalkException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeInstancesHealthResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeInstancesHealthRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, describeInstancesHealthRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Elastic Beanstalk");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeInstancesHealth");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeInstancesHealth").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(describeInstancesHealthRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DescribeInstancesHealthRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Describes a platform version. Provides full details. Compare to ListPlatformVersions, which provides
* summary information about a list of platform versions.
*
*
* For definitions of platform version and other platform-related terms, see AWS Elastic Beanstalk
* Platforms Glossary.
*
*
* @param describePlatformVersionRequest
* @return Result of the DescribePlatformVersion operation returned by the service.
* @throws InsufficientPrivilegesException
* The specified account does not have sufficient privileges for one or more AWS services.
* @throws ElasticBeanstalkServiceException
* A generic service exception has occurred.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws ElasticBeanstalkException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample ElasticBeanstalkClient.DescribePlatformVersion
* @see AWS API Documentation
*/
@Override
public DescribePlatformVersionResponse describePlatformVersion(DescribePlatformVersionRequest describePlatformVersionRequest)
throws InsufficientPrivilegesException, ElasticBeanstalkServiceException, AwsServiceException, SdkClientException,
ElasticBeanstalkException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribePlatformVersionResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describePlatformVersionRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, describePlatformVersionRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Elastic Beanstalk");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribePlatformVersion");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribePlatformVersion").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(describePlatformVersionRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DescribePlatformVersionRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Disassociate the operations role from an environment. After this call is made, Elastic Beanstalk uses the
* caller's permissions for permissions to downstream services during subsequent calls acting on this environment.
* For more information, see Operations roles in the
* AWS Elastic Beanstalk Developer Guide.
*
*
* @param disassociateEnvironmentOperationsRoleRequest
* Request to disassociate the operations role from an environment.
* @return Result of the DisassociateEnvironmentOperationsRole operation returned by the service.
* @throws InsufficientPrivilegesException
* The specified account does not have sufficient privileges for one or more AWS services.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws ElasticBeanstalkException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample ElasticBeanstalkClient.DisassociateEnvironmentOperationsRole
* @see AWS API Documentation
*/
@Override
public DisassociateEnvironmentOperationsRoleResponse disassociateEnvironmentOperationsRole(
DisassociateEnvironmentOperationsRoleRequest disassociateEnvironmentOperationsRoleRequest)
throws InsufficientPrivilegesException, AwsServiceException, SdkClientException, ElasticBeanstalkException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DisassociateEnvironmentOperationsRoleResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(disassociateEnvironmentOperationsRoleRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
disassociateEnvironmentOperationsRoleRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Elastic Beanstalk");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DisassociateEnvironmentOperationsRole");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DisassociateEnvironmentOperationsRole").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration)
.withInput(disassociateEnvironmentOperationsRoleRequest).withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DisassociateEnvironmentOperationsRoleRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns a list of the available solution stack names, with the public version first and then in reverse
* chronological order.
*
*
* @param listAvailableSolutionStacksRequest
* @return Result of the ListAvailableSolutionStacks operation returned by the service.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws ElasticBeanstalkException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample ElasticBeanstalkClient.ListAvailableSolutionStacks
* @see AWS API Documentation
*/
@Override
public ListAvailableSolutionStacksResponse listAvailableSolutionStacks(
ListAvailableSolutionStacksRequest listAvailableSolutionStacksRequest) throws AwsServiceException,
SdkClientException, ElasticBeanstalkException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(ListAvailableSolutionStacksResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listAvailableSolutionStacksRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listAvailableSolutionStacksRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Elastic Beanstalk");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListAvailableSolutionStacks");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ListAvailableSolutionStacks").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(listAvailableSolutionStacksRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListAvailableSolutionStacksRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Lists the platform branches available for your account in an AWS Region. Provides summary information about each
* platform branch.
*
*
* For definitions of platform branch and other platform-related terms, see AWS Elastic Beanstalk
* Platforms Glossary.
*
*
* @param listPlatformBranchesRequest
* @return Result of the ListPlatformBranches operation returned by the service.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws ElasticBeanstalkException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample ElasticBeanstalkClient.ListPlatformBranches
* @see AWS API Documentation
*/
@Override
public ListPlatformBranchesResponse listPlatformBranches(ListPlatformBranchesRequest listPlatformBranchesRequest)
throws AwsServiceException, SdkClientException, ElasticBeanstalkException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(ListPlatformBranchesResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listPlatformBranchesRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listPlatformBranchesRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Elastic Beanstalk");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListPlatformBranches");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ListPlatformBranches").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(listPlatformBranchesRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListPlatformBranchesRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Lists the platform versions available for your account in an AWS Region. Provides summary information about each
* platform version. Compare to DescribePlatformVersion, which provides full details about a single platform
* version.
*
*
* For definitions of platform version and other platform-related terms, see AWS Elastic Beanstalk
* Platforms Glossary.
*
*
* @param listPlatformVersionsRequest
* @return Result of the ListPlatformVersions operation returned by the service.
* @throws InsufficientPrivilegesException
* The specified account does not have sufficient privileges for one or more AWS services.
* @throws ElasticBeanstalkServiceException
* A generic service exception has occurred.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws ElasticBeanstalkException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample ElasticBeanstalkClient.ListPlatformVersions
* @see AWS API Documentation
*/
@Override
public ListPlatformVersionsResponse listPlatformVersions(ListPlatformVersionsRequest listPlatformVersionsRequest)
throws InsufficientPrivilegesException, ElasticBeanstalkServiceException, AwsServiceException, SdkClientException,
ElasticBeanstalkException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(ListPlatformVersionsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listPlatformVersionsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listPlatformVersionsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Elastic Beanstalk");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListPlatformVersions");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ListPlatformVersions").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(listPlatformVersionsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListPlatformVersionsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Return the tags applied to an AWS Elastic Beanstalk resource. The response contains a list of tag key-value
* pairs.
*
*
* Elastic Beanstalk supports tagging of all of its resources. For details about resource tagging, see Tagging
* Application Resources.
*
*
* @param listTagsForResourceRequest
* @return Result of the ListTagsForResource operation returned by the service.
* @throws InsufficientPrivilegesException
* The specified account does not have sufficient privileges for one or more AWS services.
* @throws ResourceNotFoundException
* A resource doesn't exist for the specified Amazon Resource Name (ARN).
* @throws ResourceTypeNotSupportedException
* The type of the specified Amazon Resource Name (ARN) isn't supported for this operation.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws ElasticBeanstalkException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample ElasticBeanstalkClient.ListTagsForResource
* @see AWS API Documentation
*/
@Override
public ListTagsForResourceResponse listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest)
throws InsufficientPrivilegesException, ResourceNotFoundException, ResourceTypeNotSupportedException,
AwsServiceException, SdkClientException, ElasticBeanstalkException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(ListTagsForResourceResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listTagsForResourceRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listTagsForResourceRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Elastic Beanstalk");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListTagsForResource");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ListTagsForResource").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(listTagsForResourceRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListTagsForResourceRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the RebuildEnvironment operation returned by the service.
* @throws InsufficientPrivilegesException
* The specified account does not have sufficient privileges for one or more AWS services.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws ElasticBeanstalkException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample ElasticBeanstalkClient.RebuildEnvironment
* @see AWS API Documentation
*/
@Override
public RebuildEnvironmentResponse rebuildEnvironment(RebuildEnvironmentRequest rebuildEnvironmentRequest)
throws InsufficientPrivilegesException, AwsServiceException, SdkClientException, ElasticBeanstalkException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(RebuildEnvironmentResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(rebuildEnvironmentRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, rebuildEnvironmentRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Elastic Beanstalk");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "RebuildEnvironment");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("RebuildEnvironment").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(rebuildEnvironmentRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new RebuildEnvironmentRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the RequestEnvironmentInfo operation returned by the service.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws ElasticBeanstalkException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample ElasticBeanstalkClient.RequestEnvironmentInfo
* @see AWS API Documentation
*/
@Override
public RequestEnvironmentInfoResponse requestEnvironmentInfo(RequestEnvironmentInfoRequest requestEnvironmentInfoRequest)
throws AwsServiceException, SdkClientException, ElasticBeanstalkException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(RequestEnvironmentInfoResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(requestEnvironmentInfoRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, requestEnvironmentInfoRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Elastic Beanstalk");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "RequestEnvironmentInfo");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("RequestEnvironmentInfo").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(requestEnvironmentInfoRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new RequestEnvironmentInfoRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Causes the environment to restart the application container server running on each Amazon EC2 instance.
*
*
* @param restartAppServerRequest
* @return Result of the RestartAppServer operation returned by the service.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws ElasticBeanstalkException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample ElasticBeanstalkClient.RestartAppServer
* @see AWS API Documentation
*/
@Override
public RestartAppServerResponse restartAppServer(RestartAppServerRequest restartAppServerRequest) throws AwsServiceException,
SdkClientException, ElasticBeanstalkException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(RestartAppServerResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(restartAppServerRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, restartAppServerRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Elastic Beanstalk");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "RestartAppServer");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("RestartAppServer").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(restartAppServerRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new RestartAppServerRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Retrieves the compiled information from a RequestEnvironmentInfo request.
*
*
* Related Topics
*
*
* -
*
*
*
*
* @param retrieveEnvironmentInfoRequest
* Request to download logs retrieved with RequestEnvironmentInfo.
* @return Result of the RetrieveEnvironmentInfo operation returned by the service.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws ElasticBeanstalkException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample ElasticBeanstalkClient.RetrieveEnvironmentInfo
* @see AWS API Documentation
*/
@Override
public RetrieveEnvironmentInfoResponse retrieveEnvironmentInfo(RetrieveEnvironmentInfoRequest retrieveEnvironmentInfoRequest)
throws AwsServiceException, SdkClientException, ElasticBeanstalkException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(RetrieveEnvironmentInfoResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(retrieveEnvironmentInfoRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, retrieveEnvironmentInfoRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Elastic Beanstalk");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "RetrieveEnvironmentInfo");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("RetrieveEnvironmentInfo").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(retrieveEnvironmentInfoRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new RetrieveEnvironmentInfoRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Swaps the CNAMEs of two environments.
*
*
* @param swapEnvironmentCnamEsRequest
* Swaps the CNAMEs of two environments.
* @return Result of the SwapEnvironmentCNAMEs operation returned by the service.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws ElasticBeanstalkException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample ElasticBeanstalkClient.SwapEnvironmentCNAMEs
* @see AWS API Documentation
*/
@Override
public SwapEnvironmentCnamEsResponse swapEnvironmentCNAMEs(SwapEnvironmentCnamEsRequest swapEnvironmentCnamEsRequest)
throws AwsServiceException, SdkClientException, ElasticBeanstalkException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(SwapEnvironmentCnamEsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(swapEnvironmentCnamEsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, swapEnvironmentCnamEsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Elastic Beanstalk");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "SwapEnvironmentCNAMEs");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("SwapEnvironmentCNAMEs").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(swapEnvironmentCnamEsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new SwapEnvironmentCnamEsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Terminates the specified environment.
*
*
* @param terminateEnvironmentRequest
* Request to terminate an environment.
* @return Result of the TerminateEnvironment operation returned by the service.
* @throws InsufficientPrivilegesException
* The specified account does not have sufficient privileges for one or more AWS services.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws ElasticBeanstalkException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample ElasticBeanstalkClient.TerminateEnvironment
* @see AWS API Documentation
*/
@Override
public TerminateEnvironmentResponse terminateEnvironment(TerminateEnvironmentRequest terminateEnvironmentRequest)
throws InsufficientPrivilegesException, AwsServiceException, SdkClientException, ElasticBeanstalkException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(TerminateEnvironmentResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(terminateEnvironmentRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, terminateEnvironmentRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Elastic Beanstalk");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "TerminateEnvironment");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("TerminateEnvironment").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(terminateEnvironmentRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new TerminateEnvironmentRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the UpdateApplication operation returned by the service.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws ElasticBeanstalkException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample ElasticBeanstalkClient.UpdateApplication
* @see AWS API Documentation
*/
@Override
public UpdateApplicationResponse updateApplication(UpdateApplicationRequest updateApplicationRequest)
throws AwsServiceException, SdkClientException, ElasticBeanstalkException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(UpdateApplicationResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateApplicationRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, updateApplicationRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Elastic Beanstalk");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateApplication");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("UpdateApplication").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(updateApplicationRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new UpdateApplicationRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Modifies lifecycle settings for an application.
*
*
* @param updateApplicationResourceLifecycleRequest
* @return Result of the UpdateApplicationResourceLifecycle operation returned by the service.
* @throws InsufficientPrivilegesException
* The specified account does not have sufficient privileges for one or more AWS services.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws ElasticBeanstalkException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample ElasticBeanstalkClient.UpdateApplicationResourceLifecycle
* @see AWS API Documentation
*/
@Override
public UpdateApplicationResourceLifecycleResponse updateApplicationResourceLifecycle(
UpdateApplicationResourceLifecycleRequest updateApplicationResourceLifecycleRequest)
throws InsufficientPrivilegesException, AwsServiceException, SdkClientException, ElasticBeanstalkException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(UpdateApplicationResourceLifecycleResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateApplicationResourceLifecycleRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
updateApplicationResourceLifecycleRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Elastic Beanstalk");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateApplicationResourceLifecycle");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("UpdateApplicationResourceLifecycle").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(updateApplicationResourceLifecycleRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new UpdateApplicationResourceLifecycleRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the UpdateApplicationVersion operation returned by the service.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws ElasticBeanstalkException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample ElasticBeanstalkClient.UpdateApplicationVersion
* @see AWS API Documentation
*/
@Override
public UpdateApplicationVersionResponse updateApplicationVersion(
UpdateApplicationVersionRequest updateApplicationVersionRequest) throws AwsServiceException, SdkClientException,
ElasticBeanstalkException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(UpdateApplicationVersionResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateApplicationVersionRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, updateApplicationVersionRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Elastic Beanstalk");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateApplicationVersion");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("UpdateApplicationVersion").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(updateApplicationVersionRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new UpdateApplicationVersionRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the UpdateConfigurationTemplate operation returned by the service.
* @throws InsufficientPrivilegesException
* The specified account does not have sufficient privileges for one or more AWS services.
* @throws TooManyBucketsException
* The specified account has reached its limit of Amazon S3 buckets.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws ElasticBeanstalkException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample ElasticBeanstalkClient.UpdateConfigurationTemplate
* @see AWS API Documentation
*/
@Override
public UpdateConfigurationTemplateResponse updateConfigurationTemplate(
UpdateConfigurationTemplateRequest updateConfigurationTemplateRequest) throws InsufficientPrivilegesException,
TooManyBucketsException, AwsServiceException, SdkClientException, ElasticBeanstalkException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(UpdateConfigurationTemplateResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateConfigurationTemplateRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, updateConfigurationTemplateRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Elastic Beanstalk");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateConfigurationTemplate");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("UpdateConfigurationTemplate").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(updateConfigurationTemplateRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new UpdateConfigurationTemplateRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the UpdateEnvironment operation returned by the service.
* @throws InsufficientPrivilegesException
* The specified account does not have sufficient privileges for one or more AWS services.
* @throws TooManyBucketsException
* The specified account has reached its limit of Amazon S3 buckets.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws ElasticBeanstalkException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample ElasticBeanstalkClient.UpdateEnvironment
* @see AWS API Documentation
*/
@Override
public UpdateEnvironmentResponse updateEnvironment(UpdateEnvironmentRequest updateEnvironmentRequest)
throws InsufficientPrivilegesException, TooManyBucketsException, AwsServiceException, SdkClientException,
ElasticBeanstalkException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(UpdateEnvironmentResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateEnvironmentRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, updateEnvironmentRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Elastic Beanstalk");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateEnvironment");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("UpdateEnvironment").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(updateEnvironmentRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new UpdateEnvironmentRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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
.
*
*
* Elastic Beanstalk supports tagging of all of its resources. For details about resource tagging, see Tagging
* Application Resources.
*
*
* 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 Result of the UpdateTagsForResource operation returned by the service.
* @throws InsufficientPrivilegesException
* The specified account does not have sufficient privileges for one or more AWS services.
* @throws OperationInProgressException
* Unable to perform the specified operation because another operation that effects an element in this
* activity is already in progress.
* @throws 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.
* @throws ResourceNotFoundException
* A resource doesn't exist for the specified Amazon Resource Name (ARN).
* @throws ResourceTypeNotSupportedException
* The type of the specified Amazon Resource Name (ARN) isn't supported for this operation.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws ElasticBeanstalkException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample ElasticBeanstalkClient.UpdateTagsForResource
* @see AWS API Documentation
*/
@Override
public UpdateTagsForResourceResponse updateTagsForResource(UpdateTagsForResourceRequest updateTagsForResourceRequest)
throws InsufficientPrivilegesException, OperationInProgressException, TooManyTagsException,
ResourceNotFoundException, ResourceTypeNotSupportedException, AwsServiceException, SdkClientException,
ElasticBeanstalkException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(UpdateTagsForResourceResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateTagsForResourceRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, updateTagsForResourceRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Elastic Beanstalk");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateTagsForResource");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("UpdateTagsForResource").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(updateTagsForResourceRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new UpdateTagsForResourceRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the ValidateConfigurationSettings operation returned by the service.
* @throws InsufficientPrivilegesException
* The specified account does not have sufficient privileges for one or more AWS services.
* @throws TooManyBucketsException
* The specified account has reached its limit of Amazon S3 buckets.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws ElasticBeanstalkException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample ElasticBeanstalkClient.ValidateConfigurationSettings
* @see AWS API Documentation
*/
@Override
public ValidateConfigurationSettingsResponse validateConfigurationSettings(
ValidateConfigurationSettingsRequest validateConfigurationSettingsRequest) throws InsufficientPrivilegesException,
TooManyBucketsException, AwsServiceException, SdkClientException, ElasticBeanstalkException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(ValidateConfigurationSettingsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(validateConfigurationSettingsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
validateConfigurationSettingsRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Elastic Beanstalk");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ValidateConfigurationSettings");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ValidateConfigurationSettings").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(validateConfigurationSettingsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ValidateConfigurationSettingsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
* Create an instance of {@link ElasticBeanstalkWaiter} using this client.
*
* Waiters created via this method are managed by the SDK and resources will be released when the service client is
* closed.
*
* @return an instance of {@link ElasticBeanstalkWaiter}
*/
@Override
public ElasticBeanstalkWaiter waiter() {
return ElasticBeanstalkWaiter.builder().client(this).build();
}
@Override
public final String serviceName() {
return SERVICE_NAME;
}
private static List resolveMetricPublishers(SdkClientConfiguration clientConfiguration,
RequestOverrideConfiguration requestOverrideConfiguration) {
List publishers = null;
if (requestOverrideConfiguration != null) {
publishers = requestOverrideConfiguration.metricPublishers();
}
if (publishers == null || publishers.isEmpty()) {
publishers = clientConfiguration.option(SdkClientOption.METRIC_PUBLISHERS);
}
if (publishers == null) {
publishers = Collections.emptyList();
}
return publishers;
}
private SdkClientConfiguration updateSdkClientConfiguration(SdkRequest request, SdkClientConfiguration clientConfiguration) {
List plugins = request.overrideConfiguration().map(c -> c.plugins()).orElse(Collections.emptyList());
if (plugins.isEmpty()) {
return clientConfiguration;
}
SdkClientConfiguration.Builder configuration = clientConfiguration.toBuilder();
ElasticBeanstalkServiceClientConfigurationBuilder serviceConfigBuilder = new ElasticBeanstalkServiceClientConfigurationBuilder(
configuration);
for (SdkPlugin plugin : plugins) {
plugin.configureClient(serviceConfigBuilder);
}
return configuration.build();
}
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();
}
@Override
public final ElasticBeanstalkServiceClientConfiguration serviceClientConfiguration() {
return new ElasticBeanstalkServiceClientConfigurationBuilder(this.clientConfiguration.toBuilder()).build();
}
@Override
public void close() {
clientHandler.close();
}
}