software.amazon.awssdk.services.config.DefaultConfigAsyncClient Maven / Gradle / Ivy
Show all versions of config Show documentation
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package software.amazon.awssdk.services.config;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.CompletableFuture;
import java.util.function.Consumer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.annotations.SdkInternalApi;
import software.amazon.awssdk.awscore.client.handler.AwsAsyncClientHandler;
import software.amazon.awssdk.awscore.exception.AwsServiceException;
import software.amazon.awssdk.awscore.internal.AwsProtocolMetadata;
import software.amazon.awssdk.awscore.internal.AwsServiceProtocol;
import software.amazon.awssdk.awscore.retry.AwsRetryStrategy;
import software.amazon.awssdk.core.RequestOverrideConfiguration;
import software.amazon.awssdk.core.SdkPlugin;
import software.amazon.awssdk.core.SdkRequest;
import software.amazon.awssdk.core.client.config.ClientOverrideConfiguration;
import software.amazon.awssdk.core.client.config.SdkClientConfiguration;
import software.amazon.awssdk.core.client.config.SdkClientOption;
import software.amazon.awssdk.core.client.handler.AsyncClientHandler;
import software.amazon.awssdk.core.client.handler.ClientExecutionParams;
import software.amazon.awssdk.core.http.HttpResponseHandler;
import software.amazon.awssdk.core.metrics.CoreMetric;
import software.amazon.awssdk.core.retry.RetryMode;
import software.amazon.awssdk.metrics.MetricCollector;
import software.amazon.awssdk.metrics.MetricPublisher;
import software.amazon.awssdk.metrics.NoOpMetricCollector;
import software.amazon.awssdk.protocols.core.ExceptionMetadata;
import software.amazon.awssdk.protocols.json.AwsJsonProtocol;
import software.amazon.awssdk.protocols.json.AwsJsonProtocolFactory;
import software.amazon.awssdk.protocols.json.BaseAwsJsonProtocolFactory;
import software.amazon.awssdk.protocols.json.JsonOperationMetadata;
import software.amazon.awssdk.retries.api.RetryStrategy;
import software.amazon.awssdk.services.config.internal.ConfigServiceClientConfigurationBuilder;
import software.amazon.awssdk.services.config.model.BatchGetAggregateResourceConfigRequest;
import software.amazon.awssdk.services.config.model.BatchGetAggregateResourceConfigResponse;
import software.amazon.awssdk.services.config.model.BatchGetResourceConfigRequest;
import software.amazon.awssdk.services.config.model.BatchGetResourceConfigResponse;
import software.amazon.awssdk.services.config.model.ConfigException;
import software.amazon.awssdk.services.config.model.ConformancePackTemplateValidationException;
import software.amazon.awssdk.services.config.model.DeleteAggregationAuthorizationRequest;
import software.amazon.awssdk.services.config.model.DeleteAggregationAuthorizationResponse;
import software.amazon.awssdk.services.config.model.DeleteConfigRuleRequest;
import software.amazon.awssdk.services.config.model.DeleteConfigRuleResponse;
import software.amazon.awssdk.services.config.model.DeleteConfigurationAggregatorRequest;
import software.amazon.awssdk.services.config.model.DeleteConfigurationAggregatorResponse;
import software.amazon.awssdk.services.config.model.DeleteConfigurationRecorderRequest;
import software.amazon.awssdk.services.config.model.DeleteConfigurationRecorderResponse;
import software.amazon.awssdk.services.config.model.DeleteConformancePackRequest;
import software.amazon.awssdk.services.config.model.DeleteConformancePackResponse;
import software.amazon.awssdk.services.config.model.DeleteDeliveryChannelRequest;
import software.amazon.awssdk.services.config.model.DeleteDeliveryChannelResponse;
import software.amazon.awssdk.services.config.model.DeleteEvaluationResultsRequest;
import software.amazon.awssdk.services.config.model.DeleteEvaluationResultsResponse;
import software.amazon.awssdk.services.config.model.DeleteOrganizationConfigRuleRequest;
import software.amazon.awssdk.services.config.model.DeleteOrganizationConfigRuleResponse;
import software.amazon.awssdk.services.config.model.DeleteOrganizationConformancePackRequest;
import software.amazon.awssdk.services.config.model.DeleteOrganizationConformancePackResponse;
import software.amazon.awssdk.services.config.model.DeletePendingAggregationRequestRequest;
import software.amazon.awssdk.services.config.model.DeletePendingAggregationRequestResponse;
import software.amazon.awssdk.services.config.model.DeleteRemediationConfigurationRequest;
import software.amazon.awssdk.services.config.model.DeleteRemediationConfigurationResponse;
import software.amazon.awssdk.services.config.model.DeleteRemediationExceptionsRequest;
import software.amazon.awssdk.services.config.model.DeleteRemediationExceptionsResponse;
import software.amazon.awssdk.services.config.model.DeleteResourceConfigRequest;
import software.amazon.awssdk.services.config.model.DeleteResourceConfigResponse;
import software.amazon.awssdk.services.config.model.DeleteRetentionConfigurationRequest;
import software.amazon.awssdk.services.config.model.DeleteRetentionConfigurationResponse;
import software.amazon.awssdk.services.config.model.DeleteStoredQueryRequest;
import software.amazon.awssdk.services.config.model.DeleteStoredQueryResponse;
import software.amazon.awssdk.services.config.model.DeliverConfigSnapshotRequest;
import software.amazon.awssdk.services.config.model.DeliverConfigSnapshotResponse;
import software.amazon.awssdk.services.config.model.DescribeAggregateComplianceByConfigRulesRequest;
import software.amazon.awssdk.services.config.model.DescribeAggregateComplianceByConfigRulesResponse;
import software.amazon.awssdk.services.config.model.DescribeAggregateComplianceByConformancePacksRequest;
import software.amazon.awssdk.services.config.model.DescribeAggregateComplianceByConformancePacksResponse;
import software.amazon.awssdk.services.config.model.DescribeAggregationAuthorizationsRequest;
import software.amazon.awssdk.services.config.model.DescribeAggregationAuthorizationsResponse;
import software.amazon.awssdk.services.config.model.DescribeComplianceByConfigRuleRequest;
import software.amazon.awssdk.services.config.model.DescribeComplianceByConfigRuleResponse;
import software.amazon.awssdk.services.config.model.DescribeComplianceByResourceRequest;
import software.amazon.awssdk.services.config.model.DescribeComplianceByResourceResponse;
import software.amazon.awssdk.services.config.model.DescribeConfigRuleEvaluationStatusRequest;
import software.amazon.awssdk.services.config.model.DescribeConfigRuleEvaluationStatusResponse;
import software.amazon.awssdk.services.config.model.DescribeConfigRulesRequest;
import software.amazon.awssdk.services.config.model.DescribeConfigRulesResponse;
import software.amazon.awssdk.services.config.model.DescribeConfigurationAggregatorSourcesStatusRequest;
import software.amazon.awssdk.services.config.model.DescribeConfigurationAggregatorSourcesStatusResponse;
import software.amazon.awssdk.services.config.model.DescribeConfigurationAggregatorsRequest;
import software.amazon.awssdk.services.config.model.DescribeConfigurationAggregatorsResponse;
import software.amazon.awssdk.services.config.model.DescribeConfigurationRecorderStatusRequest;
import software.amazon.awssdk.services.config.model.DescribeConfigurationRecorderStatusResponse;
import software.amazon.awssdk.services.config.model.DescribeConfigurationRecordersRequest;
import software.amazon.awssdk.services.config.model.DescribeConfigurationRecordersResponse;
import software.amazon.awssdk.services.config.model.DescribeConformancePackComplianceRequest;
import software.amazon.awssdk.services.config.model.DescribeConformancePackComplianceResponse;
import software.amazon.awssdk.services.config.model.DescribeConformancePackStatusRequest;
import software.amazon.awssdk.services.config.model.DescribeConformancePackStatusResponse;
import software.amazon.awssdk.services.config.model.DescribeConformancePacksRequest;
import software.amazon.awssdk.services.config.model.DescribeConformancePacksResponse;
import software.amazon.awssdk.services.config.model.DescribeDeliveryChannelStatusRequest;
import software.amazon.awssdk.services.config.model.DescribeDeliveryChannelStatusResponse;
import software.amazon.awssdk.services.config.model.DescribeDeliveryChannelsRequest;
import software.amazon.awssdk.services.config.model.DescribeDeliveryChannelsResponse;
import software.amazon.awssdk.services.config.model.DescribeOrganizationConfigRuleStatusesRequest;
import software.amazon.awssdk.services.config.model.DescribeOrganizationConfigRuleStatusesResponse;
import software.amazon.awssdk.services.config.model.DescribeOrganizationConfigRulesRequest;
import software.amazon.awssdk.services.config.model.DescribeOrganizationConfigRulesResponse;
import software.amazon.awssdk.services.config.model.DescribeOrganizationConformancePackStatusesRequest;
import software.amazon.awssdk.services.config.model.DescribeOrganizationConformancePackStatusesResponse;
import software.amazon.awssdk.services.config.model.DescribeOrganizationConformancePacksRequest;
import software.amazon.awssdk.services.config.model.DescribeOrganizationConformancePacksResponse;
import software.amazon.awssdk.services.config.model.DescribePendingAggregationRequestsRequest;
import software.amazon.awssdk.services.config.model.DescribePendingAggregationRequestsResponse;
import software.amazon.awssdk.services.config.model.DescribeRemediationConfigurationsRequest;
import software.amazon.awssdk.services.config.model.DescribeRemediationConfigurationsResponse;
import software.amazon.awssdk.services.config.model.DescribeRemediationExceptionsRequest;
import software.amazon.awssdk.services.config.model.DescribeRemediationExceptionsResponse;
import software.amazon.awssdk.services.config.model.DescribeRemediationExecutionStatusRequest;
import software.amazon.awssdk.services.config.model.DescribeRemediationExecutionStatusResponse;
import software.amazon.awssdk.services.config.model.DescribeRetentionConfigurationsRequest;
import software.amazon.awssdk.services.config.model.DescribeRetentionConfigurationsResponse;
import software.amazon.awssdk.services.config.model.GetAggregateComplianceDetailsByConfigRuleRequest;
import software.amazon.awssdk.services.config.model.GetAggregateComplianceDetailsByConfigRuleResponse;
import software.amazon.awssdk.services.config.model.GetAggregateConfigRuleComplianceSummaryRequest;
import software.amazon.awssdk.services.config.model.GetAggregateConfigRuleComplianceSummaryResponse;
import software.amazon.awssdk.services.config.model.GetAggregateConformancePackComplianceSummaryRequest;
import software.amazon.awssdk.services.config.model.GetAggregateConformancePackComplianceSummaryResponse;
import software.amazon.awssdk.services.config.model.GetAggregateDiscoveredResourceCountsRequest;
import software.amazon.awssdk.services.config.model.GetAggregateDiscoveredResourceCountsResponse;
import software.amazon.awssdk.services.config.model.GetAggregateResourceConfigRequest;
import software.amazon.awssdk.services.config.model.GetAggregateResourceConfigResponse;
import software.amazon.awssdk.services.config.model.GetComplianceDetailsByConfigRuleRequest;
import software.amazon.awssdk.services.config.model.GetComplianceDetailsByConfigRuleResponse;
import software.amazon.awssdk.services.config.model.GetComplianceDetailsByResourceRequest;
import software.amazon.awssdk.services.config.model.GetComplianceDetailsByResourceResponse;
import software.amazon.awssdk.services.config.model.GetComplianceSummaryByConfigRuleRequest;
import software.amazon.awssdk.services.config.model.GetComplianceSummaryByConfigRuleResponse;
import software.amazon.awssdk.services.config.model.GetComplianceSummaryByResourceTypeRequest;
import software.amazon.awssdk.services.config.model.GetComplianceSummaryByResourceTypeResponse;
import software.amazon.awssdk.services.config.model.GetConformancePackComplianceDetailsRequest;
import software.amazon.awssdk.services.config.model.GetConformancePackComplianceDetailsResponse;
import software.amazon.awssdk.services.config.model.GetConformancePackComplianceSummaryRequest;
import software.amazon.awssdk.services.config.model.GetConformancePackComplianceSummaryResponse;
import software.amazon.awssdk.services.config.model.GetCustomRulePolicyRequest;
import software.amazon.awssdk.services.config.model.GetCustomRulePolicyResponse;
import software.amazon.awssdk.services.config.model.GetDiscoveredResourceCountsRequest;
import software.amazon.awssdk.services.config.model.GetDiscoveredResourceCountsResponse;
import software.amazon.awssdk.services.config.model.GetOrganizationConfigRuleDetailedStatusRequest;
import software.amazon.awssdk.services.config.model.GetOrganizationConfigRuleDetailedStatusResponse;
import software.amazon.awssdk.services.config.model.GetOrganizationConformancePackDetailedStatusRequest;
import software.amazon.awssdk.services.config.model.GetOrganizationConformancePackDetailedStatusResponse;
import software.amazon.awssdk.services.config.model.GetOrganizationCustomRulePolicyRequest;
import software.amazon.awssdk.services.config.model.GetOrganizationCustomRulePolicyResponse;
import software.amazon.awssdk.services.config.model.GetResourceConfigHistoryRequest;
import software.amazon.awssdk.services.config.model.GetResourceConfigHistoryResponse;
import software.amazon.awssdk.services.config.model.GetResourceEvaluationSummaryRequest;
import software.amazon.awssdk.services.config.model.GetResourceEvaluationSummaryResponse;
import software.amazon.awssdk.services.config.model.GetStoredQueryRequest;
import software.amazon.awssdk.services.config.model.GetStoredQueryResponse;
import software.amazon.awssdk.services.config.model.IdempotentParameterMismatchException;
import software.amazon.awssdk.services.config.model.InsufficientDeliveryPolicyException;
import software.amazon.awssdk.services.config.model.InsufficientPermissionsException;
import software.amazon.awssdk.services.config.model.InvalidConfigurationRecorderNameException;
import software.amazon.awssdk.services.config.model.InvalidDeliveryChannelNameException;
import software.amazon.awssdk.services.config.model.InvalidExpressionException;
import software.amazon.awssdk.services.config.model.InvalidLimitException;
import software.amazon.awssdk.services.config.model.InvalidNextTokenException;
import software.amazon.awssdk.services.config.model.InvalidParameterValueException;
import software.amazon.awssdk.services.config.model.InvalidRecordingGroupException;
import software.amazon.awssdk.services.config.model.InvalidResultTokenException;
import software.amazon.awssdk.services.config.model.InvalidRoleException;
import software.amazon.awssdk.services.config.model.InvalidS3KeyPrefixException;
import software.amazon.awssdk.services.config.model.InvalidS3KmsKeyArnException;
import software.amazon.awssdk.services.config.model.InvalidSnsTopicArnException;
import software.amazon.awssdk.services.config.model.InvalidTimeRangeException;
import software.amazon.awssdk.services.config.model.LastDeliveryChannelDeleteFailedException;
import software.amazon.awssdk.services.config.model.LimitExceededException;
import software.amazon.awssdk.services.config.model.ListAggregateDiscoveredResourcesRequest;
import software.amazon.awssdk.services.config.model.ListAggregateDiscoveredResourcesResponse;
import software.amazon.awssdk.services.config.model.ListConformancePackComplianceScoresRequest;
import software.amazon.awssdk.services.config.model.ListConformancePackComplianceScoresResponse;
import software.amazon.awssdk.services.config.model.ListDiscoveredResourcesRequest;
import software.amazon.awssdk.services.config.model.ListDiscoveredResourcesResponse;
import software.amazon.awssdk.services.config.model.ListResourceEvaluationsRequest;
import software.amazon.awssdk.services.config.model.ListResourceEvaluationsResponse;
import software.amazon.awssdk.services.config.model.ListStoredQueriesRequest;
import software.amazon.awssdk.services.config.model.ListStoredQueriesResponse;
import software.amazon.awssdk.services.config.model.ListTagsForResourceRequest;
import software.amazon.awssdk.services.config.model.ListTagsForResourceResponse;
import software.amazon.awssdk.services.config.model.MaxActiveResourcesExceededException;
import software.amazon.awssdk.services.config.model.MaxNumberOfConfigRulesExceededException;
import software.amazon.awssdk.services.config.model.MaxNumberOfConfigurationRecordersExceededException;
import software.amazon.awssdk.services.config.model.MaxNumberOfConformancePacksExceededException;
import software.amazon.awssdk.services.config.model.MaxNumberOfDeliveryChannelsExceededException;
import software.amazon.awssdk.services.config.model.MaxNumberOfOrganizationConfigRulesExceededException;
import software.amazon.awssdk.services.config.model.MaxNumberOfOrganizationConformancePacksExceededException;
import software.amazon.awssdk.services.config.model.MaxNumberOfRetentionConfigurationsExceededException;
import software.amazon.awssdk.services.config.model.NoAvailableConfigurationRecorderException;
import software.amazon.awssdk.services.config.model.NoAvailableDeliveryChannelException;
import software.amazon.awssdk.services.config.model.NoAvailableOrganizationException;
import software.amazon.awssdk.services.config.model.NoRunningConfigurationRecorderException;
import software.amazon.awssdk.services.config.model.NoSuchBucketException;
import software.amazon.awssdk.services.config.model.NoSuchConfigRuleException;
import software.amazon.awssdk.services.config.model.NoSuchConfigRuleInConformancePackException;
import software.amazon.awssdk.services.config.model.NoSuchConfigurationAggregatorException;
import software.amazon.awssdk.services.config.model.NoSuchConfigurationRecorderException;
import software.amazon.awssdk.services.config.model.NoSuchConformancePackException;
import software.amazon.awssdk.services.config.model.NoSuchDeliveryChannelException;
import software.amazon.awssdk.services.config.model.NoSuchOrganizationConfigRuleException;
import software.amazon.awssdk.services.config.model.NoSuchOrganizationConformancePackException;
import software.amazon.awssdk.services.config.model.NoSuchRemediationConfigurationException;
import software.amazon.awssdk.services.config.model.NoSuchRemediationExceptionException;
import software.amazon.awssdk.services.config.model.NoSuchRetentionConfigurationException;
import software.amazon.awssdk.services.config.model.OrganizationAccessDeniedException;
import software.amazon.awssdk.services.config.model.OrganizationAllFeaturesNotEnabledException;
import software.amazon.awssdk.services.config.model.OrganizationConformancePackTemplateValidationException;
import software.amazon.awssdk.services.config.model.OversizedConfigurationItemException;
import software.amazon.awssdk.services.config.model.PutAggregationAuthorizationRequest;
import software.amazon.awssdk.services.config.model.PutAggregationAuthorizationResponse;
import software.amazon.awssdk.services.config.model.PutConfigRuleRequest;
import software.amazon.awssdk.services.config.model.PutConfigRuleResponse;
import software.amazon.awssdk.services.config.model.PutConfigurationAggregatorRequest;
import software.amazon.awssdk.services.config.model.PutConfigurationAggregatorResponse;
import software.amazon.awssdk.services.config.model.PutConfigurationRecorderRequest;
import software.amazon.awssdk.services.config.model.PutConfigurationRecorderResponse;
import software.amazon.awssdk.services.config.model.PutConformancePackRequest;
import software.amazon.awssdk.services.config.model.PutConformancePackResponse;
import software.amazon.awssdk.services.config.model.PutDeliveryChannelRequest;
import software.amazon.awssdk.services.config.model.PutDeliveryChannelResponse;
import software.amazon.awssdk.services.config.model.PutEvaluationsRequest;
import software.amazon.awssdk.services.config.model.PutEvaluationsResponse;
import software.amazon.awssdk.services.config.model.PutExternalEvaluationRequest;
import software.amazon.awssdk.services.config.model.PutExternalEvaluationResponse;
import software.amazon.awssdk.services.config.model.PutOrganizationConfigRuleRequest;
import software.amazon.awssdk.services.config.model.PutOrganizationConfigRuleResponse;
import software.amazon.awssdk.services.config.model.PutOrganizationConformancePackRequest;
import software.amazon.awssdk.services.config.model.PutOrganizationConformancePackResponse;
import software.amazon.awssdk.services.config.model.PutRemediationConfigurationsRequest;
import software.amazon.awssdk.services.config.model.PutRemediationConfigurationsResponse;
import software.amazon.awssdk.services.config.model.PutRemediationExceptionsRequest;
import software.amazon.awssdk.services.config.model.PutRemediationExceptionsResponse;
import software.amazon.awssdk.services.config.model.PutResourceConfigRequest;
import software.amazon.awssdk.services.config.model.PutResourceConfigResponse;
import software.amazon.awssdk.services.config.model.PutRetentionConfigurationRequest;
import software.amazon.awssdk.services.config.model.PutRetentionConfigurationResponse;
import software.amazon.awssdk.services.config.model.PutStoredQueryRequest;
import software.amazon.awssdk.services.config.model.PutStoredQueryResponse;
import software.amazon.awssdk.services.config.model.RemediationInProgressException;
import software.amazon.awssdk.services.config.model.ResourceConcurrentModificationException;
import software.amazon.awssdk.services.config.model.ResourceInUseException;
import software.amazon.awssdk.services.config.model.ResourceNotDiscoveredException;
import software.amazon.awssdk.services.config.model.ResourceNotFoundException;
import software.amazon.awssdk.services.config.model.SelectAggregateResourceConfigRequest;
import software.amazon.awssdk.services.config.model.SelectAggregateResourceConfigResponse;
import software.amazon.awssdk.services.config.model.SelectResourceConfigRequest;
import software.amazon.awssdk.services.config.model.SelectResourceConfigResponse;
import software.amazon.awssdk.services.config.model.StartConfigRulesEvaluationRequest;
import software.amazon.awssdk.services.config.model.StartConfigRulesEvaluationResponse;
import software.amazon.awssdk.services.config.model.StartConfigurationRecorderRequest;
import software.amazon.awssdk.services.config.model.StartConfigurationRecorderResponse;
import software.amazon.awssdk.services.config.model.StartRemediationExecutionRequest;
import software.amazon.awssdk.services.config.model.StartRemediationExecutionResponse;
import software.amazon.awssdk.services.config.model.StartResourceEvaluationRequest;
import software.amazon.awssdk.services.config.model.StartResourceEvaluationResponse;
import software.amazon.awssdk.services.config.model.StopConfigurationRecorderRequest;
import software.amazon.awssdk.services.config.model.StopConfigurationRecorderResponse;
import software.amazon.awssdk.services.config.model.TagResourceRequest;
import software.amazon.awssdk.services.config.model.TagResourceResponse;
import software.amazon.awssdk.services.config.model.TooManyTagsException;
import software.amazon.awssdk.services.config.model.UntagResourceRequest;
import software.amazon.awssdk.services.config.model.UntagResourceResponse;
import software.amazon.awssdk.services.config.model.ValidationException;
import software.amazon.awssdk.services.config.transform.BatchGetAggregateResourceConfigRequestMarshaller;
import software.amazon.awssdk.services.config.transform.BatchGetResourceConfigRequestMarshaller;
import software.amazon.awssdk.services.config.transform.DeleteAggregationAuthorizationRequestMarshaller;
import software.amazon.awssdk.services.config.transform.DeleteConfigRuleRequestMarshaller;
import software.amazon.awssdk.services.config.transform.DeleteConfigurationAggregatorRequestMarshaller;
import software.amazon.awssdk.services.config.transform.DeleteConfigurationRecorderRequestMarshaller;
import software.amazon.awssdk.services.config.transform.DeleteConformancePackRequestMarshaller;
import software.amazon.awssdk.services.config.transform.DeleteDeliveryChannelRequestMarshaller;
import software.amazon.awssdk.services.config.transform.DeleteEvaluationResultsRequestMarshaller;
import software.amazon.awssdk.services.config.transform.DeleteOrganizationConfigRuleRequestMarshaller;
import software.amazon.awssdk.services.config.transform.DeleteOrganizationConformancePackRequestMarshaller;
import software.amazon.awssdk.services.config.transform.DeletePendingAggregationRequestRequestMarshaller;
import software.amazon.awssdk.services.config.transform.DeleteRemediationConfigurationRequestMarshaller;
import software.amazon.awssdk.services.config.transform.DeleteRemediationExceptionsRequestMarshaller;
import software.amazon.awssdk.services.config.transform.DeleteResourceConfigRequestMarshaller;
import software.amazon.awssdk.services.config.transform.DeleteRetentionConfigurationRequestMarshaller;
import software.amazon.awssdk.services.config.transform.DeleteStoredQueryRequestMarshaller;
import software.amazon.awssdk.services.config.transform.DeliverConfigSnapshotRequestMarshaller;
import software.amazon.awssdk.services.config.transform.DescribeAggregateComplianceByConfigRulesRequestMarshaller;
import software.amazon.awssdk.services.config.transform.DescribeAggregateComplianceByConformancePacksRequestMarshaller;
import software.amazon.awssdk.services.config.transform.DescribeAggregationAuthorizationsRequestMarshaller;
import software.amazon.awssdk.services.config.transform.DescribeComplianceByConfigRuleRequestMarshaller;
import software.amazon.awssdk.services.config.transform.DescribeComplianceByResourceRequestMarshaller;
import software.amazon.awssdk.services.config.transform.DescribeConfigRuleEvaluationStatusRequestMarshaller;
import software.amazon.awssdk.services.config.transform.DescribeConfigRulesRequestMarshaller;
import software.amazon.awssdk.services.config.transform.DescribeConfigurationAggregatorSourcesStatusRequestMarshaller;
import software.amazon.awssdk.services.config.transform.DescribeConfigurationAggregatorsRequestMarshaller;
import software.amazon.awssdk.services.config.transform.DescribeConfigurationRecorderStatusRequestMarshaller;
import software.amazon.awssdk.services.config.transform.DescribeConfigurationRecordersRequestMarshaller;
import software.amazon.awssdk.services.config.transform.DescribeConformancePackComplianceRequestMarshaller;
import software.amazon.awssdk.services.config.transform.DescribeConformancePackStatusRequestMarshaller;
import software.amazon.awssdk.services.config.transform.DescribeConformancePacksRequestMarshaller;
import software.amazon.awssdk.services.config.transform.DescribeDeliveryChannelStatusRequestMarshaller;
import software.amazon.awssdk.services.config.transform.DescribeDeliveryChannelsRequestMarshaller;
import software.amazon.awssdk.services.config.transform.DescribeOrganizationConfigRuleStatusesRequestMarshaller;
import software.amazon.awssdk.services.config.transform.DescribeOrganizationConfigRulesRequestMarshaller;
import software.amazon.awssdk.services.config.transform.DescribeOrganizationConformancePackStatusesRequestMarshaller;
import software.amazon.awssdk.services.config.transform.DescribeOrganizationConformancePacksRequestMarshaller;
import software.amazon.awssdk.services.config.transform.DescribePendingAggregationRequestsRequestMarshaller;
import software.amazon.awssdk.services.config.transform.DescribeRemediationConfigurationsRequestMarshaller;
import software.amazon.awssdk.services.config.transform.DescribeRemediationExceptionsRequestMarshaller;
import software.amazon.awssdk.services.config.transform.DescribeRemediationExecutionStatusRequestMarshaller;
import software.amazon.awssdk.services.config.transform.DescribeRetentionConfigurationsRequestMarshaller;
import software.amazon.awssdk.services.config.transform.GetAggregateComplianceDetailsByConfigRuleRequestMarshaller;
import software.amazon.awssdk.services.config.transform.GetAggregateConfigRuleComplianceSummaryRequestMarshaller;
import software.amazon.awssdk.services.config.transform.GetAggregateConformancePackComplianceSummaryRequestMarshaller;
import software.amazon.awssdk.services.config.transform.GetAggregateDiscoveredResourceCountsRequestMarshaller;
import software.amazon.awssdk.services.config.transform.GetAggregateResourceConfigRequestMarshaller;
import software.amazon.awssdk.services.config.transform.GetComplianceDetailsByConfigRuleRequestMarshaller;
import software.amazon.awssdk.services.config.transform.GetComplianceDetailsByResourceRequestMarshaller;
import software.amazon.awssdk.services.config.transform.GetComplianceSummaryByConfigRuleRequestMarshaller;
import software.amazon.awssdk.services.config.transform.GetComplianceSummaryByResourceTypeRequestMarshaller;
import software.amazon.awssdk.services.config.transform.GetConformancePackComplianceDetailsRequestMarshaller;
import software.amazon.awssdk.services.config.transform.GetConformancePackComplianceSummaryRequestMarshaller;
import software.amazon.awssdk.services.config.transform.GetCustomRulePolicyRequestMarshaller;
import software.amazon.awssdk.services.config.transform.GetDiscoveredResourceCountsRequestMarshaller;
import software.amazon.awssdk.services.config.transform.GetOrganizationConfigRuleDetailedStatusRequestMarshaller;
import software.amazon.awssdk.services.config.transform.GetOrganizationConformancePackDetailedStatusRequestMarshaller;
import software.amazon.awssdk.services.config.transform.GetOrganizationCustomRulePolicyRequestMarshaller;
import software.amazon.awssdk.services.config.transform.GetResourceConfigHistoryRequestMarshaller;
import software.amazon.awssdk.services.config.transform.GetResourceEvaluationSummaryRequestMarshaller;
import software.amazon.awssdk.services.config.transform.GetStoredQueryRequestMarshaller;
import software.amazon.awssdk.services.config.transform.ListAggregateDiscoveredResourcesRequestMarshaller;
import software.amazon.awssdk.services.config.transform.ListConformancePackComplianceScoresRequestMarshaller;
import software.amazon.awssdk.services.config.transform.ListDiscoveredResourcesRequestMarshaller;
import software.amazon.awssdk.services.config.transform.ListResourceEvaluationsRequestMarshaller;
import software.amazon.awssdk.services.config.transform.ListStoredQueriesRequestMarshaller;
import software.amazon.awssdk.services.config.transform.ListTagsForResourceRequestMarshaller;
import software.amazon.awssdk.services.config.transform.PutAggregationAuthorizationRequestMarshaller;
import software.amazon.awssdk.services.config.transform.PutConfigRuleRequestMarshaller;
import software.amazon.awssdk.services.config.transform.PutConfigurationAggregatorRequestMarshaller;
import software.amazon.awssdk.services.config.transform.PutConfigurationRecorderRequestMarshaller;
import software.amazon.awssdk.services.config.transform.PutConformancePackRequestMarshaller;
import software.amazon.awssdk.services.config.transform.PutDeliveryChannelRequestMarshaller;
import software.amazon.awssdk.services.config.transform.PutEvaluationsRequestMarshaller;
import software.amazon.awssdk.services.config.transform.PutExternalEvaluationRequestMarshaller;
import software.amazon.awssdk.services.config.transform.PutOrganizationConfigRuleRequestMarshaller;
import software.amazon.awssdk.services.config.transform.PutOrganizationConformancePackRequestMarshaller;
import software.amazon.awssdk.services.config.transform.PutRemediationConfigurationsRequestMarshaller;
import software.amazon.awssdk.services.config.transform.PutRemediationExceptionsRequestMarshaller;
import software.amazon.awssdk.services.config.transform.PutResourceConfigRequestMarshaller;
import software.amazon.awssdk.services.config.transform.PutRetentionConfigurationRequestMarshaller;
import software.amazon.awssdk.services.config.transform.PutStoredQueryRequestMarshaller;
import software.amazon.awssdk.services.config.transform.SelectAggregateResourceConfigRequestMarshaller;
import software.amazon.awssdk.services.config.transform.SelectResourceConfigRequestMarshaller;
import software.amazon.awssdk.services.config.transform.StartConfigRulesEvaluationRequestMarshaller;
import software.amazon.awssdk.services.config.transform.StartConfigurationRecorderRequestMarshaller;
import software.amazon.awssdk.services.config.transform.StartRemediationExecutionRequestMarshaller;
import software.amazon.awssdk.services.config.transform.StartResourceEvaluationRequestMarshaller;
import software.amazon.awssdk.services.config.transform.StopConfigurationRecorderRequestMarshaller;
import software.amazon.awssdk.services.config.transform.TagResourceRequestMarshaller;
import software.amazon.awssdk.services.config.transform.UntagResourceRequestMarshaller;
import software.amazon.awssdk.utils.CompletableFutureUtils;
/**
* Internal implementation of {@link ConfigAsyncClient}.
*
* @see ConfigAsyncClient#builder()
*/
@Generated("software.amazon.awssdk:codegen")
@SdkInternalApi
final class DefaultConfigAsyncClient implements ConfigAsyncClient {
private static final Logger log = LoggerFactory.getLogger(DefaultConfigAsyncClient.class);
private static final AwsProtocolMetadata protocolMetadata = AwsProtocolMetadata.builder()
.serviceProtocol(AwsServiceProtocol.AWS_JSON).build();
private final AsyncClientHandler clientHandler;
private final AwsJsonProtocolFactory protocolFactory;
private final SdkClientConfiguration clientConfiguration;
protected DefaultConfigAsyncClient(SdkClientConfiguration clientConfiguration) {
this.clientHandler = new AwsAsyncClientHandler(clientConfiguration);
this.clientConfiguration = clientConfiguration.toBuilder().option(SdkClientOption.SDK_CLIENT, this).build();
this.protocolFactory = init(AwsJsonProtocolFactory.builder()).build();
}
/**
*
* Returns the current configuration items for resources that are present in your Config aggregator. The operation
* also returns a list of resources that are not processed in the current request. If there are no unprocessed
* resources, the operation returns an empty unprocessedResourceIdentifiers
list.
*
*
*
* -
*
* The API does not return results for deleted resources.
*
*
* -
*
* The API does not return tags and relationships.
*
*
*
*
*
* @param batchGetAggregateResourceConfigRequest
* @return A Java Future containing the result of the BatchGetAggregateResourceConfig operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - ValidationException The requested action is not valid.
*
* For PutStoredQuery, you will see this exception if there are missing required fields or if the input
* value fails the validation, or if you are trying to create more than 300 queries.
*
*
* For GetStoredQuery, ListStoredQuery, and DeleteStoredQuery you will see this exception if there are
* missing required fields or if the input value fails the validation.
* - NoSuchConfigurationAggregatorException You have specified a configuration aggregator that does not
* exist.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ConfigException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ConfigAsyncClient.BatchGetAggregateResourceConfig
* @see AWS API Documentation
*/
@Override
public CompletableFuture batchGetAggregateResourceConfig(
BatchGetAggregateResourceConfigRequest batchGetAggregateResourceConfigRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(batchGetAggregateResourceConfigRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
batchGetAggregateResourceConfigRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Config Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "BatchGetAggregateResourceConfig");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, BatchGetAggregateResourceConfigResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("BatchGetAggregateResourceConfig").withProtocolMetadata(protocolMetadata)
.withMarshaller(new BatchGetAggregateResourceConfigRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(batchGetAggregateResourceConfigRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns the BaseConfigurationItem
for one or more requested resources. The operation also returns a
* list of resources that are not processed in the current request. If there are no unprocessed resources, the
* operation returns an empty unprocessedResourceKeys list.
*
*
*
* -
*
* The API does not return results for deleted resources.
*
*
* -
*
* The API does not return any tags for the requested resources. This information is filtered out of the
* supplementaryConfiguration section of the API response.
*
*
*
*
*
* @param batchGetResourceConfigRequest
* @return A Java Future containing the result of the BatchGetResourceConfig operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - ValidationException The requested action is not valid.
*
* For PutStoredQuery, you will see this exception if there are missing required fields or if the input
* value fails the validation, or if you are trying to create more than 300 queries.
*
*
* For GetStoredQuery, ListStoredQuery, and DeleteStoredQuery you will see this exception if there are
* missing required fields or if the input value fails the validation.
* - NoAvailableConfigurationRecorderException There are no configuration recorders available to provide
* the role needed to describe your resources. Create a configuration recorder.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ConfigException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ConfigAsyncClient.BatchGetResourceConfig
* @see AWS
* API Documentation
*/
@Override
public CompletableFuture batchGetResourceConfig(
BatchGetResourceConfigRequest batchGetResourceConfigRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(batchGetResourceConfigRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, batchGetResourceConfigRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Config Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "BatchGetResourceConfig");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, BatchGetResourceConfigResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("BatchGetResourceConfig").withProtocolMetadata(protocolMetadata)
.withMarshaller(new BatchGetResourceConfigRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(batchGetResourceConfigRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Deletes the authorization granted to the specified configuration aggregator account in a specified region.
*
*
* @param deleteAggregationAuthorizationRequest
* @return A Java Future containing the result of the DeleteAggregationAuthorization operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InvalidParameterValueException One or more of the specified parameters are not valid. Verify that
* your parameters are valid and try again.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ConfigException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ConfigAsyncClient.DeleteAggregationAuthorization
* @see AWS API Documentation
*/
@Override
public CompletableFuture deleteAggregationAuthorization(
DeleteAggregationAuthorizationRequest deleteAggregationAuthorizationRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteAggregationAuthorizationRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
deleteAggregationAuthorizationRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Config Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteAggregationAuthorization");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteAggregationAuthorizationResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteAggregationAuthorization").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DeleteAggregationAuthorizationRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(deleteAggregationAuthorizationRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Deletes the specified Config rule and all of its evaluation results.
*
*
* Config sets the state of a rule to DELETING
until the deletion is complete. You cannot update a rule
* while it is in this state. If you make a PutConfigRule
or DeleteConfigRule
request for
* the rule, you will receive a ResourceInUseException
.
*
*
* You can check the state of a rule by using the DescribeConfigRules
request.
*
*
* @param deleteConfigRuleRequest
* @return A Java Future containing the result of the DeleteConfigRule operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - NoSuchConfigRuleException The Config rule in the request is not valid. Verify that the rule is an
* Config Process Check rule, that the rule name is correct, and that valid Amazon Resouce Names (ARNs) are
* used before trying again.
* - ResourceInUseException You see this exception in the following cases:
*
* -
*
* For DeleteConfigRule, Config is deleting this rule. Try your request again later.
*
*
* -
*
* For DeleteConfigRule, the rule is deleting your evaluation results. Try your request again later.
*
*
* -
*
* For DeleteConfigRule, a remediation action is associated with the rule and Config cannot delete this
* rule. Delete the remediation action associated with the rule before deleting the rule and try your
* request again later.
*
*
* -
*
* For PutConfigOrganizationRule, organization Config rule deletion is in progress. Try your request again
* later.
*
*
* -
*
* For DeleteOrganizationConfigRule, organization Config rule creation is in progress. Try your request
* again later.
*
*
* -
*
* For PutConformancePack and PutOrganizationConformancePack, a conformance pack creation, update, and
* deletion is in progress. Try your request again later.
*
*
* -
*
* For DeleteConformancePack, a conformance pack creation, update, and deletion is in progress. Try your
* request again later.
*
*
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ConfigException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ConfigAsyncClient.DeleteConfigRule
* @see AWS API
* Documentation
*/
@Override
public CompletableFuture deleteConfigRule(DeleteConfigRuleRequest deleteConfigRuleRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteConfigRuleRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteConfigRuleRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Config Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteConfigRule");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteConfigRuleResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteConfigRule").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DeleteConfigRuleRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(deleteConfigRuleRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Deletes the specified configuration aggregator and the aggregated data associated with the aggregator.
*
*
* @param deleteConfigurationAggregatorRequest
* @return A Java Future containing the result of the DeleteConfigurationAggregator operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - NoSuchConfigurationAggregatorException You have specified a configuration aggregator that does not
* exist.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ConfigException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ConfigAsyncClient.DeleteConfigurationAggregator
* @see AWS API Documentation
*/
@Override
public CompletableFuture deleteConfigurationAggregator(
DeleteConfigurationAggregatorRequest deleteConfigurationAggregatorRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteConfigurationAggregatorRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
deleteConfigurationAggregatorRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Config Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteConfigurationAggregator");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteConfigurationAggregatorResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteConfigurationAggregator").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DeleteConfigurationAggregatorRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(deleteConfigurationAggregatorRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Deletes the configuration recorder.
*
*
* After the configuration recorder is deleted, Config will not record resource configuration changes until you
* create a new configuration recorder.
*
*
* This action does not delete the configuration information that was previously recorded. You will be able to
* access the previously recorded information by using the GetResourceConfigHistory
action, but you
* will not be able to access this information in the Config console until you create a new configuration recorder.
*
*
* @param deleteConfigurationRecorderRequest
* The request object for the DeleteConfigurationRecorder
action.
* @return A Java Future containing the result of the DeleteConfigurationRecorder operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - NoSuchConfigurationRecorderException You have specified a configuration recorder that does not exist.
*
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ConfigException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ConfigAsyncClient.DeleteConfigurationRecorder
* @see AWS API Documentation
*/
@Override
public CompletableFuture deleteConfigurationRecorder(
DeleteConfigurationRecorderRequest deleteConfigurationRecorderRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteConfigurationRecorderRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteConfigurationRecorderRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Config Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteConfigurationRecorder");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteConfigurationRecorderResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteConfigurationRecorder").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DeleteConfigurationRecorderRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(deleteConfigurationRecorderRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Deletes the specified conformance pack and all the Config rules, remediation actions, and all evaluation results
* within that conformance pack.
*
*
* Config sets the conformance pack to DELETE_IN_PROGRESS
until the deletion is complete. You cannot
* update a conformance pack while it is in this state.
*
*
* @param deleteConformancePackRequest
* @return A Java Future containing the result of the DeleteConformancePack operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - NoSuchConformancePackException You specified one or more conformance packs that do not exist.
* - ResourceInUseException You see this exception in the following cases:
*
* -
*
* For DeleteConfigRule, Config is deleting this rule. Try your request again later.
*
*
* -
*
* For DeleteConfigRule, the rule is deleting your evaluation results. Try your request again later.
*
*
* -
*
* For DeleteConfigRule, a remediation action is associated with the rule and Config cannot delete this
* rule. Delete the remediation action associated with the rule before deleting the rule and try your
* request again later.
*
*
* -
*
* For PutConfigOrganizationRule, organization Config rule deletion is in progress. Try your request again
* later.
*
*
* -
*
* For DeleteOrganizationConfigRule, organization Config rule creation is in progress. Try your request
* again later.
*
*
* -
*
* For PutConformancePack and PutOrganizationConformancePack, a conformance pack creation, update, and
* deletion is in progress. Try your request again later.
*
*
* -
*
* For DeleteConformancePack, a conformance pack creation, update, and deletion is in progress. Try your
* request again later.
*
*
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ConfigException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ConfigAsyncClient.DeleteConformancePack
* @see AWS
* API Documentation
*/
@Override
public CompletableFuture deleteConformancePack(
DeleteConformancePackRequest deleteConformancePackRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteConformancePackRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteConformancePackRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Config Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteConformancePack");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteConformancePackResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteConformancePack").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DeleteConformancePackRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(deleteConformancePackRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Deletes the delivery channel.
*
*
* Before you can delete the delivery channel, you must stop the configuration recorder by using the
* StopConfigurationRecorder action.
*
*
* @param deleteDeliveryChannelRequest
* The input for the DeleteDeliveryChannel action. The action accepts the following data, in JSON
* format.
* @return A Java Future containing the result of the DeleteDeliveryChannel operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - NoSuchDeliveryChannelException You have specified a delivery channel that does not exist.
* - LastDeliveryChannelDeleteFailedException You cannot delete the delivery channel you specified because
* the configuration recorder is running.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ConfigException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ConfigAsyncClient.DeleteDeliveryChannel
* @see AWS
* API Documentation
*/
@Override
public CompletableFuture deleteDeliveryChannel(
DeleteDeliveryChannelRequest deleteDeliveryChannelRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteDeliveryChannelRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteDeliveryChannelRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Config Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteDeliveryChannel");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteDeliveryChannelResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteDeliveryChannel").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DeleteDeliveryChannelRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(deleteDeliveryChannelRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Deletes the evaluation results for the specified Config rule. You can specify one Config rule per request. After
* you delete the evaluation results, you can call the StartConfigRulesEvaluation API to start evaluating
* your Amazon Web Services resources against the rule.
*
*
* @param deleteEvaluationResultsRequest
* @return A Java Future containing the result of the DeleteEvaluationResults operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - NoSuchConfigRuleException The Config rule in the request is not valid. Verify that the rule is an
* Config Process Check rule, that the rule name is correct, and that valid Amazon Resouce Names (ARNs) are
* used before trying again.
* - ResourceInUseException You see this exception in the following cases:
*
* -
*
* For DeleteConfigRule, Config is deleting this rule. Try your request again later.
*
*
* -
*
* For DeleteConfigRule, the rule is deleting your evaluation results. Try your request again later.
*
*
* -
*
* For DeleteConfigRule, a remediation action is associated with the rule and Config cannot delete this
* rule. Delete the remediation action associated with the rule before deleting the rule and try your
* request again later.
*
*
* -
*
* For PutConfigOrganizationRule, organization Config rule deletion is in progress. Try your request again
* later.
*
*
* -
*
* For DeleteOrganizationConfigRule, organization Config rule creation is in progress. Try your request
* again later.
*
*
* -
*
* For PutConformancePack and PutOrganizationConformancePack, a conformance pack creation, update, and
* deletion is in progress. Try your request again later.
*
*
* -
*
* For DeleteConformancePack, a conformance pack creation, update, and deletion is in progress. Try your
* request again later.
*
*
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ConfigException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ConfigAsyncClient.DeleteEvaluationResults
* @see AWS API Documentation
*/
@Override
public CompletableFuture deleteEvaluationResults(
DeleteEvaluationResultsRequest deleteEvaluationResultsRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteEvaluationResultsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteEvaluationResultsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Config Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteEvaluationResults");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteEvaluationResultsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteEvaluationResults").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DeleteEvaluationResultsRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(deleteEvaluationResultsRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Deletes the specified organization Config rule and all of its evaluation results from all member accounts in that
* organization.
*
*
* Only a management account and a delegated administrator account can delete an organization Config rule. When
* calling this API with a delegated administrator, you must ensure Organizations
* ListDelegatedAdministrator
permissions are added.
*
*
* Config sets the state of a rule to DELETE_IN_PROGRESS until the deletion is complete. You cannot update a rule
* while it is in this state.
*
*
* @param deleteOrganizationConfigRuleRequest
* @return A Java Future containing the result of the DeleteOrganizationConfigRule operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - NoSuchOrganizationConfigRuleException The Config rule in the request is not valid. Verify that the
* rule is an organization Config Process Check rule, that the rule name is correct, and that valid Amazon
* Resouce Names (ARNs) are used before trying again.
* - ResourceInUseException You see this exception in the following cases:
*
* -
*
* For DeleteConfigRule, Config is deleting this rule. Try your request again later.
*
*
* -
*
* For DeleteConfigRule, the rule is deleting your evaluation results. Try your request again later.
*
*
* -
*
* For DeleteConfigRule, a remediation action is associated with the rule and Config cannot delete this
* rule. Delete the remediation action associated with the rule before deleting the rule and try your
* request again later.
*
*
* -
*
* For PutConfigOrganizationRule, organization Config rule deletion is in progress. Try your request again
* later.
*
*
* -
*
* For DeleteOrganizationConfigRule, organization Config rule creation is in progress. Try your request
* again later.
*
*
* -
*
* For PutConformancePack and PutOrganizationConformancePack, a conformance pack creation, update, and
* deletion is in progress. Try your request again later.
*
*
* -
*
* For DeleteConformancePack, a conformance pack creation, update, and deletion is in progress. Try your
* request again later.
*
*
* - OrganizationAccessDeniedException For
PutConfigurationAggregator
API, you can see this
* exception for the following reasons:
*
* -
*
* No permission to call EnableAWSServiceAccess
API
*
*
* -
*
* The configuration aggregator cannot be updated because your Amazon Web Services Organization management
* account or the delegated administrator role changed. Delete this aggregator and create a new one with the
* current Amazon Web Services Organization.
*
*
* -
*
* The configuration aggregator is associated with a previous Amazon Web Services Organization and Config
* cannot aggregate data with current Amazon Web Services Organization. Delete this aggregator and create a
* new one with the current Amazon Web Services Organization.
*
*
* -
*
* You are not a registered delegated administrator for Config with permissions to call
* ListDelegatedAdministrators
API. Ensure that the management account registers delagated
* administrator for Config service principle name before the delegated administrator creates an aggregator.
*
*
*
*
* For all OrganizationConfigRule
and OrganizationConformancePack
APIs, Config
* throws an exception if APIs are called from member accounts. All APIs must be called from organization
* management account.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ConfigException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ConfigAsyncClient.DeleteOrganizationConfigRule
* @see AWS API Documentation
*/
@Override
public CompletableFuture deleteOrganizationConfigRule(
DeleteOrganizationConfigRuleRequest deleteOrganizationConfigRuleRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteOrganizationConfigRuleRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteOrganizationConfigRuleRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Config Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteOrganizationConfigRule");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteOrganizationConfigRuleResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteOrganizationConfigRule").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DeleteOrganizationConfigRuleRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(deleteOrganizationConfigRuleRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Deletes the specified organization conformance pack and all of the Config rules and remediation actions from all
* member accounts in that organization.
*
*
* Only a management account or a delegated administrator account can delete an organization conformance pack. When
* calling this API with a delegated administrator, you must ensure Organizations
* ListDelegatedAdministrator
permissions are added.
*
*
* Config sets the state of a conformance pack to DELETE_IN_PROGRESS until the deletion is complete. You cannot
* update a conformance pack while it is in this state.
*
*
* @param deleteOrganizationConformancePackRequest
* @return A Java Future containing the result of the DeleteOrganizationConformancePack operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - NoSuchOrganizationConformancePackException Config organization conformance pack that you passed in
* the filter does not exist.
*
* For DeleteOrganizationConformancePack, you tried to delete an organization conformance pack that does not
* exist.
* - ResourceInUseException You see this exception in the following cases:
*
* -
*
* For DeleteConfigRule, Config is deleting this rule. Try your request again later.
*
*
* -
*
* For DeleteConfigRule, the rule is deleting your evaluation results. Try your request again later.
*
*
* -
*
* For DeleteConfigRule, a remediation action is associated with the rule and Config cannot delete this
* rule. Delete the remediation action associated with the rule before deleting the rule and try your
* request again later.
*
*
* -
*
* For PutConfigOrganizationRule, organization Config rule deletion is in progress. Try your request again
* later.
*
*
* -
*
* For DeleteOrganizationConfigRule, organization Config rule creation is in progress. Try your request
* again later.
*
*
* -
*
* For PutConformancePack and PutOrganizationConformancePack, a conformance pack creation, update, and
* deletion is in progress. Try your request again later.
*
*
* -
*
* For DeleteConformancePack, a conformance pack creation, update, and deletion is in progress. Try your
* request again later.
*
*
* - OrganizationAccessDeniedException For
PutConfigurationAggregator
API, you can see this
* exception for the following reasons:
*
* -
*
* No permission to call EnableAWSServiceAccess
API
*
*
* -
*
* The configuration aggregator cannot be updated because your Amazon Web Services Organization management
* account or the delegated administrator role changed. Delete this aggregator and create a new one with the
* current Amazon Web Services Organization.
*
*
* -
*
* The configuration aggregator is associated with a previous Amazon Web Services Organization and Config
* cannot aggregate data with current Amazon Web Services Organization. Delete this aggregator and create a
* new one with the current Amazon Web Services Organization.
*
*
* -
*
* You are not a registered delegated administrator for Config with permissions to call
* ListDelegatedAdministrators
API. Ensure that the management account registers delagated
* administrator for Config service principle name before the delegated administrator creates an aggregator.
*
*
*
*
* For all OrganizationConfigRule
and OrganizationConformancePack
APIs, Config
* throws an exception if APIs are called from member accounts. All APIs must be called from organization
* management account.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ConfigException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ConfigAsyncClient.DeleteOrganizationConformancePack
* @see AWS API Documentation
*/
@Override
public CompletableFuture deleteOrganizationConformancePack(
DeleteOrganizationConformancePackRequest deleteOrganizationConformancePackRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteOrganizationConformancePackRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
deleteOrganizationConformancePackRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Config Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteOrganizationConformancePack");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(operationMetadata, DeleteOrganizationConformancePackResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteOrganizationConformancePack").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DeleteOrganizationConformancePackRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(deleteOrganizationConformancePackRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Deletes pending authorization requests for a specified aggregator account in a specified region.
*
*
* @param deletePendingAggregationRequestRequest
* @return A Java Future containing the result of the DeletePendingAggregationRequest operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InvalidParameterValueException One or more of the specified parameters are not valid. Verify that
* your parameters are valid and try again.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ConfigException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ConfigAsyncClient.DeletePendingAggregationRequest
* @see AWS API Documentation
*/
@Override
public CompletableFuture deletePendingAggregationRequest(
DeletePendingAggregationRequestRequest deletePendingAggregationRequestRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deletePendingAggregationRequestRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
deletePendingAggregationRequestRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Config Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeletePendingAggregationRequest");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeletePendingAggregationRequestResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeletePendingAggregationRequest").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DeletePendingAggregationRequestRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(deletePendingAggregationRequestRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Deletes the remediation configuration.
*
*
* @param deleteRemediationConfigurationRequest
* @return A Java Future containing the result of the DeleteRemediationConfiguration operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - NoSuchRemediationConfigurationException You specified an Config rule without a remediation
* configuration.
* - RemediationInProgressException Remediation action is in progress. You can either cancel execution in
* Amazon Web Services Systems Manager or wait and try again later.
* - InsufficientPermissionsException Indicates one of the following errors:
*
* -
*
* For PutConfigRule, the rule cannot be created because the IAM role assigned to Config lacks permissions
* to perform the config:Put* action.
*
*
* -
*
* For PutConfigRule, the Lambda function cannot be invoked. Check the function ARN, and check the
* function's permissions.
*
*
* -
*
* For PutOrganizationConfigRule, organization Config rule cannot be created because you do not have
* permissions to call IAM GetRole
action or create a service-linked role.
*
*
* -
*
* For PutConformancePack and PutOrganizationConformancePack, a conformance pack cannot be created because
* you do not have the following permissions:
*
*
* -
*
* You do not have permission to call IAM GetRole
action or create a service-linked role.
*
*
* -
*
* You do not have permission to read Amazon S3 bucket or call SSM:GetDocument.
*
*
*
*
* - InvalidParameterValueException One or more of the specified parameters are not valid. Verify that
* your parameters are valid and try again.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ConfigException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ConfigAsyncClient.DeleteRemediationConfiguration
* @see AWS API Documentation
*/
@Override
public CompletableFuture deleteRemediationConfiguration(
DeleteRemediationConfigurationRequest deleteRemediationConfigurationRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteRemediationConfigurationRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
deleteRemediationConfigurationRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Config Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteRemediationConfiguration");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteRemediationConfigurationResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteRemediationConfiguration").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DeleteRemediationConfigurationRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(deleteRemediationConfigurationRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Deletes one or more remediation exceptions mentioned in the resource keys.
*
*
*
* Config generates a remediation exception when a problem occurs executing a remediation action to a specific
* resource. Remediation exceptions blocks auto-remediation until the exception is cleared.
*
*
*
* @param deleteRemediationExceptionsRequest
* @return A Java Future containing the result of the DeleteRemediationExceptions operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - NoSuchRemediationExceptionException You tried to delete a remediation exception that does not exist.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ConfigException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ConfigAsyncClient.DeleteRemediationExceptions
* @see AWS API Documentation
*/
@Override
public CompletableFuture deleteRemediationExceptions(
DeleteRemediationExceptionsRequest deleteRemediationExceptionsRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteRemediationExceptionsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteRemediationExceptionsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Config Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteRemediationExceptions");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteRemediationExceptionsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteRemediationExceptions").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DeleteRemediationExceptionsRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(deleteRemediationExceptionsRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Records the configuration state for a custom resource that has been deleted. This API records a new
* ConfigurationItem with a ResourceDeleted status. You can retrieve the ConfigurationItems recorded for this
* resource in your Config History.
*
*
* @param deleteResourceConfigRequest
* @return A Java Future containing the result of the DeleteResourceConfig operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - ValidationException The requested action is not valid.
*
* For PutStoredQuery, you will see this exception if there are missing required fields or if the input
* value fails the validation, or if you are trying to create more than 300 queries.
*
*
* For GetStoredQuery, ListStoredQuery, and DeleteStoredQuery you will see this exception if there are
* missing required fields or if the input value fails the validation.
* - NoRunningConfigurationRecorderException There is no configuration recorder running.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ConfigException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ConfigAsyncClient.DeleteResourceConfig
* @see AWS
* API Documentation
*/
@Override
public CompletableFuture deleteResourceConfig(
DeleteResourceConfigRequest deleteResourceConfigRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteResourceConfigRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteResourceConfigRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Config Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteResourceConfig");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteResourceConfigResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteResourceConfig").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DeleteResourceConfigRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(deleteResourceConfigRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Deletes the retention configuration.
*
*
* @param deleteRetentionConfigurationRequest
* @return A Java Future containing the result of the DeleteRetentionConfiguration operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InvalidParameterValueException One or more of the specified parameters are not valid. Verify that
* your parameters are valid and try again.
* - NoSuchRetentionConfigurationException You have specified a retention configuration that does not
* exist.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ConfigException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ConfigAsyncClient.DeleteRetentionConfiguration
* @see AWS API Documentation
*/
@Override
public CompletableFuture deleteRetentionConfiguration(
DeleteRetentionConfigurationRequest deleteRetentionConfigurationRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteRetentionConfigurationRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteRetentionConfigurationRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Config Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteRetentionConfiguration");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteRetentionConfigurationResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteRetentionConfiguration").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DeleteRetentionConfigurationRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(deleteRetentionConfigurationRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Deletes the stored query for a single Amazon Web Services account and a single Amazon Web Services Region.
*
*
* @param deleteStoredQueryRequest
* @return A Java Future containing the result of the DeleteStoredQuery operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - ValidationException The requested action is not valid.
*
* For PutStoredQuery, you will see this exception if there are missing required fields or if the input
* value fails the validation, or if you are trying to create more than 300 queries.
*
*
* For GetStoredQuery, ListStoredQuery, and DeleteStoredQuery you will see this exception if there are
* missing required fields or if the input value fails the validation.
* - ResourceNotFoundException You have specified a resource that does not exist.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ConfigException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ConfigAsyncClient.DeleteStoredQuery
* @see AWS API
* Documentation
*/
@Override
public CompletableFuture deleteStoredQuery(DeleteStoredQueryRequest deleteStoredQueryRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteStoredQueryRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteStoredQueryRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Config Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteStoredQuery");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteStoredQueryResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteStoredQuery").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DeleteStoredQueryRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(deleteStoredQueryRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Schedules delivery of a configuration snapshot to the Amazon S3 bucket in the specified delivery channel. After
* the delivery has started, Config sends the following notifications using an Amazon SNS topic that you have
* specified.
*
*
* -
*
* Notification of the start of the delivery.
*
*
* -
*
* Notification of the completion of the delivery, if the delivery was successfully completed.
*
*
* -
*
* Notification of delivery failure, if the delivery failed.
*
*
*
*
* @param deliverConfigSnapshotRequest
* The input for the DeliverConfigSnapshot action.
* @return A Java Future containing the result of the DeliverConfigSnapshot operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - NoSuchDeliveryChannelException You have specified a delivery channel that does not exist.
* - NoAvailableConfigurationRecorderException There are no configuration recorders available to provide
* the role needed to describe your resources. Create a configuration recorder.
* - NoRunningConfigurationRecorderException There is no configuration recorder running.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ConfigException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ConfigAsyncClient.DeliverConfigSnapshot
* @see AWS
* API Documentation
*/
@Override
public CompletableFuture deliverConfigSnapshot(
DeliverConfigSnapshotRequest deliverConfigSnapshotRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deliverConfigSnapshotRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deliverConfigSnapshotRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Config Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeliverConfigSnapshot");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeliverConfigSnapshotResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeliverConfigSnapshot").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DeliverConfigSnapshotRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(deliverConfigSnapshotRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns a list of compliant and noncompliant rules with the number of resources for compliant and noncompliant
* rules. Does not display rules that do not have compliance results.
*
*
*
* The results can return an empty result page, but if you have a nextToken
, the results are displayed
* on the next page.
*
*
*
* @param describeAggregateComplianceByConfigRulesRequest
* @return A Java Future containing the result of the DescribeAggregateComplianceByConfigRules operation returned by
* the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - ValidationException The requested action is not valid.
*
* For PutStoredQuery, you will see this exception if there are missing required fields or if the input
* value fails the validation, or if you are trying to create more than 300 queries.
*
*
* For GetStoredQuery, ListStoredQuery, and DeleteStoredQuery you will see this exception if there are
* missing required fields or if the input value fails the validation.
* - InvalidLimitException The specified limit is outside the allowable range.
* - InvalidNextTokenException The specified next token is not valid. Specify the
nextToken
* string that was returned in the previous response to get the next page of results.
* - NoSuchConfigurationAggregatorException You have specified a configuration aggregator that does not
* exist.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ConfigException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ConfigAsyncClient.DescribeAggregateComplianceByConfigRules
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeAggregateComplianceByConfigRules(
DescribeAggregateComplianceByConfigRulesRequest describeAggregateComplianceByConfigRulesRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(
describeAggregateComplianceByConfigRulesRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
describeAggregateComplianceByConfigRulesRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Config Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeAggregateComplianceByConfigRules");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(operationMetadata, DescribeAggregateComplianceByConfigRulesResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeAggregateComplianceByConfigRules").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DescribeAggregateComplianceByConfigRulesRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(describeAggregateComplianceByConfigRulesRequest));
CompletableFuture whenCompleted = executeFuture
.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns a list of the conformance packs and their associated compliance status with the count of compliant and
* noncompliant Config rules within each conformance pack. Also returns the total rule count which includes
* compliant rules, noncompliant rules, and rules that cannot be evaluated due to insufficient data.
*
*
*
* The results can return an empty result page, but if you have a nextToken
, the results are displayed
* on the next page.
*
*
*
* @param describeAggregateComplianceByConformancePacksRequest
* @return A Java Future containing the result of the DescribeAggregateComplianceByConformancePacks operation
* returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - ValidationException The requested action is not valid.
*
* For PutStoredQuery, you will see this exception if there are missing required fields or if the input
* value fails the validation, or if you are trying to create more than 300 queries.
*
*
* For GetStoredQuery, ListStoredQuery, and DeleteStoredQuery you will see this exception if there are
* missing required fields or if the input value fails the validation.
* - InvalidLimitException The specified limit is outside the allowable range.
* - InvalidNextTokenException The specified next token is not valid. Specify the
nextToken
* string that was returned in the previous response to get the next page of results.
* - NoSuchConfigurationAggregatorException You have specified a configuration aggregator that does not
* exist.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ConfigException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ConfigAsyncClient.DescribeAggregateComplianceByConformancePacks
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeAggregateComplianceByConformancePacks(
DescribeAggregateComplianceByConformancePacksRequest describeAggregateComplianceByConformancePacksRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(
describeAggregateComplianceByConformancePacksRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
describeAggregateComplianceByConformancePacksRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Config Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeAggregateComplianceByConformancePacks");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(operationMetadata, DescribeAggregateComplianceByConformancePacksResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeAggregateComplianceByConformancePacks")
.withProtocolMetadata(protocolMetadata)
.withMarshaller(new DescribeAggregateComplianceByConformancePacksRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(describeAggregateComplianceByConformancePacksRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((
r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns a list of authorizations granted to various aggregator accounts and regions.
*
*
* @param describeAggregationAuthorizationsRequest
* @return A Java Future containing the result of the DescribeAggregationAuthorizations operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InvalidParameterValueException One or more of the specified parameters are not valid. Verify that
* your parameters are valid and try again.
* - InvalidNextTokenException The specified next token is not valid. Specify the
nextToken
* string that was returned in the previous response to get the next page of results.
* - InvalidLimitException The specified limit is outside the allowable range.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ConfigException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ConfigAsyncClient.DescribeAggregationAuthorizations
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeAggregationAuthorizations(
DescribeAggregationAuthorizationsRequest describeAggregationAuthorizationsRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeAggregationAuthorizationsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
describeAggregationAuthorizationsRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Config Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeAggregationAuthorizations");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(operationMetadata, DescribeAggregationAuthorizationsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeAggregationAuthorizations").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DescribeAggregationAuthorizationsRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(describeAggregationAuthorizationsRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Indicates whether the specified Config rules are compliant. If a rule is noncompliant, this action returns the
* number of Amazon Web Services resources that do not comply with the rule.
*
*
* A rule is compliant if all of the evaluated resources comply with it. It is noncompliant if any of these
* resources do not comply.
*
*
* If Config has no current evaluation results for the rule, it returns INSUFFICIENT_DATA
. This result
* might indicate one of the following conditions:
*
*
* -
*
* Config has never invoked an evaluation for the rule. To check whether it has, use the
* DescribeConfigRuleEvaluationStatus
action to get the LastSuccessfulInvocationTime
and
* LastFailedInvocationTime
.
*
*
* -
*
* The rule's Lambda function is failing to send evaluation results to Config. Verify that the role you assigned to
* your configuration recorder includes the config:PutEvaluations
permission. If the rule is a custom
* rule, verify that the Lambda execution role includes the config:PutEvaluations
permission.
*
*
* -
*
* The rule's Lambda function has returned NOT_APPLICABLE
for all evaluation results. This can occur if
* the resources were deleted or removed from the rule's scope.
*
*
*
*
* @param describeComplianceByConfigRuleRequest
* @return A Java Future containing the result of the DescribeComplianceByConfigRule operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InvalidParameterValueException One or more of the specified parameters are not valid. Verify that
* your parameters are valid and try again.
* - NoSuchConfigRuleException The Config rule in the request is not valid. Verify that the rule is an
* Config Process Check rule, that the rule name is correct, and that valid Amazon Resouce Names (ARNs) are
* used before trying again.
* - InvalidNextTokenException The specified next token is not valid. Specify the
nextToken
* string that was returned in the previous response to get the next page of results.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ConfigException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ConfigAsyncClient.DescribeComplianceByConfigRule
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeComplianceByConfigRule(
DescribeComplianceByConfigRuleRequest describeComplianceByConfigRuleRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeComplianceByConfigRuleRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
describeComplianceByConfigRuleRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Config Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeComplianceByConfigRule");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DescribeComplianceByConfigRuleResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeComplianceByConfigRule").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DescribeComplianceByConfigRuleRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(describeComplianceByConfigRuleRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Indicates whether the specified Amazon Web Services resources are compliant. If a resource is noncompliant, this
* action returns the number of Config rules that the resource does not comply with.
*
*
* A resource is compliant if it complies with all the Config rules that evaluate it. It is noncompliant if it does
* not comply with one or more of these rules.
*
*
* If Config has no current evaluation results for the resource, it returns INSUFFICIENT_DATA
. This
* result might indicate one of the following conditions about the rules that evaluate the resource:
*
*
* -
*
* Config has never invoked an evaluation for the rule. To check whether it has, use the
* DescribeConfigRuleEvaluationStatus
action to get the LastSuccessfulInvocationTime
and
* LastFailedInvocationTime
.
*
*
* -
*
* The rule's Lambda function is failing to send evaluation results to Config. Verify that the role that you
* assigned to your configuration recorder includes the config:PutEvaluations
permission. If the rule
* is a custom rule, verify that the Lambda execution role includes the config:PutEvaluations
* permission.
*
*
* -
*
* The rule's Lambda function has returned NOT_APPLICABLE
for all evaluation results. This can occur if
* the resources were deleted or removed from the rule's scope.
*
*
*
*
* @param describeComplianceByResourceRequest
* @return A Java Future containing the result of the DescribeComplianceByResource operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InvalidParameterValueException One or more of the specified parameters are not valid. Verify that
* your parameters are valid and try again.
* - InvalidNextTokenException The specified next token is not valid. Specify the
nextToken
* string that was returned in the previous response to get the next page of results.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ConfigException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ConfigAsyncClient.DescribeComplianceByResource
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeComplianceByResource(
DescribeComplianceByResourceRequest describeComplianceByResourceRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeComplianceByResourceRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, describeComplianceByResourceRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Config Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeComplianceByResource");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DescribeComplianceByResourceResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeComplianceByResource").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DescribeComplianceByResourceRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(describeComplianceByResourceRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns status information for each of your Config managed rules. The status includes information such as the
* last time Config invoked the rule, the last time Config failed to invoke the rule, and the related error for the
* last failure.
*
*
* @param describeConfigRuleEvaluationStatusRequest
* @return A Java Future containing the result of the DescribeConfigRuleEvaluationStatus operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - NoSuchConfigRuleException The Config rule in the request is not valid. Verify that the rule is an
* Config Process Check rule, that the rule name is correct, and that valid Amazon Resouce Names (ARNs) are
* used before trying again.
* - InvalidParameterValueException One or more of the specified parameters are not valid. Verify that
* your parameters are valid and try again.
* - InvalidNextTokenException The specified next token is not valid. Specify the
nextToken
* string that was returned in the previous response to get the next page of results.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ConfigException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ConfigAsyncClient.DescribeConfigRuleEvaluationStatus
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeConfigRuleEvaluationStatus(
DescribeConfigRuleEvaluationStatusRequest describeConfigRuleEvaluationStatusRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeConfigRuleEvaluationStatusRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
describeConfigRuleEvaluationStatusRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Config Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeConfigRuleEvaluationStatus");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(operationMetadata, DescribeConfigRuleEvaluationStatusResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeConfigRuleEvaluationStatus").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DescribeConfigRuleEvaluationStatusRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(describeConfigRuleEvaluationStatusRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns details about your Config rules.
*
*
* @param describeConfigRulesRequest
* @return A Java Future containing the result of the DescribeConfigRules operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - NoSuchConfigRuleException The Config rule in the request is not valid. Verify that the rule is an
* Config Process Check rule, that the rule name is correct, and that valid Amazon Resouce Names (ARNs) are
* used before trying again.
* - InvalidNextTokenException The specified next token is not valid. Specify the
nextToken
* string that was returned in the previous response to get the next page of results.
* - InvalidParameterValueException One or more of the specified parameters are not valid. Verify that
* your parameters are valid and try again.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ConfigException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ConfigAsyncClient.DescribeConfigRules
* @see AWS
* API Documentation
*/
@Override
public CompletableFuture describeConfigRules(
DescribeConfigRulesRequest describeConfigRulesRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeConfigRulesRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, describeConfigRulesRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Config Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeConfigRules");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DescribeConfigRulesResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeConfigRules").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DescribeConfigRulesRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(describeConfigRulesRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns status information for sources within an aggregator. The status includes information about the last time
* Config verified authorization between the source account and an aggregator account. In case of a failure, the
* status contains the related error code or message.
*
*
* @param describeConfigurationAggregatorSourcesStatusRequest
* @return A Java Future containing the result of the DescribeConfigurationAggregatorSourcesStatus operation
* returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InvalidParameterValueException One or more of the specified parameters are not valid. Verify that
* your parameters are valid and try again.
* - NoSuchConfigurationAggregatorException You have specified a configuration aggregator that does not
* exist.
* - InvalidNextTokenException The specified next token is not valid. Specify the
nextToken
* string that was returned in the previous response to get the next page of results.
* - InvalidLimitException The specified limit is outside the allowable range.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ConfigException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ConfigAsyncClient.DescribeConfigurationAggregatorSourcesStatus
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeConfigurationAggregatorSourcesStatus(
DescribeConfigurationAggregatorSourcesStatusRequest describeConfigurationAggregatorSourcesStatusRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(
describeConfigurationAggregatorSourcesStatusRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
describeConfigurationAggregatorSourcesStatusRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Config Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeConfigurationAggregatorSourcesStatus");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(operationMetadata, DescribeConfigurationAggregatorSourcesStatusResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeConfigurationAggregatorSourcesStatus")
.withProtocolMetadata(protocolMetadata)
.withMarshaller(new DescribeConfigurationAggregatorSourcesStatusRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(describeConfigurationAggregatorSourcesStatusRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((
r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns the details of one or more configuration aggregators. If the configuration aggregator is not specified,
* this action returns the details for all the configuration aggregators associated with the account.
*
*
* @param describeConfigurationAggregatorsRequest
* @return A Java Future containing the result of the DescribeConfigurationAggregators operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InvalidParameterValueException One or more of the specified parameters are not valid. Verify that
* your parameters are valid and try again.
* - NoSuchConfigurationAggregatorException You have specified a configuration aggregator that does not
* exist.
* - InvalidNextTokenException The specified next token is not valid. Specify the
nextToken
* string that was returned in the previous response to get the next page of results.
* - InvalidLimitException The specified limit is outside the allowable range.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ConfigException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ConfigAsyncClient.DescribeConfigurationAggregators
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeConfigurationAggregators(
DescribeConfigurationAggregatorsRequest describeConfigurationAggregatorsRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeConfigurationAggregatorsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
describeConfigurationAggregatorsRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Config Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeConfigurationAggregators");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(operationMetadata, DescribeConfigurationAggregatorsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeConfigurationAggregators").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DescribeConfigurationAggregatorsRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(describeConfigurationAggregatorsRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns the current status of the specified configuration recorder as well as the status of the last recording
* event for the recorder. If a configuration recorder is not specified, this action returns the status of all
* configuration recorders associated with the account.
*
*
*
* >You can specify only one configuration recorder for each Amazon Web Services Region for each account. For a
* detailed status of recording events over time, add your Config events to Amazon CloudWatch metrics and use
* CloudWatch metrics.
*
*
*
* @param describeConfigurationRecorderStatusRequest
* The input for the DescribeConfigurationRecorderStatus action.
* @return A Java Future containing the result of the DescribeConfigurationRecorderStatus operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - NoSuchConfigurationRecorderException You have specified a configuration recorder that does not exist.
*
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ConfigException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ConfigAsyncClient.DescribeConfigurationRecorderStatus
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeConfigurationRecorderStatus(
DescribeConfigurationRecorderStatusRequest describeConfigurationRecorderStatusRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeConfigurationRecorderStatusRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
describeConfigurationRecorderStatusRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Config Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeConfigurationRecorderStatus");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(operationMetadata, DescribeConfigurationRecorderStatusResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeConfigurationRecorderStatus").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DescribeConfigurationRecorderStatusRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(describeConfigurationRecorderStatusRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns the details for the specified configuration recorders. If the configuration recorder is not specified,
* this action returns the details for all configuration recorders associated with the account.
*
*
*
* You can specify only one configuration recorder for each Amazon Web Services Region for each account.
*
*
*
* @param describeConfigurationRecordersRequest
* The input for the DescribeConfigurationRecorders action.
* @return A Java Future containing the result of the DescribeConfigurationRecorders operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - NoSuchConfigurationRecorderException You have specified a configuration recorder that does not exist.
*
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ConfigException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ConfigAsyncClient.DescribeConfigurationRecorders
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeConfigurationRecorders(
DescribeConfigurationRecordersRequest describeConfigurationRecordersRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeConfigurationRecordersRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
describeConfigurationRecordersRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Config Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeConfigurationRecorders");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DescribeConfigurationRecordersResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeConfigurationRecorders").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DescribeConfigurationRecordersRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(describeConfigurationRecordersRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns compliance details for each rule in that conformance pack.
*
*
*
* You must provide exact rule names.
*
*
*
* @param describeConformancePackComplianceRequest
* @return A Java Future containing the result of the DescribeConformancePackCompliance operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InvalidLimitException The specified limit is outside the allowable range.
* - InvalidNextTokenException The specified next token is not valid. Specify the
nextToken
* string that was returned in the previous response to get the next page of results.
* - InvalidParameterValueException One or more of the specified parameters are not valid. Verify that
* your parameters are valid and try again.
* - NoSuchConfigRuleInConformancePackException Config rule that you passed in the filter does not exist.
* - NoSuchConformancePackException You specified one or more conformance packs that do not exist.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ConfigException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ConfigAsyncClient.DescribeConformancePackCompliance
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeConformancePackCompliance(
DescribeConformancePackComplianceRequest describeConformancePackComplianceRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeConformancePackComplianceRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
describeConformancePackComplianceRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Config Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeConformancePackCompliance");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(operationMetadata, DescribeConformancePackComplianceResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeConformancePackCompliance").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DescribeConformancePackComplianceRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(describeConformancePackComplianceRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Provides one or more conformance packs deployment status.
*
*
*
* If there are no conformance packs then you will see an empty result.
*
*
*
* @param describeConformancePackStatusRequest
* @return A Java Future containing the result of the DescribeConformancePackStatus operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InvalidLimitException The specified limit is outside the allowable range.
* - InvalidNextTokenException The specified next token is not valid. Specify the
nextToken
* string that was returned in the previous response to get the next page of results.
* - InvalidParameterValueException One or more of the specified parameters are not valid. Verify that
* your parameters are valid and try again.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ConfigException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ConfigAsyncClient.DescribeConformancePackStatus
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeConformancePackStatus(
DescribeConformancePackStatusRequest describeConformancePackStatusRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeConformancePackStatusRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
describeConformancePackStatusRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Config Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeConformancePackStatus");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DescribeConformancePackStatusResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeConformancePackStatus").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DescribeConformancePackStatusRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(describeConformancePackStatusRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns a list of one or more conformance packs.
*
*
* @param describeConformancePacksRequest
* @return A Java Future containing the result of the DescribeConformancePacks operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - NoSuchConformancePackException You specified one or more conformance packs that do not exist.
* - InvalidLimitException The specified limit is outside the allowable range.
* - InvalidNextTokenException The specified next token is not valid. Specify the
nextToken
* string that was returned in the previous response to get the next page of results.
* - InvalidParameterValueException One or more of the specified parameters are not valid. Verify that
* your parameters are valid and try again.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ConfigException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ConfigAsyncClient.DescribeConformancePacks
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeConformancePacks(
DescribeConformancePacksRequest describeConformancePacksRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeConformancePacksRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, describeConformancePacksRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Config Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeConformancePacks");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DescribeConformancePacksResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeConformancePacks").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DescribeConformancePacksRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(describeConformancePacksRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns the current status of the specified delivery channel. If a delivery channel is not specified, this action
* returns the current status of all delivery channels associated with the account.
*
*
*
* Currently, you can specify only one delivery channel per region in your account.
*
*
*
* @param describeDeliveryChannelStatusRequest
* The input for the DeliveryChannelStatus action.
* @return A Java Future containing the result of the DescribeDeliveryChannelStatus operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - NoSuchDeliveryChannelException You have specified a delivery channel that does not exist.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ConfigException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ConfigAsyncClient.DescribeDeliveryChannelStatus
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeDeliveryChannelStatus(
DescribeDeliveryChannelStatusRequest describeDeliveryChannelStatusRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeDeliveryChannelStatusRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
describeDeliveryChannelStatusRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Config Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeDeliveryChannelStatus");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DescribeDeliveryChannelStatusResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeDeliveryChannelStatus").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DescribeDeliveryChannelStatusRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(describeDeliveryChannelStatusRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns details about the specified delivery channel. If a delivery channel is not specified, this action returns
* the details of all delivery channels associated with the account.
*
*
*
* Currently, you can specify only one delivery channel per region in your account.
*
*
*
* @param describeDeliveryChannelsRequest
* The input for the DescribeDeliveryChannels action.
* @return A Java Future containing the result of the DescribeDeliveryChannels operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - NoSuchDeliveryChannelException You have specified a delivery channel that does not exist.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ConfigException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ConfigAsyncClient.DescribeDeliveryChannels
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeDeliveryChannels(
DescribeDeliveryChannelsRequest describeDeliveryChannelsRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeDeliveryChannelsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, describeDeliveryChannelsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Config Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeDeliveryChannels");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DescribeDeliveryChannelsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeDeliveryChannels").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DescribeDeliveryChannelsRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(describeDeliveryChannelsRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Provides organization Config rule deployment status for an organization.
*
*
*
* The status is not considered successful until organization Config rule is successfully deployed in all the member
* accounts with an exception of excluded accounts.
*
*
* When you specify the limit and the next token, you receive a paginated response. Limit and next token are not
* applicable if you specify organization Config rule names. It is only applicable, when you request all the
* organization Config rules.
*
*
*
* @param describeOrganizationConfigRuleStatusesRequest
* @return A Java Future containing the result of the DescribeOrganizationConfigRuleStatuses operation returned by
* the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - NoSuchOrganizationConfigRuleException The Config rule in the request is not valid. Verify that the
* rule is an organization Config Process Check rule, that the rule name is correct, and that valid Amazon
* Resouce Names (ARNs) are used before trying again.
* - InvalidLimitException The specified limit is outside the allowable range.
* - InvalidNextTokenException The specified next token is not valid. Specify the
nextToken
* string that was returned in the previous response to get the next page of results.
* - OrganizationAccessDeniedException For
PutConfigurationAggregator
API, you can see this
* exception for the following reasons:
*
* -
*
* No permission to call EnableAWSServiceAccess
API
*
*
* -
*
* The configuration aggregator cannot be updated because your Amazon Web Services Organization management
* account or the delegated administrator role changed. Delete this aggregator and create a new one with the
* current Amazon Web Services Organization.
*
*
* -
*
* The configuration aggregator is associated with a previous Amazon Web Services Organization and Config
* cannot aggregate data with current Amazon Web Services Organization. Delete this aggregator and create a
* new one with the current Amazon Web Services Organization.
*
*
* -
*
* You are not a registered delegated administrator for Config with permissions to call
* ListDelegatedAdministrators
API. Ensure that the management account registers delagated
* administrator for Config service principle name before the delegated administrator creates an aggregator.
*
*
*
*
* For all OrganizationConfigRule
and OrganizationConformancePack
APIs, Config
* throws an exception if APIs are called from member accounts. All APIs must be called from organization
* management account.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ConfigException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ConfigAsyncClient.DescribeOrganizationConfigRuleStatuses
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeOrganizationConfigRuleStatuses(
DescribeOrganizationConfigRuleStatusesRequest describeOrganizationConfigRuleStatusesRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeOrganizationConfigRuleStatusesRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
describeOrganizationConfigRuleStatusesRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Config Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeOrganizationConfigRuleStatuses");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(operationMetadata, DescribeOrganizationConfigRuleStatusesResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeOrganizationConfigRuleStatuses").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DescribeOrganizationConfigRuleStatusesRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(describeOrganizationConfigRuleStatusesRequest));
CompletableFuture whenCompleted = executeFuture
.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns a list of organization Config rules.
*
*
*
* When you specify the limit and the next token, you receive a paginated response.
*
*
* Limit and next token are not applicable if you specify organization Config rule names. It is only applicable,
* when you request all the organization Config rules.
*
*
* For accounts within an organization
*
*
* If you deploy an organizational rule or conformance pack in an organization administrator account, and then
* establish a delegated administrator and deploy an organizational rule or conformance pack in the delegated
* administrator account, you won't be able to see the organizational rule or conformance pack in the organization
* administrator account from the delegated administrator account or see the organizational rule or conformance pack
* in the delegated administrator account from organization administrator account. The
* DescribeOrganizationConfigRules
and DescribeOrganizationConformancePacks
APIs can only
* see and interact with the organization-related resource that were deployed from within the account calling those
* APIs.
*
*
*
* @param describeOrganizationConfigRulesRequest
* @return A Java Future containing the result of the DescribeOrganizationConfigRules operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - NoSuchOrganizationConfigRuleException The Config rule in the request is not valid. Verify that the
* rule is an organization Config Process Check rule, that the rule name is correct, and that valid Amazon
* Resouce Names (ARNs) are used before trying again.
* - InvalidNextTokenException The specified next token is not valid. Specify the
nextToken
* string that was returned in the previous response to get the next page of results.
* - InvalidLimitException The specified limit is outside the allowable range.
* - OrganizationAccessDeniedException For
PutConfigurationAggregator
API, you can see this
* exception for the following reasons:
*
* -
*
* No permission to call EnableAWSServiceAccess
API
*
*
* -
*
* The configuration aggregator cannot be updated because your Amazon Web Services Organization management
* account or the delegated administrator role changed. Delete this aggregator and create a new one with the
* current Amazon Web Services Organization.
*
*
* -
*
* The configuration aggregator is associated with a previous Amazon Web Services Organization and Config
* cannot aggregate data with current Amazon Web Services Organization. Delete this aggregator and create a
* new one with the current Amazon Web Services Organization.
*
*
* -
*
* You are not a registered delegated administrator for Config with permissions to call
* ListDelegatedAdministrators
API. Ensure that the management account registers delagated
* administrator for Config service principle name before the delegated administrator creates an aggregator.
*
*
*
*
* For all OrganizationConfigRule
and OrganizationConformancePack
APIs, Config
* throws an exception if APIs are called from member accounts. All APIs must be called from organization
* management account.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ConfigException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ConfigAsyncClient.DescribeOrganizationConfigRules
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeOrganizationConfigRules(
DescribeOrganizationConfigRulesRequest describeOrganizationConfigRulesRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeOrganizationConfigRulesRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
describeOrganizationConfigRulesRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Config Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeOrganizationConfigRules");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DescribeOrganizationConfigRulesResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeOrganizationConfigRules").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DescribeOrganizationConfigRulesRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(describeOrganizationConfigRulesRequest));
CompletableFuture