com.amazonaws.services.ec2.AmazonEC2AsyncClient Maven / Gradle / Ivy
/*
* Copyright 2017-2022 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 com.amazonaws.services.ec2;
import static java.util.concurrent.Executors.newFixedThreadPool;
import javax.annotation.Generated;
import com.amazonaws.services.ec2.model.*;
import com.amazonaws.client.AwsAsyncClientParams;
import com.amazonaws.annotation.ThreadSafe;
import com.amazonaws.ClientConfiguration;
import com.amazonaws.auth.AWSCredentials;
import com.amazonaws.auth.AWSCredentialsProvider;
import java.util.concurrent.ExecutorService;
import com.amazonaws.auth.DefaultAWSCredentialsProviderChain;
/**
* Client for accessing Amazon EC2 asynchronously. Each asynchronous method will return a Java Future object
* representing the asynchronous operation; overloads which accept an {@code AsyncHandler} can be used to receive
* notification when an asynchronous operation completes.
*
* Amazon Elastic Compute Cloud
*
* Amazon Elastic Compute Cloud (Amazon EC2) provides secure and resizable computing capacity in the Amazon Web Services
* Cloud. Using Amazon EC2 eliminates the need to invest in hardware up front, so you can develop and deploy
* applications faster. Amazon Virtual Private Cloud (Amazon VPC) enables you to provision a logically isolated section
* of the Amazon Web Services Cloud where you can launch Amazon Web Services resources in a virtual network that you've
* defined. Amazon Elastic Block Store (Amazon EBS) provides block level storage volumes for use with EC2 instances. EBS
* volumes are highly available and reliable storage volumes that can be attached to any running instance and used like
* a hard drive.
*
*
* To learn more, see the following resources:
*
*
* -
*
* Amazon EC2: AmazonEC2 product page, Amazon EC2 documentation
*
*
* -
*
* Amazon EBS: Amazon EBS product page, Amazon EBS documentation
*
*
* -
*
* Amazon VPC: Amazon VPC product page, Amazon VPC documentation
*
*
* -
*
* Amazon Web Services VPN: Amazon Web Services VPN product page, Amazon Web Services VPN documentation
*
*
*
*/
@ThreadSafe
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AmazonEC2AsyncClient extends AmazonEC2Client implements AmazonEC2Async {
private static final int DEFAULT_THREAD_POOL_SIZE = 50;
private final java.util.concurrent.ExecutorService executorService;
/**
* Constructs a new asynchronous client to invoke service methods on Amazon EC2. A credentials provider chain will
* be used that searches for credentials in this order:
*
* - Environment Variables - AWS_ACCESS_KEY_ID and AWS_SECRET_KEY
* - Java System Properties - aws.accessKeyId and aws.secretKey
* - Credential profiles file at the default location (~/.aws/credentials) shared by all AWS SDKs and the AWS CLI
* - Instance profile credentials delivered through the Amazon EC2 metadata service
*
*
* Asynchronous methods are delegated to a fixed-size thread pool containing 50 threads (to match the default
* maximum number of concurrent connections to the service).
*
* @see com.amazonaws.auth.DefaultAWSCredentialsProviderChain
* @see java.util.concurrent.Executors#newFixedThreadPool(int)
* @deprecated use {@link AmazonEC2AsyncClientBuilder#defaultClient()}
*/
@Deprecated
public AmazonEC2AsyncClient() {
this(DefaultAWSCredentialsProviderChain.getInstance());
}
/**
* Constructs a new asynchronous client to invoke service methods on Amazon EC2. A credentials provider chain will
* be used that searches for credentials in this order:
*
* - Environment Variables - AWS_ACCESS_KEY_ID and AWS_SECRET_KEY
* - Java System Properties - aws.accessKeyId and aws.secretKey
* - Credential profiles file at the default location (~/.aws/credentials) shared by all AWS SDKs and the AWS CLI
* - Instance profile credentials delivered through the Amazon EC2 metadata service
*
*
* Asynchronous methods are delegated to a fixed-size thread pool containing a number of threads equal to the
* maximum number of concurrent connections configured via {@code ClientConfiguration.getMaxConnections()}.
*
* @param clientConfiguration
* The client configuration options controlling how this client connects to Amazon EC2 (ex: proxy settings,
* retry counts, etc).
*
* @see com.amazonaws.auth.DefaultAWSCredentialsProviderChain
* @see java.util.concurrent.Executors#newFixedThreadPool(int)
* @deprecated use {@link AmazonEC2AsyncClientBuilder#withClientConfiguration(ClientConfiguration)}
*/
@Deprecated
public AmazonEC2AsyncClient(ClientConfiguration clientConfiguration) {
this(DefaultAWSCredentialsProviderChain.getInstance(), clientConfiguration, newFixedThreadPool(clientConfiguration.getMaxConnections()));
}
/**
* Constructs a new asynchronous client to invoke service methods on Amazon EC2 using the specified AWS account
* credentials.
*
* Asynchronous methods are delegated to a fixed-size thread pool containing 50 threads (to match the default
* maximum number of concurrent connections to the service).
*
* @param awsCredentials
* The AWS credentials (access key ID and secret key) to use when authenticating with AWS services.
* @see java.util.concurrent.Executors#newFixedThreadPool(int)
* @deprecated use {@link AmazonEC2AsyncClientBuilder#withCredentials(AWSCredentialsProvider)}
*/
@Deprecated
public AmazonEC2AsyncClient(AWSCredentials awsCredentials) {
this(awsCredentials, newFixedThreadPool(DEFAULT_THREAD_POOL_SIZE));
}
/**
* Constructs a new asynchronous client to invoke service methods on Amazon EC2 using the specified AWS account
* credentials and executor service. Default client settings will be used.
*
* @param awsCredentials
* The AWS credentials (access key ID and secret key) to use when authenticating with AWS services.
* @param executorService
* The executor service by which all asynchronous requests will be executed.
* @deprecated use {@link AmazonEC2AsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and
* {@link AmazonEC2AsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)}
*/
@Deprecated
public AmazonEC2AsyncClient(AWSCredentials awsCredentials, ExecutorService executorService) {
this(awsCredentials, configFactory.getConfig(), executorService);
}
/**
* Constructs a new asynchronous client to invoke service methods on Amazon EC2 using the specified AWS account
* credentials, executor service, and client configuration options.
*
* @param awsCredentials
* The AWS credentials (access key ID and secret key) to use when authenticating with AWS services.
* @param clientConfiguration
* Client configuration options (ex: max retry limit, proxy settings, etc).
* @param executorService
* The executor service by which all asynchronous requests will be executed.
* @deprecated use {@link AmazonEC2AsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and
* {@link AmazonEC2AsyncClientBuilder#withClientConfiguration(ClientConfiguration)} and
* {@link AmazonEC2AsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)}
*/
@Deprecated
public AmazonEC2AsyncClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration, ExecutorService executorService) {
super(awsCredentials, clientConfiguration);
this.executorService = executorService;
}
/**
* Constructs a new asynchronous client to invoke service methods on Amazon EC2 using the specified AWS account
* credentials provider. Default client settings will be used.
*
* Asynchronous methods are delegated to a fixed-size thread pool containing 50 threads (to match the default
* maximum number of concurrent connections to the service).
*
* @param awsCredentialsProvider
* The AWS credentials provider which will provide credentials to authenticate requests with AWS services.
* @see java.util.concurrent.Executors#newFixedThreadPool(int)
* @deprecated use {@link AmazonEC2AsyncClientBuilder#withCredentials(AWSCredentialsProvider)}
*/
@Deprecated
public AmazonEC2AsyncClient(AWSCredentialsProvider awsCredentialsProvider) {
this(awsCredentialsProvider, newFixedThreadPool(DEFAULT_THREAD_POOL_SIZE));
}
/**
* Constructs a new asynchronous client to invoke service methods on Amazon EC2 using the provided AWS account
* credentials provider and client configuration options.
*
* Asynchronous methods are delegated to a fixed-size thread pool containing a number of threads equal to the
* maximum number of concurrent connections configured via {@code ClientConfiguration.getMaxConnections()}.
*
* @param awsCredentialsProvider
* The AWS credentials provider which will provide credentials to authenticate requests with AWS services.
* @param clientConfiguration
* Client configuration options (ex: max retry limit, proxy settings, etc).
*
* @see com.amazonaws.auth.DefaultAWSCredentialsProviderChain
* @see java.util.concurrent.Executors#newFixedThreadPool(int)
* @deprecated use {@link AmazonEC2AsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and
* {@link AmazonEC2AsyncClientBuilder#withClientConfiguration(ClientConfiguration)}
*/
@Deprecated
public AmazonEC2AsyncClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration) {
this(awsCredentialsProvider, clientConfiguration, newFixedThreadPool(clientConfiguration.getMaxConnections()));
}
/**
* Constructs a new asynchronous client to invoke service methods on Amazon EC2 using the specified AWS account
* credentials provider and executor service. Default client settings will be used.
*
* @param awsCredentialsProvider
* The AWS credentials provider which will provide credentials to authenticate requests with AWS services.
* @param executorService
* The executor service by which all asynchronous requests will be executed.
* @deprecated use {@link AmazonEC2AsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and
* {@link AmazonEC2AsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)}
*/
@Deprecated
public AmazonEC2AsyncClient(AWSCredentialsProvider awsCredentialsProvider, ExecutorService executorService) {
this(awsCredentialsProvider, configFactory.getConfig(), executorService);
}
/**
* Constructs a new asynchronous client to invoke service methods on Amazon EC2 using the specified AWS account
* credentials provider, executor service, and client configuration options.
*
* @param awsCredentialsProvider
* The AWS credentials provider which will provide credentials to authenticate requests with AWS services.
* @param clientConfiguration
* Client configuration options (ex: max retry limit, proxy settings, etc).
* @param executorService
* The executor service by which all asynchronous requests will be executed.
* @deprecated use {@link AmazonEC2AsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and
* {@link AmazonEC2AsyncClientBuilder#withClientConfiguration(ClientConfiguration)} and
* {@link AmazonEC2AsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)}
*/
@Deprecated
public AmazonEC2AsyncClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration, ExecutorService executorService) {
super(awsCredentialsProvider, clientConfiguration);
this.executorService = executorService;
}
public static AmazonEC2AsyncClientBuilder asyncBuilder() {
return AmazonEC2AsyncClientBuilder.standard();
}
/**
* Constructs a new asynchronous client to invoke service methods on Amazon EC2 using the specified parameters.
*
* @param asyncClientParams
* Object providing client parameters.
*/
AmazonEC2AsyncClient(AwsAsyncClientParams asyncClientParams) {
this(asyncClientParams, false);
}
/**
* Constructs a new asynchronous client to invoke service methods on Amazon EC2 using the specified parameters.
*
* @param asyncClientParams
* Object providing client parameters.
* @param endpointDiscoveryEnabled
* true will enable endpoint discovery if the service supports it.
*/
AmazonEC2AsyncClient(AwsAsyncClientParams asyncClientParams, boolean endpointDiscoveryEnabled) {
super(asyncClientParams, endpointDiscoveryEnabled);
this.executorService = asyncClientParams.getExecutor();
}
/**
* Returns the executor service used by this client to execute async requests.
*
* @return The executor service used by this client to execute async requests.
*/
public ExecutorService getExecutorService() {
return executorService;
}
@Override
public java.util.concurrent.Future acceptAddressTransferAsync(AcceptAddressTransferRequest request) {
return acceptAddressTransferAsync(request, null);
}
@Override
public java.util.concurrent.Future acceptAddressTransferAsync(final AcceptAddressTransferRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AcceptAddressTransferRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AcceptAddressTransferResult call() throws Exception {
AcceptAddressTransferResult result = null;
try {
result = executeAcceptAddressTransfer(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future acceptReservedInstancesExchangeQuoteAsync(
AcceptReservedInstancesExchangeQuoteRequest request) {
return acceptReservedInstancesExchangeQuoteAsync(request, null);
}
@Override
public java.util.concurrent.Future acceptReservedInstancesExchangeQuoteAsync(
final AcceptReservedInstancesExchangeQuoteRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AcceptReservedInstancesExchangeQuoteRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AcceptReservedInstancesExchangeQuoteResult call() throws Exception {
AcceptReservedInstancesExchangeQuoteResult result = null;
try {
result = executeAcceptReservedInstancesExchangeQuote(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future acceptTransitGatewayMulticastDomainAssociationsAsync(
AcceptTransitGatewayMulticastDomainAssociationsRequest request) {
return acceptTransitGatewayMulticastDomainAssociationsAsync(request, null);
}
@Override
public java.util.concurrent.Future acceptTransitGatewayMulticastDomainAssociationsAsync(
final AcceptTransitGatewayMulticastDomainAssociationsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AcceptTransitGatewayMulticastDomainAssociationsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AcceptTransitGatewayMulticastDomainAssociationsResult call() throws Exception {
AcceptTransitGatewayMulticastDomainAssociationsResult result = null;
try {
result = executeAcceptTransitGatewayMulticastDomainAssociations(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future acceptTransitGatewayPeeringAttachmentAsync(
AcceptTransitGatewayPeeringAttachmentRequest request) {
return acceptTransitGatewayPeeringAttachmentAsync(request, null);
}
@Override
public java.util.concurrent.Future acceptTransitGatewayPeeringAttachmentAsync(
final AcceptTransitGatewayPeeringAttachmentRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AcceptTransitGatewayPeeringAttachmentRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AcceptTransitGatewayPeeringAttachmentResult call() throws Exception {
AcceptTransitGatewayPeeringAttachmentResult result = null;
try {
result = executeAcceptTransitGatewayPeeringAttachment(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future acceptTransitGatewayVpcAttachmentAsync(
AcceptTransitGatewayVpcAttachmentRequest request) {
return acceptTransitGatewayVpcAttachmentAsync(request, null);
}
@Override
public java.util.concurrent.Future acceptTransitGatewayVpcAttachmentAsync(
final AcceptTransitGatewayVpcAttachmentRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AcceptTransitGatewayVpcAttachmentRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AcceptTransitGatewayVpcAttachmentResult call() throws Exception {
AcceptTransitGatewayVpcAttachmentResult result = null;
try {
result = executeAcceptTransitGatewayVpcAttachment(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future acceptVpcEndpointConnectionsAsync(AcceptVpcEndpointConnectionsRequest request) {
return acceptVpcEndpointConnectionsAsync(request, null);
}
@Override
public java.util.concurrent.Future acceptVpcEndpointConnectionsAsync(final AcceptVpcEndpointConnectionsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AcceptVpcEndpointConnectionsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AcceptVpcEndpointConnectionsResult call() throws Exception {
AcceptVpcEndpointConnectionsResult result = null;
try {
result = executeAcceptVpcEndpointConnections(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future acceptVpcPeeringConnectionAsync(AcceptVpcPeeringConnectionRequest request) {
return acceptVpcPeeringConnectionAsync(request, null);
}
@Override
public java.util.concurrent.Future acceptVpcPeeringConnectionAsync(final AcceptVpcPeeringConnectionRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AcceptVpcPeeringConnectionRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AcceptVpcPeeringConnectionResult call() throws Exception {
AcceptVpcPeeringConnectionResult result = null;
try {
result = executeAcceptVpcPeeringConnection(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
/**
* Simplified method form for invoking the AcceptVpcPeeringConnection operation.
*
* @see #acceptVpcPeeringConnectionAsync(AcceptVpcPeeringConnectionRequest)
*/
@Override
public java.util.concurrent.Future acceptVpcPeeringConnectionAsync() {
return acceptVpcPeeringConnectionAsync(new AcceptVpcPeeringConnectionRequest());
}
/**
* Simplified method form for invoking the AcceptVpcPeeringConnection operation with an AsyncHandler.
*
* @see #acceptVpcPeeringConnectionAsync(AcceptVpcPeeringConnectionRequest, com.amazonaws.handlers.AsyncHandler)
*/
@Override
public java.util.concurrent.Future acceptVpcPeeringConnectionAsync(
com.amazonaws.handlers.AsyncHandler asyncHandler) {
return acceptVpcPeeringConnectionAsync(new AcceptVpcPeeringConnectionRequest(), asyncHandler);
}
@Override
public java.util.concurrent.Future advertiseByoipCidrAsync(AdvertiseByoipCidrRequest request) {
return advertiseByoipCidrAsync(request, null);
}
@Override
public java.util.concurrent.Future advertiseByoipCidrAsync(final AdvertiseByoipCidrRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AdvertiseByoipCidrRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AdvertiseByoipCidrResult call() throws Exception {
AdvertiseByoipCidrResult result = null;
try {
result = executeAdvertiseByoipCidr(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future allocateAddressAsync(AllocateAddressRequest request) {
return allocateAddressAsync(request, null);
}
@Override
public java.util.concurrent.Future allocateAddressAsync(final AllocateAddressRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AllocateAddressRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AllocateAddressResult call() throws Exception {
AllocateAddressResult result = null;
try {
result = executeAllocateAddress(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
/**
* Simplified method form for invoking the AllocateAddress operation.
*
* @see #allocateAddressAsync(AllocateAddressRequest)
*/
@Override
public java.util.concurrent.Future allocateAddressAsync() {
return allocateAddressAsync(new AllocateAddressRequest());
}
/**
* Simplified method form for invoking the AllocateAddress operation with an AsyncHandler.
*
* @see #allocateAddressAsync(AllocateAddressRequest, com.amazonaws.handlers.AsyncHandler)
*/
@Override
public java.util.concurrent.Future allocateAddressAsync(
com.amazonaws.handlers.AsyncHandler asyncHandler) {
return allocateAddressAsync(new AllocateAddressRequest(), asyncHandler);
}
@Override
public java.util.concurrent.Future allocateHostsAsync(AllocateHostsRequest request) {
return allocateHostsAsync(request, null);
}
@Override
public java.util.concurrent.Future allocateHostsAsync(final AllocateHostsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AllocateHostsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AllocateHostsResult call() throws Exception {
AllocateHostsResult result = null;
try {
result = executeAllocateHosts(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future allocateIpamPoolCidrAsync(AllocateIpamPoolCidrRequest request) {
return allocateIpamPoolCidrAsync(request, null);
}
@Override
public java.util.concurrent.Future allocateIpamPoolCidrAsync(final AllocateIpamPoolCidrRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AllocateIpamPoolCidrRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AllocateIpamPoolCidrResult call() throws Exception {
AllocateIpamPoolCidrResult result = null;
try {
result = executeAllocateIpamPoolCidr(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future applySecurityGroupsToClientVpnTargetNetworkAsync(
ApplySecurityGroupsToClientVpnTargetNetworkRequest request) {
return applySecurityGroupsToClientVpnTargetNetworkAsync(request, null);
}
@Override
public java.util.concurrent.Future applySecurityGroupsToClientVpnTargetNetworkAsync(
final ApplySecurityGroupsToClientVpnTargetNetworkRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ApplySecurityGroupsToClientVpnTargetNetworkRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ApplySecurityGroupsToClientVpnTargetNetworkResult call() throws Exception {
ApplySecurityGroupsToClientVpnTargetNetworkResult result = null;
try {
result = executeApplySecurityGroupsToClientVpnTargetNetwork(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future assignIpv6AddressesAsync(AssignIpv6AddressesRequest request) {
return assignIpv6AddressesAsync(request, null);
}
@Override
public java.util.concurrent.Future assignIpv6AddressesAsync(final AssignIpv6AddressesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AssignIpv6AddressesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AssignIpv6AddressesResult call() throws Exception {
AssignIpv6AddressesResult result = null;
try {
result = executeAssignIpv6Addresses(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future assignPrivateIpAddressesAsync(AssignPrivateIpAddressesRequest request) {
return assignPrivateIpAddressesAsync(request, null);
}
@Override
public java.util.concurrent.Future assignPrivateIpAddressesAsync(final AssignPrivateIpAddressesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AssignPrivateIpAddressesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AssignPrivateIpAddressesResult call() throws Exception {
AssignPrivateIpAddressesResult result = null;
try {
result = executeAssignPrivateIpAddresses(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future associateAddressAsync(AssociateAddressRequest request) {
return associateAddressAsync(request, null);
}
@Override
public java.util.concurrent.Future associateAddressAsync(final AssociateAddressRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AssociateAddressRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AssociateAddressResult call() throws Exception {
AssociateAddressResult result = null;
try {
result = executeAssociateAddress(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future associateClientVpnTargetNetworkAsync(
AssociateClientVpnTargetNetworkRequest request) {
return associateClientVpnTargetNetworkAsync(request, null);
}
@Override
public java.util.concurrent.Future associateClientVpnTargetNetworkAsync(
final AssociateClientVpnTargetNetworkRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AssociateClientVpnTargetNetworkRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AssociateClientVpnTargetNetworkResult call() throws Exception {
AssociateClientVpnTargetNetworkResult result = null;
try {
result = executeAssociateClientVpnTargetNetwork(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future associateDhcpOptionsAsync(AssociateDhcpOptionsRequest request) {
return associateDhcpOptionsAsync(request, null);
}
@Override
public java.util.concurrent.Future associateDhcpOptionsAsync(final AssociateDhcpOptionsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AssociateDhcpOptionsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AssociateDhcpOptionsResult call() throws Exception {
AssociateDhcpOptionsResult result = null;
try {
result = executeAssociateDhcpOptions(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future associateEnclaveCertificateIamRoleAsync(
AssociateEnclaveCertificateIamRoleRequest request) {
return associateEnclaveCertificateIamRoleAsync(request, null);
}
@Override
public java.util.concurrent.Future associateEnclaveCertificateIamRoleAsync(
final AssociateEnclaveCertificateIamRoleRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AssociateEnclaveCertificateIamRoleRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AssociateEnclaveCertificateIamRoleResult call() throws Exception {
AssociateEnclaveCertificateIamRoleResult result = null;
try {
result = executeAssociateEnclaveCertificateIamRole(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future associateIamInstanceProfileAsync(AssociateIamInstanceProfileRequest request) {
return associateIamInstanceProfileAsync(request, null);
}
@Override
public java.util.concurrent.Future associateIamInstanceProfileAsync(final AssociateIamInstanceProfileRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AssociateIamInstanceProfileRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AssociateIamInstanceProfileResult call() throws Exception {
AssociateIamInstanceProfileResult result = null;
try {
result = executeAssociateIamInstanceProfile(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future associateInstanceEventWindowAsync(AssociateInstanceEventWindowRequest request) {
return associateInstanceEventWindowAsync(request, null);
}
@Override
public java.util.concurrent.Future associateInstanceEventWindowAsync(final AssociateInstanceEventWindowRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AssociateInstanceEventWindowRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AssociateInstanceEventWindowResult call() throws Exception {
AssociateInstanceEventWindowResult result = null;
try {
result = executeAssociateInstanceEventWindow(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future associateRouteTableAsync(AssociateRouteTableRequest request) {
return associateRouteTableAsync(request, null);
}
@Override
public java.util.concurrent.Future associateRouteTableAsync(final AssociateRouteTableRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AssociateRouteTableRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AssociateRouteTableResult call() throws Exception {
AssociateRouteTableResult result = null;
try {
result = executeAssociateRouteTable(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future associateSubnetCidrBlockAsync(AssociateSubnetCidrBlockRequest request) {
return associateSubnetCidrBlockAsync(request, null);
}
@Override
public java.util.concurrent.Future associateSubnetCidrBlockAsync(final AssociateSubnetCidrBlockRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AssociateSubnetCidrBlockRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AssociateSubnetCidrBlockResult call() throws Exception {
AssociateSubnetCidrBlockResult result = null;
try {
result = executeAssociateSubnetCidrBlock(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future associateTransitGatewayMulticastDomainAsync(
AssociateTransitGatewayMulticastDomainRequest request) {
return associateTransitGatewayMulticastDomainAsync(request, null);
}
@Override
public java.util.concurrent.Future associateTransitGatewayMulticastDomainAsync(
final AssociateTransitGatewayMulticastDomainRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AssociateTransitGatewayMulticastDomainRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AssociateTransitGatewayMulticastDomainResult call() throws Exception {
AssociateTransitGatewayMulticastDomainResult result = null;
try {
result = executeAssociateTransitGatewayMulticastDomain(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future associateTransitGatewayPolicyTableAsync(
AssociateTransitGatewayPolicyTableRequest request) {
return associateTransitGatewayPolicyTableAsync(request, null);
}
@Override
public java.util.concurrent.Future associateTransitGatewayPolicyTableAsync(
final AssociateTransitGatewayPolicyTableRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AssociateTransitGatewayPolicyTableRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AssociateTransitGatewayPolicyTableResult call() throws Exception {
AssociateTransitGatewayPolicyTableResult result = null;
try {
result = executeAssociateTransitGatewayPolicyTable(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future associateTransitGatewayRouteTableAsync(
AssociateTransitGatewayRouteTableRequest request) {
return associateTransitGatewayRouteTableAsync(request, null);
}
@Override
public java.util.concurrent.Future associateTransitGatewayRouteTableAsync(
final AssociateTransitGatewayRouteTableRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AssociateTransitGatewayRouteTableRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AssociateTransitGatewayRouteTableResult call() throws Exception {
AssociateTransitGatewayRouteTableResult result = null;
try {
result = executeAssociateTransitGatewayRouteTable(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future associateTrunkInterfaceAsync(AssociateTrunkInterfaceRequest request) {
return associateTrunkInterfaceAsync(request, null);
}
@Override
public java.util.concurrent.Future associateTrunkInterfaceAsync(final AssociateTrunkInterfaceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AssociateTrunkInterfaceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AssociateTrunkInterfaceResult call() throws Exception {
AssociateTrunkInterfaceResult result = null;
try {
result = executeAssociateTrunkInterface(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future associateVpcCidrBlockAsync(AssociateVpcCidrBlockRequest request) {
return associateVpcCidrBlockAsync(request, null);
}
@Override
public java.util.concurrent.Future associateVpcCidrBlockAsync(final AssociateVpcCidrBlockRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AssociateVpcCidrBlockRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AssociateVpcCidrBlockResult call() throws Exception {
AssociateVpcCidrBlockResult result = null;
try {
result = executeAssociateVpcCidrBlock(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future attachClassicLinkVpcAsync(AttachClassicLinkVpcRequest request) {
return attachClassicLinkVpcAsync(request, null);
}
@Override
public java.util.concurrent.Future attachClassicLinkVpcAsync(final AttachClassicLinkVpcRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AttachClassicLinkVpcRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AttachClassicLinkVpcResult call() throws Exception {
AttachClassicLinkVpcResult result = null;
try {
result = executeAttachClassicLinkVpc(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future attachInternetGatewayAsync(AttachInternetGatewayRequest request) {
return attachInternetGatewayAsync(request, null);
}
@Override
public java.util.concurrent.Future attachInternetGatewayAsync(final AttachInternetGatewayRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AttachInternetGatewayRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AttachInternetGatewayResult call() throws Exception {
AttachInternetGatewayResult result = null;
try {
result = executeAttachInternetGateway(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future attachNetworkInterfaceAsync(AttachNetworkInterfaceRequest request) {
return attachNetworkInterfaceAsync(request, null);
}
@Override
public java.util.concurrent.Future attachNetworkInterfaceAsync(final AttachNetworkInterfaceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AttachNetworkInterfaceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AttachNetworkInterfaceResult call() throws Exception {
AttachNetworkInterfaceResult result = null;
try {
result = executeAttachNetworkInterface(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future attachVerifiedAccessTrustProviderAsync(
AttachVerifiedAccessTrustProviderRequest request) {
return attachVerifiedAccessTrustProviderAsync(request, null);
}
@Override
public java.util.concurrent.Future attachVerifiedAccessTrustProviderAsync(
final AttachVerifiedAccessTrustProviderRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AttachVerifiedAccessTrustProviderRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AttachVerifiedAccessTrustProviderResult call() throws Exception {
AttachVerifiedAccessTrustProviderResult result = null;
try {
result = executeAttachVerifiedAccessTrustProvider(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future attachVolumeAsync(AttachVolumeRequest request) {
return attachVolumeAsync(request, null);
}
@Override
public java.util.concurrent.Future attachVolumeAsync(final AttachVolumeRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AttachVolumeRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AttachVolumeResult call() throws Exception {
AttachVolumeResult result = null;
try {
result = executeAttachVolume(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future attachVpnGatewayAsync(AttachVpnGatewayRequest request) {
return attachVpnGatewayAsync(request, null);
}
@Override
public java.util.concurrent.Future attachVpnGatewayAsync(final AttachVpnGatewayRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AttachVpnGatewayRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AttachVpnGatewayResult call() throws Exception {
AttachVpnGatewayResult result = null;
try {
result = executeAttachVpnGateway(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future authorizeClientVpnIngressAsync(AuthorizeClientVpnIngressRequest request) {
return authorizeClientVpnIngressAsync(request, null);
}
@Override
public java.util.concurrent.Future authorizeClientVpnIngressAsync(final AuthorizeClientVpnIngressRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AuthorizeClientVpnIngressRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AuthorizeClientVpnIngressResult call() throws Exception {
AuthorizeClientVpnIngressResult result = null;
try {
result = executeAuthorizeClientVpnIngress(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future authorizeSecurityGroupEgressAsync(AuthorizeSecurityGroupEgressRequest request) {
return authorizeSecurityGroupEgressAsync(request, null);
}
@Override
public java.util.concurrent.Future authorizeSecurityGroupEgressAsync(final AuthorizeSecurityGroupEgressRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AuthorizeSecurityGroupEgressRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AuthorizeSecurityGroupEgressResult call() throws Exception {
AuthorizeSecurityGroupEgressResult result = null;
try {
result = executeAuthorizeSecurityGroupEgress(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future authorizeSecurityGroupIngressAsync(AuthorizeSecurityGroupIngressRequest request) {
return authorizeSecurityGroupIngressAsync(request, null);
}
@Override
public java.util.concurrent.Future authorizeSecurityGroupIngressAsync(
final AuthorizeSecurityGroupIngressRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AuthorizeSecurityGroupIngressRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AuthorizeSecurityGroupIngressResult call() throws Exception {
AuthorizeSecurityGroupIngressResult result = null;
try {
result = executeAuthorizeSecurityGroupIngress(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future bundleInstanceAsync(BundleInstanceRequest request) {
return bundleInstanceAsync(request, null);
}
@Override
public java.util.concurrent.Future bundleInstanceAsync(final BundleInstanceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final BundleInstanceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public BundleInstanceResult call() throws Exception {
BundleInstanceResult result = null;
try {
result = executeBundleInstance(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future cancelBundleTaskAsync(CancelBundleTaskRequest request) {
return cancelBundleTaskAsync(request, null);
}
@Override
public java.util.concurrent.Future cancelBundleTaskAsync(final CancelBundleTaskRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CancelBundleTaskRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CancelBundleTaskResult call() throws Exception {
CancelBundleTaskResult result = null;
try {
result = executeCancelBundleTask(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future cancelCapacityReservationAsync(CancelCapacityReservationRequest request) {
return cancelCapacityReservationAsync(request, null);
}
@Override
public java.util.concurrent.Future cancelCapacityReservationAsync(final CancelCapacityReservationRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CancelCapacityReservationRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CancelCapacityReservationResult call() throws Exception {
CancelCapacityReservationResult result = null;
try {
result = executeCancelCapacityReservation(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future cancelCapacityReservationFleetsAsync(
CancelCapacityReservationFleetsRequest request) {
return cancelCapacityReservationFleetsAsync(request, null);
}
@Override
public java.util.concurrent.Future cancelCapacityReservationFleetsAsync(
final CancelCapacityReservationFleetsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CancelCapacityReservationFleetsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CancelCapacityReservationFleetsResult call() throws Exception {
CancelCapacityReservationFleetsResult result = null;
try {
result = executeCancelCapacityReservationFleets(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future cancelConversionTaskAsync(CancelConversionTaskRequest request) {
return cancelConversionTaskAsync(request, null);
}
@Override
public java.util.concurrent.Future cancelConversionTaskAsync(final CancelConversionTaskRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CancelConversionTaskRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CancelConversionTaskResult call() throws Exception {
CancelConversionTaskResult result = null;
try {
result = executeCancelConversionTask(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future cancelExportTaskAsync(CancelExportTaskRequest request) {
return cancelExportTaskAsync(request, null);
}
@Override
public java.util.concurrent.Future cancelExportTaskAsync(final CancelExportTaskRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CancelExportTaskRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CancelExportTaskResult call() throws Exception {
CancelExportTaskResult result = null;
try {
result = executeCancelExportTask(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future cancelImageLaunchPermissionAsync(CancelImageLaunchPermissionRequest request) {
return cancelImageLaunchPermissionAsync(request, null);
}
@Override
public java.util.concurrent.Future cancelImageLaunchPermissionAsync(final CancelImageLaunchPermissionRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CancelImageLaunchPermissionRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CancelImageLaunchPermissionResult call() throws Exception {
CancelImageLaunchPermissionResult result = null;
try {
result = executeCancelImageLaunchPermission(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future cancelImportTaskAsync(CancelImportTaskRequest request) {
return cancelImportTaskAsync(request, null);
}
@Override
public java.util.concurrent.Future cancelImportTaskAsync(final CancelImportTaskRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CancelImportTaskRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CancelImportTaskResult call() throws Exception {
CancelImportTaskResult result = null;
try {
result = executeCancelImportTask(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
/**
* Simplified method form for invoking the CancelImportTask operation.
*
* @see #cancelImportTaskAsync(CancelImportTaskRequest)
*/
@Override
public java.util.concurrent.Future cancelImportTaskAsync() {
return cancelImportTaskAsync(new CancelImportTaskRequest());
}
/**
* Simplified method form for invoking the CancelImportTask operation with an AsyncHandler.
*
* @see #cancelImportTaskAsync(CancelImportTaskRequest, com.amazonaws.handlers.AsyncHandler)
*/
@Override
public java.util.concurrent.Future cancelImportTaskAsync(
com.amazonaws.handlers.AsyncHandler asyncHandler) {
return cancelImportTaskAsync(new CancelImportTaskRequest(), asyncHandler);
}
@Override
public java.util.concurrent.Future cancelReservedInstancesListingAsync(CancelReservedInstancesListingRequest request) {
return cancelReservedInstancesListingAsync(request, null);
}
@Override
public java.util.concurrent.Future cancelReservedInstancesListingAsync(
final CancelReservedInstancesListingRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CancelReservedInstancesListingRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CancelReservedInstancesListingResult call() throws Exception {
CancelReservedInstancesListingResult result = null;
try {
result = executeCancelReservedInstancesListing(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future cancelSpotFleetRequestsAsync(CancelSpotFleetRequestsRequest request) {
return cancelSpotFleetRequestsAsync(request, null);
}
@Override
public java.util.concurrent.Future cancelSpotFleetRequestsAsync(final CancelSpotFleetRequestsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CancelSpotFleetRequestsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CancelSpotFleetRequestsResult call() throws Exception {
CancelSpotFleetRequestsResult result = null;
try {
result = executeCancelSpotFleetRequests(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future cancelSpotInstanceRequestsAsync(CancelSpotInstanceRequestsRequest request) {
return cancelSpotInstanceRequestsAsync(request, null);
}
@Override
public java.util.concurrent.Future cancelSpotInstanceRequestsAsync(final CancelSpotInstanceRequestsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CancelSpotInstanceRequestsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CancelSpotInstanceRequestsResult call() throws Exception {
CancelSpotInstanceRequestsResult result = null;
try {
result = executeCancelSpotInstanceRequests(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future confirmProductInstanceAsync(ConfirmProductInstanceRequest request) {
return confirmProductInstanceAsync(request, null);
}
@Override
public java.util.concurrent.Future confirmProductInstanceAsync(final ConfirmProductInstanceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ConfirmProductInstanceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ConfirmProductInstanceResult call() throws Exception {
ConfirmProductInstanceResult result = null;
try {
result = executeConfirmProductInstance(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future copyFpgaImageAsync(CopyFpgaImageRequest request) {
return copyFpgaImageAsync(request, null);
}
@Override
public java.util.concurrent.Future copyFpgaImageAsync(final CopyFpgaImageRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CopyFpgaImageRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CopyFpgaImageResult call() throws Exception {
CopyFpgaImageResult result = null;
try {
result = executeCopyFpgaImage(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future copyImageAsync(CopyImageRequest request) {
return copyImageAsync(request, null);
}
@Override
public java.util.concurrent.Future copyImageAsync(final CopyImageRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CopyImageRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CopyImageResult call() throws Exception {
CopyImageResult result = null;
try {
result = executeCopyImage(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future copySnapshotAsync(CopySnapshotRequest request) {
return copySnapshotAsync(request, null);
}
@Override
public java.util.concurrent.Future copySnapshotAsync(final CopySnapshotRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CopySnapshotRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CopySnapshotResult call() throws Exception {
CopySnapshotResult result = null;
try {
result = executeCopySnapshot(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future createCapacityReservationAsync(CreateCapacityReservationRequest request) {
return createCapacityReservationAsync(request, null);
}
@Override
public java.util.concurrent.Future createCapacityReservationAsync(final CreateCapacityReservationRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateCapacityReservationRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateCapacityReservationResult call() throws Exception {
CreateCapacityReservationResult result = null;
try {
result = executeCreateCapacityReservation(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future createCapacityReservationFleetAsync(CreateCapacityReservationFleetRequest request) {
return createCapacityReservationFleetAsync(request, null);
}
@Override
public java.util.concurrent.Future createCapacityReservationFleetAsync(
final CreateCapacityReservationFleetRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateCapacityReservationFleetRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateCapacityReservationFleetResult call() throws Exception {
CreateCapacityReservationFleetResult result = null;
try {
result = executeCreateCapacityReservationFleet(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future createCarrierGatewayAsync(CreateCarrierGatewayRequest request) {
return createCarrierGatewayAsync(request, null);
}
@Override
public java.util.concurrent.Future createCarrierGatewayAsync(final CreateCarrierGatewayRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateCarrierGatewayRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateCarrierGatewayResult call() throws Exception {
CreateCarrierGatewayResult result = null;
try {
result = executeCreateCarrierGateway(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future createClientVpnEndpointAsync(CreateClientVpnEndpointRequest request) {
return createClientVpnEndpointAsync(request, null);
}
@Override
public java.util.concurrent.Future createClientVpnEndpointAsync(final CreateClientVpnEndpointRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateClientVpnEndpointRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateClientVpnEndpointResult call() throws Exception {
CreateClientVpnEndpointResult result = null;
try {
result = executeCreateClientVpnEndpoint(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future createClientVpnRouteAsync(CreateClientVpnRouteRequest request) {
return createClientVpnRouteAsync(request, null);
}
@Override
public java.util.concurrent.Future createClientVpnRouteAsync(final CreateClientVpnRouteRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateClientVpnRouteRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateClientVpnRouteResult call() throws Exception {
CreateClientVpnRouteResult result = null;
try {
result = executeCreateClientVpnRoute(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future createCoipCidrAsync(CreateCoipCidrRequest request) {
return createCoipCidrAsync(request, null);
}
@Override
public java.util.concurrent.Future createCoipCidrAsync(final CreateCoipCidrRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateCoipCidrRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateCoipCidrResult call() throws Exception {
CreateCoipCidrResult result = null;
try {
result = executeCreateCoipCidr(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future createCoipPoolAsync(CreateCoipPoolRequest request) {
return createCoipPoolAsync(request, null);
}
@Override
public java.util.concurrent.Future createCoipPoolAsync(final CreateCoipPoolRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateCoipPoolRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateCoipPoolResult call() throws Exception {
CreateCoipPoolResult result = null;
try {
result = executeCreateCoipPool(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future createCustomerGatewayAsync(CreateCustomerGatewayRequest request) {
return createCustomerGatewayAsync(request, null);
}
@Override
public java.util.concurrent.Future createCustomerGatewayAsync(final CreateCustomerGatewayRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateCustomerGatewayRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateCustomerGatewayResult call() throws Exception {
CreateCustomerGatewayResult result = null;
try {
result = executeCreateCustomerGateway(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future createDefaultSubnetAsync(CreateDefaultSubnetRequest request) {
return createDefaultSubnetAsync(request, null);
}
@Override
public java.util.concurrent.Future createDefaultSubnetAsync(final CreateDefaultSubnetRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateDefaultSubnetRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateDefaultSubnetResult call() throws Exception {
CreateDefaultSubnetResult result = null;
try {
result = executeCreateDefaultSubnet(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
public java.util.concurrent.Future createDefaultVpcAsync(CreateDefaultVpcRequest request) {
return createDefaultVpcAsync(request, null);
}
@Override
public java.util.concurrent.Future