Skip to main content

instances

Creates, updates, deletes, gets or lists an instances resource.

Overview

Nameinstances
TypeResource
Idaws.connect.instances

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
instanceobjectThe name of the instance.
replication_configurationobjectStatus information about the replication process. This field is included only when you are using the ReplicateInstance API to replicate an Connect Customer instance across Amazon Web Services Regions. For information about replicating Connect Customer instances, see Create a replica of your existing Connect Customer instance in the Connect Customer Administrator Guide.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_instanceselectinstance_id, regionThis API is in preview release for Connect Customer 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.
list_instancesselectregionnextToken, maxResultsThis API is in preview release for Connect Customer 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.
create_push_notification_registrationinsertinstance_id, region, PinpointAppArn, DeviceToken, DeviceType, ContactConfigurationCreates registration for a device token and a chat contact to receive real-time push notifications. For more information about push notifications, see Set up push notifications in Connect Customer for mobile chat in the Connect Customer Administrator Guide.
create_persistent_contact_associationinsertinstance_id, initial_contact_id, region, RehydrationType, SourceContactIdEnables rehydration of chats for the lifespan of a contact. For more information about chat rehydration, see Enable persistent chat in the Connect Customer Administrator Guide.
create_auth_codeinsertinstance_id, region, Scope, SessionInactivityDurationMinutesCreates an authorization code for the specified Connect Customer instance. The authorization code can be used to establish a session with scoped permissions defined by the specified scope parameters.
create_instanceinsertregion, IdentityManagementType, InboundCallsEnabled, OutboundCallsEnabledThis API is in preview release for Connect Customer and is subject to change. Initiates an Connect Customer instance with all the supported channels enabled. It does not attach any storage, such as Amazon Simple Storage Service (Amazon S3) or Amazon Kinesis. It also does not allow for any configurations on features, such as Contact Lens for Connect Customer. For more information, see Create an Connect Customer instance in the Connect Customer Administrator Guide. Connect Customer enforces a limit on the total number of instances that you can create or delete in 30 days. If you exceed this limit, you will get an error message indicating there has been an excessive number of attempts at creating or deleting instances. You must wait 30 days before you can restart creating and deleting instances in your account.
create_participantinsertregion, InstanceId, ContactId, ParticipantDetailsAdds a new participant into an on-going chat contact or webRTC call. For more information, see Customize chat flow experiences by integrating custom participants or Enable multi-user web, in-app, and video calling.
associate_flowupdateinstance_id, region, ResourceId, FlowId, ResourceTypeAssociates a connect resource to a flow.
disassociate_flowupdateinstance_id, resource_id, resource_type, regionDisassociates a connect resource from a flow.
update_participant_role_configupdateinstance_id, contact_id, region, ChannelConfigurationUpdates timeouts for when human chat participants are to be considered idle, and when agents are automatically disconnected from a chat due to idleness. You can set four timers: Customer idle timeout Customer auto-disconnect timeout Agent idle timeout Agent auto-disconnect timeout For more information about how chat timeouts work, see Set up chat timeouts for human participants.
associate_analytics_data_setupdateinstance_id, region, DataSetIdAssociates the specified dataset for a Connect Customer instance with the target account. You can associate only one dataset in a single call.
update_participant_authenticationupdateregion, State, InstanceIdInstructs Connect Customer to resume the authentication process. The subsequent actions depend on the request body contents: If a code is provided: Connect retrieves the identity information from Amazon Cognito and imports it into Connect Customer Profiles. If an error is provided: The error branch of the Authenticate Customer block is executed. The API returns a success response to acknowledge the request. However, the interaction and exchange of identity information occur asynchronously after the response is returned.
delete_push_notification_registrationdeleteinstance_id, registration_id, regioncontactIdDeletes registration for a device token and a chat contact.
delete_sessiondeleteinstance_id, session_id, regionDeletes a session for the specified Connect Customer instance.
delete_instancedeleteinstance_id, regionclientTokenThis API is in preview release for Connect Customer and is subject to change. Deletes the Connect Customer instance. For more information, see Delete your Connect Customer instance in the Connect Customer Administrator Guide. Connect Customer enforces a limit on the total number of instances that you can create or delete in 30 days. If you exceed this limit, you will get an error message indicating there has been an excessive number of attempts at creating or deleting instances. You must wait 30 days before you can restart creating and deleting instances in your account.
disassociate_analytics_data_setexecinstance_id, region, DataSetIdRemoves the dataset ID associated with a given Connect Customer instance.
batch_associate_analytics_data_setexecinstance_id, region, DataSetIdsAssociates a list of analytics datasets for a given Connect Customer instance to a target account. You can associate multiple datasets in a single call.
batch_disassociate_analytics_data_setexecinstance_id, region, DataSetIdsRemoves a list of analytics datasets associated with a given Connect Customer instance. You can disassociate multiple datasets in a single call.
batch_put_contactexecinstance_id, region, ContactDataRequestListOnly the Connect Customer outbound campaigns service principal is allowed to assume a role in your account and call this API. Allows you to create a batch of contacts in Connect Customer. The outbound campaigns capability ingests dial requests via the PutDialRequestBatch API. It then uses BatchPutContact to create contacts corresponding to those dial requests. If agents are available, the dial requests are dialed out, which results in a voice call. The resulting voice call uses the same contactId that was created by BatchPutContact.
complete_attached_file_uploadexecinstance_id, file_id, associatedResourceArn, regionAllows you to confirm that the attached file has been uploaded using the pre-signed URL provided in the StartAttachedFileUpload API.
dismiss_user_contactexecuser_id, instance_id, region, ContactIdDismisses contacts from an agent’s CCP and returns the agent to an available state, which allows the agent to receive a new routed contact. Contacts can only be dismissed if they are in a MISSED, ERROR, ENDED, or REJECTED state in the Agent Event Stream.
import_phone_numberexecregion, InstanceId, SourcePhoneNumberArnImports a claimed phone number from an external service, such as Amazon Web Services End User Messaging, into an Connect Customer instance. You can call this API only in the same Amazon Web Services Region where the Connect Customer instance was created. Call the DescribePhoneNumber API to verify the status of a previous ImportPhoneNumber operation. If you plan to claim or import numbers and then release numbers frequently, contact us for a service quota exception. Otherwise, it is possible you will be blocked from claiming and releasing any more numbers until up to 180 days past the oldest number released has expired. By default you can claim or import and then release up to 200% of your maximum number of active phone numbers. If you claim or import and then release phone numbers using the UI or API during a rolling 180 day cycle that exceeds 200% of your phone number service level quota, you will be blocked from claiming or importing any more numbers until 180 days past the oldest number released has expired. For example, if you already have 99 claimed or imported numbers and a service level quota of 99 phone numbers, and in any 180 day period you release 99, claim 99, and then release 99, you will have exceeded the 200% limit. At that point you are blocked from claiming any more numbers until you open an Amazon Web Services Support ticket.
monitor_contactexecregion, InstanceId, ContactId, UserIdInitiates silent monitoring of a contact. The Contact Control Panel (CCP) of the user specified by userId will be set to silent monitoring mode on the contact.
pause_contactexecregion, ContactId, InstanceIdAllows pausing an ongoing task contact.
replicate_instanceexecinstance_id, region, ReplicaRegion, ReplicaAliasReplicates an Connect Customer instance in the specified Amazon Web Services Region and copies configuration information for Connect Customer resources across Amazon Web Services Regions. For more information about replicating an Connect Customer instance, see Create a replica of your existing Connect Customer instance in the Connect Customer Administrator Guide.
resume_contactexecregion, ContactId, InstanceIdAllows resuming a task contact in a paused state.
send_outbound_emailexecinstance_id, region, FromEmailAddress, DestinationEmailAddress, EmailMessage, TrafficTypeSend outbound email for outbound campaigns. For more information about outbound campaigns, see Set up Connect Customer outbound campaigns. Only the Connect Customer outbound campaigns service principal is allowed to assume a role in your account and call this API.
send_outbound_web_notificationexecinstance_id, region, BrowserId, SessionId, ExpiresAt, Source, Destination, ContentSends an outbound web notification to a customer's web browser for outbound campaigns. For more information about outbound campaigns, see Set up Connect Customer outbound campaigns. Only the Connect Customer outbound campaigns service principal is allowed to assume a role in your account and call this API.
start_assistant_contactexecregion, InstanceId, AiAgent, ParticipantDetailsStarts a chat contact with an AI agent. Use the returned ParticipantToken with the CreateParticipantConnection operation. For more information about chat, see the following topics in the Connect Customer Administrator Guide: Concepts: Web and mobile messaging capabilities in Connect Customer Connect Customer Chat security best practices
start_email_contactexecregion, InstanceId, FromEmailAddress, DestinationEmailAddress, EmailMessageCreates an inbound email contact and initiates a flow to start the email contact for the customer. Response of this API provides the ContactId of the email contact created.
start_outbound_email_contactexecregion, InstanceId, ContactId, DestinationEmailAddress, EmailMessageInitiates a flow to send an agent reply or outbound email contact (created from the CreateContact API) to a customer.
start_screen_sharingexecregion, InstanceId, ContactIdStarts screen sharing for a contact. For more information about screen sharing, see Set up in-app, web, video calling, and screen sharing capabilities in the Connect Customer Administrator Guide.
start_task_contactexecregion, InstanceId, NameInitiates a flow to start a new task contact. For more information about task contacts, see Concepts: Tasks in Connect Customer in the Connect Customer Administrator Guide. When using PreviousContactId and RelatedContactId input parameters, note the following: PreviousContactId Any updates to user-defined task contact attributes on any contact linked through the same PreviousContactId will affect every contact in the chain. There can be a maximum of 12 linked task contacts in a chain. That is, 12 task contacts can be created that share the same PreviousContactId. RelatedContactId Copies contact attributes from the related task contact to the new contact. Any update on attributes in a new task contact does not update attributes on previous contact. There’s no limit on the number of task contacts that can be created that use the same RelatedContactId. In addition, when calling StartTaskContact include only one of these parameters: ContactFlowID, QuickConnectID, or TaskTemplateID. Only one parameter is required as long as the task template has a flow configured to run it. If more than one parameter is specified, or only the TaskTemplateID is specified but it does not have a flow configured, the request returns an error because Connect Customer cannot identify the unique flow to run when the task is created. A ServiceQuotaExceededException occurs when the number of open tasks exceeds the active tasks quota or there are already 12 tasks referencing the same PreviousContactId. For more information about service quotas for task contacts, see Connect Customer service quotas in the Connect Customer Administrator Guide.
stop_contactexecregion, ContactId, InstanceIdEnds the specified contact. Use this API to stop queued callbacks. It does not work for voice contacts that use the following initiation methods: DISCONNECT TRANSFER QUEUE_TRANSFER EXTERNAL_OUTBOUND MONITOR Chat and task contacts can be terminated in any state, regardless of initiation method.
suspend_contact_recordingexecregion, InstanceId, ContactId, InitialContactIdWhen a contact is being recorded, this API suspends recording whatever is selected in the flow configuration: call (IVR or agent), screen, or both. If only call recording or only screen recording is enabled, then it would be suspended. For example, you might suspend the screen recording while collecting sensitive information, such as a credit card number. Then use ResumeContactRecording to restart recording the screen. The period of time that the recording is suspended is filled with silence in the final recording. Voice (IVR, agent) and screen recordings are supported.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
associatedResourceArnstringThe resource to which the attached file is (being) uploaded to. The supported resources are Cases, Email, and Task. This value must be a valid ARN.
contact_idstringThe identifier of the contact in this instance of Connect Customer.
file_idstringThe unique identifier of the attached file resource.
initial_contact_idstringThis is the contactId of the current contact that the CreatePersistentContactAssociation API is being called from.
instance_idstringThe identifier of the Connect Customer instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.
regionstringAWS region (default: us-east-1)
registration_idstringThe identifier for the registration.
resource_idstringThe identifier of the resource. Amazon Web Services End User Messaging SMS phone number ARN when using SMS_PHONE_NUMBER Amazon Web Services End User Messaging Social phone number ARN when using WHATSAPP_MESSAGING_PHONE_NUMBER
resource_typestringA valid resource type.
session_idstringThe identifier of the session to delete.
user_idstringThe identifier of the user account.
clientTokenstringA unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs.
contactIdstringThe identifier of the contact within the Connect Customer instance.
maxResultsintegerThe maximum number of results to return per page.
nextTokenstringThe token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

SELECT examples

This API is in preview release for Connect Customer 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.

SELECT
instance,
replication_configuration
FROM aws.connect.instances
WHERE instance_id = '{{ instance_id }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates registration for a device token and a chat contact to receive real-time push notifications. For more information about push notifications, see Set up push notifications in Connect Customer for mobile chat in the Connect Customer Administrator Guide.

INSERT INTO aws.connect.instances (
ClientToken,
PinpointAppArn,
DeviceToken,
DeviceType,
ContactConfiguration,
instance_id,
region
)
SELECT
'{{ ClientToken }}',
'{{ PinpointAppArn }}' /* required */,
'{{ DeviceToken }}' /* required */,
'{{ DeviceType }}' /* required */,
'{{ ContactConfiguration }}' /* required */,
'{{ instance_id }}',
'{{ region }}'
RETURNING
registration_id
;

UPDATE examples

Associates a connect resource to a flow.

UPDATE aws.connect.instances
SET
ResourceId = '{{ ResourceId }}',
FlowId = '{{ FlowId }}',
ResourceType = '{{ ResourceType }}'
WHERE
instance_id = '{{ instance_id }}' --required
AND region = '{{ region }}' --required
AND ResourceId = '{{ ResourceId }}' --required
AND FlowId = '{{ FlowId }}' --required
AND ResourceType = '{{ ResourceType }}' --required;

DELETE examples

Deletes registration for a device token and a chat contact.

DELETE FROM aws.connect.instances
WHERE instance_id = '{{ instance_id }}' --required
AND registration_id = '{{ registration_id }}' --required
AND region = '{{ region }}' --required
AND contactId = '{{ contactId }}'
;

Lifecycle Methods

Removes the dataset ID associated with a given Connect Customer instance.

EXEC aws.connect.instances.disassociate_analytics_data_set
@instance_id='{{ instance_id }}' --required,
@region='{{ region }}' --required
@@json=
'{
"DataSetId": "{{ DataSetId }}",
"TargetAccountId": "{{ TargetAccountId }}"
}'
;