createProbe method
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.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter monitorName :
The name of the monitor to associated with the probe.
Parameter probe :
Describes the details of an individual probe for a monitor.
Parameter clientToken :
Unique, case-sensitive identifier to ensure the idempotency of the
request. Only returned if a client token was provided in the request.
Parameter tags :
The list of key-value pairs created and assigned to the probe.
Implementation
Future<CreateProbeOutput> createProbe({
required String monitorName,
required ProbeInput probe,
String? clientToken,
Map<String, String>? tags,
}) async {
final $payload = <String, dynamic>{
'probe': probe,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
if (tags != null) 'tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/monitors/${Uri.encodeComponent(monitorName)}/probes',
exceptionFnMap: _exceptionFns,
);
return CreateProbeOutput.fromJson(response);
}