Skip to content

delete_campaign_communication_limits async

delete_campaign_communication_limits(
    id: CampaignId,
    config: CommunicationLimitsConfigType,
    *,
    config_overrides: Optional[AsyncConnectCampaignsV2ClientConfig] = None,
) -> None

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

Raises:

Source code in docs_src/capo_connectcampaignsv2/_services/async_connect_campaigns_v2.py
async def delete_campaign_communication_limits(
    self,
    id: "capo_connectcampaignsv2.types.campaign_id.CampaignId",
    config: "capo_connectcampaignsv2.types.communication_limits_config_type.CommunicationLimitsConfigType",
    *,
    config_overrides: Optional[AsyncConnectCampaignsV2ClientConfig] = None,
) -> None:
    """Deletes the communication limits 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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_connectcampaignsv2.types.delete_campaign_communication_limits_request.DeleteCampaignCommunicationLimitsRequest]",
    ) -> AsyncOperationResponse[None]:
        import capo_connectcampaignsv2._operations.amazon_connect_campaign_service_v2.delete_campaign_communication_limits

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteCampaignCommunicationLimits")
    )
    input_: capo_connectcampaignsv2.types.delete_campaign_communication_limits_request.DeleteCampaignCommunicationLimitsRequest = {
        "id": id,
        "config": config,
    }

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