Skip to content

delete_campaign_communication_time

delete_campaign_communication_time(
    id: CampaignId,
    config: CommunicationTimeConfigType,
    *,
    config_overrides: Optional[ConnectCampaignsV2ClientConfig] = None,
) -> None

Deletes the communication time config for a campaign. This API is idempotent.

Raises:

Source code in docs_src/capo_connectcampaignsv2/_services/connect_campaigns_v2.py
def delete_campaign_communication_time(
    self,
    id: "capo_connectcampaignsv2.types.campaign_id.CampaignId",
    config: "capo_connectcampaignsv2.types.communication_time_config_type.CommunicationTimeConfigType",
    *,
    config_overrides: Optional[ConnectCampaignsV2ClientConfig] = None,
) -> None:
    """Deletes the communication time config for a 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.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.
    """

    def _handler(
        req: "OperationRequest[capo_connectcampaignsv2.types.delete_campaign_communication_time_request.DeleteCampaignCommunicationTimeRequest]",
    ) -> OperationResponse[None]:
        import capo_connectcampaignsv2._operations.amazon_connect_campaign_service_v2.delete_campaign_communication_time

        output, http_response = (
            capo_connectcampaignsv2._operations.amazon_connect_campaign_service_v2.delete_campaign_communication_time.delete_campaign_communication_time(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteCampaignCommunicationTime")
    )
    input_: capo_connectcampaignsv2.types.delete_campaign_communication_time_request.DeleteCampaignCommunicationTimeRequest = {
        "id": id,
        "config": config,
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output