Skip to content

update_campaign_outbound_call_config async

update_campaign_outbound_call_config(
    id: CampaignId,
    *,
    config_overrides: Optional[AsyncConnectCampaignsClientConfig] = None,
    connect_contact_flow_id: Optional[ContactFlowId] = None,
    connect_source_phone_number: Optional[SourcePhoneNumber] = None,
    answer_machine_detection_config: Optional[AnswerMachineDetectionConfig] = None,
) -> None

Updates the outbound call config of a campaign. This API is idempotent.

Raises:

Source code in docs_src/capo_connectcampaigns/_services/async_connect_campaigns.py
async def update_campaign_outbound_call_config(
    self,
    id: "capo_connectcampaigns.types.campaign_id.CampaignId",
    *,
    config_overrides: Optional[AsyncConnectCampaignsClientConfig] = None,
    connect_contact_flow_id: Optional[
        "capo_connectcampaigns.types.contact_flow_id.ContactFlowId"
    ] = None,
    connect_source_phone_number: Optional[
        "capo_connectcampaigns.types.source_phone_number.SourcePhoneNumber"
    ] = None,
    answer_machine_detection_config: Optional[
        "capo_connectcampaigns.types.answer_machine_detection_config.AnswerMachineDetectionConfig"
    ] = None,
) -> None:
    """Updates the outbound call config of a campaign. 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.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.update_campaign_outbound_call_config_request.UpdateCampaignOutboundCallConfigRequest]",
    ) -> AsyncOperationResponse[None]:
        import capo_connectcampaigns._operations.amazon_connect_campaign_service.update_campaign_outbound_call_config

        (
            output,
            http_response,
        ) = await capo_connectcampaigns._operations.amazon_connect_campaign_service.update_campaign_outbound_call_config.async_update_campaign_outbound_call_config(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateCampaignOutboundCallConfig")
    )
    input_: capo_connectcampaigns.types.update_campaign_outbound_call_config_request.UpdateCampaignOutboundCallConfigRequest = {
        "id": id
    }
    if connect_contact_flow_id is not None:
        input_["connect_contact_flow_id"] = connect_contact_flow_id
    if connect_source_phone_number is not None:
        input_["connect_source_phone_number"] = connect_source_phone_number
    if answer_machine_detection_config is not None:
        input_["answer_machine_detection_config"] = answer_machine_detection_config

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