async def put_dial_request_batch(
self,
id: "capo_connectcampaigns.types.campaign_id.CampaignId",
dial_requests: "capo_connectcampaigns.types.dial_request_list.DialRequestList",
*,
config_overrides: Optional[AsyncConnectCampaignsClientConfig] = None,
) -> "capo_connectcampaigns.types.put_dial_request_batch_response.PutDialRequestBatchResponse":
"""Creates dials requests for the specified campaign Amazon Connect account. This API is idempotent.
Raises:
capo_connectcampaigns.errors.access_denied_exception.AccessDeniedException: You do not have sufficient access to perform this action.
capo_connectcampaigns.errors.conflict_exception.ConflictException: The request could not be processed because of conflict in the current state of the resource.
capo_connectcampaigns.errors.internal_server_exception.InternalServerException: Request processing failed because of an error or failure with the service.
capo_connectcampaigns.errors.invalid_campaign_state_exception.InvalidCampaignStateException: The request could not be processed because of conflict in the current state of the campaign.
capo_connectcampaigns.errors.resource_not_found_exception.ResourceNotFoundException: The specified resource was not found.
capo_connectcampaigns.errors.throttling_exception.ThrottlingException: The request was denied due to request throttling.
capo_connectcampaigns.errors.validation_exception.ValidationException: The input fails to satisfy the constraints specified by an AWS service.
capo_connectcampaigns.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_connectcampaigns.types.put_dial_request_batch_request.PutDialRequestBatchRequest]",
) -> AsyncOperationResponse[
"capo_connectcampaigns.types.put_dial_request_batch_response.PutDialRequestBatchResponse"
]:
import capo_connectcampaigns._operations.amazon_connect_campaign_service.put_dial_request_batch
(
output,
http_response,
) = await capo_connectcampaigns._operations.amazon_connect_campaign_service.put_dial_request_batch.async_put_dial_request_batch(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
def _redact_input(
input_: "capo_connectcampaigns.types.put_dial_request_batch_request.PutDialRequestBatchRequest",
) -> dict[str, Any]:
import capo_connectcampaigns.types.put_dial_request_batch_request
return capo_connectcampaigns.types.put_dial_request_batch_request.redact_sensitive(
input_
)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging("PutDialRequestBatch", redact_input=_redact_input),
)
input_: capo_connectcampaigns.types.put_dial_request_batch_request.PutDialRequestBatchRequest = {
"id": id,
"dial_requests": dial_requests,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output