All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awssdk.services.connect.DefaultConnectAsyncClient Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Connect module holds the client classes that are used for communicating with Connect.

There is a newer version: 2.30.1
Show newest version
/*
 * 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.connect;

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.connect.internal.ConnectServiceClientConfigurationBuilder;
import software.amazon.awssdk.services.connect.model.AccessDeniedException;
import software.amazon.awssdk.services.connect.model.ActivateEvaluationFormRequest;
import software.amazon.awssdk.services.connect.model.ActivateEvaluationFormResponse;
import software.amazon.awssdk.services.connect.model.AssociateAnalyticsDataSetRequest;
import software.amazon.awssdk.services.connect.model.AssociateAnalyticsDataSetResponse;
import software.amazon.awssdk.services.connect.model.AssociateApprovedOriginRequest;
import software.amazon.awssdk.services.connect.model.AssociateApprovedOriginResponse;
import software.amazon.awssdk.services.connect.model.AssociateBotRequest;
import software.amazon.awssdk.services.connect.model.AssociateBotResponse;
import software.amazon.awssdk.services.connect.model.AssociateDefaultVocabularyRequest;
import software.amazon.awssdk.services.connect.model.AssociateDefaultVocabularyResponse;
import software.amazon.awssdk.services.connect.model.AssociateFlowRequest;
import software.amazon.awssdk.services.connect.model.AssociateFlowResponse;
import software.amazon.awssdk.services.connect.model.AssociateInstanceStorageConfigRequest;
import software.amazon.awssdk.services.connect.model.AssociateInstanceStorageConfigResponse;
import software.amazon.awssdk.services.connect.model.AssociateLambdaFunctionRequest;
import software.amazon.awssdk.services.connect.model.AssociateLambdaFunctionResponse;
import software.amazon.awssdk.services.connect.model.AssociateLexBotRequest;
import software.amazon.awssdk.services.connect.model.AssociateLexBotResponse;
import software.amazon.awssdk.services.connect.model.AssociatePhoneNumberContactFlowRequest;
import software.amazon.awssdk.services.connect.model.AssociatePhoneNumberContactFlowResponse;
import software.amazon.awssdk.services.connect.model.AssociateQueueQuickConnectsRequest;
import software.amazon.awssdk.services.connect.model.AssociateQueueQuickConnectsResponse;
import software.amazon.awssdk.services.connect.model.AssociateRoutingProfileQueuesRequest;
import software.amazon.awssdk.services.connect.model.AssociateRoutingProfileQueuesResponse;
import software.amazon.awssdk.services.connect.model.AssociateSecurityKeyRequest;
import software.amazon.awssdk.services.connect.model.AssociateSecurityKeyResponse;
import software.amazon.awssdk.services.connect.model.AssociateTrafficDistributionGroupUserRequest;
import software.amazon.awssdk.services.connect.model.AssociateTrafficDistributionGroupUserResponse;
import software.amazon.awssdk.services.connect.model.AssociateUserProficienciesRequest;
import software.amazon.awssdk.services.connect.model.AssociateUserProficienciesResponse;
import software.amazon.awssdk.services.connect.model.BatchAssociateAnalyticsDataSetRequest;
import software.amazon.awssdk.services.connect.model.BatchAssociateAnalyticsDataSetResponse;
import software.amazon.awssdk.services.connect.model.BatchDisassociateAnalyticsDataSetRequest;
import software.amazon.awssdk.services.connect.model.BatchDisassociateAnalyticsDataSetResponse;
import software.amazon.awssdk.services.connect.model.BatchGetAttachedFileMetadataRequest;
import software.amazon.awssdk.services.connect.model.BatchGetAttachedFileMetadataResponse;
import software.amazon.awssdk.services.connect.model.BatchGetFlowAssociationRequest;
import software.amazon.awssdk.services.connect.model.BatchGetFlowAssociationResponse;
import software.amazon.awssdk.services.connect.model.BatchPutContactRequest;
import software.amazon.awssdk.services.connect.model.BatchPutContactResponse;
import software.amazon.awssdk.services.connect.model.ClaimPhoneNumberRequest;
import software.amazon.awssdk.services.connect.model.ClaimPhoneNumberResponse;
import software.amazon.awssdk.services.connect.model.CompleteAttachedFileUploadRequest;
import software.amazon.awssdk.services.connect.model.CompleteAttachedFileUploadResponse;
import software.amazon.awssdk.services.connect.model.ConflictException;
import software.amazon.awssdk.services.connect.model.ConnectException;
import software.amazon.awssdk.services.connect.model.ContactFlowNotPublishedException;
import software.amazon.awssdk.services.connect.model.ContactNotFoundException;
import software.amazon.awssdk.services.connect.model.CreateAgentStatusRequest;
import software.amazon.awssdk.services.connect.model.CreateAgentStatusResponse;
import software.amazon.awssdk.services.connect.model.CreateContactFlowModuleRequest;
import software.amazon.awssdk.services.connect.model.CreateContactFlowModuleResponse;
import software.amazon.awssdk.services.connect.model.CreateContactFlowRequest;
import software.amazon.awssdk.services.connect.model.CreateContactFlowResponse;
import software.amazon.awssdk.services.connect.model.CreateEvaluationFormRequest;
import software.amazon.awssdk.services.connect.model.CreateEvaluationFormResponse;
import software.amazon.awssdk.services.connect.model.CreateHoursOfOperationRequest;
import software.amazon.awssdk.services.connect.model.CreateHoursOfOperationResponse;
import software.amazon.awssdk.services.connect.model.CreateInstanceRequest;
import software.amazon.awssdk.services.connect.model.CreateInstanceResponse;
import software.amazon.awssdk.services.connect.model.CreateIntegrationAssociationRequest;
import software.amazon.awssdk.services.connect.model.CreateIntegrationAssociationResponse;
import software.amazon.awssdk.services.connect.model.CreateParticipantRequest;
import software.amazon.awssdk.services.connect.model.CreateParticipantResponse;
import software.amazon.awssdk.services.connect.model.CreatePersistentContactAssociationRequest;
import software.amazon.awssdk.services.connect.model.CreatePersistentContactAssociationResponse;
import software.amazon.awssdk.services.connect.model.CreatePredefinedAttributeRequest;
import software.amazon.awssdk.services.connect.model.CreatePredefinedAttributeResponse;
import software.amazon.awssdk.services.connect.model.CreatePromptRequest;
import software.amazon.awssdk.services.connect.model.CreatePromptResponse;
import software.amazon.awssdk.services.connect.model.CreateQueueRequest;
import software.amazon.awssdk.services.connect.model.CreateQueueResponse;
import software.amazon.awssdk.services.connect.model.CreateQuickConnectRequest;
import software.amazon.awssdk.services.connect.model.CreateQuickConnectResponse;
import software.amazon.awssdk.services.connect.model.CreateRoutingProfileRequest;
import software.amazon.awssdk.services.connect.model.CreateRoutingProfileResponse;
import software.amazon.awssdk.services.connect.model.CreateRuleRequest;
import software.amazon.awssdk.services.connect.model.CreateRuleResponse;
import software.amazon.awssdk.services.connect.model.CreateSecurityProfileRequest;
import software.amazon.awssdk.services.connect.model.CreateSecurityProfileResponse;
import software.amazon.awssdk.services.connect.model.CreateTaskTemplateRequest;
import software.amazon.awssdk.services.connect.model.CreateTaskTemplateResponse;
import software.amazon.awssdk.services.connect.model.CreateTrafficDistributionGroupRequest;
import software.amazon.awssdk.services.connect.model.CreateTrafficDistributionGroupResponse;
import software.amazon.awssdk.services.connect.model.CreateUseCaseRequest;
import software.amazon.awssdk.services.connect.model.CreateUseCaseResponse;
import software.amazon.awssdk.services.connect.model.CreateUserHierarchyGroupRequest;
import software.amazon.awssdk.services.connect.model.CreateUserHierarchyGroupResponse;
import software.amazon.awssdk.services.connect.model.CreateUserRequest;
import software.amazon.awssdk.services.connect.model.CreateUserResponse;
import software.amazon.awssdk.services.connect.model.CreateViewRequest;
import software.amazon.awssdk.services.connect.model.CreateViewResponse;
import software.amazon.awssdk.services.connect.model.CreateViewVersionRequest;
import software.amazon.awssdk.services.connect.model.CreateViewVersionResponse;
import software.amazon.awssdk.services.connect.model.CreateVocabularyRequest;
import software.amazon.awssdk.services.connect.model.CreateVocabularyResponse;
import software.amazon.awssdk.services.connect.model.DeactivateEvaluationFormRequest;
import software.amazon.awssdk.services.connect.model.DeactivateEvaluationFormResponse;
import software.amazon.awssdk.services.connect.model.DeleteAttachedFileRequest;
import software.amazon.awssdk.services.connect.model.DeleteAttachedFileResponse;
import software.amazon.awssdk.services.connect.model.DeleteContactEvaluationRequest;
import software.amazon.awssdk.services.connect.model.DeleteContactEvaluationResponse;
import software.amazon.awssdk.services.connect.model.DeleteContactFlowModuleRequest;
import software.amazon.awssdk.services.connect.model.DeleteContactFlowModuleResponse;
import software.amazon.awssdk.services.connect.model.DeleteContactFlowRequest;
import software.amazon.awssdk.services.connect.model.DeleteContactFlowResponse;
import software.amazon.awssdk.services.connect.model.DeleteEvaluationFormRequest;
import software.amazon.awssdk.services.connect.model.DeleteEvaluationFormResponse;
import software.amazon.awssdk.services.connect.model.DeleteHoursOfOperationRequest;
import software.amazon.awssdk.services.connect.model.DeleteHoursOfOperationResponse;
import software.amazon.awssdk.services.connect.model.DeleteInstanceRequest;
import software.amazon.awssdk.services.connect.model.DeleteInstanceResponse;
import software.amazon.awssdk.services.connect.model.DeleteIntegrationAssociationRequest;
import software.amazon.awssdk.services.connect.model.DeleteIntegrationAssociationResponse;
import software.amazon.awssdk.services.connect.model.DeletePredefinedAttributeRequest;
import software.amazon.awssdk.services.connect.model.DeletePredefinedAttributeResponse;
import software.amazon.awssdk.services.connect.model.DeletePromptRequest;
import software.amazon.awssdk.services.connect.model.DeletePromptResponse;
import software.amazon.awssdk.services.connect.model.DeleteQueueRequest;
import software.amazon.awssdk.services.connect.model.DeleteQueueResponse;
import software.amazon.awssdk.services.connect.model.DeleteQuickConnectRequest;
import software.amazon.awssdk.services.connect.model.DeleteQuickConnectResponse;
import software.amazon.awssdk.services.connect.model.DeleteRoutingProfileRequest;
import software.amazon.awssdk.services.connect.model.DeleteRoutingProfileResponse;
import software.amazon.awssdk.services.connect.model.DeleteRuleRequest;
import software.amazon.awssdk.services.connect.model.DeleteRuleResponse;
import software.amazon.awssdk.services.connect.model.DeleteSecurityProfileRequest;
import software.amazon.awssdk.services.connect.model.DeleteSecurityProfileResponse;
import software.amazon.awssdk.services.connect.model.DeleteTaskTemplateRequest;
import software.amazon.awssdk.services.connect.model.DeleteTaskTemplateResponse;
import software.amazon.awssdk.services.connect.model.DeleteTrafficDistributionGroupRequest;
import software.amazon.awssdk.services.connect.model.DeleteTrafficDistributionGroupResponse;
import software.amazon.awssdk.services.connect.model.DeleteUseCaseRequest;
import software.amazon.awssdk.services.connect.model.DeleteUseCaseResponse;
import software.amazon.awssdk.services.connect.model.DeleteUserHierarchyGroupRequest;
import software.amazon.awssdk.services.connect.model.DeleteUserHierarchyGroupResponse;
import software.amazon.awssdk.services.connect.model.DeleteUserRequest;
import software.amazon.awssdk.services.connect.model.DeleteUserResponse;
import software.amazon.awssdk.services.connect.model.DeleteViewRequest;
import software.amazon.awssdk.services.connect.model.DeleteViewResponse;
import software.amazon.awssdk.services.connect.model.DeleteViewVersionRequest;
import software.amazon.awssdk.services.connect.model.DeleteViewVersionResponse;
import software.amazon.awssdk.services.connect.model.DeleteVocabularyRequest;
import software.amazon.awssdk.services.connect.model.DeleteVocabularyResponse;
import software.amazon.awssdk.services.connect.model.DescribeAgentStatusRequest;
import software.amazon.awssdk.services.connect.model.DescribeAgentStatusResponse;
import software.amazon.awssdk.services.connect.model.DescribeAuthenticationProfileRequest;
import software.amazon.awssdk.services.connect.model.DescribeAuthenticationProfileResponse;
import software.amazon.awssdk.services.connect.model.DescribeContactEvaluationRequest;
import software.amazon.awssdk.services.connect.model.DescribeContactEvaluationResponse;
import software.amazon.awssdk.services.connect.model.DescribeContactFlowModuleRequest;
import software.amazon.awssdk.services.connect.model.DescribeContactFlowModuleResponse;
import software.amazon.awssdk.services.connect.model.DescribeContactFlowRequest;
import software.amazon.awssdk.services.connect.model.DescribeContactFlowResponse;
import software.amazon.awssdk.services.connect.model.DescribeContactRequest;
import software.amazon.awssdk.services.connect.model.DescribeContactResponse;
import software.amazon.awssdk.services.connect.model.DescribeEvaluationFormRequest;
import software.amazon.awssdk.services.connect.model.DescribeEvaluationFormResponse;
import software.amazon.awssdk.services.connect.model.DescribeHoursOfOperationRequest;
import software.amazon.awssdk.services.connect.model.DescribeHoursOfOperationResponse;
import software.amazon.awssdk.services.connect.model.DescribeInstanceAttributeRequest;
import software.amazon.awssdk.services.connect.model.DescribeInstanceAttributeResponse;
import software.amazon.awssdk.services.connect.model.DescribeInstanceRequest;
import software.amazon.awssdk.services.connect.model.DescribeInstanceResponse;
import software.amazon.awssdk.services.connect.model.DescribeInstanceStorageConfigRequest;
import software.amazon.awssdk.services.connect.model.DescribeInstanceStorageConfigResponse;
import software.amazon.awssdk.services.connect.model.DescribePhoneNumberRequest;
import software.amazon.awssdk.services.connect.model.DescribePhoneNumberResponse;
import software.amazon.awssdk.services.connect.model.DescribePredefinedAttributeRequest;
import software.amazon.awssdk.services.connect.model.DescribePredefinedAttributeResponse;
import software.amazon.awssdk.services.connect.model.DescribePromptRequest;
import software.amazon.awssdk.services.connect.model.DescribePromptResponse;
import software.amazon.awssdk.services.connect.model.DescribeQueueRequest;
import software.amazon.awssdk.services.connect.model.DescribeQueueResponse;
import software.amazon.awssdk.services.connect.model.DescribeQuickConnectRequest;
import software.amazon.awssdk.services.connect.model.DescribeQuickConnectResponse;
import software.amazon.awssdk.services.connect.model.DescribeRoutingProfileRequest;
import software.amazon.awssdk.services.connect.model.DescribeRoutingProfileResponse;
import software.amazon.awssdk.services.connect.model.DescribeRuleRequest;
import software.amazon.awssdk.services.connect.model.DescribeRuleResponse;
import software.amazon.awssdk.services.connect.model.DescribeSecurityProfileRequest;
import software.amazon.awssdk.services.connect.model.DescribeSecurityProfileResponse;
import software.amazon.awssdk.services.connect.model.DescribeTrafficDistributionGroupRequest;
import software.amazon.awssdk.services.connect.model.DescribeTrafficDistributionGroupResponse;
import software.amazon.awssdk.services.connect.model.DescribeUserHierarchyGroupRequest;
import software.amazon.awssdk.services.connect.model.DescribeUserHierarchyGroupResponse;
import software.amazon.awssdk.services.connect.model.DescribeUserHierarchyStructureRequest;
import software.amazon.awssdk.services.connect.model.DescribeUserHierarchyStructureResponse;
import software.amazon.awssdk.services.connect.model.DescribeUserRequest;
import software.amazon.awssdk.services.connect.model.DescribeUserResponse;
import software.amazon.awssdk.services.connect.model.DescribeViewRequest;
import software.amazon.awssdk.services.connect.model.DescribeViewResponse;
import software.amazon.awssdk.services.connect.model.DescribeVocabularyRequest;
import software.amazon.awssdk.services.connect.model.DescribeVocabularyResponse;
import software.amazon.awssdk.services.connect.model.DestinationNotAllowedException;
import software.amazon.awssdk.services.connect.model.DisassociateAnalyticsDataSetRequest;
import software.amazon.awssdk.services.connect.model.DisassociateAnalyticsDataSetResponse;
import software.amazon.awssdk.services.connect.model.DisassociateApprovedOriginRequest;
import software.amazon.awssdk.services.connect.model.DisassociateApprovedOriginResponse;
import software.amazon.awssdk.services.connect.model.DisassociateBotRequest;
import software.amazon.awssdk.services.connect.model.DisassociateBotResponse;
import software.amazon.awssdk.services.connect.model.DisassociateFlowRequest;
import software.amazon.awssdk.services.connect.model.DisassociateFlowResponse;
import software.amazon.awssdk.services.connect.model.DisassociateInstanceStorageConfigRequest;
import software.amazon.awssdk.services.connect.model.DisassociateInstanceStorageConfigResponse;
import software.amazon.awssdk.services.connect.model.DisassociateLambdaFunctionRequest;
import software.amazon.awssdk.services.connect.model.DisassociateLambdaFunctionResponse;
import software.amazon.awssdk.services.connect.model.DisassociateLexBotRequest;
import software.amazon.awssdk.services.connect.model.DisassociateLexBotResponse;
import software.amazon.awssdk.services.connect.model.DisassociatePhoneNumberContactFlowRequest;
import software.amazon.awssdk.services.connect.model.DisassociatePhoneNumberContactFlowResponse;
import software.amazon.awssdk.services.connect.model.DisassociateQueueQuickConnectsRequest;
import software.amazon.awssdk.services.connect.model.DisassociateQueueQuickConnectsResponse;
import software.amazon.awssdk.services.connect.model.DisassociateRoutingProfileQueuesRequest;
import software.amazon.awssdk.services.connect.model.DisassociateRoutingProfileQueuesResponse;
import software.amazon.awssdk.services.connect.model.DisassociateSecurityKeyRequest;
import software.amazon.awssdk.services.connect.model.DisassociateSecurityKeyResponse;
import software.amazon.awssdk.services.connect.model.DisassociateTrafficDistributionGroupUserRequest;
import software.amazon.awssdk.services.connect.model.DisassociateTrafficDistributionGroupUserResponse;
import software.amazon.awssdk.services.connect.model.DisassociateUserProficienciesRequest;
import software.amazon.awssdk.services.connect.model.DisassociateUserProficienciesResponse;
import software.amazon.awssdk.services.connect.model.DismissUserContactRequest;
import software.amazon.awssdk.services.connect.model.DismissUserContactResponse;
import software.amazon.awssdk.services.connect.model.DuplicateResourceException;
import software.amazon.awssdk.services.connect.model.GetAttachedFileRequest;
import software.amazon.awssdk.services.connect.model.GetAttachedFileResponse;
import software.amazon.awssdk.services.connect.model.GetContactAttributesRequest;
import software.amazon.awssdk.services.connect.model.GetContactAttributesResponse;
import software.amazon.awssdk.services.connect.model.GetCurrentMetricDataRequest;
import software.amazon.awssdk.services.connect.model.GetCurrentMetricDataResponse;
import software.amazon.awssdk.services.connect.model.GetCurrentUserDataRequest;
import software.amazon.awssdk.services.connect.model.GetCurrentUserDataResponse;
import software.amazon.awssdk.services.connect.model.GetFederationTokenRequest;
import software.amazon.awssdk.services.connect.model.GetFederationTokenResponse;
import software.amazon.awssdk.services.connect.model.GetFlowAssociationRequest;
import software.amazon.awssdk.services.connect.model.GetFlowAssociationResponse;
import software.amazon.awssdk.services.connect.model.GetMetricDataRequest;
import software.amazon.awssdk.services.connect.model.GetMetricDataResponse;
import software.amazon.awssdk.services.connect.model.GetMetricDataV2Request;
import software.amazon.awssdk.services.connect.model.GetMetricDataV2Response;
import software.amazon.awssdk.services.connect.model.GetPromptFileRequest;
import software.amazon.awssdk.services.connect.model.GetPromptFileResponse;
import software.amazon.awssdk.services.connect.model.GetTaskTemplateRequest;
import software.amazon.awssdk.services.connect.model.GetTaskTemplateResponse;
import software.amazon.awssdk.services.connect.model.GetTrafficDistributionRequest;
import software.amazon.awssdk.services.connect.model.GetTrafficDistributionResponse;
import software.amazon.awssdk.services.connect.model.IdempotencyException;
import software.amazon.awssdk.services.connect.model.ImportPhoneNumberRequest;
import software.amazon.awssdk.services.connect.model.ImportPhoneNumberResponse;
import software.amazon.awssdk.services.connect.model.InternalServiceException;
import software.amazon.awssdk.services.connect.model.InvalidContactFlowException;
import software.amazon.awssdk.services.connect.model.InvalidContactFlowModuleException;
import software.amazon.awssdk.services.connect.model.InvalidParameterException;
import software.amazon.awssdk.services.connect.model.InvalidRequestException;
import software.amazon.awssdk.services.connect.model.LimitExceededException;
import software.amazon.awssdk.services.connect.model.ListAgentStatusesRequest;
import software.amazon.awssdk.services.connect.model.ListAgentStatusesResponse;
import software.amazon.awssdk.services.connect.model.ListAnalyticsDataAssociationsRequest;
import software.amazon.awssdk.services.connect.model.ListAnalyticsDataAssociationsResponse;
import software.amazon.awssdk.services.connect.model.ListApprovedOriginsRequest;
import software.amazon.awssdk.services.connect.model.ListApprovedOriginsResponse;
import software.amazon.awssdk.services.connect.model.ListAuthenticationProfilesRequest;
import software.amazon.awssdk.services.connect.model.ListAuthenticationProfilesResponse;
import software.amazon.awssdk.services.connect.model.ListBotsRequest;
import software.amazon.awssdk.services.connect.model.ListBotsResponse;
import software.amazon.awssdk.services.connect.model.ListContactEvaluationsRequest;
import software.amazon.awssdk.services.connect.model.ListContactEvaluationsResponse;
import software.amazon.awssdk.services.connect.model.ListContactFlowModulesRequest;
import software.amazon.awssdk.services.connect.model.ListContactFlowModulesResponse;
import software.amazon.awssdk.services.connect.model.ListContactFlowsRequest;
import software.amazon.awssdk.services.connect.model.ListContactFlowsResponse;
import software.amazon.awssdk.services.connect.model.ListContactReferencesRequest;
import software.amazon.awssdk.services.connect.model.ListContactReferencesResponse;
import software.amazon.awssdk.services.connect.model.ListDefaultVocabulariesRequest;
import software.amazon.awssdk.services.connect.model.ListDefaultVocabulariesResponse;
import software.amazon.awssdk.services.connect.model.ListEvaluationFormVersionsRequest;
import software.amazon.awssdk.services.connect.model.ListEvaluationFormVersionsResponse;
import software.amazon.awssdk.services.connect.model.ListEvaluationFormsRequest;
import software.amazon.awssdk.services.connect.model.ListEvaluationFormsResponse;
import software.amazon.awssdk.services.connect.model.ListFlowAssociationsRequest;
import software.amazon.awssdk.services.connect.model.ListFlowAssociationsResponse;
import software.amazon.awssdk.services.connect.model.ListHoursOfOperationsRequest;
import software.amazon.awssdk.services.connect.model.ListHoursOfOperationsResponse;
import software.amazon.awssdk.services.connect.model.ListInstanceAttributesRequest;
import software.amazon.awssdk.services.connect.model.ListInstanceAttributesResponse;
import software.amazon.awssdk.services.connect.model.ListInstanceStorageConfigsRequest;
import software.amazon.awssdk.services.connect.model.ListInstanceStorageConfigsResponse;
import software.amazon.awssdk.services.connect.model.ListInstancesRequest;
import software.amazon.awssdk.services.connect.model.ListInstancesResponse;
import software.amazon.awssdk.services.connect.model.ListIntegrationAssociationsRequest;
import software.amazon.awssdk.services.connect.model.ListIntegrationAssociationsResponse;
import software.amazon.awssdk.services.connect.model.ListLambdaFunctionsRequest;
import software.amazon.awssdk.services.connect.model.ListLambdaFunctionsResponse;
import software.amazon.awssdk.services.connect.model.ListLexBotsRequest;
import software.amazon.awssdk.services.connect.model.ListLexBotsResponse;
import software.amazon.awssdk.services.connect.model.ListPhoneNumbersRequest;
import software.amazon.awssdk.services.connect.model.ListPhoneNumbersResponse;
import software.amazon.awssdk.services.connect.model.ListPhoneNumbersV2Request;
import software.amazon.awssdk.services.connect.model.ListPhoneNumbersV2Response;
import software.amazon.awssdk.services.connect.model.ListPredefinedAttributesRequest;
import software.amazon.awssdk.services.connect.model.ListPredefinedAttributesResponse;
import software.amazon.awssdk.services.connect.model.ListPromptsRequest;
import software.amazon.awssdk.services.connect.model.ListPromptsResponse;
import software.amazon.awssdk.services.connect.model.ListQueueQuickConnectsRequest;
import software.amazon.awssdk.services.connect.model.ListQueueQuickConnectsResponse;
import software.amazon.awssdk.services.connect.model.ListQueuesRequest;
import software.amazon.awssdk.services.connect.model.ListQueuesResponse;
import software.amazon.awssdk.services.connect.model.ListQuickConnectsRequest;
import software.amazon.awssdk.services.connect.model.ListQuickConnectsResponse;
import software.amazon.awssdk.services.connect.model.ListRealtimeContactAnalysisSegmentsV2Request;
import software.amazon.awssdk.services.connect.model.ListRealtimeContactAnalysisSegmentsV2Response;
import software.amazon.awssdk.services.connect.model.ListRoutingProfileQueuesRequest;
import software.amazon.awssdk.services.connect.model.ListRoutingProfileQueuesResponse;
import software.amazon.awssdk.services.connect.model.ListRoutingProfilesRequest;
import software.amazon.awssdk.services.connect.model.ListRoutingProfilesResponse;
import software.amazon.awssdk.services.connect.model.ListRulesRequest;
import software.amazon.awssdk.services.connect.model.ListRulesResponse;
import software.amazon.awssdk.services.connect.model.ListSecurityKeysRequest;
import software.amazon.awssdk.services.connect.model.ListSecurityKeysResponse;
import software.amazon.awssdk.services.connect.model.ListSecurityProfileApplicationsRequest;
import software.amazon.awssdk.services.connect.model.ListSecurityProfileApplicationsResponse;
import software.amazon.awssdk.services.connect.model.ListSecurityProfilePermissionsRequest;
import software.amazon.awssdk.services.connect.model.ListSecurityProfilePermissionsResponse;
import software.amazon.awssdk.services.connect.model.ListSecurityProfilesRequest;
import software.amazon.awssdk.services.connect.model.ListSecurityProfilesResponse;
import software.amazon.awssdk.services.connect.model.ListTagsForResourceRequest;
import software.amazon.awssdk.services.connect.model.ListTagsForResourceResponse;
import software.amazon.awssdk.services.connect.model.ListTaskTemplatesRequest;
import software.amazon.awssdk.services.connect.model.ListTaskTemplatesResponse;
import software.amazon.awssdk.services.connect.model.ListTrafficDistributionGroupUsersRequest;
import software.amazon.awssdk.services.connect.model.ListTrafficDistributionGroupUsersResponse;
import software.amazon.awssdk.services.connect.model.ListTrafficDistributionGroupsRequest;
import software.amazon.awssdk.services.connect.model.ListTrafficDistributionGroupsResponse;
import software.amazon.awssdk.services.connect.model.ListUseCasesRequest;
import software.amazon.awssdk.services.connect.model.ListUseCasesResponse;
import software.amazon.awssdk.services.connect.model.ListUserHierarchyGroupsRequest;
import software.amazon.awssdk.services.connect.model.ListUserHierarchyGroupsResponse;
import software.amazon.awssdk.services.connect.model.ListUserProficienciesRequest;
import software.amazon.awssdk.services.connect.model.ListUserProficienciesResponse;
import software.amazon.awssdk.services.connect.model.ListUsersRequest;
import software.amazon.awssdk.services.connect.model.ListUsersResponse;
import software.amazon.awssdk.services.connect.model.ListViewVersionsRequest;
import software.amazon.awssdk.services.connect.model.ListViewVersionsResponse;
import software.amazon.awssdk.services.connect.model.ListViewsRequest;
import software.amazon.awssdk.services.connect.model.ListViewsResponse;
import software.amazon.awssdk.services.connect.model.MaximumResultReturnedException;
import software.amazon.awssdk.services.connect.model.MonitorContactRequest;
import software.amazon.awssdk.services.connect.model.MonitorContactResponse;
import software.amazon.awssdk.services.connect.model.OutboundContactNotPermittedException;
import software.amazon.awssdk.services.connect.model.OutputTypeNotFoundException;
import software.amazon.awssdk.services.connect.model.PauseContactRequest;
import software.amazon.awssdk.services.connect.model.PauseContactResponse;
import software.amazon.awssdk.services.connect.model.PropertyValidationException;
import software.amazon.awssdk.services.connect.model.PutUserStatusRequest;
import software.amazon.awssdk.services.connect.model.PutUserStatusResponse;
import software.amazon.awssdk.services.connect.model.ReleasePhoneNumberRequest;
import software.amazon.awssdk.services.connect.model.ReleasePhoneNumberResponse;
import software.amazon.awssdk.services.connect.model.ReplicateInstanceRequest;
import software.amazon.awssdk.services.connect.model.ReplicateInstanceResponse;
import software.amazon.awssdk.services.connect.model.ResourceConflictException;
import software.amazon.awssdk.services.connect.model.ResourceInUseException;
import software.amazon.awssdk.services.connect.model.ResourceNotFoundException;
import software.amazon.awssdk.services.connect.model.ResourceNotReadyException;
import software.amazon.awssdk.services.connect.model.ResumeContactRecordingRequest;
import software.amazon.awssdk.services.connect.model.ResumeContactRecordingResponse;
import software.amazon.awssdk.services.connect.model.ResumeContactRequest;
import software.amazon.awssdk.services.connect.model.ResumeContactResponse;
import software.amazon.awssdk.services.connect.model.SearchAgentStatusesRequest;
import software.amazon.awssdk.services.connect.model.SearchAgentStatusesResponse;
import software.amazon.awssdk.services.connect.model.SearchAvailablePhoneNumbersRequest;
import software.amazon.awssdk.services.connect.model.SearchAvailablePhoneNumbersResponse;
import software.amazon.awssdk.services.connect.model.SearchContactFlowModulesRequest;
import software.amazon.awssdk.services.connect.model.SearchContactFlowModulesResponse;
import software.amazon.awssdk.services.connect.model.SearchContactFlowsRequest;
import software.amazon.awssdk.services.connect.model.SearchContactFlowsResponse;
import software.amazon.awssdk.services.connect.model.SearchContactsRequest;
import software.amazon.awssdk.services.connect.model.SearchContactsResponse;
import software.amazon.awssdk.services.connect.model.SearchHoursOfOperationsRequest;
import software.amazon.awssdk.services.connect.model.SearchHoursOfOperationsResponse;
import software.amazon.awssdk.services.connect.model.SearchPredefinedAttributesRequest;
import software.amazon.awssdk.services.connect.model.SearchPredefinedAttributesResponse;
import software.amazon.awssdk.services.connect.model.SearchPromptsRequest;
import software.amazon.awssdk.services.connect.model.SearchPromptsResponse;
import software.amazon.awssdk.services.connect.model.SearchQueuesRequest;
import software.amazon.awssdk.services.connect.model.SearchQueuesResponse;
import software.amazon.awssdk.services.connect.model.SearchQuickConnectsRequest;
import software.amazon.awssdk.services.connect.model.SearchQuickConnectsResponse;
import software.amazon.awssdk.services.connect.model.SearchResourceTagsRequest;
import software.amazon.awssdk.services.connect.model.SearchResourceTagsResponse;
import software.amazon.awssdk.services.connect.model.SearchRoutingProfilesRequest;
import software.amazon.awssdk.services.connect.model.SearchRoutingProfilesResponse;
import software.amazon.awssdk.services.connect.model.SearchSecurityProfilesRequest;
import software.amazon.awssdk.services.connect.model.SearchSecurityProfilesResponse;
import software.amazon.awssdk.services.connect.model.SearchUserHierarchyGroupsRequest;
import software.amazon.awssdk.services.connect.model.SearchUserHierarchyGroupsResponse;
import software.amazon.awssdk.services.connect.model.SearchUsersRequest;
import software.amazon.awssdk.services.connect.model.SearchUsersResponse;
import software.amazon.awssdk.services.connect.model.SearchVocabulariesRequest;
import software.amazon.awssdk.services.connect.model.SearchVocabulariesResponse;
import software.amazon.awssdk.services.connect.model.SendChatIntegrationEventRequest;
import software.amazon.awssdk.services.connect.model.SendChatIntegrationEventResponse;
import software.amazon.awssdk.services.connect.model.ServiceQuotaExceededException;
import software.amazon.awssdk.services.connect.model.StartAttachedFileUploadRequest;
import software.amazon.awssdk.services.connect.model.StartAttachedFileUploadResponse;
import software.amazon.awssdk.services.connect.model.StartChatContactRequest;
import software.amazon.awssdk.services.connect.model.StartChatContactResponse;
import software.amazon.awssdk.services.connect.model.StartContactEvaluationRequest;
import software.amazon.awssdk.services.connect.model.StartContactEvaluationResponse;
import software.amazon.awssdk.services.connect.model.StartContactRecordingRequest;
import software.amazon.awssdk.services.connect.model.StartContactRecordingResponse;
import software.amazon.awssdk.services.connect.model.StartContactStreamingRequest;
import software.amazon.awssdk.services.connect.model.StartContactStreamingResponse;
import software.amazon.awssdk.services.connect.model.StartOutboundVoiceContactRequest;
import software.amazon.awssdk.services.connect.model.StartOutboundVoiceContactResponse;
import software.amazon.awssdk.services.connect.model.StartTaskContactRequest;
import software.amazon.awssdk.services.connect.model.StartTaskContactResponse;
import software.amazon.awssdk.services.connect.model.StartWebRtcContactRequest;
import software.amazon.awssdk.services.connect.model.StartWebRtcContactResponse;
import software.amazon.awssdk.services.connect.model.StopContactRecordingRequest;
import software.amazon.awssdk.services.connect.model.StopContactRecordingResponse;
import software.amazon.awssdk.services.connect.model.StopContactRequest;
import software.amazon.awssdk.services.connect.model.StopContactResponse;
import software.amazon.awssdk.services.connect.model.StopContactStreamingRequest;
import software.amazon.awssdk.services.connect.model.StopContactStreamingResponse;
import software.amazon.awssdk.services.connect.model.SubmitContactEvaluationRequest;
import software.amazon.awssdk.services.connect.model.SubmitContactEvaluationResponse;
import software.amazon.awssdk.services.connect.model.SuspendContactRecordingRequest;
import software.amazon.awssdk.services.connect.model.SuspendContactRecordingResponse;
import software.amazon.awssdk.services.connect.model.TagContactRequest;
import software.amazon.awssdk.services.connect.model.TagContactResponse;
import software.amazon.awssdk.services.connect.model.TagResourceRequest;
import software.amazon.awssdk.services.connect.model.TagResourceResponse;
import software.amazon.awssdk.services.connect.model.ThrottlingException;
import software.amazon.awssdk.services.connect.model.TooManyRequestsException;
import software.amazon.awssdk.services.connect.model.TransferContactRequest;
import software.amazon.awssdk.services.connect.model.TransferContactResponse;
import software.amazon.awssdk.services.connect.model.UntagContactRequest;
import software.amazon.awssdk.services.connect.model.UntagContactResponse;
import software.amazon.awssdk.services.connect.model.UntagResourceRequest;
import software.amazon.awssdk.services.connect.model.UntagResourceResponse;
import software.amazon.awssdk.services.connect.model.UpdateAgentStatusRequest;
import software.amazon.awssdk.services.connect.model.UpdateAgentStatusResponse;
import software.amazon.awssdk.services.connect.model.UpdateAuthenticationProfileRequest;
import software.amazon.awssdk.services.connect.model.UpdateAuthenticationProfileResponse;
import software.amazon.awssdk.services.connect.model.UpdateContactAttributesRequest;
import software.amazon.awssdk.services.connect.model.UpdateContactAttributesResponse;
import software.amazon.awssdk.services.connect.model.UpdateContactEvaluationRequest;
import software.amazon.awssdk.services.connect.model.UpdateContactEvaluationResponse;
import software.amazon.awssdk.services.connect.model.UpdateContactFlowContentRequest;
import software.amazon.awssdk.services.connect.model.UpdateContactFlowContentResponse;
import software.amazon.awssdk.services.connect.model.UpdateContactFlowMetadataRequest;
import software.amazon.awssdk.services.connect.model.UpdateContactFlowMetadataResponse;
import software.amazon.awssdk.services.connect.model.UpdateContactFlowModuleContentRequest;
import software.amazon.awssdk.services.connect.model.UpdateContactFlowModuleContentResponse;
import software.amazon.awssdk.services.connect.model.UpdateContactFlowModuleMetadataRequest;
import software.amazon.awssdk.services.connect.model.UpdateContactFlowModuleMetadataResponse;
import software.amazon.awssdk.services.connect.model.UpdateContactFlowNameRequest;
import software.amazon.awssdk.services.connect.model.UpdateContactFlowNameResponse;
import software.amazon.awssdk.services.connect.model.UpdateContactRequest;
import software.amazon.awssdk.services.connect.model.UpdateContactResponse;
import software.amazon.awssdk.services.connect.model.UpdateContactRoutingDataRequest;
import software.amazon.awssdk.services.connect.model.UpdateContactRoutingDataResponse;
import software.amazon.awssdk.services.connect.model.UpdateContactScheduleRequest;
import software.amazon.awssdk.services.connect.model.UpdateContactScheduleResponse;
import software.amazon.awssdk.services.connect.model.UpdateEvaluationFormRequest;
import software.amazon.awssdk.services.connect.model.UpdateEvaluationFormResponse;
import software.amazon.awssdk.services.connect.model.UpdateHoursOfOperationRequest;
import software.amazon.awssdk.services.connect.model.UpdateHoursOfOperationResponse;
import software.amazon.awssdk.services.connect.model.UpdateInstanceAttributeRequest;
import software.amazon.awssdk.services.connect.model.UpdateInstanceAttributeResponse;
import software.amazon.awssdk.services.connect.model.UpdateInstanceStorageConfigRequest;
import software.amazon.awssdk.services.connect.model.UpdateInstanceStorageConfigResponse;
import software.amazon.awssdk.services.connect.model.UpdateParticipantRoleConfigRequest;
import software.amazon.awssdk.services.connect.model.UpdateParticipantRoleConfigResponse;
import software.amazon.awssdk.services.connect.model.UpdatePhoneNumberMetadataRequest;
import software.amazon.awssdk.services.connect.model.UpdatePhoneNumberMetadataResponse;
import software.amazon.awssdk.services.connect.model.UpdatePhoneNumberRequest;
import software.amazon.awssdk.services.connect.model.UpdatePhoneNumberResponse;
import software.amazon.awssdk.services.connect.model.UpdatePredefinedAttributeRequest;
import software.amazon.awssdk.services.connect.model.UpdatePredefinedAttributeResponse;
import software.amazon.awssdk.services.connect.model.UpdatePromptRequest;
import software.amazon.awssdk.services.connect.model.UpdatePromptResponse;
import software.amazon.awssdk.services.connect.model.UpdateQueueHoursOfOperationRequest;
import software.amazon.awssdk.services.connect.model.UpdateQueueHoursOfOperationResponse;
import software.amazon.awssdk.services.connect.model.UpdateQueueMaxContactsRequest;
import software.amazon.awssdk.services.connect.model.UpdateQueueMaxContactsResponse;
import software.amazon.awssdk.services.connect.model.UpdateQueueNameRequest;
import software.amazon.awssdk.services.connect.model.UpdateQueueNameResponse;
import software.amazon.awssdk.services.connect.model.UpdateQueueOutboundCallerConfigRequest;
import software.amazon.awssdk.services.connect.model.UpdateQueueOutboundCallerConfigResponse;
import software.amazon.awssdk.services.connect.model.UpdateQueueStatusRequest;
import software.amazon.awssdk.services.connect.model.UpdateQueueStatusResponse;
import software.amazon.awssdk.services.connect.model.UpdateQuickConnectConfigRequest;
import software.amazon.awssdk.services.connect.model.UpdateQuickConnectConfigResponse;
import software.amazon.awssdk.services.connect.model.UpdateQuickConnectNameRequest;
import software.amazon.awssdk.services.connect.model.UpdateQuickConnectNameResponse;
import software.amazon.awssdk.services.connect.model.UpdateRoutingProfileAgentAvailabilityTimerRequest;
import software.amazon.awssdk.services.connect.model.UpdateRoutingProfileAgentAvailabilityTimerResponse;
import software.amazon.awssdk.services.connect.model.UpdateRoutingProfileConcurrencyRequest;
import software.amazon.awssdk.services.connect.model.UpdateRoutingProfileConcurrencyResponse;
import software.amazon.awssdk.services.connect.model.UpdateRoutingProfileDefaultOutboundQueueRequest;
import software.amazon.awssdk.services.connect.model.UpdateRoutingProfileDefaultOutboundQueueResponse;
import software.amazon.awssdk.services.connect.model.UpdateRoutingProfileNameRequest;
import software.amazon.awssdk.services.connect.model.UpdateRoutingProfileNameResponse;
import software.amazon.awssdk.services.connect.model.UpdateRoutingProfileQueuesRequest;
import software.amazon.awssdk.services.connect.model.UpdateRoutingProfileQueuesResponse;
import software.amazon.awssdk.services.connect.model.UpdateRuleRequest;
import software.amazon.awssdk.services.connect.model.UpdateRuleResponse;
import software.amazon.awssdk.services.connect.model.UpdateSecurityProfileRequest;
import software.amazon.awssdk.services.connect.model.UpdateSecurityProfileResponse;
import software.amazon.awssdk.services.connect.model.UpdateTaskTemplateRequest;
import software.amazon.awssdk.services.connect.model.UpdateTaskTemplateResponse;
import software.amazon.awssdk.services.connect.model.UpdateTrafficDistributionRequest;
import software.amazon.awssdk.services.connect.model.UpdateTrafficDistributionResponse;
import software.amazon.awssdk.services.connect.model.UpdateUserHierarchyGroupNameRequest;
import software.amazon.awssdk.services.connect.model.UpdateUserHierarchyGroupNameResponse;
import software.amazon.awssdk.services.connect.model.UpdateUserHierarchyRequest;
import software.amazon.awssdk.services.connect.model.UpdateUserHierarchyResponse;
import software.amazon.awssdk.services.connect.model.UpdateUserHierarchyStructureRequest;
import software.amazon.awssdk.services.connect.model.UpdateUserHierarchyStructureResponse;
import software.amazon.awssdk.services.connect.model.UpdateUserIdentityInfoRequest;
import software.amazon.awssdk.services.connect.model.UpdateUserIdentityInfoResponse;
import software.amazon.awssdk.services.connect.model.UpdateUserPhoneConfigRequest;
import software.amazon.awssdk.services.connect.model.UpdateUserPhoneConfigResponse;
import software.amazon.awssdk.services.connect.model.UpdateUserProficienciesRequest;
import software.amazon.awssdk.services.connect.model.UpdateUserProficienciesResponse;
import software.amazon.awssdk.services.connect.model.UpdateUserRoutingProfileRequest;
import software.amazon.awssdk.services.connect.model.UpdateUserRoutingProfileResponse;
import software.amazon.awssdk.services.connect.model.UpdateUserSecurityProfilesRequest;
import software.amazon.awssdk.services.connect.model.UpdateUserSecurityProfilesResponse;
import software.amazon.awssdk.services.connect.model.UpdateViewContentRequest;
import software.amazon.awssdk.services.connect.model.UpdateViewContentResponse;
import software.amazon.awssdk.services.connect.model.UpdateViewMetadataRequest;
import software.amazon.awssdk.services.connect.model.UpdateViewMetadataResponse;
import software.amazon.awssdk.services.connect.model.UserNotFoundException;
import software.amazon.awssdk.services.connect.transform.ActivateEvaluationFormRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.AssociateAnalyticsDataSetRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.AssociateApprovedOriginRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.AssociateBotRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.AssociateDefaultVocabularyRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.AssociateFlowRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.AssociateInstanceStorageConfigRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.AssociateLambdaFunctionRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.AssociateLexBotRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.AssociatePhoneNumberContactFlowRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.AssociateQueueQuickConnectsRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.AssociateRoutingProfileQueuesRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.AssociateSecurityKeyRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.AssociateTrafficDistributionGroupUserRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.AssociateUserProficienciesRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.BatchAssociateAnalyticsDataSetRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.BatchDisassociateAnalyticsDataSetRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.BatchGetAttachedFileMetadataRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.BatchGetFlowAssociationRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.BatchPutContactRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ClaimPhoneNumberRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.CompleteAttachedFileUploadRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.CreateAgentStatusRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.CreateContactFlowModuleRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.CreateContactFlowRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.CreateEvaluationFormRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.CreateHoursOfOperationRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.CreateInstanceRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.CreateIntegrationAssociationRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.CreateParticipantRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.CreatePersistentContactAssociationRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.CreatePredefinedAttributeRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.CreatePromptRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.CreateQueueRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.CreateQuickConnectRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.CreateRoutingProfileRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.CreateRuleRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.CreateSecurityProfileRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.CreateTaskTemplateRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.CreateTrafficDistributionGroupRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.CreateUseCaseRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.CreateUserHierarchyGroupRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.CreateUserRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.CreateViewRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.CreateViewVersionRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.CreateVocabularyRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DeactivateEvaluationFormRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DeleteAttachedFileRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DeleteContactEvaluationRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DeleteContactFlowModuleRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DeleteContactFlowRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DeleteEvaluationFormRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DeleteHoursOfOperationRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DeleteInstanceRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DeleteIntegrationAssociationRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DeletePredefinedAttributeRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DeletePromptRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DeleteQueueRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DeleteQuickConnectRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DeleteRoutingProfileRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DeleteRuleRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DeleteSecurityProfileRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DeleteTaskTemplateRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DeleteTrafficDistributionGroupRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DeleteUseCaseRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DeleteUserHierarchyGroupRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DeleteUserRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DeleteViewRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DeleteViewVersionRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DeleteVocabularyRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DescribeAgentStatusRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DescribeAuthenticationProfileRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DescribeContactEvaluationRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DescribeContactFlowModuleRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DescribeContactFlowRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DescribeContactRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DescribeEvaluationFormRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DescribeHoursOfOperationRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DescribeInstanceAttributeRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DescribeInstanceRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DescribeInstanceStorageConfigRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DescribePhoneNumberRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DescribePredefinedAttributeRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DescribePromptRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DescribeQueueRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DescribeQuickConnectRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DescribeRoutingProfileRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DescribeRuleRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DescribeSecurityProfileRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DescribeTrafficDistributionGroupRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DescribeUserHierarchyGroupRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DescribeUserHierarchyStructureRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DescribeUserRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DescribeViewRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DescribeVocabularyRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DisassociateAnalyticsDataSetRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DisassociateApprovedOriginRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DisassociateBotRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DisassociateFlowRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DisassociateInstanceStorageConfigRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DisassociateLambdaFunctionRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DisassociateLexBotRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DisassociatePhoneNumberContactFlowRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DisassociateQueueQuickConnectsRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DisassociateRoutingProfileQueuesRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DisassociateSecurityKeyRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DisassociateTrafficDistributionGroupUserRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DisassociateUserProficienciesRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DismissUserContactRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.GetAttachedFileRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.GetContactAttributesRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.GetCurrentMetricDataRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.GetCurrentUserDataRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.GetFederationTokenRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.GetFlowAssociationRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.GetMetricDataRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.GetMetricDataV2RequestMarshaller;
import software.amazon.awssdk.services.connect.transform.GetPromptFileRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.GetTaskTemplateRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.GetTrafficDistributionRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ImportPhoneNumberRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ListAgentStatusesRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ListAnalyticsDataAssociationsRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ListApprovedOriginsRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ListAuthenticationProfilesRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ListBotsRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ListContactEvaluationsRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ListContactFlowModulesRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ListContactFlowsRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ListContactReferencesRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ListDefaultVocabulariesRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ListEvaluationFormVersionsRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ListEvaluationFormsRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ListFlowAssociationsRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ListHoursOfOperationsRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ListInstanceAttributesRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ListInstanceStorageConfigsRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ListInstancesRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ListIntegrationAssociationsRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ListLambdaFunctionsRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ListLexBotsRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ListPhoneNumbersRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ListPhoneNumbersV2RequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ListPredefinedAttributesRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ListPromptsRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ListQueueQuickConnectsRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ListQueuesRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ListQuickConnectsRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ListRealtimeContactAnalysisSegmentsV2RequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ListRoutingProfileQueuesRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ListRoutingProfilesRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ListRulesRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ListSecurityKeysRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ListSecurityProfileApplicationsRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ListSecurityProfilePermissionsRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ListSecurityProfilesRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ListTagsForResourceRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ListTaskTemplatesRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ListTrafficDistributionGroupUsersRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ListTrafficDistributionGroupsRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ListUseCasesRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ListUserHierarchyGroupsRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ListUserProficienciesRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ListUsersRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ListViewVersionsRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ListViewsRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.MonitorContactRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.PauseContactRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.PutUserStatusRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ReleasePhoneNumberRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ReplicateInstanceRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ResumeContactRecordingRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ResumeContactRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.SearchAgentStatusesRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.SearchAvailablePhoneNumbersRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.SearchContactFlowModulesRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.SearchContactFlowsRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.SearchContactsRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.SearchHoursOfOperationsRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.SearchPredefinedAttributesRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.SearchPromptsRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.SearchQueuesRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.SearchQuickConnectsRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.SearchResourceTagsRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.SearchRoutingProfilesRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.SearchSecurityProfilesRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.SearchUserHierarchyGroupsRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.SearchUsersRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.SearchVocabulariesRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.SendChatIntegrationEventRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.StartAttachedFileUploadRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.StartChatContactRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.StartContactEvaluationRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.StartContactRecordingRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.StartContactStreamingRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.StartOutboundVoiceContactRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.StartTaskContactRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.StartWebRtcContactRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.StopContactRecordingRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.StopContactRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.StopContactStreamingRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.SubmitContactEvaluationRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.SuspendContactRecordingRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.TagContactRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.TagResourceRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.TransferContactRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.UntagContactRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.UntagResourceRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.UpdateAgentStatusRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.UpdateAuthenticationProfileRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.UpdateContactAttributesRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.UpdateContactEvaluationRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.UpdateContactFlowContentRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.UpdateContactFlowMetadataRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.UpdateContactFlowModuleContentRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.UpdateContactFlowModuleMetadataRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.UpdateContactFlowNameRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.UpdateContactRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.UpdateContactRoutingDataRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.UpdateContactScheduleRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.UpdateEvaluationFormRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.UpdateHoursOfOperationRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.UpdateInstanceAttributeRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.UpdateInstanceStorageConfigRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.UpdateParticipantRoleConfigRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.UpdatePhoneNumberMetadataRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.UpdatePhoneNumberRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.UpdatePredefinedAttributeRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.UpdatePromptRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.UpdateQueueHoursOfOperationRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.UpdateQueueMaxContactsRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.UpdateQueueNameRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.UpdateQueueOutboundCallerConfigRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.UpdateQueueStatusRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.UpdateQuickConnectConfigRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.UpdateQuickConnectNameRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.UpdateRoutingProfileAgentAvailabilityTimerRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.UpdateRoutingProfileConcurrencyRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.UpdateRoutingProfileDefaultOutboundQueueRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.UpdateRoutingProfileNameRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.UpdateRoutingProfileQueuesRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.UpdateRuleRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.UpdateSecurityProfileRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.UpdateTaskTemplateRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.UpdateTrafficDistributionRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.UpdateUserHierarchyGroupNameRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.UpdateUserHierarchyRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.UpdateUserHierarchyStructureRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.UpdateUserIdentityInfoRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.UpdateUserPhoneConfigRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.UpdateUserProficienciesRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.UpdateUserRoutingProfileRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.UpdateUserSecurityProfilesRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.UpdateViewContentRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.UpdateViewMetadataRequestMarshaller;
import software.amazon.awssdk.utils.CompletableFutureUtils;

/**
 * Internal implementation of {@link ConnectAsyncClient}.
 *
 * @see ConnectAsyncClient#builder()
 */
@Generated("software.amazon.awssdk:codegen")
@SdkInternalApi
final class DefaultConnectAsyncClient implements ConnectAsyncClient {
    private static final Logger log = LoggerFactory.getLogger(DefaultConnectAsyncClient.class);

    private static final AwsProtocolMetadata protocolMetadata = AwsProtocolMetadata.builder()
            .serviceProtocol(AwsServiceProtocol.REST_JSON).build();

    private final AsyncClientHandler clientHandler;

    private final AwsJsonProtocolFactory protocolFactory;

    private final SdkClientConfiguration clientConfiguration;

    protected DefaultConnectAsyncClient(SdkClientConfiguration clientConfiguration) {
        this.clientHandler = new AwsAsyncClientHandler(clientConfiguration);
        this.clientConfiguration = clientConfiguration.toBuilder().option(SdkClientOption.SDK_CLIENT, this).build();
        this.protocolFactory = init(AwsJsonProtocolFactory.builder()).build();
    }

    /**
     * 

* Activates an evaluation form in the specified Amazon Connect instance. After the evaluation form is activated, it * is available to start new evaluations based on the form. *

* * @param activateEvaluationFormRequest * @return A Java Future containing the result of the ActivateEvaluationForm 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. *
    *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • ResourceConflictException A resource already has that name.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.ActivateEvaluationForm * @see AWS API Documentation */ @Override public CompletableFuture activateEvaluationForm( ActivateEvaluationFormRequest activateEvaluationFormRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(activateEvaluationFormRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, activateEvaluationFormRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ActivateEvaluationForm"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ActivateEvaluationFormResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ActivateEvaluationForm").withProtocolMetadata(protocolMetadata) .withMarshaller(new ActivateEvaluationFormRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(activateEvaluationFormRequest)); 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); } } /** *

* This API is in preview release for Amazon Connect and is subject to change. *

*

* Associates the specified dataset for a Amazon Connect instance with the target account. You can associate only * one dataset in a single call. *

* * @param associateAnalyticsDataSetRequest * @return A Java Future containing the result of the AssociateAnalyticsDataSet 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.AssociateAnalyticsDataSet * @see AWS API Documentation */ @Override public CompletableFuture associateAnalyticsDataSet( AssociateAnalyticsDataSetRequest associateAnalyticsDataSetRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(associateAnalyticsDataSetRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, associateAnalyticsDataSetRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AssociateAnalyticsDataSet"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, AssociateAnalyticsDataSetResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("AssociateAnalyticsDataSet").withProtocolMetadata(protocolMetadata) .withMarshaller(new AssociateAnalyticsDataSetRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(associateAnalyticsDataSetRequest)); 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); } } /** *

* This API is in preview release for Amazon Connect and is subject to change. *

*

* Associates an approved origin to an Amazon Connect instance. *

* * @param associateApprovedOriginRequest * @return A Java Future containing the result of the AssociateApprovedOrigin 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. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ResourceConflictException A resource already has that name.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ServiceQuotaExceededException The service quota has been exceeded.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.AssociateApprovedOrigin * @see AWS API Documentation */ @Override public CompletableFuture associateApprovedOrigin( AssociateApprovedOriginRequest associateApprovedOriginRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(associateApprovedOriginRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, associateApprovedOriginRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AssociateApprovedOrigin"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, AssociateApprovedOriginResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("AssociateApprovedOrigin").withProtocolMetadata(protocolMetadata) .withMarshaller(new AssociateApprovedOriginRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(associateApprovedOriginRequest)); 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); } } /** *

* This API is in preview release for Amazon Connect and is subject to change. *

*

* Allows the specified Amazon Connect instance to access the specified Amazon Lex or Amazon Lex V2 bot. *

* * @param associateBotRequest * @return A Java Future containing the result of the AssociateBot 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. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ResourceConflictException A resource already has that name.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • LimitExceededException The allowed limit for the resource has been exceeded.
  • *
  • ServiceQuotaExceededException The service quota has been exceeded.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.AssociateBot * @see AWS API * Documentation */ @Override public CompletableFuture associateBot(AssociateBotRequest associateBotRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(associateBotRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, associateBotRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AssociateBot"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, AssociateBotResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("AssociateBot").withProtocolMetadata(protocolMetadata) .withMarshaller(new AssociateBotRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(associateBotRequest)); 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); } } /** *

* Associates an existing vocabulary as the default. Contact Lens for Amazon Connect uses the vocabulary in * post-call and real-time analysis sessions for the given language. *

* * @param associateDefaultVocabularyRequest * @return A Java Future containing the result of the AssociateDefaultVocabulary 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.AssociateDefaultVocabulary * @see AWS API Documentation */ @Override public CompletableFuture associateDefaultVocabulary( AssociateDefaultVocabularyRequest associateDefaultVocabularyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(associateDefaultVocabularyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, associateDefaultVocabularyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AssociateDefaultVocabulary"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, AssociateDefaultVocabularyResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("AssociateDefaultVocabulary").withProtocolMetadata(protocolMetadata) .withMarshaller(new AssociateDefaultVocabularyRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(associateDefaultVocabularyRequest)); 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); } } /** *

* Associates a connect resource to a flow. *

* * @param associateFlowRequest * @return A Java Future containing the result of the AssociateFlow 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. *
    *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.AssociateFlow * @see AWS API * Documentation */ @Override public CompletableFuture associateFlow(AssociateFlowRequest associateFlowRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(associateFlowRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, associateFlowRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AssociateFlow"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, AssociateFlowResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("AssociateFlow").withProtocolMetadata(protocolMetadata) .withMarshaller(new AssociateFlowRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(associateFlowRequest)); 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); } } /** *

* This API is in preview release for Amazon Connect and is subject to change. *

*

* Associates a storage resource type for the first time. You can only associate one type of storage configuration * in a single call. This means, for example, that you can't define an instance with multiple S3 buckets for storing * chat transcripts. *

*

* This API does not create a resource that doesn't exist. It only associates it to the instance. Ensure that the * resource being specified in the storage configuration, like an S3 bucket, exists when being used for association. *

* * @param associateInstanceStorageConfigRequest * @return A Java Future containing the result of the AssociateInstanceStorageConfig 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. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ResourceConflictException A resource already has that name.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.AssociateInstanceStorageConfig * @see AWS API Documentation */ @Override public CompletableFuture associateInstanceStorageConfig( AssociateInstanceStorageConfigRequest associateInstanceStorageConfigRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(associateInstanceStorageConfigRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, associateInstanceStorageConfigRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AssociateInstanceStorageConfig"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, AssociateInstanceStorageConfigResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("AssociateInstanceStorageConfig").withProtocolMetadata(protocolMetadata) .withMarshaller(new AssociateInstanceStorageConfigRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(associateInstanceStorageConfigRequest)); 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); } } /** *

* This API is in preview release for Amazon Connect and is subject to change. *

*

* Allows the specified Amazon Connect instance to access the specified Lambda function. *

* * @param associateLambdaFunctionRequest * @return A Java Future containing the result of the AssociateLambdaFunction 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. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ResourceConflictException A resource already has that name.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ServiceQuotaExceededException The service quota has been exceeded.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.AssociateLambdaFunction * @see AWS API Documentation */ @Override public CompletableFuture associateLambdaFunction( AssociateLambdaFunctionRequest associateLambdaFunctionRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(associateLambdaFunctionRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, associateLambdaFunctionRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AssociateLambdaFunction"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, AssociateLambdaFunctionResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("AssociateLambdaFunction").withProtocolMetadata(protocolMetadata) .withMarshaller(new AssociateLambdaFunctionRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(associateLambdaFunctionRequest)); 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); } } /** *

* This API is in preview release for Amazon Connect and is subject to change. *

*

* Allows the specified Amazon Connect instance to access the specified Amazon Lex V1 bot. This API only supports * the association of Amazon Lex V1 bots. *

* * @param associateLexBotRequest * @return A Java Future containing the result of the AssociateLexBot 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. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ResourceConflictException A resource already has that name.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ServiceQuotaExceededException The service quota has been exceeded.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.AssociateLexBot * @see AWS API * Documentation */ @Override public CompletableFuture associateLexBot(AssociateLexBotRequest associateLexBotRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(associateLexBotRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, associateLexBotRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AssociateLexBot"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, AssociateLexBotResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("AssociateLexBot").withProtocolMetadata(protocolMetadata) .withMarshaller(new AssociateLexBotRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(associateLexBotRequest)); 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); } } /** *

* Associates a flow with a phone number claimed to your Amazon Connect instance. *

* *

* If the number is claimed to a traffic distribution group, and you are calling this API using an instance in the * Amazon Web Services Region where the traffic distribution group was created, you can use either a full phone * number ARN or UUID value for the PhoneNumberId URI request parameter. However, if the number is * claimed to a traffic distribution group and you are calling this API using an instance in the alternate Amazon * Web Services Region associated with the traffic distribution group, you must provide a full phone number ARN. If * a UUID is provided in this scenario, you will receive a ResourceNotFoundException. *

*
* * @param associatePhoneNumberContactFlowRequest * @return A Java Future containing the result of the AssociatePhoneNumberContactFlow 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. *
    *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.AssociatePhoneNumberContactFlow * @see AWS API Documentation */ @Override public CompletableFuture associatePhoneNumberContactFlow( AssociatePhoneNumberContactFlowRequest associatePhoneNumberContactFlowRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(associatePhoneNumberContactFlowRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, associatePhoneNumberContactFlowRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AssociatePhoneNumberContactFlow"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, AssociatePhoneNumberContactFlowResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("AssociatePhoneNumberContactFlow").withProtocolMetadata(protocolMetadata) .withMarshaller(new AssociatePhoneNumberContactFlowRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(associatePhoneNumberContactFlowRequest)); 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); } } /** *

* This API is in preview release for Amazon Connect and is subject to change. *

*

* Associates a set of quick connects with a queue. *

* * @param associateQueueQuickConnectsRequest * @return A Java Future containing the result of the AssociateQueueQuickConnects 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • LimitExceededException The allowed limit for the resource has been exceeded.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.AssociateQueueQuickConnects * @see AWS API Documentation */ @Override public CompletableFuture associateQueueQuickConnects( AssociateQueueQuickConnectsRequest associateQueueQuickConnectsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(associateQueueQuickConnectsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, associateQueueQuickConnectsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AssociateQueueQuickConnects"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, AssociateQueueQuickConnectsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("AssociateQueueQuickConnects").withProtocolMetadata(protocolMetadata) .withMarshaller(new AssociateQueueQuickConnectsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(associateQueueQuickConnectsRequest)); 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); } } /** *

* Associates a set of queues with a routing profile. *

* * @param associateRoutingProfileQueuesRequest * @return A Java Future containing the result of the AssociateRoutingProfileQueues 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.AssociateRoutingProfileQueues * @see AWS API Documentation */ @Override public CompletableFuture associateRoutingProfileQueues( AssociateRoutingProfileQueuesRequest associateRoutingProfileQueuesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(associateRoutingProfileQueuesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, associateRoutingProfileQueuesRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AssociateRoutingProfileQueues"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, AssociateRoutingProfileQueuesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("AssociateRoutingProfileQueues").withProtocolMetadata(protocolMetadata) .withMarshaller(new AssociateRoutingProfileQueuesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(associateRoutingProfileQueuesRequest)); 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); } } /** *

* This API is in preview release for Amazon Connect and is subject to change. *

*

* Associates a security key to the instance. *

* * @param associateSecurityKeyRequest * @return A Java Future containing the result of the AssociateSecurityKey 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. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ResourceConflictException A resource already has that name.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ServiceQuotaExceededException The service quota has been exceeded.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.AssociateSecurityKey * @see AWS * API Documentation */ @Override public CompletableFuture associateSecurityKey( AssociateSecurityKeyRequest associateSecurityKeyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(associateSecurityKeyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, associateSecurityKeyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AssociateSecurityKey"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, AssociateSecurityKeyResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("AssociateSecurityKey").withProtocolMetadata(protocolMetadata) .withMarshaller(new AssociateSecurityKeyRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(associateSecurityKeyRequest)); 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); } } /** *

* Associates an agent with a traffic distribution group. *

* * @param associateTrafficDistributionGroupUserRequest * @return A Java Future containing the result of the AssociateTrafficDistributionGroupUser 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ResourceConflictException A resource already has that name.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.AssociateTrafficDistributionGroupUser * @see AWS API Documentation */ @Override public CompletableFuture associateTrafficDistributionGroupUser( AssociateTrafficDistributionGroupUserRequest associateTrafficDistributionGroupUserRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(associateTrafficDistributionGroupUserRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, associateTrafficDistributionGroupUserRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AssociateTrafficDistributionGroupUser"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(operationMetadata, AssociateTrafficDistributionGroupUserResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("AssociateTrafficDistributionGroupUser").withProtocolMetadata(protocolMetadata) .withMarshaller(new AssociateTrafficDistributionGroupUserRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(associateTrafficDistributionGroupUserRequest)); 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); } } /** *

* >Associates a set of proficiencies with a user. *

* * @param associateUserProficienciesRequest * @return A Java Future containing the result of the AssociateUserProficiencies 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.AssociateUserProficiencies * @see AWS API Documentation */ @Override public CompletableFuture associateUserProficiencies( AssociateUserProficienciesRequest associateUserProficienciesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(associateUserProficienciesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, associateUserProficienciesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AssociateUserProficiencies"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, AssociateUserProficienciesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("AssociateUserProficiencies").withProtocolMetadata(protocolMetadata) .withMarshaller(new AssociateUserProficienciesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(associateUserProficienciesRequest)); 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); } } /** *

* This API is in preview release for Amazon Connect and is subject to change. *

*

* Associates a list of analytics datasets for a given Amazon Connect instance to a target account. You can * associate multiple datasets in a single call. *

* * @param batchAssociateAnalyticsDataSetRequest * @return A Java Future containing the result of the BatchAssociateAnalyticsDataSet 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.BatchAssociateAnalyticsDataSet * @see AWS API Documentation */ @Override public CompletableFuture batchAssociateAnalyticsDataSet( BatchAssociateAnalyticsDataSetRequest batchAssociateAnalyticsDataSetRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(batchAssociateAnalyticsDataSetRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, batchAssociateAnalyticsDataSetRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "BatchAssociateAnalyticsDataSet"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, BatchAssociateAnalyticsDataSetResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("BatchAssociateAnalyticsDataSet").withProtocolMetadata(protocolMetadata) .withMarshaller(new BatchAssociateAnalyticsDataSetRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(batchAssociateAnalyticsDataSetRequest)); 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); } } /** *

* This API is in preview release for Amazon Connect and is subject to change. *

*

* Removes a list of analytics datasets associated with a given Amazon Connect instance. You can disassociate * multiple datasets in a single call. *

* * @param batchDisassociateAnalyticsDataSetRequest * @return A Java Future containing the result of the BatchDisassociateAnalyticsDataSet 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.BatchDisassociateAnalyticsDataSet * @see AWS API Documentation */ @Override public CompletableFuture batchDisassociateAnalyticsDataSet( BatchDisassociateAnalyticsDataSetRequest batchDisassociateAnalyticsDataSetRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(batchDisassociateAnalyticsDataSetRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, batchDisassociateAnalyticsDataSetRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "BatchDisassociateAnalyticsDataSet"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(operationMetadata, BatchDisassociateAnalyticsDataSetResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("BatchDisassociateAnalyticsDataSet").withProtocolMetadata(protocolMetadata) .withMarshaller(new BatchDisassociateAnalyticsDataSetRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(batchDisassociateAnalyticsDataSetRequest)); 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); } } /** *

* Allows you to retrieve metadata about multiple attached files on an associated resource. Each attached file * provided in the input list must be associated with the input AssociatedResourceArn. *

* * @param batchGetAttachedFileMetadataRequest * @return A Java Future containing the result of the BatchGetAttachedFileMetadata 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. *
    *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.BatchGetAttachedFileMetadata * @see AWS API Documentation */ @Override public CompletableFuture batchGetAttachedFileMetadata( BatchGetAttachedFileMetadataRequest batchGetAttachedFileMetadataRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(batchGetAttachedFileMetadataRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, batchGetAttachedFileMetadataRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "BatchGetAttachedFileMetadata"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, BatchGetAttachedFileMetadataResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("BatchGetAttachedFileMetadata").withProtocolMetadata(protocolMetadata) .withMarshaller(new BatchGetAttachedFileMetadataRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(batchGetAttachedFileMetadataRequest)); 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); } } /** *

* Retrieve the flow associations for the given resources. *

* * @param batchGetFlowAssociationRequest * @return A Java Future containing the result of the BatchGetFlowAssociation 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. *
    *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.BatchGetFlowAssociation * @see AWS API Documentation */ @Override public CompletableFuture batchGetFlowAssociation( BatchGetFlowAssociationRequest batchGetFlowAssociationRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(batchGetFlowAssociationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, batchGetFlowAssociationRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "BatchGetFlowAssociation"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, BatchGetFlowAssociationResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("BatchGetFlowAssociation").withProtocolMetadata(protocolMetadata) .withMarshaller(new BatchGetFlowAssociationRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(batchGetFlowAssociationRequest)); 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); } } /** * *

* Only the Amazon Connect outbound campaigns service principal is allowed to assume a role in your account and call * this API. *

*
*

* Allows you to create a batch of contacts in Amazon Connect. The outbound campaigns capability ingests dial * requests via the PutDialRequestBatch API. It then uses BatchPutContact to create contacts corresponding to those dial * requests. If agents are available, the dial requests are dialed out, which results in a voice call. The resulting * voice call uses the same contactId that was created by BatchPutContact. *

* * @param batchPutContactRequest * @return A Java Future containing the result of the BatchPutContact 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. *
    *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • LimitExceededException The allowed limit for the resource has been exceeded.
  • *
  • IdempotencyException An entity with the same name already exists.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.BatchPutContact * @see AWS API * Documentation */ @Override public CompletableFuture batchPutContact(BatchPutContactRequest batchPutContactRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(batchPutContactRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, batchPutContactRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "BatchPutContact"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, BatchPutContactResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("BatchPutContact").withProtocolMetadata(protocolMetadata) .withMarshaller(new BatchPutContactRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(batchPutContactRequest)); 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); } } /** *

* Claims an available phone number to your Amazon Connect instance or traffic distribution group. You can call this * API only in the same Amazon Web Services Region where the Amazon Connect instance or traffic distribution group * was created. *

*

* For more information about how to use this operation, see Claim a phone number in your * country and Claim phone numbers to traffic distribution groups in the Amazon Connect Administrator Guide. *

* *

* You can call the SearchAvailablePhoneNumbers API for available phone numbers that you can claim. Call the DescribePhoneNumber API to verify the status of a previous ClaimPhoneNumber * operation. *

*
*

* If you plan to claim and release numbers frequently, contact us for a service quota exception. Otherwise, it is * possible you will be blocked from claiming and releasing any more numbers until up to 180 days past the oldest * number released has expired. *

*

* By default you can claim and release up to 200% of your maximum number of active phone numbers. If you claim and * release phone numbers using the UI or API during a rolling 180 day cycle that exceeds 200% of your phone number * service level quota, you will be blocked from claiming any more numbers until 180 days past the oldest number * released has expired. *

*

* For example, if you already have 99 claimed numbers and a service level quota of 99 phone numbers, and in any 180 * day period you release 99, claim 99, and then release 99, you will have exceeded the 200% limit. At that point * you are blocked from claiming any more numbers until you open an Amazon Web Services support ticket. *

* * @param claimPhoneNumberRequest * @return A Java Future containing the result of the ClaimPhoneNumber 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. *
    *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • IdempotencyException An entity with the same name already exists.
  • *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.ClaimPhoneNumber * @see AWS API * Documentation */ @Override public CompletableFuture claimPhoneNumber(ClaimPhoneNumberRequest claimPhoneNumberRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(claimPhoneNumberRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, claimPhoneNumberRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ClaimPhoneNumber"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ClaimPhoneNumberResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ClaimPhoneNumber").withProtocolMetadata(protocolMetadata) .withMarshaller(new ClaimPhoneNumberRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(claimPhoneNumberRequest)); 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); } } /** *

* Allows you to confirm that the attached file has been uploaded using the pre-signed URL provided in the * StartAttachedFileUpload API. *

* * @param completeAttachedFileUploadRequest * Request to CompleteAttachedFileUpload API * @return A Java Future containing the result of the CompleteAttachedFileUpload 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. *
    *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.CompleteAttachedFileUpload * @see AWS API Documentation */ @Override public CompletableFuture completeAttachedFileUpload( CompleteAttachedFileUploadRequest completeAttachedFileUploadRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(completeAttachedFileUploadRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, completeAttachedFileUploadRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CompleteAttachedFileUpload"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CompleteAttachedFileUploadResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CompleteAttachedFileUpload").withProtocolMetadata(protocolMetadata) .withMarshaller(new CompleteAttachedFileUploadRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(completeAttachedFileUploadRequest)); 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); } } /** *

* This API is in preview release for Amazon Connect and is subject to change. *

*

* Creates an agent status for the specified Amazon Connect instance. *

* * @param createAgentStatusRequest * @return A Java Future containing the result of the CreateAgentStatus 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • DuplicateResourceException A resource with the specified name already exists.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • LimitExceededException The allowed limit for the resource has been exceeded.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.CreateAgentStatus * @see AWS API * Documentation */ @Override public CompletableFuture createAgentStatus(CreateAgentStatusRequest createAgentStatusRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createAgentStatusRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createAgentStatusRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateAgentStatus"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateAgentStatusResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateAgentStatus").withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateAgentStatusRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createAgentStatusRequest)); 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); } } /** *

* Creates a flow for the specified Amazon Connect instance. *

*

* You can also create and update flows using the Amazon Connect Flow * language. *

* * @param createContactFlowRequest * @return A Java Future containing the result of the CreateContactFlow 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidContactFlowException The flow is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • DuplicateResourceException A resource with the specified name already exists.
  • *
  • LimitExceededException The allowed limit for the resource has been exceeded.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.CreateContactFlow * @see AWS API * Documentation */ @Override public CompletableFuture createContactFlow(CreateContactFlowRequest createContactFlowRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createContactFlowRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createContactFlowRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateContactFlow"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateContactFlowResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateContactFlow").withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateContactFlowRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createContactFlowRequest)); 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); } } /** *

* Creates a flow module for the specified Amazon Connect instance. *

* * @param createContactFlowModuleRequest * @return A Java Future containing the result of the CreateContactFlowModule 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. *
    *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidContactFlowModuleException The problems with the module. Please fix before trying again.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • DuplicateResourceException A resource with the specified name already exists.
  • *
  • LimitExceededException The allowed limit for the resource has been exceeded.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • IdempotencyException An entity with the same name already exists.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.CreateContactFlowModule * @see AWS API Documentation */ @Override public CompletableFuture createContactFlowModule( CreateContactFlowModuleRequest createContactFlowModuleRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createContactFlowModuleRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createContactFlowModuleRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateContactFlowModule"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateContactFlowModuleResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateContactFlowModule").withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateContactFlowModuleRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createContactFlowModuleRequest)); 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); } } /** *

* Creates an evaluation form in the specified Amazon Connect instance. The form can be used to define questions * related to agent performance, and create sections to organize such questions. Question and section identifiers * cannot be duplicated within the same evaluation form. *

* * @param createEvaluationFormRequest * @return A Java Future containing the result of the CreateEvaluationForm 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. *
    *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • ServiceQuotaExceededException The service quota has been exceeded.
  • *
  • ResourceConflictException A resource already has that name.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.CreateEvaluationForm * @see AWS * API Documentation */ @Override public CompletableFuture createEvaluationForm( CreateEvaluationFormRequest createEvaluationFormRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createEvaluationFormRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createEvaluationFormRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateEvaluationForm"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateEvaluationFormResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateEvaluationForm").withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateEvaluationFormRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createEvaluationFormRequest)); 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); } } /** *

* This API is in preview release for Amazon Connect and is subject to change. *

*

* Creates hours of operation. *

* * @param createHoursOfOperationRequest * @return A Java Future containing the result of the CreateHoursOfOperation 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. *
    *
  • DuplicateResourceException A resource with the specified name already exists.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • LimitExceededException The allowed limit for the resource has been exceeded.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.CreateHoursOfOperation * @see AWS API Documentation */ @Override public CompletableFuture createHoursOfOperation( CreateHoursOfOperationRequest createHoursOfOperationRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createHoursOfOperationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createHoursOfOperationRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateHoursOfOperation"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateHoursOfOperationResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateHoursOfOperation").withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateHoursOfOperationRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createHoursOfOperationRequest)); 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); } } /** *

* This API is in preview release for Amazon Connect and is subject to change. *

*

* Initiates an Amazon Connect instance with all the supported channels enabled. It does not attach any storage, * such as Amazon Simple Storage Service (Amazon S3) or Amazon Kinesis. It also does not allow for any * configurations on features, such as Contact Lens for Amazon Connect. *

*

* For more information, see Create an Amazon * Connect instance in the Amazon Connect Administrator Guide. *

*

* Amazon Connect enforces a limit on the total number of instances that you can create or delete in 30 days. If you * exceed this limit, you will get an error message indicating there has been an excessive number of attempts at * creating or deleting instances. You must wait 30 days before you can restart creating and deleting instances in * your account. *

* * @param createInstanceRequest * @return A Java Future containing the result of the CreateInstance 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • ServiceQuotaExceededException The service quota has been exceeded.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.CreateInstance * @see AWS API * Documentation */ @Override public CompletableFuture createInstance(CreateInstanceRequest createInstanceRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createInstanceRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createInstanceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateInstance"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateInstanceResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateInstance").withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateInstanceRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createInstanceRequest)); 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); } } /** *

* Creates an Amazon Web Services resource association with an Amazon Connect instance. *

* * @param createIntegrationAssociationRequest * @return A Java Future containing the result of the CreateIntegrationAssociation 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. *
    *
  • DuplicateResourceException A resource with the specified name already exists.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.CreateIntegrationAssociation * @see AWS API Documentation */ @Override public CompletableFuture createIntegrationAssociation( CreateIntegrationAssociationRequest createIntegrationAssociationRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createIntegrationAssociationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createIntegrationAssociationRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateIntegrationAssociation"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateIntegrationAssociationResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateIntegrationAssociation").withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateIntegrationAssociationRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createIntegrationAssociationRequest)); 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); } } /** *

* Adds a new participant into an on-going chat contact. For more information, see Customize chat flow * experiences by integrating custom participants. *

* * @param createParticipantRequest * @return A Java Future containing the result of the CreateParticipant 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • ServiceQuotaExceededException The service quota has been exceeded.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.CreateParticipant * @see AWS API * Documentation */ @Override public CompletableFuture createParticipant(CreateParticipantRequest createParticipantRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createParticipantRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createParticipantRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateParticipant"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateParticipantResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateParticipant").withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateParticipantRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createParticipantRequest)); 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); } } /** *

* Enables rehydration of chats for the lifespan of a contact. For more information about chat rehydration, see Enable persistent chat in * the Amazon Connect Administrator Guide. *

* * @param createPersistentContactAssociationRequest * @return A Java Future containing the result of the CreatePersistentContactAssociation 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.CreatePersistentContactAssociation * @see AWS API Documentation */ @Override public CompletableFuture createPersistentContactAssociation( CreatePersistentContactAssociationRequest createPersistentContactAssociationRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createPersistentContactAssociationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createPersistentContactAssociationRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreatePersistentContactAssociation"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(operationMetadata, CreatePersistentContactAssociationResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreatePersistentContactAssociation").withProtocolMetadata(protocolMetadata) .withMarshaller(new CreatePersistentContactAssociationRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createPersistentContactAssociationRequest)); 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); } } /** *

* Creates a new predefined attribute for the specified Amazon Connect instance. Predefined attributes are * attributes in an Amazon Connect instance that can be used to route contacts to an agent or pools of agents within * a queue. For more information, see Create predefined * attributes for routing contacts to agents. *

* * @param createPredefinedAttributeRequest * @return A Java Future containing the result of the CreatePredefinedAttribute 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. *
    *
  • DuplicateResourceException A resource with the specified name already exists.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • LimitExceededException The allowed limit for the resource has been exceeded.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.CreatePredefinedAttribute * @see AWS API Documentation */ @Override public CompletableFuture createPredefinedAttribute( CreatePredefinedAttributeRequest createPredefinedAttributeRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createPredefinedAttributeRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createPredefinedAttributeRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreatePredefinedAttribute"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreatePredefinedAttributeResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreatePredefinedAttribute").withProtocolMetadata(protocolMetadata) .withMarshaller(new CreatePredefinedAttributeRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createPredefinedAttributeRequest)); 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); } } /** *

* Creates a prompt. For more information about prompts, such as supported file types and maximum length, see Create prompts in the Amazon * Connect Administrator Guide. *

* * @param createPromptRequest * @return A Java Future containing the result of the CreatePrompt 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. *
    *
  • DuplicateResourceException A resource with the specified name already exists.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • LimitExceededException The allowed limit for the resource has been exceeded.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.CreatePrompt * @see AWS API * Documentation */ @Override public CompletableFuture createPrompt(CreatePromptRequest createPromptRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createPromptRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createPromptRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreatePrompt"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, CreatePromptResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreatePrompt").withProtocolMetadata(protocolMetadata) .withMarshaller(new CreatePromptRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createPromptRequest)); 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); } } /** *

* This API is in preview release for Amazon Connect and is subject to change. *

*

* Creates a new queue for the specified Amazon Connect instance. *

* *
    *
  • *

    * If the phone number is claimed to a traffic distribution group that was created in the same Region as the Amazon * Connect instance where you are calling this API, then you can use a full phone number ARN or a UUID for * OutboundCallerIdNumberId. However, if the phone number is claimed to a traffic distribution group * that is in one Region, and you are calling this API from an instance in another Amazon Web Services Region that * is associated with the traffic distribution group, you must provide a full phone number ARN. If a UUID is * provided in this scenario, you will receive a ResourceNotFoundException. *

    *
  • *
  • *

    * Only use the phone number ARN format that doesn't contain instance in the path, for example, * arn:aws:connect:us-east-1:1234567890:phone-number/uuid. This is the same ARN format that is returned * when you call the ListPhoneNumbersV2 * API. *

    *
  • *
  • *

    * If you plan to use IAM policies to allow/deny access to this API for phone number resources claimed to a traffic * distribution group, see Allow or Deny queue API actions for phone numbers in a replica Region. *

    *
  • *
*
* * @param createQueueRequest * @return A Java Future containing the result of the CreateQueue 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • DuplicateResourceException A resource with the specified name already exists.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • LimitExceededException The allowed limit for the resource has been exceeded.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.CreateQueue * @see AWS API * Documentation */ @Override public CompletableFuture createQueue(CreateQueueRequest createQueueRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createQueueRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createQueueRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateQueue"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, CreateQueueResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateQueue").withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateQueueRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createQueueRequest)); 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); } } /** *

* Creates a quick connect for the specified Amazon Connect instance. *

* * @param createQuickConnectRequest * @return A Java Future containing the result of the CreateQuickConnect 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • DuplicateResourceException A resource with the specified name already exists.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • LimitExceededException The allowed limit for the resource has been exceeded.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.CreateQuickConnect * @see AWS * API Documentation */ @Override public CompletableFuture createQuickConnect(CreateQuickConnectRequest createQuickConnectRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createQuickConnectRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createQuickConnectRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateQuickConnect"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateQuickConnectResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateQuickConnect").withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateQuickConnectRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createQuickConnectRequest)); 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); } } /** *

* Creates a new routing profile. *

* * @param createRoutingProfileRequest * @return A Java Future containing the result of the CreateRoutingProfile 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • DuplicateResourceException A resource with the specified name already exists.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • LimitExceededException The allowed limit for the resource has been exceeded.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.CreateRoutingProfile * @see AWS * API Documentation */ @Override public CompletableFuture createRoutingProfile( CreateRoutingProfileRequest createRoutingProfileRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createRoutingProfileRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createRoutingProfileRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateRoutingProfile"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateRoutingProfileResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateRoutingProfile").withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateRoutingProfileRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createRoutingProfileRequest)); 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); } } /** *

* Creates a rule for the specified Amazon Connect instance. *

*

* Use the Rules * Function language to code conditions for the rule. *

* * @param createRuleRequest * @return A Java Future containing the result of the CreateRule 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • ResourceConflictException A resource already has that name.
  • *
  • ServiceQuotaExceededException The service quota has been exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.CreateRule * @see AWS API * Documentation */ @Override public CompletableFuture createRule(CreateRuleRequest createRuleRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createRuleRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createRuleRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateRule"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, CreateRuleResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("CreateRule") .withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateRuleRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createRuleRequest)); 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); } } /** *

* Creates a security profile. *

*

* For information about security profiles, see Security Profiles * in the Amazon Connect Administrator Guide. For a mapping of the API name and user interface name of the * security profile permissions, see List of security profile * permissions. *

* * @param createSecurityProfileRequest * @return A Java Future containing the result of the CreateSecurityProfile 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • LimitExceededException The allowed limit for the resource has been exceeded.
  • *
  • DuplicateResourceException A resource with the specified name already exists.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.CreateSecurityProfile * @see AWS * API Documentation */ @Override public CompletableFuture createSecurityProfile( CreateSecurityProfileRequest createSecurityProfileRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createSecurityProfileRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createSecurityProfileRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateSecurityProfile"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateSecurityProfileResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateSecurityProfile").withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateSecurityProfileRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createSecurityProfileRequest)); 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); } } /** *

* Creates a new task template in the specified Amazon Connect instance. *

* * @param createTaskTemplateRequest * @return A Java Future containing the result of the CreateTaskTemplate 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. *
    *
  • PropertyValidationException The property is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • ServiceQuotaExceededException The service quota has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.CreateTaskTemplate * @see AWS * API Documentation */ @Override public CompletableFuture createTaskTemplate(CreateTaskTemplateRequest createTaskTemplateRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createTaskTemplateRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createTaskTemplateRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateTaskTemplate"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateTaskTemplateResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateTaskTemplate").withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateTaskTemplateRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createTaskTemplateRequest)); 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); } } /** *

* Creates a traffic distribution group given an Amazon Connect instance that has been replicated. *

* *

* The SignInConfig distribution is available only on a default TrafficDistributionGroup * (see the IsDefault parameter in the TrafficDistributionGroup data type). If you call UpdateTrafficDistribution with a modified * SignInConfig and a non-default TrafficDistributionGroup, an * InvalidRequestException is returned. *

*
*

* For more information about creating traffic distribution groups, see Set up * traffic distribution groups in the Amazon Connect Administrator Guide. *

* * @param createTrafficDistributionGroupRequest * @return A Java Future containing the result of the CreateTrafficDistributionGroup 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • ServiceQuotaExceededException The service quota has been exceeded.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • ResourceConflictException A resource already has that name.
  • *
  • ResourceNotReadyException The resource is not ready.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.CreateTrafficDistributionGroup * @see AWS API Documentation */ @Override public CompletableFuture createTrafficDistributionGroup( CreateTrafficDistributionGroupRequest createTrafficDistributionGroupRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createTrafficDistributionGroupRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createTrafficDistributionGroupRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateTrafficDistributionGroup"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateTrafficDistributionGroupResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateTrafficDistributionGroup").withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateTrafficDistributionGroupRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createTrafficDistributionGroupRequest)); 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); } } /** *

* Creates a use case for an integration association. *

* * @param createUseCaseRequest * @return A Java Future containing the result of the CreateUseCase 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. *
    *
  • DuplicateResourceException A resource with the specified name already exists.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.CreateUseCase * @see AWS API * Documentation */ @Override public CompletableFuture createUseCase(CreateUseCaseRequest createUseCaseRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createUseCaseRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createUseCaseRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateUseCase"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, CreateUseCaseResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateUseCase").withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateUseCaseRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createUseCaseRequest)); 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); } } /** *

* Creates a user account for the specified Amazon Connect instance. *

* *

* Certain UserIdentityInfo * parameters are required in some situations. For example, Email is required if you are using SAML for * identity management. FirstName and LastName are required if you are using Amazon * Connect or SAML for identity management. *

*
*

* For information about how to create users using the Amazon Connect admin website, see Add Users in the Amazon * Connect Administrator Guide. *

* * @param createUserRequest * @return A Java Future containing the result of the CreateUser 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • LimitExceededException The allowed limit for the resource has been exceeded.
  • *
  • DuplicateResourceException A resource with the specified name already exists.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.CreateUser * @see AWS API * Documentation */ @Override public CompletableFuture createUser(CreateUserRequest createUserRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createUserRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createUserRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateUser"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, CreateUserResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("CreateUser") .withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateUserRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createUserRequest)); 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); } } /** *

* Creates a new user hierarchy group. *

* * @param createUserHierarchyGroupRequest * @return A Java Future containing the result of the CreateUserHierarchyGroup 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • DuplicateResourceException A resource with the specified name already exists.
  • *
  • LimitExceededException The allowed limit for the resource has been exceeded.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.CreateUserHierarchyGroup * @see AWS API Documentation */ @Override public CompletableFuture createUserHierarchyGroup( CreateUserHierarchyGroupRequest createUserHierarchyGroupRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createUserHierarchyGroupRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createUserHierarchyGroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateUserHierarchyGroup"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateUserHierarchyGroupResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateUserHierarchyGroup").withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateUserHierarchyGroupRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createUserHierarchyGroupRequest)); 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); } } /** *

* Creates a new view with the possible status of SAVED or PUBLISHED. *

*

* The views will have a unique name for each connect instance. *

*

* It performs basic content validation if the status is SAVED or full content validation if the status * is set to PUBLISHED. An error is returned if validation fails. It associates either the * $SAVED qualifier or both of the $SAVED and $LATEST qualifiers * with the provided view content based on the status. The view is idempotent if ClientToken is provided. *

* * @param createViewRequest * @return A Java Future containing the result of the CreateView 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. *
    *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • DuplicateResourceException A resource with the specified name already exists.
  • *
  • ServiceQuotaExceededException The service quota has been exceeded.
  • *
  • TooManyRequestsException Displayed when rate-related API limits are exceeded.
  • *
  • ResourceInUseException That resource is already in use. Please try another.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.CreateView * @see AWS API * Documentation */ @Override public CompletableFuture createView(CreateViewRequest createViewRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createViewRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createViewRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateView"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, CreateViewResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("CreateView") .withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateViewRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createViewRequest)); 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); } } /** *

* Publishes a new version of the view identifier. *

*

* Versions are immutable and monotonically increasing. *

*

* It returns the highest version if there is no change in content compared to that version. An error is displayed * if the supplied ViewContentSha256 is different from the ViewContentSha256 of the $LATEST alias. *

* * @param createViewVersionRequest * @return A Java Future containing the result of the CreateViewVersion 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. *
    *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • TooManyRequestsException Displayed when rate-related API limits are exceeded.
  • *
  • ServiceQuotaExceededException The service quota has been exceeded.
  • *
  • ResourceInUseException That resource is already in use. Please try another.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.CreateViewVersion * @see AWS API * Documentation */ @Override public CompletableFuture createViewVersion(CreateViewVersionRequest createViewVersionRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createViewVersionRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createViewVersionRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateViewVersion"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateViewVersionResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateViewVersion").withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateViewVersionRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createViewVersionRequest)); 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); } } /** *

* Creates a custom vocabulary associated with your Amazon Connect instance. You can set a custom vocabulary to be * your default vocabulary for a given language. Contact Lens for Amazon Connect uses the default vocabulary in * post-call and real-time contact analysis sessions for that language. *

* * @param createVocabularyRequest * @return A Java Future containing the result of the CreateVocabulary 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • ResourceConflictException A resource already has that name.
  • *
  • ServiceQuotaExceededException The service quota has been exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.CreateVocabulary * @see AWS API * Documentation */ @Override public CompletableFuture createVocabulary(CreateVocabularyRequest createVocabularyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createVocabularyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createVocabularyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateVocabulary"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateVocabularyResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateVocabulary").withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateVocabularyRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createVocabularyRequest)); 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); } } /** *

* Deactivates an evaluation form in the specified Amazon Connect instance. After a form is deactivated, it is no * longer available for users to start new evaluations based on the form. *

* * @param deactivateEvaluationFormRequest * @return A Java Future containing the result of the DeactivateEvaluationForm 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. *
    *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • ResourceConflictException A resource already has that name.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DeactivateEvaluationForm * @see AWS API Documentation */ @Override public CompletableFuture deactivateEvaluationForm( DeactivateEvaluationFormRequest deactivateEvaluationFormRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deactivateEvaluationFormRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deactivateEvaluationFormRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeactivateEvaluationForm"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeactivateEvaluationFormResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeactivateEvaluationForm").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeactivateEvaluationFormRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deactivateEvaluationFormRequest)); 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 an attached file along with the underlying S3 Object. *

* *

* The attached file is permanently deleted if S3 bucket versioning is not enabled. *

*
* * @param deleteAttachedFileRequest * Request to DeleteAttachedFile API * @return A Java Future containing the result of the DeleteAttachedFile 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. *
    *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DeleteAttachedFile * @see AWS * API Documentation */ @Override public CompletableFuture deleteAttachedFile(DeleteAttachedFileRequest deleteAttachedFileRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteAttachedFileRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteAttachedFileRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteAttachedFile"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteAttachedFileResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteAttachedFile").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteAttachedFileRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteAttachedFileRequest)); 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 a contact evaluation in the specified Amazon Connect instance. *

* * @param deleteContactEvaluationRequest * @return A Java Future containing the result of the DeleteContactEvaluation 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. *
    *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • ResourceConflictException A resource already has that name.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DeleteContactEvaluation * @see AWS API Documentation */ @Override public CompletableFuture deleteContactEvaluation( DeleteContactEvaluationRequest deleteContactEvaluationRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteContactEvaluationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteContactEvaluationRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteContactEvaluation"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteContactEvaluationResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteContactEvaluation").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteContactEvaluationRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteContactEvaluationRequest)); 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 a flow for the specified Amazon Connect instance. *

* * @param deleteContactFlowRequest * @return A Java Future containing the result of the DeleteContactFlow 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. *
    *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DeleteContactFlow * @see AWS API * Documentation */ @Override public CompletableFuture deleteContactFlow(DeleteContactFlowRequest deleteContactFlowRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteContactFlowRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteContactFlowRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteContactFlow"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteContactFlowResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteContactFlow").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteContactFlowRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteContactFlowRequest)); 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 flow module. *

* * @param deleteContactFlowModuleRequest * @return A Java Future containing the result of the DeleteContactFlowModule 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. *
    *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DeleteContactFlowModule * @see AWS API Documentation */ @Override public CompletableFuture deleteContactFlowModule( DeleteContactFlowModuleRequest deleteContactFlowModuleRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteContactFlowModuleRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteContactFlowModuleRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteContactFlowModule"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteContactFlowModuleResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteContactFlowModule").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteContactFlowModuleRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteContactFlowModuleRequest)); 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 an evaluation form in the specified Amazon Connect instance. *

*
    *
  • *

    * If the version property is provided, only the specified version of the evaluation form is deleted. *

    *
  • *
  • *

    * If no version is provided, then the full form (all versions) is deleted. *

    *
  • *
* * @param deleteEvaluationFormRequest * @return A Java Future containing the result of the DeleteEvaluationForm 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. *
    *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • ResourceConflictException A resource already has that name.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DeleteEvaluationForm * @see AWS * API Documentation */ @Override public CompletableFuture deleteEvaluationForm( DeleteEvaluationFormRequest deleteEvaluationFormRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteEvaluationFormRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteEvaluationFormRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteEvaluationForm"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteEvaluationFormResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteEvaluationForm").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteEvaluationFormRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteEvaluationFormRequest)); 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); } } /** *

* This API is in preview release for Amazon Connect and is subject to change. *

*

* Deletes an hours of operation. *

* * @param deleteHoursOfOperationRequest * @return A Java Future containing the result of the DeleteHoursOfOperation 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DeleteHoursOfOperation * @see AWS API Documentation */ @Override public CompletableFuture deleteHoursOfOperation( DeleteHoursOfOperationRequest deleteHoursOfOperationRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteHoursOfOperationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteHoursOfOperationRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteHoursOfOperation"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteHoursOfOperationResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteHoursOfOperation").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteHoursOfOperationRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteHoursOfOperationRequest)); 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); } } /** *

* This API is in preview release for Amazon Connect and is subject to change. *

*

* Deletes the Amazon Connect instance. For more information, see Delete your Amazon * Connect instance in the Amazon Connect Administrator Guide. *

*

* Amazon Connect enforces a limit on the total number of instances that you can create or delete in 30 days. If you * exceed this limit, you will get an error message indicating there has been an excessive number of attempts at * creating or deleting instances. You must wait 30 days before you can restart creating and deleting instances in * your account. *

* * @param deleteInstanceRequest * @return A Java Future containing the result of the DeleteInstance 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. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DeleteInstance * @see AWS API * Documentation */ @Override public CompletableFuture deleteInstance(DeleteInstanceRequest deleteInstanceRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteInstanceRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteInstanceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteInstance"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteInstanceResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteInstance").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteInstanceRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteInstanceRequest)); 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 an Amazon Web Services resource association from an Amazon Connect instance. The association must not * have any use cases associated with it. *

* * @param deleteIntegrationAssociationRequest * @return A Java Future containing the result of the DeleteIntegrationAssociation 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. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DeleteIntegrationAssociation * @see AWS API Documentation */ @Override public CompletableFuture deleteIntegrationAssociation( DeleteIntegrationAssociationRequest deleteIntegrationAssociationRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteIntegrationAssociationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteIntegrationAssociationRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteIntegrationAssociation"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteIntegrationAssociationResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteIntegrationAssociation").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteIntegrationAssociationRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteIntegrationAssociationRequest)); 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 a predefined attribute from the specified Amazon Connect instance. *

* * @param deletePredefinedAttributeRequest * @return A Java Future containing the result of the DeletePredefinedAttribute 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. *
    *
  • ResourceInUseException That resource is already in use. Please try another.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DeletePredefinedAttribute * @see AWS API Documentation */ @Override public CompletableFuture deletePredefinedAttribute( DeletePredefinedAttributeRequest deletePredefinedAttributeRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deletePredefinedAttributeRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deletePredefinedAttributeRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeletePredefinedAttribute"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeletePredefinedAttributeResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeletePredefinedAttribute").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeletePredefinedAttributeRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deletePredefinedAttributeRequest)); 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 a prompt. *

* * @param deletePromptRequest * @return A Java Future containing the result of the DeletePrompt 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DeletePrompt * @see AWS API * Documentation */ @Override public CompletableFuture deletePrompt(DeletePromptRequest deletePromptRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deletePromptRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deletePromptRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeletePrompt"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DeletePromptResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeletePrompt").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeletePromptRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deletePromptRequest)); 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 a queue. It isn't possible to delete a queue by using the Amazon Connect admin website. *

* * @param deleteQueueRequest * @return A Java Future containing the result of the DeleteQueue 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ResourceInUseException That resource is already in use. Please try another.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DeleteQueue * @see AWS API * Documentation */ @Override public CompletableFuture deleteQueue(DeleteQueueRequest deleteQueueRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteQueueRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteQueueRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteQueue"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DeleteQueueResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteQueue").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteQueueRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteQueueRequest)); 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 a quick connect. *

* *

* After calling DeleteUser, it's important * to call DeleteQuickConnect to delete any records related to the deleted users. This will help you: *

*
    *
  • *

    * Avoid dangling resources that impact your service quotas. *

    *
  • *
  • *

    * Remove deleted users so they don't appear to agents as transfer options. *

    *
  • *
  • *

    * Avoid the disruption of other Amazon Connect processes, such as instance replication and syncing if you're using * Amazon * Connect Global Resiliency. *

    *
  • *
*
* * @param deleteQuickConnectRequest * @return A Java Future containing the result of the DeleteQuickConnect 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DeleteQuickConnect * @see AWS * API Documentation */ @Override public CompletableFuture deleteQuickConnect(DeleteQuickConnectRequest deleteQuickConnectRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteQuickConnectRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteQuickConnectRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteQuickConnect"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteQuickConnectResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteQuickConnect").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteQuickConnectRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteQuickConnectRequest)); 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 a routing profile. *

* * @param deleteRoutingProfileRequest * @return A Java Future containing the result of the DeleteRoutingProfile 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ResourceInUseException That resource is already in use. Please try another.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DeleteRoutingProfile * @see AWS * API Documentation */ @Override public CompletableFuture deleteRoutingProfile( DeleteRoutingProfileRequest deleteRoutingProfileRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteRoutingProfileRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteRoutingProfileRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteRoutingProfile"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteRoutingProfileResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteRoutingProfile").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteRoutingProfileRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteRoutingProfileRequest)); 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 a rule for the specified Amazon Connect instance. *

* * @param deleteRuleRequest * @return A Java Future containing the result of the DeleteRule 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DeleteRule * @see AWS API * Documentation */ @Override public CompletableFuture deleteRule(DeleteRuleRequest deleteRuleRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteRuleRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteRuleRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteRule"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DeleteRuleResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("DeleteRule") .withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteRuleRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteRuleRequest)); 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 a security profile. *

* * @param deleteSecurityProfileRequest * @return A Java Future containing the result of the DeleteSecurityProfile 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • ResourceInUseException That resource is already in use. Please try another.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DeleteSecurityProfile * @see AWS * API Documentation */ @Override public CompletableFuture deleteSecurityProfile( DeleteSecurityProfileRequest deleteSecurityProfileRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteSecurityProfileRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteSecurityProfileRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteSecurityProfile"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteSecurityProfileResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteSecurityProfile").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteSecurityProfileRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteSecurityProfileRequest)); 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 task template. *

* * @param deleteTaskTemplateRequest * @return A Java Future containing the result of the DeleteTaskTemplate 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DeleteTaskTemplate * @see AWS * API Documentation */ @Override public CompletableFuture deleteTaskTemplate(DeleteTaskTemplateRequest deleteTaskTemplateRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteTaskTemplateRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteTaskTemplateRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteTaskTemplate"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteTaskTemplateResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteTaskTemplate").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteTaskTemplateRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteTaskTemplateRequest)); 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 a traffic distribution group. This API can be called only in the Region where the traffic distribution * group is created. *

*

* For more information about deleting traffic distribution groups, see Delete * traffic distribution groups in the Amazon Connect Administrator Guide. *

* * @param deleteTrafficDistributionGroupRequest * @return A Java Future containing the result of the DeleteTrafficDistributionGroup 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • ResourceInUseException That resource is already in use. Please try another.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DeleteTrafficDistributionGroup * @see AWS API Documentation */ @Override public CompletableFuture deleteTrafficDistributionGroup( DeleteTrafficDistributionGroupRequest deleteTrafficDistributionGroupRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteTrafficDistributionGroupRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteTrafficDistributionGroupRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteTrafficDistributionGroup"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteTrafficDistributionGroupResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteTrafficDistributionGroup").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteTrafficDistributionGroupRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteTrafficDistributionGroupRequest)); 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 a use case from an integration association. *

* * @param deleteUseCaseRequest * @return A Java Future containing the result of the DeleteUseCase 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. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DeleteUseCase * @see AWS API * Documentation */ @Override public CompletableFuture deleteUseCase(DeleteUseCaseRequest deleteUseCaseRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteUseCaseRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteUseCaseRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteUseCase"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DeleteUseCaseResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteUseCase").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteUseCaseRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteUseCaseRequest)); 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 a user account from the specified Amazon Connect instance. *

*

* For information about what happens to a user's data when their account is deleted, see Delete Users from Your Amazon * Connect Instance in the Amazon Connect Administrator Guide. *

* *

* After calling DeleteUser, call DeleteQuickConnect * to delete any records related to the deleted users. This will help you: *

*
    *
  • *

    * Avoid dangling resources that impact your service quotas. *

    *
  • *
  • *

    * Remove deleted users so they don't appear to agents as transfer options. *

    *
  • *
  • *

    * Avoid the disruption of other Amazon Connect processes, such as instance replication and syncing if you're using * Amazon * Connect Global Resiliency. *

    *
  • *
*
* * @param deleteUserRequest * @return A Java Future containing the result of the DeleteUser 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DeleteUser * @see AWS API * Documentation */ @Override public CompletableFuture deleteUser(DeleteUserRequest deleteUserRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteUserRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteUserRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteUser"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DeleteUserResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("DeleteUser") .withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteUserRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteUserRequest)); 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 an existing user hierarchy group. It must not be associated with any agents or have any active child * groups. *

* * @param deleteUserHierarchyGroupRequest * @return A Java Future containing the result of the DeleteUserHierarchyGroup 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ResourceInUseException That resource is already in use. Please try another.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DeleteUserHierarchyGroup * @see AWS API Documentation */ @Override public CompletableFuture deleteUserHierarchyGroup( DeleteUserHierarchyGroupRequest deleteUserHierarchyGroupRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteUserHierarchyGroupRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteUserHierarchyGroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteUserHierarchyGroup"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteUserHierarchyGroupResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteUserHierarchyGroup").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteUserHierarchyGroupRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteUserHierarchyGroupRequest)); 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 view entirely. It deletes the view and all associated qualifiers (versions and aliases). *

* * @param deleteViewRequest * @return A Java Future containing the result of the DeleteView 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. *
    *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • TooManyRequestsException Displayed when rate-related API limits are exceeded.
  • *
  • ResourceInUseException That resource is already in use. Please try another.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DeleteView * @see AWS API * Documentation */ @Override public CompletableFuture deleteView(DeleteViewRequest deleteViewRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteViewRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteViewRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteView"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DeleteViewResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("DeleteView") .withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteViewRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteViewRequest)); 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 particular version specified in ViewVersion identifier. *

* * @param deleteViewVersionRequest * @return A Java Future containing the result of the DeleteViewVersion 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. *
    *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • TooManyRequestsException Displayed when rate-related API limits are exceeded.
  • *
  • ResourceInUseException That resource is already in use. Please try another.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DeleteViewVersion * @see AWS API * Documentation */ @Override public CompletableFuture deleteViewVersion(DeleteViewVersionRequest deleteViewVersionRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteViewVersionRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteViewVersionRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteViewVersion"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteViewVersionResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteViewVersion").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteViewVersionRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteViewVersionRequest)); 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 vocabulary that has the given identifier. *

* * @param deleteVocabularyRequest * @return A Java Future containing the result of the DeleteVocabulary 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • ResourceInUseException That resource is already in use. Please try another.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DeleteVocabulary * @see AWS API * Documentation */ @Override public CompletableFuture deleteVocabulary(DeleteVocabularyRequest deleteVocabularyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteVocabularyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteVocabularyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteVocabulary"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteVocabularyResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteVocabulary").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteVocabularyRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteVocabularyRequest)); 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); } } /** *

* This API is in preview release for Amazon Connect and is subject to change. *

*

* Describes an agent status. *

* * @param describeAgentStatusRequest * @return A Java Future containing the result of the DescribeAgentStatus 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DescribeAgentStatus * @see AWS * API Documentation */ @Override public CompletableFuture describeAgentStatus( DescribeAgentStatusRequest describeAgentStatusRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeAgentStatusRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeAgentStatusRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeAgentStatus"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeAgentStatusResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeAgentStatus").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeAgentStatusRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeAgentStatusRequest)); 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); } } /** *

* This API is in preview release for Amazon Connect and is subject to change. To request access to this API, * contact Amazon Web Services Support. *

*

* Describes the target authentication profile. *

* * @param describeAuthenticationProfileRequest * @return A Java Future containing the result of the DescribeAuthenticationProfile 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DescribeAuthenticationProfile * @see AWS API Documentation */ @Override public CompletableFuture describeAuthenticationProfile( DescribeAuthenticationProfileRequest describeAuthenticationProfileRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeAuthenticationProfileRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeAuthenticationProfileRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeAuthenticationProfile"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeAuthenticationProfileResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeAuthenticationProfile").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeAuthenticationProfileRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeAuthenticationProfileRequest)); 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); } } /** *

* This API is in preview release for Amazon Connect and is subject to change. *

*

* Describes the specified contact. *

* *

* Contact information remains available in Amazon Connect for 24 months, and then it is deleted. *

*

* Only data from November 12, 2021, and later is returned by this API. *

*
* * @param describeContactRequest * @return A Java Future containing the result of the DescribeContact 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DescribeContact * @see AWS API * Documentation */ @Override public CompletableFuture describeContact(DescribeContactRequest describeContactRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeContactRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeContactRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeContact"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeContactResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeContact").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeContactRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeContactRequest)); 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); } } /** *

* Describes a contact evaluation in the specified Amazon Connect instance. *

* * @param describeContactEvaluationRequest * @return A Java Future containing the result of the DescribeContactEvaluation 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. *
    *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DescribeContactEvaluation * @see AWS API Documentation */ @Override public CompletableFuture describeContactEvaluation( DescribeContactEvaluationRequest describeContactEvaluationRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeContactEvaluationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeContactEvaluationRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeContactEvaluation"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeContactEvaluationResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeContactEvaluation").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeContactEvaluationRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeContactEvaluationRequest)); 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); } } /** *

* Describes the specified flow. *

*

* You can also create and update flows using the Amazon Connect Flow * language. *

*

* Use the $SAVED alias in the request to describe the SAVED content of a Flow. For * example, arn:aws:.../contact-flow/{id}:$SAVED. Once a contact flow is published, * $SAVED needs to be supplied to view saved content that has not been published. *

*

* In the response, Status indicates the flow status as either SAVED or PUBLISHED. * The PUBLISHED status will initiate validation on the content. SAVED does not initiate * validation of the content. SAVED | PUBLISHED *

* * @param describeContactFlowRequest * @return A Java Future containing the result of the DescribeContactFlow 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ContactFlowNotPublishedException The flow has not been published.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DescribeContactFlow * @see AWS * API Documentation */ @Override public CompletableFuture describeContactFlow( DescribeContactFlowRequest describeContactFlowRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeContactFlowRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeContactFlowRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeContactFlow"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeContactFlowResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeContactFlow").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeContactFlowRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeContactFlowRequest)); 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); } } /** *

* Describes the specified flow module. *

*

* Use the $SAVED alias in the request to describe the SAVED content of a Flow. For * example, arn:aws:.../contact-flow/{id}:$SAVED. Once a contact flow is published, * $SAVED needs to be supplied to view saved content that has not been published. *

* * @param describeContactFlowModuleRequest * @return A Java Future containing the result of the DescribeContactFlowModule 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. *
    *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DescribeContactFlowModule * @see AWS API Documentation */ @Override public CompletableFuture describeContactFlowModule( DescribeContactFlowModuleRequest describeContactFlowModuleRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeContactFlowModuleRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeContactFlowModuleRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeContactFlowModule"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeContactFlowModuleResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeContactFlowModule").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeContactFlowModuleRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeContactFlowModuleRequest)); 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); } } /** *

* Describes an evaluation form in the specified Amazon Connect instance. If the version property is not provided, * the latest version of the evaluation form is described. *

* * @param describeEvaluationFormRequest * @return A Java Future containing the result of the DescribeEvaluationForm 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. *
    *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DescribeEvaluationForm * @see AWS API Documentation */ @Override public CompletableFuture describeEvaluationForm( DescribeEvaluationFormRequest describeEvaluationFormRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeEvaluationFormRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeEvaluationFormRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeEvaluationForm"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeEvaluationFormResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeEvaluationForm").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeEvaluationFormRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeEvaluationFormRequest)); 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); } } /** *

* This API is in preview release for Amazon Connect and is subject to change. *

*

* Describes the hours of operation. *

* * @param describeHoursOfOperationRequest * @return A Java Future containing the result of the DescribeHoursOfOperation 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DescribeHoursOfOperation * @see AWS API Documentation */ @Override public CompletableFuture describeHoursOfOperation( DescribeHoursOfOperationRequest describeHoursOfOperationRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeHoursOfOperationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeHoursOfOperationRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeHoursOfOperation"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeHoursOfOperationResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeHoursOfOperation").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeHoursOfOperationRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeHoursOfOperationRequest)); 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); } } /** *

* This API is in preview release for Amazon Connect and is subject to change. *

*

* Returns the current state of the specified instance identifier. It tracks the instance while it is being created * and returns an error status, if applicable. *

*

* If an instance is not created successfully, the instance status reason field returns details relevant to the * reason. The instance in a failed state is returned only for 24 hours after the CreateInstance API was invoked. *

* * @param describeInstanceRequest * @return A Java Future containing the result of the DescribeInstance 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DescribeInstance * @see AWS API * Documentation */ @Override public CompletableFuture describeInstance(DescribeInstanceRequest describeInstanceRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeInstanceRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeInstanceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeInstance"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeInstanceResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeInstance").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeInstanceRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeInstanceRequest)); 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); } } /** *

* This API is in preview release for Amazon Connect and is subject to change. *

*

* Describes the specified instance attribute. *

* * @param describeInstanceAttributeRequest * @return A Java Future containing the result of the DescribeInstanceAttribute 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. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DescribeInstanceAttribute * @see AWS API Documentation */ @Override public CompletableFuture describeInstanceAttribute( DescribeInstanceAttributeRequest describeInstanceAttributeRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeInstanceAttributeRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeInstanceAttributeRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeInstanceAttribute"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeInstanceAttributeResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeInstanceAttribute").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeInstanceAttributeRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeInstanceAttributeRequest)); 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); } } /** *

* This API is in preview release for Amazon Connect and is subject to change. *

*

* Retrieves the current storage configurations for the specified resource type, association ID, and instance ID. *

* * @param describeInstanceStorageConfigRequest * @return A Java Future containing the result of the DescribeInstanceStorageConfig 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. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DescribeInstanceStorageConfig * @see AWS API Documentation */ @Override public CompletableFuture describeInstanceStorageConfig( DescribeInstanceStorageConfigRequest describeInstanceStorageConfigRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeInstanceStorageConfigRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeInstanceStorageConfigRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeInstanceStorageConfig"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeInstanceStorageConfigResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeInstanceStorageConfig").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeInstanceStorageConfigRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeInstanceStorageConfigRequest)); 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); } } /** *

* Gets details and status of a phone number that’s claimed to your Amazon Connect instance or traffic distribution * group. *

* *

* If the number is claimed to a traffic distribution group, and you are calling in the Amazon Web Services Region * where the traffic distribution group was created, you can use either a phone number ARN or UUID value for the * PhoneNumberId URI request parameter. However, if the number is claimed to a traffic distribution * group and you are calling this API in the alternate Amazon Web Services Region associated with the traffic * distribution group, you must provide a full phone number ARN. If a UUID is provided in this scenario, you will * receive a ResourceNotFoundException. *

*
* * @param describePhoneNumberRequest * @return A Java Future containing the result of the DescribePhoneNumber 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. *
    *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DescribePhoneNumber * @see AWS * API Documentation */ @Override public CompletableFuture describePhoneNumber( DescribePhoneNumberRequest describePhoneNumberRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describePhoneNumberRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describePhoneNumberRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribePhoneNumber"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribePhoneNumberResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribePhoneNumber").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribePhoneNumberRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describePhoneNumberRequest)); 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); } } /** *

* Describes a predefined attribute for the specified Amazon Connect instance. Predefined attributes are * attributes in an Amazon Connect instance that can be used to route contacts to an agent or pools of agents within * a queue. For more information, see Create predefined * attributes for routing contacts to agents. *

* * @param describePredefinedAttributeRequest * @return A Java Future containing the result of the DescribePredefinedAttribute 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DescribePredefinedAttribute * @see AWS API Documentation */ @Override public CompletableFuture describePredefinedAttribute( DescribePredefinedAttributeRequest describePredefinedAttributeRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describePredefinedAttributeRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describePredefinedAttributeRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribePredefinedAttribute"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribePredefinedAttributeResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribePredefinedAttribute").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribePredefinedAttributeRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describePredefinedAttributeRequest)); 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); } } /** *

* Describes the prompt. *

* * @param describePromptRequest * @return A Java Future containing the result of the DescribePrompt 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DescribePrompt * @see AWS API * Documentation */ @Override public CompletableFuture describePrompt(DescribePromptRequest describePromptRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describePromptRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describePromptRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribePrompt"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribePromptResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribePrompt").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribePromptRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describePromptRequest)); 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); } } /** *

* This API is in preview release for Amazon Connect and is subject to change. *

*

* Describes the specified queue. *

* * @param describeQueueRequest * @return A Java Future containing the result of the DescribeQueue 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DescribeQueue * @see AWS API * Documentation */ @Override public CompletableFuture describeQueue(DescribeQueueRequest describeQueueRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeQueueRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeQueueRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeQueue"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DescribeQueueResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeQueue").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeQueueRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeQueueRequest)); 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); } } /** *

* Describes the quick connect. *

* * @param describeQuickConnectRequest * @return A Java Future containing the result of the DescribeQuickConnect 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DescribeQuickConnect * @see AWS * API Documentation */ @Override public CompletableFuture describeQuickConnect( DescribeQuickConnectRequest describeQuickConnectRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeQuickConnectRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeQuickConnectRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeQuickConnect"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeQuickConnectResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeQuickConnect").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeQuickConnectRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeQuickConnectRequest)); 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); } } /** *

* Describes the specified routing profile. *

* * @param describeRoutingProfileRequest * @return A Java Future containing the result of the DescribeRoutingProfile 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DescribeRoutingProfile * @see AWS API Documentation */ @Override public CompletableFuture describeRoutingProfile( DescribeRoutingProfileRequest describeRoutingProfileRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeRoutingProfileRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeRoutingProfileRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeRoutingProfile"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeRoutingProfileResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeRoutingProfile").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeRoutingProfileRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeRoutingProfileRequest)); 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); } } /** *

* Describes a rule for the specified Amazon Connect instance. *

* * @param describeRuleRequest * @return A Java Future containing the result of the DescribeRule 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DescribeRule * @see AWS API * Documentation */ @Override public CompletableFuture describeRule(DescribeRuleRequest describeRuleRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeRuleRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeRuleRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeRule"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DescribeRuleResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeRule").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeRuleRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeRuleRequest)); 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); } } /** *

* Gets basic information about the security profile. *

*

* For information about security profiles, see Security Profiles * in the Amazon Connect Administrator Guide. For a mapping of the API name and user interface name of the * security profile permissions, see List of security profile * permissions. *

* * @param describeSecurityProfileRequest * @return A Java Future containing the result of the DescribeSecurityProfile 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DescribeSecurityProfile * @see AWS API Documentation */ @Override public CompletableFuture describeSecurityProfile( DescribeSecurityProfileRequest describeSecurityProfileRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeSecurityProfileRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeSecurityProfileRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeSecurityProfile"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeSecurityProfileResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeSecurityProfile").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeSecurityProfileRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeSecurityProfileRequest)); 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); } } /** *

* Gets details and status of a traffic distribution group. *

* * @param describeTrafficDistributionGroupRequest * @return A Java Future containing the result of the DescribeTrafficDistributionGroup 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DescribeTrafficDistributionGroup * @see AWS API Documentation */ @Override public CompletableFuture describeTrafficDistributionGroup( DescribeTrafficDistributionGroupRequest describeTrafficDistributionGroupRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeTrafficDistributionGroupRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeTrafficDistributionGroupRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeTrafficDistributionGroup"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(operationMetadata, DescribeTrafficDistributionGroupResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeTrafficDistributionGroup").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeTrafficDistributionGroupRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeTrafficDistributionGroupRequest)); 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); } } /** *

* Describes the specified user. You can find the instance ID in the * Amazon Connect console (it’s the final part of the ARN). The console does not display the user IDs. Instead, * list the users and note the IDs provided in the output. *

* * @param describeUserRequest * @return A Java Future containing the result of the DescribeUser 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DescribeUser * @see AWS API * Documentation */ @Override public CompletableFuture describeUser(DescribeUserRequest describeUserRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeUserRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeUserRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeUser"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DescribeUserResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeUser").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeUserRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeUserRequest)); 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); } } /** *

* Describes the specified hierarchy group. *

* * @param describeUserHierarchyGroupRequest * @return A Java Future containing the result of the DescribeUserHierarchyGroup 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DescribeUserHierarchyGroup * @see AWS API Documentation */ @Override public CompletableFuture describeUserHierarchyGroup( DescribeUserHierarchyGroupRequest describeUserHierarchyGroupRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeUserHierarchyGroupRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeUserHierarchyGroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeUserHierarchyGroup"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeUserHierarchyGroupResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeUserHierarchyGroup").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeUserHierarchyGroupRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeUserHierarchyGroupRequest)); 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); } } /** *

* Describes the hierarchy structure of the specified Amazon Connect instance. *

* * @param describeUserHierarchyStructureRequest * @return A Java Future containing the result of the DescribeUserHierarchyStructure 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DescribeUserHierarchyStructure * @see AWS API Documentation */ @Override public CompletableFuture describeUserHierarchyStructure( DescribeUserHierarchyStructureRequest describeUserHierarchyStructureRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeUserHierarchyStructureRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeUserHierarchyStructureRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeUserHierarchyStructure"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeUserHierarchyStructureResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeUserHierarchyStructure").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeUserHierarchyStructureRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeUserHierarchyStructureRequest)); 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); } } /** *

* Retrieves the view for the specified Amazon Connect instance and view identifier. *

*

* The view identifier can be supplied as a ViewId or ARN. *

*

* $SAVED needs to be supplied if a view is unpublished. *

*

* The view identifier can contain an optional qualifier, for example, <view-id>:$SAVED, which * is either an actual version number or an Amazon Connect managed qualifier $SAVED | $LATEST. If * it is not supplied, then $LATEST is assumed for customer managed views and an error is returned * if there is no published content available. Version 1 is assumed for Amazon Web Services managed views. *

* * @param describeViewRequest * @return A Java Future containing the result of the DescribeView 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. *
    *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • TooManyRequestsException Displayed when rate-related API limits are exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DescribeView * @see AWS API * Documentation */ @Override public CompletableFuture describeView(DescribeViewRequest describeViewRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeViewRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeViewRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeView"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DescribeViewResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeView").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeViewRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeViewRequest)); 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); } } /** *

* Describes the specified vocabulary. *

* * @param describeVocabularyRequest * @return A Java Future containing the result of the DescribeVocabulary 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DescribeVocabulary * @see AWS * API Documentation */ @Override public CompletableFuture describeVocabulary(DescribeVocabularyRequest describeVocabularyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeVocabularyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeVocabularyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeVocabulary"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeVocabularyResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeVocabulary").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeVocabularyRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeVocabularyRequest)); 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); } } /** *

* This API is in preview release for Amazon Connect and is subject to change. *

*

* Removes the dataset ID associated with a given Amazon Connect instance. *

* * @param disassociateAnalyticsDataSetRequest * @return A Java Future containing the result of the DisassociateAnalyticsDataSet 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DisassociateAnalyticsDataSet * @see AWS API Documentation */ @Override public CompletableFuture disassociateAnalyticsDataSet( DisassociateAnalyticsDataSetRequest disassociateAnalyticsDataSetRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(disassociateAnalyticsDataSetRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, disassociateAnalyticsDataSetRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DisassociateAnalyticsDataSet"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DisassociateAnalyticsDataSetResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DisassociateAnalyticsDataSet").withProtocolMetadata(protocolMetadata) .withMarshaller(new DisassociateAnalyticsDataSetRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(disassociateAnalyticsDataSetRequest)); 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); } } /** *

* This API is in preview release for Amazon Connect and is subject to change. *

*

* Revokes access to integrated applications from Amazon Connect. *

* * @param disassociateApprovedOriginRequest * @return A Java Future containing the result of the DisassociateApprovedOrigin 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. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DisassociateApprovedOrigin * @see AWS API Documentation */ @Override public CompletableFuture disassociateApprovedOrigin( DisassociateApprovedOriginRequest disassociateApprovedOriginRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(disassociateApprovedOriginRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, disassociateApprovedOriginRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DisassociateApprovedOrigin"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DisassociateApprovedOriginResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DisassociateApprovedOrigin").withProtocolMetadata(protocolMetadata) .withMarshaller(new DisassociateApprovedOriginRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(disassociateApprovedOriginRequest)); 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); } } /** *

* This API is in preview release for Amazon Connect and is subject to change. *

*

* Revokes authorization from the specified instance to access the specified Amazon Lex or Amazon Lex V2 bot. *

* * @param disassociateBotRequest * @return A Java Future containing the result of the DisassociateBot 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. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DisassociateBot * @see AWS API * Documentation */ @Override public CompletableFuture disassociateBot(DisassociateBotRequest disassociateBotRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(disassociateBotRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, disassociateBotRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DisassociateBot"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DisassociateBotResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DisassociateBot").withProtocolMetadata(protocolMetadata) .withMarshaller(new DisassociateBotRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(disassociateBotRequest)); 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); } } /** *

* Disassociates a connect resource from a flow. *

* * @param disassociateFlowRequest * @return A Java Future containing the result of the DisassociateFlow 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. *
    *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DisassociateFlow * @see AWS API * Documentation */ @Override public CompletableFuture disassociateFlow(DisassociateFlowRequest disassociateFlowRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(disassociateFlowRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, disassociateFlowRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DisassociateFlow"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DisassociateFlowResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DisassociateFlow").withProtocolMetadata(protocolMetadata) .withMarshaller(new DisassociateFlowRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(disassociateFlowRequest)); 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); } } /** *

* This API is in preview release for Amazon Connect and is subject to change. *

*

* Removes the storage type configurations for the specified resource type and association ID. *

* * @param disassociateInstanceStorageConfigRequest * @return A Java Future containing the result of the DisassociateInstanceStorageConfig 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. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DisassociateInstanceStorageConfig * @see AWS API Documentation */ @Override public CompletableFuture disassociateInstanceStorageConfig( DisassociateInstanceStorageConfigRequest disassociateInstanceStorageConfigRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(disassociateInstanceStorageConfigRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, disassociateInstanceStorageConfigRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DisassociateInstanceStorageConfig"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(operationMetadata, DisassociateInstanceStorageConfigResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DisassociateInstanceStorageConfig").withProtocolMetadata(protocolMetadata) .withMarshaller(new DisassociateInstanceStorageConfigRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(disassociateInstanceStorageConfigRequest)); 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); } } /** *

* This API is in preview release for Amazon Connect and is subject to change. *

*

* Remove the Lambda function from the dropdown options available in the relevant flow blocks. *

* * @param disassociateLambdaFunctionRequest * @return A Java Future containing the result of the DisassociateLambdaFunction 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. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DisassociateLambdaFunction * @see AWS API Documentation */ @Override public CompletableFuture disassociateLambdaFunction( DisassociateLambdaFunctionRequest disassociateLambdaFunctionRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(disassociateLambdaFunctionRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, disassociateLambdaFunctionRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DisassociateLambdaFunction"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DisassociateLambdaFunctionResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DisassociateLambdaFunction").withProtocolMetadata(protocolMetadata) .withMarshaller(new DisassociateLambdaFunctionRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(disassociateLambdaFunctionRequest)); 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); } } /** *

* This API is in preview release for Amazon Connect and is subject to change. *

*

* Revokes authorization from the specified instance to access the specified Amazon Lex bot. *

* * @param disassociateLexBotRequest * @return A Java Future containing the result of the DisassociateLexBot 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. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DisassociateLexBot * @see AWS * API Documentation */ @Override public CompletableFuture disassociateLexBot(DisassociateLexBotRequest disassociateLexBotRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(disassociateLexBotRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, disassociateLexBotRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DisassociateLexBot"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DisassociateLexBotResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DisassociateLexBot").withProtocolMetadata(protocolMetadata) .withMarshaller(new DisassociateLexBotRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(disassociateLexBotRequest)); 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); } } /** *

* Removes the flow association from a phone number claimed to your Amazon Connect instance. *

* *

* If the number is claimed to a traffic distribution group, and you are calling this API using an instance in the * Amazon Web Services Region where the traffic distribution group was created, you can use either a full phone * number ARN or UUID value for the PhoneNumberId URI request parameter. However, if the number is * claimed to a traffic distribution group and you are calling this API using an instance in the alternate Amazon * Web Services Region associated with the traffic distribution group, you must provide a full phone number ARN. If * a UUID is provided in this scenario, you will receive a ResourceNotFoundException. *

*
* * @param disassociatePhoneNumberContactFlowRequest * @return A Java Future containing the result of the DisassociatePhoneNumberContactFlow 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. *
    *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DisassociatePhoneNumberContactFlow * @see AWS API Documentation */ @Override public CompletableFuture disassociatePhoneNumberContactFlow( DisassociatePhoneNumberContactFlowRequest disassociatePhoneNumberContactFlowRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(disassociatePhoneNumberContactFlowRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, disassociatePhoneNumberContactFlowRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DisassociatePhoneNumberContactFlow"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(operationMetadata, DisassociatePhoneNumberContactFlowResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DisassociatePhoneNumberContactFlow").withProtocolMetadata(protocolMetadata) .withMarshaller(new DisassociatePhoneNumberContactFlowRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(disassociatePhoneNumberContactFlowRequest)); 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); } } /** *

* This API is in preview release for Amazon Connect and is subject to change. *

*

* Disassociates a set of quick connects from a queue. *

* * @param disassociateQueueQuickConnectsRequest * @return A Java Future containing the result of the DisassociateQueueQuickConnects 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DisassociateQueueQuickConnects * @see AWS API Documentation */ @Override public CompletableFuture disassociateQueueQuickConnects( DisassociateQueueQuickConnectsRequest disassociateQueueQuickConnectsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(disassociateQueueQuickConnectsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, disassociateQueueQuickConnectsRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DisassociateQueueQuickConnects"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DisassociateQueueQuickConnectsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DisassociateQueueQuickConnects").withProtocolMetadata(protocolMetadata) .withMarshaller(new DisassociateQueueQuickConnectsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(disassociateQueueQuickConnectsRequest)); 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); } } /** *

* Disassociates a set of queues from a routing profile. *

* * @param disassociateRoutingProfileQueuesRequest * @return A Java Future containing the result of the DisassociateRoutingProfileQueues 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DisassociateRoutingProfileQueues * @see AWS API Documentation */ @Override public CompletableFuture disassociateRoutingProfileQueues( DisassociateRoutingProfileQueuesRequest disassociateRoutingProfileQueuesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(disassociateRoutingProfileQueuesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, disassociateRoutingProfileQueuesRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DisassociateRoutingProfileQueues"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(operationMetadata, DisassociateRoutingProfileQueuesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DisassociateRoutingProfileQueues").withProtocolMetadata(protocolMetadata) .withMarshaller(new DisassociateRoutingProfileQueuesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(disassociateRoutingProfileQueuesRequest)); 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); } } /** *

* This API is in preview release for Amazon Connect and is subject to change. *

*

* Deletes the specified security key. *

* * @param disassociateSecurityKeyRequest * @return A Java Future containing the result of the DisassociateSecurityKey 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. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DisassociateSecurityKey * @see AWS API Documentation */ @Override public CompletableFuture disassociateSecurityKey( DisassociateSecurityKeyRequest disassociateSecurityKeyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(disassociateSecurityKeyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, disassociateSecurityKeyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DisassociateSecurityKey"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DisassociateSecurityKeyResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DisassociateSecurityKey").withProtocolMetadata(protocolMetadata) .withMarshaller(new DisassociateSecurityKeyRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(disassociateSecurityKeyRequest)); 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); } } /** *

* Disassociates an agent from a traffic distribution group. *

* * @param disassociateTrafficDistributionGroupUserRequest * @return A Java Future containing the result of the DisassociateTrafficDistributionGroupUser 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ResourceConflictException A resource already has that name.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DisassociateTrafficDistributionGroupUser * @see AWS API Documentation */ @Override public CompletableFuture disassociateTrafficDistributionGroupUser( DisassociateTrafficDistributionGroupUserRequest disassociateTrafficDistributionGroupUserRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration( disassociateTrafficDistributionGroupUserRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, disassociateTrafficDistributionGroupUserRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DisassociateTrafficDistributionGroupUser"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(operationMetadata, DisassociateTrafficDistributionGroupUserResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DisassociateTrafficDistributionGroupUser").withProtocolMetadata(protocolMetadata) .withMarshaller(new DisassociateTrafficDistributionGroupUserRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(disassociateTrafficDistributionGroupUserRequest)); 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); } } /** *

* Disassociates a set of proficiencies from a user. *

* * @param disassociateUserProficienciesRequest * @return A Java Future containing the result of the DisassociateUserProficiencies 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DisassociateUserProficiencies * @see AWS API Documentation */ @Override public CompletableFuture disassociateUserProficiencies( DisassociateUserProficienciesRequest disassociateUserProficienciesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(disassociateUserProficienciesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, disassociateUserProficienciesRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DisassociateUserProficiencies"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DisassociateUserProficienciesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DisassociateUserProficiencies").withProtocolMetadata(protocolMetadata) .withMarshaller(new DisassociateUserProficienciesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(disassociateUserProficienciesRequest)); 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); } } /** *

* Dismisses contacts from an agent’s CCP and returns the agent to an available state, which allows the agent to * receive a new routed contact. Contacts can only be dismissed if they are in a MISSED, * ERROR, ENDED, or REJECTED state in the Agent Event Stream. *

* * @param dismissUserContactRequest * @return A Java Future containing the result of the DismissUserContact 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.DismissUserContact * @see AWS * API Documentation */ @Override public CompletableFuture dismissUserContact(DismissUserContactRequest dismissUserContactRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(dismissUserContactRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, dismissUserContactRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DismissUserContact"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DismissUserContactResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DismissUserContact").withProtocolMetadata(protocolMetadata) .withMarshaller(new DismissUserContactRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(dismissUserContactRequest)); 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 a pre-signed URL for download of an approved attached file. This API also returns metadata about the * attached file. It will only return a downloadURL if the status of the attached file is APPROVED. *

* * @param getAttachedFileRequest * Request to GetAttachedFile API. * @return A Java Future containing the result of the GetAttachedFile 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. *
    *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.GetAttachedFile * @see AWS API * Documentation */ @Override public CompletableFuture getAttachedFile(GetAttachedFileRequest getAttachedFileRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getAttachedFileRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getAttachedFileRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetAttachedFile"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, GetAttachedFileResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetAttachedFile").withProtocolMetadata(protocolMetadata) .withMarshaller(new GetAttachedFileRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(getAttachedFileRequest)); 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); } } /** *

* Retrieves the contact attributes for the specified contact. *

* * @param getContactAttributesRequest * @return A Java Future containing the result of the GetContactAttributes 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.GetContactAttributes * @see AWS * API Documentation */ @Override public CompletableFuture getContactAttributes( GetContactAttributesRequest getContactAttributesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getContactAttributesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getContactAttributesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetContactAttributes"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, GetContactAttributesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetContactAttributes").withProtocolMetadata(protocolMetadata) .withMarshaller(new GetContactAttributesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(getContactAttributesRequest)); 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); } } /** *

* Gets the real-time metric data from the specified Amazon Connect instance. *

*

* For a description of each metric, see Real-time Metrics * Definitions in the Amazon Connect Administrator Guide. *

* * @param getCurrentMetricDataRequest * @return A Java Future containing the result of the GetCurrentMetricData 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.GetCurrentMetricData * @see AWS * API Documentation */ @Override public CompletableFuture getCurrentMetricData( GetCurrentMetricDataRequest getCurrentMetricDataRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getCurrentMetricDataRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getCurrentMetricDataRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetCurrentMetricData"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, GetCurrentMetricDataResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetCurrentMetricData").withProtocolMetadata(protocolMetadata) .withMarshaller(new GetCurrentMetricDataRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(getCurrentMetricDataRequest)); 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); } } /** *

* Gets the real-time active user data from the specified Amazon Connect instance. *

* * @param getCurrentUserDataRequest * @return A Java Future containing the result of the GetCurrentUserData 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.GetCurrentUserData * @see AWS * API Documentation */ @Override public CompletableFuture getCurrentUserData(GetCurrentUserDataRequest getCurrentUserDataRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getCurrentUserDataRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getCurrentUserDataRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetCurrentUserData"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, GetCurrentUserDataResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetCurrentUserData").withProtocolMetadata(protocolMetadata) .withMarshaller(new GetCurrentUserDataRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(getCurrentUserDataRequest)); 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); } } /** *

* Supports SAML sign-in for Amazon Connect. Retrieves a token for federation. The token is for the Amazon Connect * user which corresponds to the IAM credentials that were used to invoke this action. *

*

* For more information about how SAML sign-in works in Amazon Connect, see Configure SAML with IAM for * Amazon Connect in the Amazon Connect Administrator Guide. *

* *

* This API doesn't support root users. If you try to invoke GetFederationToken with root credentials, an error * message similar to the following one appears: *

*

* Provided identity: Principal: .... User: .... cannot be used for federation with Amazon Connect *

*
* * @param getFederationTokenRequest * @return A Java Future containing the result of the GetFederationToken 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • UserNotFoundException No user with the specified credentials was found in the Amazon Connect * instance.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • DuplicateResourceException A resource with the specified name already exists.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.GetFederationToken * @see AWS * API Documentation */ @Override public CompletableFuture getFederationToken(GetFederationTokenRequest getFederationTokenRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getFederationTokenRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getFederationTokenRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetFederationToken"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, GetFederationTokenResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetFederationToken").withProtocolMetadata(protocolMetadata) .withMarshaller(new GetFederationTokenRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(getFederationTokenRequest)); 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); } } /** *

* Retrieves the flow associated for a given resource. *

* * @param getFlowAssociationRequest * @return A Java Future containing the result of the GetFlowAssociation 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. *
    *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.GetFlowAssociation * @see AWS * API Documentation */ @Override public CompletableFuture getFlowAssociation(GetFlowAssociationRequest getFlowAssociationRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getFlowAssociationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getFlowAssociationRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetFlowAssociation"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, GetFlowAssociationResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetFlowAssociation").withProtocolMetadata(protocolMetadata) .withMarshaller(new GetFlowAssociationRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(getFlowAssociationRequest)); 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); } } /** *

* Gets historical metric data from the specified Amazon Connect instance. *

*

* For a description of each historical metric, see Historical * Metrics Definitions in the Amazon Connect Administrator Guide. *

* *

* We recommend using the GetMetricDataV2 API. * It provides more flexibility, features, and the ability to query longer time ranges than * GetMetricData. Use it to retrieve historical agent and contact metrics for the last 3 months, at * varying intervals. You can also use it to build custom dashboards to measure historical queue and agent * performance. For example, you can track the number of incoming contacts for the last 7 days, with data split by * day, to see how contact volume changed per day of the week. *

*
* * @param getMetricDataRequest * @return A Java Future containing the result of the GetMetricData 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.GetMetricData * @see AWS API * Documentation */ @Override public CompletableFuture getMetricData(GetMetricDataRequest getMetricDataRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getMetricDataRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getMetricDataRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetMetricData"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, GetMetricDataResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetMetricData").withProtocolMetadata(protocolMetadata) .withMarshaller(new GetMetricDataRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(getMetricDataRequest)); 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); } } /** *

* Gets metric data from the specified Amazon Connect instance. *

*

* GetMetricDataV2 offers more features than GetMetricData, the * previous version of this API. It has new metrics, offers filtering at a metric level, and offers the ability to * filter and group data by channels, queues, routing profiles, agents, and agent hierarchy levels. It can retrieve * historical data for the last 3 months, at varying intervals. *

*

* For a description of the historical metrics that are supported by GetMetricDataV2 and * GetMetricData, see Historical * metrics definitions in the Amazon Connect Administrator Guide. *

* * @param getMetricDataV2Request * @return A Java Future containing the result of the GetMetricDataV2 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.GetMetricDataV2 * @see AWS API * Documentation */ @Override public CompletableFuture getMetricDataV2(GetMetricDataV2Request getMetricDataV2Request) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getMetricDataV2Request, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getMetricDataV2Request .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetMetricDataV2"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, GetMetricDataV2Response::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetMetricDataV2").withProtocolMetadata(protocolMetadata) .withMarshaller(new GetMetricDataV2RequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(getMetricDataV2Request)); 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); } } /** *

* Gets the prompt file. *

* * @param getPromptFileRequest * @return A Java Future containing the result of the GetPromptFile 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. *
    *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.GetPromptFile * @see AWS API * Documentation */ @Override public CompletableFuture getPromptFile(GetPromptFileRequest getPromptFileRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getPromptFileRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getPromptFileRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetPromptFile"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, GetPromptFileResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetPromptFile").withProtocolMetadata(protocolMetadata) .withMarshaller(new GetPromptFileRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(getPromptFileRequest)); 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); } } /** *

* Gets details about a specific task template in the specified Amazon Connect instance. *

* * @param getTaskTemplateRequest * @return A Java Future containing the result of the GetTaskTemplate 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.GetTaskTemplate * @see AWS API * Documentation */ @Override public CompletableFuture getTaskTemplate(GetTaskTemplateRequest getTaskTemplateRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getTaskTemplateRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getTaskTemplateRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetTaskTemplate"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, GetTaskTemplateResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetTaskTemplate").withProtocolMetadata(protocolMetadata) .withMarshaller(new GetTaskTemplateRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(getTaskTemplateRequest)); 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); } } /** *

* Retrieves the current traffic distribution for a given traffic distribution group. *

* * @param getTrafficDistributionRequest * @return A Java Future containing the result of the GetTrafficDistribution 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.GetTrafficDistribution * @see AWS API Documentation */ @Override public CompletableFuture getTrafficDistribution( GetTrafficDistributionRequest getTrafficDistributionRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getTrafficDistributionRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getTrafficDistributionRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetTrafficDistribution"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, GetTrafficDistributionResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetTrafficDistribution").withProtocolMetadata(protocolMetadata) .withMarshaller(new GetTrafficDistributionRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(getTrafficDistributionRequest)); 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); } } /** *

* Imports a claimed phone number from an external service, such as Amazon Pinpoint, into an Amazon Connect * instance. You can call this API only in the same Amazon Web Services Region where the Amazon Connect instance was * created. *

* *

* Call the DescribePhoneNumber * API to verify the status of a previous ImportPhoneNumber operation. *

*
*

* If you plan to claim or import numbers and then release numbers frequently, contact us for a service quota * exception. Otherwise, it is possible you will be blocked from claiming and releasing any more numbers until up to * 180 days past the oldest number released has expired. *

*

* By default you can claim or import and then release up to 200% of your maximum number of active phone numbers. If * you claim or import and then release phone numbers using the UI or API during a rolling 180 day cycle that * exceeds 200% of your phone number service level quota, you will be blocked from claiming or importing any more * numbers until 180 days past the oldest number released has expired. *

*

* For example, if you already have 99 claimed or imported numbers and a service level quota of 99 phone numbers, * and in any 180 day period you release 99, claim 99, and then release 99, you will have exceeded the 200% limit. * At that point you are blocked from claiming any more numbers until you open an Amazon Web Services Support * ticket. *

* * @param importPhoneNumberRequest * @return A Java Future containing the result of the ImportPhoneNumber 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. *
    *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • IdempotencyException An entity with the same name already exists.
  • *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.ImportPhoneNumber * @see AWS API * Documentation */ @Override public CompletableFuture importPhoneNumber(ImportPhoneNumberRequest importPhoneNumberRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(importPhoneNumberRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, importPhoneNumberRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ImportPhoneNumber"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ImportPhoneNumberResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ImportPhoneNumber").withProtocolMetadata(protocolMetadata) .withMarshaller(new ImportPhoneNumberRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(importPhoneNumberRequest)); 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); } } /** *

* This API is in preview release for Amazon Connect and is subject to change. *

*

* Lists agent statuses. *

* * @param listAgentStatusesRequest * @return A Java Future containing the result of the ListAgentStatuses 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.ListAgentStatuses * @see AWS API * Documentation */ @Override public CompletableFuture listAgentStatuses(ListAgentStatusesRequest listAgentStatusesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listAgentStatusesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listAgentStatusesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListAgentStatuses"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListAgentStatusesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListAgentStatuses").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListAgentStatusesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listAgentStatusesRequest)); 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); } } /** *

* This API is in preview release for Amazon Connect and is subject to change. *

*

* Lists the association status of requested dataset ID for a given Amazon Connect instance. *

* * @param listAnalyticsDataAssociationsRequest * @return A Java Future containing the result of the ListAnalyticsDataAssociations 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.ListAnalyticsDataAssociations * @see AWS API Documentation */ @Override public CompletableFuture listAnalyticsDataAssociations( ListAnalyticsDataAssociationsRequest listAnalyticsDataAssociationsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listAnalyticsDataAssociationsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listAnalyticsDataAssociationsRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListAnalyticsDataAssociations"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListAnalyticsDataAssociationsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListAnalyticsDataAssociations").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListAnalyticsDataAssociationsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listAnalyticsDataAssociationsRequest)); 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); } } /** *

* This API is in preview release for Amazon Connect and is subject to change. *

*

* Returns a paginated list of all approved origins associated with the instance. *

* * @param listApprovedOriginsRequest * @return A Java Future containing the result of the ListApprovedOrigins 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. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.ListApprovedOrigins * @see AWS * API Documentation */ @Override public CompletableFuture listApprovedOrigins( ListApprovedOriginsRequest listApprovedOriginsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listApprovedOriginsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listApprovedOriginsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListApprovedOrigins"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListApprovedOriginsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListApprovedOrigins").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListApprovedOriginsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listApprovedOriginsRequest)); 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); } } /** *

* This API is in preview release for Amazon Connect and is subject to change. To request access to this API, * contact Amazon Web Services Support. *

*

* Provides summary information about the authentication profiles in a specified Amazon Connect instance. *

* * @param listAuthenticationProfilesRequest * @return A Java Future containing the result of the ListAuthenticationProfiles 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.ListAuthenticationProfiles * @see AWS API Documentation */ @Override public CompletableFuture listAuthenticationProfiles( ListAuthenticationProfilesRequest listAuthenticationProfilesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listAuthenticationProfilesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listAuthenticationProfilesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListAuthenticationProfiles"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListAuthenticationProfilesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListAuthenticationProfiles").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListAuthenticationProfilesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listAuthenticationProfilesRequest)); 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); } } /** *

* This API is in preview release for Amazon Connect and is subject to change. *

*

* For the specified version of Amazon Lex, returns a paginated list of all the Amazon Lex bots currently associated * with the instance. Use this API to returns both Amazon Lex V1 and V2 bots. *

* * @param listBotsRequest * @return A Java Future containing the result of the ListBots 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. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.ListBots * @see AWS API * Documentation */ @Override public CompletableFuture listBots(ListBotsRequest listBotsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listBotsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listBotsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListBots"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListBotsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("ListBots") .withProtocolMetadata(protocolMetadata) .withMarshaller(new ListBotsRequestMarshaller(protocolFactory)).withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration) .withMetricCollector(apiCallMetricCollector).withInput(listBotsRequest)); 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); } } /** *

* Lists contact evaluations in the specified Amazon Connect instance. *

* * @param listContactEvaluationsRequest * @return A Java Future containing the result of the ListContactEvaluations 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. *
    *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.ListContactEvaluations * @see AWS API Documentation */ @Override public CompletableFuture listContactEvaluations( ListContactEvaluationsRequest listContactEvaluationsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listContactEvaluationsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listContactEvaluationsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListContactEvaluations"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListContactEvaluationsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListContactEvaluations").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListContactEvaluationsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listContactEvaluationsRequest)); 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 information about the flow modules for the specified Amazon Connect instance. *

* * @param listContactFlowModulesRequest * @return A Java Future containing the result of the ListContactFlowModules 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. *
    *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.ListContactFlowModules * @see AWS API Documentation */ @Override public CompletableFuture listContactFlowModules( ListContactFlowModulesRequest listContactFlowModulesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listContactFlowModulesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listContactFlowModulesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListContactFlowModules"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListContactFlowModulesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListContactFlowModules").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListContactFlowModulesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listContactFlowModulesRequest)); 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 information about the flows for the specified Amazon Connect instance. *

*

* You can also create and update flows using the Amazon Connect Flow * language. *

*

* For more information about flows, see Flows in the * Amazon Connect Administrator Guide. *

* * @param listContactFlowsRequest * @return A Java Future containing the result of the ListContactFlows 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.ListContactFlows * @see AWS API * Documentation */ @Override public CompletableFuture listContactFlows(ListContactFlowsRequest listContactFlowsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listContactFlowsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listContactFlowsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListContactFlows"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListContactFlowsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListContactFlows").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListContactFlowsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listContactFlowsRequest)); 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); } } /** *

* This API is in preview release for Amazon Connect and is subject to change. *

*

* For the specified referenceTypes, returns a list of references associated with the contact. * References are links to documents that are related to a contact, such as emails, attachments, or URLs. *

* * @param listContactReferencesRequest * @return A Java Future containing the result of the ListContactReferences 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.ListContactReferences * @see AWS * API Documentation */ @Override public CompletableFuture listContactReferences( ListContactReferencesRequest listContactReferencesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listContactReferencesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listContactReferencesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListContactReferences"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListContactReferencesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListContactReferences").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListContactReferencesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listContactReferencesRequest)); 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); } } /** *

* Lists the default vocabularies for the specified Amazon Connect instance. *

* * @param listDefaultVocabulariesRequest * @return A Java Future containing the result of the ListDefaultVocabularies 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.ListDefaultVocabularies * @see AWS API Documentation */ @Override public CompletableFuture listDefaultVocabularies( ListDefaultVocabulariesRequest listDefaultVocabulariesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listDefaultVocabulariesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listDefaultVocabulariesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListDefaultVocabularies"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListDefaultVocabulariesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListDefaultVocabularies").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListDefaultVocabulariesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listDefaultVocabulariesRequest)); 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); } } /** *

* Lists versions of an evaluation form in the specified Amazon Connect instance. *

* * @param listEvaluationFormVersionsRequest * @return A Java Future containing the result of the ListEvaluationFormVersions 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. *
    *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.ListEvaluationFormVersions * @see AWS API Documentation */ @Override public CompletableFuture listEvaluationFormVersions( ListEvaluationFormVersionsRequest listEvaluationFormVersionsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listEvaluationFormVersionsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listEvaluationFormVersionsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListEvaluationFormVersions"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListEvaluationFormVersionsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListEvaluationFormVersions").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListEvaluationFormVersionsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listEvaluationFormVersionsRequest)); 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); } } /** *

* Lists evaluation forms in the specified Amazon Connect instance. *

* * @param listEvaluationFormsRequest * @return A Java Future containing the result of the ListEvaluationForms 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. *
    *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.ListEvaluationForms * @see AWS * API Documentation */ @Override public CompletableFuture listEvaluationForms( ListEvaluationFormsRequest listEvaluationFormsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listEvaluationFormsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listEvaluationFormsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListEvaluationForms"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListEvaluationFormsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListEvaluationForms").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListEvaluationFormsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listEvaluationFormsRequest)); 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); } } /** *

* List the flow association based on the filters. *

* * @param listFlowAssociationsRequest * @return A Java Future containing the result of the ListFlowAssociations 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. *
    *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.ListFlowAssociations * @see AWS * API Documentation */ @Override public CompletableFuture listFlowAssociations( ListFlowAssociationsRequest listFlowAssociationsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listFlowAssociationsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listFlowAssociationsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListFlowAssociations"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListFlowAssociationsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListFlowAssociations").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListFlowAssociationsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listFlowAssociationsRequest)); 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 information about the hours of operation for the specified Amazon Connect instance. *

*

* For more information about hours of operation, see Set the Hours of Operation * for a Queue in the Amazon Connect Administrator Guide. *

* * @param listHoursOfOperationsRequest * @return A Java Future containing the result of the ListHoursOfOperations 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.ListHoursOfOperations * @see AWS * API Documentation */ @Override public CompletableFuture listHoursOfOperations( ListHoursOfOperationsRequest listHoursOfOperationsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listHoursOfOperationsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listHoursOfOperationsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListHoursOfOperations"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListHoursOfOperationsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListHoursOfOperations").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListHoursOfOperationsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listHoursOfOperationsRequest)); 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); } } /** *

* This API is in preview release for Amazon Connect and is subject to change. *

*

* Returns a paginated list of all attribute types for the given instance. *

* * @param listInstanceAttributesRequest * @return A Java Future containing the result of the ListInstanceAttributes 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. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.ListInstanceAttributes * @see AWS API Documentation */ @Override public CompletableFuture listInstanceAttributes( ListInstanceAttributesRequest listInstanceAttributesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listInstanceAttributesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listInstanceAttributesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListInstanceAttributes"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListInstanceAttributesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListInstanceAttributes").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListInstanceAttributesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listInstanceAttributesRequest)); 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); } } /** *

* This API is in preview release for Amazon Connect and is subject to change. *

*

* Returns a paginated list of storage configs for the identified instance and resource type. *

* * @param listInstanceStorageConfigsRequest * @return A Java Future containing the result of the ListInstanceStorageConfigs 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. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.ListInstanceStorageConfigs * @see AWS API Documentation */ @Override public CompletableFuture listInstanceStorageConfigs( ListInstanceStorageConfigsRequest listInstanceStorageConfigsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listInstanceStorageConfigsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listInstanceStorageConfigsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListInstanceStorageConfigs"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListInstanceStorageConfigsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListInstanceStorageConfigs").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListInstanceStorageConfigsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listInstanceStorageConfigsRequest)); 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); } } /** *

* This API is in preview release for Amazon Connect and is subject to change. *

*

* Return a list of instances which are in active state, creation-in-progress state, and failed state. Instances * that aren't successfully created (they are in a failed state) are returned only for 24 hours after the * CreateInstance API was invoked. *

* * @param listInstancesRequest * @return A Java Future containing the result of the ListInstances 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.ListInstances * @see AWS API * Documentation */ @Override public CompletableFuture listInstances(ListInstancesRequest listInstancesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listInstancesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listInstancesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListInstances"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListInstancesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListInstances").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListInstancesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listInstancesRequest)); 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 summary information about the Amazon Web Services resource associations for the specified Amazon Connect * instance. *

* * @param listIntegrationAssociationsRequest * @return A Java Future containing the result of the ListIntegrationAssociations 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. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.ListIntegrationAssociations * @see AWS API Documentation */ @Override public CompletableFuture listIntegrationAssociations( ListIntegrationAssociationsRequest listIntegrationAssociationsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listIntegrationAssociationsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listIntegrationAssociationsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListIntegrationAssociations"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListIntegrationAssociationsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListIntegrationAssociations").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListIntegrationAssociationsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listIntegrationAssociationsRequest)); 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); } } /** *

* This API is in preview release for Amazon Connect and is subject to change. *

*

* Returns a paginated list of all Lambda functions that display in the dropdown options in the relevant flow * blocks. *

* * @param listLambdaFunctionsRequest * @return A Java Future containing the result of the ListLambdaFunctions 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. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.ListLambdaFunctions * @see AWS * API Documentation */ @Override public CompletableFuture listLambdaFunctions( ListLambdaFunctionsRequest listLambdaFunctionsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listLambdaFunctionsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listLambdaFunctionsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListLambdaFunctions"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListLambdaFunctionsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListLambdaFunctions").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListLambdaFunctionsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listLambdaFunctionsRequest)); 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); } } /** *

* This API is in preview release for Amazon Connect and is subject to change. *

*

* Returns a paginated list of all the Amazon Lex V1 bots currently associated with the instance. To return both * Amazon Lex V1 and V2 bots, use the ListBots API. *

* * @param listLexBotsRequest * @return A Java Future containing the result of the ListLexBots 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. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.ListLexBots * @see AWS API * Documentation */ @Override public CompletableFuture listLexBots(ListLexBotsRequest listLexBotsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listLexBotsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listLexBotsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListLexBots"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListLexBotsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListLexBots").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListLexBotsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listLexBotsRequest)); 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 information about the phone numbers for the specified Amazon Connect instance. *

*

* For more information about phone numbers, see Set Up Phone * Numbers for Your Contact Center in the Amazon Connect Administrator Guide. *

* *
    *
  • *

    * We recommend using ListPhoneNumbersV2 * to return phone number types. ListPhoneNumbers doesn't support number types UIFN, * SHARED, THIRD_PARTY_TF, and THIRD_PARTY_DID. While it returns numbers of * those types, it incorrectly lists them as TOLL_FREE or DID. *

    *
  • *
  • *

    * The phone number Arn value that is returned from each of the items in the PhoneNumberSummaryList cannot be used to tag phone number resources. It will fail with a * ResourceNotFoundException. Instead, use the ListPhoneNumbersV2 * API. It returns the new phone number ARN that can be used to tag phone number resources. *

    *
  • *
*
* * @param listPhoneNumbersRequest * @return A Java Future containing the result of the ListPhoneNumbers 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.ListPhoneNumbers * @see AWS API * Documentation */ @Override public CompletableFuture listPhoneNumbers(ListPhoneNumbersRequest listPhoneNumbersRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listPhoneNumbersRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listPhoneNumbersRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListPhoneNumbers"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListPhoneNumbersResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListPhoneNumbers").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListPhoneNumbersRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listPhoneNumbersRequest)); 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); } } /** *

* Lists phone numbers claimed to your Amazon Connect instance or traffic distribution group. If the provided * TargetArn is a traffic distribution group, you can call this API in both Amazon Web Services Regions * associated with traffic distribution group. *

*

* For more information about phone numbers, see Set Up Phone * Numbers for Your Contact Center in the Amazon Connect Administrator Guide. *

* *
    *
  • *

    * When given an instance ARN, ListPhoneNumbersV2 returns only the phone numbers claimed to the * instance. *

    *
  • *
  • *

    * When given a traffic distribution group ARN ListPhoneNumbersV2 returns only the phone numbers * claimed to the traffic distribution group. *

    *
  • *
*
* * @param listPhoneNumbersV2Request * @return A Java Future containing the result of the ListPhoneNumbersV2 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. *
    *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.ListPhoneNumbersV2 * @see AWS * API Documentation */ @Override public CompletableFuture listPhoneNumbersV2(ListPhoneNumbersV2Request listPhoneNumbersV2Request) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listPhoneNumbersV2Request, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listPhoneNumbersV2Request .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListPhoneNumbersV2"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListPhoneNumbersV2Response::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListPhoneNumbersV2").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListPhoneNumbersV2RequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listPhoneNumbersV2Request)); 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); } } /** *

* Lists predefined attributes for the specified Amazon Connect instance. Predefined attributes are * attributes in an Amazon Connect instance that can be used to route contacts to an agent or pools of agents within * a queue. For more information, see Create predefined * attributes for routing contacts to agents. *

* * @param listPredefinedAttributesRequest * @return A Java Future containing the result of the ListPredefinedAttributes 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.ListPredefinedAttributes * @see AWS API Documentation */ @Override public CompletableFuture listPredefinedAttributes( ListPredefinedAttributesRequest listPredefinedAttributesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listPredefinedAttributesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listPredefinedAttributesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListPredefinedAttributes"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListPredefinedAttributesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListPredefinedAttributes").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListPredefinedAttributesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listPredefinedAttributesRequest)); 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 information about the prompts for the specified Amazon Connect instance. *

* * @param listPromptsRequest * @return A Java Future containing the result of the ListPrompts 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.ListPrompts * @see AWS API * Documentation */ @Override public CompletableFuture listPrompts(ListPromptsRequest listPromptsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listPromptsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listPromptsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListPrompts"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListPromptsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListPrompts").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListPromptsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listPromptsRequest)); 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); } } /** *

* This API is in preview release for Amazon Connect and is subject to change. *

*

* Lists the quick connects associated with a queue. *

* * @param listQueueQuickConnectsRequest * @return A Java Future containing the result of the ListQueueQuickConnects 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.ListQueueQuickConnects * @see AWS API Documentation */ @Override public CompletableFuture listQueueQuickConnects( ListQueueQuickConnectsRequest listQueueQuickConnectsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listQueueQuickConnectsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listQueueQuickConnectsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListQueueQuickConnects"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListQueueQuickConnectsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListQueueQuickConnects").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListQueueQuickConnectsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listQueueQuickConnectsRequest)); 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 information about the queues for the specified Amazon Connect instance. *

*

* If you do not specify a QueueTypes parameter, both standard and agent queues are returned. This * might cause an unexpected truncation of results if you have more than 1000 agents and you limit the number of * results of the API call in code. *

*

* For more information about queues, see Queues: * Standard and Agent in the Amazon Connect Administrator Guide. *

* * @param listQueuesRequest * @return A Java Future containing the result of the ListQueues 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.ListQueues * @see AWS API * Documentation */ @Override public CompletableFuture listQueues(ListQueuesRequest listQueuesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listQueuesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listQueuesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListQueues"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListQueuesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("ListQueues") .withProtocolMetadata(protocolMetadata) .withMarshaller(new ListQueuesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listQueuesRequest)); 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 information about the quick connects for the specified Amazon Connect instance. *

* * @param listQuickConnectsRequest * @return A Java Future containing the result of the ListQuickConnects 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.ListQuickConnects * @see AWS API * Documentation */ @Override public CompletableFuture listQuickConnects(ListQuickConnectsRequest listQuickConnectsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listQuickConnectsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listQuickConnectsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListQuickConnects"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListQuickConnectsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListQuickConnects").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListQuickConnectsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listQuickConnectsRequest)); 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 a list of analysis segments for a real-time analysis session. *

* * @param listRealtimeContactAnalysisSegmentsV2Request * @return A Java Future containing the result of the ListRealtimeContactAnalysisSegmentsV2 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. *
    *
  • OutputTypeNotFoundException Thrown for analyzed content when requested OutputType was not enabled for * a given contact. For example, if an OutputType.Raw was requested for a contact that had `RedactedOnly` * Redaction policy set in Contact flow.
  • *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.ListRealtimeContactAnalysisSegmentsV2 * @see AWS API Documentation */ @Override public CompletableFuture listRealtimeContactAnalysisSegmentsV2( ListRealtimeContactAnalysisSegmentsV2Request listRealtimeContactAnalysisSegmentsV2Request) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listRealtimeContactAnalysisSegmentsV2Request, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listRealtimeContactAnalysisSegmentsV2Request.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListRealtimeContactAnalysisSegmentsV2"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(operationMetadata, ListRealtimeContactAnalysisSegmentsV2Response::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListRealtimeContactAnalysisSegmentsV2").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListRealtimeContactAnalysisSegmentsV2RequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listRealtimeContactAnalysisSegmentsV2Request)); 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); } } /** *

* Lists the queues associated with a routing profile. *

* * @param listRoutingProfileQueuesRequest * @return A Java Future containing the result of the ListRoutingProfileQueues 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.ListRoutingProfileQueues * @see AWS API Documentation */ @Override public CompletableFuture listRoutingProfileQueues( ListRoutingProfileQueuesRequest listRoutingProfileQueuesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listRoutingProfileQueuesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listRoutingProfileQueuesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListRoutingProfileQueues"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListRoutingProfileQueuesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListRoutingProfileQueues").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListRoutingProfileQueuesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listRoutingProfileQueuesRequest)); 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 summary information about the routing profiles for the specified Amazon Connect instance. *

*

* For more information about routing profiles, see Routing Profiles and Create a Routing Profile * in the Amazon Connect Administrator Guide. *

* * @param listRoutingProfilesRequest * @return A Java Future containing the result of the ListRoutingProfiles 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.ListRoutingProfiles * @see AWS * API Documentation */ @Override public CompletableFuture listRoutingProfiles( ListRoutingProfilesRequest listRoutingProfilesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listRoutingProfilesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listRoutingProfilesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListRoutingProfiles"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListRoutingProfilesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListRoutingProfiles").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListRoutingProfilesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listRoutingProfilesRequest)); 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); } } /** *

* List all rules for the specified Amazon Connect instance. *

* * @param listRulesRequest * @return A Java Future containing the result of the ListRules 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.ListRules * @see AWS API * Documentation */ @Override public CompletableFuture listRules(ListRulesRequest listRulesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listRulesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listRulesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListRules"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListRulesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("ListRules") .withProtocolMetadata(protocolMetadata) .withMarshaller(new ListRulesRequestMarshaller(protocolFactory)).withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration) .withMetricCollector(apiCallMetricCollector).withInput(listRulesRequest)); 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); } } /** *

* This API is in preview release for Amazon Connect and is subject to change. *

*

* Returns a paginated list of all security keys associated with the instance. *

* * @param listSecurityKeysRequest * @return A Java Future containing the result of the ListSecurityKeys 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. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.ListSecurityKeys * @see AWS API * Documentation */ @Override public CompletableFuture listSecurityKeys(ListSecurityKeysRequest listSecurityKeysRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listSecurityKeysRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listSecurityKeysRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListSecurityKeys"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListSecurityKeysResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListSecurityKeys").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListSecurityKeysRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listSecurityKeysRequest)); 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 third-party applications in a specific security profile. *

* * @param listSecurityProfileApplicationsRequest * @return A Java Future containing the result of the ListSecurityProfileApplications 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.ListSecurityProfileApplications * @see AWS API Documentation */ @Override public CompletableFuture listSecurityProfileApplications( ListSecurityProfileApplicationsRequest listSecurityProfileApplicationsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listSecurityProfileApplicationsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listSecurityProfileApplicationsRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListSecurityProfileApplications"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListSecurityProfileApplicationsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListSecurityProfileApplications").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListSecurityProfileApplicationsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listSecurityProfileApplicationsRequest)); 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); } } /** *

* Lists the permissions granted to a security profile. *

*

* For information about security profiles, see Security Profiles * in the Amazon Connect Administrator Guide. For a mapping of the API name and user interface name of the * security profile permissions, see List of security profile * permissions. *

* * @param listSecurityProfilePermissionsRequest * @return A Java Future containing the result of the ListSecurityProfilePermissions 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.ListSecurityProfilePermissions * @see AWS API Documentation */ @Override public CompletableFuture listSecurityProfilePermissions( ListSecurityProfilePermissionsRequest listSecurityProfilePermissionsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listSecurityProfilePermissionsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listSecurityProfilePermissionsRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListSecurityProfilePermissions"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListSecurityProfilePermissionsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListSecurityProfilePermissions").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListSecurityProfilePermissionsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listSecurityProfilePermissionsRequest)); 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 summary information about the security profiles for the specified Amazon Connect instance. *

*

* For more information about security profiles, see Security Profiles * in the Amazon Connect Administrator Guide. For a mapping of the API name and user interface name of the * security profile permissions, see List of security profile * permissions. *

* * @param listSecurityProfilesRequest * @return A Java Future containing the result of the ListSecurityProfiles 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.ListSecurityProfiles * @see AWS * API Documentation */ @Override public CompletableFuture listSecurityProfiles( ListSecurityProfilesRequest listSecurityProfilesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listSecurityProfilesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listSecurityProfilesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListSecurityProfiles"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListSecurityProfilesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListSecurityProfiles").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListSecurityProfilesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listSecurityProfilesRequest)); 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); } } /** *

* Lists the tags for the specified resource. *

*

* For sample policies that use tags, see Amazon * Connect Identity-Based Policy Examples in the Amazon Connect Administrator Guide. *

* * @param listTagsForResourceRequest * @return A Java Future containing the result of the ListTagsForResource operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.ListTagsForResource * @see AWS * API Documentation */ @Override public CompletableFuture listTagsForResource( ListTagsForResourceRequest listTagsForResourceRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listTagsForResourceRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listTagsForResourceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListTagsForResource"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListTagsForResourceResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListTagsForResource").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListTagsForResourceRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listTagsForResourceRequest)); 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); } } /** *

* Lists task templates for the specified Amazon Connect instance. *

* * @param listTaskTemplatesRequest * @return A Java Future containing the result of the ListTaskTemplates 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.ListTaskTemplates * @see AWS API * Documentation */ @Override public CompletableFuture listTaskTemplates(ListTaskTemplatesRequest listTaskTemplatesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listTaskTemplatesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listTaskTemplatesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListTaskTemplates"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListTaskTemplatesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListTaskTemplates").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListTaskTemplatesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listTaskTemplatesRequest)); 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); } } /** *

* Lists traffic distribution group users. *

* * @param listTrafficDistributionGroupUsersRequest * @return A Java Future containing the result of the ListTrafficDistributionGroupUsers 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. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.ListTrafficDistributionGroupUsers * @see AWS API Documentation */ @Override public CompletableFuture listTrafficDistributionGroupUsers( ListTrafficDistributionGroupUsersRequest listTrafficDistributionGroupUsersRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listTrafficDistributionGroupUsersRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listTrafficDistributionGroupUsersRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListTrafficDistributionGroupUsers"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(operationMetadata, ListTrafficDistributionGroupUsersResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListTrafficDistributionGroupUsers").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListTrafficDistributionGroupUsersRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listTrafficDistributionGroupUsersRequest)); 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); } } /** *

* Lists traffic distribution groups. *

* * @param listTrafficDistributionGroupsRequest * @return A Java Future containing the result of the ListTrafficDistributionGroups 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.ListTrafficDistributionGroups * @see AWS API Documentation */ @Override public CompletableFuture listTrafficDistributionGroups( ListTrafficDistributionGroupsRequest listTrafficDistributionGroupsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listTrafficDistributionGroupsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listTrafficDistributionGroupsRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListTrafficDistributionGroups"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListTrafficDistributionGroupsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListTrafficDistributionGroups").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListTrafficDistributionGroupsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listTrafficDistributionGroupsRequest)); 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); } } /** *

* Lists the use cases for the integration association. *

* * @param listUseCasesRequest * Provides summary information about the use cases for the specified integration association. * @return A Java Future containing the result of the ListUseCases 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. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.ListUseCases * @see AWS API * Documentation */ @Override public CompletableFuture listUseCases(ListUseCasesRequest listUseCasesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listUseCasesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listUseCasesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListUseCases"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListUseCasesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListUseCases").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListUseCasesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listUseCasesRequest)); 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 summary information about the hierarchy groups for the specified Amazon Connect instance. *

*

* For more information about agent hierarchies, see Set Up Agent Hierarchies in * the Amazon Connect Administrator Guide. *

* * @param listUserHierarchyGroupsRequest * @return A Java Future containing the result of the ListUserHierarchyGroups 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.ListUserHierarchyGroups * @see AWS API Documentation */ @Override public CompletableFuture listUserHierarchyGroups( ListUserHierarchyGroupsRequest listUserHierarchyGroupsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listUserHierarchyGroupsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listUserHierarchyGroupsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListUserHierarchyGroups"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListUserHierarchyGroupsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListUserHierarchyGroups").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListUserHierarchyGroupsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listUserHierarchyGroupsRequest)); 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); } } /** *

* Lists proficiencies associated with a user. *

* * @param listUserProficienciesRequest * @return A Java Future containing the result of the ListUserProficiencies 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.ListUserProficiencies * @see AWS * API Documentation */ @Override public CompletableFuture listUserProficiencies( ListUserProficienciesRequest listUserProficienciesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listUserProficienciesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listUserProficienciesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListUserProficiencies"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListUserProficienciesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListUserProficiencies").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListUserProficienciesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listUserProficienciesRequest)); 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 summary information about the users for the specified Amazon Connect instance. *

* * @param listUsersRequest * @return A Java Future containing the result of the ListUsers 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.ListUsers * @see AWS API * Documentation */ @Override public CompletableFuture listUsers(ListUsersRequest listUsersRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listUsersRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listUsersRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListUsers"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListUsersResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("ListUsers") .withProtocolMetadata(protocolMetadata) .withMarshaller(new ListUsersRequestMarshaller(protocolFactory)).withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration) .withMetricCollector(apiCallMetricCollector).withInput(listUsersRequest)); 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 all the available versions for the specified Amazon Connect instance and view identifier. *

*

* Results will be sorted from highest to lowest. *

* * @param listViewVersionsRequest * @return A Java Future containing the result of the ListViewVersions 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. *
    *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • TooManyRequestsException Displayed when rate-related API limits are exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.ListViewVersions * @see AWS API * Documentation */ @Override public CompletableFuture listViewVersions(ListViewVersionsRequest listViewVersionsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listViewVersionsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listViewVersionsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListViewVersions"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListViewVersionsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListViewVersions").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListViewVersionsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listViewVersionsRequest)); 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 views in the given instance. *

*

* Results are sorted primarily by type, and secondarily by name. *

* * @param listViewsRequest * @return A Java Future containing the result of the ListViews 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. *
    *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • TooManyRequestsException Displayed when rate-related API limits are exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.ListViews * @see AWS API * Documentation */ @Override public CompletableFuture listViews(ListViewsRequest listViewsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listViewsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listViewsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListViews"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListViewsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("ListViews") .withProtocolMetadata(protocolMetadata) .withMarshaller(new ListViewsRequestMarshaller(protocolFactory)).withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration) .withMetricCollector(apiCallMetricCollector).withInput(listViewsRequest)); 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); } } /** *

* Initiates silent monitoring of a contact. The Contact Control Panel (CCP) of the user specified by userId * will be set to silent monitoring mode on the contact. *

* * @param monitorContactRequest * @return A Java Future containing the result of the MonitorContact 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • IdempotencyException An entity with the same name already exists.
  • *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ServiceQuotaExceededException The service quota has been exceeded.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.MonitorContact * @see AWS API * Documentation */ @Override public CompletableFuture monitorContact(MonitorContactRequest monitorContactRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(monitorContactRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, monitorContactRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "MonitorContact"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, MonitorContactResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("MonitorContact").withProtocolMetadata(protocolMetadata) .withMarshaller(new MonitorContactRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(monitorContactRequest)); 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); } } /** *

* Allows pausing an ongoing task contact. *

* * @param pauseContactRequest * @return A Java Future containing the result of the PauseContact 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. *
    *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • LimitExceededException The allowed limit for the resource has been exceeded.
  • *
  • ConflictException Operation cannot be performed at this time as there is a conflict with another * operation or contact state.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.PauseContact * @see AWS API * Documentation */ @Override public CompletableFuture pauseContact(PauseContactRequest pauseContactRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(pauseContactRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, pauseContactRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "PauseContact"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, PauseContactResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("PauseContact").withProtocolMetadata(protocolMetadata) .withMarshaller(new PauseContactRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(pauseContactRequest)); 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); } } /** *

* Changes the current status of a user or agent in Amazon Connect. If the agent is currently handling a contact, * this sets the agent's next status. *

*

* For more information, see Agent status and Set your next status in the * Amazon Connect Administrator Guide. *

* * @param putUserStatusRequest * @return A Java Future containing the result of the PutUserStatus 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.PutUserStatus * @see AWS API * Documentation */ @Override public CompletableFuture putUserStatus(PutUserStatusRequest putUserStatusRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(putUserStatusRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, putUserStatusRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "PutUserStatus"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, PutUserStatusResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("PutUserStatus").withProtocolMetadata(protocolMetadata) .withMarshaller(new PutUserStatusRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(putUserStatusRequest)); 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); } } /** *

* Releases a phone number previously claimed to an Amazon Connect instance or traffic distribution group. You can * call this API only in the Amazon Web Services Region where the number was claimed. *

* *

* To release phone numbers from a traffic distribution group, use the ReleasePhoneNumber API, not the * Amazon Connect admin website. *

*

* After releasing a phone number, the phone number enters into a cooldown period for up to 180 days. It cannot be * searched for or claimed again until the period has ended. If you accidentally release a phone number, contact * Amazon Web Services Support. *

*
*

* If you plan to claim and release numbers frequently, contact us for a service quota exception. Otherwise, it is * possible you will be blocked from claiming and releasing any more numbers until up to 180 days past the oldest * number released has expired. *

*

* By default you can claim and release up to 200% of your maximum number of active phone numbers. If you claim and * release phone numbers using the UI or API during a rolling 180 day cycle that exceeds 200% of your phone number * service level quota, you will be blocked from claiming any more numbers until 180 days past the oldest number * released has expired. *

*

* For example, if you already have 99 claimed numbers and a service level quota of 99 phone numbers, and in any 180 * day period you release 99, claim 99, and then release 99, you will have exceeded the 200% limit. At that point * you are blocked from claiming any more numbers until you open an Amazon Web Services support ticket. *

* * @param releasePhoneNumberRequest * @return A Java Future containing the result of the ReleasePhoneNumber 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. *
    *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • ResourceInUseException That resource is already in use. Please try another.
  • *
  • IdempotencyException An entity with the same name already exists.
  • *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.ReleasePhoneNumber * @see AWS * API Documentation */ @Override public CompletableFuture releasePhoneNumber(ReleasePhoneNumberRequest releasePhoneNumberRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(releasePhoneNumberRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, releasePhoneNumberRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ReleasePhoneNumber"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ReleasePhoneNumberResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ReleasePhoneNumber").withProtocolMetadata(protocolMetadata) .withMarshaller(new ReleasePhoneNumberRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(releasePhoneNumberRequest)); 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); } } /** *

* Replicates an Amazon Connect instance in the specified Amazon Web Services Region and copies configuration * information for Amazon Connect resources across Amazon Web Services Regions. *

*

* For more information about replicating an Amazon Connect instance, see Create a * replica of your existing Amazon Connect instance in the Amazon Connect Administrator Guide. *

* * @param replicateInstanceRequest * @return A Java Future containing the result of the ReplicateInstance 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • ServiceQuotaExceededException The service quota has been exceeded.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • ResourceNotReadyException The resource is not ready.
  • *
  • ResourceConflictException A resource already has that name.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.ReplicateInstance * @see AWS API * Documentation */ @Override public CompletableFuture replicateInstance(ReplicateInstanceRequest replicateInstanceRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(replicateInstanceRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, replicateInstanceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ReplicateInstance"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ReplicateInstanceResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ReplicateInstance").withProtocolMetadata(protocolMetadata) .withMarshaller(new ReplicateInstanceRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(replicateInstanceRequest)); 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); } } /** *

* Allows resuming a task contact in a paused state. *

* * @param resumeContactRequest * @return A Java Future containing the result of the ResumeContact 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. *
    *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • ConflictException Operation cannot be performed at this time as there is a conflict with another * operation or contact state.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.ResumeContact * @see AWS API * Documentation */ @Override public CompletableFuture resumeContact(ResumeContactRequest resumeContactRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(resumeContactRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, resumeContactRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ResumeContact"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ResumeContactResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ResumeContact").withProtocolMetadata(protocolMetadata) .withMarshaller(new ResumeContactRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(resumeContactRequest)); 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); } } /** *

* When a contact is being recorded, and the recording has been suspended using SuspendContactRecording, this API * resumes recording whatever recording is selected in the flow configuration: call, screen, or both. If only call * recording or only screen recording is enabled, then it would resume. *

*

* Voice and screen recordings are supported. *

* * @param resumeContactRecordingRequest * @return A Java Future containing the result of the ResumeContactRecording 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.ResumeContactRecording * @see AWS API Documentation */ @Override public CompletableFuture resumeContactRecording( ResumeContactRecordingRequest resumeContactRecordingRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(resumeContactRecordingRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, resumeContactRecordingRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ResumeContactRecording"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ResumeContactRecordingResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ResumeContactRecording").withProtocolMetadata(protocolMetadata) .withMarshaller(new ResumeContactRecordingRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(resumeContactRecordingRequest)); 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); } } /** *

* Searches AgentStatuses in an Amazon Connect instance, with optional filtering. *

* * @param searchAgentStatusesRequest * @return A Java Future containing the result of the SearchAgentStatuses 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.SearchAgentStatuses * @see AWS * API Documentation */ @Override public CompletableFuture searchAgentStatuses( SearchAgentStatusesRequest searchAgentStatusesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(searchAgentStatusesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, searchAgentStatusesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "SearchAgentStatuses"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, SearchAgentStatusesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("SearchAgentStatuses").withProtocolMetadata(protocolMetadata) .withMarshaller(new SearchAgentStatusesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(searchAgentStatusesRequest)); 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); } } /** *

* Searches for available phone numbers that you can claim to your Amazon Connect instance or traffic distribution * group. If the provided TargetArn is a traffic distribution group, you can call this API in both * Amazon Web Services Regions associated with the traffic distribution group. *

* * @param searchAvailablePhoneNumbersRequest * @return A Java Future containing the result of the SearchAvailablePhoneNumbers 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. *
    *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.SearchAvailablePhoneNumbers * @see AWS API Documentation */ @Override public CompletableFuture searchAvailablePhoneNumbers( SearchAvailablePhoneNumbersRequest searchAvailablePhoneNumbersRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(searchAvailablePhoneNumbersRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, searchAvailablePhoneNumbersRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "SearchAvailablePhoneNumbers"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, SearchAvailablePhoneNumbersResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("SearchAvailablePhoneNumbers").withProtocolMetadata(protocolMetadata) .withMarshaller(new SearchAvailablePhoneNumbersRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(searchAvailablePhoneNumbersRequest)); 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); } } /** *

* Searches the flow modules in an Amazon Connect instance, with optional filtering. *

* * @param searchContactFlowModulesRequest * @return A Java Future containing the result of the SearchContactFlowModules 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.SearchContactFlowModules * @see AWS API Documentation */ @Override public CompletableFuture searchContactFlowModules( SearchContactFlowModulesRequest searchContactFlowModulesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(searchContactFlowModulesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, searchContactFlowModulesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "SearchContactFlowModules"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, SearchContactFlowModulesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("SearchContactFlowModules").withProtocolMetadata(protocolMetadata) .withMarshaller(new SearchContactFlowModulesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(searchContactFlowModulesRequest)); 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); } } /** *

* Searches the contact flows in an Amazon Connect instance, with optional filtering. *

* * @param searchContactFlowsRequest * @return A Java Future containing the result of the SearchContactFlows 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.SearchContactFlows * @see AWS * API Documentation */ @Override public CompletableFuture searchContactFlows(SearchContactFlowsRequest searchContactFlowsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(searchContactFlowsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, searchContactFlowsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "SearchContactFlows"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, SearchContactFlowsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("SearchContactFlows").withProtocolMetadata(protocolMetadata) .withMarshaller(new SearchContactFlowsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(searchContactFlowsRequest)); 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); } } /** *

* Searches contacts in an Amazon Connect instance. *

* * @param searchContactsRequest * @return A Java Future containing the result of the SearchContacts 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.SearchContacts * @see AWS API * Documentation */ @Override public CompletableFuture searchContacts(SearchContactsRequest searchContactsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(searchContactsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, searchContactsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "SearchContacts"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, SearchContactsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("SearchContacts").withProtocolMetadata(protocolMetadata) .withMarshaller(new SearchContactsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(searchContactsRequest)); 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); } } /** *

* Searches the hours of operation in an Amazon Connect instance, with optional filtering. *

* * @param searchHoursOfOperationsRequest * @return A Java Future containing the result of the SearchHoursOfOperations 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.SearchHoursOfOperations * @see AWS API Documentation */ @Override public CompletableFuture searchHoursOfOperations( SearchHoursOfOperationsRequest searchHoursOfOperationsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(searchHoursOfOperationsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, searchHoursOfOperationsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "SearchHoursOfOperations"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, SearchHoursOfOperationsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("SearchHoursOfOperations").withProtocolMetadata(protocolMetadata) .withMarshaller(new SearchHoursOfOperationsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(searchHoursOfOperationsRequest)); 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); } } /** *

* Searches predefined attributes that meet certain criteria. Predefined attributes are attributes in an * Amazon Connect instance that can be used to route contacts to an agent or pools of agents within a queue. For * more information, see Create predefined * attributes for routing contacts to agents. *

* * @param searchPredefinedAttributesRequest * @return A Java Future containing the result of the SearchPredefinedAttributes 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.SearchPredefinedAttributes * @see AWS API Documentation */ @Override public CompletableFuture searchPredefinedAttributes( SearchPredefinedAttributesRequest searchPredefinedAttributesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(searchPredefinedAttributesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, searchPredefinedAttributesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "SearchPredefinedAttributes"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, SearchPredefinedAttributesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("SearchPredefinedAttributes").withProtocolMetadata(protocolMetadata) .withMarshaller(new SearchPredefinedAttributesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(searchPredefinedAttributesRequest)); 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); } } /** *

* Searches prompts in an Amazon Connect instance, with optional filtering. *

* * @param searchPromptsRequest * @return A Java Future containing the result of the SearchPrompts 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.SearchPrompts * @see AWS API * Documentation */ @Override public CompletableFuture searchPrompts(SearchPromptsRequest searchPromptsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(searchPromptsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, searchPromptsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "SearchPrompts"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, SearchPromptsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("SearchPrompts").withProtocolMetadata(protocolMetadata) .withMarshaller(new SearchPromptsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(searchPromptsRequest)); 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); } } /** *

* Searches queues in an Amazon Connect instance, with optional filtering. *

* * @param searchQueuesRequest * @return A Java Future containing the result of the SearchQueues 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.SearchQueues * @see AWS API * Documentation */ @Override public CompletableFuture searchQueues(SearchQueuesRequest searchQueuesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(searchQueuesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, searchQueuesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "SearchQueues"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, SearchQueuesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("SearchQueues").withProtocolMetadata(protocolMetadata) .withMarshaller(new SearchQueuesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(searchQueuesRequest)); 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); } } /** *

* Searches quick connects in an Amazon Connect instance, with optional filtering. *

* * @param searchQuickConnectsRequest * @return A Java Future containing the result of the SearchQuickConnects 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.SearchQuickConnects * @see AWS * API Documentation */ @Override public CompletableFuture searchQuickConnects( SearchQuickConnectsRequest searchQuickConnectsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(searchQuickConnectsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, searchQuickConnectsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "SearchQuickConnects"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, SearchQuickConnectsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("SearchQuickConnects").withProtocolMetadata(protocolMetadata) .withMarshaller(new SearchQuickConnectsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(searchQuickConnectsRequest)); 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); } } /** *

* Searches tags used in an Amazon Connect instance using optional search criteria. *

* * @param searchResourceTagsRequest * @return A Java Future containing the result of the SearchResourceTags 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • MaximumResultReturnedException Maximum number (1000) of tags have been returned with current request. * Consider changing request parameters to get more tags.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.SearchResourceTags * @see AWS * API Documentation */ @Override public CompletableFuture searchResourceTags(SearchResourceTagsRequest searchResourceTagsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(searchResourceTagsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, searchResourceTagsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "SearchResourceTags"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, SearchResourceTagsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("SearchResourceTags").withProtocolMetadata(protocolMetadata) .withMarshaller(new SearchResourceTagsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(searchResourceTagsRequest)); 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); } } /** *

* Searches routing profiles in an Amazon Connect instance, with optional filtering. *

* * @param searchRoutingProfilesRequest * @return A Java Future containing the result of the SearchRoutingProfiles 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.SearchRoutingProfiles * @see AWS * API Documentation */ @Override public CompletableFuture searchRoutingProfiles( SearchRoutingProfilesRequest searchRoutingProfilesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(searchRoutingProfilesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, searchRoutingProfilesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "SearchRoutingProfiles"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, SearchRoutingProfilesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("SearchRoutingProfiles").withProtocolMetadata(protocolMetadata) .withMarshaller(new SearchRoutingProfilesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(searchRoutingProfilesRequest)); 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); } } /** *

* Searches security profiles in an Amazon Connect instance, with optional filtering. *

*

* For information about security profiles, see Security Profiles * in the Amazon Connect Administrator Guide. For a mapping of the API name and user interface name of the * security profile permissions, see List of security profile * permissions. *

* * @param searchSecurityProfilesRequest * @return A Java Future containing the result of the SearchSecurityProfiles 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.SearchSecurityProfiles * @see AWS API Documentation */ @Override public CompletableFuture searchSecurityProfiles( SearchSecurityProfilesRequest searchSecurityProfilesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(searchSecurityProfilesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, searchSecurityProfilesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "SearchSecurityProfiles"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, SearchSecurityProfilesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("SearchSecurityProfiles").withProtocolMetadata(protocolMetadata) .withMarshaller(new SearchSecurityProfilesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(searchSecurityProfilesRequest)); 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); } } /** *

* Searches UserHierarchyGroups in an Amazon Connect instance, with optional filtering. *

* *

* The UserHierarchyGroup with "LevelId": "0" is the foundation for building levels on top of an * instance. It is not user-definable, nor is it visible in the UI. *

*
* * @param searchUserHierarchyGroupsRequest * @return A Java Future containing the result of the SearchUserHierarchyGroups 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.SearchUserHierarchyGroups * @see AWS API Documentation */ @Override public CompletableFuture searchUserHierarchyGroups( SearchUserHierarchyGroupsRequest searchUserHierarchyGroupsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(searchUserHierarchyGroupsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, searchUserHierarchyGroupsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "SearchUserHierarchyGroups"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, SearchUserHierarchyGroupsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("SearchUserHierarchyGroups").withProtocolMetadata(protocolMetadata) .withMarshaller(new SearchUserHierarchyGroupsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(searchUserHierarchyGroupsRequest)); 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); } } /** *

* Searches users in an Amazon Connect instance, with optional filtering. *

* *

* AfterContactWorkTimeLimit is returned in milliseconds. *

*
* * @param searchUsersRequest * @return A Java Future containing the result of the SearchUsers 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.SearchUsers * @see AWS API * Documentation */ @Override public CompletableFuture searchUsers(SearchUsersRequest searchUsersRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(searchUsersRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, searchUsersRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "SearchUsers"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, SearchUsersResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("SearchUsers").withProtocolMetadata(protocolMetadata) .withMarshaller(new SearchUsersRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(searchUsersRequest)); 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); } } /** *

* Searches for vocabularies within a specific Amazon Connect instance using State, * NameStartsWith, and LanguageCode. *

* * @param searchVocabulariesRequest * @return A Java Future containing the result of the SearchVocabularies 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.SearchVocabularies * @see AWS * API Documentation */ @Override public CompletableFuture searchVocabularies(SearchVocabulariesRequest searchVocabulariesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(searchVocabulariesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, searchVocabulariesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "SearchVocabularies"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, SearchVocabulariesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("SearchVocabularies").withProtocolMetadata(protocolMetadata) .withMarshaller(new SearchVocabulariesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(searchVocabulariesRequest)); 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); } } /** *

* Processes chat integration events from Amazon Web Services or external integrations to Amazon Connect. A chat * integration event includes: *

*
    *
  • *

    * SourceId, DestinationId, and Subtype: a set of identifiers, uniquely representing a chat *

    *
  • *
  • *

    * ChatEvent: details of the chat action to perform such as sending a message, event, or disconnecting from a chat *

    *
  • *
*

* When a chat integration event is sent with chat identifiers that do not map to an active chat contact, a new chat * contact is also created before handling chat action. *

*

* Access to this API is currently restricted to Amazon Pinpoint for supporting SMS integration. *

* * @param sendChatIntegrationEventRequest * @return A Java Future containing the result of the SendChatIntegrationEvent 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.SendChatIntegrationEvent * @see AWS API Documentation */ @Override public CompletableFuture sendChatIntegrationEvent( SendChatIntegrationEventRequest sendChatIntegrationEventRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(sendChatIntegrationEventRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, sendChatIntegrationEventRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "SendChatIntegrationEvent"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, SendChatIntegrationEventResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("SendChatIntegrationEvent").withProtocolMetadata(protocolMetadata) .withMarshaller(new SendChatIntegrationEventRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(sendChatIntegrationEventRequest)); 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 a pre-signed Amazon S3 URL in response for uploading your content. *

* *

* You may only use this API to upload attachments to an Amazon Connect * Case. *

*
* * @param startAttachedFileUploadRequest * @return A Java Future containing the result of the StartAttachedFileUpload 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. *
    *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • ResourceConflictException A resource already has that name.
  • *
  • ServiceQuotaExceededException The service quota has been exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.StartAttachedFileUpload * @see AWS API Documentation */ @Override public CompletableFuture startAttachedFileUpload( StartAttachedFileUploadRequest startAttachedFileUploadRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(startAttachedFileUploadRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, startAttachedFileUploadRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "StartAttachedFileUpload"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, StartAttachedFileUploadResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("StartAttachedFileUpload").withProtocolMetadata(protocolMetadata) .withMarshaller(new StartAttachedFileUploadRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(startAttachedFileUploadRequest)); 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); } } /** *

* Initiates a flow to start a new chat for the customer. Response of this API provides a token required to obtain * credentials from the CreateParticipantConnection API in the Amazon Connect Participant Service. *

*

* When a new chat contact is successfully created, clients must subscribe to the participant’s connection for the * created chat within 5 minutes. This is achieved by invoking CreateParticipantConnection with WEBSOCKET and CONNECTION_CREDENTIALS. *

*

* A 429 error occurs in the following situations: *

*
    *
  • *

    * API rate limit is exceeded. API TPS throttling returns a TooManyRequests exception. *

    *
  • *
  • *

    * The quota for * concurrent active chats is exceeded. Active chat throttling returns a LimitExceededException. *

    *
  • *
*

* If you use the ChatDurationInMinutes parameter and receive a 400 error, your account may not support * the ability to configure custom chat durations. For more information, contact Amazon Web Services Support. *

*

* For more information about chat, see the following topics in the Amazon Connect Administrator Guide: *

* * * @param startChatContactRequest * @return A Java Future containing the result of the StartChatContact 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • LimitExceededException The allowed limit for the resource has been exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.StartChatContact * @see AWS API * Documentation */ @Override public CompletableFuture startChatContact(StartChatContactRequest startChatContactRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(startChatContactRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, startChatContactRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "StartChatContact"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, StartChatContactResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("StartChatContact").withProtocolMetadata(protocolMetadata) .withMarshaller(new StartChatContactRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(startChatContactRequest)); 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); } } /** *

* Starts an empty evaluation in the specified Amazon Connect instance, using the given evaluation form for the * particular contact. The evaluation form version used for the contact evaluation corresponds to the currently * activated version. If no version is activated for the evaluation form, the contact evaluation cannot be started. *

* *

* Evaluations created through the public API do not contain answer values suggested from automation. *

*
* * @param startContactEvaluationRequest * @return A Java Future containing the result of the StartContactEvaluation 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. *
    *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • ServiceQuotaExceededException The service quota has been exceeded.
  • *
  • ResourceConflictException A resource already has that name.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.StartContactEvaluation * @see AWS API Documentation */ @Override public CompletableFuture startContactEvaluation( StartContactEvaluationRequest startContactEvaluationRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(startContactEvaluationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, startContactEvaluationRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "StartContactEvaluation"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, StartContactEvaluationResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("StartContactEvaluation").withProtocolMetadata(protocolMetadata) .withMarshaller(new StartContactEvaluationRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(startContactEvaluationRequest)); 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); } } /** *

* Starts recording the contact: *

*
    *
  • *

    * If the API is called before the agent joins the call, recording starts when the agent joins the call. *

    *
  • *
  • *

    * If the API is called after the agent joins the call, recording starts at the time of the API call. *

    *
  • *
*

* StartContactRecording is a one-time action. For example, if you use StopContactRecording to stop recording an * ongoing call, you can't use StartContactRecording to restart it. For scenarios where the recording has started * and you want to suspend and resume it, such as when collecting sensitive information (for example, a credit card * number), use SuspendContactRecording and ResumeContactRecording. *

*

* You can use this API to override the recording behavior configured in the Set recording * behavior block. *

*

* Only voice recordings are supported at this time. *

* * @param startContactRecordingRequest * @return A Java Future containing the result of the StartContactRecording 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.StartContactRecording * @see AWS * API Documentation */ @Override public CompletableFuture startContactRecording( StartContactRecordingRequest startContactRecordingRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(startContactRecordingRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, startContactRecordingRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "StartContactRecording"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, StartContactRecordingResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("StartContactRecording").withProtocolMetadata(protocolMetadata) .withMarshaller(new StartContactRecordingRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(startContactRecordingRequest)); 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); } } /** *

* Initiates real-time message streaming for a new chat contact. *

*

* For more information about message streaming, see Enable real-time chat * message streaming in the Amazon Connect Administrator Guide. *

*

* For more information about chat, see the following topics in the Amazon Connect Administrator Guide: *

* * * @param startContactStreamingRequest * @return A Java Future containing the result of the StartContactStreaming 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • LimitExceededException The allowed limit for the resource has been exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.StartContactStreaming * @see AWS * API Documentation */ @Override public CompletableFuture startContactStreaming( StartContactStreamingRequest startContactStreamingRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(startContactStreamingRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, startContactStreamingRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "StartContactStreaming"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, StartContactStreamingResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("StartContactStreaming").withProtocolMetadata(protocolMetadata) .withMarshaller(new StartContactStreamingRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(startContactStreamingRequest)); 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); } } /** *

* Places an outbound call to a contact, and then initiates the flow. It performs the actions in the flow that's * specified (in ContactFlowId). *

*

* Agents do not initiate the outbound API, which means that they do not dial the contact. If the flow places an * outbound call to a contact, and then puts the contact in queue, the call is then routed to the agent, like any * other inbound case. *

*

* There is a 60-second dialing timeout for this operation. If the call is not connected after 60 seconds, it fails. *

* *

* UK numbers with a 447 prefix are not allowed by default. Before you can dial these UK mobile numbers, you must * submit a service quota increase request. For more information, see Amazon Connect * Service Quotas in the Amazon Connect Administrator Guide. *

*
*

* Campaign calls are not allowed by default. Before you can make a call with TrafficType = * CAMPAIGN, you must submit a service quota increase request to the quota Amazon Connect campaigns. *

*
* * @param startOutboundVoiceContactRequest * @return A Java Future containing the result of the StartOutboundVoiceContact 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • LimitExceededException The allowed limit for the resource has been exceeded.
  • *
  • DestinationNotAllowedException Outbound calls to the destination number are not allowed.
  • *
  • OutboundContactNotPermittedException The contact is not permitted.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.StartOutboundVoiceContact * @see AWS API Documentation */ @Override public CompletableFuture startOutboundVoiceContact( StartOutboundVoiceContactRequest startOutboundVoiceContactRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(startOutboundVoiceContactRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, startOutboundVoiceContactRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "StartOutboundVoiceContact"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, StartOutboundVoiceContactResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("StartOutboundVoiceContact").withProtocolMetadata(protocolMetadata) .withMarshaller(new StartOutboundVoiceContactRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(startOutboundVoiceContactRequest)); 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); } } /** *

* Initiates a flow to start a new task contact. For more information about task contacts, see Concepts: Tasks in Amazon Connect in * the Amazon Connect Administrator Guide. *

*

* When using PreviousContactId and RelatedContactId input parameters, note the following: *

*
    *
  • *

    * PreviousContactId *

    *
      *
    • *

      * Any updates to user-defined task contact attributes on any contact linked through the same * PreviousContactId will affect every contact in the chain. *

      *
    • *
    • *

      * There can be a maximum of 12 linked task contacts in a chain. That is, 12 task contacts can be created that share * the same PreviousContactId. *

      *
    • *
    *
  • *
  • *

    * RelatedContactId *

    *
      *
    • *

      * Copies contact attributes from the related task contact to the new contact. *

      *
    • *
    • *

      * Any update on attributes in a new task contact does not update attributes on previous contact. *

      *
    • *
    • *

      * There’s no limit on the number of task contacts that can be created that use the same * RelatedContactId. *

      *
    • *
    *
  • *
*

* In addition, when calling StartTaskContact include only one of these parameters: ContactFlowID, * QuickConnectID, or TaskTemplateID. Only one parameter is required as long as the task * template has a flow configured to run it. If more than one parameter is specified, or only the * TaskTemplateID is specified but it does not have a flow configured, the request returns an error * because Amazon Connect cannot identify the unique flow to run when the task is created. *

*

* A ServiceQuotaExceededException occurs when the number of open tasks exceeds the active tasks quota * or there are already 12 tasks referencing the same PreviousContactId. For more information about * service quotas for task contacts, see Amazon Connect * service quotas in the Amazon Connect Administrator Guide. *

* * @param startTaskContactRequest * @return A Java Future containing the result of the StartTaskContact 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • ServiceQuotaExceededException The service quota has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.StartTaskContact * @see AWS API * Documentation */ @Override public CompletableFuture startTaskContact(StartTaskContactRequest startTaskContactRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(startTaskContactRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, startTaskContactRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "StartTaskContact"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, StartTaskContactResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("StartTaskContact").withProtocolMetadata(protocolMetadata) .withMarshaller(new StartTaskContactRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(startTaskContactRequest)); 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); } } /** *

* Places an inbound in-app, web, or video call to a contact, and then initiates the flow. It performs the actions * in the flow that are specified (in ContactFlowId) and present in the Amazon Connect instance (specified as * InstanceId). *

* * @param startWebRtcContactRequest * @return A Java Future containing the result of the StartWebRTCContact 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. *
    *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • LimitExceededException The allowed limit for the resource has been exceeded.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.StartWebRTCContact * @see AWS * API Documentation */ @Override public CompletableFuture startWebRTCContact(StartWebRtcContactRequest startWebRtcContactRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(startWebRtcContactRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, startWebRtcContactRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "StartWebRTCContact"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, StartWebRtcContactResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("StartWebRTCContact").withProtocolMetadata(protocolMetadata) .withMarshaller(new StartWebRtcContactRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(startWebRtcContactRequest)); 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); } } /** *

* Ends the specified contact. Use this API to stop queued callbacks. It does not work for voice contacts that use * the following initiation methods: *

*
    *
  • *

    * DISCONNECT *

    *
  • *
  • *

    * TRANSFER *

    *
  • *
  • *

    * QUEUE_TRANSFER *

    *
  • *
  • *

    * EXTERNAL_OUTBOUND *

    *
  • *
  • *

    * MONITOR *

    *
  • *
*

* Chat and task contacts can be terminated in any state, regardless of initiation method. *

* * @param stopContactRequest * @return A Java Future containing the result of the StopContact 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • ContactNotFoundException The contact with the specified ID is not active or does not exist. Applies * to Voice calls only, not to Chat or Task contacts.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.StopContact * @see AWS API * Documentation */ @Override public CompletableFuture stopContact(StopContactRequest stopContactRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(stopContactRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, stopContactRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "StopContact"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, StopContactResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("StopContact").withProtocolMetadata(protocolMetadata) .withMarshaller(new StopContactRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(stopContactRequest)); 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); } } /** *

* Stops recording a call when a contact is being recorded. StopContactRecording is a one-time action. If you use * StopContactRecording to stop recording an ongoing call, you can't use StartContactRecording to restart it. For * scenarios where the recording has started and you want to suspend it for sensitive information (for example, to * collect a credit card number), and then restart it, use SuspendContactRecording and ResumeContactRecording. *

*

* Only voice recordings are supported at this time. *

* * @param stopContactRecordingRequest * @return A Java Future containing the result of the StopContactRecording 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.StopContactRecording * @see AWS * API Documentation */ @Override public CompletableFuture stopContactRecording( StopContactRecordingRequest stopContactRecordingRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(stopContactRecordingRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, stopContactRecordingRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "StopContactRecording"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, StopContactRecordingResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("StopContactRecording").withProtocolMetadata(protocolMetadata) .withMarshaller(new StopContactRecordingRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(stopContactRecordingRequest)); 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); } } /** *

* Ends message streaming on a specified contact. To restart message streaming on that contact, call the StartContactStreaming API. *

* * @param stopContactStreamingRequest * @return A Java Future containing the result of the StopContactStreaming 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.StopContactStreaming * @see AWS * API Documentation */ @Override public CompletableFuture stopContactStreaming( StopContactStreamingRequest stopContactStreamingRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(stopContactStreamingRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, stopContactStreamingRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "StopContactStreaming"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, StopContactStreamingResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("StopContactStreaming").withProtocolMetadata(protocolMetadata) .withMarshaller(new StopContactStreamingRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(stopContactStreamingRequest)); 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); } } /** *

* Submits a contact evaluation in the specified Amazon Connect instance. Answers included in the request are merged * with existing answers for the given evaluation. If no answers or notes are passed, the evaluation is submitted * with the existing answers and notes. You can delete an answer or note by passing an empty object ({} * ) to the question identifier. *

*

* If a contact evaluation is already in submitted state, this operation will trigger a resubmission. *

* * @param submitContactEvaluationRequest * @return A Java Future containing the result of the SubmitContactEvaluation 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. *
    *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • ResourceConflictException A resource already has that name.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.SubmitContactEvaluation * @see AWS API Documentation */ @Override public CompletableFuture submitContactEvaluation( SubmitContactEvaluationRequest submitContactEvaluationRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(submitContactEvaluationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, submitContactEvaluationRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "SubmitContactEvaluation"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, SubmitContactEvaluationResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("SubmitContactEvaluation").withProtocolMetadata(protocolMetadata) .withMarshaller(new SubmitContactEvaluationRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(submitContactEvaluationRequest)); 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); } } /** *

* When a contact is being recorded, this API suspends recording whatever is selected in the flow configuration: * call, screen, or both. If only call recording or only screen recording is enabled, then it would be suspended. * For example, you might suspend the screen recording while collecting sensitive information, such as a credit card * number. Then use ResumeContactRecording to restart recording the screen. *

*

* The period of time that the recording is suspended is filled with silence in the final recording. *

*

* Voice and screen recordings are supported. *

* * @param suspendContactRecordingRequest * @return A Java Future containing the result of the SuspendContactRecording 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.SuspendContactRecording * @see AWS API Documentation */ @Override public CompletableFuture suspendContactRecording( SuspendContactRecordingRequest suspendContactRecordingRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(suspendContactRecordingRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, suspendContactRecordingRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "SuspendContactRecording"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, SuspendContactRecordingResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("SuspendContactRecording").withProtocolMetadata(protocolMetadata) .withMarshaller(new SuspendContactRecordingRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(suspendContactRecordingRequest)); 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); } } /** *

* Adds the specified tags to the contact resource. For more information about this API is used, see Set up granular billing for a * detailed view of your Amazon Connect usage. *

* * @param tagContactRequest * @return A Java Future containing the result of the TagContact 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.TagContact * @see AWS API * Documentation */ @Override public CompletableFuture tagContact(TagContactRequest tagContactRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(tagContactRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, tagContactRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "TagContact"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, TagContactResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("TagContact") .withProtocolMetadata(protocolMetadata) .withMarshaller(new TagContactRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(tagContactRequest)); 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); } } /** *

* Adds the specified tags to the specified resource. *

*

* Some of the supported resource types are agents, routing profiles, queues, quick connects, contact flows, agent * statuses, hours of operation, phone numbers, security profiles, and task templates. For a complete list, see Tagging resources in Amazon * Connect. *

*

* For sample policies that use tags, see Amazon * Connect Identity-Based Policy Examples in the Amazon Connect Administrator Guide. *

* * @param tagResourceRequest * @return A Java Future containing the result of the TagResource 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.TagResource * @see AWS API * Documentation */ @Override public CompletableFuture tagResource(TagResourceRequest tagResourceRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(tagResourceRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, tagResourceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "TagResource"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, TagResourceResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("TagResource").withProtocolMetadata(protocolMetadata) .withMarshaller(new TagResourceRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(tagResourceRequest)); 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); } } /** *

* Transfers contacts from one agent or queue to another agent or queue at any point after a contact is created. You * can transfer a contact to another queue by providing the flow which orchestrates the contact to the destination * queue. This gives you more control over contact handling and helps you adhere to the service level agreement * (SLA) guaranteed to your customers. *

*

* Note the following requirements: *

*
    *
  • *

    * Transfer is supported for only TASK contacts. *

    *
  • *
  • *

    * Do not use both QueueId and UserId in the same call. *

    *
  • *
  • *

    * The following flow types are supported: Inbound flow, Transfer to agent flow, and Transfer to queue flow. *

    *
  • *
  • *

    * The TransferContact API can be called only on active contacts. *

    *
  • *
  • *

    * A contact cannot be transferred more than 11 times. *

    *
  • *
* * @param transferContactRequest * @return A Java Future containing the result of the TransferContact 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • IdempotencyException An entity with the same name already exists.
  • *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ServiceQuotaExceededException The service quota has been exceeded.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.TransferContact * @see AWS API * Documentation */ @Override public CompletableFuture transferContact(TransferContactRequest transferContactRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(transferContactRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, transferContactRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "TransferContact"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, TransferContactResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("TransferContact").withProtocolMetadata(protocolMetadata) .withMarshaller(new TransferContactRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(transferContactRequest)); 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); } } /** *

* Removes the specified tags from the contact resource. For more information about this API is used, see Set up granular billing for a * detailed view of your Amazon Connect usage. *

* * @param untagContactRequest * @return A Java Future containing the result of the UntagContact 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.UntagContact * @see AWS API * Documentation */ @Override public CompletableFuture untagContact(UntagContactRequest untagContactRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(untagContactRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, untagContactRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UntagContact"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, UntagContactResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UntagContact").withProtocolMetadata(protocolMetadata) .withMarshaller(new UntagContactRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(untagContactRequest)); 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); } } /** *

* Removes the specified tags from the specified resource. *

* * @param untagResourceRequest * @return A Java Future containing the result of the UntagResource 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.UntagResource * @see AWS API * Documentation */ @Override public CompletableFuture untagResource(UntagResourceRequest untagResourceRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(untagResourceRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, untagResourceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UntagResource"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, UntagResourceResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UntagResource").withProtocolMetadata(protocolMetadata) .withMarshaller(new UntagResourceRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(untagResourceRequest)); 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); } } /** *

* This API is in preview release for Amazon Connect and is subject to change. *

*

* Updates agent status. *

* * @param updateAgentStatusRequest * @return A Java Future containing the result of the UpdateAgentStatus 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • DuplicateResourceException A resource with the specified name already exists.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • LimitExceededException The allowed limit for the resource has been exceeded.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.UpdateAgentStatus * @see AWS API * Documentation */ @Override public CompletableFuture updateAgentStatus(UpdateAgentStatusRequest updateAgentStatusRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateAgentStatusRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateAgentStatusRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateAgentStatus"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateAgentStatusResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateAgentStatus").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateAgentStatusRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateAgentStatusRequest)); 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); } } /** *

* This API is in preview release for Amazon Connect and is subject to change. To request access to this API, * contact Amazon Web Services Support. *

*

* Updates the selected authentication profile. *

* * @param updateAuthenticationProfileRequest * @return A Java Future containing the result of the UpdateAuthenticationProfile 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.UpdateAuthenticationProfile * @see AWS API Documentation */ @Override public CompletableFuture updateAuthenticationProfile( UpdateAuthenticationProfileRequest updateAuthenticationProfileRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateAuthenticationProfileRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateAuthenticationProfileRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateAuthenticationProfile"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateAuthenticationProfileResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateAuthenticationProfile").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateAuthenticationProfileRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateAuthenticationProfileRequest)); 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); } } /** *

* This API is in preview release for Amazon Connect and is subject to change. *

*

* Adds or updates user-defined contact information associated with the specified contact. At least one field to be * updated must be present in the request. *

* *

* You can add or update user-defined contact information for both ongoing and completed contacts. *

*
* * @param updateContactRequest * @return A Java Future containing the result of the UpdateContact 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.UpdateContact * @see AWS API * Documentation */ @Override public CompletableFuture updateContact(UpdateContactRequest updateContactRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateContactRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateContactRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateContact"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, UpdateContactResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateContact").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateContactRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateContactRequest)); 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); } } /** *

* Creates or updates user-defined contact attributes associated with the specified contact. *

*

* You can create or update user-defined attributes for both ongoing and completed contacts. For example, while the * call is active, you can update the customer's name or the reason the customer called. You can add notes about * steps that the agent took during the call that display to the next agent that takes the call. You can also update * attributes for a contact using data from your CRM application and save the data with the contact in Amazon * Connect. You could also flag calls for additional analysis, such as legal review or to identify abusive callers. *

*

* Contact attributes are available in Amazon Connect for 24 months, and are then deleted. For information about * contact record retention and the maximum size of the contact record attributes section, see Feature specifications in the Amazon Connect Administrator Guide. *

* * @param updateContactAttributesRequest * @return A Java Future containing the result of the UpdateContactAttributes 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.UpdateContactAttributes * @see AWS API Documentation */ @Override public CompletableFuture updateContactAttributes( UpdateContactAttributesRequest updateContactAttributesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateContactAttributesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateContactAttributesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateContactAttributes"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateContactAttributesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateContactAttributes").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateContactAttributesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateContactAttributesRequest)); 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); } } /** *

* Updates details about a contact evaluation in the specified Amazon Connect instance. A contact evaluation must be * in draft state. Answers included in the request are merged with existing answers for the given evaluation. An * answer or note can be deleted by passing an empty object ({}) to the question identifier. *

* * @param updateContactEvaluationRequest * @return A Java Future containing the result of the UpdateContactEvaluation 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. *
    *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • ResourceConflictException A resource already has that name.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.UpdateContactEvaluation * @see AWS API Documentation */ @Override public CompletableFuture updateContactEvaluation( UpdateContactEvaluationRequest updateContactEvaluationRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateContactEvaluationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateContactEvaluationRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateContactEvaluation"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateContactEvaluationResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateContactEvaluation").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateContactEvaluationRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateContactEvaluationRequest)); 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); } } /** *

* Updates the specified flow. *

*

* You can also create and update flows using the Amazon Connect Flow * language. *

*

* Use the $SAVED alias in the request to describe the SAVED content of a Flow. For * example, arn:aws:.../contact-flow/{id}:$SAVED. Once a contact flow is published, * $SAVED needs to be supplied to view saved content that has not been published. *

* * @param updateContactFlowContentRequest * @return A Java Future containing the result of the UpdateContactFlowContent 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidContactFlowException The flow is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.UpdateContactFlowContent * @see AWS API Documentation */ @Override public CompletableFuture updateContactFlowContent( UpdateContactFlowContentRequest updateContactFlowContentRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateContactFlowContentRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateContactFlowContentRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateContactFlowContent"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateContactFlowContentResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateContactFlowContent").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateContactFlowContentRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateContactFlowContentRequest)); 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); } } /** *

* Updates metadata about specified flow. *

* * @param updateContactFlowMetadataRequest * @return A Java Future containing the result of the UpdateContactFlowMetadata 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • DuplicateResourceException A resource with the specified name already exists.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.UpdateContactFlowMetadata * @see AWS API Documentation */ @Override public CompletableFuture updateContactFlowMetadata( UpdateContactFlowMetadataRequest updateContactFlowMetadataRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateContactFlowMetadataRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateContactFlowMetadataRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateContactFlowMetadata"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateContactFlowMetadataResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateContactFlowMetadata").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateContactFlowMetadataRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateContactFlowMetadataRequest)); 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); } } /** *

* Updates specified flow module for the specified Amazon Connect instance. *

*

* Use the $SAVED alias in the request to describe the SAVED content of a Flow. For * example, arn:aws:.../contact-flow/{id}:$SAVED. Once a contact flow is published, * $SAVED needs to be supplied to view saved content that has not been published. *

* * @param updateContactFlowModuleContentRequest * @return A Java Future containing the result of the UpdateContactFlowModuleContent 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. *
    *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidContactFlowModuleException The problems with the module. Please fix before trying again.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.UpdateContactFlowModuleContent * @see AWS API Documentation */ @Override public CompletableFuture updateContactFlowModuleContent( UpdateContactFlowModuleContentRequest updateContactFlowModuleContentRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateContactFlowModuleContentRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateContactFlowModuleContentRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateContactFlowModuleContent"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateContactFlowModuleContentResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateContactFlowModuleContent").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateContactFlowModuleContentRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateContactFlowModuleContentRequest)); 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); } } /** *

* Updates metadata about specified flow module. *

* * @param updateContactFlowModuleMetadataRequest * @return A Java Future containing the result of the UpdateContactFlowModuleMetadata 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. *
    *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • DuplicateResourceException A resource with the specified name already exists.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.UpdateContactFlowModuleMetadata * @see AWS API Documentation */ @Override public CompletableFuture updateContactFlowModuleMetadata( UpdateContactFlowModuleMetadataRequest updateContactFlowModuleMetadataRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateContactFlowModuleMetadataRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateContactFlowModuleMetadataRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateContactFlowModuleMetadata"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateContactFlowModuleMetadataResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateContactFlowModuleMetadata").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateContactFlowModuleMetadataRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateContactFlowModuleMetadataRequest)); 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); } } /** *

* The name of the flow. *

*

* You can also create and update flows using the Amazon Connect Flow * language. *

* * @param updateContactFlowNameRequest * @return A Java Future containing the result of the UpdateContactFlowName 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • DuplicateResourceException A resource with the specified name already exists.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.UpdateContactFlowName * @see AWS * API Documentation */ @Override public CompletableFuture updateContactFlowName( UpdateContactFlowNameRequest updateContactFlowNameRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateContactFlowNameRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateContactFlowNameRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateContactFlowName"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateContactFlowNameResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateContactFlowName").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateContactFlowNameRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateContactFlowNameRequest)); 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); } } /** *

* Updates routing priority and age on the contact (QueuePriority and QueueTimeAdjustmentInSeconds). * These properties can be used to change a customer's position in the queue. For example, you can move a contact to * the back of the queue by setting a lower routing priority relative to other contacts in queue; or you can move a * contact to the front of the queue by increasing the routing age which will make the contact look artificially * older and therefore higher up in the first-in-first-out routing order. Note that adjusting the routing age of a * contact affects only its position in queue, and not its actual queue wait time as reported through metrics. These * properties can also be updated by using the Set routing * priority / age flow block. *

* *

* Either QueuePriority or QueueTimeAdjustmentInSeconds should be provided within the request body, * but not both. *

*
* * @param updateContactRoutingDataRequest * @return A Java Future containing the result of the UpdateContactRoutingData 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. *
    *
  • ResourceConflictException A resource already has that name.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.UpdateContactRoutingData * @see AWS API Documentation */ @Override public CompletableFuture updateContactRoutingData( UpdateContactRoutingDataRequest updateContactRoutingDataRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateContactRoutingDataRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateContactRoutingDataRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateContactRoutingData"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateContactRoutingDataResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateContactRoutingData").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateContactRoutingDataRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateContactRoutingDataRequest)); 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); } } /** *

* Updates the scheduled time of a task contact that is already scheduled. *

* * @param updateContactScheduleRequest * @return A Java Future containing the result of the UpdateContactSchedule 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • LimitExceededException The allowed limit for the resource has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.UpdateContactSchedule * @see AWS * API Documentation */ @Override public CompletableFuture updateContactSchedule( UpdateContactScheduleRequest updateContactScheduleRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateContactScheduleRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateContactScheduleRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateContactSchedule"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateContactScheduleResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateContactSchedule").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateContactScheduleRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateContactScheduleRequest)); 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); } } /** *

* Updates details about a specific evaluation form version in the specified Amazon Connect instance. Question and * section identifiers cannot be duplicated within the same evaluation form. *

*

* This operation does not support partial updates. Instead it does a full update of evaluation form content. *

* * @param updateEvaluationFormRequest * @return A Java Future containing the result of the UpdateEvaluationForm 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. *
    *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • ServiceQuotaExceededException The service quota has been exceeded.
  • *
  • ResourceConflictException A resource already has that name.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.UpdateEvaluationForm * @see AWS * API Documentation */ @Override public CompletableFuture updateEvaluationForm( UpdateEvaluationFormRequest updateEvaluationFormRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateEvaluationFormRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateEvaluationFormRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateEvaluationForm"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateEvaluationFormResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateEvaluationForm").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateEvaluationFormRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateEvaluationFormRequest)); 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); } } /** *

* This API is in preview release for Amazon Connect and is subject to change. *

*

* Updates the hours of operation. *

* * @param updateHoursOfOperationRequest * @return A Java Future containing the result of the UpdateHoursOfOperation 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. *
    *
  • DuplicateResourceException A resource with the specified name already exists.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.UpdateHoursOfOperation * @see AWS API Documentation */ @Override public CompletableFuture updateHoursOfOperation( UpdateHoursOfOperationRequest updateHoursOfOperationRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateHoursOfOperationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateHoursOfOperationRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateHoursOfOperation"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateHoursOfOperationResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateHoursOfOperation").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateHoursOfOperationRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateHoursOfOperationRequest)); 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); } } /** *

* This API is in preview release for Amazon Connect and is subject to change. *

*

* Updates the value for the specified attribute type. *

* * @param updateInstanceAttributeRequest * @return A Java Future containing the result of the UpdateInstanceAttribute 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. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.UpdateInstanceAttribute * @see AWS API Documentation */ @Override public CompletableFuture updateInstanceAttribute( UpdateInstanceAttributeRequest updateInstanceAttributeRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateInstanceAttributeRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateInstanceAttributeRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateInstanceAttribute"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateInstanceAttributeResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateInstanceAttribute").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateInstanceAttributeRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateInstanceAttributeRequest)); 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); } } /** *

* This API is in preview release for Amazon Connect and is subject to change. *

*

* Updates an existing configuration for a resource type. This API is idempotent. *

* * @param updateInstanceStorageConfigRequest * @return A Java Future containing the result of the UpdateInstanceStorageConfig 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. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.UpdateInstanceStorageConfig * @see AWS API Documentation */ @Override public CompletableFuture updateInstanceStorageConfig( UpdateInstanceStorageConfigRequest updateInstanceStorageConfigRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateInstanceStorageConfigRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateInstanceStorageConfigRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateInstanceStorageConfig"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateInstanceStorageConfigResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateInstanceStorageConfig").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateInstanceStorageConfigRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateInstanceStorageConfigRequest)); 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); } } /** *

* Updates timeouts for when human chat participants are to be considered idle, and when agents are automatically * disconnected from a chat due to idleness. You can set four timers: *

*
    *
  • *

    * Customer idle timeout *

    *
  • *
  • *

    * Customer auto-disconnect timeout *

    *
  • *
  • *

    * Agent idle timeout *

    *
  • *
  • *

    * Agent auto-disconnect timeout *

    *
  • *
*

* For more information about how chat timeouts work, see Set up chat timeouts for * human participants. *

* * @param updateParticipantRoleConfigRequest * @return A Java Future containing the result of the UpdateParticipantRoleConfig 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.UpdateParticipantRoleConfig * @see AWS API Documentation */ @Override public CompletableFuture updateParticipantRoleConfig( UpdateParticipantRoleConfigRequest updateParticipantRoleConfigRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateParticipantRoleConfigRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateParticipantRoleConfigRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateParticipantRoleConfig"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateParticipantRoleConfigResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateParticipantRoleConfig").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateParticipantRoleConfigRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateParticipantRoleConfigRequest)); 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); } } /** *

* Updates your claimed phone number from its current Amazon Connect instance or traffic distribution group to * another Amazon Connect instance or traffic distribution group in the same Amazon Web Services Region. *

* *

* After using this API, you must verify that the phone number is attached to the correct flow in the target * instance or traffic distribution group. You need to do this because the API switches only the phone number to a * new instance or traffic distribution group. It doesn't migrate the flow configuration of the phone number, too. *

*

* You can call DescribePhoneNumber * API to verify the status of a previous UpdatePhoneNumber * operation. *

*
* * @param updatePhoneNumberRequest * @return A Java Future containing the result of the UpdatePhoneNumber 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. *
    *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • ResourceInUseException That resource is already in use. Please try another.
  • *
  • IdempotencyException An entity with the same name already exists.
  • *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.UpdatePhoneNumber * @see AWS API * Documentation */ @Override public CompletableFuture updatePhoneNumber(UpdatePhoneNumberRequest updatePhoneNumberRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updatePhoneNumberRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updatePhoneNumberRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdatePhoneNumber"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdatePhoneNumberResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdatePhoneNumber").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdatePhoneNumberRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updatePhoneNumberRequest)); 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); } } /** *

* Updates a phone number’s metadata. *

* *

* To verify the status of a previous UpdatePhoneNumberMetadata operation, call the DescribePhoneNumber API. *

*
* * @param updatePhoneNumberMetadataRequest * @return A Java Future containing the result of the UpdatePhoneNumberMetadata 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. *
    *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ResourceInUseException That resource is already in use. Please try another.
  • *
  • IdempotencyException An entity with the same name already exists.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.UpdatePhoneNumberMetadata * @see AWS API Documentation */ @Override public CompletableFuture updatePhoneNumberMetadata( UpdatePhoneNumberMetadataRequest updatePhoneNumberMetadataRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updatePhoneNumberMetadataRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updatePhoneNumberMetadataRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdatePhoneNumberMetadata"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdatePhoneNumberMetadataResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdatePhoneNumberMetadata").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdatePhoneNumberMetadataRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updatePhoneNumberMetadataRequest)); 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); } } /** *

* Updates a predefined attribute for the specified Amazon Connect instance. Predefined attributes are * attributes in an Amazon Connect instance that can be used to route contacts to an agent or pools of agents within * a queue. For more information, see Create predefined * attributes for routing contacts to agents. *

* * @param updatePredefinedAttributeRequest * @return A Java Future containing the result of the UpdatePredefinedAttribute 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.UpdatePredefinedAttribute * @see AWS API Documentation */ @Override public CompletableFuture updatePredefinedAttribute( UpdatePredefinedAttributeRequest updatePredefinedAttributeRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updatePredefinedAttributeRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updatePredefinedAttributeRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdatePredefinedAttribute"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdatePredefinedAttributeResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdatePredefinedAttribute").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdatePredefinedAttributeRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updatePredefinedAttributeRequest)); 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); } } /** *

* Updates a prompt. *

* * @param updatePromptRequest * @return A Java Future containing the result of the UpdatePrompt 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.UpdatePrompt * @see AWS API * Documentation */ @Override public CompletableFuture updatePrompt(UpdatePromptRequest updatePromptRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updatePromptRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updatePromptRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdatePrompt"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, UpdatePromptResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdatePrompt").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdatePromptRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updatePromptRequest)); 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); } } /** *

* This API is in preview release for Amazon Connect and is subject to change. *

*

* Updates the hours of operation for the specified queue. *

* * @param updateQueueHoursOfOperationRequest * @return A Java Future containing the result of the UpdateQueueHoursOfOperation 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.UpdateQueueHoursOfOperation * @see AWS API Documentation */ @Override public CompletableFuture updateQueueHoursOfOperation( UpdateQueueHoursOfOperationRequest updateQueueHoursOfOperationRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateQueueHoursOfOperationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateQueueHoursOfOperationRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateQueueHoursOfOperation"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateQueueHoursOfOperationResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateQueueHoursOfOperation").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateQueueHoursOfOperationRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateQueueHoursOfOperationRequest)); 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); } } /** *

* This API is in preview release for Amazon Connect and is subject to change. *

*

* Updates the maximum number of contacts allowed in a queue before it is considered full. *

* * @param updateQueueMaxContactsRequest * @return A Java Future containing the result of the UpdateQueueMaxContacts 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.UpdateQueueMaxContacts * @see AWS API Documentation */ @Override public CompletableFuture updateQueueMaxContacts( UpdateQueueMaxContactsRequest updateQueueMaxContactsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateQueueMaxContactsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateQueueMaxContactsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateQueueMaxContacts"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateQueueMaxContactsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateQueueMaxContacts").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateQueueMaxContactsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateQueueMaxContactsRequest)); 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); } } /** *

* This API is in preview release for Amazon Connect and is subject to change. *

*

* Updates the name and description of a queue. At least Name or Description must be * provided. *

* * @param updateQueueNameRequest * @return A Java Future containing the result of the UpdateQueueName 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. *
    *
  • DuplicateResourceException A resource with the specified name already exists.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.UpdateQueueName * @see AWS API * Documentation */ @Override public CompletableFuture updateQueueName(UpdateQueueNameRequest updateQueueNameRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateQueueNameRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateQueueNameRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateQueueName"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateQueueNameResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateQueueName").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateQueueNameRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateQueueNameRequest)); 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); } } /** *

* This API is in preview release for Amazon Connect and is subject to change. *

*

* Updates the outbound caller ID name, number, and outbound whisper flow for a specified queue. *

* *
    *
  • *

    * If the phone number is claimed to a traffic distribution group that was created in the same Region as the Amazon * Connect instance where you are calling this API, then you can use a full phone number ARN or a UUID for * OutboundCallerIdNumberId. However, if the phone number is claimed to a traffic distribution group * that is in one Region, and you are calling this API from an instance in another Amazon Web Services Region that * is associated with the traffic distribution group, you must provide a full phone number ARN. If a UUID is * provided in this scenario, you will receive a ResourceNotFoundException. *

    *
  • *
  • *

    * Only use the phone number ARN format that doesn't contain instance in the path, for example, * arn:aws:connect:us-east-1:1234567890:phone-number/uuid. This is the same ARN format that is returned * when you call the ListPhoneNumbersV2 * API. *

    *
  • *
  • *

    * If you plan to use IAM policies to allow/deny access to this API for phone number resources claimed to a traffic * distribution group, see Allow or Deny queue API actions for phone numbers in a replica Region. *

    *
  • *
*
* * @param updateQueueOutboundCallerConfigRequest * @return A Java Future containing the result of the UpdateQueueOutboundCallerConfig 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.UpdateQueueOutboundCallerConfig * @see AWS API Documentation */ @Override public CompletableFuture updateQueueOutboundCallerConfig( UpdateQueueOutboundCallerConfigRequest updateQueueOutboundCallerConfigRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateQueueOutboundCallerConfigRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateQueueOutboundCallerConfigRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateQueueOutboundCallerConfig"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateQueueOutboundCallerConfigResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateQueueOutboundCallerConfig").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateQueueOutboundCallerConfigRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateQueueOutboundCallerConfigRequest)); 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); } } /** *

* This API is in preview release for Amazon Connect and is subject to change. *

*

* Updates the status of the queue. *

* * @param updateQueueStatusRequest * @return A Java Future containing the result of the UpdateQueueStatus 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.UpdateQueueStatus * @see AWS API * Documentation */ @Override public CompletableFuture updateQueueStatus(UpdateQueueStatusRequest updateQueueStatusRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateQueueStatusRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateQueueStatusRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateQueueStatus"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateQueueStatusResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateQueueStatus").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateQueueStatusRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateQueueStatusRequest)); 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); } } /** *

* Updates the configuration settings for the specified quick connect. *

* * @param updateQuickConnectConfigRequest * @return A Java Future containing the result of the UpdateQuickConnectConfig 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.UpdateQuickConnectConfig * @see AWS API Documentation */ @Override public CompletableFuture updateQuickConnectConfig( UpdateQuickConnectConfigRequest updateQuickConnectConfigRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateQuickConnectConfigRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateQuickConnectConfigRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateQuickConnectConfig"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateQuickConnectConfigResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateQuickConnectConfig").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateQuickConnectConfigRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateQuickConnectConfigRequest)); 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); } } /** *

* Updates the name and description of a quick connect. The request accepts the following data in JSON format. At * least Name or Description must be provided. *

* * @param updateQuickConnectNameRequest * @return A Java Future containing the result of the UpdateQuickConnectName 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.UpdateQuickConnectName * @see AWS API Documentation */ @Override public CompletableFuture updateQuickConnectName( UpdateQuickConnectNameRequest updateQuickConnectNameRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateQuickConnectNameRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateQuickConnectNameRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateQuickConnectName"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateQuickConnectNameResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateQuickConnectName").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateQuickConnectNameRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateQuickConnectNameRequest)); 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); } } /** *

* Whether agents with this routing profile will have their routing order calculated based on time since their * last inbound contact or longest idle time. *

* * @param updateRoutingProfileAgentAvailabilityTimerRequest * @return A Java Future containing the result of the UpdateRoutingProfileAgentAvailabilityTimer 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.UpdateRoutingProfileAgentAvailabilityTimer * @see AWS API Documentation */ @Override public CompletableFuture updateRoutingProfileAgentAvailabilityTimer( UpdateRoutingProfileAgentAvailabilityTimerRequest updateRoutingProfileAgentAvailabilityTimerRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration( updateRoutingProfileAgentAvailabilityTimerRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateRoutingProfileAgentAvailabilityTimerRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateRoutingProfileAgentAvailabilityTimer"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(operationMetadata, UpdateRoutingProfileAgentAvailabilityTimerResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateRoutingProfileAgentAvailabilityTimer") .withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateRoutingProfileAgentAvailabilityTimerRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateRoutingProfileAgentAvailabilityTimerRequest)); 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); } } /** *

* Updates the channels that agents can handle in the Contact Control Panel (CCP) for a routing profile. *

* * @param updateRoutingProfileConcurrencyRequest * @return A Java Future containing the result of the UpdateRoutingProfileConcurrency 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.UpdateRoutingProfileConcurrency * @see AWS API Documentation */ @Override public CompletableFuture updateRoutingProfileConcurrency( UpdateRoutingProfileConcurrencyRequest updateRoutingProfileConcurrencyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateRoutingProfileConcurrencyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateRoutingProfileConcurrencyRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateRoutingProfileConcurrency"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateRoutingProfileConcurrencyResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateRoutingProfileConcurrency").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateRoutingProfileConcurrencyRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateRoutingProfileConcurrencyRequest)); 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); } } /** *

* Updates the default outbound queue of a routing profile. *

* * @param updateRoutingProfileDefaultOutboundQueueRequest * @return A Java Future containing the result of the UpdateRoutingProfileDefaultOutboundQueue 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.UpdateRoutingProfileDefaultOutboundQueue * @see AWS API Documentation */ @Override public CompletableFuture updateRoutingProfileDefaultOutboundQueue( UpdateRoutingProfileDefaultOutboundQueueRequest updateRoutingProfileDefaultOutboundQueueRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration( updateRoutingProfileDefaultOutboundQueueRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateRoutingProfileDefaultOutboundQueueRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateRoutingProfileDefaultOutboundQueue"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(operationMetadata, UpdateRoutingProfileDefaultOutboundQueueResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateRoutingProfileDefaultOutboundQueue").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateRoutingProfileDefaultOutboundQueueRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateRoutingProfileDefaultOutboundQueueRequest)); 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); } } /** *

* Updates the name and description of a routing profile. The request accepts the following data in JSON format. At * least Name or Description must be provided. *

* * @param updateRoutingProfileNameRequest * @return A Java Future containing the result of the UpdateRoutingProfileName 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. *
    *
  • DuplicateResourceException A resource with the specified name already exists.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.UpdateRoutingProfileName * @see AWS API Documentation */ @Override public CompletableFuture updateRoutingProfileName( UpdateRoutingProfileNameRequest updateRoutingProfileNameRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateRoutingProfileNameRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateRoutingProfileNameRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateRoutingProfileName"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateRoutingProfileNameResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateRoutingProfileName").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateRoutingProfileNameRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateRoutingProfileNameRequest)); 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); } } /** *

* Updates the properties associated with a set of queues for a routing profile. *

* * @param updateRoutingProfileQueuesRequest * @return A Java Future containing the result of the UpdateRoutingProfileQueues 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.UpdateRoutingProfileQueues * @see AWS API Documentation */ @Override public CompletableFuture updateRoutingProfileQueues( UpdateRoutingProfileQueuesRequest updateRoutingProfileQueuesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateRoutingProfileQueuesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateRoutingProfileQueuesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateRoutingProfileQueues"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateRoutingProfileQueuesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateRoutingProfileQueues").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateRoutingProfileQueuesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateRoutingProfileQueuesRequest)); 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); } } /** *

* Updates a rule for the specified Amazon Connect instance. *

*

* Use the Rules * Function language to code conditions for the rule. *

* * @param updateRuleRequest * @return A Java Future containing the result of the UpdateRule 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • ResourceConflictException A resource already has that name.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.UpdateRule * @see AWS API * Documentation */ @Override public CompletableFuture updateRule(UpdateRuleRequest updateRuleRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateRuleRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateRuleRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateRule"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, UpdateRuleResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("UpdateRule") .withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateRuleRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateRuleRequest)); 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); } } /** *

* Updates a security profile. *

*

* For information about security profiles, see Security Profiles * in the Amazon Connect Administrator Guide. For a mapping of the API name and user interface name of the * security profile permissions, see List of security profile * permissions. *

* * @param updateSecurityProfileRequest * @return A Java Future containing the result of the UpdateSecurityProfile 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.UpdateSecurityProfile * @see AWS * API Documentation */ @Override public CompletableFuture updateSecurityProfile( UpdateSecurityProfileRequest updateSecurityProfileRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateSecurityProfileRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateSecurityProfileRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateSecurityProfile"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateSecurityProfileResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateSecurityProfile").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateSecurityProfileRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateSecurityProfileRequest)); 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); } } /** *

* Updates details about a specific task template in the specified Amazon Connect instance. This operation does not * support partial updates. Instead it does a full update of template content. *

* * @param updateTaskTemplateRequest * @return A Java Future containing the result of the UpdateTaskTemplate 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. *
    *
  • PropertyValidationException The property is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • ServiceQuotaExceededException The service quota has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.UpdateTaskTemplate * @see AWS * API Documentation */ @Override public CompletableFuture updateTaskTemplate(UpdateTaskTemplateRequest updateTaskTemplateRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateTaskTemplateRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateTaskTemplateRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateTaskTemplate"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateTaskTemplateResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateTaskTemplate").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateTaskTemplateRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateTaskTemplateRequest)); 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); } } /** *

* Updates the traffic distribution for a given traffic distribution group. *

* *

* The SignInConfig distribution is available only on a default TrafficDistributionGroup * (see the IsDefault parameter in the TrafficDistributionGroup data type). If you call UpdateTrafficDistribution with a modified * SignInConfig and a non-default TrafficDistributionGroup, an * InvalidRequestException is returned. *

*
*

* For more information about updating a traffic distribution group, see Update * telephony traffic distribution across Amazon Web Services Regions in the Amazon Connect Administrator * Guide. *

* * @param updateTrafficDistributionRequest * @return A Java Future containing the result of the UpdateTrafficDistribution 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ResourceConflictException A resource already has that name.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.UpdateTrafficDistribution * @see AWS API Documentation */ @Override public CompletableFuture updateTrafficDistribution( UpdateTrafficDistributionRequest updateTrafficDistributionRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateTrafficDistributionRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateTrafficDistributionRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateTrafficDistribution"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateTrafficDistributionResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateTrafficDistribution").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateTrafficDistributionRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateTrafficDistributionRequest)); 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); } } /** *

* Assigns the specified hierarchy group to the specified user. *

* * @param updateUserHierarchyRequest * @return A Java Future containing the result of the UpdateUserHierarchy 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.UpdateUserHierarchy * @see AWS * API Documentation */ @Override public CompletableFuture updateUserHierarchy( UpdateUserHierarchyRequest updateUserHierarchyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateUserHierarchyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateUserHierarchyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateUserHierarchy"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateUserHierarchyResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateUserHierarchy").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateUserHierarchyRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateUserHierarchyRequest)); 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); } } /** *

* Updates the name of the user hierarchy group. *

* * @param updateUserHierarchyGroupNameRequest * @return A Java Future containing the result of the UpdateUserHierarchyGroupName 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • DuplicateResourceException A resource with the specified name already exists.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.UpdateUserHierarchyGroupName * @see AWS API Documentation */ @Override public CompletableFuture updateUserHierarchyGroupName( UpdateUserHierarchyGroupNameRequest updateUserHierarchyGroupNameRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateUserHierarchyGroupNameRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateUserHierarchyGroupNameRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateUserHierarchyGroupName"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateUserHierarchyGroupNameResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateUserHierarchyGroupName").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateUserHierarchyGroupNameRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateUserHierarchyGroupNameRequest)); 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); } } /** *

* Updates the user hierarchy structure: add, remove, and rename user hierarchy levels. *

* * @param updateUserHierarchyStructureRequest * @return A Java Future containing the result of the UpdateUserHierarchyStructure 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ResourceInUseException That resource is already in use. Please try another.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.UpdateUserHierarchyStructure * @see AWS API Documentation */ @Override public CompletableFuture updateUserHierarchyStructure( UpdateUserHierarchyStructureRequest updateUserHierarchyStructureRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateUserHierarchyStructureRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateUserHierarchyStructureRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateUserHierarchyStructure"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateUserHierarchyStructureResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateUserHierarchyStructure").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateUserHierarchyStructureRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateUserHierarchyStructureRequest)); 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); } } /** *

* Updates the identity information for the specified user. *

* *

* We strongly recommend limiting who has the ability to invoke UpdateUserIdentityInfo. Someone with * that ability can change the login credentials of other users by changing their email address. This poses a * security risk to your organization. They can change the email address of a user to the attacker's email address, * and then reset the password through email. For more information, see Best Practices * for Security Profiles in the Amazon Connect Administrator Guide. *

*
* * @param updateUserIdentityInfoRequest * @return A Java Future containing the result of the UpdateUserIdentityInfo 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.UpdateUserIdentityInfo * @see AWS API Documentation */ @Override public CompletableFuture updateUserIdentityInfo( UpdateUserIdentityInfoRequest updateUserIdentityInfoRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateUserIdentityInfoRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateUserIdentityInfoRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateUserIdentityInfo"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateUserIdentityInfoResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateUserIdentityInfo").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateUserIdentityInfoRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateUserIdentityInfoRequest)); 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); } } /** *

* Updates the phone configuration settings for the specified user. *

* * @param updateUserPhoneConfigRequest * @return A Java Future containing the result of the UpdateUserPhoneConfig 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.UpdateUserPhoneConfig * @see AWS * API Documentation */ @Override public CompletableFuture updateUserPhoneConfig( UpdateUserPhoneConfigRequest updateUserPhoneConfigRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateUserPhoneConfigRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateUserPhoneConfigRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateUserPhoneConfig"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateUserPhoneConfigResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateUserPhoneConfig").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateUserPhoneConfigRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateUserPhoneConfigRequest)); 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); } } /** *

* Updates the properties associated with the proficiencies of a user. *

* * @param updateUserProficienciesRequest * @return A Java Future containing the result of the UpdateUserProficiencies 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.UpdateUserProficiencies * @see AWS API Documentation */ @Override public CompletableFuture updateUserProficiencies( UpdateUserProficienciesRequest updateUserProficienciesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateUserProficienciesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateUserProficienciesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateUserProficiencies"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateUserProficienciesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateUserProficiencies").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateUserProficienciesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateUserProficienciesRequest)); 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); } } /** *

* Assigns the specified routing profile to the specified user. *

* * @param updateUserRoutingProfileRequest * @return A Java Future containing the result of the UpdateUserRoutingProfile 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.UpdateUserRoutingProfile * @see AWS API Documentation */ @Override public CompletableFuture updateUserRoutingProfile( UpdateUserRoutingProfileRequest updateUserRoutingProfileRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateUserRoutingProfileRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateUserRoutingProfileRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateUserRoutingProfile"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateUserRoutingProfileResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateUserRoutingProfile").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateUserRoutingProfileRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateUserRoutingProfileRequest)); 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); } } /** *

* Assigns the specified security profiles to the specified user. *

* * @param updateUserSecurityProfilesRequest * @return A Java Future containing the result of the UpdateUserSecurityProfiles 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.UpdateUserSecurityProfiles * @see AWS API Documentation */ @Override public CompletableFuture updateUserSecurityProfiles( UpdateUserSecurityProfilesRequest updateUserSecurityProfilesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateUserSecurityProfilesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateUserSecurityProfilesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateUserSecurityProfiles"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateUserSecurityProfilesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateUserSecurityProfiles").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateUserSecurityProfilesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateUserSecurityProfilesRequest)); 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); } } /** *

* Updates the view content of the given view identifier in the specified Amazon Connect instance. *

*

* It performs content validation if Status is set to SAVED and performs full content * validation if Status is PUBLISHED. Note that the $SAVED alias' content * will always be updated, but the $LATEST alias' content will only be updated if * Status is PUBLISHED. *

* * @param updateViewContentRequest * @return A Java Future containing the result of the UpdateViewContent 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. *
    *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • TooManyRequestsException Displayed when rate-related API limits are exceeded.
  • *
  • ResourceInUseException That resource is already in use. Please try another.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.UpdateViewContent * @see AWS API * Documentation */ @Override public CompletableFuture updateViewContent(UpdateViewContentRequest updateViewContentRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateViewContentRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateViewContentRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateViewContent"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateViewContentResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateViewContent").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateViewContentRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateViewContentRequest)); 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); } } /** *

* Updates the view metadata. Note that either Name or Description must be provided. *

* * @param updateViewMetadataRequest * @return A Java Future containing the result of the UpdateViewMetadata 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. *
    *
  • AccessDeniedException You do not have sufficient permissions to perform this action.
  • *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed because of an error or failure with the service.
  • *
  • TooManyRequestsException Displayed when rate-related API limits are exceeded.
  • *
  • DuplicateResourceException A resource with the specified name already exists.
  • *
  • ResourceInUseException That resource is already in use. Please try another.
  • *
  • 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.
  • *
  • ConnectException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample ConnectAsyncClient.UpdateViewMetadata * @see AWS * API Documentation */ @Override public CompletableFuture updateViewMetadata(UpdateViewMetadataRequest updateViewMetadataRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateViewMetadataRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateViewMetadataRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Connect"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateViewMetadata"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateViewMetadataResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateViewMetadata").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateViewMetadataRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateViewMetadataRequest)); 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); } } @Override public final ConnectServiceClientConfiguration serviceClientConfiguration() { return new ConnectServiceClientConfigurationBuilder(this.clientConfiguration.toBuilder()).build(); } @Override public final String serviceName() { return SERVICE_NAME; } private > T init(T builder) { return builder .clientConfiguration(clientConfiguration) .defaultServiceExceptionSupplier(ConnectException::builder) .protocol(AwsJsonProtocol.REST_JSON) .protocolVersion("1.1") .registerModeledException( ExceptionMetadata.builder().errorCode("ResourceNotReadyException") .exceptionBuilderSupplier(ResourceNotReadyException::builder).httpStatusCode(409).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("DuplicateResourceException") .exceptionBuilderSupplier(DuplicateResourceException::builder).httpStatusCode(409).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InternalServiceException") .exceptionBuilderSupplier(InternalServiceException::builder).httpStatusCode(500).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ResourceInUseException") .exceptionBuilderSupplier(ResourceInUseException::builder).httpStatusCode(409).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ConflictException") .exceptionBuilderSupplier(ConflictException::builder).httpStatusCode(409).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidRequestException") .exceptionBuilderSupplier(InvalidRequestException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("OutputTypeNotFoundException") .exceptionBuilderSupplier(OutputTypeNotFoundException::builder).httpStatusCode(404).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ResourceNotFoundException") .exceptionBuilderSupplier(ResourceNotFoundException::builder).httpStatusCode(404).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("MaximumResultReturnedException") .exceptionBuilderSupplier(MaximumResultReturnedException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidParameterException") .exceptionBuilderSupplier(InvalidParameterException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ContactNotFoundException") .exceptionBuilderSupplier(ContactNotFoundException::builder).httpStatusCode(410).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("OutboundContactNotPermittedException") .exceptionBuilderSupplier(OutboundContactNotPermittedException::builder).httpStatusCode(403) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ContactFlowNotPublishedException") .exceptionBuilderSupplier(ContactFlowNotPublishedException::builder).httpStatusCode(404).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ServiceQuotaExceededException") .exceptionBuilderSupplier(ServiceQuotaExceededException::builder).httpStatusCode(402).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("LimitExceededException") .exceptionBuilderSupplier(LimitExceededException::builder).httpStatusCode(429).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("UserNotFoundException") .exceptionBuilderSupplier(UserNotFoundException::builder).httpStatusCode(404).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("DestinationNotAllowedException") .exceptionBuilderSupplier(DestinationNotAllowedException::builder).httpStatusCode(403).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("PropertyValidationException") .exceptionBuilderSupplier(PropertyValidationException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ThrottlingException") .exceptionBuilderSupplier(ThrottlingException::builder).httpStatusCode(429).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("TooManyRequestsException") .exceptionBuilderSupplier(TooManyRequestsException::builder).httpStatusCode(429).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidContactFlowModuleException") .exceptionBuilderSupplier(InvalidContactFlowModuleException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ResourceConflictException") .exceptionBuilderSupplier(ResourceConflictException::builder).httpStatusCode(409).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidContactFlowException") .exceptionBuilderSupplier(InvalidContactFlowException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("AccessDeniedException") .exceptionBuilderSupplier(AccessDeniedException::builder).httpStatusCode(403).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("IdempotencyException") .exceptionBuilderSupplier(IdempotencyException::builder).httpStatusCode(409).build()); } private static List resolveMetricPublishers(SdkClientConfiguration clientConfiguration, RequestOverrideConfiguration requestOverrideConfiguration) { List publishers = null; if (requestOverrideConfiguration != null) { publishers = requestOverrideConfiguration.metricPublishers(); } if (publishers == null || publishers.isEmpty()) { publishers = clientConfiguration.option(SdkClientOption.METRIC_PUBLISHERS); } if (publishers == null) { publishers = Collections.emptyList(); } return publishers; } private void updateRetryStrategyClientConfiguration(SdkClientConfiguration.Builder configuration) { ClientOverrideConfiguration.Builder builder = configuration.asOverrideConfigurationBuilder(); RetryMode retryMode = builder.retryMode(); if (retryMode != null) { configuration.option(SdkClientOption.RETRY_STRATEGY, AwsRetryStrategy.forRetryMode(retryMode)); } else { Consumer> configurator = builder.retryStrategyConfigurator(); if (configurator != null) { RetryStrategy.Builder defaultBuilder = AwsRetryStrategy.defaultRetryStrategy().toBuilder(); configurator.accept(defaultBuilder); configuration.option(SdkClientOption.RETRY_STRATEGY, defaultBuilder.build()); } else { RetryStrategy retryStrategy = builder.retryStrategy(); if (retryStrategy != null) { configuration.option(SdkClientOption.RETRY_STRATEGY, retryStrategy); } } } configuration.option(SdkClientOption.CONFIGURED_RETRY_MODE, null); configuration.option(SdkClientOption.CONFIGURED_RETRY_STRATEGY, null); configuration.option(SdkClientOption.CONFIGURED_RETRY_CONFIGURATOR, null); } private SdkClientConfiguration updateSdkClientConfiguration(SdkRequest request, SdkClientConfiguration clientConfiguration) { List plugins = request.overrideConfiguration().map(c -> c.plugins()).orElse(Collections.emptyList()); SdkClientConfiguration.Builder configuration = clientConfiguration.toBuilder(); if (plugins.isEmpty()) { return configuration.build(); } ConnectServiceClientConfigurationBuilder serviceConfigBuilder = new ConnectServiceClientConfigurationBuilder( configuration); for (SdkPlugin plugin : plugins) { plugin.configureClient(serviceConfigBuilder); } updateRetryStrategyClientConfiguration(configuration); return configuration.build(); } private HttpResponseHandler createErrorResponseHandler(BaseAwsJsonProtocolFactory protocolFactory, JsonOperationMetadata operationMetadata) { return protocolFactory.createErrorResponseHandler(operationMetadata); } @Override public void close() { clientHandler.close(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy