aws-sdk-cloudwatchrum 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,903 @@
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/signature_v4.rb'
31
+ require 'aws-sdk-core/plugins/protocols/rest_json.rb'
32
+
33
+ Aws::Plugins::GlobalConfiguration.add_identifier(:cloudwatchrum)
34
+
35
+ module Aws::CloudWatchRUM
36
+ # An API client for CloudWatchRUM. To construct a client, you need to configure a `:region` and `:credentials`.
37
+ #
38
+ # client = Aws::CloudWatchRUM::Client.new(
39
+ # region: region_name,
40
+ # credentials: credentials,
41
+ # # ...
42
+ # )
43
+ #
44
+ # For details on configuring region and credentials see
45
+ # the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
46
+ #
47
+ # See {#initialize} for a full list of supported configuration options.
48
+ class Client < Seahorse::Client::Base
49
+
50
+ include Aws::ClientStubs
51
+
52
+ @identifier = :cloudwatchrum
53
+
54
+ set_api(ClientApi::API)
55
+
56
+ add_plugin(Seahorse::Client::Plugins::ContentLength)
57
+ add_plugin(Aws::Plugins::CredentialsConfiguration)
58
+ add_plugin(Aws::Plugins::Logging)
59
+ add_plugin(Aws::Plugins::ParamConverter)
60
+ add_plugin(Aws::Plugins::ParamValidator)
61
+ add_plugin(Aws::Plugins::UserAgent)
62
+ add_plugin(Aws::Plugins::HelpfulSocketErrors)
63
+ add_plugin(Aws::Plugins::RetryErrors)
64
+ add_plugin(Aws::Plugins::GlobalConfiguration)
65
+ add_plugin(Aws::Plugins::RegionalEndpoint)
66
+ add_plugin(Aws::Plugins::EndpointDiscovery)
67
+ add_plugin(Aws::Plugins::EndpointPattern)
68
+ add_plugin(Aws::Plugins::ResponsePaging)
69
+ add_plugin(Aws::Plugins::StubResponses)
70
+ add_plugin(Aws::Plugins::IdempotencyToken)
71
+ add_plugin(Aws::Plugins::JsonvalueConverter)
72
+ add_plugin(Aws::Plugins::ClientMetricsPlugin)
73
+ add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
74
+ add_plugin(Aws::Plugins::TransferEncoding)
75
+ add_plugin(Aws::Plugins::HttpChecksum)
76
+ add_plugin(Aws::Plugins::SignatureV4)
77
+ add_plugin(Aws::Plugins::Protocols::RestJson)
78
+
79
+ # @overload initialize(options)
80
+ # @param [Hash] options
81
+ # @option options [required, Aws::CredentialProvider] :credentials
82
+ # Your AWS credentials. This can be an instance of any one of the
83
+ # following classes:
84
+ #
85
+ # * `Aws::Credentials` - Used for configuring static, non-refreshing
86
+ # credentials.
87
+ #
88
+ # * `Aws::SharedCredentials` - Used for loading static credentials from a
89
+ # shared file, such as `~/.aws/config`.
90
+ #
91
+ # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
92
+ #
93
+ # * `Aws::AssumeRoleWebIdentityCredentials` - Used when you need to
94
+ # assume a role after providing credentials via the web.
95
+ #
96
+ # * `Aws::SSOCredentials` - Used for loading credentials from AWS SSO using an
97
+ # access token generated from `aws login`.
98
+ #
99
+ # * `Aws::ProcessCredentials` - Used for loading credentials from a
100
+ # process that outputs to stdout.
101
+ #
102
+ # * `Aws::InstanceProfileCredentials` - Used for loading credentials
103
+ # from an EC2 IMDS on an EC2 instance.
104
+ #
105
+ # * `Aws::ECSCredentials` - Used for loading credentials from
106
+ # instances running in ECS.
107
+ #
108
+ # * `Aws::CognitoIdentityCredentials` - Used for loading credentials
109
+ # from the Cognito Identity service.
110
+ #
111
+ # When `:credentials` are not configured directly, the following
112
+ # locations will be searched for credentials:
113
+ #
114
+ # * `Aws.config[:credentials]`
115
+ # * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
116
+ # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
117
+ # * `~/.aws/credentials`
118
+ # * `~/.aws/config`
119
+ # * EC2/ECS IMDS instance profile - When used by default, the timeouts
120
+ # are very aggressive. Construct and pass an instance of
121
+ # `Aws::InstanceProfileCredentails` or `Aws::ECSCredentials` to
122
+ # enable retries and extended timeouts.
123
+ #
124
+ # @option options [required, String] :region
125
+ # The AWS region to connect to. The configured `:region` is
126
+ # used to determine the service `:endpoint`. When not passed,
127
+ # a default `:region` is searched for in the following locations:
128
+ #
129
+ # * `Aws.config[:region]`
130
+ # * `ENV['AWS_REGION']`
131
+ # * `ENV['AMAZON_REGION']`
132
+ # * `ENV['AWS_DEFAULT_REGION']`
133
+ # * `~/.aws/credentials`
134
+ # * `~/.aws/config`
135
+ #
136
+ # @option options [String] :access_key_id
137
+ #
138
+ # @option options [Boolean] :active_endpoint_cache (false)
139
+ # When set to `true`, a thread polling for endpoints will be running in
140
+ # the background every 60 secs (default). Defaults to `false`.
141
+ #
142
+ # @option options [Boolean] :adaptive_retry_wait_to_fill (true)
143
+ # Used only in `adaptive` retry mode. When true, the request will sleep
144
+ # until there is sufficent client side capacity to retry the request.
145
+ # When false, the request will raise a `RetryCapacityNotAvailableError` and will
146
+ # not retry instead of sleeping.
147
+ #
148
+ # @option options [Boolean] :client_side_monitoring (false)
149
+ # When `true`, client-side metrics will be collected for all API requests from
150
+ # this client.
151
+ #
152
+ # @option options [String] :client_side_monitoring_client_id ("")
153
+ # Allows you to provide an identifier for this client which will be attached to
154
+ # all generated client side metrics. Defaults to an empty string.
155
+ #
156
+ # @option options [String] :client_side_monitoring_host ("127.0.0.1")
157
+ # Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client
158
+ # side monitoring agent is running on, where client metrics will be published via UDP.
159
+ #
160
+ # @option options [Integer] :client_side_monitoring_port (31000)
161
+ # Required for publishing client metrics. The port that the client side monitoring
162
+ # agent is running on, where client metrics will be published via UDP.
163
+ #
164
+ # @option options [Aws::ClientSideMonitoring::Publisher] :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher)
165
+ # Allows you to provide a custom client-side monitoring publisher class. By default,
166
+ # will use the Client Side Monitoring Agent Publisher.
167
+ #
168
+ # @option options [Boolean] :convert_params (true)
169
+ # When `true`, an attempt is made to coerce request parameters into
170
+ # the required types.
171
+ #
172
+ # @option options [Boolean] :correct_clock_skew (true)
173
+ # Used only in `standard` and adaptive retry modes. Specifies whether to apply
174
+ # a clock skew correction and retry requests with skewed client clocks.
175
+ #
176
+ # @option options [Boolean] :disable_host_prefix_injection (false)
177
+ # Set to true to disable SDK automatically adding host prefix
178
+ # to default service endpoint when available.
179
+ #
180
+ # @option options [String] :endpoint
181
+ # The client endpoint is normally constructed from the `:region`
182
+ # option. You should only configure an `:endpoint` when connecting
183
+ # to test or custom endpoints. This should be a valid HTTP(S) URI.
184
+ #
185
+ # @option options [Integer] :endpoint_cache_max_entries (1000)
186
+ # Used for the maximum size limit of the LRU cache storing endpoints data
187
+ # for endpoint discovery enabled operations. Defaults to 1000.
188
+ #
189
+ # @option options [Integer] :endpoint_cache_max_threads (10)
190
+ # Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.
191
+ #
192
+ # @option options [Integer] :endpoint_cache_poll_interval (60)
193
+ # When :endpoint_discovery and :active_endpoint_cache is enabled,
194
+ # Use this option to config the time interval in seconds for making
195
+ # requests fetching endpoints information. Defaults to 60 sec.
196
+ #
197
+ # @option options [Boolean] :endpoint_discovery (false)
198
+ # When set to `true`, endpoint discovery will be enabled for operations when available.
199
+ #
200
+ # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
201
+ # The log formatter.
202
+ #
203
+ # @option options [Symbol] :log_level (:info)
204
+ # The log level to send messages to the `:logger` at.
205
+ #
206
+ # @option options [Logger] :logger
207
+ # The Logger instance to send log messages to. If this option
208
+ # is not set, logging will be disabled.
209
+ #
210
+ # @option options [Integer] :max_attempts (3)
211
+ # An integer representing the maximum number attempts that will be made for
212
+ # a single request, including the initial attempt. For example,
213
+ # setting this value to 5 will result in a request being retried up to
214
+ # 4 times. Used in `standard` and `adaptive` retry modes.
215
+ #
216
+ # @option options [String] :profile ("default")
217
+ # Used when loading credentials from the shared credentials file
218
+ # at HOME/.aws/credentials. When not specified, 'default' is used.
219
+ #
220
+ # @option options [Proc] :retry_backoff
221
+ # A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
222
+ # This option is only used in the `legacy` retry mode.
223
+ #
224
+ # @option options [Float] :retry_base_delay (0.3)
225
+ # The base delay in seconds used by the default backoff function. This option
226
+ # is only used in the `legacy` retry mode.
227
+ #
228
+ # @option options [Symbol] :retry_jitter (:none)
229
+ # A delay randomiser function used by the default backoff function.
230
+ # Some predefined functions can be referenced by name - :none, :equal, :full,
231
+ # otherwise a Proc that takes and returns a number. This option is only used
232
+ # in the `legacy` retry mode.
233
+ #
234
+ # @see https://www.awsarchitectureblog.com/2015/03/backoff.html
235
+ #
236
+ # @option options [Integer] :retry_limit (3)
237
+ # The maximum number of times to retry failed requests. Only
238
+ # ~ 500 level server errors and certain ~ 400 level client errors
239
+ # are retried. Generally, these are throttling errors, data
240
+ # checksum errors, networking errors, timeout errors, auth errors,
241
+ # endpoint discovery, and errors from expired credentials.
242
+ # This option is only used in the `legacy` retry mode.
243
+ #
244
+ # @option options [Integer] :retry_max_delay (0)
245
+ # The maximum number of seconds to delay between retries (0 for no limit)
246
+ # used by the default backoff function. This option is only used in the
247
+ # `legacy` retry mode.
248
+ #
249
+ # @option options [String] :retry_mode ("legacy")
250
+ # Specifies which retry algorithm to use. Values are:
251
+ #
252
+ # * `legacy` - The pre-existing retry behavior. This is default value if
253
+ # no retry mode is provided.
254
+ #
255
+ # * `standard` - A standardized set of retry rules across the AWS SDKs.
256
+ # This includes support for retry quotas, which limit the number of
257
+ # unsuccessful retries a client can make.
258
+ #
259
+ # * `adaptive` - An experimental retry mode that includes all the
260
+ # functionality of `standard` mode along with automatic client side
261
+ # throttling. This is a provisional mode that may change behavior
262
+ # in the future.
263
+ #
264
+ #
265
+ # @option options [String] :secret_access_key
266
+ #
267
+ # @option options [String] :session_token
268
+ #
269
+ # @option options [Boolean] :stub_responses (false)
270
+ # Causes the client to return stubbed responses. By default
271
+ # fake responses are generated and returned. You can specify
272
+ # the response data to return or errors to raise by calling
273
+ # {ClientStubs#stub_responses}. See {ClientStubs} for more information.
274
+ #
275
+ # ** Please note ** When response stubbing is enabled, no HTTP
276
+ # requests are made, and retries are disabled.
277
+ #
278
+ # @option options [Boolean] :use_dualstack_endpoint
279
+ # When set to `true`, dualstack enabled endpoints (with `.aws` TLD)
280
+ # will be used if available.
281
+ #
282
+ # @option options [Boolean] :use_fips_endpoint
283
+ # When set to `true`, fips compatible endpoints will be used if available.
284
+ # When a `fips` region is used, the region is normalized and this config
285
+ # is set to `true`.
286
+ #
287
+ # @option options [Boolean] :validate_params (true)
288
+ # When `true`, request parameters are validated before
289
+ # sending the request.
290
+ #
291
+ # @option options [URI::HTTP,String] :http_proxy A proxy to send
292
+ # requests through. Formatted like 'http://proxy.com:123'.
293
+ #
294
+ # @option options [Float] :http_open_timeout (15) The number of
295
+ # seconds to wait when opening a HTTP session before raising a
296
+ # `Timeout::Error`.
297
+ #
298
+ # @option options [Integer] :http_read_timeout (60) The default
299
+ # number of seconds to wait for response data. This value can
300
+ # safely be set per-request on the session.
301
+ #
302
+ # @option options [Float] :http_idle_timeout (5) The number of
303
+ # seconds a connection is allowed to sit idle before it is
304
+ # considered stale. Stale connections are closed and removed
305
+ # from the pool before making a request.
306
+ #
307
+ # @option options [Float] :http_continue_timeout (1) The number of
308
+ # seconds to wait for a 100-continue response before sending the
309
+ # request body. This option has no effect unless the request has
310
+ # "Expect" header set to "100-continue". Defaults to `nil` which
311
+ # disables this behaviour. This value can safely be set per
312
+ # request on the session.
313
+ #
314
+ # @option options [Boolean] :http_wire_trace (false) When `true`,
315
+ # HTTP debug output will be sent to the `:logger`.
316
+ #
317
+ # @option options [Boolean] :ssl_verify_peer (true) When `true`,
318
+ # SSL peer certificates are verified when establishing a
319
+ # connection.
320
+ #
321
+ # @option options [String] :ssl_ca_bundle Full path to the SSL
322
+ # certificate authority bundle file that should be used when
323
+ # verifying peer certificates. If you do not pass
324
+ # `:ssl_ca_bundle` or `:ssl_ca_directory` the the system default
325
+ # will be used if available.
326
+ #
327
+ # @option options [String] :ssl_ca_directory Full path of the
328
+ # directory that contains the unbundled SSL certificate
329
+ # authority files for verifying peer certificates. If you do
330
+ # not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the
331
+ # system default will be used if available.
332
+ #
333
+ def initialize(*args)
334
+ super
335
+ end
336
+
337
+ # @!group API Operations
338
+
339
+ # Creates a Amazon CloudWatch RUM app monitor, which collects telemetry
340
+ # data from your application and sends that data to RUM. The data
341
+ # includes performance and reliability information such as page load
342
+ # time, client-side errors, and user behavior.
343
+ #
344
+ # You use this operation only to create a new app monitor. To update an
345
+ # existing app monitor, use [UpdateAppMonitor][1] instead.
346
+ #
347
+ # After you create an app monitor, sign in to the CloudWatch RUM console
348
+ # to get the JavaScript code snippet to add to your web application. For
349
+ # more information, see [How do I find a code snippet that I've already
350
+ # generated?][2]
351
+ #
352
+ #
353
+ #
354
+ # [1]: https://docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_UpdateAppMonitor.html
355
+ # [2]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-RUM-find-code-snippet.html
356
+ #
357
+ # @option params [Types::AppMonitorConfiguration] :app_monitor_configuration
358
+ # A structure that contains much of the configuration data for the app
359
+ # monitor. If you are using Amazon Cognito for authorization, you must
360
+ # include this structure in your request, and it must include the ID of
361
+ # the Amazon Cognito identity pool to use for authorization. If you
362
+ # don't include `AppMonitorConfiguration`, you must set up your own
363
+ # authorization method. For more information, see [Authorize your
364
+ # application to send data to Amazon Web Services][1].
365
+ #
366
+ # If you omit this argument, the sample rate used for RUM is set to 10%
367
+ # of the user sessions.
368
+ #
369
+ #
370
+ #
371
+ # [1]: https://docs.aws.amazon.com/monitoring/CloudWatch-RUM-get-started-authorization.html
372
+ #
373
+ # @option params [Boolean] :cw_log_enabled
374
+ # Data collected by RUM is kept by RUM for 30 days and then deleted.
375
+ # This parameter specifies whether RUM sends a copy of this telemetry
376
+ # data to Amazon CloudWatch Logs in your account. This enables you to
377
+ # keep the telemetry data for more than 30 days, but it does incur
378
+ # Amazon CloudWatch Logs charges.
379
+ #
380
+ # If you omit this parameter, the default is `false`.
381
+ #
382
+ # @option params [required, String] :domain
383
+ # The top-level internet domain name for which your application has
384
+ # administrative authority.
385
+ #
386
+ # @option params [required, String] :name
387
+ # A name for the app monitor.
388
+ #
389
+ # @option params [Hash<String,String>] :tags
390
+ # Assigns one or more tags (key-value pairs) to the app monitor.
391
+ #
392
+ # Tags can help you organize and categorize your resources. You can also
393
+ # use them to scope user permissions by granting a user permission to
394
+ # access or change only resources with certain tag values.
395
+ #
396
+ # Tags don't have any semantic meaning to Amazon Web Services and are
397
+ # interpreted strictly as strings of characters.
398
+ #
399
+ # <p>You can associate as many as 50 tags with an app monitor.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services resources</a>.</p>
400
+ #
401
+ # @return [Types::CreateAppMonitorResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
402
+ #
403
+ # * {Types::CreateAppMonitorResponse#id #id} => String
404
+ #
405
+ # @example Request syntax with placeholder values
406
+ #
407
+ # resp = client.create_app_monitor({
408
+ # app_monitor_configuration: {
409
+ # allow_cookies: false,
410
+ # enable_x_ray: false,
411
+ # excluded_pages: ["Url"],
412
+ # favorite_pages: ["String"],
413
+ # guest_role_arn: "Arn",
414
+ # identity_pool_id: "IdentityPoolId",
415
+ # included_pages: ["Url"],
416
+ # session_sample_rate: 1.0,
417
+ # telemetries: ["errors"], # accepts errors, performance, http
418
+ # },
419
+ # cw_log_enabled: false,
420
+ # domain: "AppMonitorDomain", # required
421
+ # name: "AppMonitorName", # required
422
+ # tags: {
423
+ # "TagKey" => "TagValue",
424
+ # },
425
+ # })
426
+ #
427
+ # @example Response structure
428
+ #
429
+ # resp.id #=> String
430
+ #
431
+ # @see http://docs.aws.amazon.com/goto/WebAPI/rum-2018-05-10/CreateAppMonitor AWS API Documentation
432
+ #
433
+ # @overload create_app_monitor(params = {})
434
+ # @param [Hash] params ({})
435
+ def create_app_monitor(params = {}, options = {})
436
+ req = build_request(:create_app_monitor, params)
437
+ req.send_request(options)
438
+ end
439
+
440
+ # Deletes an existing app monitor. This immediately stops the collection
441
+ # of data.
442
+ #
443
+ # @option params [required, String] :name
444
+ # The name of the app monitor to delete.
445
+ #
446
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
447
+ #
448
+ # @example Request syntax with placeholder values
449
+ #
450
+ # resp = client.delete_app_monitor({
451
+ # name: "AppMonitorName", # required
452
+ # })
453
+ #
454
+ # @see http://docs.aws.amazon.com/goto/WebAPI/rum-2018-05-10/DeleteAppMonitor AWS API Documentation
455
+ #
456
+ # @overload delete_app_monitor(params = {})
457
+ # @param [Hash] params ({})
458
+ def delete_app_monitor(params = {}, options = {})
459
+ req = build_request(:delete_app_monitor, params)
460
+ req.send_request(options)
461
+ end
462
+
463
+ # Retrieves the complete configuration information for one app monitor.
464
+ #
465
+ # @option params [required, String] :name
466
+ # The app monitor to retrieve information for.
467
+ #
468
+ # @return [Types::GetAppMonitorResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
469
+ #
470
+ # * {Types::GetAppMonitorResponse#app_monitor #app_monitor} => Types::AppMonitor
471
+ #
472
+ # @example Request syntax with placeholder values
473
+ #
474
+ # resp = client.get_app_monitor({
475
+ # name: "AppMonitorName", # required
476
+ # })
477
+ #
478
+ # @example Response structure
479
+ #
480
+ # resp.app_monitor.app_monitor_configuration.allow_cookies #=> Boolean
481
+ # resp.app_monitor.app_monitor_configuration.enable_x_ray #=> Boolean
482
+ # resp.app_monitor.app_monitor_configuration.excluded_pages #=> Array
483
+ # resp.app_monitor.app_monitor_configuration.excluded_pages[0] #=> String
484
+ # resp.app_monitor.app_monitor_configuration.favorite_pages #=> Array
485
+ # resp.app_monitor.app_monitor_configuration.favorite_pages[0] #=> String
486
+ # resp.app_monitor.app_monitor_configuration.guest_role_arn #=> String
487
+ # resp.app_monitor.app_monitor_configuration.identity_pool_id #=> String
488
+ # resp.app_monitor.app_monitor_configuration.included_pages #=> Array
489
+ # resp.app_monitor.app_monitor_configuration.included_pages[0] #=> String
490
+ # resp.app_monitor.app_monitor_configuration.session_sample_rate #=> Float
491
+ # resp.app_monitor.app_monitor_configuration.telemetries #=> Array
492
+ # resp.app_monitor.app_monitor_configuration.telemetries[0] #=> String, one of "errors", "performance", "http"
493
+ # resp.app_monitor.created #=> String
494
+ # resp.app_monitor.data_storage.cw_log.cw_log_enabled #=> Boolean
495
+ # resp.app_monitor.data_storage.cw_log.cw_log_group #=> String
496
+ # resp.app_monitor.domain #=> String
497
+ # resp.app_monitor.id #=> String
498
+ # resp.app_monitor.last_modified #=> String
499
+ # resp.app_monitor.name #=> String
500
+ # resp.app_monitor.state #=> String, one of "CREATED", "DELETING", "ACTIVE"
501
+ # resp.app_monitor.tags #=> Hash
502
+ # resp.app_monitor.tags["TagKey"] #=> String
503
+ #
504
+ # @see http://docs.aws.amazon.com/goto/WebAPI/rum-2018-05-10/GetAppMonitor AWS API Documentation
505
+ #
506
+ # @overload get_app_monitor(params = {})
507
+ # @param [Hash] params ({})
508
+ def get_app_monitor(params = {}, options = {})
509
+ req = build_request(:get_app_monitor, params)
510
+ req.send_request(options)
511
+ end
512
+
513
+ # Retrieves the raw performance events that RUM has collected from your
514
+ # web application, so that you can do your own processing or analysis of
515
+ # this data.
516
+ #
517
+ # @option params [Array<Types::QueryFilter>] :filters
518
+ # An array of structures that you can use to filter the results to those
519
+ # that match one or more sets of key-value pairs that you specify.
520
+ #
521
+ # @option params [Integer] :max_results
522
+ # The maximum number of results to return in one operation.
523
+ #
524
+ # @option params [required, String] :name
525
+ # The name of the app monitor that collected the data that you want to
526
+ # retrieve.
527
+ #
528
+ # @option params [String] :next_token
529
+ # Use the token returned by the previous operation to request the next
530
+ # page of results.
531
+ #
532
+ # @option params [required, Types::TimeRange] :time_range
533
+ # A structure that defines the time range that you want to retrieve
534
+ # results from.
535
+ #
536
+ # @return [Types::GetAppMonitorDataResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
537
+ #
538
+ # * {Types::GetAppMonitorDataResponse#events #events} => Array&lt;String&gt;
539
+ # * {Types::GetAppMonitorDataResponse#next_token #next_token} => String
540
+ #
541
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
542
+ #
543
+ # @example Request syntax with placeholder values
544
+ #
545
+ # resp = client.get_app_monitor_data({
546
+ # filters: [
547
+ # {
548
+ # name: "QueryFilterKey",
549
+ # values: ["QueryFilterValue"],
550
+ # },
551
+ # ],
552
+ # max_results: 1,
553
+ # name: "AppMonitorName", # required
554
+ # next_token: "Token",
555
+ # time_range: { # required
556
+ # after: 1, # required
557
+ # before: 1,
558
+ # },
559
+ # })
560
+ #
561
+ # @example Response structure
562
+ #
563
+ # resp.events #=> Array
564
+ # resp.events[0] #=> String
565
+ # resp.next_token #=> String
566
+ #
567
+ # @see http://docs.aws.amazon.com/goto/WebAPI/rum-2018-05-10/GetAppMonitorData AWS API Documentation
568
+ #
569
+ # @overload get_app_monitor_data(params = {})
570
+ # @param [Hash] params ({})
571
+ def get_app_monitor_data(params = {}, options = {})
572
+ req = build_request(:get_app_monitor_data, params)
573
+ req.send_request(options)
574
+ end
575
+
576
+ # Returns a list of the Amazon CloudWatch RUM app monitors in the
577
+ # account.
578
+ #
579
+ # @option params [Integer] :max_results
580
+ # The maximum number of results to return in one operation.
581
+ #
582
+ # @option params [String] :next_token
583
+ # Use the token returned by the previous operation to request the next
584
+ # page of results.
585
+ #
586
+ # @return [Types::ListAppMonitorsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
587
+ #
588
+ # * {Types::ListAppMonitorsResponse#app_monitor_summaries #app_monitor_summaries} => Array&lt;Types::AppMonitorSummary&gt;
589
+ # * {Types::ListAppMonitorsResponse#next_token #next_token} => String
590
+ #
591
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
592
+ #
593
+ # @example Request syntax with placeholder values
594
+ #
595
+ # resp = client.list_app_monitors({
596
+ # max_results: 1,
597
+ # next_token: "String",
598
+ # })
599
+ #
600
+ # @example Response structure
601
+ #
602
+ # resp.app_monitor_summaries #=> Array
603
+ # resp.app_monitor_summaries[0].created #=> String
604
+ # resp.app_monitor_summaries[0].id #=> String
605
+ # resp.app_monitor_summaries[0].last_modified #=> String
606
+ # resp.app_monitor_summaries[0].name #=> String
607
+ # resp.app_monitor_summaries[0].state #=> String, one of "CREATED", "DELETING", "ACTIVE"
608
+ # resp.next_token #=> String
609
+ #
610
+ # @see http://docs.aws.amazon.com/goto/WebAPI/rum-2018-05-10/ListAppMonitors AWS API Documentation
611
+ #
612
+ # @overload list_app_monitors(params = {})
613
+ # @param [Hash] params ({})
614
+ def list_app_monitors(params = {}, options = {})
615
+ req = build_request(:list_app_monitors, params)
616
+ req.send_request(options)
617
+ end
618
+
619
+ # Displays the tags associated with a CloudWatch RUM resource.
620
+ #
621
+ # @option params [required, String] :resource_arn
622
+ # The ARN of the resource that you want to see the tags of.
623
+ #
624
+ # @return [Types::ListTagsForResourceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
625
+ #
626
+ # * {Types::ListTagsForResourceResponse#resource_arn #resource_arn} => String
627
+ # * {Types::ListTagsForResourceResponse#tags #tags} => Hash&lt;String,String&gt;
628
+ #
629
+ # @example Request syntax with placeholder values
630
+ #
631
+ # resp = client.list_tags_for_resource({
632
+ # resource_arn: "Arn", # required
633
+ # })
634
+ #
635
+ # @example Response structure
636
+ #
637
+ # resp.resource_arn #=> String
638
+ # resp.tags #=> Hash
639
+ # resp.tags["TagKey"] #=> String
640
+ #
641
+ # @see http://docs.aws.amazon.com/goto/WebAPI/rum-2018-05-10/ListTagsForResource AWS API Documentation
642
+ #
643
+ # @overload list_tags_for_resource(params = {})
644
+ # @param [Hash] params ({})
645
+ def list_tags_for_resource(params = {}, options = {})
646
+ req = build_request(:list_tags_for_resource, params)
647
+ req.send_request(options)
648
+ end
649
+
650
+ # Sends telemetry events about your application performance and user
651
+ # behavior to CloudWatch RUM. The code snippet that RUM generates for
652
+ # you to add to your application includes `PutRumEvents` operations to
653
+ # send this data to RUM.
654
+ #
655
+ # Each `PutRumEvents` operation can send a batch of events from one user
656
+ # session.
657
+ #
658
+ # @option params [required, Types::AppMonitorDetails] :app_monitor_details
659
+ # A structure that contains information about the app monitor that
660
+ # collected this telemetry information.
661
+ #
662
+ # @option params [required, String] :batch_id
663
+ # A unique identifier for this batch of RUM event data.
664
+ #
665
+ # @option params [required, String] :id
666
+ # The ID of the app monitor that is sending this data.
667
+ #
668
+ # @option params [required, Array<Types::RumEvent>] :rum_events
669
+ # An array of structures that contain the telemetry event data.
670
+ #
671
+ # @option params [required, Types::UserDetails] :user_details
672
+ # A structure that contains information about the user session that this
673
+ # batch of events was collected from.
674
+ #
675
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
676
+ #
677
+ # @example Request syntax with placeholder values
678
+ #
679
+ # resp = client.put_rum_events({
680
+ # app_monitor_details: { # required
681
+ # id: "String",
682
+ # name: "String",
683
+ # version: "String",
684
+ # },
685
+ # batch_id: "String", # required
686
+ # id: "AppMonitorId", # required
687
+ # rum_events: [ # required
688
+ # {
689
+ # details: "JsonValue", # required
690
+ # id: "String", # required
691
+ # metadata: "JsonValue",
692
+ # timestamp: Time.now, # required
693
+ # type: "String", # required
694
+ # },
695
+ # ],
696
+ # user_details: { # required
697
+ # session_id: "String",
698
+ # user_id: "String",
699
+ # },
700
+ # })
701
+ #
702
+ # @see http://docs.aws.amazon.com/goto/WebAPI/rum-2018-05-10/PutRumEvents AWS API Documentation
703
+ #
704
+ # @overload put_rum_events(params = {})
705
+ # @param [Hash] params ({})
706
+ def put_rum_events(params = {}, options = {})
707
+ req = build_request(:put_rum_events, params)
708
+ req.send_request(options)
709
+ end
710
+
711
+ # Assigns one or more tags (key-value pairs) to the specified CloudWatch
712
+ # RUM resource. Currently, the only resources that can be tagged app
713
+ # monitors.
714
+ #
715
+ # Tags can help you organize and categorize your resources. You can also
716
+ # use them to scope user permissions by granting a user permission to
717
+ # access or change only resources with certain tag values.
718
+ #
719
+ # Tags don't have any semantic meaning to Amazon Web Services and are
720
+ # interpreted strictly as strings of characters.
721
+ #
722
+ # You can use the `TagResource` action with a resource that already has
723
+ # tags. If you specify a new tag key for the resource, this tag is
724
+ # appended to the list of tags associated with the alarm. If you specify
725
+ # a tag key that is already associated with the resource, the new tag
726
+ # value that you specify replaces the previous value for that tag.
727
+ #
728
+ # You can associate as many as 50 tags with a resource.
729
+ #
730
+ # For more information, see [Tagging Amazon Web Services resources][1].
731
+ #
732
+ #
733
+ #
734
+ # [1]: https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html
735
+ #
736
+ # @option params [required, String] :resource_arn
737
+ # The ARN of the CloudWatch RUM resource that you're adding tags to.
738
+ #
739
+ # @option params [required, Hash<String,String>] :tags
740
+ # The list of key-value pairs to associate with the resource.
741
+ #
742
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
743
+ #
744
+ # @example Request syntax with placeholder values
745
+ #
746
+ # resp = client.tag_resource({
747
+ # resource_arn: "Arn", # required
748
+ # tags: { # required
749
+ # "TagKey" => "TagValue",
750
+ # },
751
+ # })
752
+ #
753
+ # @see http://docs.aws.amazon.com/goto/WebAPI/rum-2018-05-10/TagResource AWS API Documentation
754
+ #
755
+ # @overload tag_resource(params = {})
756
+ # @param [Hash] params ({})
757
+ def tag_resource(params = {}, options = {})
758
+ req = build_request(:tag_resource, params)
759
+ req.send_request(options)
760
+ end
761
+
762
+ # Removes one or more tags from the specified resource.
763
+ #
764
+ # @option params [required, String] :resource_arn
765
+ # The ARN of the CloudWatch RUM resource that you're removing tags
766
+ # from.
767
+ #
768
+ # @option params [required, Array<String>] :tag_keys
769
+ # The list of tag keys to remove from the resource.
770
+ #
771
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
772
+ #
773
+ # @example Request syntax with placeholder values
774
+ #
775
+ # resp = client.untag_resource({
776
+ # resource_arn: "Arn", # required
777
+ # tag_keys: ["TagKey"], # required
778
+ # })
779
+ #
780
+ # @see http://docs.aws.amazon.com/goto/WebAPI/rum-2018-05-10/UntagResource AWS API Documentation
781
+ #
782
+ # @overload untag_resource(params = {})
783
+ # @param [Hash] params ({})
784
+ def untag_resource(params = {}, options = {})
785
+ req = build_request(:untag_resource, params)
786
+ req.send_request(options)
787
+ end
788
+
789
+ # Updates the configuration of an existing app monitor. When you use
790
+ # this operation, only the parts of the app monitor configuration that
791
+ # you specify in this operation are changed. For any parameters that you
792
+ # omit, the existing values are kept.
793
+ #
794
+ # You can't use this operation to change the tags of an existing app
795
+ # monitor. To change the tags of an existing app monitor, use
796
+ # [TagResource][1].
797
+ #
798
+ # To create a new app monitor, use [CreateAppMonitor][2].
799
+ #
800
+ # After you update an app monitor, sign in to the CloudWatch RUM console
801
+ # to get the updated JavaScript code snippet to add to your web
802
+ # application. For more information, see [How do I find a code snippet
803
+ # that I've already generated?][3]
804
+ #
805
+ #
806
+ #
807
+ # [1]: https://docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_TagResource.html
808
+ # [2]: https://docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_CreateAppMonitor.html
809
+ # [3]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-RUM-find-code-snippet.html
810
+ #
811
+ # @option params [Types::AppMonitorConfiguration] :app_monitor_configuration
812
+ # A structure that contains much of the configuration data for the app
813
+ # monitor. If you are using Amazon Cognito for authorization, you must
814
+ # include this structure in your request, and it must include the ID of
815
+ # the Amazon Cognito identity pool to use for authorization. If you
816
+ # don't include `AppMonitorConfiguration`, you must set up your own
817
+ # authorization method. For more information, see [Authorize your
818
+ # application to send data to Amazon Web Services][1].
819
+ #
820
+ #
821
+ #
822
+ # [1]: https://docs.aws.amazon.com/monitoring/CloudWatch-RUM-get-started-authorization.html
823
+ #
824
+ # @option params [Boolean] :cw_log_enabled
825
+ # Data collected by RUM is kept by RUM for 30 days and then deleted.
826
+ # This parameter specifies whether RUM sends a copy of this telemetry
827
+ # data to Amazon CloudWatch Logs in your account. This enables you to
828
+ # keep the telemetry data for more than 30 days, but it does incur
829
+ # Amazon CloudWatch Logs charges.
830
+ #
831
+ # @option params [String] :domain
832
+ # The top-level internet domain name for which your application has
833
+ # administrative authority.
834
+ #
835
+ # @option params [required, String] :name
836
+ # The name of the app monitor to update.
837
+ #
838
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
839
+ #
840
+ # @example Request syntax with placeholder values
841
+ #
842
+ # resp = client.update_app_monitor({
843
+ # app_monitor_configuration: {
844
+ # allow_cookies: false,
845
+ # enable_x_ray: false,
846
+ # excluded_pages: ["Url"],
847
+ # favorite_pages: ["String"],
848
+ # guest_role_arn: "Arn",
849
+ # identity_pool_id: "IdentityPoolId",
850
+ # included_pages: ["Url"],
851
+ # session_sample_rate: 1.0,
852
+ # telemetries: ["errors"], # accepts errors, performance, http
853
+ # },
854
+ # cw_log_enabled: false,
855
+ # domain: "AppMonitorDomain",
856
+ # name: "AppMonitorName", # required
857
+ # })
858
+ #
859
+ # @see http://docs.aws.amazon.com/goto/WebAPI/rum-2018-05-10/UpdateAppMonitor AWS API Documentation
860
+ #
861
+ # @overload update_app_monitor(params = {})
862
+ # @param [Hash] params ({})
863
+ def update_app_monitor(params = {}, options = {})
864
+ req = build_request(:update_app_monitor, params)
865
+ req.send_request(options)
866
+ end
867
+
868
+ # @!endgroup
869
+
870
+ # @param params ({})
871
+ # @api private
872
+ def build_request(operation_name, params = {})
873
+ handlers = @handlers.for(operation_name)
874
+ context = Seahorse::Client::RequestContext.new(
875
+ operation_name: operation_name,
876
+ operation: config.api.operation(operation_name),
877
+ client: self,
878
+ params: params,
879
+ config: config)
880
+ context[:gem_name] = 'aws-sdk-cloudwatchrum'
881
+ context[:gem_version] = '1.0.0'
882
+ Seahorse::Client::Request.new(handlers, context)
883
+ end
884
+
885
+ # @api private
886
+ # @deprecated
887
+ def waiter_names
888
+ []
889
+ end
890
+
891
+ class << self
892
+
893
+ # @api private
894
+ attr_reader :identifier
895
+
896
+ # @api private
897
+ def errors_module
898
+ Errors
899
+ end
900
+
901
+ end
902
+ end
903
+ end