aws-sdk-accessanalyzer 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: ac0e0cdbafbcd38e4ca7e2301aa41af9281ef1cd
4
+ data.tar.gz: d3d35a824f2bbaf9c1d422db010fd824fd0c76ae
5
+ SHA512:
6
+ metadata.gz: d68d24d49ce6a86a3c8cc1b114c70a6b0cd1ec80e8506de972bb8eb889ec232c10e8742a496cb1f789ca5fa06ea9d93e0add20b1d8fd7d9cb7a03d9e015986b8
7
+ data.tar.gz: 1ed431fa0a47a455479e11684707732bd8480d920efa8aa88b9522ac1b6a5ace418d2f5e5cf5fb4a12f25144f6aed1ff81911d0e57380f01936885b17886a8cc
@@ -0,0 +1,47 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing guide for more information:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ require 'aws-sdk-core'
9
+ require 'aws-sigv4'
10
+
11
+ require_relative 'aws-sdk-accessanalyzer/types'
12
+ require_relative 'aws-sdk-accessanalyzer/client_api'
13
+ require_relative 'aws-sdk-accessanalyzer/client'
14
+ require_relative 'aws-sdk-accessanalyzer/errors'
15
+ require_relative 'aws-sdk-accessanalyzer/resource'
16
+ require_relative 'aws-sdk-accessanalyzer/customizations'
17
+
18
+ # This module provides support for Access Analyzer. This module is available in the
19
+ # `aws-sdk-accessanalyzer` gem.
20
+ #
21
+ # # Client
22
+ #
23
+ # The {Client} class provides one method for each API operation. Operation
24
+ # methods each accept a hash of request parameters and return a response
25
+ # structure.
26
+ #
27
+ # See {Client} for more information.
28
+ #
29
+ # # Errors
30
+ #
31
+ # Errors returned from Access Analyzer all
32
+ # extend {Errors::ServiceError}.
33
+ #
34
+ # begin
35
+ # # do stuff
36
+ # rescue Aws::AccessAnalyzer::Errors::ServiceError
37
+ # # rescues all service API errors
38
+ # end
39
+ #
40
+ # See {Errors} for more information.
41
+ #
42
+ # @service
43
+ module Aws::AccessAnalyzer
44
+
45
+ GEM_VERSION = '1.0.0'
46
+
47
+ end
@@ -0,0 +1,1038 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing guide for more information:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ require 'seahorse/client/plugins/content_length.rb'
9
+ require 'aws-sdk-core/plugins/credentials_configuration.rb'
10
+ require 'aws-sdk-core/plugins/logging.rb'
11
+ require 'aws-sdk-core/plugins/param_converter.rb'
12
+ require 'aws-sdk-core/plugins/param_validator.rb'
13
+ require 'aws-sdk-core/plugins/user_agent.rb'
14
+ require 'aws-sdk-core/plugins/helpful_socket_errors.rb'
15
+ require 'aws-sdk-core/plugins/retry_errors.rb'
16
+ require 'aws-sdk-core/plugins/global_configuration.rb'
17
+ require 'aws-sdk-core/plugins/regional_endpoint.rb'
18
+ require 'aws-sdk-core/plugins/endpoint_discovery.rb'
19
+ require 'aws-sdk-core/plugins/endpoint_pattern.rb'
20
+ require 'aws-sdk-core/plugins/response_paging.rb'
21
+ require 'aws-sdk-core/plugins/stub_responses.rb'
22
+ require 'aws-sdk-core/plugins/idempotency_token.rb'
23
+ require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
24
+ require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
25
+ require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
26
+ require 'aws-sdk-core/plugins/transfer_encoding.rb'
27
+ require 'aws-sdk-core/plugins/signature_v4.rb'
28
+ require 'aws-sdk-core/plugins/protocols/rest_json.rb'
29
+
30
+ Aws::Plugins::GlobalConfiguration.add_identifier(:accessanalyzer)
31
+
32
+ module Aws::AccessAnalyzer
33
+ class Client < Seahorse::Client::Base
34
+
35
+ include Aws::ClientStubs
36
+
37
+ @identifier = :accessanalyzer
38
+
39
+ set_api(ClientApi::API)
40
+
41
+ add_plugin(Seahorse::Client::Plugins::ContentLength)
42
+ add_plugin(Aws::Plugins::CredentialsConfiguration)
43
+ add_plugin(Aws::Plugins::Logging)
44
+ add_plugin(Aws::Plugins::ParamConverter)
45
+ add_plugin(Aws::Plugins::ParamValidator)
46
+ add_plugin(Aws::Plugins::UserAgent)
47
+ add_plugin(Aws::Plugins::HelpfulSocketErrors)
48
+ add_plugin(Aws::Plugins::RetryErrors)
49
+ add_plugin(Aws::Plugins::GlobalConfiguration)
50
+ add_plugin(Aws::Plugins::RegionalEndpoint)
51
+ add_plugin(Aws::Plugins::EndpointDiscovery)
52
+ add_plugin(Aws::Plugins::EndpointPattern)
53
+ add_plugin(Aws::Plugins::ResponsePaging)
54
+ add_plugin(Aws::Plugins::StubResponses)
55
+ add_plugin(Aws::Plugins::IdempotencyToken)
56
+ add_plugin(Aws::Plugins::JsonvalueConverter)
57
+ add_plugin(Aws::Plugins::ClientMetricsPlugin)
58
+ add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
59
+ add_plugin(Aws::Plugins::TransferEncoding)
60
+ add_plugin(Aws::Plugins::SignatureV4)
61
+ add_plugin(Aws::Plugins::Protocols::RestJson)
62
+
63
+ # @overload initialize(options)
64
+ # @param [Hash] options
65
+ # @option options [required, Aws::CredentialProvider] :credentials
66
+ # Your AWS credentials. This can be an instance of any one of the
67
+ # following classes:
68
+ #
69
+ # * `Aws::Credentials` - Used for configuring static, non-refreshing
70
+ # credentials.
71
+ #
72
+ # * `Aws::InstanceProfileCredentials` - Used for loading credentials
73
+ # from an EC2 IMDS on an EC2 instance.
74
+ #
75
+ # * `Aws::SharedCredentials` - Used for loading credentials from a
76
+ # shared file, such as `~/.aws/config`.
77
+ #
78
+ # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
79
+ #
80
+ # When `:credentials` are not configured directly, the following
81
+ # locations will be searched for credentials:
82
+ #
83
+ # * `Aws.config[:credentials]`
84
+ # * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
85
+ # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
86
+ # * `~/.aws/credentials`
87
+ # * `~/.aws/config`
88
+ # * EC2 IMDS instance profile - When used by default, the timeouts are
89
+ # very aggressive. Construct and pass an instance of
90
+ # `Aws::InstanceProfileCredentails` to enable retries and extended
91
+ # timeouts.
92
+ #
93
+ # @option options [required, String] :region
94
+ # The AWS region to connect to. The configured `:region` is
95
+ # used to determine the service `:endpoint`. When not passed,
96
+ # a default `:region` is search for in the following locations:
97
+ #
98
+ # * `Aws.config[:region]`
99
+ # * `ENV['AWS_REGION']`
100
+ # * `ENV['AMAZON_REGION']`
101
+ # * `ENV['AWS_DEFAULT_REGION']`
102
+ # * `~/.aws/credentials`
103
+ # * `~/.aws/config`
104
+ #
105
+ # @option options [String] :access_key_id
106
+ #
107
+ # @option options [Boolean] :active_endpoint_cache (false)
108
+ # When set to `true`, a thread polling for endpoints will be running in
109
+ # the background every 60 secs (default). Defaults to `false`.
110
+ #
111
+ # @option options [Boolean] :client_side_monitoring (false)
112
+ # When `true`, client-side metrics will be collected for all API requests from
113
+ # this client.
114
+ #
115
+ # @option options [String] :client_side_monitoring_client_id ("")
116
+ # Allows you to provide an identifier for this client which will be attached to
117
+ # all generated client side metrics. Defaults to an empty string.
118
+ #
119
+ # @option options [String] :client_side_monitoring_host ("127.0.0.1")
120
+ # Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client
121
+ # side monitoring agent is running on, where client metrics will be published via UDP.
122
+ #
123
+ # @option options [Integer] :client_side_monitoring_port (31000)
124
+ # Required for publishing client metrics. The port that the client side monitoring
125
+ # agent is running on, where client metrics will be published via UDP.
126
+ #
127
+ # @option options [Aws::ClientSideMonitoring::Publisher] :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher)
128
+ # Allows you to provide a custom client-side monitoring publisher class. By default,
129
+ # will use the Client Side Monitoring Agent Publisher.
130
+ #
131
+ # @option options [Boolean] :convert_params (true)
132
+ # When `true`, an attempt is made to coerce request parameters into
133
+ # the required types.
134
+ #
135
+ # @option options [Boolean] :disable_host_prefix_injection (false)
136
+ # Set to true to disable SDK automatically adding host prefix
137
+ # to default service endpoint when available.
138
+ #
139
+ # @option options [String] :endpoint
140
+ # The client endpoint is normally constructed from the `:region`
141
+ # option. You should only configure an `:endpoint` when connecting
142
+ # to test endpoints. This should be avalid HTTP(S) URI.
143
+ #
144
+ # @option options [Integer] :endpoint_cache_max_entries (1000)
145
+ # Used for the maximum size limit of the LRU cache storing endpoints data
146
+ # for endpoint discovery enabled operations. Defaults to 1000.
147
+ #
148
+ # @option options [Integer] :endpoint_cache_max_threads (10)
149
+ # Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.
150
+ #
151
+ # @option options [Integer] :endpoint_cache_poll_interval (60)
152
+ # When :endpoint_discovery and :active_endpoint_cache is enabled,
153
+ # Use this option to config the time interval in seconds for making
154
+ # requests fetching endpoints information. Defaults to 60 sec.
155
+ #
156
+ # @option options [Boolean] :endpoint_discovery (false)
157
+ # When set to `true`, endpoint discovery will be enabled for operations when available. Defaults to `false`.
158
+ #
159
+ # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
160
+ # The log formatter.
161
+ #
162
+ # @option options [Symbol] :log_level (:info)
163
+ # The log level to send messages to the `:logger` at.
164
+ #
165
+ # @option options [Logger] :logger
166
+ # The Logger instance to send log messages to. If this option
167
+ # is not set, logging will be disabled.
168
+ #
169
+ # @option options [String] :profile ("default")
170
+ # Used when loading credentials from the shared credentials file
171
+ # at HOME/.aws/credentials. When not specified, 'default' is used.
172
+ #
173
+ # @option options [Float] :retry_base_delay (0.3)
174
+ # The base delay in seconds used by the default backoff function.
175
+ #
176
+ # @option options [Symbol] :retry_jitter (:none)
177
+ # A delay randomiser function used by the default backoff function. Some predefined functions can be referenced by name - :none, :equal, :full, otherwise a Proc that takes and returns a number.
178
+ #
179
+ # @see https://www.awsarchitectureblog.com/2015/03/backoff.html
180
+ #
181
+ # @option options [Integer] :retry_limit (3)
182
+ # The maximum number of times to retry failed requests. Only
183
+ # ~ 500 level server errors and certain ~ 400 level client errors
184
+ # are retried. Generally, these are throttling errors, data
185
+ # checksum errors, networking errors, timeout errors and auth
186
+ # errors from expired credentials.
187
+ #
188
+ # @option options [Integer] :retry_max_delay (0)
189
+ # The maximum number of seconds to delay between retries (0 for no limit) used by the default backoff function.
190
+ #
191
+ # @option options [String] :secret_access_key
192
+ #
193
+ # @option options [String] :session_token
194
+ #
195
+ # @option options [Boolean] :stub_responses (false)
196
+ # Causes the client to return stubbed responses. By default
197
+ # fake responses are generated and returned. You can specify
198
+ # the response data to return or errors to raise by calling
199
+ # {ClientStubs#stub_responses}. See {ClientStubs} for more information.
200
+ #
201
+ # ** Please note ** When response stubbing is enabled, no HTTP
202
+ # requests are made, and retries are disabled.
203
+ #
204
+ # @option options [Boolean] :validate_params (true)
205
+ # When `true`, request parameters are validated before
206
+ # sending the request.
207
+ #
208
+ # @option options [URI::HTTP,String] :http_proxy A proxy to send
209
+ # requests through. Formatted like 'http://proxy.com:123'.
210
+ #
211
+ # @option options [Float] :http_open_timeout (15) The number of
212
+ # seconds to wait when opening a HTTP session before rasing a
213
+ # `Timeout::Error`.
214
+ #
215
+ # @option options [Integer] :http_read_timeout (60) The default
216
+ # number of seconds to wait for response data. This value can
217
+ # safely be set
218
+ # per-request on the session yeidled by {#session_for}.
219
+ #
220
+ # @option options [Float] :http_idle_timeout (5) The number of
221
+ # seconds a connection is allowed to sit idble before it is
222
+ # considered stale. Stale connections are closed and removed
223
+ # from the pool before making a request.
224
+ #
225
+ # @option options [Float] :http_continue_timeout (1) The number of
226
+ # seconds to wait for a 100-continue response before sending the
227
+ # request body. This option has no effect unless the request has
228
+ # "Expect" header set to "100-continue". Defaults to `nil` which
229
+ # disables this behaviour. This value can safely be set per
230
+ # request on the session yeidled by {#session_for}.
231
+ #
232
+ # @option options [Boolean] :http_wire_trace (false) When `true`,
233
+ # HTTP debug output will be sent to the `:logger`.
234
+ #
235
+ # @option options [Boolean] :ssl_verify_peer (true) When `true`,
236
+ # SSL peer certificates are verified when establishing a
237
+ # connection.
238
+ #
239
+ # @option options [String] :ssl_ca_bundle Full path to the SSL
240
+ # certificate authority bundle file that should be used when
241
+ # verifying peer certificates. If you do not pass
242
+ # `:ssl_ca_bundle` or `:ssl_ca_directory` the the system default
243
+ # will be used if available.
244
+ #
245
+ # @option options [String] :ssl_ca_directory Full path of the
246
+ # directory that contains the unbundled SSL certificate
247
+ # authority files for verifying peer certificates. If you do
248
+ # not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the
249
+ # system default will be used if available.
250
+ #
251
+ def initialize(*args)
252
+ super
253
+ end
254
+
255
+ # @!group API Operations
256
+
257
+ # Creates an analyzer with a zone of trust set to your account.
258
+ #
259
+ # @option params [required, String] :analyzer_name
260
+ # The name of the analyzer to create.
261
+ #
262
+ # @option params [Array<Types::InlineArchiveRule>] :archive_rules
263
+ # Specifies the archive rules to add for the analyzer.
264
+ #
265
+ # @option params [String] :client_token
266
+ # A client token.
267
+ #
268
+ # **A suitable default value is auto-generated.** You should normally
269
+ # not need to pass this option.**
270
+ #
271
+ # @option params [Hash<String,String>] :tags
272
+ # The tags to apply to the analyzer.
273
+ #
274
+ # @option params [required, String] :type
275
+ # The zone of trust for the analyzer. You can create only one analyzer
276
+ # per account per Region.
277
+ #
278
+ # @return [Types::CreateAnalyzerResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
279
+ #
280
+ # * {Types::CreateAnalyzerResponse#arn #arn} => String
281
+ #
282
+ # @example Request syntax with placeholder values
283
+ #
284
+ # resp = client.create_analyzer({
285
+ # analyzer_name: "Name", # required
286
+ # archive_rules: [
287
+ # {
288
+ # filter: { # required
289
+ # "String" => {
290
+ # contains: ["String"],
291
+ # eq: ["String"],
292
+ # exists: false,
293
+ # neq: ["String"],
294
+ # },
295
+ # },
296
+ # rule_name: "Name", # required
297
+ # },
298
+ # ],
299
+ # client_token: "String",
300
+ # tags: {
301
+ # "String" => "String",
302
+ # },
303
+ # type: "ACCOUNT", # required, accepts ACCOUNT
304
+ # })
305
+ #
306
+ # @example Response structure
307
+ #
308
+ # resp.arn #=> String
309
+ #
310
+ # @see http://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/CreateAnalyzer AWS API Documentation
311
+ #
312
+ # @overload create_analyzer(params = {})
313
+ # @param [Hash] params ({})
314
+ def create_analyzer(params = {}, options = {})
315
+ req = build_request(:create_analyzer, params)
316
+ req.send_request(options)
317
+ end
318
+
319
+ # Creates an archive rule for the specified analyzer.
320
+ #
321
+ # @option params [required, String] :analyzer_name
322
+ # The name of the created analyzer.
323
+ #
324
+ # @option params [String] :client_token
325
+ # A client token.
326
+ #
327
+ # **A suitable default value is auto-generated.** You should normally
328
+ # not need to pass this option.**
329
+ #
330
+ # @option params [required, Hash<String,Types::Criterion>] :filter
331
+ # The criteria for the rule.
332
+ #
333
+ # @option params [required, String] :rule_name
334
+ # The name of the rule to create.
335
+ #
336
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
337
+ #
338
+ # @example Request syntax with placeholder values
339
+ #
340
+ # resp = client.create_archive_rule({
341
+ # analyzer_name: "Name", # required
342
+ # client_token: "String",
343
+ # filter: { # required
344
+ # "String" => {
345
+ # contains: ["String"],
346
+ # eq: ["String"],
347
+ # exists: false,
348
+ # neq: ["String"],
349
+ # },
350
+ # },
351
+ # rule_name: "Name", # required
352
+ # })
353
+ #
354
+ # @see http://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/CreateArchiveRule AWS API Documentation
355
+ #
356
+ # @overload create_archive_rule(params = {})
357
+ # @param [Hash] params ({})
358
+ def create_archive_rule(params = {}, options = {})
359
+ req = build_request(:create_archive_rule, params)
360
+ req.send_request(options)
361
+ end
362
+
363
+ # Deletes the specified analyzer. When you delete an analyzer, Access
364
+ # Analyzer is disabled for the account in the current or specific
365
+ # Region. All findings that were generated by the analyzer are deleted.
366
+ # You cannot undo this action.
367
+ #
368
+ # @option params [required, String] :analyzer_name
369
+ # The name of the analyzer to delete.
370
+ #
371
+ # @option params [String] :client_token
372
+ # A client token.
373
+ #
374
+ # **A suitable default value is auto-generated.** You should normally
375
+ # not need to pass this option.**
376
+ #
377
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
378
+ #
379
+ # @example Request syntax with placeholder values
380
+ #
381
+ # resp = client.delete_analyzer({
382
+ # analyzer_name: "Name", # required
383
+ # client_token: "String",
384
+ # })
385
+ #
386
+ # @see http://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/DeleteAnalyzer AWS API Documentation
387
+ #
388
+ # @overload delete_analyzer(params = {})
389
+ # @param [Hash] params ({})
390
+ def delete_analyzer(params = {}, options = {})
391
+ req = build_request(:delete_analyzer, params)
392
+ req.send_request(options)
393
+ end
394
+
395
+ # Deletes the specified archive rule.
396
+ #
397
+ # @option params [required, String] :analyzer_name
398
+ # The name of the analyzer that was deleted.
399
+ #
400
+ # @option params [String] :client_token
401
+ # A client token.
402
+ #
403
+ # **A suitable default value is auto-generated.** You should normally
404
+ # not need to pass this option.**
405
+ #
406
+ # @option params [required, String] :rule_name
407
+ # The name of the rule to delete.
408
+ #
409
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
410
+ #
411
+ # @example Request syntax with placeholder values
412
+ #
413
+ # resp = client.delete_archive_rule({
414
+ # analyzer_name: "Name", # required
415
+ # client_token: "String",
416
+ # rule_name: "Name", # required
417
+ # })
418
+ #
419
+ # @see http://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/DeleteArchiveRule AWS API Documentation
420
+ #
421
+ # @overload delete_archive_rule(params = {})
422
+ # @param [Hash] params ({})
423
+ def delete_archive_rule(params = {}, options = {})
424
+ req = build_request(:delete_archive_rule, params)
425
+ req.send_request(options)
426
+ end
427
+
428
+ # Retrieves information about an analyzed resource.
429
+ #
430
+ # @option params [required, String] :analyzer_arn
431
+ # The ARN of the analyzer to retrieve information from.
432
+ #
433
+ # @option params [required, String] :resource_arn
434
+ # The ARN of the resource to retrieve information about.
435
+ #
436
+ # @return [Types::GetAnalyzedResourceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
437
+ #
438
+ # * {Types::GetAnalyzedResourceResponse#resource #resource} => Types::AnalyzedResource
439
+ #
440
+ # @example Request syntax with placeholder values
441
+ #
442
+ # resp = client.get_analyzed_resource({
443
+ # analyzer_arn: "AnalyzerArn", # required
444
+ # resource_arn: "ResourceArn", # required
445
+ # })
446
+ #
447
+ # @example Response structure
448
+ #
449
+ # resp.resource.actions #=> Array
450
+ # resp.resource.actions[0] #=> String
451
+ # resp.resource.analyzed_at #=> Time
452
+ # resp.resource.created_at #=> Time
453
+ # resp.resource.error #=> String
454
+ # resp.resource.is_public #=> Boolean
455
+ # resp.resource.resource_arn #=> String
456
+ # resp.resource.resource_type #=> String, one of "AWS::IAM::Role", "AWS::KMS::Key", "AWS::Lambda::Function", "AWS::Lambda::LayerVersion", "AWS::S3::Bucket", "AWS::SQS::Queue"
457
+ # resp.resource.shared_via #=> Array
458
+ # resp.resource.shared_via[0] #=> String
459
+ # resp.resource.status #=> String, one of "ACTIVE", "ARCHIVED", "RESOLVED"
460
+ # resp.resource.updated_at #=> Time
461
+ #
462
+ # @see http://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/GetAnalyzedResource AWS API Documentation
463
+ #
464
+ # @overload get_analyzed_resource(params = {})
465
+ # @param [Hash] params ({})
466
+ def get_analyzed_resource(params = {}, options = {})
467
+ req = build_request(:get_analyzed_resource, params)
468
+ req.send_request(options)
469
+ end
470
+
471
+ # Retrieves information about the specified analyzer.
472
+ #
473
+ # @option params [required, String] :analyzer_name
474
+ # The name of the analyzer retrieved.
475
+ #
476
+ # @return [Types::GetAnalyzerResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
477
+ #
478
+ # * {Types::GetAnalyzerResponse#analyzer #analyzer} => Types::AnalyzerSummary
479
+ #
480
+ # @example Request syntax with placeholder values
481
+ #
482
+ # resp = client.get_analyzer({
483
+ # analyzer_name: "Name", # required
484
+ # })
485
+ #
486
+ # @example Response structure
487
+ #
488
+ # resp.analyzer.arn #=> String
489
+ # resp.analyzer.created_at #=> Time
490
+ # resp.analyzer.last_resource_analyzed #=> String
491
+ # resp.analyzer.last_resource_analyzed_at #=> Time
492
+ # resp.analyzer.name #=> String
493
+ # resp.analyzer.tags #=> Hash
494
+ # resp.analyzer.tags["String"] #=> String
495
+ # resp.analyzer.type #=> String, one of "ACCOUNT"
496
+ #
497
+ # @see http://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/GetAnalyzer AWS API Documentation
498
+ #
499
+ # @overload get_analyzer(params = {})
500
+ # @param [Hash] params ({})
501
+ def get_analyzer(params = {}, options = {})
502
+ req = build_request(:get_analyzer, params)
503
+ req.send_request(options)
504
+ end
505
+
506
+ # Retrieves information about an archive rule.
507
+ #
508
+ # @option params [required, String] :analyzer_name
509
+ # The name of the analyzer to retrieve rules from.
510
+ #
511
+ # @option params [required, String] :rule_name
512
+ # The name of the rule to retrieve.
513
+ #
514
+ # @return [Types::GetArchiveRuleResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
515
+ #
516
+ # * {Types::GetArchiveRuleResponse#archive_rule #archive_rule} => Types::ArchiveRuleSummary
517
+ #
518
+ # @example Request syntax with placeholder values
519
+ #
520
+ # resp = client.get_archive_rule({
521
+ # analyzer_name: "Name", # required
522
+ # rule_name: "Name", # required
523
+ # })
524
+ #
525
+ # @example Response structure
526
+ #
527
+ # resp.archive_rule.created_at #=> Time
528
+ # resp.archive_rule.filter #=> Hash
529
+ # resp.archive_rule.filter["String"].contains #=> Array
530
+ # resp.archive_rule.filter["String"].contains[0] #=> String
531
+ # resp.archive_rule.filter["String"].eq #=> Array
532
+ # resp.archive_rule.filter["String"].eq[0] #=> String
533
+ # resp.archive_rule.filter["String"].exists #=> Boolean
534
+ # resp.archive_rule.filter["String"].neq #=> Array
535
+ # resp.archive_rule.filter["String"].neq[0] #=> String
536
+ # resp.archive_rule.rule_name #=> String
537
+ # resp.archive_rule.updated_at #=> Time
538
+ #
539
+ # @see http://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/GetArchiveRule AWS API Documentation
540
+ #
541
+ # @overload get_archive_rule(params = {})
542
+ # @param [Hash] params ({})
543
+ def get_archive_rule(params = {}, options = {})
544
+ req = build_request(:get_archive_rule, params)
545
+ req.send_request(options)
546
+ end
547
+
548
+ # Retrieves information about the specified finding.
549
+ #
550
+ # @option params [required, String] :analyzer_arn
551
+ # The ARN of the analyzer that generated the finding.
552
+ #
553
+ # @option params [required, String] :id
554
+ # The ID of the finding to retrieve.
555
+ #
556
+ # @return [Types::GetFindingResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
557
+ #
558
+ # * {Types::GetFindingResponse#finding #finding} => Types::Finding
559
+ #
560
+ # @example Request syntax with placeholder values
561
+ #
562
+ # resp = client.get_finding({
563
+ # analyzer_arn: "AnalyzerArn", # required
564
+ # id: "FindingId", # required
565
+ # })
566
+ #
567
+ # @example Response structure
568
+ #
569
+ # resp.finding.action #=> Array
570
+ # resp.finding.action[0] #=> String
571
+ # resp.finding.analyzed_at #=> Time
572
+ # resp.finding.condition #=> Hash
573
+ # resp.finding.condition["String"] #=> String
574
+ # resp.finding.created_at #=> Time
575
+ # resp.finding.error #=> String
576
+ # resp.finding.id #=> String
577
+ # resp.finding.is_public #=> Boolean
578
+ # resp.finding.principal #=> Hash
579
+ # resp.finding.principal["String"] #=> String
580
+ # resp.finding.resource #=> String
581
+ # resp.finding.resource_type #=> String, one of "AWS::IAM::Role", "AWS::KMS::Key", "AWS::Lambda::Function", "AWS::Lambda::LayerVersion", "AWS::S3::Bucket", "AWS::SQS::Queue"
582
+ # resp.finding.status #=> String, one of "ACTIVE", "ARCHIVED", "RESOLVED"
583
+ # resp.finding.updated_at #=> Time
584
+ #
585
+ # @see http://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/GetFinding AWS API Documentation
586
+ #
587
+ # @overload get_finding(params = {})
588
+ # @param [Hash] params ({})
589
+ def get_finding(params = {}, options = {})
590
+ req = build_request(:get_finding, params)
591
+ req.send_request(options)
592
+ end
593
+
594
+ # Retrieves a list of resources that have been analyzed.
595
+ #
596
+ # @option params [required, String] :analyzer_arn
597
+ # The ARN of the analyzer to retrieve a list of analyzed resources from.
598
+ #
599
+ # @option params [Integer] :max_results
600
+ # The maximum number of results to return in the response.
601
+ #
602
+ # @option params [String] :next_token
603
+ # A token used for pagination of results returned.
604
+ #
605
+ # @option params [String] :resource_type
606
+ # The type of resource.
607
+ #
608
+ # @return [Types::ListAnalyzedResourcesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
609
+ #
610
+ # * {Types::ListAnalyzedResourcesResponse#analyzed_resources #analyzed_resources} => Array&lt;Types::AnalyzedResourceSummary&gt;
611
+ # * {Types::ListAnalyzedResourcesResponse#next_token #next_token} => String
612
+ #
613
+ # @example Request syntax with placeholder values
614
+ #
615
+ # resp = client.list_analyzed_resources({
616
+ # analyzer_arn: "AnalyzerArn", # required
617
+ # max_results: 1,
618
+ # next_token: "Token",
619
+ # resource_type: "AWS::IAM::Role", # accepts AWS::IAM::Role, AWS::KMS::Key, AWS::Lambda::Function, AWS::Lambda::LayerVersion, AWS::S3::Bucket, AWS::SQS::Queue
620
+ # })
621
+ #
622
+ # @example Response structure
623
+ #
624
+ # resp.analyzed_resources #=> Array
625
+ # resp.analyzed_resources[0].resource_arn #=> String
626
+ # resp.analyzed_resources[0].resource_type #=> String, one of "AWS::IAM::Role", "AWS::KMS::Key", "AWS::Lambda::Function", "AWS::Lambda::LayerVersion", "AWS::S3::Bucket", "AWS::SQS::Queue"
627
+ # resp.next_token #=> String
628
+ #
629
+ # @see http://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/ListAnalyzedResources AWS API Documentation
630
+ #
631
+ # @overload list_analyzed_resources(params = {})
632
+ # @param [Hash] params ({})
633
+ def list_analyzed_resources(params = {}, options = {})
634
+ req = build_request(:list_analyzed_resources, params)
635
+ req.send_request(options)
636
+ end
637
+
638
+ # Retrieves a list of analyzers.
639
+ #
640
+ # @option params [Integer] :max_results
641
+ # The maximum number of results to return in the response.
642
+ #
643
+ # @option params [String] :next_token
644
+ # A token used for pagination of results returned.
645
+ #
646
+ # @option params [String] :type
647
+ # The type of analyzer, which corresponds to the zone of trust selected
648
+ # when the analyzer was created.
649
+ #
650
+ # @return [Types::ListAnalyzersResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
651
+ #
652
+ # * {Types::ListAnalyzersResponse#analyzers #analyzers} => Array&lt;Types::AnalyzerSummary&gt;
653
+ # * {Types::ListAnalyzersResponse#next_token #next_token} => String
654
+ #
655
+ # @example Request syntax with placeholder values
656
+ #
657
+ # resp = client.list_analyzers({
658
+ # max_results: 1,
659
+ # next_token: "Token",
660
+ # type: "ACCOUNT", # accepts ACCOUNT
661
+ # })
662
+ #
663
+ # @example Response structure
664
+ #
665
+ # resp.analyzers #=> Array
666
+ # resp.analyzers[0].arn #=> String
667
+ # resp.analyzers[0].created_at #=> Time
668
+ # resp.analyzers[0].last_resource_analyzed #=> String
669
+ # resp.analyzers[0].last_resource_analyzed_at #=> Time
670
+ # resp.analyzers[0].name #=> String
671
+ # resp.analyzers[0].tags #=> Hash
672
+ # resp.analyzers[0].tags["String"] #=> String
673
+ # resp.analyzers[0].type #=> String, one of "ACCOUNT"
674
+ # resp.next_token #=> String
675
+ #
676
+ # @see http://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/ListAnalyzers AWS API Documentation
677
+ #
678
+ # @overload list_analyzers(params = {})
679
+ # @param [Hash] params ({})
680
+ def list_analyzers(params = {}, options = {})
681
+ req = build_request(:list_analyzers, params)
682
+ req.send_request(options)
683
+ end
684
+
685
+ # Retrieves a list of archive rules created for the specified analyzer.
686
+ #
687
+ # @option params [required, String] :analyzer_name
688
+ # The name of the analyzer to retrieve rules from.
689
+ #
690
+ # @option params [Integer] :max_results
691
+ # The maximum number of results to return in the request.
692
+ #
693
+ # @option params [String] :next_token
694
+ # A token used for pagination of results returned.
695
+ #
696
+ # @return [Types::ListArchiveRulesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
697
+ #
698
+ # * {Types::ListArchiveRulesResponse#archive_rules #archive_rules} => Array&lt;Types::ArchiveRuleSummary&gt;
699
+ # * {Types::ListArchiveRulesResponse#next_token #next_token} => String
700
+ #
701
+ # @example Request syntax with placeholder values
702
+ #
703
+ # resp = client.list_archive_rules({
704
+ # analyzer_name: "Name", # required
705
+ # max_results: 1,
706
+ # next_token: "Token",
707
+ # })
708
+ #
709
+ # @example Response structure
710
+ #
711
+ # resp.archive_rules #=> Array
712
+ # resp.archive_rules[0].created_at #=> Time
713
+ # resp.archive_rules[0].filter #=> Hash
714
+ # resp.archive_rules[0].filter["String"].contains #=> Array
715
+ # resp.archive_rules[0].filter["String"].contains[0] #=> String
716
+ # resp.archive_rules[0].filter["String"].eq #=> Array
717
+ # resp.archive_rules[0].filter["String"].eq[0] #=> String
718
+ # resp.archive_rules[0].filter["String"].exists #=> Boolean
719
+ # resp.archive_rules[0].filter["String"].neq #=> Array
720
+ # resp.archive_rules[0].filter["String"].neq[0] #=> String
721
+ # resp.archive_rules[0].rule_name #=> String
722
+ # resp.archive_rules[0].updated_at #=> Time
723
+ # resp.next_token #=> String
724
+ #
725
+ # @see http://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/ListArchiveRules AWS API Documentation
726
+ #
727
+ # @overload list_archive_rules(params = {})
728
+ # @param [Hash] params ({})
729
+ def list_archive_rules(params = {}, options = {})
730
+ req = build_request(:list_archive_rules, params)
731
+ req.send_request(options)
732
+ end
733
+
734
+ # Retrieves a list of findings generated by the specified analyzer.
735
+ #
736
+ # @option params [required, String] :analyzer_arn
737
+ # The ARN of the analyzer to retrieve findings from.
738
+ #
739
+ # @option params [Hash<String,Types::Criterion>] :filter
740
+ # A filter to match for the findings to return.
741
+ #
742
+ # @option params [Integer] :max_results
743
+ # The maximum number of results to return in the response.
744
+ #
745
+ # @option params [String] :next_token
746
+ # A token used for pagination of results returned.
747
+ #
748
+ # @option params [Types::SortCriteria] :sort
749
+ # The sort order for the findings returned.
750
+ #
751
+ # @return [Types::ListFindingsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
752
+ #
753
+ # * {Types::ListFindingsResponse#findings #findings} => Array&lt;Types::FindingSummary&gt;
754
+ # * {Types::ListFindingsResponse#next_token #next_token} => String
755
+ #
756
+ # @example Request syntax with placeholder values
757
+ #
758
+ # resp = client.list_findings({
759
+ # analyzer_arn: "AnalyzerArn", # required
760
+ # filter: {
761
+ # "String" => {
762
+ # contains: ["String"],
763
+ # eq: ["String"],
764
+ # exists: false,
765
+ # neq: ["String"],
766
+ # },
767
+ # },
768
+ # max_results: 1,
769
+ # next_token: "Token",
770
+ # sort: {
771
+ # attribute_name: "String",
772
+ # order_by: "ASC", # accepts ASC, DESC
773
+ # },
774
+ # })
775
+ #
776
+ # @example Response structure
777
+ #
778
+ # resp.findings #=> Array
779
+ # resp.findings[0].action #=> Array
780
+ # resp.findings[0].action[0] #=> String
781
+ # resp.findings[0].analyzed_at #=> Time
782
+ # resp.findings[0].condition #=> Hash
783
+ # resp.findings[0].condition["String"] #=> String
784
+ # resp.findings[0].created_at #=> Time
785
+ # resp.findings[0].error #=> String
786
+ # resp.findings[0].id #=> String
787
+ # resp.findings[0].is_public #=> Boolean
788
+ # resp.findings[0].principal #=> Hash
789
+ # resp.findings[0].principal["String"] #=> String
790
+ # resp.findings[0].resource #=> String
791
+ # resp.findings[0].resource_type #=> String, one of "AWS::IAM::Role", "AWS::KMS::Key", "AWS::Lambda::Function", "AWS::Lambda::LayerVersion", "AWS::S3::Bucket", "AWS::SQS::Queue"
792
+ # resp.findings[0].status #=> String, one of "ACTIVE", "ARCHIVED", "RESOLVED"
793
+ # resp.findings[0].updated_at #=> Time
794
+ # resp.next_token #=> String
795
+ #
796
+ # @see http://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/ListFindings AWS API Documentation
797
+ #
798
+ # @overload list_findings(params = {})
799
+ # @param [Hash] params ({})
800
+ def list_findings(params = {}, options = {})
801
+ req = build_request(:list_findings, params)
802
+ req.send_request(options)
803
+ end
804
+
805
+ # Retrieves a list of tags applied to the specified resource.
806
+ #
807
+ # @option params [required, String] :resource_arn
808
+ # The ARN of the resource to retrieve tags from.
809
+ #
810
+ # @return [Types::ListTagsForResourceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
811
+ #
812
+ # * {Types::ListTagsForResourceResponse#tags #tags} => Hash&lt;String,String&gt;
813
+ #
814
+ # @example Request syntax with placeholder values
815
+ #
816
+ # resp = client.list_tags_for_resource({
817
+ # resource_arn: "String", # required
818
+ # })
819
+ #
820
+ # @example Response structure
821
+ #
822
+ # resp.tags #=> Hash
823
+ # resp.tags["String"] #=> String
824
+ #
825
+ # @see http://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/ListTagsForResource AWS API Documentation
826
+ #
827
+ # @overload list_tags_for_resource(params = {})
828
+ # @param [Hash] params ({})
829
+ def list_tags_for_resource(params = {}, options = {})
830
+ req = build_request(:list_tags_for_resource, params)
831
+ req.send_request(options)
832
+ end
833
+
834
+ # Starts a scan of the policies applied to the specified resource.
835
+ #
836
+ # @option params [required, String] :analyzer_arn
837
+ # The ARN of the analyzer to use to scan the policies applied to the
838
+ # specified resource.
839
+ #
840
+ # @option params [required, String] :resource_arn
841
+ # The ARN of the resource to scan.
842
+ #
843
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
844
+ #
845
+ # @example Request syntax with placeholder values
846
+ #
847
+ # resp = client.start_resource_scan({
848
+ # analyzer_arn: "AnalyzerArn", # required
849
+ # resource_arn: "ResourceArn", # required
850
+ # })
851
+ #
852
+ # @see http://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/StartResourceScan AWS API Documentation
853
+ #
854
+ # @overload start_resource_scan(params = {})
855
+ # @param [Hash] params ({})
856
+ def start_resource_scan(params = {}, options = {})
857
+ req = build_request(:start_resource_scan, params)
858
+ req.send_request(options)
859
+ end
860
+
861
+ # Adds a tag to the specified resource.
862
+ #
863
+ # @option params [required, String] :resource_arn
864
+ # The ARN of the resource to add the tag to.
865
+ #
866
+ # @option params [required, Hash<String,String>] :tags
867
+ # The tags to add to the resource.
868
+ #
869
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
870
+ #
871
+ # @example Request syntax with placeholder values
872
+ #
873
+ # resp = client.tag_resource({
874
+ # resource_arn: "String", # required
875
+ # tags: { # required
876
+ # "String" => "String",
877
+ # },
878
+ # })
879
+ #
880
+ # @see http://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/TagResource AWS API Documentation
881
+ #
882
+ # @overload tag_resource(params = {})
883
+ # @param [Hash] params ({})
884
+ def tag_resource(params = {}, options = {})
885
+ req = build_request(:tag_resource, params)
886
+ req.send_request(options)
887
+ end
888
+
889
+ # Removes a tag from the specified resource.
890
+ #
891
+ # @option params [required, String] :resource_arn
892
+ # The ARN of the resource to remove the tag from.
893
+ #
894
+ # @option params [required, Array<String>] :tag_keys
895
+ # The key for the tag to add.
896
+ #
897
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
898
+ #
899
+ # @example Request syntax with placeholder values
900
+ #
901
+ # resp = client.untag_resource({
902
+ # resource_arn: "String", # required
903
+ # tag_keys: ["String"], # required
904
+ # })
905
+ #
906
+ # @see http://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/UntagResource AWS API Documentation
907
+ #
908
+ # @overload untag_resource(params = {})
909
+ # @param [Hash] params ({})
910
+ def untag_resource(params = {}, options = {})
911
+ req = build_request(:untag_resource, params)
912
+ req.send_request(options)
913
+ end
914
+
915
+ # Updates the specified archive rule.
916
+ #
917
+ # @option params [required, String] :analyzer_name
918
+ # The name of the analyzer to update the archive rules for.
919
+ #
920
+ # @option params [String] :client_token
921
+ # A client token.
922
+ #
923
+ # **A suitable default value is auto-generated.** You should normally
924
+ # not need to pass this option.**
925
+ #
926
+ # @option params [required, Hash<String,Types::Criterion>] :filter
927
+ # A filter to match for the rules to update. Only rules that match the
928
+ # filter are updated.
929
+ #
930
+ # @option params [required, String] :rule_name
931
+ # The name of the rule to update.
932
+ #
933
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
934
+ #
935
+ # @example Request syntax with placeholder values
936
+ #
937
+ # resp = client.update_archive_rule({
938
+ # analyzer_name: "Name", # required
939
+ # client_token: "String",
940
+ # filter: { # required
941
+ # "String" => {
942
+ # contains: ["String"],
943
+ # eq: ["String"],
944
+ # exists: false,
945
+ # neq: ["String"],
946
+ # },
947
+ # },
948
+ # rule_name: "Name", # required
949
+ # })
950
+ #
951
+ # @see http://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/UpdateArchiveRule AWS API Documentation
952
+ #
953
+ # @overload update_archive_rule(params = {})
954
+ # @param [Hash] params ({})
955
+ def update_archive_rule(params = {}, options = {})
956
+ req = build_request(:update_archive_rule, params)
957
+ req.send_request(options)
958
+ end
959
+
960
+ # Updates findings with the new values provided in the request.
961
+ #
962
+ # @option params [required, String] :analyzer_arn
963
+ # The ARN of the analyzer that generated the findings to update.
964
+ #
965
+ # @option params [String] :client_token
966
+ # A client token.
967
+ #
968
+ # **A suitable default value is auto-generated.** You should normally
969
+ # not need to pass this option.**
970
+ #
971
+ # @option params [Array<String>] :ids
972
+ # The IDs of the findings to update.
973
+ #
974
+ # @option params [String] :resource_arn
975
+ # The ARN of the resource identified in the finding.
976
+ #
977
+ # @option params [required, String] :status
978
+ # The state represents the action to take to update the finding Status.
979
+ # Use `ARCHIVE` to change an Active finding to an Archived finding. Use
980
+ # `ACTIVE` to change an Archived finding to an Active finding.
981
+ #
982
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
983
+ #
984
+ # @example Request syntax with placeholder values
985
+ #
986
+ # resp = client.update_findings({
987
+ # analyzer_arn: "AnalyzerArn", # required
988
+ # client_token: "String",
989
+ # ids: ["FindingId"],
990
+ # resource_arn: "ResourceArn",
991
+ # status: "ACTIVE", # required, accepts ACTIVE, ARCHIVED
992
+ # })
993
+ #
994
+ # @see http://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/UpdateFindings AWS API Documentation
995
+ #
996
+ # @overload update_findings(params = {})
997
+ # @param [Hash] params ({})
998
+ def update_findings(params = {}, options = {})
999
+ req = build_request(:update_findings, params)
1000
+ req.send_request(options)
1001
+ end
1002
+
1003
+ # @!endgroup
1004
+
1005
+ # @param params ({})
1006
+ # @api private
1007
+ def build_request(operation_name, params = {})
1008
+ handlers = @handlers.for(operation_name)
1009
+ context = Seahorse::Client::RequestContext.new(
1010
+ operation_name: operation_name,
1011
+ operation: config.api.operation(operation_name),
1012
+ client: self,
1013
+ params: params,
1014
+ config: config)
1015
+ context[:gem_name] = 'aws-sdk-accessanalyzer'
1016
+ context[:gem_version] = '1.0.0'
1017
+ Seahorse::Client::Request.new(handlers, context)
1018
+ end
1019
+
1020
+ # @api private
1021
+ # @deprecated
1022
+ def waiter_names
1023
+ []
1024
+ end
1025
+
1026
+ class << self
1027
+
1028
+ # @api private
1029
+ attr_reader :identifier
1030
+
1031
+ # @api private
1032
+ def errors_module
1033
+ Errors
1034
+ end
1035
+
1036
+ end
1037
+ end
1038
+ end