create_monitor
async
¶
create_monitor(
monitor_name: ResourceName,
*,
config_overrides: Optional[AsyncNetworkMonitorClientConfig] = None,
probes: Optional[CreateMonitorProbeInputList] = None,
aggregation_period: Optional[AggregationPeriod] = None,
client_token: Optional[str] = None,
tags: Optional[TagMap] = None,
) -> CreateMonitorOutput
Creates a monitor between a source subnet and destination IP address. Within a monitor you'll create one or more probes that monitor network traffic between your source Amazon Web Services VPC subnets and your destination IP addresses. Each probe then aggregates and sends metrics to Amazon CloudWatch.
You can also create a monitor with probes using this command. For each probe, you define the following:
-
source—The subnet IDs where the probes will be created. -
destination— The target destination IP address for the probe. -
destinationPort—Required only if the protocol isTCP. -
protocol—The communication protocol between the source and destination. This will be eitherTCPorICMP. -
packetSize—The size of the packets. This must be a number between56and8500. -
(Optional)
tags—Key-value pairs created and assigned to the probe.
Parameters:
-
monitor_name(ResourceName) –The name identifying the monitor. It can contain only letters, underscores (_), or dashes (-), and can be up to 200 characters.
-
probes(Optional[CreateMonitorProbeInputList], default:None) –Displays a list of all of the probes created for a monitor.
-
aggregation_period(Optional[AggregationPeriod], default:None) –The time, in seconds, that metrics are aggregated and sent to Amazon CloudWatch. Valid values are either
30or60.60is the default if no period is chosen. -
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 monitor.
Raises:
-
AccessDeniedException–You do not have sufficient access to perform this action.
-
ConflictException–This operation attempted to create a resource that already exists.
-
InternalServerException–The request processing has failed because of an unknown error, exception or failure.
-
ServiceQuotaExceededException–This request exceeds a service quota.
-
ThrottlingException–The request was denied due to request throttling
-
ValidationException–One of the parameters for the request is not valid.
-
UnknownServiceError–The service returned an error code this client does not model.