aws-sdk-internetmonitor 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,965 @@
1
+ # frozen_string_literal: true
2
+
3
+ # WARNING ABOUT GENERATED CODE
4
+ #
5
+ # This file is generated. See the contributing guide for more information:
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
+ #
8
+ # WARNING ABOUT GENERATED CODE
9
+
10
+ require 'seahorse/client/plugins/content_length.rb'
11
+ require 'aws-sdk-core/plugins/credentials_configuration.rb'
12
+ require 'aws-sdk-core/plugins/logging.rb'
13
+ require 'aws-sdk-core/plugins/param_converter.rb'
14
+ require 'aws-sdk-core/plugins/param_validator.rb'
15
+ require 'aws-sdk-core/plugins/user_agent.rb'
16
+ require 'aws-sdk-core/plugins/helpful_socket_errors.rb'
17
+ require 'aws-sdk-core/plugins/retry_errors.rb'
18
+ require 'aws-sdk-core/plugins/global_configuration.rb'
19
+ require 'aws-sdk-core/plugins/regional_endpoint.rb'
20
+ require 'aws-sdk-core/plugins/endpoint_discovery.rb'
21
+ require 'aws-sdk-core/plugins/endpoint_pattern.rb'
22
+ require 'aws-sdk-core/plugins/response_paging.rb'
23
+ require 'aws-sdk-core/plugins/stub_responses.rb'
24
+ require 'aws-sdk-core/plugins/idempotency_token.rb'
25
+ require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
26
+ require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
27
+ require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
28
+ require 'aws-sdk-core/plugins/transfer_encoding.rb'
29
+ require 'aws-sdk-core/plugins/http_checksum.rb'
30
+ require 'aws-sdk-core/plugins/checksum_algorithm.rb'
31
+ require 'aws-sdk-core/plugins/defaults_mode.rb'
32
+ require 'aws-sdk-core/plugins/recursion_detection.rb'
33
+ require 'aws-sdk-core/plugins/sign.rb'
34
+ require 'aws-sdk-core/plugins/protocols/rest_json.rb'
35
+
36
+ Aws::Plugins::GlobalConfiguration.add_identifier(:internetmonitor)
37
+
38
+ module Aws::InternetMonitor
39
+ # An API client for InternetMonitor. To construct a client, you need to configure a `:region` and `:credentials`.
40
+ #
41
+ # client = Aws::InternetMonitor::Client.new(
42
+ # region: region_name,
43
+ # credentials: credentials,
44
+ # # ...
45
+ # )
46
+ #
47
+ # For details on configuring region and credentials see
48
+ # the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
49
+ #
50
+ # See {#initialize} for a full list of supported configuration options.
51
+ class Client < Seahorse::Client::Base
52
+
53
+ include Aws::ClientStubs
54
+
55
+ @identifier = :internetmonitor
56
+
57
+ set_api(ClientApi::API)
58
+
59
+ add_plugin(Seahorse::Client::Plugins::ContentLength)
60
+ add_plugin(Aws::Plugins::CredentialsConfiguration)
61
+ add_plugin(Aws::Plugins::Logging)
62
+ add_plugin(Aws::Plugins::ParamConverter)
63
+ add_plugin(Aws::Plugins::ParamValidator)
64
+ add_plugin(Aws::Plugins::UserAgent)
65
+ add_plugin(Aws::Plugins::HelpfulSocketErrors)
66
+ add_plugin(Aws::Plugins::RetryErrors)
67
+ add_plugin(Aws::Plugins::GlobalConfiguration)
68
+ add_plugin(Aws::Plugins::RegionalEndpoint)
69
+ add_plugin(Aws::Plugins::EndpointDiscovery)
70
+ add_plugin(Aws::Plugins::EndpointPattern)
71
+ add_plugin(Aws::Plugins::ResponsePaging)
72
+ add_plugin(Aws::Plugins::StubResponses)
73
+ add_plugin(Aws::Plugins::IdempotencyToken)
74
+ add_plugin(Aws::Plugins::JsonvalueConverter)
75
+ add_plugin(Aws::Plugins::ClientMetricsPlugin)
76
+ add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
77
+ add_plugin(Aws::Plugins::TransferEncoding)
78
+ add_plugin(Aws::Plugins::HttpChecksum)
79
+ add_plugin(Aws::Plugins::ChecksumAlgorithm)
80
+ add_plugin(Aws::Plugins::DefaultsMode)
81
+ add_plugin(Aws::Plugins::RecursionDetection)
82
+ add_plugin(Aws::Plugins::Sign)
83
+ add_plugin(Aws::Plugins::Protocols::RestJson)
84
+ add_plugin(Aws::InternetMonitor::Plugins::Endpoints)
85
+
86
+ # @overload initialize(options)
87
+ # @param [Hash] options
88
+ # @option options [required, Aws::CredentialProvider] :credentials
89
+ # Your AWS credentials. This can be an instance of any one of the
90
+ # following classes:
91
+ #
92
+ # * `Aws::Credentials` - Used for configuring static, non-refreshing
93
+ # credentials.
94
+ #
95
+ # * `Aws::SharedCredentials` - Used for loading static credentials from a
96
+ # shared file, such as `~/.aws/config`.
97
+ #
98
+ # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
99
+ #
100
+ # * `Aws::AssumeRoleWebIdentityCredentials` - Used when you need to
101
+ # assume a role after providing credentials via the web.
102
+ #
103
+ # * `Aws::SSOCredentials` - Used for loading credentials from AWS SSO using an
104
+ # access token generated from `aws login`.
105
+ #
106
+ # * `Aws::ProcessCredentials` - Used for loading credentials from a
107
+ # process that outputs to stdout.
108
+ #
109
+ # * `Aws::InstanceProfileCredentials` - Used for loading credentials
110
+ # from an EC2 IMDS on an EC2 instance.
111
+ #
112
+ # * `Aws::ECSCredentials` - Used for loading credentials from
113
+ # instances running in ECS.
114
+ #
115
+ # * `Aws::CognitoIdentityCredentials` - Used for loading credentials
116
+ # from the Cognito Identity service.
117
+ #
118
+ # When `:credentials` are not configured directly, the following
119
+ # locations will be searched for credentials:
120
+ #
121
+ # * `Aws.config[:credentials]`
122
+ # * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
123
+ # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
124
+ # * `~/.aws/credentials`
125
+ # * `~/.aws/config`
126
+ # * EC2/ECS IMDS instance profile - When used by default, the timeouts
127
+ # are very aggressive. Construct and pass an instance of
128
+ # `Aws::InstanceProfileCredentails` or `Aws::ECSCredentials` to
129
+ # enable retries and extended timeouts. Instance profile credential
130
+ # fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED']
131
+ # to true.
132
+ #
133
+ # @option options [required, String] :region
134
+ # The AWS region to connect to. The configured `:region` is
135
+ # used to determine the service `:endpoint`. When not passed,
136
+ # a default `:region` is searched for in the following locations:
137
+ #
138
+ # * `Aws.config[:region]`
139
+ # * `ENV['AWS_REGION']`
140
+ # * `ENV['AMAZON_REGION']`
141
+ # * `ENV['AWS_DEFAULT_REGION']`
142
+ # * `~/.aws/credentials`
143
+ # * `~/.aws/config`
144
+ #
145
+ # @option options [String] :access_key_id
146
+ #
147
+ # @option options [Boolean] :active_endpoint_cache (false)
148
+ # When set to `true`, a thread polling for endpoints will be running in
149
+ # the background every 60 secs (default). Defaults to `false`.
150
+ #
151
+ # @option options [Boolean] :adaptive_retry_wait_to_fill (true)
152
+ # Used only in `adaptive` retry mode. When true, the request will sleep
153
+ # until there is sufficent client side capacity to retry the request.
154
+ # When false, the request will raise a `RetryCapacityNotAvailableError` and will
155
+ # not retry instead of sleeping.
156
+ #
157
+ # @option options [Boolean] :client_side_monitoring (false)
158
+ # When `true`, client-side metrics will be collected for all API requests from
159
+ # this client.
160
+ #
161
+ # @option options [String] :client_side_monitoring_client_id ("")
162
+ # Allows you to provide an identifier for this client which will be attached to
163
+ # all generated client side metrics. Defaults to an empty string.
164
+ #
165
+ # @option options [String] :client_side_monitoring_host ("127.0.0.1")
166
+ # Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client
167
+ # side monitoring agent is running on, where client metrics will be published via UDP.
168
+ #
169
+ # @option options [Integer] :client_side_monitoring_port (31000)
170
+ # Required for publishing client metrics. The port that the client side monitoring
171
+ # agent is running on, where client metrics will be published via UDP.
172
+ #
173
+ # @option options [Aws::ClientSideMonitoring::Publisher] :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher)
174
+ # Allows you to provide a custom client-side monitoring publisher class. By default,
175
+ # will use the Client Side Monitoring Agent Publisher.
176
+ #
177
+ # @option options [Boolean] :convert_params (true)
178
+ # When `true`, an attempt is made to coerce request parameters into
179
+ # the required types.
180
+ #
181
+ # @option options [Boolean] :correct_clock_skew (true)
182
+ # Used only in `standard` and adaptive retry modes. Specifies whether to apply
183
+ # a clock skew correction and retry requests with skewed client clocks.
184
+ #
185
+ # @option options [String] :defaults_mode ("legacy")
186
+ # See {Aws::DefaultsModeConfiguration} for a list of the
187
+ # accepted modes and the configuration defaults that are included.
188
+ #
189
+ # @option options [Boolean] :disable_host_prefix_injection (false)
190
+ # Set to true to disable SDK automatically adding host prefix
191
+ # to default service endpoint when available.
192
+ #
193
+ # @option options [String] :endpoint
194
+ # The client endpoint is normally constructed from the `:region`
195
+ # option. You should only configure an `:endpoint` when connecting
196
+ # to test or custom endpoints. This should be a valid HTTP(S) URI.
197
+ #
198
+ # @option options [Integer] :endpoint_cache_max_entries (1000)
199
+ # Used for the maximum size limit of the LRU cache storing endpoints data
200
+ # for endpoint discovery enabled operations. Defaults to 1000.
201
+ #
202
+ # @option options [Integer] :endpoint_cache_max_threads (10)
203
+ # Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.
204
+ #
205
+ # @option options [Integer] :endpoint_cache_poll_interval (60)
206
+ # When :endpoint_discovery and :active_endpoint_cache is enabled,
207
+ # Use this option to config the time interval in seconds for making
208
+ # requests fetching endpoints information. Defaults to 60 sec.
209
+ #
210
+ # @option options [Boolean] :endpoint_discovery (false)
211
+ # When set to `true`, endpoint discovery will be enabled for operations when available.
212
+ #
213
+ # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
214
+ # The log formatter.
215
+ #
216
+ # @option options [Symbol] :log_level (:info)
217
+ # The log level to send messages to the `:logger` at.
218
+ #
219
+ # @option options [Logger] :logger
220
+ # The Logger instance to send log messages to. If this option
221
+ # is not set, logging will be disabled.
222
+ #
223
+ # @option options [Integer] :max_attempts (3)
224
+ # An integer representing the maximum number attempts that will be made for
225
+ # a single request, including the initial attempt. For example,
226
+ # setting this value to 5 will result in a request being retried up to
227
+ # 4 times. Used in `standard` and `adaptive` retry modes.
228
+ #
229
+ # @option options [String] :profile ("default")
230
+ # Used when loading credentials from the shared credentials file
231
+ # at HOME/.aws/credentials. When not specified, 'default' is used.
232
+ #
233
+ # @option options [Proc] :retry_backoff
234
+ # A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
235
+ # This option is only used in the `legacy` retry mode.
236
+ #
237
+ # @option options [Float] :retry_base_delay (0.3)
238
+ # The base delay in seconds used by the default backoff function. This option
239
+ # is only used in the `legacy` retry mode.
240
+ #
241
+ # @option options [Symbol] :retry_jitter (:none)
242
+ # A delay randomiser function used by the default backoff function.
243
+ # Some predefined functions can be referenced by name - :none, :equal, :full,
244
+ # otherwise a Proc that takes and returns a number. This option is only used
245
+ # in the `legacy` retry mode.
246
+ #
247
+ # @see https://www.awsarchitectureblog.com/2015/03/backoff.html
248
+ #
249
+ # @option options [Integer] :retry_limit (3)
250
+ # The maximum number of times to retry failed requests. Only
251
+ # ~ 500 level server errors and certain ~ 400 level client errors
252
+ # are retried. Generally, these are throttling errors, data
253
+ # checksum errors, networking errors, timeout errors, auth errors,
254
+ # endpoint discovery, and errors from expired credentials.
255
+ # This option is only used in the `legacy` retry mode.
256
+ #
257
+ # @option options [Integer] :retry_max_delay (0)
258
+ # The maximum number of seconds to delay between retries (0 for no limit)
259
+ # used by the default backoff function. This option is only used in the
260
+ # `legacy` retry mode.
261
+ #
262
+ # @option options [String] :retry_mode ("legacy")
263
+ # Specifies which retry algorithm to use. Values are:
264
+ #
265
+ # * `legacy` - The pre-existing retry behavior. This is default value if
266
+ # no retry mode is provided.
267
+ #
268
+ # * `standard` - A standardized set of retry rules across the AWS SDKs.
269
+ # This includes support for retry quotas, which limit the number of
270
+ # unsuccessful retries a client can make.
271
+ #
272
+ # * `adaptive` - An experimental retry mode that includes all the
273
+ # functionality of `standard` mode along with automatic client side
274
+ # throttling. This is a provisional mode that may change behavior
275
+ # in the future.
276
+ #
277
+ #
278
+ # @option options [String] :secret_access_key
279
+ #
280
+ # @option options [String] :session_token
281
+ #
282
+ # @option options [Boolean] :stub_responses (false)
283
+ # Causes the client to return stubbed responses. By default
284
+ # fake responses are generated and returned. You can specify
285
+ # the response data to return or errors to raise by calling
286
+ # {ClientStubs#stub_responses}. See {ClientStubs} for more information.
287
+ #
288
+ # ** Please note ** When response stubbing is enabled, no HTTP
289
+ # requests are made, and retries are disabled.
290
+ #
291
+ # @option options [Aws::TokenProvider] :token_provider
292
+ # A Bearer Token Provider. This can be an instance of any one of the
293
+ # following classes:
294
+ #
295
+ # * `Aws::StaticTokenProvider` - Used for configuring static, non-refreshing
296
+ # tokens.
297
+ #
298
+ # * `Aws::SSOTokenProvider` - Used for loading tokens from AWS SSO using an
299
+ # access token generated from `aws login`.
300
+ #
301
+ # When `:token_provider` is not configured directly, the `Aws::TokenProviderChain`
302
+ # will be used to search for tokens configured for your profile in shared configuration files.
303
+ #
304
+ # @option options [Boolean] :use_dualstack_endpoint
305
+ # When set to `true`, dualstack enabled endpoints (with `.aws` TLD)
306
+ # will be used if available.
307
+ #
308
+ # @option options [Boolean] :use_fips_endpoint
309
+ # When set to `true`, fips compatible endpoints will be used if available.
310
+ # When a `fips` region is used, the region is normalized and this config
311
+ # is set to `true`.
312
+ #
313
+ # @option options [Boolean] :validate_params (true)
314
+ # When `true`, request parameters are validated before
315
+ # sending the request.
316
+ #
317
+ # @option options [Aws::InternetMonitor::EndpointProvider] :endpoint_provider
318
+ # The endpoint provider used to resolve endpoints. Any object that responds to `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to `Aws::InternetMonitor::EndpointParameters`
319
+ #
320
+ # @option options [URI::HTTP,String] :http_proxy A proxy to send
321
+ # requests through. Formatted like 'http://proxy.com:123'.
322
+ #
323
+ # @option options [Float] :http_open_timeout (15) The number of
324
+ # seconds to wait when opening a HTTP session before raising a
325
+ # `Timeout::Error`.
326
+ #
327
+ # @option options [Float] :http_read_timeout (60) The default
328
+ # number of seconds to wait for response data. This value can
329
+ # safely be set per-request on the session.
330
+ #
331
+ # @option options [Float] :http_idle_timeout (5) The number of
332
+ # seconds a connection is allowed to sit idle before it is
333
+ # considered stale. Stale connections are closed and removed
334
+ # from the pool before making a request.
335
+ #
336
+ # @option options [Float] :http_continue_timeout (1) The number of
337
+ # seconds to wait for a 100-continue response before sending the
338
+ # request body. This option has no effect unless the request has
339
+ # "Expect" header set to "100-continue". Defaults to `nil` which
340
+ # disables this behaviour. This value can safely be set per
341
+ # request on the session.
342
+ #
343
+ # @option options [Float] :ssl_timeout (nil) Sets the SSL timeout
344
+ # in seconds.
345
+ #
346
+ # @option options [Boolean] :http_wire_trace (false) When `true`,
347
+ # HTTP debug output will be sent to the `:logger`.
348
+ #
349
+ # @option options [Boolean] :ssl_verify_peer (true) When `true`,
350
+ # SSL peer certificates are verified when establishing a
351
+ # connection.
352
+ #
353
+ # @option options [String] :ssl_ca_bundle Full path to the SSL
354
+ # certificate authority bundle file that should be used when
355
+ # verifying peer certificates. If you do not pass
356
+ # `:ssl_ca_bundle` or `:ssl_ca_directory` the the system default
357
+ # will be used if available.
358
+ #
359
+ # @option options [String] :ssl_ca_directory Full path of the
360
+ # directory that contains the unbundled SSL certificate
361
+ # authority files for verifying peer certificates. If you do
362
+ # not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the
363
+ # system default will be used if available.
364
+ #
365
+ def initialize(*args)
366
+ super
367
+ end
368
+
369
+ # @!group API Operations
370
+
371
+ # Creates a monitor in Amazon CloudWatch Internet Monitor. A monitor is
372
+ # built based on information from the application resources that you
373
+ # add: Virtual Private Clouds (VPCs), Amazon CloudFront distributions,
374
+ # and WorkSpaces directories.
375
+ #
376
+ # After you create a monitor, you can view the internet performance for
377
+ # your application, scoped to a location, as well as any health events
378
+ # that are impairing traffic. Internet Monitor can also diagnose whether
379
+ # the impairment is on the Amazon Web Services network or is an issue
380
+ # with an internet service provider (ISP).
381
+ #
382
+ # @option params [required, String] :monitor_name
383
+ # The name of the monitor.
384
+ #
385
+ # @option params [Array<String>] :resources
386
+ # The resources to include in a monitor, which you provide as a set of
387
+ # Amazon Resource Names (ARNs).
388
+ #
389
+ # You can add a combination of Amazon Virtual Private Clouds (VPCs) and
390
+ # Amazon CloudFront distributions, or you can add Amazon WorkSpaces
391
+ # directories. You can't add all three types of resources.
392
+ #
393
+ # <note markdown="1"> If you add only VPC resources, at least one VPC must have an Internet
394
+ # Gateway attached to it, to make sure that it has internet
395
+ # connectivity.
396
+ #
397
+ # </note>
398
+ #
399
+ # @option params [String] :client_token
400
+ # A unique, case-sensitive string of up to 64 ASCII characters that you
401
+ # specify to make an idempotent API request. Don't reuse the same
402
+ # client token for other API requests.
403
+ #
404
+ # **A suitable default value is auto-generated.** You should normally
405
+ # not need to pass this option.**
406
+ #
407
+ # @option params [Hash<String,String>] :tags
408
+ # The tags for a monitor. You can add a maximum of 50 tags in Internet
409
+ # Monitor.
410
+ #
411
+ # @option params [required, Integer] :max_city_networks_to_monitor
412
+ # The maximum number of city-network combinations (that is, combinations
413
+ # of a city location and network, such as an ISP) to be monitored for
414
+ # your resources.
415
+ #
416
+ # @return [Types::CreateMonitorOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
417
+ #
418
+ # * {Types::CreateMonitorOutput#arn #arn} => String
419
+ # * {Types::CreateMonitorOutput#status #status} => String
420
+ #
421
+ # @example Request syntax with placeholder values
422
+ #
423
+ # resp = client.create_monitor({
424
+ # monitor_name: "ResourceName", # required
425
+ # resources: ["Arn"],
426
+ # client_token: "String",
427
+ # tags: {
428
+ # "TagKey" => "TagValue",
429
+ # },
430
+ # max_city_networks_to_monitor: 1, # required
431
+ # })
432
+ #
433
+ # @example Response structure
434
+ #
435
+ # resp.arn #=> String
436
+ # resp.status #=> String, one of "PENDING", "ACTIVE", "INACTIVE", "ERROR"
437
+ #
438
+ # @see http://docs.aws.amazon.com/goto/WebAPI/internetmonitor-2021-06-03/CreateMonitor AWS API Documentation
439
+ #
440
+ # @overload create_monitor(params = {})
441
+ # @param [Hash] params ({})
442
+ def create_monitor(params = {}, options = {})
443
+ req = build_request(:create_monitor, params)
444
+ req.send_request(options)
445
+ end
446
+
447
+ # Deletes a monitor in Amazon CloudWatch Internet Monitor.
448
+ #
449
+ # @option params [required, String] :monitor_name
450
+ # The name of the monitor to delete.
451
+ #
452
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
453
+ #
454
+ # @example Request syntax with placeholder values
455
+ #
456
+ # resp = client.delete_monitor({
457
+ # monitor_name: "ResourceName", # required
458
+ # })
459
+ #
460
+ # @see http://docs.aws.amazon.com/goto/WebAPI/internetmonitor-2021-06-03/DeleteMonitor AWS API Documentation
461
+ #
462
+ # @overload delete_monitor(params = {})
463
+ # @param [Hash] params ({})
464
+ def delete_monitor(params = {}, options = {})
465
+ req = build_request(:delete_monitor, params)
466
+ req.send_request(options)
467
+ end
468
+
469
+ # Gets information the Amazon CloudWatch Internet Monitor has created
470
+ # and stored about a health event for a specified monitor. This
471
+ # information includes the impacted locations, and all of the
472
+ # information related to the event by location.
473
+ #
474
+ # The information returned includes the performance, availability, and
475
+ # round-trip time impact, information about the network providers, the
476
+ # event type, and so on.
477
+ #
478
+ # Information rolled up at the global traffic level is also returned,
479
+ # including the impact type and total traffic impact.
480
+ #
481
+ # @option params [required, String] :monitor_name
482
+ # The name of the monitor.
483
+ #
484
+ # @option params [required, String] :event_id
485
+ # The internally generated identifier of a health event. Because
486
+ # `EventID` contains the forward slash (“/”) character, you must
487
+ # URL-encode the `EventID` field in the request URL.
488
+ #
489
+ # @return [Types::GetHealthEventOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
490
+ #
491
+ # * {Types::GetHealthEventOutput#event_arn #event_arn} => String
492
+ # * {Types::GetHealthEventOutput#event_id #event_id} => String
493
+ # * {Types::GetHealthEventOutput#started_at #started_at} => Time
494
+ # * {Types::GetHealthEventOutput#ended_at #ended_at} => Time
495
+ # * {Types::GetHealthEventOutput#created_at #created_at} => Time
496
+ # * {Types::GetHealthEventOutput#last_updated_at #last_updated_at} => Time
497
+ # * {Types::GetHealthEventOutput#impacted_locations #impacted_locations} => Array&lt;Types::ImpactedLocation&gt;
498
+ # * {Types::GetHealthEventOutput#status #status} => String
499
+ # * {Types::GetHealthEventOutput#percent_of_total_traffic_impacted #percent_of_total_traffic_impacted} => Float
500
+ # * {Types::GetHealthEventOutput#impact_type #impact_type} => String
501
+ #
502
+ # @example Request syntax with placeholder values
503
+ #
504
+ # resp = client.get_health_event({
505
+ # monitor_name: "ResourceName", # required
506
+ # event_id: "HealthEventName", # required
507
+ # })
508
+ #
509
+ # @example Response structure
510
+ #
511
+ # resp.event_arn #=> String
512
+ # resp.event_id #=> String
513
+ # resp.started_at #=> Time
514
+ # resp.ended_at #=> Time
515
+ # resp.created_at #=> Time
516
+ # resp.last_updated_at #=> Time
517
+ # resp.impacted_locations #=> Array
518
+ # resp.impacted_locations[0].as_name #=> String
519
+ # resp.impacted_locations[0].as_number #=> Integer
520
+ # resp.impacted_locations[0].country #=> String
521
+ # resp.impacted_locations[0].subdivision #=> String
522
+ # resp.impacted_locations[0].metro #=> String
523
+ # resp.impacted_locations[0].city #=> String
524
+ # resp.impacted_locations[0].latitude #=> Float
525
+ # resp.impacted_locations[0].longitude #=> Float
526
+ # resp.impacted_locations[0].country_code #=> String
527
+ # resp.impacted_locations[0].subdivision_code #=> String
528
+ # resp.impacted_locations[0].service_location #=> String
529
+ # resp.impacted_locations[0].status #=> String, one of "ACTIVE", "RESOLVED"
530
+ # resp.impacted_locations[0].caused_by.networks #=> Array
531
+ # resp.impacted_locations[0].caused_by.networks[0].as_name #=> String
532
+ # resp.impacted_locations[0].caused_by.networks[0].as_number #=> Integer
533
+ # resp.impacted_locations[0].caused_by.as_path #=> Array
534
+ # resp.impacted_locations[0].caused_by.as_path[0].as_name #=> String
535
+ # resp.impacted_locations[0].caused_by.as_path[0].as_number #=> Integer
536
+ # resp.impacted_locations[0].caused_by.network_event_type #=> String, one of "AWS", "Internet"
537
+ # resp.impacted_locations[0].internet_health.availability.experience_score #=> Float
538
+ # resp.impacted_locations[0].internet_health.availability.percent_of_total_traffic_impacted #=> Float
539
+ # resp.impacted_locations[0].internet_health.availability.percent_of_client_location_impacted #=> Float
540
+ # resp.impacted_locations[0].internet_health.performance.experience_score #=> Float
541
+ # resp.impacted_locations[0].internet_health.performance.percent_of_total_traffic_impacted #=> Float
542
+ # resp.impacted_locations[0].internet_health.performance.percent_of_client_location_impacted #=> Float
543
+ # resp.impacted_locations[0].internet_health.performance.round_trip_time.p50 #=> Float
544
+ # resp.impacted_locations[0].internet_health.performance.round_trip_time.p90 #=> Float
545
+ # resp.impacted_locations[0].internet_health.performance.round_trip_time.p95 #=> Float
546
+ # resp.status #=> String, one of "ACTIVE", "RESOLVED"
547
+ # resp.percent_of_total_traffic_impacted #=> Float
548
+ # resp.impact_type #=> String, one of "AVAILABILITY", "PERFORMANCE"
549
+ #
550
+ # @see http://docs.aws.amazon.com/goto/WebAPI/internetmonitor-2021-06-03/GetHealthEvent AWS API Documentation
551
+ #
552
+ # @overload get_health_event(params = {})
553
+ # @param [Hash] params ({})
554
+ def get_health_event(params = {}, options = {})
555
+ req = build_request(:get_health_event, params)
556
+ req.send_request(options)
557
+ end
558
+
559
+ # Gets information about a monitor in Amazon CloudWatch Internet Monitor
560
+ # based on a monitor name. The information returned includes the Amazon
561
+ # Resource Name (ARN), create time, modified time, resources included in
562
+ # the monitor, and status information.
563
+ #
564
+ # @option params [required, String] :monitor_name
565
+ # The name of the monitor.
566
+ #
567
+ # @return [Types::GetMonitorOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
568
+ #
569
+ # * {Types::GetMonitorOutput#monitor_name #monitor_name} => String
570
+ # * {Types::GetMonitorOutput#monitor_arn #monitor_arn} => String
571
+ # * {Types::GetMonitorOutput#resources #resources} => Array&lt;String&gt;
572
+ # * {Types::GetMonitorOutput#status #status} => String
573
+ # * {Types::GetMonitorOutput#created_at #created_at} => Time
574
+ # * {Types::GetMonitorOutput#modified_at #modified_at} => Time
575
+ # * {Types::GetMonitorOutput#processing_status #processing_status} => String
576
+ # * {Types::GetMonitorOutput#processing_status_info #processing_status_info} => String
577
+ # * {Types::GetMonitorOutput#tags #tags} => Hash&lt;String,String&gt;
578
+ # * {Types::GetMonitorOutput#max_city_networks_to_monitor #max_city_networks_to_monitor} => Integer
579
+ #
580
+ # @example Request syntax with placeholder values
581
+ #
582
+ # resp = client.get_monitor({
583
+ # monitor_name: "ResourceName", # required
584
+ # })
585
+ #
586
+ # @example Response structure
587
+ #
588
+ # resp.monitor_name #=> String
589
+ # resp.monitor_arn #=> String
590
+ # resp.resources #=> Array
591
+ # resp.resources[0] #=> String
592
+ # resp.status #=> String, one of "PENDING", "ACTIVE", "INACTIVE", "ERROR"
593
+ # resp.created_at #=> Time
594
+ # resp.modified_at #=> Time
595
+ # resp.processing_status #=> String, one of "OK", "INACTIVE", "COLLECTING_DATA", "INSUFFICIENT_DATA", "FAULT_SERVICE", "FAULT_ACCESS_CLOUDWATCH"
596
+ # resp.processing_status_info #=> String
597
+ # resp.tags #=> Hash
598
+ # resp.tags["TagKey"] #=> String
599
+ # resp.max_city_networks_to_monitor #=> Integer
600
+ #
601
+ # @see http://docs.aws.amazon.com/goto/WebAPI/internetmonitor-2021-06-03/GetMonitor AWS API Documentation
602
+ #
603
+ # @overload get_monitor(params = {})
604
+ # @param [Hash] params ({})
605
+ def get_monitor(params = {}, options = {})
606
+ req = build_request(:get_monitor, params)
607
+ req.send_request(options)
608
+ end
609
+
610
+ # Lists all health events for a monitor in Amazon CloudWatch Internet
611
+ # Monitor. Returns all information for health events including the
612
+ # client location information the network cause and status, event start
613
+ # and end time, percentage of total traffic impacted, and status.
614
+ #
615
+ # <note markdown="1"> Health events that have start times during the time frame that is
616
+ # requested are not included in the list of health events.
617
+ #
618
+ # </note>
619
+ #
620
+ # @option params [required, String] :monitor_name
621
+ # The name of the monitor.
622
+ #
623
+ # @option params [Time,DateTime,Date,Integer,String] :start_time
624
+ # The time when a health event started.
625
+ #
626
+ # @option params [Time,DateTime,Date,Integer,String] :end_time
627
+ # The time when a health event ended. If the health event is still
628
+ # ongoing, then the end time is not set.
629
+ #
630
+ # @option params [String] :next_token
631
+ # The token for the next set of results. You receive this token from a
632
+ # previous call.
633
+ #
634
+ # @option params [Integer] :max_results
635
+ # The number of health event objects that you want to return with this
636
+ # call.
637
+ #
638
+ # @option params [String] :event_status
639
+ # The status of a health event.
640
+ #
641
+ # @return [Types::ListHealthEventsOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
642
+ #
643
+ # * {Types::ListHealthEventsOutput#health_events #health_events} => Array&lt;Types::HealthEvent&gt;
644
+ # * {Types::ListHealthEventsOutput#next_token #next_token} => String
645
+ #
646
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
647
+ #
648
+ # @example Request syntax with placeholder values
649
+ #
650
+ # resp = client.list_health_events({
651
+ # monitor_name: "ResourceName", # required
652
+ # start_time: Time.now,
653
+ # end_time: Time.now,
654
+ # next_token: "String",
655
+ # max_results: 1,
656
+ # event_status: "ACTIVE", # accepts ACTIVE, RESOLVED
657
+ # })
658
+ #
659
+ # @example Response structure
660
+ #
661
+ # resp.health_events #=> Array
662
+ # resp.health_events[0].event_arn #=> String
663
+ # resp.health_events[0].event_id #=> String
664
+ # resp.health_events[0].started_at #=> Time
665
+ # resp.health_events[0].ended_at #=> Time
666
+ # resp.health_events[0].created_at #=> Time
667
+ # resp.health_events[0].last_updated_at #=> Time
668
+ # resp.health_events[0].impacted_locations #=> Array
669
+ # resp.health_events[0].impacted_locations[0].as_name #=> String
670
+ # resp.health_events[0].impacted_locations[0].as_number #=> Integer
671
+ # resp.health_events[0].impacted_locations[0].country #=> String
672
+ # resp.health_events[0].impacted_locations[0].subdivision #=> String
673
+ # resp.health_events[0].impacted_locations[0].metro #=> String
674
+ # resp.health_events[0].impacted_locations[0].city #=> String
675
+ # resp.health_events[0].impacted_locations[0].latitude #=> Float
676
+ # resp.health_events[0].impacted_locations[0].longitude #=> Float
677
+ # resp.health_events[0].impacted_locations[0].country_code #=> String
678
+ # resp.health_events[0].impacted_locations[0].subdivision_code #=> String
679
+ # resp.health_events[0].impacted_locations[0].service_location #=> String
680
+ # resp.health_events[0].impacted_locations[0].status #=> String, one of "ACTIVE", "RESOLVED"
681
+ # resp.health_events[0].impacted_locations[0].caused_by.networks #=> Array
682
+ # resp.health_events[0].impacted_locations[0].caused_by.networks[0].as_name #=> String
683
+ # resp.health_events[0].impacted_locations[0].caused_by.networks[0].as_number #=> Integer
684
+ # resp.health_events[0].impacted_locations[0].caused_by.as_path #=> Array
685
+ # resp.health_events[0].impacted_locations[0].caused_by.as_path[0].as_name #=> String
686
+ # resp.health_events[0].impacted_locations[0].caused_by.as_path[0].as_number #=> Integer
687
+ # resp.health_events[0].impacted_locations[0].caused_by.network_event_type #=> String, one of "AWS", "Internet"
688
+ # resp.health_events[0].impacted_locations[0].internet_health.availability.experience_score #=> Float
689
+ # resp.health_events[0].impacted_locations[0].internet_health.availability.percent_of_total_traffic_impacted #=> Float
690
+ # resp.health_events[0].impacted_locations[0].internet_health.availability.percent_of_client_location_impacted #=> Float
691
+ # resp.health_events[0].impacted_locations[0].internet_health.performance.experience_score #=> Float
692
+ # resp.health_events[0].impacted_locations[0].internet_health.performance.percent_of_total_traffic_impacted #=> Float
693
+ # resp.health_events[0].impacted_locations[0].internet_health.performance.percent_of_client_location_impacted #=> Float
694
+ # resp.health_events[0].impacted_locations[0].internet_health.performance.round_trip_time.p50 #=> Float
695
+ # resp.health_events[0].impacted_locations[0].internet_health.performance.round_trip_time.p90 #=> Float
696
+ # resp.health_events[0].impacted_locations[0].internet_health.performance.round_trip_time.p95 #=> Float
697
+ # resp.health_events[0].status #=> String, one of "ACTIVE", "RESOLVED"
698
+ # resp.health_events[0].percent_of_total_traffic_impacted #=> Float
699
+ # resp.health_events[0].impact_type #=> String, one of "AVAILABILITY", "PERFORMANCE"
700
+ # resp.next_token #=> String
701
+ #
702
+ # @see http://docs.aws.amazon.com/goto/WebAPI/internetmonitor-2021-06-03/ListHealthEvents AWS API Documentation
703
+ #
704
+ # @overload list_health_events(params = {})
705
+ # @param [Hash] params ({})
706
+ def list_health_events(params = {}, options = {})
707
+ req = build_request(:list_health_events, params)
708
+ req.send_request(options)
709
+ end
710
+
711
+ # Lists all of your monitors for Amazon CloudWatch Internet Monitor and
712
+ # their statuses, along with the Amazon Resource Name (ARN) and name of
713
+ # each monitor.
714
+ #
715
+ # @option params [String] :next_token
716
+ # The token for the next set of results. You receive this token from a
717
+ # previous call.
718
+ #
719
+ # @option params [Integer] :max_results
720
+ # The number of monitor objects that you want to return with this call.
721
+ #
722
+ # @option params [String] :monitor_status
723
+ # The status of a monitor. This includes the status of the data
724
+ # processing for the monitor and the status of the monitor itself.
725
+ #
726
+ # For information about the statuses for a monitor, see [ Monitor][1].
727
+ #
728
+ #
729
+ #
730
+ # [1]: https://docs.aws.amazon.com/internet-monitor/latest/api/API_Monitor.html
731
+ #
732
+ # @return [Types::ListMonitorsOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
733
+ #
734
+ # * {Types::ListMonitorsOutput#monitors #monitors} => Array&lt;Types::Monitor&gt;
735
+ # * {Types::ListMonitorsOutput#next_token #next_token} => String
736
+ #
737
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
738
+ #
739
+ # @example Request syntax with placeholder values
740
+ #
741
+ # resp = client.list_monitors({
742
+ # next_token: "String",
743
+ # max_results: 1,
744
+ # monitor_status: "String",
745
+ # })
746
+ #
747
+ # @example Response structure
748
+ #
749
+ # resp.monitors #=> Array
750
+ # resp.monitors[0].monitor_name #=> String
751
+ # resp.monitors[0].monitor_arn #=> String
752
+ # resp.monitors[0].status #=> String, one of "PENDING", "ACTIVE", "INACTIVE", "ERROR"
753
+ # resp.monitors[0].processing_status #=> String, one of "OK", "INACTIVE", "COLLECTING_DATA", "INSUFFICIENT_DATA", "FAULT_SERVICE", "FAULT_ACCESS_CLOUDWATCH"
754
+ # resp.next_token #=> String
755
+ #
756
+ # @see http://docs.aws.amazon.com/goto/WebAPI/internetmonitor-2021-06-03/ListMonitors AWS API Documentation
757
+ #
758
+ # @overload list_monitors(params = {})
759
+ # @param [Hash] params ({})
760
+ def list_monitors(params = {}, options = {})
761
+ req = build_request(:list_monitors, params)
762
+ req.send_request(options)
763
+ end
764
+
765
+ # Lists the tags for a resource. Tags are supported only for monitors in
766
+ # Amazon CloudWatch Internet Monitor.
767
+ #
768
+ # @option params [required, String] :resource_arn
769
+ # The Amazon Resource Name (ARN) for a resource.
770
+ #
771
+ # @return [Types::ListTagsForResourceOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
772
+ #
773
+ # * {Types::ListTagsForResourceOutput#tags #tags} => Hash&lt;String,String&gt;
774
+ #
775
+ # @example Request syntax with placeholder values
776
+ #
777
+ # resp = client.list_tags_for_resource({
778
+ # resource_arn: "MonitorArn", # required
779
+ # })
780
+ #
781
+ # @example Response structure
782
+ #
783
+ # resp.tags #=> Hash
784
+ # resp.tags["TagKey"] #=> String
785
+ #
786
+ # @see http://docs.aws.amazon.com/goto/WebAPI/internetmonitor-2021-06-03/ListTagsForResource AWS API Documentation
787
+ #
788
+ # @overload list_tags_for_resource(params = {})
789
+ # @param [Hash] params ({})
790
+ def list_tags_for_resource(params = {}, options = {})
791
+ req = build_request(:list_tags_for_resource, params)
792
+ req.send_request(options)
793
+ end
794
+
795
+ # Adds a tag to a resource. Tags are supported only for monitors in
796
+ # Amazon CloudWatch Internet Monitor. You can add a maximum of 50 tags
797
+ # in Internet Monitor.
798
+ #
799
+ # A minimum of one tag is required for this call. It returns an error if
800
+ # you use the `TagResource` request with 0 tags.
801
+ #
802
+ # @option params [required, String] :resource_arn
803
+ # The Amazon Resource Name (ARN) for a tag that you add to a resource.
804
+ # Tags are supported only for monitors in Amazon CloudWatch Internet
805
+ # Monitor.
806
+ #
807
+ # @option params [required, Hash<String,String>] :tags
808
+ # Tags that you add to a resource. You can add a maximum of 50 tags in
809
+ # Internet Monitor.
810
+ #
811
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
812
+ #
813
+ # @example Request syntax with placeholder values
814
+ #
815
+ # resp = client.tag_resource({
816
+ # resource_arn: "MonitorArn", # required
817
+ # tags: { # required
818
+ # "TagKey" => "TagValue",
819
+ # },
820
+ # })
821
+ #
822
+ # @see http://docs.aws.amazon.com/goto/WebAPI/internetmonitor-2021-06-03/TagResource AWS API Documentation
823
+ #
824
+ # @overload tag_resource(params = {})
825
+ # @param [Hash] params ({})
826
+ def tag_resource(params = {}, options = {})
827
+ req = build_request(:tag_resource, params)
828
+ req.send_request(options)
829
+ end
830
+
831
+ # Removes a tag from a resource.
832
+ #
833
+ # @option params [required, String] :resource_arn
834
+ # The Amazon Resource Name (ARN) for a tag you remove a resource from.
835
+ #
836
+ # @option params [required, Array<String>] :tag_keys
837
+ # Tag keys that you remove from a resource.
838
+ #
839
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
840
+ #
841
+ # @example Request syntax with placeholder values
842
+ #
843
+ # resp = client.untag_resource({
844
+ # resource_arn: "MonitorArn", # required
845
+ # tag_keys: ["TagKey"], # required
846
+ # })
847
+ #
848
+ # @see http://docs.aws.amazon.com/goto/WebAPI/internetmonitor-2021-06-03/UntagResource AWS API Documentation
849
+ #
850
+ # @overload untag_resource(params = {})
851
+ # @param [Hash] params ({})
852
+ def untag_resource(params = {}, options = {})
853
+ req = build_request(:untag_resource, params)
854
+ req.send_request(options)
855
+ end
856
+
857
+ # Updates a monitor. You can update a monitor to add or remove
858
+ # resources, or to change the status of the monitor. You can't change
859
+ # the name of a monitor.
860
+ #
861
+ # @option params [required, String] :monitor_name
862
+ # The name of the monitor.
863
+ #
864
+ # @option params [Array<String>] :resources_to_add
865
+ # The resources to include in a monitor, which you provide as a set of
866
+ # Amazon Resource Names (ARNs).
867
+ #
868
+ # You can add a combination of Amazon Virtual Private Clouds (VPCs) and
869
+ # Amazon CloudFront distributions, or you can add Amazon WorkSpaces
870
+ # directories. You can't add all three types of resources.
871
+ #
872
+ # <note markdown="1"> If you add only VPC resources, at least one VPC must have an Internet
873
+ # Gateway attached to it, to make sure that it has internet
874
+ # connectivity.
875
+ #
876
+ # </note>
877
+ #
878
+ # @option params [Array<String>] :resources_to_remove
879
+ # The resources to remove from a monitor, which you provide as a set of
880
+ # Amazon Resource Names (ARNs).
881
+ #
882
+ # @option params [String] :status
883
+ # The status for a monitor. The accepted values for `Status` with the
884
+ # `UpdateMonitor` API call are the following: `ACTIVE` and `INACTIVE`.
885
+ # The following values are *not* accepted: `PENDING`, and `ERROR`.
886
+ #
887
+ # @option params [String] :client_token
888
+ # A unique, case-sensitive string of up to 64 ASCII characters that you
889
+ # specify to make an idempotent API request. You should not reuse the
890
+ # same client token for other API requests.
891
+ #
892
+ # **A suitable default value is auto-generated.** You should normally
893
+ # not need to pass this option.**
894
+ #
895
+ # @option params [Integer] :max_city_networks_to_monitor
896
+ # The maximum number of city-network combinations (that is, combinations
897
+ # of a city location and network, such as an ISP) to be monitored for
898
+ # your resources.
899
+ #
900
+ # @return [Types::UpdateMonitorOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
901
+ #
902
+ # * {Types::UpdateMonitorOutput#monitor_arn #monitor_arn} => String
903
+ # * {Types::UpdateMonitorOutput#status #status} => String
904
+ #
905
+ # @example Request syntax with placeholder values
906
+ #
907
+ # resp = client.update_monitor({
908
+ # monitor_name: "ResourceName", # required
909
+ # resources_to_add: ["Arn"],
910
+ # resources_to_remove: ["Arn"],
911
+ # status: "PENDING", # accepts PENDING, ACTIVE, INACTIVE, ERROR
912
+ # client_token: "String",
913
+ # max_city_networks_to_monitor: 1,
914
+ # })
915
+ #
916
+ # @example Response structure
917
+ #
918
+ # resp.monitor_arn #=> String
919
+ # resp.status #=> String, one of "PENDING", "ACTIVE", "INACTIVE", "ERROR"
920
+ #
921
+ # @see http://docs.aws.amazon.com/goto/WebAPI/internetmonitor-2021-06-03/UpdateMonitor AWS API Documentation
922
+ #
923
+ # @overload update_monitor(params = {})
924
+ # @param [Hash] params ({})
925
+ def update_monitor(params = {}, options = {})
926
+ req = build_request(:update_monitor, params)
927
+ req.send_request(options)
928
+ end
929
+
930
+ # @!endgroup
931
+
932
+ # @param params ({})
933
+ # @api private
934
+ def build_request(operation_name, params = {})
935
+ handlers = @handlers.for(operation_name)
936
+ context = Seahorse::Client::RequestContext.new(
937
+ operation_name: operation_name,
938
+ operation: config.api.operation(operation_name),
939
+ client: self,
940
+ params: params,
941
+ config: config)
942
+ context[:gem_name] = 'aws-sdk-internetmonitor'
943
+ context[:gem_version] = '1.0.0'
944
+ Seahorse::Client::Request.new(handlers, context)
945
+ end
946
+
947
+ # @api private
948
+ # @deprecated
949
+ def waiter_names
950
+ []
951
+ end
952
+
953
+ class << self
954
+
955
+ # @api private
956
+ attr_reader :identifier
957
+
958
+ # @api private
959
+ def errors_module
960
+ Errors
961
+ end
962
+
963
+ end
964
+ end
965
+ end