Skip to content

put_profile_outbound_request_batch async

put_profile_outbound_request_batch(
    id: CampaignId,
    profile_outbound_requests: ProfileOutboundRequestList,
    *,
    config_overrides: Optional[AsyncConnectCampaignsV2ClientConfig] = None,
) -> PutProfileOutboundRequestBatchResponse

Takes in a list of profile outbound requests to be placed as part of an outbound campaign. This API is idempotent.

Raises:

Source code in docs_src/capo_connectcampaignsv2/_services/async_connect_campaigns_v2.py
async def put_profile_outbound_request_batch(
    self,
    id: "capo_connectcampaignsv2.types.campaign_id.CampaignId",
    profile_outbound_requests: "capo_connectcampaignsv2.types.profile_outbound_request_list.ProfileOutboundRequestList",
    *,
    config_overrides: Optional[AsyncConnectCampaignsV2ClientConfig] = None,
) -> "capo_connectcampaignsv2.types.put_profile_outbound_request_batch_response.PutProfileOutboundRequestBatchResponse":
    """Takes in a list of profile outbound requests to be placed as part of an outbound campaign. This API is idempotent.

    Raises:
        capo_connectcampaignsv2.errors.access_denied_exception.AccessDeniedException: You do not have sufficient access to perform this action.
        capo_connectcampaignsv2.errors.conflict_exception.ConflictException: The request could not be processed because of conflict in the current state of the resource.
        capo_connectcampaignsv2.errors.internal_server_exception.InternalServerException: Request processing failed because of an error or failure with the service.
        capo_connectcampaignsv2.errors.invalid_campaign_state_exception.InvalidCampaignStateException: The request could not be processed because of conflict in the current state of the campaign.
        capo_connectcampaignsv2.errors.resource_not_found_exception.ResourceNotFoundException: The specified resource was not found.
        capo_connectcampaignsv2.errors.throttling_exception.ThrottlingException: The request was denied due to request throttling.
        capo_connectcampaignsv2.errors.validation_exception.ValidationException: The input fails to satisfy the constraints specified by an AWS service.
        capo_connectcampaignsv2.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_connectcampaignsv2.types.put_profile_outbound_request_batch_request.PutProfileOutboundRequestBatchRequest]",
    ) -> AsyncOperationResponse[
        "capo_connectcampaignsv2.types.put_profile_outbound_request_batch_response.PutProfileOutboundRequestBatchResponse"
    ]:
        import capo_connectcampaignsv2._operations.amazon_connect_campaign_service_v2.put_profile_outbound_request_batch

        (
            output,
            http_response,
        ) = await capo_connectcampaignsv2._operations.amazon_connect_campaign_service_v2.put_profile_outbound_request_batch.async_put_profile_outbound_request_batch(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("PutProfileOutboundRequestBatch")
    )
    input_: capo_connectcampaignsv2.types.put_profile_outbound_request_batch_request.PutProfileOutboundRequestBatchRequest = {
        "id": id,
        "profile_outbound_requests": profile_outbound_requests,
    }

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output