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

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

/*
 * 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.AwsRequestOverrideConfiguration;
import software.amazon.awssdk.awscore.client.handler.AwsAsyncClientHandler;
import software.amazon.awssdk.awscore.exception.AwsServiceException;
import software.amazon.awssdk.core.ApiName;
import software.amazon.awssdk.core.RequestOverrideConfiguration;
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.util.VersionInfo;
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.services.connect.model.AssociateApprovedOriginRequest;
import software.amazon.awssdk.services.connect.model.AssociateApprovedOriginResponse;
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.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.ConnectException;
import software.amazon.awssdk.services.connect.model.ConnectRequest;
import software.amazon.awssdk.services.connect.model.ContactFlowNotPublishedException;
import software.amazon.awssdk.services.connect.model.ContactNotFoundException;
import software.amazon.awssdk.services.connect.model.CreateContactFlowRequest;
import software.amazon.awssdk.services.connect.model.CreateContactFlowResponse;
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.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.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.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.DeleteQuickConnectRequest;
import software.amazon.awssdk.services.connect.model.DeleteQuickConnectResponse;
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.DescribeContactFlowRequest;
import software.amazon.awssdk.services.connect.model.DescribeContactFlowResponse;
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.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.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.DestinationNotAllowedException;
import software.amazon.awssdk.services.connect.model.DisassociateApprovedOriginRequest;
import software.amazon.awssdk.services.connect.model.DisassociateApprovedOriginResponse;
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.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.DuplicateResourceException;
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.GetFederationTokenRequest;
import software.amazon.awssdk.services.connect.model.GetFederationTokenResponse;
import software.amazon.awssdk.services.connect.model.GetMetricDataRequest;
import software.amazon.awssdk.services.connect.model.GetMetricDataResponse;
import software.amazon.awssdk.services.connect.model.InternalServiceException;
import software.amazon.awssdk.services.connect.model.InvalidContactFlowException;
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.ListApprovedOriginsRequest;
import software.amazon.awssdk.services.connect.model.ListApprovedOriginsResponse;
import software.amazon.awssdk.services.connect.model.ListContactFlowsRequest;
import software.amazon.awssdk.services.connect.model.ListContactFlowsResponse;
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.ListPromptsRequest;
import software.amazon.awssdk.services.connect.model.ListPromptsResponse;
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.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.ListSecurityKeysRequest;
import software.amazon.awssdk.services.connect.model.ListSecurityKeysResponse;
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.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.ListUsersRequest;
import software.amazon.awssdk.services.connect.model.ListUsersResponse;
import software.amazon.awssdk.services.connect.model.OutboundContactNotPermittedException;
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.ResumeContactRecordingRequest;
import software.amazon.awssdk.services.connect.model.ResumeContactRecordingResponse;
import software.amazon.awssdk.services.connect.model.ServiceQuotaExceededException;
import software.amazon.awssdk.services.connect.model.StartChatContactRequest;
import software.amazon.awssdk.services.connect.model.StartChatContactResponse;
import software.amazon.awssdk.services.connect.model.StartContactRecordingRequest;
import software.amazon.awssdk.services.connect.model.StartContactRecordingResponse;
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.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.SuspendContactRecordingRequest;
import software.amazon.awssdk.services.connect.model.SuspendContactRecordingResponse;
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.UntagResourceRequest;
import software.amazon.awssdk.services.connect.model.UntagResourceResponse;
import software.amazon.awssdk.services.connect.model.UpdateContactAttributesRequest;
import software.amazon.awssdk.services.connect.model.UpdateContactAttributesResponse;
import software.amazon.awssdk.services.connect.model.UpdateContactFlowContentRequest;
import software.amazon.awssdk.services.connect.model.UpdateContactFlowContentResponse;
import software.amazon.awssdk.services.connect.model.UpdateContactFlowNameRequest;
import software.amazon.awssdk.services.connect.model.UpdateContactFlowNameResponse;
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.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.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.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.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.UserNotFoundException;
import software.amazon.awssdk.services.connect.paginators.GetCurrentMetricDataPublisher;
import software.amazon.awssdk.services.connect.paginators.GetMetricDataPublisher;
import software.amazon.awssdk.services.connect.paginators.ListApprovedOriginsPublisher;
import software.amazon.awssdk.services.connect.paginators.ListContactFlowsPublisher;
import software.amazon.awssdk.services.connect.paginators.ListHoursOfOperationsPublisher;
import software.amazon.awssdk.services.connect.paginators.ListInstanceAttributesPublisher;
import software.amazon.awssdk.services.connect.paginators.ListInstanceStorageConfigsPublisher;
import software.amazon.awssdk.services.connect.paginators.ListInstancesPublisher;
import software.amazon.awssdk.services.connect.paginators.ListIntegrationAssociationsPublisher;
import software.amazon.awssdk.services.connect.paginators.ListLambdaFunctionsPublisher;
import software.amazon.awssdk.services.connect.paginators.ListLexBotsPublisher;
import software.amazon.awssdk.services.connect.paginators.ListPhoneNumbersPublisher;
import software.amazon.awssdk.services.connect.paginators.ListPromptsPublisher;
import software.amazon.awssdk.services.connect.paginators.ListQueuesPublisher;
import software.amazon.awssdk.services.connect.paginators.ListQuickConnectsPublisher;
import software.amazon.awssdk.services.connect.paginators.ListRoutingProfileQueuesPublisher;
import software.amazon.awssdk.services.connect.paginators.ListRoutingProfilesPublisher;
import software.amazon.awssdk.services.connect.paginators.ListSecurityKeysPublisher;
import software.amazon.awssdk.services.connect.paginators.ListSecurityProfilesPublisher;
import software.amazon.awssdk.services.connect.paginators.ListUseCasesPublisher;
import software.amazon.awssdk.services.connect.paginators.ListUserHierarchyGroupsPublisher;
import software.amazon.awssdk.services.connect.paginators.ListUsersPublisher;
import software.amazon.awssdk.services.connect.transform.AssociateApprovedOriginRequestMarshaller;
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.AssociateRoutingProfileQueuesRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.AssociateSecurityKeyRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.CreateContactFlowRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.CreateInstanceRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.CreateIntegrationAssociationRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.CreateQuickConnectRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.CreateRoutingProfileRequestMarshaller;
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.DeleteInstanceRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DeleteIntegrationAssociationRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DeleteQuickConnectRequestMarshaller;
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.DescribeContactFlowRequestMarshaller;
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.DescribeQuickConnectRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DescribeRoutingProfileRequestMarshaller;
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.DisassociateApprovedOriginRequestMarshaller;
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.DisassociateRoutingProfileQueuesRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.DisassociateSecurityKeyRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.GetContactAttributesRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.GetCurrentMetricDataRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.GetFederationTokenRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.GetMetricDataRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ListApprovedOriginsRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ListContactFlowsRequestMarshaller;
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.ListPromptsRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ListQueuesRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ListQuickConnectsRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ListRoutingProfileQueuesRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ListRoutingProfilesRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ListSecurityKeysRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ListSecurityProfilesRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ListTagsForResourceRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ListUseCasesRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ListUserHierarchyGroupsRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ListUsersRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.ResumeContactRecordingRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.StartChatContactRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.StartContactRecordingRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.StartOutboundVoiceContactRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.StartTaskContactRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.StopContactRecordingRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.StopContactRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.SuspendContactRecordingRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.TagResourceRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.UntagResourceRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.UpdateContactAttributesRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.UpdateContactFlowContentRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.UpdateContactFlowNameRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.UpdateInstanceAttributeRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.UpdateInstanceStorageConfigRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.UpdateQuickConnectConfigRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.UpdateQuickConnectNameRequestMarshaller;
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.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.UpdateUserRoutingProfileRequestMarshaller;
import software.amazon.awssdk.services.connect.transform.UpdateUserSecurityProfilesRequestMarshaller;
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 final AsyncClientHandler clientHandler;

    private final AwsJsonProtocolFactory protocolFactory;

    private final SdkClientConfiguration clientConfiguration;

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

    @Override
    public final String serviceName() {
        return SERVICE_NAME;
    }

    /**
     * 

* 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. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ResourceConflictException A resource already has that name.
  • *
  • InternalServiceException Request processing failed due to 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) { 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") .withMarshaller(new AssociateApprovedOriginRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(associateApprovedOriginRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = associateApprovedOriginRequest.overrideConfiguration() .orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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 Amazon 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. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ResourceConflictException A resource already has that name.
  • *
  • InternalServiceException Request processing failed due to 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) { 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") .withMarshaller(new AssociateInstanceStorageConfigRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(associateInstanceStorageConfigRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = associateInstanceStorageConfigRequest.overrideConfiguration() .orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ResourceConflictException A resource already has that name.
  • *
  • InternalServiceException Request processing failed due to 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) { 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") .withMarshaller(new AssociateLambdaFunctionRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(associateLambdaFunctionRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = associateLambdaFunctionRequest.overrideConfiguration() .orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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 bot. *

* * @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. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ResourceConflictException A resource already has that name.
  • *
  • InternalServiceException Request processing failed due to 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) { 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") .withMarshaller(new AssociateLexBotRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(associateLexBotRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = associateLexBotRequest.overrideConfiguration().orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *
    *
  • 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 due to 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) { 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") .withMarshaller(new AssociateRoutingProfileQueuesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(associateRoutingProfileQueuesRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = associateRoutingProfileQueuesRequest.overrideConfiguration() .orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • ResourceConflictException A resource already has that name.
  • *
  • InternalServiceException Request processing failed due to 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) { 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") .withMarshaller(new AssociateSecurityKeyRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(associateSecurityKeyRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = associateSecurityKeyRequest.overrideConfiguration().orElse( null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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 contact flow for the specified Amazon Connect instance. *

*

* You can also create and update contact 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidContactFlowException The contact 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 due to 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) { 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") .withMarshaller(new CreateContactFlowRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(createContactFlowRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = createContactFlowRequest.overrideConfiguration().orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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 S3, or Kinesis) or allow for any configurations on features such as Contact Lens for Amazon * Connect. *

* * @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. *
    *
  • 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 due to 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) { 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") .withMarshaller(new CreateInstanceRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(createInstanceRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = createInstanceRequest.overrideConfiguration().orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *

*

* Create an AppIntegration 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. *
    *
  • DuplicateResourceException A resource with the specified name already exists.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed due to 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) { 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") .withMarshaller(new CreateIntegrationAssociationRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(createIntegrationAssociationRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = createIntegrationAssociationRequest.overrideConfiguration() .orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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 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. *
    *
  • 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 due to 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) { 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") .withMarshaller(new CreateQuickConnectRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(createQuickConnectRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = createQuickConnectRequest.overrideConfiguration() .orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *
    *
  • 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 due to 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) { 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") .withMarshaller(new CreateRoutingProfileRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(createRoutingProfileRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = createRoutingProfileRequest.overrideConfiguration().orElse( null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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 use case for an AppIntegration 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. *
    *
  • DuplicateResourceException A resource with the specified name already exists.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed due to 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) { 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") .withMarshaller(new CreateUseCaseRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(createUseCaseRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = createUseCaseRequest.overrideConfiguration().orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *

*

* For information about how to create user accounts using the Amazon Connect console, 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. *
    *
  • 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 due to 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) { 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") .withMarshaller(new CreateUserRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(createUserRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = createUserRequest.overrideConfiguration().orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *
    *
  • 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 due to 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) { 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") .withMarshaller(new CreateUserHierarchyGroupRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(createUserHierarchyGroupRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = createUserHierarchyGroupRequest.overrideConfiguration() .orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *

* * @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. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed due to 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) { 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") .withMarshaller(new DeleteInstanceRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(deleteInstanceRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = deleteInstanceRequest.overrideConfiguration().orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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 AppIntegration 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. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed due to 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) { 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") .withMarshaller(new DeleteIntegrationAssociationRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(deleteIntegrationAssociationRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = deleteIntegrationAssociationRequest.overrideConfiguration() .orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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 a quick connect. *

* * @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. *
    *
  • 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 due to 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) { 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") .withMarshaller(new DeleteQuickConnectRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(deleteQuickConnectRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = deleteQuickConnectRequest.overrideConfiguration() .orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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 a use case from an AppIntegration 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. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed due to 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) { 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") .withMarshaller(new DeleteUseCaseRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(deleteUseCaseRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = deleteUseCaseRequest.overrideConfiguration().orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *

* * @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. *
    *
  • 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 due to 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) { 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") .withMarshaller(new DeleteUserRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(deleteUserRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = deleteUserRequest.overrideConfiguration().orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *
    *
  • 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 due to 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) { 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") .withMarshaller(new DeleteUserHierarchyGroupRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(deleteUserHierarchyGroupRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = deleteUserHierarchyGroupRequest.overrideConfiguration() .orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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 contact flow. *

*

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

* * @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. *
    *
  • 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 contact flow has not been published.
  • *
  • ThrottlingException The throttling limit has been exceeded.
  • *
  • InternalServiceException Request processing failed due to 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) { 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") .withMarshaller(new DescribeContactFlowRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(describeContactFlowRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = describeContactFlowRequest.overrideConfiguration().orElse( null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed due to 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) { 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") .withMarshaller(new DescribeInstanceRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(describeInstanceRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = describeInstanceRequest.overrideConfiguration().orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed due to 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) { 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") .withMarshaller(new DescribeInstanceAttributeRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(describeInstanceAttributeRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = describeInstanceAttributeRequest.overrideConfiguration() .orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed due to 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) { 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") .withMarshaller(new DescribeInstanceStorageConfigRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(describeInstanceStorageConfigRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = describeInstanceStorageConfigRequest.overrideConfiguration() .orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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 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. *
    *
  • 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 due to 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) { 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") .withMarshaller(new DescribeQuickConnectRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(describeQuickConnectRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = describeQuickConnectRequest.overrideConfiguration().orElse( null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *
    *
  • 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 due to 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) { 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") .withMarshaller(new DescribeRoutingProfileRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(describeRoutingProfileRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = describeRoutingProfileRequest.overrideConfiguration().orElse( null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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 account. You can find the instance ID in the 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. *
    *
  • 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 due to 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) { 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").withMarshaller(new DescribeUserRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(describeUserRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = describeUserRequest.overrideConfiguration().orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *
    *
  • 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 due to 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) { 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") .withMarshaller(new DescribeUserHierarchyGroupRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(describeUserHierarchyGroupRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = describeUserHierarchyGroupRequest.overrideConfiguration() .orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *
    *
  • 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 due to 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) { 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") .withMarshaller(new DescribeUserHierarchyStructureRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(describeUserHierarchyStructureRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = describeUserHierarchyStructureRequest.overrideConfiguration() .orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed due to 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) { 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") .withMarshaller(new DisassociateApprovedOriginRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(disassociateApprovedOriginRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = disassociateApprovedOriginRequest.overrideConfiguration() .orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed due to 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) { 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") .withMarshaller(new DisassociateInstanceStorageConfigRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(disassociateInstanceStorageConfigRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = disassociateInstanceStorageConfigRequest .overrideConfiguration().orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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 drop-down options available in the relevant contact 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. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed due to 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) { 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") .withMarshaller(new DisassociateLambdaFunctionRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(disassociateLambdaFunctionRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = disassociateLambdaFunctionRequest.overrideConfiguration() .orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed due to 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) { 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") .withMarshaller(new DisassociateLexBotRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(disassociateLexBotRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = disassociateLexBotRequest.overrideConfiguration() .orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *
    *
  • 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 due to 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) { 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") .withMarshaller(new DisassociateRoutingProfileQueuesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(disassociateRoutingProfileQueuesRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = disassociateRoutingProfileQueuesRequest .overrideConfiguration().orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed due to 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) { 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") .withMarshaller(new DisassociateSecurityKeyRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(disassociateSecurityKeyRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = disassociateSecurityKeyRequest.overrideConfiguration() .orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed due to 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) { 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") .withMarshaller(new GetContactAttributesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(getContactAttributesRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = getContactAttributesRequest.overrideConfiguration().orElse( null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • InternalServiceException Request processing failed due to 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) { 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") .withMarshaller(new GetCurrentMetricDataRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(getCurrentMetricDataRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = getCurrentMetricDataRequest.overrideConfiguration().orElse( null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *

*
*

* This is a variant of * {@link #getCurrentMetricData(software.amazon.awssdk.services.connect.model.GetCurrentMetricDataRequest)} * operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. * SDK will internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.connect.paginators.GetCurrentMetricDataPublisher publisher = client.getCurrentMetricDataPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.connect.paginators.GetCurrentMetricDataPublisher publisher = client.getCurrentMetricDataPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.connect.model.GetCurrentMetricDataResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

* Please notice that the configuration of MaxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #getCurrentMetricData(software.amazon.awssdk.services.connect.model.GetCurrentMetricDataRequest)} * operation. *

* * @param getCurrentMetricDataRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • InternalServiceException Request processing failed due to 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 */ public GetCurrentMetricDataPublisher getCurrentMetricDataPaginator(GetCurrentMetricDataRequest getCurrentMetricDataRequest) { return new GetCurrentMetricDataPublisher(this, applyPaginatorUserAgent(getCurrentMetricDataRequest)); } /** *

* Retrieves a token for federation. *

* * @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. *
    *
  • 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 due to 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) { 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") .withMarshaller(new GetFederationTokenRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(getFederationTokenRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = getFederationTokenRequest.overrideConfiguration() .orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *

* * @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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • InternalServiceException Request processing failed due to 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) { 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") .withMarshaller(new GetMetricDataRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(getMetricDataRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = getMetricDataRequest.overrideConfiguration().orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *

*
*

* This is a variant of {@link #getMetricData(software.amazon.awssdk.services.connect.model.GetMetricDataRequest)} * operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. * SDK will internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.connect.paginators.GetMetricDataPublisher publisher = client.getMetricDataPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.connect.paginators.GetMetricDataPublisher publisher = client.getMetricDataPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.connect.model.GetMetricDataResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

* Please notice that the configuration of MaxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #getMetricData(software.amazon.awssdk.services.connect.model.GetMetricDataRequest)} operation. *

* * @param getMetricDataRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • InternalServiceException Request processing failed due to 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 */ public GetMetricDataPublisher getMetricDataPaginator(GetMetricDataRequest getMetricDataRequest) { return new GetMetricDataPublisher(this, applyPaginatorUserAgent(getMetricDataRequest)); } /** *

* 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. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed due to 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) { 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") .withMarshaller(new ListApprovedOriginsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(listApprovedOriginsRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = listApprovedOriginsRequest.overrideConfiguration().orElse( null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *

*
*

* This is a variant of * {@link #listApprovedOrigins(software.amazon.awssdk.services.connect.model.ListApprovedOriginsRequest)} operation. * The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will * internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.connect.paginators.ListApprovedOriginsPublisher publisher = client.listApprovedOriginsPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.connect.paginators.ListApprovedOriginsPublisher publisher = client.listApprovedOriginsPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.connect.model.ListApprovedOriginsResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

* Please notice that the configuration of MaxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listApprovedOrigins(software.amazon.awssdk.services.connect.model.ListApprovedOriginsRequest)} * operation. *

* * @param listApprovedOriginsRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed due to 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 */ public ListApprovedOriginsPublisher listApprovedOriginsPaginator(ListApprovedOriginsRequest listApprovedOriginsRequest) { return new ListApprovedOriginsPublisher(this, applyPaginatorUserAgent(listApprovedOriginsRequest)); } /** *

* Provides information about the contact flows for the specified Amazon Connect instance. *

*

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

*

* For more information about contact flows, see Contact 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. *
    *
  • 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 due to 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) { 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") .withMarshaller(new ListContactFlowsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(listContactFlowsRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = listContactFlowsRequest.overrideConfiguration().orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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 contact flows for the specified Amazon Connect instance. *

*

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

*

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

*
*

* This is a variant of * {@link #listContactFlows(software.amazon.awssdk.services.connect.model.ListContactFlowsRequest)} operation. The * return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will * internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.connect.paginators.ListContactFlowsPublisher publisher = client.listContactFlowsPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.connect.paginators.ListContactFlowsPublisher publisher = client.listContactFlowsPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.connect.model.ListContactFlowsResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

* Please notice that the configuration of MaxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listContactFlows(software.amazon.awssdk.services.connect.model.ListContactFlowsRequest)} operation. *

* * @param listContactFlowsRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • 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 due to 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 */ public ListContactFlowsPublisher listContactFlowsPaginator(ListContactFlowsRequest listContactFlowsRequest) { return new ListContactFlowsPublisher(this, applyPaginatorUserAgent(listContactFlowsRequest)); } /** *

* 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. *
    *
  • 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 due to 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) { 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") .withMarshaller(new ListHoursOfOperationsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(listHoursOfOperationsRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = listHoursOfOperationsRequest.overrideConfiguration().orElse( null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *

*
*

* This is a variant of * {@link #listHoursOfOperations(software.amazon.awssdk.services.connect.model.ListHoursOfOperationsRequest)} * operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. * SDK will internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.connect.paginators.ListHoursOfOperationsPublisher publisher = client.listHoursOfOperationsPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.connect.paginators.ListHoursOfOperationsPublisher publisher = client.listHoursOfOperationsPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.connect.model.ListHoursOfOperationsResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

* Please notice that the configuration of MaxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listHoursOfOperations(software.amazon.awssdk.services.connect.model.ListHoursOfOperationsRequest)} * operation. *

* * @param listHoursOfOperationsRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • 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 due to 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 */ public ListHoursOfOperationsPublisher listHoursOfOperationsPaginator(ListHoursOfOperationsRequest listHoursOfOperationsRequest) { return new ListHoursOfOperationsPublisher(this, applyPaginatorUserAgent(listHoursOfOperationsRequest)); } /** *

* 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. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed due to 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) { 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") .withMarshaller(new ListInstanceAttributesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(listInstanceAttributesRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = listInstanceAttributesRequest.overrideConfiguration().orElse( null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *

*
*

* This is a variant of * {@link #listInstanceAttributes(software.amazon.awssdk.services.connect.model.ListInstanceAttributesRequest)} * operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. * SDK will internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.connect.paginators.ListInstanceAttributesPublisher publisher = client.listInstanceAttributesPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.connect.paginators.ListInstanceAttributesPublisher publisher = client.listInstanceAttributesPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.connect.model.ListInstanceAttributesResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

* Please notice that the configuration of MaxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listInstanceAttributes(software.amazon.awssdk.services.connect.model.ListInstanceAttributesRequest)} * operation. *

* * @param listInstanceAttributesRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed due to 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 */ public ListInstanceAttributesPublisher listInstanceAttributesPaginator( ListInstanceAttributesRequest listInstanceAttributesRequest) { return new ListInstanceAttributesPublisher(this, applyPaginatorUserAgent(listInstanceAttributesRequest)); } /** *

* 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. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed due to 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) { 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") .withMarshaller(new ListInstanceStorageConfigsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(listInstanceStorageConfigsRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = listInstanceStorageConfigsRequest.overrideConfiguration() .orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *

*
*

* This is a variant of * {@link #listInstanceStorageConfigs(software.amazon.awssdk.services.connect.model.ListInstanceStorageConfigsRequest)} * operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. * SDK will internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.connect.paginators.ListInstanceStorageConfigsPublisher publisher = client.listInstanceStorageConfigsPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.connect.paginators.ListInstanceStorageConfigsPublisher publisher = client.listInstanceStorageConfigsPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.connect.model.ListInstanceStorageConfigsResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

* Please notice that the configuration of MaxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listInstanceStorageConfigs(software.amazon.awssdk.services.connect.model.ListInstanceStorageConfigsRequest)} * operation. *

* * @param listInstanceStorageConfigsRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed due to 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 */ public ListInstanceStorageConfigsPublisher listInstanceStorageConfigsPaginator( ListInstanceStorageConfigsRequest listInstanceStorageConfigsRequest) { return new ListInstanceStorageConfigsPublisher(this, applyPaginatorUserAgent(listInstanceStorageConfigsRequest)); } /** *

* 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InternalServiceException Request processing failed due to 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) { 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") .withMarshaller(new ListInstancesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(listInstancesRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = listInstancesRequest.overrideConfiguration().orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *

*
*

* This is a variant of {@link #listInstances(software.amazon.awssdk.services.connect.model.ListInstancesRequest)} * operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. * SDK will internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.connect.paginators.ListInstancesPublisher publisher = client.listInstancesPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.connect.paginators.ListInstancesPublisher publisher = client.listInstancesPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.connect.model.ListInstancesResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

* Please notice that the configuration of MaxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listInstances(software.amazon.awssdk.services.connect.model.ListInstancesRequest)} operation. *

* * @param listInstancesRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InternalServiceException Request processing failed due to 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 */ public ListInstancesPublisher listInstancesPaginator(ListInstancesRequest listInstancesRequest) { return new ListInstancesPublisher(this, applyPaginatorUserAgent(listInstancesRequest)); } /** *

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

*

* Provides summary information about the AppIntegration 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. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed due to 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) { 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") .withMarshaller(new ListIntegrationAssociationsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(listIntegrationAssociationsRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = listIntegrationAssociationsRequest.overrideConfiguration() .orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *

*

* Provides summary information about the AppIntegration associations for the specified Amazon Connect instance. *

*
*

* This is a variant of * {@link #listIntegrationAssociations(software.amazon.awssdk.services.connect.model.ListIntegrationAssociationsRequest)} * operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. * SDK will internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.connect.paginators.ListIntegrationAssociationsPublisher publisher = client.listIntegrationAssociationsPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.connect.paginators.ListIntegrationAssociationsPublisher publisher = client.listIntegrationAssociationsPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.connect.model.ListIntegrationAssociationsResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

* Please notice that the configuration of MaxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listIntegrationAssociations(software.amazon.awssdk.services.connect.model.ListIntegrationAssociationsRequest)} * operation. *

* * @param listIntegrationAssociationsRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed due to 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 */ public ListIntegrationAssociationsPublisher listIntegrationAssociationsPaginator( ListIntegrationAssociationsRequest listIntegrationAssociationsRequest) { return new ListIntegrationAssociationsPublisher(this, applyPaginatorUserAgent(listIntegrationAssociationsRequest)); } /** *

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

*

* Returns a paginated list of all the Lambda functions that show up in the drop-down options in the relevant * contact 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. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed due to 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) { 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") .withMarshaller(new ListLambdaFunctionsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(listLambdaFunctionsRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = listLambdaFunctionsRequest.overrideConfiguration().orElse( null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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 Lambda functions that show up in the drop-down options in the relevant * contact flow blocks. *

*
*

* This is a variant of * {@link #listLambdaFunctions(software.amazon.awssdk.services.connect.model.ListLambdaFunctionsRequest)} operation. * The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will * internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.connect.paginators.ListLambdaFunctionsPublisher publisher = client.listLambdaFunctionsPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.connect.paginators.ListLambdaFunctionsPublisher publisher = client.listLambdaFunctionsPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.connect.model.ListLambdaFunctionsResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

* Please notice that the configuration of MaxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listLambdaFunctions(software.amazon.awssdk.services.connect.model.ListLambdaFunctionsRequest)} * operation. *

* * @param listLambdaFunctionsRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed due to 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 */ public ListLambdaFunctionsPublisher listLambdaFunctionsPaginator(ListLambdaFunctionsRequest listLambdaFunctionsRequest) { return new ListLambdaFunctionsPublisher(this, applyPaginatorUserAgent(listLambdaFunctionsRequest)); } /** *

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

*

* Returns a paginated list of all the Amazon Lex bots currently associated with the instance. *

* * @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. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed due to 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) { 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").withMarshaller(new ListLexBotsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(listLexBotsRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = listLexBotsRequest.overrideConfiguration().orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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 bots currently associated with the instance. *

*
*

* This is a variant of {@link #listLexBots(software.amazon.awssdk.services.connect.model.ListLexBotsRequest)} * operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. * SDK will internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.connect.paginators.ListLexBotsPublisher publisher = client.listLexBotsPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.connect.paginators.ListLexBotsPublisher publisher = client.listLexBotsPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.connect.model.ListLexBotsResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

* Please notice that the configuration of MaxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listLexBots(software.amazon.awssdk.services.connect.model.ListLexBotsRequest)} operation. *

* * @param listLexBotsRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed due to 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 */ public ListLexBotsPublisher listLexBotsPaginator(ListLexBotsRequest listLexBotsRequest) { return new ListLexBotsPublisher(this, applyPaginatorUserAgent(listLexBotsRequest)); } /** *

* 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. *

* * @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. *
    *
  • 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 due to 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) { 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") .withMarshaller(new ListPhoneNumbersRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(listPhoneNumbersRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = listPhoneNumbersRequest.overrideConfiguration().orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *

*
*

* This is a variant of * {@link #listPhoneNumbers(software.amazon.awssdk.services.connect.model.ListPhoneNumbersRequest)} operation. The * return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will * internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.connect.paginators.ListPhoneNumbersPublisher publisher = client.listPhoneNumbersPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.connect.paginators.ListPhoneNumbersPublisher publisher = client.listPhoneNumbersPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.connect.model.ListPhoneNumbersResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

* Please notice that the configuration of MaxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listPhoneNumbers(software.amazon.awssdk.services.connect.model.ListPhoneNumbersRequest)} operation. *

* * @param listPhoneNumbersRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • 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 due to 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 */ public ListPhoneNumbersPublisher listPhoneNumbersPaginator(ListPhoneNumbersRequest listPhoneNumbersRequest) { return new ListPhoneNumbersPublisher(this, applyPaginatorUserAgent(listPhoneNumbersRequest)); } /** *

* 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. *
    *
  • 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 due to 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) { 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").withMarshaller(new ListPromptsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(listPromptsRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = listPromptsRequest.overrideConfiguration().orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *

*
*

* This is a variant of {@link #listPrompts(software.amazon.awssdk.services.connect.model.ListPromptsRequest)} * operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. * SDK will internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.connect.paginators.ListPromptsPublisher publisher = client.listPromptsPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.connect.paginators.ListPromptsPublisher publisher = client.listPromptsPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.connect.model.ListPromptsResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

* Please notice that the configuration of MaxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listPrompts(software.amazon.awssdk.services.connect.model.ListPromptsRequest)} operation. *

* * @param listPromptsRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • 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 due to 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 */ public ListPromptsPublisher listPromptsPaginator(ListPromptsRequest listPromptsRequest) { return new ListPromptsPublisher(this, applyPaginatorUserAgent(listPromptsRequest)); } /** *

* Provides information about the queues for the specified Amazon Connect instance. *

*

* 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. *
    *
  • 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 due to 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) { 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") .withMarshaller(new ListQueuesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(listQueuesRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = listQueuesRequest.overrideConfiguration().orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *

*

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

*
*

* This is a variant of {@link #listQueues(software.amazon.awssdk.services.connect.model.ListQueuesRequest)} * operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. * SDK will internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.connect.paginators.ListQueuesPublisher publisher = client.listQueuesPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.connect.paginators.ListQueuesPublisher publisher = client.listQueuesPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.connect.model.ListQueuesResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

* Please notice that the configuration of MaxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listQueues(software.amazon.awssdk.services.connect.model.ListQueuesRequest)} operation. *

* * @param listQueuesRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • 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 due to 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 */ public ListQueuesPublisher listQueuesPaginator(ListQueuesRequest listQueuesRequest) { return new ListQueuesPublisher(this, applyPaginatorUserAgent(listQueuesRequest)); } /** *

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

*

* 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. *
    *
  • 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 due to 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) { 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") .withMarshaller(new ListQuickConnectsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(listQuickConnectsRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = listQuickConnectsRequest.overrideConfiguration().orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *

*

* Provides information about the quick connects for the specified Amazon Connect instance. *

*
*

* This is a variant of * {@link #listQuickConnects(software.amazon.awssdk.services.connect.model.ListQuickConnectsRequest)} operation. The * return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will * internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.connect.paginators.ListQuickConnectsPublisher publisher = client.listQuickConnectsPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.connect.paginators.ListQuickConnectsPublisher publisher = client.listQuickConnectsPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.connect.model.ListQuickConnectsResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

* Please notice that the configuration of MaxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listQuickConnects(software.amazon.awssdk.services.connect.model.ListQuickConnectsRequest)} operation. *

* * @param listQuickConnectsRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • 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 due to 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 */ public ListQuickConnectsPublisher listQuickConnectsPaginator(ListQuickConnectsRequest listQuickConnectsRequest) { return new ListQuickConnectsPublisher(this, applyPaginatorUserAgent(listQuickConnectsRequest)); } /** *

* List 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. *
    *
  • 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 due to 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) { 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") .withMarshaller(new ListRoutingProfileQueuesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(listRoutingProfileQueuesRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = listRoutingProfileQueuesRequest.overrideConfiguration() .orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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 queues associated with a routing profile. *

*
*

* This is a variant of * {@link #listRoutingProfileQueues(software.amazon.awssdk.services.connect.model.ListRoutingProfileQueuesRequest)} * operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. * SDK will internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.connect.paginators.ListRoutingProfileQueuesPublisher publisher = client.listRoutingProfileQueuesPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.connect.paginators.ListRoutingProfileQueuesPublisher publisher = client.listRoutingProfileQueuesPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.connect.model.ListRoutingProfileQueuesResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

* Please notice that the configuration of MaxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listRoutingProfileQueues(software.amazon.awssdk.services.connect.model.ListRoutingProfileQueuesRequest)} * operation. *

* * @param listRoutingProfileQueuesRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • 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 due to 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 */ public ListRoutingProfileQueuesPublisher listRoutingProfileQueuesPaginator( ListRoutingProfileQueuesRequest listRoutingProfileQueuesRequest) { return new ListRoutingProfileQueuesPublisher(this, applyPaginatorUserAgent(listRoutingProfileQueuesRequest)); } /** *

* 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. *
    *
  • 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 due to 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) { 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") .withMarshaller(new ListRoutingProfilesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(listRoutingProfilesRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = listRoutingProfilesRequest.overrideConfiguration().orElse( null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *

*
*

* This is a variant of * {@link #listRoutingProfiles(software.amazon.awssdk.services.connect.model.ListRoutingProfilesRequest)} operation. * The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will * internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.connect.paginators.ListRoutingProfilesPublisher publisher = client.listRoutingProfilesPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.connect.paginators.ListRoutingProfilesPublisher publisher = client.listRoutingProfilesPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.connect.model.ListRoutingProfilesResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

* Please notice that the configuration of MaxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listRoutingProfiles(software.amazon.awssdk.services.connect.model.ListRoutingProfilesRequest)} * operation. *

* * @param listRoutingProfilesRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • 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 due to 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 */ public ListRoutingProfilesPublisher listRoutingProfilesPaginator(ListRoutingProfilesRequest listRoutingProfilesRequest) { return new ListRoutingProfilesPublisher(this, applyPaginatorUserAgent(listRoutingProfilesRequest)); } /** *

* 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. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed due to 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) { 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") .withMarshaller(new ListSecurityKeysRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(listSecurityKeysRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = listSecurityKeysRequest.overrideConfiguration().orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *

*
*

* This is a variant of * {@link #listSecurityKeys(software.amazon.awssdk.services.connect.model.ListSecurityKeysRequest)} operation. The * return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will * internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.connect.paginators.ListSecurityKeysPublisher publisher = client.listSecurityKeysPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.connect.paginators.ListSecurityKeysPublisher publisher = client.listSecurityKeysPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.connect.model.ListSecurityKeysResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

* Please notice that the configuration of MaxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listSecurityKeys(software.amazon.awssdk.services.connect.model.ListSecurityKeysRequest)} operation. *

* * @param listSecurityKeysRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed due to 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 */ public ListSecurityKeysPublisher listSecurityKeysPaginator(ListSecurityKeysRequest listSecurityKeysRequest) { return new ListSecurityKeysPublisher(this, applyPaginatorUserAgent(listSecurityKeysRequest)); } /** *

* 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. *

* * @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. *
    *
  • 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 due to 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) { 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") .withMarshaller(new ListSecurityProfilesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(listSecurityProfilesRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = listSecurityProfilesRequest.overrideConfiguration().orElse( null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *

*
*

* This is a variant of * {@link #listSecurityProfiles(software.amazon.awssdk.services.connect.model.ListSecurityProfilesRequest)} * operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. * SDK will internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.connect.paginators.ListSecurityProfilesPublisher publisher = client.listSecurityProfilesPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.connect.paginators.ListSecurityProfilesPublisher publisher = client.listSecurityProfilesPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.connect.model.ListSecurityProfilesResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

* Please notice that the configuration of MaxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listSecurityProfiles(software.amazon.awssdk.services.connect.model.ListSecurityProfilesRequest)} * operation. *

* * @param listSecurityProfilesRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • 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 due to 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 */ public ListSecurityProfilesPublisher listSecurityProfilesPaginator(ListSecurityProfilesRequest listSecurityProfilesRequest) { return new ListSecurityProfilesPublisher(this, applyPaginatorUserAgent(listSecurityProfilesRequest)); } /** *

* 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • InternalServiceException Request processing failed due to 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) { 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") .withMarshaller(new ListTagsForResourceRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(listTagsForResourceRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = listTagsForResourceRequest.overrideConfiguration().orElse( null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *

*

* List the use cases. *

* * @param listUseCasesRequest * Provides summary information about the use cases for the specified Amazon Connect AppIntegration * 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. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed due to 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) { 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").withMarshaller(new ListUseCasesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(listUseCasesRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = listUseCasesRequest.overrideConfiguration().orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *

*

* List the use cases. *

*
*

* This is a variant of {@link #listUseCases(software.amazon.awssdk.services.connect.model.ListUseCasesRequest)} * operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. * SDK will internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.connect.paginators.ListUseCasesPublisher publisher = client.listUseCasesPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.connect.paginators.ListUseCasesPublisher publisher = client.listUseCasesPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.connect.model.ListUseCasesResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

* Please notice that the configuration of MaxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listUseCases(software.amazon.awssdk.services.connect.model.ListUseCasesRequest)} operation. *

* * @param listUseCasesRequest * Provides summary information about the use cases for the specified Amazon Connect AppIntegration * association. * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed due to 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 */ public ListUseCasesPublisher listUseCasesPaginator(ListUseCasesRequest listUseCasesRequest) { return new ListUseCasesPublisher(this, applyPaginatorUserAgent(listUseCasesRequest)); } /** *

* 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. *
    *
  • 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 due to 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) { 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") .withMarshaller(new ListUserHierarchyGroupsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(listUserHierarchyGroupsRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = listUserHierarchyGroupsRequest.overrideConfiguration() .orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *

*
*

* This is a variant of * {@link #listUserHierarchyGroups(software.amazon.awssdk.services.connect.model.ListUserHierarchyGroupsRequest)} * operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. * SDK will internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.connect.paginators.ListUserHierarchyGroupsPublisher publisher = client.listUserHierarchyGroupsPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.connect.paginators.ListUserHierarchyGroupsPublisher publisher = client.listUserHierarchyGroupsPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.connect.model.ListUserHierarchyGroupsResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

* Please notice that the configuration of MaxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listUserHierarchyGroups(software.amazon.awssdk.services.connect.model.ListUserHierarchyGroupsRequest)} * operation. *

* * @param listUserHierarchyGroupsRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • 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 due to 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 */ public ListUserHierarchyGroupsPublisher listUserHierarchyGroupsPaginator( ListUserHierarchyGroupsRequest listUserHierarchyGroupsRequest) { return new ListUserHierarchyGroupsPublisher(this, applyPaginatorUserAgent(listUserHierarchyGroupsRequest)); } /** *

* 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. *
    *
  • 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 due to 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) { 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") .withMarshaller(new ListUsersRequestMarshaller(protocolFactory)).withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withMetricCollector(apiCallMetricCollector) .withInput(listUsersRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = listUsersRequest.overrideConfiguration().orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *

*
*

* This is a variant of {@link #listUsers(software.amazon.awssdk.services.connect.model.ListUsersRequest)} * operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. * SDK will internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.connect.paginators.ListUsersPublisher publisher = client.listUsersPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.connect.paginators.ListUsersPublisher publisher = client.listUsersPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.connect.model.ListUsersResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

* Please notice that the configuration of MaxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listUsers(software.amazon.awssdk.services.connect.model.ListUsersRequest)} operation. *

* * @param listUsersRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • 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 due to 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 */ public ListUsersPublisher listUsersPaginator(ListUsersRequest listUsersRequest) { return new ListUsersPublisher(this, applyPaginatorUserAgent(listUsersRequest)); } /** *

* When a contact is being recorded, and the recording has been suspended using SuspendContactRecording, this API * resumes recording the call. *

*

* Only voice recordings are supported at this time. *

* * @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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed due to 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) { 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") .withMarshaller(new ResumeContactRecordingRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(resumeContactRecordingRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = resumeContactRecordingRequest.overrideConfiguration().orElse( null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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 contact 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 need to 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 two situations: *

*
    *
  • *

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

    *
  • *
  • *

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

    *
  • *
*

* For more information about how chat works, see Chat 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. *
    *
  • 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 due to 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) { 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") .withMarshaller(new StartChatContactRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(startChatContactRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = startChatContactRequest.overrideConfiguration().orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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 starts recording the contact when the agent joins the 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. *
    *
  • 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 due to 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) { 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") .withMarshaller(new StartContactRecordingRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(startContactRecordingRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = startContactRecordingRequest.overrideConfiguration().orElse( null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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 places an outbound call to a contact, and then initiates the contact flow. It performs the actions in * the contact flow that's specified (in ContactFlowId). *

*

* Agents are not involved in initiating the outbound API (that is, dialing the contact). If the contact flow places * an outbound call to a contact, and then puts the contact in queue, that's when the call is 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. *

*
* * @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. *
    *
  • 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 due to 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) { 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") .withMarshaller(new StartOutboundVoiceContactRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(startOutboundVoiceContactRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = startOutboundVoiceContactRequest.overrideConfiguration() .orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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 contact flow to start a new task. *

* * @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. *
    *
  • 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 due to 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) { 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") .withMarshaller(new StartTaskContactRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(startTaskContactRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = startTaskContactRequest.overrideConfiguration().orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *

* * @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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • ContactNotFoundException The contact with the specified ID is not active or does not exist.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed due to 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) { 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").withMarshaller(new StopContactRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(stopContactRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = stopContactRequest.overrideConfiguration().orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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 stops recording the call. 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed due to 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) { 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") .withMarshaller(new StopContactRecordingRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(stopContactRecordingRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = stopContactRecordingRequest.overrideConfiguration().orElse( null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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 the call. For example, you might suspend the call * recording while collecting sensitive information, such as a credit card number. Then use ResumeContactRecording * to restart recording. *

*

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

*

* Only voice recordings are supported at this time. *

* * @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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed due to 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) { 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") .withMarshaller(new SuspendContactRecordingRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(suspendContactRecordingRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = suspendContactRecordingRequest.overrideConfiguration() .orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *

*

* The supported resource types are users, routing profiles, quick connects, and contact flows. *

*

* 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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • InternalServiceException Request processing failed due to 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) { 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").withMarshaller(new TagResourceRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(tagResourceRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = tagResourceRequest.overrideConfiguration().orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidParameterException One or more of the specified parameters are not valid.
  • *
  • InternalServiceException Request processing failed due to 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) { 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") .withMarshaller(new UntagResourceRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(untagResourceRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = untagResourceRequest.overrideConfiguration().orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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 the contact attributes associated with the specified contact. *

*

* You can add or update attributes for both ongoing and completed contacts. For example, you can update the * customer's name or the reason the customer called while the call is active, or add notes about steps that the * agent took during the call that are displayed 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 identifying abusive callers. *

*

* Contact attributes are available in Amazon Connect for 24 months, and are then deleted. *

*

* Important: You cannot use the operation to update attributes for contacts that occurred prior to the * release of the API, September 12, 2018. You can update attributes only for contacts that started after the * release of the API. If you attempt to update attributes for a contact that occurred prior to the release of the * API, a 400 error is returned. This applies also to queued callbacks that were initiated prior to the release of * the API but are still active in your instance. *

* * @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. *
    *
  • 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 due to 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) { 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") .withMarshaller(new UpdateContactAttributesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(updateContactAttributesRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = updateContactAttributesRequest.overrideConfiguration() .orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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 contact flow. *

*

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

* * @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. *
    *
  • InvalidRequestException The request is not valid.
  • *
  • InvalidContactFlowException The contact 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 due to 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) { 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") .withMarshaller(new UpdateContactFlowContentRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(updateContactFlowContentRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = updateContactFlowContentRequest.overrideConfiguration() .orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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 contact flow. *

*

* You can also create and update contact 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. *
    *
  • 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 due to 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) { 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") .withMarshaller(new UpdateContactFlowNameRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(updateContactFlowNameRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = updateContactFlowNameRequest.overrideConfiguration().orElse( null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed due to 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) { 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") .withMarshaller(new UpdateInstanceAttributeRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(updateInstanceAttributeRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = updateInstanceAttributeRequest.overrideConfiguration() .orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *
    *
  • ResourceNotFoundException The specified resource was not found.
  • *
  • InternalServiceException Request processing failed due to 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) { 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") .withMarshaller(new UpdateInstanceStorageConfigRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(updateInstanceStorageConfigRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = updateInstanceStorageConfigRequest.overrideConfiguration() .orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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 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. *
    *
  • 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 due to 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) { 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") .withMarshaller(new UpdateQuickConnectConfigRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(updateQuickConnectConfigRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = updateQuickConnectConfigRequest.overrideConfiguration() .orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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 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. *
    *
  • 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 due to 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) { 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") .withMarshaller(new UpdateQuickConnectNameRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(updateQuickConnectNameRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = updateQuickConnectNameRequest.overrideConfiguration().orElse( null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *
    *
  • 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 due to 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) { 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") .withMarshaller(new UpdateRoutingProfileConcurrencyRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(updateRoutingProfileConcurrencyRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = updateRoutingProfileConcurrencyRequest .overrideConfiguration().orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *
    *
  • 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 due to 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) { 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") .withMarshaller(new UpdateRoutingProfileDefaultOutboundQueueRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector) .withInput(updateRoutingProfileDefaultOutboundQueueRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = updateRoutingProfileDefaultOutboundQueueRequest .overrideConfiguration().orElse(null); CompletableFuture whenCompleted = executeFuture .whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *
    *
  • 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 due to 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) { 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") .withMarshaller(new UpdateRoutingProfileNameRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(updateRoutingProfileNameRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = updateRoutingProfileNameRequest.overrideConfiguration() .orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *
    *
  • 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 due to 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) { 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") .withMarshaller(new UpdateRoutingProfileQueuesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(updateRoutingProfileQueuesRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = updateRoutingProfileQueuesRequest.overrideConfiguration() .orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *
    *
  • 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 due to 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) { 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") .withMarshaller(new UpdateUserHierarchyRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(updateUserHierarchyRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = updateUserHierarchyRequest.overrideConfiguration().orElse( null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *
    *
  • 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 due to 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) { 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") .withMarshaller(new UpdateUserHierarchyGroupNameRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(updateUserHierarchyGroupNameRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = updateUserHierarchyGroupNameRequest.overrideConfiguration() .orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *
    *
  • 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 due to 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) { 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") .withMarshaller(new UpdateUserHierarchyStructureRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(updateUserHierarchyStructureRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = updateUserHierarchyStructureRequest.overrideConfiguration() .orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *

* *

* Someone with the ability to invoke UpdateUserIndentityInfo 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. We strongly * recommend limiting who has the ability to invoke UpdateUserIndentityInfo. 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. *
    *
  • 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 due to 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) { 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") .withMarshaller(new UpdateUserIdentityInfoRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(updateUserIdentityInfoRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = updateUserIdentityInfoRequest.overrideConfiguration().orElse( null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *
    *
  • 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 due to 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) { 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") .withMarshaller(new UpdateUserPhoneConfigRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(updateUserPhoneConfigRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = updateUserPhoneConfigRequest.overrideConfiguration().orElse( null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *
    *
  • 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 due to 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) { 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") .withMarshaller(new UpdateUserRoutingProfileRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(updateUserRoutingProfileRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = updateUserRoutingProfileRequest.overrideConfiguration() .orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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. *
    *
  • 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 due to 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) { 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") .withMarshaller(new UpdateUserSecurityProfilesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(updateUserSecurityProfilesRequest)); AwsRequestOverrideConfiguration requestOverrideConfig = updateUserSecurityProfilesRequest.overrideConfiguration() .orElse(null); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.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 void close() { clientHandler.close(); } private > T init(T builder) { return builder .clientConfiguration(clientConfiguration) .defaultServiceExceptionSupplier(ConnectException::builder) .protocol(AwsJsonProtocol.REST_JSON) .protocolVersion("1.1") .registerModeledException( ExceptionMetadata.builder().errorCode("OutboundContactNotPermittedException") .exceptionBuilderSupplier(OutboundContactNotPermittedException::builder).httpStatusCode(403) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidRequestException") .exceptionBuilderSupplier(InvalidRequestException::builder).httpStatusCode(400).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("DuplicateResourceException") .exceptionBuilderSupplier(DuplicateResourceException::builder).httpStatusCode(409).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("ResourceNotFoundException") .exceptionBuilderSupplier(ResourceNotFoundException::builder).httpStatusCode(404).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("DestinationNotAllowedException") .exceptionBuilderSupplier(DestinationNotAllowedException::builder).httpStatusCode(403).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("InternalServiceException") .exceptionBuilderSupplier(InternalServiceException::builder).httpStatusCode(500).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidParameterException") .exceptionBuilderSupplier(InvalidParameterException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ResourceInUseException") .exceptionBuilderSupplier(ResourceInUseException::builder).httpStatusCode(409).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ThrottlingException") .exceptionBuilderSupplier(ThrottlingException::builder).httpStatusCode(429).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ContactNotFoundException") .exceptionBuilderSupplier(ContactNotFoundException::builder).httpStatusCode(410).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 T applyPaginatorUserAgent(T request) { Consumer userAgentApplier = b -> b.addApiName(ApiName.builder() .version(VersionInfo.SDK_VERSION).name("PAGINATED").build()); AwsRequestOverrideConfiguration overrideConfiguration = request.overrideConfiguration() .map(c -> c.toBuilder().applyMutation(userAgentApplier).build()) .orElse((AwsRequestOverrideConfiguration.builder().applyMutation(userAgentApplier).build())); return (T) request.toBuilder().overrideConfiguration(overrideConfiguration).build(); } private HttpResponseHandler createErrorResponseHandler(BaseAwsJsonProtocolFactory protocolFactory, JsonOperationMetadata operationMetadata) { return protocolFactory.createErrorResponseHandler(operationMetadata); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy