Skip to content

update_probe async

update_probe(
    monitor_name: ResourceName,
    probe_id: ProbeId,
    *,
    config_overrides: Optional[AsyncNetworkMonitorClientConfig] = None,
    state: Optional[ProbeState] = None,
    destination: Optional[Destination] = None,
    destination_port: Optional[Port] = None,
    protocol: Optional[Protocol] = None,
    packet_size: Optional[PacketSize] = None,
) -> UpdateProbeOutput

Updates a monitor 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 update the following para create a monitor with probes using this command. For each probe, you define the following:

  • state—The state of the probe.

  • destination— The target destination IP address for the probe.

  • destinationPort—Required only if the protocol is TCP.

  • protocol—The communication protocol between the source and destination. This will be either TCP or ICMP.

  • packetSize—The size of the packets. This must be a number between 56 and 8500.

  • (Optional) tags —Key-value pairs created and assigned to the probe.

Parameters:

  • monitor_name (ResourceName) –

    The name of the monitor that the probe was updated for.

  • probe_id (ProbeId) –

    The ID of the probe to update.

  • state (Optional[ProbeState], default: None ) –

    The state of the probe update.

  • destination (Optional[Destination], default: None ) –

    The updated IP address for the probe destination. This must be either an IPv4 or IPv6 address.

  • destination_port (Optional[Port], default: None ) –

    The updated port for the probe destination. This is required only if the protocol is TCP and must be a number between 1 and 65536.

  • protocol (Optional[Protocol], default: None ) –

    The updated network protocol for the destination. This can be either TCP or ICMP. If the protocol is TCP, then port is also required.

  • packet_size (Optional[PacketSize], default: None ) –

    he updated packets size for network traffic between the source and destination. This must be a number between 56 and 8500.

Raises:

Source code in docs_src/capo_networkmonitor/_services/async_network_monitor.py
async def update_probe(
    self,
    monitor_name: "capo_networkmonitor.types.resource_name.ResourceName",
    probe_id: "capo_networkmonitor.types.probe_id.ProbeId",
    *,
    config_overrides: Optional[AsyncNetworkMonitorClientConfig] = None,
    state: Optional["capo_networkmonitor.types.probe_state.ProbeState"] = None,
    destination: Optional[
        "capo_networkmonitor.types.destination.Destination"
    ] = None,
    destination_port: Optional["capo_networkmonitor.types.port.Port"] = None,
    protocol: Optional["capo_networkmonitor.types.protocol.Protocol"] = None,
    packet_size: Optional[
        "capo_networkmonitor.types.packet_size.PacketSize"
    ] = None,
) -> "capo_networkmonitor.types.update_probe_output.UpdateProbeOutput":
    """<p>Updates a monitor probe. 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. </p> <p>You can update the following para create a monitor with probes using this command. For each probe, you define the following:</p> <ul> <li> <p> <code>state</code>—The state of the probe.</p> </li> <li> <p> <code>destination</code>— The target destination IP address for the probe.</p> </li> <li> <p> <code>destinationPort</code>—Required only if the protocol is <code>TCP</code>.</p> </li> <li> <p> <code>protocol</code>—The communication protocol between the source and destination. This will be either <code>TCP</code> or <code>ICMP</code>.</p> </li> <li> <p> <code>packetSize</code>—The size of the packets. This must be a number between <code>56</code> and <code>8500</code>.</p> </li> <li> <p>(Optional) <code>tags</code> —Key-value pairs created and assigned to the probe.</p> </li> </ul>

    Args:
        monitor_name: <p>The name of the monitor that the probe was updated for.</p>
        probe_id: <p>The ID of the probe to update.</p>
        state: <p>The state of the probe update.</p>
        destination: <p>The updated IP address for the probe destination. This must be either an IPv4 or IPv6 address.</p>
        destination_port: <p>The updated port for the probe destination. This is required only if the <code>protocol</code> is <code>TCP</code> and must be a number between <code>1</code> and <code>65536</code>.</p>
        protocol: <p>The updated network protocol for the destination. This can be either <code>TCP</code> or <code>ICMP</code>. If the protocol is <code>TCP</code>, then <code>port</code> is also required.</p>
        packet_size: <p>he updated packets size for network traffic between the source and destination. This must be a number between <code>56</code> and <code>8500</code>.</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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_networkmonitor.types.update_probe_input.UpdateProbeInput]",
    ) -> AsyncOperationResponse[
        "capo_networkmonitor.types.update_probe_output.UpdateProbeOutput"
    ]:
        import capo_networkmonitor._operations.network_monitor.update_probe

        (
            output,
            http_response,
        ) = await capo_networkmonitor._operations.network_monitor.update_probe.async_update_probe(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateProbe")
    )
    input_: capo_networkmonitor.types.update_probe_input.UpdateProbeInput = {
        "monitor_name": monitor_name,
        "probe_id": probe_id,
    }
    if state is not None:
        input_["state"] = state
    if destination is not None:
        input_["destination"] = destination
    if destination_port is not None:
        input_["destination_port"] = destination_port
    if protocol is not None:
        input_["protocol"] = protocol
    if packet_size is not None:
        input_["packet_size"] = packet_size

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