Skip to content

delete_delivery_channel

delete_delivery_channel(
    delivery_channel_name: ChannelName,
    *,
    config_overrides: Optional[ConfigServiceClientConfig] = None,
) -> None

Deletes the delivery channel.

Before you can delete the delivery channel, you must stop the customer managed configuration recorder. You can use the StopConfigurationRecorder operation to stop the customer managed configuration recorder.

Parameters:

  • delivery_channel_name (ChannelName) –

    The name of the delivery channel that you want to delete.

Raises:

Source code in docs_src/capo_config_service/_services/config_service.py
def delete_delivery_channel(
    self,
    delivery_channel_name: "capo_config_service.types.channel_name.ChannelName",
    *,
    config_overrides: Optional[ConfigServiceClientConfig] = None,
) -> None:
    """<p>Deletes the delivery channel.</p> <p>Before you can delete the delivery channel, you must stop the customer managed configuration recorder. You can use the <a>StopConfigurationRecorder</a> operation to stop the customer managed configuration recorder.</p>

    Args:
        delivery_channel_name: <p>The name of the delivery channel that you want to delete.</p>

    Raises:
        capo_config_service.errors.last_delivery_channel_delete_failed_exception.LastDeliveryChannelDeleteFailedException: <p>You cannot delete the delivery channel you specified because the customer managed configuration recorder is running.</p>
        capo_config_service.errors.no_such_delivery_channel_exception.NoSuchDeliveryChannelException: <p>You have specified a delivery channel that does not exist.</p>
        capo_config_service.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_config_service.types.delete_delivery_channel_request.DeleteDeliveryChannelRequest]",
    ) -> OperationResponse[None]:
        import capo_config_service._operations.starling_dove_service.delete_delivery_channel

        output, http_response = (
            capo_config_service._operations.starling_dove_service.delete_delivery_channel.delete_delivery_channel(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteDeliveryChannel")
    )
    input_: capo_config_service.types.delete_delivery_channel_request.DeleteDeliveryChannelRequest = {
        "delivery_channel_name": delivery_channel_name
    }

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