Only 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.
Parameters:
Raises:
Source code in docs_src/capo_connect/_services/async_connect.py
| async def batch_put_contact(
self,
instance_id: "capo_connect.types.instance_id.InstanceId",
contact_data_request_list: "capo_connect.types.contact_data_request_list.ContactDataRequestList",
*,
config_overrides: Optional[AsyncConnectClientConfig] = None,
client_token: Optional["capo_connect.types.client_token.ClientToken"] = None,
) -> "capo_connect.types.batch_put_contact_response.BatchPutContactResponse":
"""<note> <p>Only the Connect Customer outbound campaigns service principal is allowed to assume a role in your account and call this API.</p> </note> <p>Allows you to create a batch of contacts in Connect Customer. The outbound campaigns capability ingests dial requests via the <a href="https://docs.aws.amazon.com/connect-outbound/latest/APIReference/API_PutDialRequestBatch.html">PutDialRequestBatch</a> 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. </p>
Args:
client_token: <p>A 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 <a href="https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">Making retries safe with idempotent APIs</a>.</p>
instance_id: <p>The identifier of the Connect Customer instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
contact_data_request_list: <p>List of individual contact requests.</p>
Raises:
capo_connect.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this action.</p>
capo_connect.errors.idempotency_exception.IdempotencyException: <p>An entity with the same name already exists.</p>
capo_connect.errors.internal_service_exception.InternalServiceException: <p>Request processing failed because of an error or failure with the service.</p>
capo_connect.errors.invalid_request_exception.InvalidRequestException: <p>The request is not valid.</p>
capo_connect.errors.limit_exceeded_exception.LimitExceededException: <p>The allowed limit for the resource has been exceeded.</p>
capo_connect.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p>
capo_connect.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_connect.types.batch_put_contact_request.BatchPutContactRequest]",
) -> AsyncOperationResponse[
"capo_connect.types.batch_put_contact_response.BatchPutContactResponse"
]:
import capo_connect._operations.amazon_connect_service.batch_put_contact
(
output,
http_response,
) = await capo_connect._operations.amazon_connect_service.batch_put_contact.async_batch_put_contact(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("BatchPutContact")
)
input_: capo_connect.types.batch_put_contact_request.BatchPutContactRequest = {
"instance_id": instance_id,
"contact_data_request_list": contact_data_request_list,
}
if client_token is None:
client_token = str(uuid.uuid4())
input_["client_token"] = client_token
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|