com.amazonaws.services.securityhub.AWSSecurityHubAsyncClient Maven / Gradle / Ivy
Show all versions of aws-java-sdk-securityhub Show documentation
/*
* Copyright 2019-2024 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.securityhub;
import javax.annotation.Generated;
import com.amazonaws.services.securityhub.model.*;
import com.amazonaws.client.AwsAsyncClientParams;
import com.amazonaws.annotation.ThreadSafe;
import java.util.concurrent.ExecutorService;
/**
* Client for accessing AWS SecurityHub 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.
*
*
* Security Hub provides you with a comprehensive view of your security state in Amazon Web Services and helps you
* assess your Amazon Web Services environment against security industry standards and best practices.
*
*
* Security Hub collects security data across Amazon Web Services accounts, Amazon Web Services, and supported
* third-party products and helps you analyze your security trends and identify the highest priority security issues.
*
*
* To help you manage the security state of your organization, Security Hub supports multiple security standards. These
* include the Amazon Web Services Foundational Security Best Practices (FSBP) standard developed by Amazon Web
* Services, and external compliance frameworks such as the Center for Internet Security (CIS), the Payment Card
* Industry Data Security Standard (PCI DSS), and the National Institute of Standards and Technology (NIST). Each
* standard includes several security controls, each of which represents a security best practice. Security Hub runs
* checks against security controls and generates control findings to help you assess your compliance against security
* best practices.
*
*
* In addition to generating control findings, Security Hub also receives findings from other Amazon Web Services, such
* as Amazon GuardDuty and Amazon Inspector, and supported third-party products. This gives you a single pane of glass
* into a variety of security-related issues. You can also send Security Hub findings to other Amazon Web Services and
* supported third-party products.
*
*
* Security Hub offers automation features that help you triage and remediate security issues. For example, you can use
* automation rules to automatically update critical findings when a security check fails. You can also leverage the
* integration with Amazon EventBridge to trigger automatic responses to specific findings.
*
*
* This guide, the Security Hub API Reference, provides information about the Security Hub API. This includes
* supported resources, HTTP methods, parameters, and schemas. If you're new to Security Hub, you might find it helpful
* to also review the
* Security Hub User Guide . The user guide explains key concepts and provides procedures that demonstrate
* how to use Security Hub features. It also provides information about topics such as integrating Security Hub with
* other Amazon Web Services.
*
*
* In addition to interacting with Security Hub by making calls to the Security Hub API, you can use a current version
* of an Amazon Web Services command line tool or SDK. Amazon Web Services provides tools and SDKs that consist of
* libraries and sample code for various languages and platforms, such as PowerShell, Java, Go, Python, C++, and .NET.
* These tools and SDKs provide convenient, programmatic access to Security Hub and other Amazon Web Services . They
* also handle tasks such as signing requests, managing errors, and retrying requests automatically. For information
* about installing and using the Amazon Web Services tools and SDKs, see Tools to Build on Amazon Web Services.
*
*
* With the exception of operations that are related to central configuration, Security Hub API requests are executed
* only in the Amazon Web Services Region that is currently active or in the specific Amazon Web Services Region that
* you specify in your request. Any configuration or settings change that results from the operation is applied only to
* that Region. To make the same change in other Regions, call the same API operation in each Region in which you want
* to apply the change. When you use central configuration, API requests for enabling Security Hub, standards, and
* controls are executed in the home Region and all linked Regions. For a list of central configuration operations, see
* the Central configuration terms and concepts section of the Security Hub User Guide.
*
*
* The following throttling limits apply to Security Hub API operations.
*
*
* -
*
* BatchEnableStandards
- RateLimit
of 1 request per second. BurstLimit
of 1
* request per second.
*
*
* -
*
* GetFindings
- RateLimit
of 3 requests per second. BurstLimit
of 6 requests per
* second.
*
*
* -
*
* BatchImportFindings
- RateLimit
of 10 requests per second. BurstLimit
of 30
* requests per second.
*
*
* -
*
* BatchUpdateFindings
- RateLimit
of 10 requests per second. BurstLimit
of 30
* requests per second.
*
*
* -
*
* UpdateStandardsControl
- RateLimit
of 1 request per second. BurstLimit
of 5
* requests per second.
*
*
* -
*
* All other operations - RateLimit
of 10 requests per second. BurstLimit
of 30 requests per
* second.
*
*
*
*/
@ThreadSafe
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AWSSecurityHubAsyncClient extends AWSSecurityHubClient implements AWSSecurityHubAsync {
private static final int DEFAULT_THREAD_POOL_SIZE = 50;
private final java.util.concurrent.ExecutorService executorService;
public static AWSSecurityHubAsyncClientBuilder asyncBuilder() {
return AWSSecurityHubAsyncClientBuilder.standard();
}
/**
* Constructs a new asynchronous client to invoke service methods on AWS SecurityHub using the specified parameters.
*
* @param asyncClientParams
* Object providing client parameters.
*/
AWSSecurityHubAsyncClient(AwsAsyncClientParams asyncClientParams) {
this(asyncClientParams, false);
}
/**
* Constructs a new asynchronous client to invoke service methods on AWS SecurityHub using the specified parameters.
*
* @param asyncClientParams
* Object providing client parameters.
* @param endpointDiscoveryEnabled
* true will enable endpoint discovery if the service supports it.
*/
AWSSecurityHubAsyncClient(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 acceptAdministratorInvitationAsync(AcceptAdministratorInvitationRequest request) {
return acceptAdministratorInvitationAsync(request, null);
}
@Override
public java.util.concurrent.Future acceptAdministratorInvitationAsync(
final AcceptAdministratorInvitationRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AcceptAdministratorInvitationRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AcceptAdministratorInvitationResult call() throws Exception {
AcceptAdministratorInvitationResult result = null;
try {
result = executeAcceptAdministratorInvitation(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
@Deprecated
public java.util.concurrent.Future acceptInvitationAsync(AcceptInvitationRequest request) {
return acceptInvitationAsync(request, null);
}
@Override
@Deprecated
public java.util.concurrent.Future acceptInvitationAsync(final AcceptInvitationRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AcceptInvitationRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AcceptInvitationResult call() throws Exception {
AcceptInvitationResult result = null;
try {
result = executeAcceptInvitation(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 batchDeleteAutomationRulesAsync(BatchDeleteAutomationRulesRequest request) {
return batchDeleteAutomationRulesAsync(request, null);
}
@Override
public java.util.concurrent.Future batchDeleteAutomationRulesAsync(final BatchDeleteAutomationRulesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final BatchDeleteAutomationRulesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public BatchDeleteAutomationRulesResult call() throws Exception {
BatchDeleteAutomationRulesResult result = null;
try {
result = executeBatchDeleteAutomationRules(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 batchDisableStandardsAsync(BatchDisableStandardsRequest request) {
return batchDisableStandardsAsync(request, null);
}
@Override
public java.util.concurrent.Future batchDisableStandardsAsync(final BatchDisableStandardsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final BatchDisableStandardsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public BatchDisableStandardsResult call() throws Exception {
BatchDisableStandardsResult result = null;
try {
result = executeBatchDisableStandards(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 batchEnableStandardsAsync(BatchEnableStandardsRequest request) {
return batchEnableStandardsAsync(request, null);
}
@Override
public java.util.concurrent.Future batchEnableStandardsAsync(final BatchEnableStandardsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final BatchEnableStandardsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public BatchEnableStandardsResult call() throws Exception {
BatchEnableStandardsResult result = null;
try {
result = executeBatchEnableStandards(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 batchGetAutomationRulesAsync(BatchGetAutomationRulesRequest request) {
return batchGetAutomationRulesAsync(request, null);
}
@Override
public java.util.concurrent.Future batchGetAutomationRulesAsync(final BatchGetAutomationRulesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final BatchGetAutomationRulesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public BatchGetAutomationRulesResult call() throws Exception {
BatchGetAutomationRulesResult result = null;
try {
result = executeBatchGetAutomationRules(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 batchGetConfigurationPolicyAssociationsAsync(
BatchGetConfigurationPolicyAssociationsRequest request) {
return batchGetConfigurationPolicyAssociationsAsync(request, null);
}
@Override
public java.util.concurrent.Future batchGetConfigurationPolicyAssociationsAsync(
final BatchGetConfigurationPolicyAssociationsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final BatchGetConfigurationPolicyAssociationsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public BatchGetConfigurationPolicyAssociationsResult call() throws Exception {
BatchGetConfigurationPolicyAssociationsResult result = null;
try {
result = executeBatchGetConfigurationPolicyAssociations(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 batchGetSecurityControlsAsync(BatchGetSecurityControlsRequest request) {
return batchGetSecurityControlsAsync(request, null);
}
@Override
public java.util.concurrent.Future batchGetSecurityControlsAsync(final BatchGetSecurityControlsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final BatchGetSecurityControlsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public BatchGetSecurityControlsResult call() throws Exception {
BatchGetSecurityControlsResult result = null;
try {
result = executeBatchGetSecurityControls(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 batchGetStandardsControlAssociationsAsync(
BatchGetStandardsControlAssociationsRequest request) {
return batchGetStandardsControlAssociationsAsync(request, null);
}
@Override
public java.util.concurrent.Future batchGetStandardsControlAssociationsAsync(
final BatchGetStandardsControlAssociationsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final BatchGetStandardsControlAssociationsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public BatchGetStandardsControlAssociationsResult call() throws Exception {
BatchGetStandardsControlAssociationsResult result = null;
try {
result = executeBatchGetStandardsControlAssociations(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 batchImportFindingsAsync(BatchImportFindingsRequest request) {
return batchImportFindingsAsync(request, null);
}
@Override
public java.util.concurrent.Future batchImportFindingsAsync(final BatchImportFindingsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final BatchImportFindingsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public BatchImportFindingsResult call() throws Exception {
BatchImportFindingsResult result = null;
try {
result = executeBatchImportFindings(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 batchUpdateAutomationRulesAsync(BatchUpdateAutomationRulesRequest request) {
return batchUpdateAutomationRulesAsync(request, null);
}
@Override
public java.util.concurrent.Future batchUpdateAutomationRulesAsync(final BatchUpdateAutomationRulesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final BatchUpdateAutomationRulesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public BatchUpdateAutomationRulesResult call() throws Exception {
BatchUpdateAutomationRulesResult result = null;
try {
result = executeBatchUpdateAutomationRules(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 batchUpdateFindingsAsync(BatchUpdateFindingsRequest request) {
return batchUpdateFindingsAsync(request, null);
}
@Override
public java.util.concurrent.Future batchUpdateFindingsAsync(final BatchUpdateFindingsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final BatchUpdateFindingsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public BatchUpdateFindingsResult call() throws Exception {
BatchUpdateFindingsResult result = null;
try {
result = executeBatchUpdateFindings(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 batchUpdateStandardsControlAssociationsAsync(
BatchUpdateStandardsControlAssociationsRequest request) {
return batchUpdateStandardsControlAssociationsAsync(request, null);
}
@Override
public java.util.concurrent.Future batchUpdateStandardsControlAssociationsAsync(
final BatchUpdateStandardsControlAssociationsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final BatchUpdateStandardsControlAssociationsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public BatchUpdateStandardsControlAssociationsResult call() throws Exception {
BatchUpdateStandardsControlAssociationsResult result = null;
try {
result = executeBatchUpdateStandardsControlAssociations(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 createActionTargetAsync(CreateActionTargetRequest request) {
return createActionTargetAsync(request, null);
}
@Override
public java.util.concurrent.Future createActionTargetAsync(final CreateActionTargetRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateActionTargetRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateActionTargetResult call() throws Exception {
CreateActionTargetResult result = null;
try {
result = executeCreateActionTarget(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 createAutomationRuleAsync(CreateAutomationRuleRequest request) {
return createAutomationRuleAsync(request, null);
}
@Override
public java.util.concurrent.Future createAutomationRuleAsync(final CreateAutomationRuleRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateAutomationRuleRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateAutomationRuleResult call() throws Exception {
CreateAutomationRuleResult result = null;
try {
result = executeCreateAutomationRule(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 createConfigurationPolicyAsync(CreateConfigurationPolicyRequest request) {
return createConfigurationPolicyAsync(request, null);
}
@Override
public java.util.concurrent.Future createConfigurationPolicyAsync(final CreateConfigurationPolicyRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateConfigurationPolicyRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateConfigurationPolicyResult call() throws Exception {
CreateConfigurationPolicyResult result = null;
try {
result = executeCreateConfigurationPolicy(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 createFindingAggregatorAsync(CreateFindingAggregatorRequest request) {
return createFindingAggregatorAsync(request, null);
}
@Override
public java.util.concurrent.Future createFindingAggregatorAsync(final CreateFindingAggregatorRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateFindingAggregatorRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateFindingAggregatorResult call() throws Exception {
CreateFindingAggregatorResult result = null;
try {
result = executeCreateFindingAggregator(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 createInsightAsync(CreateInsightRequest request) {
return createInsightAsync(request, null);
}
@Override
public java.util.concurrent.Future createInsightAsync(final CreateInsightRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateInsightRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateInsightResult call() throws Exception {
CreateInsightResult result = null;
try {
result = executeCreateInsight(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 createMembersAsync(CreateMembersRequest request) {
return createMembersAsync(request, null);
}
@Override
public java.util.concurrent.Future createMembersAsync(final CreateMembersRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateMembersRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateMembersResult call() throws Exception {
CreateMembersResult result = null;
try {
result = executeCreateMembers(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 declineInvitationsAsync(DeclineInvitationsRequest request) {
return declineInvitationsAsync(request, null);
}
@Override
public java.util.concurrent.Future declineInvitationsAsync(final DeclineInvitationsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeclineInvitationsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeclineInvitationsResult call() throws Exception {
DeclineInvitationsResult result = null;
try {
result = executeDeclineInvitations(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 deleteActionTargetAsync(DeleteActionTargetRequest request) {
return deleteActionTargetAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteActionTargetAsync(final DeleteActionTargetRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteActionTargetRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteActionTargetResult call() throws Exception {
DeleteActionTargetResult result = null;
try {
result = executeDeleteActionTarget(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 deleteConfigurationPolicyAsync(DeleteConfigurationPolicyRequest request) {
return deleteConfigurationPolicyAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteConfigurationPolicyAsync(final DeleteConfigurationPolicyRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteConfigurationPolicyRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteConfigurationPolicyResult call() throws Exception {
DeleteConfigurationPolicyResult result = null;
try {
result = executeDeleteConfigurationPolicy(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 deleteFindingAggregatorAsync(DeleteFindingAggregatorRequest request) {
return deleteFindingAggregatorAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteFindingAggregatorAsync(final DeleteFindingAggregatorRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteFindingAggregatorRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteFindingAggregatorResult call() throws Exception {
DeleteFindingAggregatorResult result = null;
try {
result = executeDeleteFindingAggregator(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 deleteInsightAsync(DeleteInsightRequest request) {
return deleteInsightAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteInsightAsync(final DeleteInsightRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteInsightRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteInsightResult call() throws Exception {
DeleteInsightResult result = null;
try {
result = executeDeleteInsight(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 deleteInvitationsAsync(DeleteInvitationsRequest request) {
return deleteInvitationsAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteInvitationsAsync(final DeleteInvitationsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteInvitationsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteInvitationsResult call() throws Exception {
DeleteInvitationsResult result = null;
try {
result = executeDeleteInvitations(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 deleteMembersAsync(DeleteMembersRequest request) {
return deleteMembersAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteMembersAsync(final DeleteMembersRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteMembersRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteMembersResult call() throws Exception {
DeleteMembersResult result = null;
try {
result = executeDeleteMembers(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 describeActionTargetsAsync(DescribeActionTargetsRequest request) {
return describeActionTargetsAsync(request, null);
}
@Override
public java.util.concurrent.Future describeActionTargetsAsync(final DescribeActionTargetsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeActionTargetsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeActionTargetsResult call() throws Exception {
DescribeActionTargetsResult result = null;
try {
result = executeDescribeActionTargets(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 describeHubAsync(DescribeHubRequest request) {
return describeHubAsync(request, null);
}
@Override
public java.util.concurrent.Future describeHubAsync(final DescribeHubRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeHubRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeHubResult call() throws Exception {
DescribeHubResult result = null;
try {
result = executeDescribeHub(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 describeOrganizationConfigurationAsync(
DescribeOrganizationConfigurationRequest request) {
return describeOrganizationConfigurationAsync(request, null);
}
@Override
public java.util.concurrent.Future describeOrganizationConfigurationAsync(
final DescribeOrganizationConfigurationRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeOrganizationConfigurationRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeOrganizationConfigurationResult call() throws Exception {
DescribeOrganizationConfigurationResult result = null;
try {
result = executeDescribeOrganizationConfiguration(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 describeProductsAsync(DescribeProductsRequest request) {
return describeProductsAsync(request, null);
}
@Override
public java.util.concurrent.Future describeProductsAsync(final DescribeProductsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeProductsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeProductsResult call() throws Exception {
DescribeProductsResult result = null;
try {
result = executeDescribeProducts(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 describeStandardsAsync(DescribeStandardsRequest request) {
return describeStandardsAsync(request, null);
}
@Override
public java.util.concurrent.Future describeStandardsAsync(final DescribeStandardsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeStandardsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeStandardsResult call() throws Exception {
DescribeStandardsResult result = null;
try {
result = executeDescribeStandards(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 describeStandardsControlsAsync(DescribeStandardsControlsRequest request) {
return describeStandardsControlsAsync(request, null);
}
@Override
public java.util.concurrent.Future describeStandardsControlsAsync(final DescribeStandardsControlsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeStandardsControlsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeStandardsControlsResult call() throws Exception {
DescribeStandardsControlsResult result = null;
try {
result = executeDescribeStandardsControls(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 disableImportFindingsForProductAsync(
DisableImportFindingsForProductRequest request) {
return disableImportFindingsForProductAsync(request, null);
}
@Override
public java.util.concurrent.Future disableImportFindingsForProductAsync(
final DisableImportFindingsForProductRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DisableImportFindingsForProductRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DisableImportFindingsForProductResult call() throws Exception {
DisableImportFindingsForProductResult result = null;
try {
result = executeDisableImportFindingsForProduct(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 disableOrganizationAdminAccountAsync(
DisableOrganizationAdminAccountRequest request) {
return disableOrganizationAdminAccountAsync(request, null);
}
@Override
public java.util.concurrent.Future disableOrganizationAdminAccountAsync(
final DisableOrganizationAdminAccountRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DisableOrganizationAdminAccountRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DisableOrganizationAdminAccountResult call() throws Exception {
DisableOrganizationAdminAccountResult result = null;
try {
result = executeDisableOrganizationAdminAccount(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 disableSecurityHubAsync(DisableSecurityHubRequest request) {
return disableSecurityHubAsync(request, null);
}
@Override
public java.util.concurrent.Future disableSecurityHubAsync(final DisableSecurityHubRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DisableSecurityHubRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DisableSecurityHubResult call() throws Exception {
DisableSecurityHubResult result = null;
try {
result = executeDisableSecurityHub(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 disassociateFromAdministratorAccountAsync(
DisassociateFromAdministratorAccountRequest request) {
return disassociateFromAdministratorAccountAsync(request, null);
}
@Override
public java.util.concurrent.Future disassociateFromAdministratorAccountAsync(
final DisassociateFromAdministratorAccountRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DisassociateFromAdministratorAccountRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DisassociateFromAdministratorAccountResult call() throws Exception {
DisassociateFromAdministratorAccountResult result = null;
try {
result = executeDisassociateFromAdministratorAccount(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
@Deprecated
public java.util.concurrent.Future disassociateFromMasterAccountAsync(DisassociateFromMasterAccountRequest request) {
return disassociateFromMasterAccountAsync(request, null);
}
@Override
@Deprecated
public java.util.concurrent.Future disassociateFromMasterAccountAsync(
final DisassociateFromMasterAccountRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DisassociateFromMasterAccountRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DisassociateFromMasterAccountResult call() throws Exception {
DisassociateFromMasterAccountResult result = null;
try {
result = executeDisassociateFromMasterAccount(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 disassociateMembersAsync(DisassociateMembersRequest request) {
return disassociateMembersAsync(request, null);
}
@Override
public java.util.concurrent.Future disassociateMembersAsync(final DisassociateMembersRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DisassociateMembersRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DisassociateMembersResult call() throws Exception {
DisassociateMembersResult result = null;
try {
result = executeDisassociateMembers(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 enableImportFindingsForProductAsync(EnableImportFindingsForProductRequest request) {
return enableImportFindingsForProductAsync(request, null);
}
@Override
public java.util.concurrent.Future enableImportFindingsForProductAsync(
final EnableImportFindingsForProductRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final EnableImportFindingsForProductRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public EnableImportFindingsForProductResult call() throws Exception {
EnableImportFindingsForProductResult result = null;
try {
result = executeEnableImportFindingsForProduct(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 enableOrganizationAdminAccountAsync(EnableOrganizationAdminAccountRequest request) {
return enableOrganizationAdminAccountAsync(request, null);
}
@Override
public java.util.concurrent.Future enableOrganizationAdminAccountAsync(
final EnableOrganizationAdminAccountRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final EnableOrganizationAdminAccountRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public EnableOrganizationAdminAccountResult call() throws Exception {
EnableOrganizationAdminAccountResult result = null;
try {
result = executeEnableOrganizationAdminAccount(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 enableSecurityHubAsync(EnableSecurityHubRequest request) {
return enableSecurityHubAsync(request, null);
}
@Override
public java.util.concurrent.Future enableSecurityHubAsync(final EnableSecurityHubRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final EnableSecurityHubRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public EnableSecurityHubResult call() throws Exception {
EnableSecurityHubResult result = null;
try {
result = executeEnableSecurityHub(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 getAdministratorAccountAsync(GetAdministratorAccountRequest request) {
return getAdministratorAccountAsync(request, null);
}
@Override
public java.util.concurrent.Future getAdministratorAccountAsync(final GetAdministratorAccountRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetAdministratorAccountRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetAdministratorAccountResult call() throws Exception {
GetAdministratorAccountResult result = null;
try {
result = executeGetAdministratorAccount(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 getConfigurationPolicyAsync(GetConfigurationPolicyRequest request) {
return getConfigurationPolicyAsync(request, null);
}
@Override
public java.util.concurrent.Future getConfigurationPolicyAsync(final GetConfigurationPolicyRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetConfigurationPolicyRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetConfigurationPolicyResult call() throws Exception {
GetConfigurationPolicyResult result = null;
try {
result = executeGetConfigurationPolicy(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 getConfigurationPolicyAssociationAsync(
GetConfigurationPolicyAssociationRequest request) {
return getConfigurationPolicyAssociationAsync(request, null);
}
@Override
public java.util.concurrent.Future getConfigurationPolicyAssociationAsync(
final GetConfigurationPolicyAssociationRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetConfigurationPolicyAssociationRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetConfigurationPolicyAssociationResult call() throws Exception {
GetConfigurationPolicyAssociationResult result = null;
try {
result = executeGetConfigurationPolicyAssociation(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 getEnabledStandardsAsync(GetEnabledStandardsRequest request) {
return getEnabledStandardsAsync(request, null);
}
@Override
public java.util.concurrent.Future getEnabledStandardsAsync(final GetEnabledStandardsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetEnabledStandardsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetEnabledStandardsResult call() throws Exception {
GetEnabledStandardsResult result = null;
try {
result = executeGetEnabledStandards(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 getFindingAggregatorAsync(GetFindingAggregatorRequest request) {
return getFindingAggregatorAsync(request, null);
}
@Override
public java.util.concurrent.Future getFindingAggregatorAsync(final GetFindingAggregatorRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetFindingAggregatorRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetFindingAggregatorResult call() throws Exception {
GetFindingAggregatorResult result = null;
try {
result = executeGetFindingAggregator(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 getFindingHistoryAsync(GetFindingHistoryRequest request) {
return getFindingHistoryAsync(request, null);
}
@Override
public java.util.concurrent.Future getFindingHistoryAsync(final GetFindingHistoryRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetFindingHistoryRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetFindingHistoryResult call() throws Exception {
GetFindingHistoryResult result = null;
try {
result = executeGetFindingHistory(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 getFindingsAsync(GetFindingsRequest request) {
return getFindingsAsync(request, null);
}
@Override
public java.util.concurrent.Future getFindingsAsync(final GetFindingsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetFindingsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetFindingsResult call() throws Exception {
GetFindingsResult result = null;
try {
result = executeGetFindings(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 getInsightResultsAsync(GetInsightResultsRequest request) {
return getInsightResultsAsync(request, null);
}
@Override
public java.util.concurrent.Future getInsightResultsAsync(final GetInsightResultsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetInsightResultsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetInsightResultsResult call() throws Exception {
GetInsightResultsResult result = null;
try {
result = executeGetInsightResults(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 getInsightsAsync(GetInsightsRequest request) {
return getInsightsAsync(request, null);
}
@Override
public java.util.concurrent.Future getInsightsAsync(final GetInsightsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetInsightsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetInsightsResult call() throws Exception {
GetInsightsResult result = null;
try {
result = executeGetInsights(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 getInvitationsCountAsync(GetInvitationsCountRequest request) {
return getInvitationsCountAsync(request, null);
}
@Override
public java.util.concurrent.Future getInvitationsCountAsync(final GetInvitationsCountRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetInvitationsCountRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetInvitationsCountResult call() throws Exception {
GetInvitationsCountResult result = null;
try {
result = executeGetInvitationsCount(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
@Deprecated
public java.util.concurrent.Future getMasterAccountAsync(GetMasterAccountRequest request) {
return getMasterAccountAsync(request, null);
}
@Override
@Deprecated
public java.util.concurrent.Future getMasterAccountAsync(final GetMasterAccountRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetMasterAccountRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetMasterAccountResult call() throws Exception {
GetMasterAccountResult result = null;
try {
result = executeGetMasterAccount(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 getMembersAsync(GetMembersRequest request) {
return getMembersAsync(request, null);
}
@Override
public java.util.concurrent.Future getMembersAsync(final GetMembersRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetMembersRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetMembersResult call() throws Exception {
GetMembersResult result = null;
try {
result = executeGetMembers(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 getSecurityControlDefinitionAsync(GetSecurityControlDefinitionRequest request) {
return getSecurityControlDefinitionAsync(request, null);
}
@Override
public java.util.concurrent.Future getSecurityControlDefinitionAsync(final GetSecurityControlDefinitionRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetSecurityControlDefinitionRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetSecurityControlDefinitionResult call() throws Exception {
GetSecurityControlDefinitionResult result = null;
try {
result = executeGetSecurityControlDefinition(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 inviteMembersAsync(InviteMembersRequest request) {
return inviteMembersAsync(request, null);
}
@Override
public java.util.concurrent.Future inviteMembersAsync(final InviteMembersRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final InviteMembersRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public InviteMembersResult call() throws Exception {
InviteMembersResult result = null;
try {
result = executeInviteMembers(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 listAutomationRulesAsync(ListAutomationRulesRequest request) {
return listAutomationRulesAsync(request, null);
}
@Override
public java.util.concurrent.Future listAutomationRulesAsync(final ListAutomationRulesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListAutomationRulesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListAutomationRulesResult call() throws Exception {
ListAutomationRulesResult result = null;
try {
result = executeListAutomationRules(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 listConfigurationPoliciesAsync(ListConfigurationPoliciesRequest request) {
return listConfigurationPoliciesAsync(request, null);
}
@Override
public java.util.concurrent.Future listConfigurationPoliciesAsync(final ListConfigurationPoliciesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListConfigurationPoliciesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListConfigurationPoliciesResult call() throws Exception {
ListConfigurationPoliciesResult result = null;
try {
result = executeListConfigurationPolicies(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 listConfigurationPolicyAssociationsAsync(
ListConfigurationPolicyAssociationsRequest request) {
return listConfigurationPolicyAssociationsAsync(request, null);
}
@Override
public java.util.concurrent.Future listConfigurationPolicyAssociationsAsync(
final ListConfigurationPolicyAssociationsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListConfigurationPolicyAssociationsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListConfigurationPolicyAssociationsResult call() throws Exception {
ListConfigurationPolicyAssociationsResult result = null;
try {
result = executeListConfigurationPolicyAssociations(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 listEnabledProductsForImportAsync(ListEnabledProductsForImportRequest request) {
return listEnabledProductsForImportAsync(request, null);
}
@Override
public java.util.concurrent.Future listEnabledProductsForImportAsync(final ListEnabledProductsForImportRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListEnabledProductsForImportRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListEnabledProductsForImportResult call() throws Exception {
ListEnabledProductsForImportResult result = null;
try {
result = executeListEnabledProductsForImport(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 listFindingAggregatorsAsync(ListFindingAggregatorsRequest request) {
return listFindingAggregatorsAsync(request, null);
}
@Override
public java.util.concurrent.Future listFindingAggregatorsAsync(final ListFindingAggregatorsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListFindingAggregatorsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListFindingAggregatorsResult call() throws Exception {
ListFindingAggregatorsResult result = null;
try {
result = executeListFindingAggregators(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 listInvitationsAsync(ListInvitationsRequest request) {
return listInvitationsAsync(request, null);
}
@Override
public java.util.concurrent.Future listInvitationsAsync(final ListInvitationsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListInvitationsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListInvitationsResult call() throws Exception {
ListInvitationsResult result = null;
try {
result = executeListInvitations(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 listMembersAsync(ListMembersRequest request) {
return listMembersAsync(request, null);
}
@Override
public java.util.concurrent.Future listMembersAsync(final ListMembersRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListMembersRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListMembersResult call() throws Exception {
ListMembersResult result = null;
try {
result = executeListMembers(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 listOrganizationAdminAccountsAsync(ListOrganizationAdminAccountsRequest request) {
return listOrganizationAdminAccountsAsync(request, null);
}
@Override
public java.util.concurrent.Future listOrganizationAdminAccountsAsync(
final ListOrganizationAdminAccountsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListOrganizationAdminAccountsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable