aws-sdk-macie 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: a16497b1a097e411e1d3051df5c3ca99121c39fe
4
+ data.tar.gz: 3393891240efd197ac45ddacad5b4b67fcb140b9
5
+ SHA512:
6
+ metadata.gz: e11d1962c9407b212ddc4055b9470c2f7a90ee35a161e1ea3b835b71ba23754bc95d7a2defa5c6c7f1d2ed7f0874fe2cbc09bf0a1e0b56d1086bbc8733d9eb2e
7
+ data.tar.gz: 0c37219c1fd024944713b0cb80641ea167a119f4722017c12234644b937a58796a7f88fbbe253093e5a0f9d9880dc298d5546e2efa8d3b727bc1400434a949a6
@@ -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-macie/types'
12
+ require_relative 'aws-sdk-macie/client_api'
13
+ require_relative 'aws-sdk-macie/client'
14
+ require_relative 'aws-sdk-macie/errors'
15
+ require_relative 'aws-sdk-macie/resource'
16
+ require_relative 'aws-sdk-macie/customizations'
17
+
18
+ # This module provides support for Amazon Macie. This module is available in the
19
+ # `aws-sdk-macie` 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 Amazon Macie all
32
+ # extend {Errors::ServiceError}.
33
+ #
34
+ # begin
35
+ # # do stuff
36
+ # rescue Aws::Macie::Errors::ServiceError
37
+ # # rescues all service API errors
38
+ # end
39
+ #
40
+ # See {Errors} for more information.
41
+ #
42
+ # @service
43
+ module Aws::Macie
44
+
45
+ GEM_VERSION = '1.0.0'
46
+
47
+ end
@@ -0,0 +1,481 @@
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/response_paging.rb'
19
+ require 'aws-sdk-core/plugins/stub_responses.rb'
20
+ require 'aws-sdk-core/plugins/idempotency_token.rb'
21
+ require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
22
+ require 'aws-sdk-core/plugins/signature_v4.rb'
23
+ require 'aws-sdk-core/plugins/protocols/json_rpc.rb'
24
+
25
+ Aws::Plugins::GlobalConfiguration.add_identifier(:macie)
26
+
27
+ module Aws::Macie
28
+ class Client < Seahorse::Client::Base
29
+
30
+ include Aws::ClientStubs
31
+
32
+ @identifier = :macie
33
+
34
+ set_api(ClientApi::API)
35
+
36
+ add_plugin(Seahorse::Client::Plugins::ContentLength)
37
+ add_plugin(Aws::Plugins::CredentialsConfiguration)
38
+ add_plugin(Aws::Plugins::Logging)
39
+ add_plugin(Aws::Plugins::ParamConverter)
40
+ add_plugin(Aws::Plugins::ParamValidator)
41
+ add_plugin(Aws::Plugins::UserAgent)
42
+ add_plugin(Aws::Plugins::HelpfulSocketErrors)
43
+ add_plugin(Aws::Plugins::RetryErrors)
44
+ add_plugin(Aws::Plugins::GlobalConfiguration)
45
+ add_plugin(Aws::Plugins::RegionalEndpoint)
46
+ add_plugin(Aws::Plugins::ResponsePaging)
47
+ add_plugin(Aws::Plugins::StubResponses)
48
+ add_plugin(Aws::Plugins::IdempotencyToken)
49
+ add_plugin(Aws::Plugins::JsonvalueConverter)
50
+ add_plugin(Aws::Plugins::SignatureV4)
51
+ add_plugin(Aws::Plugins::Protocols::JsonRpc)
52
+
53
+ # @option options [required, Aws::CredentialProvider] :credentials
54
+ # Your AWS credentials. This can be an instance of any one of the
55
+ # following classes:
56
+ #
57
+ # * `Aws::Credentials` - Used for configuring static, non-refreshing
58
+ # credentials.
59
+ #
60
+ # * `Aws::InstanceProfileCredentials` - Used for loading credentials
61
+ # from an EC2 IMDS on an EC2 instance.
62
+ #
63
+ # * `Aws::SharedCredentials` - Used for loading credentials from a
64
+ # shared file, such as `~/.aws/config`.
65
+ #
66
+ # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
67
+ #
68
+ # When `:credentials` are not configured directly, the following
69
+ # locations will be searched for credentials:
70
+ #
71
+ # * `Aws.config[:credentials]`
72
+ # * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
73
+ # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
74
+ # * `~/.aws/credentials`
75
+ # * `~/.aws/config`
76
+ # * EC2 IMDS instance profile - When used by default, the timeouts are
77
+ # very aggressive. Construct and pass an instance of
78
+ # `Aws::InstanceProfileCredentails` to enable retries and extended
79
+ # timeouts.
80
+ #
81
+ # @option options [required, String] :region
82
+ # The AWS region to connect to. The configured `:region` is
83
+ # used to determine the service `:endpoint`. When not passed,
84
+ # a default `:region` is search for in the following locations:
85
+ #
86
+ # * `Aws.config[:region]`
87
+ # * `ENV['AWS_REGION']`
88
+ # * `ENV['AMAZON_REGION']`
89
+ # * `ENV['AWS_DEFAULT_REGION']`
90
+ # * `~/.aws/credentials`
91
+ # * `~/.aws/config`
92
+ #
93
+ # @option options [String] :access_key_id
94
+ #
95
+ # @option options [Boolean] :convert_params (true)
96
+ # When `true`, an attempt is made to coerce request parameters into
97
+ # the required types.
98
+ #
99
+ # @option options [String] :endpoint
100
+ # The client endpoint is normally constructed from the `:region`
101
+ # option. You should only configure an `:endpoint` when connecting
102
+ # to test endpoints. This should be avalid HTTP(S) URI.
103
+ #
104
+ # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
105
+ # The log formatter.
106
+ #
107
+ # @option options [Symbol] :log_level (:info)
108
+ # The log level to send messages to the `:logger` at.
109
+ #
110
+ # @option options [Logger] :logger
111
+ # The Logger instance to send log messages to. If this option
112
+ # is not set, logging will be disabled.
113
+ #
114
+ # @option options [String] :profile ("default")
115
+ # Used when loading credentials from the shared credentials file
116
+ # at HOME/.aws/credentials. When not specified, 'default' is used.
117
+ #
118
+ # @option options [Integer] :retry_limit (3)
119
+ # The maximum number of times to retry failed requests. Only
120
+ # ~ 500 level server errors and certain ~ 400 level client errors
121
+ # are retried. Generally, these are throttling errors, data
122
+ # checksum errors, networking errors, timeout errors and auth
123
+ # errors from expired credentials.
124
+ #
125
+ # @option options [String] :secret_access_key
126
+ #
127
+ # @option options [String] :session_token
128
+ #
129
+ # @option options [Boolean] :simple_json (false)
130
+ # Disables request parameter conversion, validation, and formatting.
131
+ # Also disable response data type conversions. This option is useful
132
+ # when you want to ensure the highest level of performance by
133
+ # avoiding overhead of walking request parameters and response data
134
+ # structures.
135
+ #
136
+ # When `:simple_json` is enabled, the request parameters hash must
137
+ # be formatted exactly as the DynamoDB API expects.
138
+ #
139
+ # @option options [Boolean] :stub_responses (false)
140
+ # Causes the client to return stubbed responses. By default
141
+ # fake responses are generated and returned. You can specify
142
+ # the response data to return or errors to raise by calling
143
+ # {ClientStubs#stub_responses}. See {ClientStubs} for more information.
144
+ #
145
+ # ** Please note ** When response stubbing is enabled, no HTTP
146
+ # requests are made, and retries are disabled.
147
+ #
148
+ # @option options [Boolean] :validate_params (true)
149
+ # When `true`, request parameters are validated before
150
+ # sending the request.
151
+ #
152
+ def initialize(*args)
153
+ super
154
+ end
155
+
156
+ # @!group API Operations
157
+
158
+ # Associates a specified AWS account with Amazon Macie as a member
159
+ # account.
160
+ #
161
+ # @option params [required, String] :member_account_id
162
+ # The ID of the AWS account that you want to associate with Amazon Macie
163
+ # as a member account.
164
+ #
165
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
166
+ #
167
+ # @example Request syntax with placeholder values
168
+ #
169
+ # resp = client.associate_member_account({
170
+ # member_account_id: "AWSAccountId", # required
171
+ # })
172
+ #
173
+ # @see http://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/AssociateMemberAccount AWS API Documentation
174
+ #
175
+ # @overload associate_member_account(params = {})
176
+ # @param [Hash] params ({})
177
+ def associate_member_account(params = {}, options = {})
178
+ req = build_request(:associate_member_account, params)
179
+ req.send_request(options)
180
+ end
181
+
182
+ # Associates specified S3 resources with Amazon Macie for monitoring and
183
+ # data classification. If memberAccountId isn't specified, the action
184
+ # associates specified S3 resources with Macie for the current master
185
+ # account. If memberAccountId is specified, the action associates
186
+ # specified S3 resources with Macie for the specified member account.
187
+ #
188
+ # @option params [String] :member_account_id
189
+ # The ID of the Amazon Macie member account whose resources you want to
190
+ # associate with Macie.
191
+ #
192
+ # @option params [required, Array<Types::S3ResourceClassification>] :s3_resources
193
+ # The S3 resources that you want to associate with Amazon Macie for
194
+ # monitoring and data classification.
195
+ #
196
+ # @return [Types::AssociateS3ResourcesResult] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
197
+ #
198
+ # * {Types::AssociateS3ResourcesResult#failed_s3_resources #failed_s3_resources} => Array&lt;Types::FailedS3Resource&gt;
199
+ #
200
+ # @example Request syntax with placeholder values
201
+ #
202
+ # resp = client.associate_s3_resources({
203
+ # member_account_id: "AWSAccountId",
204
+ # s3_resources: [ # required
205
+ # {
206
+ # bucket_name: "BucketName", # required
207
+ # prefix: "Prefix",
208
+ # classification_type: { # required
209
+ # one_time: "FULL", # required, accepts FULL, NONE
210
+ # continuous: "FULL", # required, accepts FULL
211
+ # },
212
+ # },
213
+ # ],
214
+ # })
215
+ #
216
+ # @example Response structure
217
+ #
218
+ # resp.failed_s3_resources #=> Array
219
+ # resp.failed_s3_resources[0].failed_item.bucket_name #=> String
220
+ # resp.failed_s3_resources[0].failed_item.prefix #=> String
221
+ # resp.failed_s3_resources[0].error_code #=> String
222
+ # resp.failed_s3_resources[0].error_message #=> String
223
+ #
224
+ # @see http://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/AssociateS3Resources AWS API Documentation
225
+ #
226
+ # @overload associate_s3_resources(params = {})
227
+ # @param [Hash] params ({})
228
+ def associate_s3_resources(params = {}, options = {})
229
+ req = build_request(:associate_s3_resources, params)
230
+ req.send_request(options)
231
+ end
232
+
233
+ # Removes the specified member account from Amazon Macie.
234
+ #
235
+ # @option params [required, String] :member_account_id
236
+ # The ID of the member account that you want to remove from Amazon
237
+ # Macie.
238
+ #
239
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
240
+ #
241
+ # @example Request syntax with placeholder values
242
+ #
243
+ # resp = client.disassociate_member_account({
244
+ # member_account_id: "AWSAccountId", # required
245
+ # })
246
+ #
247
+ # @see http://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/DisassociateMemberAccount AWS API Documentation
248
+ #
249
+ # @overload disassociate_member_account(params = {})
250
+ # @param [Hash] params ({})
251
+ def disassociate_member_account(params = {}, options = {})
252
+ req = build_request(:disassociate_member_account, params)
253
+ req.send_request(options)
254
+ end
255
+
256
+ # Removes specified S3 resources from being monitored by Amazon Macie.
257
+ # If memberAccountId isn't specified, the action removes specified S3
258
+ # resources from Macie for the current master account. If
259
+ # memberAccountId is specified, the action removes specified S3
260
+ # resources from Macie for the specified member account.
261
+ #
262
+ # @option params [String] :member_account_id
263
+ # The ID of the Amazon Macie member account whose resources you want to
264
+ # remove from being monitored by Amazon Macie.
265
+ #
266
+ # @option params [required, Array<Types::S3Resource>] :associated_s3_resources
267
+ # The S3 resources (buckets or prefixes) that you want to remove from
268
+ # being monitored and classified by Amazon Macie.
269
+ #
270
+ # @return [Types::DisassociateS3ResourcesResult] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
271
+ #
272
+ # * {Types::DisassociateS3ResourcesResult#failed_s3_resources #failed_s3_resources} => Array&lt;Types::FailedS3Resource&gt;
273
+ #
274
+ # @example Request syntax with placeholder values
275
+ #
276
+ # resp = client.disassociate_s3_resources({
277
+ # member_account_id: "AWSAccountId",
278
+ # associated_s3_resources: [ # required
279
+ # {
280
+ # bucket_name: "BucketName", # required
281
+ # prefix: "Prefix",
282
+ # },
283
+ # ],
284
+ # })
285
+ #
286
+ # @example Response structure
287
+ #
288
+ # resp.failed_s3_resources #=> Array
289
+ # resp.failed_s3_resources[0].failed_item.bucket_name #=> String
290
+ # resp.failed_s3_resources[0].failed_item.prefix #=> String
291
+ # resp.failed_s3_resources[0].error_code #=> String
292
+ # resp.failed_s3_resources[0].error_message #=> String
293
+ #
294
+ # @see http://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/DisassociateS3Resources AWS API Documentation
295
+ #
296
+ # @overload disassociate_s3_resources(params = {})
297
+ # @param [Hash] params ({})
298
+ def disassociate_s3_resources(params = {}, options = {})
299
+ req = build_request(:disassociate_s3_resources, params)
300
+ req.send_request(options)
301
+ end
302
+
303
+ # Lists all Amazon Macie member accounts for the current Amazon Macie
304
+ # master account.
305
+ #
306
+ # @option params [String] :next_token
307
+ # Use this parameter when paginating results. Set the value of this
308
+ # parameter to null on your first call to the ListMemberAccounts action.
309
+ # Subsequent calls to the action fill nextToken in the request with the
310
+ # value of nextToken from the previous response to continue listing
311
+ # data.
312
+ #
313
+ # @option params [Integer] :max_results
314
+ # Use this parameter to indicate the maximum number of items that you
315
+ # want in the response. The default value is 250.
316
+ #
317
+ # @return [Types::ListMemberAccountsResult] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
318
+ #
319
+ # * {Types::ListMemberAccountsResult#member_accounts #member_accounts} => Array&lt;Types::MemberAccount&gt;
320
+ # * {Types::ListMemberAccountsResult#next_token #next_token} => String
321
+ #
322
+ # @example Request syntax with placeholder values
323
+ #
324
+ # resp = client.list_member_accounts({
325
+ # next_token: "NextToken",
326
+ # max_results: 1,
327
+ # })
328
+ #
329
+ # @example Response structure
330
+ #
331
+ # resp.member_accounts #=> Array
332
+ # resp.member_accounts[0].account_id #=> String
333
+ # resp.next_token #=> String
334
+ #
335
+ # @see http://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/ListMemberAccounts AWS API Documentation
336
+ #
337
+ # @overload list_member_accounts(params = {})
338
+ # @param [Hash] params ({})
339
+ def list_member_accounts(params = {}, options = {})
340
+ req = build_request(:list_member_accounts, params)
341
+ req.send_request(options)
342
+ end
343
+
344
+ # Lists all the S3 resources associated with Amazon Macie. If
345
+ # memberAccountId isn't specified, the action lists the S3 resources
346
+ # associated with Amazon Macie for the current master account. If
347
+ # memberAccountId is specified, the action lists the S3 resources
348
+ # associated with Amazon Macie for the specified member account.
349
+ #
350
+ # @option params [String] :member_account_id
351
+ # The Amazon Macie member account ID whose associated S3 resources you
352
+ # want to list.
353
+ #
354
+ # @option params [String] :next_token
355
+ # Use this parameter when paginating results. Set its value to null on
356
+ # your first call to the ListS3Resources action. Subsequent calls to the
357
+ # action fill nextToken in the request with the value of nextToken from
358
+ # the previous response to continue listing data.
359
+ #
360
+ # @option params [Integer] :max_results
361
+ # Use this parameter to indicate the maximum number of items that you
362
+ # want in the response. The default value is 250.
363
+ #
364
+ # @return [Types::ListS3ResourcesResult] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
365
+ #
366
+ # * {Types::ListS3ResourcesResult#s3_resources #s3_resources} => Array&lt;Types::S3ResourceClassification&gt;
367
+ # * {Types::ListS3ResourcesResult#next_token #next_token} => String
368
+ #
369
+ # @example Request syntax with placeholder values
370
+ #
371
+ # resp = client.list_s3_resources({
372
+ # member_account_id: "AWSAccountId",
373
+ # next_token: "NextToken",
374
+ # max_results: 1,
375
+ # })
376
+ #
377
+ # @example Response structure
378
+ #
379
+ # resp.s3_resources #=> Array
380
+ # resp.s3_resources[0].bucket_name #=> String
381
+ # resp.s3_resources[0].prefix #=> String
382
+ # resp.s3_resources[0].classification_type.one_time #=> String, one of "FULL", "NONE"
383
+ # resp.s3_resources[0].classification_type.continuous #=> String, one of "FULL"
384
+ # resp.next_token #=> String
385
+ #
386
+ # @see http://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/ListS3Resources AWS API Documentation
387
+ #
388
+ # @overload list_s3_resources(params = {})
389
+ # @param [Hash] params ({})
390
+ def list_s3_resources(params = {}, options = {})
391
+ req = build_request(:list_s3_resources, params)
392
+ req.send_request(options)
393
+ end
394
+
395
+ # Updates the classification types for the specified S3 resources. If
396
+ # memberAccountId isn't specified, the action updates the
397
+ # classification types of the S3 resources associated with Amazon Macie
398
+ # for the current master account. If memberAccountId is specified, the
399
+ # action updates the classification types of the S3 resources associated
400
+ # with Amazon Macie for the specified member account.
401
+ #
402
+ # @option params [String] :member_account_id
403
+ # The AWS ID of the Amazon Macie member account whose S3 resources'
404
+ # classification types you want to update.
405
+ #
406
+ # @option params [required, Array<Types::S3ResourceClassificationUpdate>] :s3_resources_update
407
+ # The S3 resources whose classification types you want to update.
408
+ #
409
+ # @return [Types::UpdateS3ResourcesResult] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
410
+ #
411
+ # * {Types::UpdateS3ResourcesResult#failed_s3_resources #failed_s3_resources} => Array&lt;Types::FailedS3Resource&gt;
412
+ #
413
+ # @example Request syntax with placeholder values
414
+ #
415
+ # resp = client.update_s3_resources({
416
+ # member_account_id: "AWSAccountId",
417
+ # s3_resources_update: [ # required
418
+ # {
419
+ # bucket_name: "BucketName", # required
420
+ # prefix: "Prefix",
421
+ # classification_type_update: { # required
422
+ # one_time: "FULL", # accepts FULL, NONE
423
+ # continuous: "FULL", # accepts FULL
424
+ # },
425
+ # },
426
+ # ],
427
+ # })
428
+ #
429
+ # @example Response structure
430
+ #
431
+ # resp.failed_s3_resources #=> Array
432
+ # resp.failed_s3_resources[0].failed_item.bucket_name #=> String
433
+ # resp.failed_s3_resources[0].failed_item.prefix #=> String
434
+ # resp.failed_s3_resources[0].error_code #=> String
435
+ # resp.failed_s3_resources[0].error_message #=> String
436
+ #
437
+ # @see http://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/UpdateS3Resources AWS API Documentation
438
+ #
439
+ # @overload update_s3_resources(params = {})
440
+ # @param [Hash] params ({})
441
+ def update_s3_resources(params = {}, options = {})
442
+ req = build_request(:update_s3_resources, params)
443
+ req.send_request(options)
444
+ end
445
+
446
+ # @!endgroup
447
+
448
+ # @param params ({})
449
+ # @api private
450
+ def build_request(operation_name, params = {})
451
+ handlers = @handlers.for(operation_name)
452
+ context = Seahorse::Client::RequestContext.new(
453
+ operation_name: operation_name,
454
+ operation: config.api.operation(operation_name),
455
+ client: self,
456
+ params: params,
457
+ config: config)
458
+ context[:gem_name] = 'aws-sdk-macie'
459
+ context[:gem_version] = '1.0.0'
460
+ Seahorse::Client::Request.new(handlers, context)
461
+ end
462
+
463
+ # @api private
464
+ # @deprecated
465
+ def waiter_names
466
+ []
467
+ end
468
+
469
+ class << self
470
+
471
+ # @api private
472
+ attr_reader :identifier
473
+
474
+ # @api private
475
+ def errors_module
476
+ Errors
477
+ end
478
+
479
+ end
480
+ end
481
+ end