Skip to content

delete_probe

delete_probe(
    monitor_name: ResourceName,
    probe_id: ProbeId,
    *,
    config_overrides: Optional[NetworkMonitorClientConfig] = None,
) -> DeleteProbeOutput

Deletes the specified probe. Once a probe is deleted you'll no longer incur any billing fees for that probe.

This action requires both the monitorName and probeId parameters. Run ListMonitors to get a list of monitor names. Run GetMonitor to get a list of probes and probe IDs. You can only delete a single probe at a time using this action.

Parameters:

  • monitor_name (ResourceName) –

    The name of the monitor to delete.

  • probe_id (ProbeId) –

    The ID of the probe to delete.

Raises:

Source code in docs_src/capo_networkmonitor/_services/network_monitor.py
def delete_probe(
    self,
    monitor_name: "capo_networkmonitor.types.resource_name.ResourceName",
    probe_id: "capo_networkmonitor.types.probe_id.ProbeId",
    *,
    config_overrides: Optional[NetworkMonitorClientConfig] = None,
) -> "capo_networkmonitor.types.delete_probe_output.DeleteProbeOutput":
    """<p>Deletes the specified probe. Once a probe is deleted you'll no longer incur any billing fees for that probe.</p> <p>This action requires both the <code>monitorName</code> and <code>probeId</code> parameters. Run <code>ListMonitors</code> to get a list of monitor names. Run <code>GetMonitor</code> to get a list of probes and probe IDs. You can only delete a single probe at a time using this action. </p>

    Args:
        monitor_name: <p>The name of the monitor to delete. </p>
        probe_id: <p>The ID of the probe to delete. </p>

    Raises:
        capo_networkmonitor.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_networkmonitor.errors.internal_server_exception.InternalServerException: <p>The request processing has failed because of an unknown error, exception or failure.</p>
        capo_networkmonitor.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
        capo_networkmonitor.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>This request exceeds a service quota.</p>
        capo_networkmonitor.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling</p>
        capo_networkmonitor.errors.validation_exception.ValidationException: <p>One of the parameters for the request is not valid.</p>
        capo_networkmonitor.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_networkmonitor.types.delete_probe_input.DeleteProbeInput]",
    ) -> OperationResponse[
        "capo_networkmonitor.types.delete_probe_output.DeleteProbeOutput"
    ]:
        import capo_networkmonitor._operations.network_monitor.delete_probe

        output, http_response = (
            capo_networkmonitor._operations.network_monitor.delete_probe.delete_probe(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteProbe")
    )
    input_: capo_networkmonitor.types.delete_probe_input.DeleteProbeInput = {
        "monitor_name": monitor_name,
        "probe_id": probe_id,
    }

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