Create a probe within a monitor. Once you create a probe, and it begins monitoring your network traffic, you'll incur billing charges for that probe. This action requires the monitorName parameter. Run ListMonitors to get a list of monitor names. Note the name of the monitorName you want to create the probe for.
Parameters:
-
monitor_name
(ResourceName)
–
The name of the monitor to associated with the probe.
-
probe
(ProbeInput)
–
Describes the details of an individual probe for a monitor.
-
client_token
(Optional[str], default:
None
)
–
Unique, case-sensitive identifier to ensure the idempotency of the request. Only returned if a client token was provided in the request.
-
tags
(Optional[TagMap], default:
None
)
–
The list of key-value pairs created and assigned to the probe.
Raises:
Source code in docs_src/capo_networkmonitor/_services/network_monitor.py
| def create_probe(
self,
monitor_name: "capo_networkmonitor.types.resource_name.ResourceName",
probe: "capo_networkmonitor.types.probe_input.ProbeInput",
*,
config_overrides: Optional[NetworkMonitorClientConfig] = None,
client_token: Optional[str] = None,
tags: Optional["capo_networkmonitor.types.tag_map.TagMap"] = None,
) -> "capo_networkmonitor.types.create_probe_output.CreateProbeOutput":
"""<p>Create a probe within a monitor. Once you create a probe, and it begins monitoring your network traffic, you'll incur billing charges for that probe. This action requires the <code>monitorName</code> parameter. Run <code>ListMonitors</code> to get a list of monitor names. Note the name of the <code>monitorName</code> you want to create the probe for.</p>
Args:
monitor_name: <p>The name of the monitor to associated with the probe. </p>
probe: <p>Describes the details of an individual probe for a monitor.</p>
client_token: <p>Unique, case-sensitive identifier to ensure the idempotency of the request. Only returned if a client token was provided in the request.</p>
tags: <p>The list of key-value pairs created and assigned to the probe.</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.create_probe_input.CreateProbeInput]",
) -> OperationResponse[
"capo_networkmonitor.types.create_probe_output.CreateProbeOutput"
]:
import capo_networkmonitor._operations.network_monitor.create_probe
output, http_response = (
capo_networkmonitor._operations.network_monitor.create_probe.create_probe(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("CreateProbe")
)
input_: capo_networkmonitor.types.create_probe_input.CreateProbeInput = {
"monitor_name": monitor_name,
"probe": probe,
}
if client_token is None:
client_token = str(uuid.uuid4())
input_["client_token"] = client_token
if tags is not None:
input_["tags"] = tags
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|