Class: Aws::NetworkMonitor::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::NetworkMonitor::Client
- Includes:
- ClientStubs
- Defined in:
- gems/aws-sdk-networkmonitor/lib/aws-sdk-networkmonitor/client.rb
Overview
An API client for NetworkMonitor. To construct a client, you need to configure a :region
and :credentials
.
client = Aws::NetworkMonitor::Client.new(
region: region_name,
credentials: credentials,
# ...
)
For details on configuring region and credentials see the developer guide.
See #initialize for a full list of supported configuration options.
Instance Attribute Summary
Attributes inherited from Seahorse::Client::Base
API Operations collapse
-
#create_monitor(params = {}) ⇒ Types::CreateMonitorOutput
Creates a monitor between a source subnet and destination IP address.
-
#create_probe(params = {}) ⇒ Types::CreateProbeOutput
Create a probe within a monitor.
-
#delete_monitor(params = {}) ⇒ Struct
Deletes a specified monitor.
-
#delete_probe(params = {}) ⇒ Struct
Deletes the specified probe.
-
#get_monitor(params = {}) ⇒ Types::GetMonitorOutput
Returns details about a specific monitor.
-
#get_probe(params = {}) ⇒ Types::GetProbeOutput
Returns the details about a probe.
-
#list_monitors(params = {}) ⇒ Types::ListMonitorsOutput
Returns a list of all of your monitors.
-
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceOutput
Lists the tags assigned to this resource.
-
#tag_resource(params = {}) ⇒ Struct
Adds key-value pairs to a monitor or probe.
-
#untag_resource(params = {}) ⇒ Struct
Removes a key-value pair from a monitor or probe.
-
#update_monitor(params = {}) ⇒ Types::UpdateMonitorOutput
Updates the
aggregationPeriod
for a monitor. -
#update_probe(params = {}) ⇒ Types::UpdateProbeOutput
Updates a monitor probe.
Instance Method Summary collapse
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
Methods included from ClientStubs
#api_requests, #stub_data, #stub_responses
Methods inherited from Seahorse::Client::Base
add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins
Methods included from Seahorse::Client::HandlerBuilder
#handle, #handle_request, #handle_response
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
410 411 412 |
# File 'gems/aws-sdk-networkmonitor/lib/aws-sdk-networkmonitor/client.rb', line 410 def initialize(*args) super end |
Instance Method Details
#create_monitor(params = {}) ⇒ Types::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 eitherTCP
orICMP
.packetSize
—The size of the packets. This must be a number between56
and8500
.(Optional)
tags
—Key-value pairs created and assigned to the probe.
506 507 508 509 |
# File 'gems/aws-sdk-networkmonitor/lib/aws-sdk-networkmonitor/client.rb', line 506 def create_monitor(params = {}, = {}) req = build_request(:create_monitor, params) req.send_request() end |
#create_probe(params = {}) ⇒ Types::CreateProbeOutput
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.
590 591 592 593 |
# File 'gems/aws-sdk-networkmonitor/lib/aws-sdk-networkmonitor/client.rb', line 590 def create_probe(params = {}, = {}) req = build_request(:create_probe, params) req.send_request() end |
#delete_monitor(params = {}) ⇒ Struct
Deletes a specified monitor.
This action requires the monitorName
parameter. Run ListMonitors
to get a list of monitor names.
615 616 617 618 |
# File 'gems/aws-sdk-networkmonitor/lib/aws-sdk-networkmonitor/client.rb', line 615 def delete_monitor(params = {}, = {}) req = build_request(:delete_monitor, params) req.send_request() end |
#delete_probe(params = {}) ⇒ Struct
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.
647 648 649 650 |
# File 'gems/aws-sdk-networkmonitor/lib/aws-sdk-networkmonitor/client.rb', line 647 def delete_probe(params = {}, = {}) req = build_request(:delete_probe, params) req.send_request() end |
#get_monitor(params = {}) ⇒ Types::GetMonitorOutput
Returns details about a specific monitor.
This action requires the monitorName
parameter. Run ListMonitors
to get a list of monitor names.
707 708 709 710 |
# File 'gems/aws-sdk-networkmonitor/lib/aws-sdk-networkmonitor/client.rb', line 707 def get_monitor(params = {}, = {}) req = build_request(:get_monitor, params) req.send_request() end |
#get_probe(params = {}) ⇒ Types::GetProbeOutput
Returns the details about a 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.
769 770 771 772 |
# File 'gems/aws-sdk-networkmonitor/lib/aws-sdk-networkmonitor/client.rb', line 769 def get_probe(params = {}, = {}) req = build_request(:get_probe, params) req.send_request() end |
#list_monitors(params = {}) ⇒ Types::ListMonitorsOutput
Returns a list of all of your monitors.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
820 821 822 823 |
# File 'gems/aws-sdk-networkmonitor/lib/aws-sdk-networkmonitor/client.rb', line 820 def list_monitors(params = {}, = {}) req = build_request(:list_monitors, params) req.send_request() end |
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceOutput
Lists the tags assigned to this resource.
849 850 851 852 |
# File 'gems/aws-sdk-networkmonitor/lib/aws-sdk-networkmonitor/client.rb', line 849 def (params = {}, = {}) req = build_request(:list_tags_for_resource, params) req.send_request() end |
#tag_resource(params = {}) ⇒ Struct
Adds key-value pairs to a monitor or probe.
877 878 879 880 |
# File 'gems/aws-sdk-networkmonitor/lib/aws-sdk-networkmonitor/client.rb', line 877 def tag_resource(params = {}, = {}) req = build_request(:tag_resource, params) req.send_request() end |
#untag_resource(params = {}) ⇒ Struct
Removes a key-value pair from a monitor or probe.
903 904 905 906 |
# File 'gems/aws-sdk-networkmonitor/lib/aws-sdk-networkmonitor/client.rb', line 903 def untag_resource(params = {}, = {}) req = build_request(:untag_resource, params) req.send_request() end |
#update_monitor(params = {}) ⇒ Types::UpdateMonitorOutput
Updates the aggregationPeriod
for a monitor. Monitors support an
aggregationPeriod
of either 30
or 60
seconds. This action
requires the monitorName
and probeId
parameter. Run ListMonitors
to get a list of monitor names.
948 949 950 951 |
# File 'gems/aws-sdk-networkmonitor/lib/aws-sdk-networkmonitor/client.rb', line 948 def update_monitor(params = {}, = {}) req = build_request(:update_monitor, params) req.send_request() end |
#update_probe(params = {}) ⇒ Types::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 isTCP
.protocol
—The communication protocol between the source and destination. This will be eitherTCP
orICMP
.packetSize
—The size of the packets. This must be a number between56
and8500
.(Optional)
tags
—Key-value pairs created and assigned to the probe.
1050 1051 1052 1053 |
# File 'gems/aws-sdk-networkmonitor/lib/aws-sdk-networkmonitor/client.rb', line 1050 def update_probe(params = {}, = {}) req = build_request(:update_probe, params) req.send_request() end |