aws-sdk-resourceexplorer2 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,1484 @@
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(:resourceexplorer2)
37
+
38
+ module Aws::ResourceExplorer2
39
+ # An API client for ResourceExplorer2. To construct a client, you need to configure a `:region` and `:credentials`.
40
+ #
41
+ # client = Aws::ResourceExplorer2::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 = :resourceexplorer2
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::ResourceExplorer2::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::ResourceExplorer2::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::ResourceExplorer2::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
+ # Sets the specified view as the default for the Amazon Web Services
372
+ # Region in which you call this operation. When a user performs a Search
373
+ # that doesn't explicitly specify which view to use, then Amazon Web
374
+ # Services Resource Explorer automatically chooses this default view for
375
+ # searches performed in this Amazon Web Services Region.
376
+ #
377
+ # If an Amazon Web Services Region doesn't have a default view
378
+ # configured, then users must explicitly specify a view with every
379
+ # `Search` operation performed in that Region.
380
+ #
381
+ # @option params [required, String] :view_arn
382
+ # The [Amazon resource name (ARN)][1] of the view to set as the default
383
+ # for the Amazon Web Services Region and Amazon Web Services account in
384
+ # which you call this operation. The specified view must already exist
385
+ # in the called Region.
386
+ #
387
+ #
388
+ #
389
+ # [1]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
390
+ #
391
+ # @return [Types::AssociateDefaultViewOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
392
+ #
393
+ # * {Types::AssociateDefaultViewOutput#view_arn #view_arn} => String
394
+ #
395
+ # @example Request syntax with placeholder values
396
+ #
397
+ # resp = client.associate_default_view({
398
+ # view_arn: "AssociateDefaultViewInputViewArnString", # required
399
+ # })
400
+ #
401
+ # @example Response structure
402
+ #
403
+ # resp.view_arn #=> String
404
+ #
405
+ # @see http://docs.aws.amazon.com/goto/WebAPI/resource-explorer-2-2022-07-28/AssociateDefaultView AWS API Documentation
406
+ #
407
+ # @overload associate_default_view(params = {})
408
+ # @param [Hash] params ({})
409
+ def associate_default_view(params = {}, options = {})
410
+ req = build_request(:associate_default_view, params)
411
+ req.send_request(options)
412
+ end
413
+
414
+ # Retrieves details about a list of views.
415
+ #
416
+ # @option params [Array<String>] :view_arns
417
+ # A list of [Amazon resource names (ARNs)][1] that identify the views
418
+ # you want details for.
419
+ #
420
+ #
421
+ #
422
+ # [1]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
423
+ #
424
+ # @return [Types::BatchGetViewOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
425
+ #
426
+ # * {Types::BatchGetViewOutput#errors #errors} => Array&lt;Types::BatchGetViewError&gt;
427
+ # * {Types::BatchGetViewOutput#views #views} => Array&lt;Types::View&gt;
428
+ #
429
+ # @example Request syntax with placeholder values
430
+ #
431
+ # resp = client.batch_get_view({
432
+ # view_arns: ["String"],
433
+ # })
434
+ #
435
+ # @example Response structure
436
+ #
437
+ # resp.errors #=> Array
438
+ # resp.errors[0].error_message #=> String
439
+ # resp.errors[0].view_arn #=> String
440
+ # resp.views #=> Array
441
+ # resp.views[0].filters.filter_string #=> String
442
+ # resp.views[0].included_properties #=> Array
443
+ # resp.views[0].included_properties[0].name #=> String
444
+ # resp.views[0].last_updated_at #=> Time
445
+ # resp.views[0].owner #=> String
446
+ # resp.views[0].scope #=> String
447
+ # resp.views[0].view_arn #=> String
448
+ #
449
+ # @see http://docs.aws.amazon.com/goto/WebAPI/resource-explorer-2-2022-07-28/BatchGetView AWS API Documentation
450
+ #
451
+ # @overload batch_get_view(params = {})
452
+ # @param [Hash] params ({})
453
+ def batch_get_view(params = {}, options = {})
454
+ req = build_request(:batch_get_view, params)
455
+ req.send_request(options)
456
+ end
457
+
458
+ # Turns on Amazon Web Services Resource Explorer in the Amazon Web
459
+ # Services Region in which you called this operation by creating an
460
+ # index. Resource Explorer begins discovering the resources in this
461
+ # Region and stores the details about the resources in the index so that
462
+ # they can be queried by using the Search operation. You can create only
463
+ # one index in a Region.
464
+ #
465
+ # <note markdown="1"> This operation creates only a *local* index. To promote the local
466
+ # index in one Amazon Web Services Region into the aggregator index for
467
+ # the Amazon Web Services account, use the UpdateIndexType operation.
468
+ # For more information, see [Turning on cross-Region search by creating
469
+ # an aggregator index][1] in the *Amazon Web Services Resource Explorer
470
+ # User Guide*.
471
+ #
472
+ # </note>
473
+ #
474
+ # For more details about what happens when you turn on Resource Explorer
475
+ # in an Amazon Web Services Region, see [Turn on Resource Explorer to
476
+ # index your resources in an Amazon Web Services Region][2] in the
477
+ # *Amazon Web Services Resource Explorer User Guide*.
478
+ #
479
+ # If this is the first Amazon Web Services Region in which you've
480
+ # created an index for Resource Explorer, then this operation also
481
+ # [creates a service-linked role][3] in your Amazon Web Services account
482
+ # that allows Resource Explorer to enumerate your resources to populate
483
+ # the index.
484
+ #
485
+ # <ul> <li> <p> <b>Action</b>: <code>resource-explorer-2:CreateIndex</code> </p> <p> <b>Resource</b>: The ARN of the index (as it will exist after the operation completes) in the Amazon Web Services Region and account in which you're trying to create the index. Use the wildcard character (<code>*</code>) at the end of the string to match the eventual UUID. For example, the following <code>Resource</code> element restricts the role or user to creating an index in only the <code>us-east-2</code> Region of the specified account.</p> <p> <code>"Resource": "arn:aws:resource-explorer-2:us-east-2:<i>&lt;account-id&gt;</i>:index/*"</code> </p> <p>Alternatively, you can use <code>"Resource": "*"</code> to allow the role or user to create an index in any Region.</p> </li> <li> <p> <b>Action</b>: <code>iam:CreateServiceLinkedRole</code> </p> <p> <b>Resource</b>: No specific resource (*). </p> <p>This permission is required only the first time you create an index to turn on Resource Explorer in the account. Resource Explorer uses this to create the <a href="https://docs.aws.amazon.com/resource-explorer/latest/userguide/security_iam_service-linked-roles.html">service-linked role needed to index the resources in your account</a>. Resource Explorer uses the same service-linked role for all additional indexes you create afterwards.</p> </li> </ul>
486
+ #
487
+ #
488
+ #
489
+ # [1]: https://docs.aws.amazon.com/resource-explorer/latest/userguide/manage-aggregator-region.html
490
+ # [2]: https://docs.aws.amazon.com/resource-explorer/latest/userguide/manage-service-activate.html
491
+ # [3]: https://docs.aws.amazon.com/arexug/mainline/security_iam_service-linked-roles.html
492
+ #
493
+ # @option params [String] :client_token
494
+ # This value helps ensure idempotency. Resource Explorer uses this value
495
+ # to prevent the accidental creation of duplicate versions. We recommend
496
+ # that you generate a [UUID-type value][1] to ensure the uniqueness of
497
+ # your views.
498
+ #
499
+ # **A suitable default value is auto-generated.** You should normally
500
+ # not need to pass this option.**
501
+ #
502
+ #
503
+ #
504
+ # [1]: https://wikipedia.org/wiki/Universally_unique_identifier
505
+ #
506
+ # @option params [Hash<String,String>] :tags
507
+ # The specified tags are attached only to the index created in this
508
+ # Amazon Web Services Region. The tags aren't attached to any of the
509
+ # resources listed in the index.
510
+ #
511
+ # @return [Types::CreateIndexOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
512
+ #
513
+ # * {Types::CreateIndexOutput#arn #arn} => String
514
+ # * {Types::CreateIndexOutput#created_at #created_at} => Time
515
+ # * {Types::CreateIndexOutput#state #state} => String
516
+ #
517
+ # @example Request syntax with placeholder values
518
+ #
519
+ # resp = client.create_index({
520
+ # client_token: "String",
521
+ # tags: {
522
+ # "String" => "String",
523
+ # },
524
+ # })
525
+ #
526
+ # @example Response structure
527
+ #
528
+ # resp.arn #=> String
529
+ # resp.created_at #=> Time
530
+ # resp.state #=> String, one of "CREATING", "ACTIVE", "DELETING", "DELETED", "UPDATING"
531
+ #
532
+ # @see http://docs.aws.amazon.com/goto/WebAPI/resource-explorer-2-2022-07-28/CreateIndex AWS API Documentation
533
+ #
534
+ # @overload create_index(params = {})
535
+ # @param [Hash] params ({})
536
+ def create_index(params = {}, options = {})
537
+ req = build_request(:create_index, params)
538
+ req.send_request(options)
539
+ end
540
+
541
+ # Creates a view that users can query by using the Search operation.
542
+ # Results from queries that you make using this view include only
543
+ # resources that match the view's `Filters`. For more information about
544
+ # Amazon Web Services Resource Explorer views, see [Managing views][1]
545
+ # in the *Amazon Web Services Resource Explorer User Guide*.
546
+ #
547
+ # Only the principals with an IAM identity-based policy that grants
548
+ # `Allow` to the `Search` action on a `Resource` with the [Amazon
549
+ # resource name (ARN)][2] of this view can Search using views you create
550
+ # with this operation.
551
+ #
552
+ #
553
+ #
554
+ # [1]: https://docs.aws.amazon.com/arexug/mainline/manage-views.html
555
+ # [2]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
556
+ #
557
+ # @option params [String] :client_token
558
+ # This value helps ensure idempotency. Resource Explorer uses this value
559
+ # to prevent the accidental creation of duplicate versions. We recommend
560
+ # that you generate a [UUID-type value][1] to ensure the uniqueness of
561
+ # your views.
562
+ #
563
+ # **A suitable default value is auto-generated.** You should normally
564
+ # not need to pass this option.**
565
+ #
566
+ #
567
+ #
568
+ # [1]: https://wikipedia.org/wiki/Universally_unique_identifier
569
+ #
570
+ # @option params [Types::SearchFilter] :filters
571
+ # An array of strings that specify which resources are included in the
572
+ # results of queries made using this view. When you use this view in a
573
+ # Search operation, the filter string is combined with the search's
574
+ # `QueryString` parameter using a logical `AND` operator.
575
+ #
576
+ # For information about the supported syntax, see [Search query
577
+ # reference for Resource Explorer][1] in the *Amazon Web Services
578
+ # Resource Explorer User Guide*.
579
+ #
580
+ # This query string in the context of this operation supports only
581
+ # [filter prefixes][2] with optional [operators][3]. It doesn't support
582
+ # free-form text. For example, the string `region:us* service:ec2
583
+ # -tag:stage=prod` includes all Amazon EC2 resources in any Amazon Web
584
+ # Services Region that begins with the letters `us` and is *not* tagged
585
+ # with a key `Stage` that has the value `prod`.
586
+ #
587
+ #
588
+ #
589
+ # [1]: https://docs.aws.amazon.com/resource-explorer/latest/userguide/using-search-query-syntax.html
590
+ # [2]: https://docs.aws.amazon.com/resource-explorer/latest/userguide/using-search-query-syntax.html#query-syntax-filters
591
+ # [3]: https://docs.aws.amazon.com/resource-explorer/latest/userguide/using-search-query-syntax.html#query-syntax-operators
592
+ #
593
+ # @option params [Array<Types::IncludedProperty>] :included_properties
594
+ # Specifies optional fields that you want included in search results
595
+ # from this view. It is a list of objects that each describe a field to
596
+ # include.
597
+ #
598
+ # The default is an empty list, with no optional fields included in the
599
+ # results.
600
+ #
601
+ # @option params [Hash<String,String>] :tags
602
+ # Tag key and value pairs that are attached to the view.
603
+ #
604
+ # @option params [required, String] :view_name
605
+ # The name of the new view. This name appears in the list of views in
606
+ # Resource Explorer.
607
+ #
608
+ # The name must be no more than 64 characters long, and can include
609
+ # letters, digits, and the dash (-) character. The name must be unique
610
+ # within its Amazon Web Services Region.
611
+ #
612
+ # @return [Types::CreateViewOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
613
+ #
614
+ # * {Types::CreateViewOutput#view #view} => Types::View
615
+ #
616
+ # @example Request syntax with placeholder values
617
+ #
618
+ # resp = client.create_view({
619
+ # client_token: "CreateViewInputClientTokenString",
620
+ # filters: {
621
+ # filter_string: "SearchFilterFilterStringString", # required
622
+ # },
623
+ # included_properties: [
624
+ # {
625
+ # name: "IncludedPropertyNameString", # required
626
+ # },
627
+ # ],
628
+ # tags: {
629
+ # "String" => "String",
630
+ # },
631
+ # view_name: "ViewName", # required
632
+ # })
633
+ #
634
+ # @example Response structure
635
+ #
636
+ # resp.view.filters.filter_string #=> String
637
+ # resp.view.included_properties #=> Array
638
+ # resp.view.included_properties[0].name #=> String
639
+ # resp.view.last_updated_at #=> Time
640
+ # resp.view.owner #=> String
641
+ # resp.view.scope #=> String
642
+ # resp.view.view_arn #=> String
643
+ #
644
+ # @see http://docs.aws.amazon.com/goto/WebAPI/resource-explorer-2-2022-07-28/CreateView AWS API Documentation
645
+ #
646
+ # @overload create_view(params = {})
647
+ # @param [Hash] params ({})
648
+ def create_view(params = {}, options = {})
649
+ req = build_request(:create_view, params)
650
+ req.send_request(options)
651
+ end
652
+
653
+ # Deletes the specified index and turns off Amazon Web Services Resource
654
+ # Explorer in the specified Amazon Web Services Region. When you delete
655
+ # an index, Resource Explorer stops discovering and indexing resources
656
+ # in that Region. Resource Explorer also deletes all views in that
657
+ # Region. These actions occur as asynchronous background tasks. You can
658
+ # check to see when the actions are complete by using the GetIndex
659
+ # operation and checking the `Status` response value.
660
+ #
661
+ # @option params [required, String] :arn
662
+ # The [Amazon resource name (ARN)][1] of the index that you want to
663
+ # delete.
664
+ #
665
+ #
666
+ #
667
+ # [1]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
668
+ #
669
+ # @return [Types::DeleteIndexOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
670
+ #
671
+ # * {Types::DeleteIndexOutput#arn #arn} => String
672
+ # * {Types::DeleteIndexOutput#last_updated_at #last_updated_at} => Time
673
+ # * {Types::DeleteIndexOutput#state #state} => String
674
+ #
675
+ # @example Request syntax with placeholder values
676
+ #
677
+ # resp = client.delete_index({
678
+ # arn: "String", # required
679
+ # })
680
+ #
681
+ # @example Response structure
682
+ #
683
+ # resp.arn #=> String
684
+ # resp.last_updated_at #=> Time
685
+ # resp.state #=> String, one of "CREATING", "ACTIVE", "DELETING", "DELETED", "UPDATING"
686
+ #
687
+ # @see http://docs.aws.amazon.com/goto/WebAPI/resource-explorer-2-2022-07-28/DeleteIndex AWS API Documentation
688
+ #
689
+ # @overload delete_index(params = {})
690
+ # @param [Hash] params ({})
691
+ def delete_index(params = {}, options = {})
692
+ req = build_request(:delete_index, params)
693
+ req.send_request(options)
694
+ end
695
+
696
+ # Deletes the specified view.
697
+ #
698
+ # If the specified view is the default view for its Amazon Web Services
699
+ # Region, then all Search operations in that Region must explicitly
700
+ # specify the view to use until you configure a new default by calling
701
+ # the AssociateDefaultView operation.
702
+ #
703
+ # @option params [required, String] :view_arn
704
+ # The [Amazon resource name (ARN)][1] of the view that you want to
705
+ # delete.
706
+ #
707
+ #
708
+ #
709
+ # [1]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
710
+ #
711
+ # @return [Types::DeleteViewOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
712
+ #
713
+ # * {Types::DeleteViewOutput#view_arn #view_arn} => String
714
+ #
715
+ # @example Request syntax with placeholder values
716
+ #
717
+ # resp = client.delete_view({
718
+ # view_arn: "DeleteViewInputViewArnString", # required
719
+ # })
720
+ #
721
+ # @example Response structure
722
+ #
723
+ # resp.view_arn #=> String
724
+ #
725
+ # @see http://docs.aws.amazon.com/goto/WebAPI/resource-explorer-2-2022-07-28/DeleteView AWS API Documentation
726
+ #
727
+ # @overload delete_view(params = {})
728
+ # @param [Hash] params ({})
729
+ def delete_view(params = {}, options = {})
730
+ req = build_request(:delete_view, params)
731
+ req.send_request(options)
732
+ end
733
+
734
+ # After you call this operation, the affected Amazon Web Services Region
735
+ # no longer has a default view. All Search operations in that Region
736
+ # must explicitly specify a view or the operation fails. You can
737
+ # configure a new default by calling the AssociateDefaultView operation.
738
+ #
739
+ # If an Amazon Web Services Region doesn't have a default view
740
+ # configured, then users must explicitly specify a view with every
741
+ # `Search` operation performed in that Region.
742
+ #
743
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
744
+ #
745
+ # @see http://docs.aws.amazon.com/goto/WebAPI/resource-explorer-2-2022-07-28/DisassociateDefaultView AWS API Documentation
746
+ #
747
+ # @overload disassociate_default_view(params = {})
748
+ # @param [Hash] params ({})
749
+ def disassociate_default_view(params = {}, options = {})
750
+ req = build_request(:disassociate_default_view, params)
751
+ req.send_request(options)
752
+ end
753
+
754
+ # Retrieves the Amazon Resource Name (ARN) of the view that is the
755
+ # default for the Amazon Web Services Region in which you call this
756
+ # operation. You can then call GetView to retrieve the details of that
757
+ # view.
758
+ #
759
+ # @return [Types::GetDefaultViewOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
760
+ #
761
+ # * {Types::GetDefaultViewOutput#view_arn #view_arn} => String
762
+ #
763
+ # @example Response structure
764
+ #
765
+ # resp.view_arn #=> String
766
+ #
767
+ # @see http://docs.aws.amazon.com/goto/WebAPI/resource-explorer-2-2022-07-28/GetDefaultView AWS API Documentation
768
+ #
769
+ # @overload get_default_view(params = {})
770
+ # @param [Hash] params ({})
771
+ def get_default_view(params = {}, options = {})
772
+ req = build_request(:get_default_view, params)
773
+ req.send_request(options)
774
+ end
775
+
776
+ # Retrieves details about the Amazon Web Services Resource Explorer
777
+ # index in the Amazon Web Services Region in which you invoked the
778
+ # operation.
779
+ #
780
+ # @return [Types::GetIndexOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
781
+ #
782
+ # * {Types::GetIndexOutput#arn #arn} => String
783
+ # * {Types::GetIndexOutput#created_at #created_at} => Time
784
+ # * {Types::GetIndexOutput#last_updated_at #last_updated_at} => Time
785
+ # * {Types::GetIndexOutput#replicating_from #replicating_from} => Array&lt;String&gt;
786
+ # * {Types::GetIndexOutput#replicating_to #replicating_to} => Array&lt;String&gt;
787
+ # * {Types::GetIndexOutput#state #state} => String
788
+ # * {Types::GetIndexOutput#tags #tags} => Hash&lt;String,String&gt;
789
+ # * {Types::GetIndexOutput#type #type} => String
790
+ #
791
+ # @example Response structure
792
+ #
793
+ # resp.arn #=> String
794
+ # resp.created_at #=> Time
795
+ # resp.last_updated_at #=> Time
796
+ # resp.replicating_from #=> Array
797
+ # resp.replicating_from[0] #=> String
798
+ # resp.replicating_to #=> Array
799
+ # resp.replicating_to[0] #=> String
800
+ # resp.state #=> String, one of "CREATING", "ACTIVE", "DELETING", "DELETED", "UPDATING"
801
+ # resp.tags #=> Hash
802
+ # resp.tags["String"] #=> String
803
+ # resp.type #=> String, one of "LOCAL", "AGGREGATOR"
804
+ #
805
+ # @see http://docs.aws.amazon.com/goto/WebAPI/resource-explorer-2-2022-07-28/GetIndex AWS API Documentation
806
+ #
807
+ # @overload get_index(params = {})
808
+ # @param [Hash] params ({})
809
+ def get_index(params = {}, options = {})
810
+ req = build_request(:get_index, params)
811
+ req.send_request(options)
812
+ end
813
+
814
+ # Retrieves details of the specified view.
815
+ #
816
+ # @option params [required, String] :view_arn
817
+ # The [Amazon resource name (ARN)][1] of the view that you want
818
+ # information about.
819
+ #
820
+ #
821
+ #
822
+ # [1]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
823
+ #
824
+ # @return [Types::GetViewOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
825
+ #
826
+ # * {Types::GetViewOutput#tags #tags} => Hash&lt;String,String&gt;
827
+ # * {Types::GetViewOutput#view #view} => Types::View
828
+ #
829
+ # @example Request syntax with placeholder values
830
+ #
831
+ # resp = client.get_view({
832
+ # view_arn: "GetViewInputViewArnString", # required
833
+ # })
834
+ #
835
+ # @example Response structure
836
+ #
837
+ # resp.tags #=> Hash
838
+ # resp.tags["String"] #=> String
839
+ # resp.view.filters.filter_string #=> String
840
+ # resp.view.included_properties #=> Array
841
+ # resp.view.included_properties[0].name #=> String
842
+ # resp.view.last_updated_at #=> Time
843
+ # resp.view.owner #=> String
844
+ # resp.view.scope #=> String
845
+ # resp.view.view_arn #=> String
846
+ #
847
+ # @see http://docs.aws.amazon.com/goto/WebAPI/resource-explorer-2-2022-07-28/GetView AWS API Documentation
848
+ #
849
+ # @overload get_view(params = {})
850
+ # @param [Hash] params ({})
851
+ def get_view(params = {}, options = {})
852
+ req = build_request(:get_view, params)
853
+ req.send_request(options)
854
+ end
855
+
856
+ # Retrieves a list of all of the indexes in Amazon Web Services Regions
857
+ # that are currently collecting resource information for Amazon Web
858
+ # Services Resource Explorer.
859
+ #
860
+ # @option params [Integer] :max_results
861
+ # The maximum number of results that you want included on each page of
862
+ # the response. If you do not include this parameter, it defaults to a
863
+ # value appropriate to the operation. If additional items exist beyond
864
+ # those included in the current response, the `NextToken` response
865
+ # element is present and has a value (is not null). Include that value
866
+ # as the `NextToken` request parameter in the next call to the operation
867
+ # to get the next part of the results.
868
+ #
869
+ # <note markdown="1"> An API operation can return fewer results than the maximum even when
870
+ # there are more results available. You should check `NextToken` after
871
+ # every operation to ensure that you receive all of the results.
872
+ #
873
+ # </note>
874
+ #
875
+ # @option params [String] :next_token
876
+ # The parameter for receiving additional results if you receive a
877
+ # `NextToken` response in a previous request. A `NextToken` response
878
+ # indicates that more output is available. Set this parameter to the
879
+ # value of the previous call's `NextToken` response to indicate where
880
+ # the output should continue from.
881
+ #
882
+ # @option params [Array<String>] :regions
883
+ # If specified, limits the response to only information about the index
884
+ # in the specified list of Amazon Web Services Regions.
885
+ #
886
+ # @option params [String] :type
887
+ # If specified, limits the output to only indexes of the specified Type,
888
+ # either `LOCAL` or `AGGREGATOR`.
889
+ #
890
+ # Use this option to discover the aggregator index for your account.
891
+ #
892
+ # @return [Types::ListIndexesOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
893
+ #
894
+ # * {Types::ListIndexesOutput#indexes #indexes} => Array&lt;Types::Index&gt;
895
+ # * {Types::ListIndexesOutput#next_token #next_token} => String
896
+ #
897
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
898
+ #
899
+ # @example Request syntax with placeholder values
900
+ #
901
+ # resp = client.list_indexes({
902
+ # max_results: 1,
903
+ # next_token: "ListIndexesInputNextTokenString",
904
+ # regions: ["String"],
905
+ # type: "LOCAL", # accepts LOCAL, AGGREGATOR
906
+ # })
907
+ #
908
+ # @example Response structure
909
+ #
910
+ # resp.indexes #=> Array
911
+ # resp.indexes[0].arn #=> String
912
+ # resp.indexes[0].region #=> String
913
+ # resp.indexes[0].type #=> String, one of "LOCAL", "AGGREGATOR"
914
+ # resp.next_token #=> String
915
+ #
916
+ # @see http://docs.aws.amazon.com/goto/WebAPI/resource-explorer-2-2022-07-28/ListIndexes AWS API Documentation
917
+ #
918
+ # @overload list_indexes(params = {})
919
+ # @param [Hash] params ({})
920
+ def list_indexes(params = {}, options = {})
921
+ req = build_request(:list_indexes, params)
922
+ req.send_request(options)
923
+ end
924
+
925
+ # Retrieves a list of all resource types currently supported by Amazon
926
+ # Web Services Resource Explorer.
927
+ #
928
+ # @option params [Integer] :max_results
929
+ # The maximum number of results that you want included on each page of
930
+ # the response. If you do not include this parameter, it defaults to a
931
+ # value appropriate to the operation. If additional items exist beyond
932
+ # those included in the current response, the `NextToken` response
933
+ # element is present and has a value (is not null). Include that value
934
+ # as the `NextToken` request parameter in the next call to the operation
935
+ # to get the next part of the results.
936
+ #
937
+ # <note markdown="1"> An API operation can return fewer results than the maximum even when
938
+ # there are more results available. You should check `NextToken` after
939
+ # every operation to ensure that you receive all of the results.
940
+ #
941
+ # </note>
942
+ #
943
+ # @option params [String] :next_token
944
+ # The parameter for receiving additional results if you receive a
945
+ # `NextToken` response in a previous request. A `NextToken` response
946
+ # indicates that more output is available. Set this parameter to the
947
+ # value of the previous call's `NextToken` response to indicate where
948
+ # the output should continue from.
949
+ #
950
+ # @return [Types::ListSupportedResourceTypesOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
951
+ #
952
+ # * {Types::ListSupportedResourceTypesOutput#next_token #next_token} => String
953
+ # * {Types::ListSupportedResourceTypesOutput#resource_types #resource_types} => Array&lt;Types::SupportedResourceType&gt;
954
+ #
955
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
956
+ #
957
+ # @example Request syntax with placeholder values
958
+ #
959
+ # resp = client.list_supported_resource_types({
960
+ # max_results: 1,
961
+ # next_token: "String",
962
+ # })
963
+ #
964
+ # @example Response structure
965
+ #
966
+ # resp.next_token #=> String
967
+ # resp.resource_types #=> Array
968
+ # resp.resource_types[0].resource_type #=> String
969
+ # resp.resource_types[0].service #=> String
970
+ #
971
+ # @see http://docs.aws.amazon.com/goto/WebAPI/resource-explorer-2-2022-07-28/ListSupportedResourceTypes AWS API Documentation
972
+ #
973
+ # @overload list_supported_resource_types(params = {})
974
+ # @param [Hash] params ({})
975
+ def list_supported_resource_types(params = {}, options = {})
976
+ req = build_request(:list_supported_resource_types, params)
977
+ req.send_request(options)
978
+ end
979
+
980
+ # Lists the tags that are attached to the specified resource.
981
+ #
982
+ # @option params [required, String] :resource_arn
983
+ # The [Amazon resource name (ARN)][1] of the view or index that you want
984
+ # to attach tags to.
985
+ #
986
+ #
987
+ #
988
+ # [1]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
989
+ #
990
+ # @return [Types::ListTagsForResourceOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
991
+ #
992
+ # * {Types::ListTagsForResourceOutput#tags #tags} => Hash&lt;String,String&gt;
993
+ #
994
+ # @example Request syntax with placeholder values
995
+ #
996
+ # resp = client.list_tags_for_resource({
997
+ # resource_arn: "String", # required
998
+ # })
999
+ #
1000
+ # @example Response structure
1001
+ #
1002
+ # resp.tags #=> Hash
1003
+ # resp.tags["String"] #=> String
1004
+ #
1005
+ # @see http://docs.aws.amazon.com/goto/WebAPI/resource-explorer-2-2022-07-28/ListTagsForResource AWS API Documentation
1006
+ #
1007
+ # @overload list_tags_for_resource(params = {})
1008
+ # @param [Hash] params ({})
1009
+ def list_tags_for_resource(params = {}, options = {})
1010
+ req = build_request(:list_tags_for_resource, params)
1011
+ req.send_request(options)
1012
+ end
1013
+
1014
+ # Lists the [Amazon resource names (ARNs)][1] of the views available in
1015
+ # the Amazon Web Services Region in which you call this operation.
1016
+ #
1017
+ # <note markdown="1"> Always check the `NextToken` response parameter for a `null` value
1018
+ # when calling a paginated operation. These operations can occasionally
1019
+ # return an empty set of results even when there are more results
1020
+ # available. The `NextToken` response parameter value is `null` *only*
1021
+ # when there are no more results to display.
1022
+ #
1023
+ # </note>
1024
+ #
1025
+ #
1026
+ #
1027
+ # [1]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
1028
+ #
1029
+ # @option params [Integer] :max_results
1030
+ # The maximum number of results that you want included on each page of
1031
+ # the response. If you do not include this parameter, it defaults to a
1032
+ # value appropriate to the operation. If additional items exist beyond
1033
+ # those included in the current response, the `NextToken` response
1034
+ # element is present and has a value (is not null). Include that value
1035
+ # as the `NextToken` request parameter in the next call to the operation
1036
+ # to get the next part of the results.
1037
+ #
1038
+ # <note markdown="1"> An API operation can return fewer results than the maximum even when
1039
+ # there are more results available. You should check `NextToken` after
1040
+ # every operation to ensure that you receive all of the results.
1041
+ #
1042
+ # </note>
1043
+ #
1044
+ # @option params [String] :next_token
1045
+ # The parameter for receiving additional results if you receive a
1046
+ # `NextToken` response in a previous request. A `NextToken` response
1047
+ # indicates that more output is available. Set this parameter to the
1048
+ # value of the previous call's `NextToken` response to indicate where
1049
+ # the output should continue from.
1050
+ #
1051
+ # @return [Types::ListViewsOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1052
+ #
1053
+ # * {Types::ListViewsOutput#next_token #next_token} => String
1054
+ # * {Types::ListViewsOutput#views #views} => Array&lt;String&gt;
1055
+ #
1056
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
1057
+ #
1058
+ # @example Request syntax with placeholder values
1059
+ #
1060
+ # resp = client.list_views({
1061
+ # max_results: 1,
1062
+ # next_token: "String",
1063
+ # })
1064
+ #
1065
+ # @example Response structure
1066
+ #
1067
+ # resp.next_token #=> String
1068
+ # resp.views #=> Array
1069
+ # resp.views[0] #=> String
1070
+ #
1071
+ # @see http://docs.aws.amazon.com/goto/WebAPI/resource-explorer-2-2022-07-28/ListViews AWS API Documentation
1072
+ #
1073
+ # @overload list_views(params = {})
1074
+ # @param [Hash] params ({})
1075
+ def list_views(params = {}, options = {})
1076
+ req = build_request(:list_views, params)
1077
+ req.send_request(options)
1078
+ end
1079
+
1080
+ # Searches for resources and displays details about all resources that
1081
+ # match the specified criteria. You must specify a query string.
1082
+ #
1083
+ # All search queries must use a view. If you don't explicitly specify a
1084
+ # view, then Amazon Web Services Resource Explorer uses the default view
1085
+ # for the Amazon Web Services Region in which you call this operation.
1086
+ # The results are the logical intersection of the results that match
1087
+ # both the `QueryString` parameter supplied to this operation and the
1088
+ # `SearchFilter` parameter attached to the view.
1089
+ #
1090
+ # For the complete syntax supported by the `QueryString` parameter, see
1091
+ # [Search query syntax reference for Resource Explorer][1].
1092
+ #
1093
+ # If your search results are empty, or are missing results that you
1094
+ # think should be there, see [Troubleshooting Resource Explorer
1095
+ # search][2].
1096
+ #
1097
+ #
1098
+ #
1099
+ # [1]: https://docs.aws.amazon.com/resource-explorer/latest/APIReference/about-query-syntax.html
1100
+ # [2]: https://docs.aws.amazon.com/resource-explorer/latest/userguide/troubleshooting_search.html
1101
+ #
1102
+ # @option params [Integer] :max_results
1103
+ # The maximum number of results that you want included on each page of
1104
+ # the response. If you do not include this parameter, it defaults to a
1105
+ # value appropriate to the operation. If additional items exist beyond
1106
+ # those included in the current response, the `NextToken` response
1107
+ # element is present and has a value (is not null). Include that value
1108
+ # as the `NextToken` request parameter in the next call to the operation
1109
+ # to get the next part of the results.
1110
+ #
1111
+ # <note markdown="1"> An API operation can return fewer results than the maximum even when
1112
+ # there are more results available. You should check `NextToken` after
1113
+ # every operation to ensure that you receive all of the results.
1114
+ #
1115
+ # </note>
1116
+ #
1117
+ # @option params [String] :next_token
1118
+ # The parameter for receiving additional results if you receive a
1119
+ # `NextToken` response in a previous request. A `NextToken` response
1120
+ # indicates that more output is available. Set this parameter to the
1121
+ # value of the previous call's `NextToken` response to indicate where
1122
+ # the output should continue from.
1123
+ #
1124
+ # @option params [required, String] :query_string
1125
+ # A string that includes keywords and filters that specify the resources
1126
+ # that you want to include in the results.
1127
+ #
1128
+ # For the complete syntax supported by the `QueryString` parameter, see
1129
+ # [Search query syntax reference for Resource Explorer][1].
1130
+ #
1131
+ # The search is completely case insensitive. You can specify an empty
1132
+ # string to return all results up to the limit of 1,000 total results.
1133
+ #
1134
+ # <note markdown="1"> The operation can return only the first 1,000 results. If the resource
1135
+ # you want is not included, then use a different value for `QueryString`
1136
+ # to refine the results.
1137
+ #
1138
+ # </note>
1139
+ #
1140
+ #
1141
+ #
1142
+ # [1]: https://docs.aws.amazon.com/resource-explorer/latest/userguide/using-search-query-syntax.html
1143
+ #
1144
+ # @option params [String] :view_arn
1145
+ # Specifies the [Amazon resource name (ARN)][1] of the view to use for
1146
+ # the query. If you don't specify a value for this parameter, then the
1147
+ # operation automatically uses the default view for the Amazon Web
1148
+ # Services Region in which you called this operation. If the Region
1149
+ # either doesn't have a default view or if you don't have permission
1150
+ # to use the default view, then the operation fails with a `401
1151
+ # Unauthorized` exception.
1152
+ #
1153
+ #
1154
+ #
1155
+ # [1]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
1156
+ #
1157
+ # @return [Types::SearchOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1158
+ #
1159
+ # * {Types::SearchOutput#count #count} => Types::ResourceCount
1160
+ # * {Types::SearchOutput#next_token #next_token} => String
1161
+ # * {Types::SearchOutput#resources #resources} => Array&lt;Types::Resource&gt;
1162
+ # * {Types::SearchOutput#view_arn #view_arn} => String
1163
+ #
1164
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
1165
+ #
1166
+ # @example Request syntax with placeholder values
1167
+ #
1168
+ # resp = client.search({
1169
+ # max_results: 1,
1170
+ # next_token: "SearchInputNextTokenString",
1171
+ # query_string: "QueryString", # required
1172
+ # view_arn: "SearchInputViewArnString",
1173
+ # })
1174
+ #
1175
+ # @example Response structure
1176
+ #
1177
+ # resp.count.complete #=> Boolean
1178
+ # resp.count.total_resources #=> Integer
1179
+ # resp.next_token #=> String
1180
+ # resp.resources #=> Array
1181
+ # resp.resources[0].arn #=> String
1182
+ # resp.resources[0].last_reported_at #=> Time
1183
+ # resp.resources[0].owning_account_id #=> String
1184
+ # resp.resources[0].properties #=> Array
1185
+ # resp.resources[0].properties[0].last_reported_at #=> Time
1186
+ # resp.resources[0].properties[0].name #=> String
1187
+ # resp.resources[0].region #=> String
1188
+ # resp.resources[0].resource_type #=> String
1189
+ # resp.resources[0].service #=> String
1190
+ # resp.view_arn #=> String
1191
+ #
1192
+ # @see http://docs.aws.amazon.com/goto/WebAPI/resource-explorer-2-2022-07-28/Search AWS API Documentation
1193
+ #
1194
+ # @overload search(params = {})
1195
+ # @param [Hash] params ({})
1196
+ def search(params = {}, options = {})
1197
+ req = build_request(:search, params)
1198
+ req.send_request(options)
1199
+ end
1200
+
1201
+ # Adds one or more tag key and value pairs to an Amazon Web Services
1202
+ # Resource Explorer view or index.
1203
+ #
1204
+ # @option params [Hash<String,String>] :tags
1205
+ # A list of tag key and value pairs that you want to attach to the
1206
+ # specified view or index.
1207
+ #
1208
+ # @option params [required, String] :resource_arn
1209
+ # The Amazon Resource Name (ARN) of the view or index that you want to
1210
+ # attach tags to.
1211
+ #
1212
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1213
+ #
1214
+ # @example Request syntax with placeholder values
1215
+ #
1216
+ # resp = client.tag_resource({
1217
+ # tags: {
1218
+ # "String" => "String",
1219
+ # },
1220
+ # resource_arn: "String", # required
1221
+ # })
1222
+ #
1223
+ # @see http://docs.aws.amazon.com/goto/WebAPI/resource-explorer-2-2022-07-28/TagResource AWS API Documentation
1224
+ #
1225
+ # @overload tag_resource(params = {})
1226
+ # @param [Hash] params ({})
1227
+ def tag_resource(params = {}, options = {})
1228
+ req = build_request(:tag_resource, params)
1229
+ req.send_request(options)
1230
+ end
1231
+
1232
+ # Removes one or more tag key and value pairs from an Amazon Web
1233
+ # Services Resource Explorer view or index.
1234
+ #
1235
+ # @option params [required, String] :resource_arn
1236
+ # The Amazon Resource Name (ARN) of the view or index that you want to
1237
+ # remove tags from.
1238
+ #
1239
+ # @option params [required, Array<String>] :tag_keys
1240
+ # A list of the keys for the tags that you want to remove from the
1241
+ # specified view or index.
1242
+ #
1243
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1244
+ #
1245
+ # @example Request syntax with placeholder values
1246
+ #
1247
+ # resp = client.untag_resource({
1248
+ # resource_arn: "String", # required
1249
+ # tag_keys: ["String"], # required
1250
+ # })
1251
+ #
1252
+ # @see http://docs.aws.amazon.com/goto/WebAPI/resource-explorer-2-2022-07-28/UntagResource AWS API Documentation
1253
+ #
1254
+ # @overload untag_resource(params = {})
1255
+ # @param [Hash] params ({})
1256
+ def untag_resource(params = {}, options = {})
1257
+ req = build_request(:untag_resource, params)
1258
+ req.send_request(options)
1259
+ end
1260
+
1261
+ # Changes the type of the index from one of the following types to the
1262
+ # other. For more information about indexes and the role they perform in
1263
+ # Amazon Web Services Resource Explorer, see [Turning on cross-Region
1264
+ # search by creating an aggregator index][1] in the *Amazon Web Services
1265
+ # Resource Explorer User Guide*.
1266
+ #
1267
+ # * <b> <code>AGGREGATOR</code> index type</b>
1268
+ #
1269
+ # The index contains information about resources from all Amazon Web
1270
+ # Services Regions in the Amazon Web Services account in which you've
1271
+ # created a Resource Explorer index. Resource information from all
1272
+ # other Regions is replicated to this Region's index.
1273
+ #
1274
+ # When you change the index type to `AGGREGATOR`, Resource Explorer
1275
+ # turns on replication of all discovered resource information from the
1276
+ # other Amazon Web Services Regions in your account to this index. You
1277
+ # can then, from this Region only, perform resource search queries
1278
+ # that span all Amazon Web Services Regions in the Amazon Web Services
1279
+ # account. Turning on replication from all other Regions is performed
1280
+ # by asynchronous background tasks. You can check the status of the
1281
+ # asynchronous tasks by using the GetIndex operation. When the
1282
+ # asynchronous tasks complete, the `Status` response of that operation
1283
+ # changes from `UPDATING` to `ACTIVE`. After that, you can start to
1284
+ # see results from other Amazon Web Services Regions in query results.
1285
+ # However, it can take several hours for replication from all other
1286
+ # Regions to complete.
1287
+ #
1288
+ # You can have only one aggregator index per Amazon Web Services
1289
+ # account. Before you can promote a different index to be the
1290
+ # aggregator index for the account, you must first demote the existing
1291
+ # aggregator index to type `LOCAL`.
1292
+ #
1293
+ # * <b> <code>LOCAL</code> index type</b>
1294
+ #
1295
+ # The index contains information about resources in only the Amazon
1296
+ # Web Services Region in which the index exists. If an aggregator
1297
+ # index in another Region exists, then information in this local index
1298
+ # is replicated to the aggregator index.
1299
+ #
1300
+ # When you change the index type to `LOCAL`, Resource Explorer turns
1301
+ # off the replication of resource information from all other Amazon
1302
+ # Web Services Regions in the Amazon Web Services account to this
1303
+ # Region. The aggregator index remains in the `UPDATING` state until
1304
+ # all replication with other Regions successfully stops. You can check
1305
+ # the status of the asynchronous task by using the GetIndex operation.
1306
+ # When Resource Explorer successfully stops all replication with other
1307
+ # Regions, the `Status` response of that operation changes from
1308
+ # `UPDATING` to `ACTIVE`. Separately, the resource information from
1309
+ # other Regions that was previously stored in the index is deleted
1310
+ # within 30 days by another background task. Until that asynchronous
1311
+ # task completes, some results from other Regions can continue to
1312
+ # appear in search results.
1313
+ #
1314
+ # After you demote an aggregator index to a local index, you must wait
1315
+ # 24 hours before you can promote another index to be the new
1316
+ # aggregator index for the account.
1317
+ #
1318
+ #
1319
+ #
1320
+ # [1]: https://docs.aws.amazon.com/arexug/mainline/manage-aggregator-region.html
1321
+ #
1322
+ # @option params [required, String] :arn
1323
+ # The [Amazon resource name (ARN)][1] of the index that you want to
1324
+ # update.
1325
+ #
1326
+ #
1327
+ #
1328
+ # [1]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
1329
+ #
1330
+ # @option params [required, String] :type
1331
+ # The type of the index. To understand the difference between `LOCAL`
1332
+ # and `AGGREGATOR`, see [Turning on cross-Region search][1] in the
1333
+ # *Amazon Web Services Resource Explorer User Guide*.
1334
+ #
1335
+ #
1336
+ #
1337
+ # [1]: https://docs.aws.amazon.com/resource-explorer/latest/userguide/manage-aggregator-region.html
1338
+ #
1339
+ # @return [Types::UpdateIndexTypeOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1340
+ #
1341
+ # * {Types::UpdateIndexTypeOutput#arn #arn} => String
1342
+ # * {Types::UpdateIndexTypeOutput#last_updated_at #last_updated_at} => Time
1343
+ # * {Types::UpdateIndexTypeOutput#state #state} => String
1344
+ # * {Types::UpdateIndexTypeOutput#type #type} => String
1345
+ #
1346
+ # @example Request syntax with placeholder values
1347
+ #
1348
+ # resp = client.update_index_type({
1349
+ # arn: "String", # required
1350
+ # type: "LOCAL", # required, accepts LOCAL, AGGREGATOR
1351
+ # })
1352
+ #
1353
+ # @example Response structure
1354
+ #
1355
+ # resp.arn #=> String
1356
+ # resp.last_updated_at #=> Time
1357
+ # resp.state #=> String, one of "CREATING", "ACTIVE", "DELETING", "DELETED", "UPDATING"
1358
+ # resp.type #=> String, one of "LOCAL", "AGGREGATOR"
1359
+ #
1360
+ # @see http://docs.aws.amazon.com/goto/WebAPI/resource-explorer-2-2022-07-28/UpdateIndexType AWS API Documentation
1361
+ #
1362
+ # @overload update_index_type(params = {})
1363
+ # @param [Hash] params ({})
1364
+ def update_index_type(params = {}, options = {})
1365
+ req = build_request(:update_index_type, params)
1366
+ req.send_request(options)
1367
+ end
1368
+
1369
+ # Modifies some of the details of a view. You can change the filter
1370
+ # string and the list of included properties. You can't change the name
1371
+ # of the view.
1372
+ #
1373
+ # @option params [Types::SearchFilter] :filters
1374
+ # An array of strings that specify which resources are included in the
1375
+ # results of queries made using this view. When you use this view in a
1376
+ # Search operation, the filter string is combined with the search's
1377
+ # `QueryString` parameter using a logical `AND` operator.
1378
+ #
1379
+ # For information about the supported syntax, see [Search query
1380
+ # reference for Resource Explorer][1] in the *Amazon Web Services
1381
+ # Resource Explorer User Guide*.
1382
+ #
1383
+ # This query string in the context of this operation supports only
1384
+ # [filter prefixes][2] with optional [operators][3]. It doesn't support
1385
+ # free-form text. For example, the string `region:us* service:ec2
1386
+ # -tag:stage=prod` includes all Amazon EC2 resources in any Amazon Web
1387
+ # Services Region that begins with the letters `us` and is *not* tagged
1388
+ # with a key `Stage` that has the value `prod`.
1389
+ #
1390
+ #
1391
+ #
1392
+ # [1]: https://docs.aws.amazon.com/resource-explorer/latest/userguide/using-search-query-syntax.html
1393
+ # [2]: https://docs.aws.amazon.com/resource-explorer/latest/userguide/using-search-query-syntax.html#query-syntax-filters
1394
+ # [3]: https://docs.aws.amazon.com/resource-explorer/latest/userguide/using-search-query-syntax.html#query-syntax-operators
1395
+ #
1396
+ # @option params [Array<Types::IncludedProperty>] :included_properties
1397
+ # Specifies optional fields that you want included in search results
1398
+ # from this view. It is a list of objects that each describe a field to
1399
+ # include.
1400
+ #
1401
+ # The default is an empty list, with no optional fields included in the
1402
+ # results.
1403
+ #
1404
+ # @option params [required, String] :view_arn
1405
+ # The [Amazon resource name (ARN)][1] of the view that you want to
1406
+ # modify.
1407
+ #
1408
+ #
1409
+ #
1410
+ # [1]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
1411
+ #
1412
+ # @return [Types::UpdateViewOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1413
+ #
1414
+ # * {Types::UpdateViewOutput#view #view} => Types::View
1415
+ #
1416
+ # @example Request syntax with placeholder values
1417
+ #
1418
+ # resp = client.update_view({
1419
+ # filters: {
1420
+ # filter_string: "SearchFilterFilterStringString", # required
1421
+ # },
1422
+ # included_properties: [
1423
+ # {
1424
+ # name: "IncludedPropertyNameString", # required
1425
+ # },
1426
+ # ],
1427
+ # view_arn: "UpdateViewInputViewArnString", # required
1428
+ # })
1429
+ #
1430
+ # @example Response structure
1431
+ #
1432
+ # resp.view.filters.filter_string #=> String
1433
+ # resp.view.included_properties #=> Array
1434
+ # resp.view.included_properties[0].name #=> String
1435
+ # resp.view.last_updated_at #=> Time
1436
+ # resp.view.owner #=> String
1437
+ # resp.view.scope #=> String
1438
+ # resp.view.view_arn #=> String
1439
+ #
1440
+ # @see http://docs.aws.amazon.com/goto/WebAPI/resource-explorer-2-2022-07-28/UpdateView AWS API Documentation
1441
+ #
1442
+ # @overload update_view(params = {})
1443
+ # @param [Hash] params ({})
1444
+ def update_view(params = {}, options = {})
1445
+ req = build_request(:update_view, params)
1446
+ req.send_request(options)
1447
+ end
1448
+
1449
+ # @!endgroup
1450
+
1451
+ # @param params ({})
1452
+ # @api private
1453
+ def build_request(operation_name, params = {})
1454
+ handlers = @handlers.for(operation_name)
1455
+ context = Seahorse::Client::RequestContext.new(
1456
+ operation_name: operation_name,
1457
+ operation: config.api.operation(operation_name),
1458
+ client: self,
1459
+ params: params,
1460
+ config: config)
1461
+ context[:gem_name] = 'aws-sdk-resourceexplorer2'
1462
+ context[:gem_version] = '1.0.0'
1463
+ Seahorse::Client::Request.new(handlers, context)
1464
+ end
1465
+
1466
+ # @api private
1467
+ # @deprecated
1468
+ def waiter_names
1469
+ []
1470
+ end
1471
+
1472
+ class << self
1473
+
1474
+ # @api private
1475
+ attr_reader :identifier
1476
+
1477
+ # @api private
1478
+ def errors_module
1479
+ Errors
1480
+ end
1481
+
1482
+ end
1483
+ end
1484
+ end