aws-sdk-detective 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/aws-sdk-detective.rb +47 -0
- data/lib/aws-sdk-detective/client.rb +774 -0
- data/lib/aws-sdk-detective/client_api.rb +328 -0
- data/lib/aws-sdk-detective/customizations.rb +0 -0
- data/lib/aws-sdk-detective/errors.rb +94 -0
- data/lib/aws-sdk-detective/resource.rb +23 -0
- data/lib/aws-sdk-detective/types.rb +614 -0
- metadata +88 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 0a1cbaaf78a66479febbb3423623c119abc4f799
|
4
|
+
data.tar.gz: 5f1db2621ae639c587f8ac74f79f8353b9730bd7
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 162df3aeec9fc9bcec2270dbf17ad39f2d28fa82b590ea9e545727adaba756da22212e387bc4cb2e6703ff659233f3be051eeb2c8e24e439dc79518c92b4a64a
|
7
|
+
data.tar.gz: 4fcf885fc94bd17efa3ac1aef039aded6866202fd0bc77d7fcdb6ec26cca45a1d35ff201cb1588204046f91323f43d820b751e789ae4494783b17f05d9ae9368
|
@@ -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-detective/types'
|
12
|
+
require_relative 'aws-sdk-detective/client_api'
|
13
|
+
require_relative 'aws-sdk-detective/client'
|
14
|
+
require_relative 'aws-sdk-detective/errors'
|
15
|
+
require_relative 'aws-sdk-detective/resource'
|
16
|
+
require_relative 'aws-sdk-detective/customizations'
|
17
|
+
|
18
|
+
# This module provides support for Amazon Detective. This module is available in the
|
19
|
+
# `aws-sdk-detective` 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 Detective all
|
32
|
+
# extend {Errors::ServiceError}.
|
33
|
+
#
|
34
|
+
# begin
|
35
|
+
# # do stuff
|
36
|
+
# rescue Aws::Detective::Errors::ServiceError
|
37
|
+
# # rescues all service API errors
|
38
|
+
# end
|
39
|
+
#
|
40
|
+
# See {Errors} for more information.
|
41
|
+
#
|
42
|
+
# @service
|
43
|
+
module Aws::Detective
|
44
|
+
|
45
|
+
GEM_VERSION = '1.0.0'
|
46
|
+
|
47
|
+
end
|
@@ -0,0 +1,774 @@
|
|
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(:detective)
|
31
|
+
|
32
|
+
module Aws::Detective
|
33
|
+
class Client < Seahorse::Client::Base
|
34
|
+
|
35
|
+
include Aws::ClientStubs
|
36
|
+
|
37
|
+
@identifier = :detective
|
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
|
+
# Amazon Detective is currently in preview.
|
258
|
+
#
|
259
|
+
# Accepts an invitation for the member account to contribute data to a
|
260
|
+
# behavior graph. This operation can only be called by an invited member
|
261
|
+
# account.
|
262
|
+
#
|
263
|
+
# The request provides the ARN of behavior graph.
|
264
|
+
#
|
265
|
+
# The member account status in the graph must be `INVITED`.
|
266
|
+
#
|
267
|
+
# @option params [required, String] :graph_arn
|
268
|
+
# The ARN of the behavior graph that the member account is accepting the
|
269
|
+
# invitation for.
|
270
|
+
#
|
271
|
+
# The member account status in the behavior graph must be `INVITED`.
|
272
|
+
#
|
273
|
+
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
274
|
+
#
|
275
|
+
# @example Request syntax with placeholder values
|
276
|
+
#
|
277
|
+
# resp = client.accept_invitation({
|
278
|
+
# graph_arn: "GraphArn", # required
|
279
|
+
# })
|
280
|
+
#
|
281
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/AcceptInvitation AWS API Documentation
|
282
|
+
#
|
283
|
+
# @overload accept_invitation(params = {})
|
284
|
+
# @param [Hash] params ({})
|
285
|
+
def accept_invitation(params = {}, options = {})
|
286
|
+
req = build_request(:accept_invitation, params)
|
287
|
+
req.send_request(options)
|
288
|
+
end
|
289
|
+
|
290
|
+
# Amazon Detective is currently in preview.
|
291
|
+
#
|
292
|
+
# Creates a new behavior graph for the calling account, and sets that
|
293
|
+
# account as the master account. This operation is called by the account
|
294
|
+
# that is enabling Detective.
|
295
|
+
#
|
296
|
+
# The operation also enables Detective for the calling account in the
|
297
|
+
# currently selected Region. It returns the ARN of the new behavior
|
298
|
+
# graph.
|
299
|
+
#
|
300
|
+
# `CreateGraph` triggers a process to create the corresponding data
|
301
|
+
# tables for the new behavior graph.
|
302
|
+
#
|
303
|
+
# An account can only be the master account for one behavior graph
|
304
|
+
# within a Region. If the same account calls `CreateGraph` with the same
|
305
|
+
# master account, it always returns the same behavior graph ARN. It does
|
306
|
+
# not create a new behavior graph.
|
307
|
+
#
|
308
|
+
# @return [Types::CreateGraphResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
309
|
+
#
|
310
|
+
# * {Types::CreateGraphResponse#graph_arn #graph_arn} => String
|
311
|
+
#
|
312
|
+
# @example Response structure
|
313
|
+
#
|
314
|
+
# resp.graph_arn #=> String
|
315
|
+
#
|
316
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/CreateGraph AWS API Documentation
|
317
|
+
#
|
318
|
+
# @overload create_graph(params = {})
|
319
|
+
# @param [Hash] params ({})
|
320
|
+
def create_graph(params = {}, options = {})
|
321
|
+
req = build_request(:create_graph, params)
|
322
|
+
req.send_request(options)
|
323
|
+
end
|
324
|
+
|
325
|
+
# Amazon Detective is currently in preview.
|
326
|
+
#
|
327
|
+
# Sends a request to invite the specified AWS accounts to be member
|
328
|
+
# accounts in the behavior graph. This operation can only be called by
|
329
|
+
# the master account for a behavior graph.
|
330
|
+
#
|
331
|
+
# `CreateMembers` verifies the accounts and then sends invitations to
|
332
|
+
# the verified accounts.
|
333
|
+
#
|
334
|
+
# The request provides the behavior graph ARN and the list of accounts
|
335
|
+
# to invite.
|
336
|
+
#
|
337
|
+
# The response separates the requested accounts into two lists:
|
338
|
+
#
|
339
|
+
# * The accounts that `CreateMembers` was able to start the verification
|
340
|
+
# for. This list includes member accounts that are being verified,
|
341
|
+
# that have passed verification and are being sent an invitation, and
|
342
|
+
# that have failed verification.
|
343
|
+
#
|
344
|
+
# * The accounts that `CreateMembers` was unable to process. This list
|
345
|
+
# includes accounts that were already invited to be member accounts in
|
346
|
+
# the behavior graph.
|
347
|
+
#
|
348
|
+
# @option params [required, String] :graph_arn
|
349
|
+
# The ARN of the behavior graph to invite the member accounts to
|
350
|
+
# contribute their data to.
|
351
|
+
#
|
352
|
+
# @option params [String] :message
|
353
|
+
# Customized message text to include in the invitation email message to
|
354
|
+
# the invited member accounts.
|
355
|
+
#
|
356
|
+
# @option params [required, Array<Types::Account>] :accounts
|
357
|
+
# The list of AWS accounts to invite to become member accounts in the
|
358
|
+
# behavior graph. For each invited account, the account list contains
|
359
|
+
# the account identifier and the AWS account root user email address.
|
360
|
+
#
|
361
|
+
# @return [Types::CreateMembersResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
362
|
+
#
|
363
|
+
# * {Types::CreateMembersResponse#members #members} => Array<Types::MemberDetail>
|
364
|
+
# * {Types::CreateMembersResponse#unprocessed_accounts #unprocessed_accounts} => Array<Types::UnprocessedAccount>
|
365
|
+
#
|
366
|
+
# @example Request syntax with placeholder values
|
367
|
+
#
|
368
|
+
# resp = client.create_members({
|
369
|
+
# graph_arn: "GraphArn", # required
|
370
|
+
# message: "EmailMessage",
|
371
|
+
# accounts: [ # required
|
372
|
+
# {
|
373
|
+
# account_id: "AccountId", # required
|
374
|
+
# email_address: "EmailAddress", # required
|
375
|
+
# },
|
376
|
+
# ],
|
377
|
+
# })
|
378
|
+
#
|
379
|
+
# @example Response structure
|
380
|
+
#
|
381
|
+
# resp.members #=> Array
|
382
|
+
# resp.members[0].account_id #=> String
|
383
|
+
# resp.members[0].email_address #=> String
|
384
|
+
# resp.members[0].graph_arn #=> String
|
385
|
+
# resp.members[0].master_id #=> String
|
386
|
+
# resp.members[0].status #=> String, one of "INVITED", "VERIFICATION_IN_PROGRESS", "VERIFICATION_FAILED", "ENABLED"
|
387
|
+
# resp.members[0].invited_time #=> Time
|
388
|
+
# resp.members[0].updated_time #=> Time
|
389
|
+
# resp.unprocessed_accounts #=> Array
|
390
|
+
# resp.unprocessed_accounts[0].account_id #=> String
|
391
|
+
# resp.unprocessed_accounts[0].reason #=> String
|
392
|
+
#
|
393
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/CreateMembers AWS API Documentation
|
394
|
+
#
|
395
|
+
# @overload create_members(params = {})
|
396
|
+
# @param [Hash] params ({})
|
397
|
+
def create_members(params = {}, options = {})
|
398
|
+
req = build_request(:create_members, params)
|
399
|
+
req.send_request(options)
|
400
|
+
end
|
401
|
+
|
402
|
+
# Amazon Detective is currently in preview.
|
403
|
+
#
|
404
|
+
# Disables the specified behavior graph and queues it to be deleted.
|
405
|
+
# This operation removes the graph from each member account's list of
|
406
|
+
# behavior graphs.
|
407
|
+
#
|
408
|
+
# `DeleteGraph` can only be called by the master account for a behavior
|
409
|
+
# graph.
|
410
|
+
#
|
411
|
+
# @option params [required, String] :graph_arn
|
412
|
+
# The ARN of the behavior graph to disable.
|
413
|
+
#
|
414
|
+
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
415
|
+
#
|
416
|
+
# @example Request syntax with placeholder values
|
417
|
+
#
|
418
|
+
# resp = client.delete_graph({
|
419
|
+
# graph_arn: "GraphArn", # required
|
420
|
+
# })
|
421
|
+
#
|
422
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/DeleteGraph AWS API Documentation
|
423
|
+
#
|
424
|
+
# @overload delete_graph(params = {})
|
425
|
+
# @param [Hash] params ({})
|
426
|
+
def delete_graph(params = {}, options = {})
|
427
|
+
req = build_request(:delete_graph, params)
|
428
|
+
req.send_request(options)
|
429
|
+
end
|
430
|
+
|
431
|
+
# Amazon Detective is currently in preview.
|
432
|
+
#
|
433
|
+
# Deletes one or more member accounts from the master account behavior
|
434
|
+
# graph. This operation can only be called by a Detective master
|
435
|
+
# account. That account cannot use `DeleteMembers` to delete their own
|
436
|
+
# account from the Morocco graph. To disable a behavior graph, the
|
437
|
+
# master account uses the `DeleteGraph` API method.
|
438
|
+
#
|
439
|
+
# @option params [required, String] :graph_arn
|
440
|
+
# The ARN of the behavior graph to delete members from.
|
441
|
+
#
|
442
|
+
# @option params [required, Array<String>] :account_ids
|
443
|
+
# The list of AWS account identifiers for the member accounts to delete
|
444
|
+
# from the behavior graph.
|
445
|
+
#
|
446
|
+
# @return [Types::DeleteMembersResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
447
|
+
#
|
448
|
+
# * {Types::DeleteMembersResponse#account_ids #account_ids} => Array<String>
|
449
|
+
# * {Types::DeleteMembersResponse#unprocessed_accounts #unprocessed_accounts} => Array<Types::UnprocessedAccount>
|
450
|
+
#
|
451
|
+
# @example Request syntax with placeholder values
|
452
|
+
#
|
453
|
+
# resp = client.delete_members({
|
454
|
+
# graph_arn: "GraphArn", # required
|
455
|
+
# account_ids: ["AccountId"], # required
|
456
|
+
# })
|
457
|
+
#
|
458
|
+
# @example Response structure
|
459
|
+
#
|
460
|
+
# resp.account_ids #=> Array
|
461
|
+
# resp.account_ids[0] #=> String
|
462
|
+
# resp.unprocessed_accounts #=> Array
|
463
|
+
# resp.unprocessed_accounts[0].account_id #=> String
|
464
|
+
# resp.unprocessed_accounts[0].reason #=> String
|
465
|
+
#
|
466
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/DeleteMembers AWS API Documentation
|
467
|
+
#
|
468
|
+
# @overload delete_members(params = {})
|
469
|
+
# @param [Hash] params ({})
|
470
|
+
def delete_members(params = {}, options = {})
|
471
|
+
req = build_request(:delete_members, params)
|
472
|
+
req.send_request(options)
|
473
|
+
end
|
474
|
+
|
475
|
+
# Amazon Detective is currently in preview.
|
476
|
+
#
|
477
|
+
# Removes the member account from the specified behavior graph. This
|
478
|
+
# operation can only be called by a member account that has the
|
479
|
+
# `ENABLED` status.
|
480
|
+
#
|
481
|
+
# @option params [required, String] :graph_arn
|
482
|
+
# The ARN of the behavior graph to remove the member account from.
|
483
|
+
#
|
484
|
+
# The member account's member status in the behavior graph must be
|
485
|
+
# `ENABLED`.
|
486
|
+
#
|
487
|
+
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
488
|
+
#
|
489
|
+
# @example Request syntax with placeholder values
|
490
|
+
#
|
491
|
+
# resp = client.disassociate_membership({
|
492
|
+
# graph_arn: "GraphArn", # required
|
493
|
+
# })
|
494
|
+
#
|
495
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/DisassociateMembership AWS API Documentation
|
496
|
+
#
|
497
|
+
# @overload disassociate_membership(params = {})
|
498
|
+
# @param [Hash] params ({})
|
499
|
+
def disassociate_membership(params = {}, options = {})
|
500
|
+
req = build_request(:disassociate_membership, params)
|
501
|
+
req.send_request(options)
|
502
|
+
end
|
503
|
+
|
504
|
+
# Amazon Detective is currently in preview.
|
505
|
+
#
|
506
|
+
# Returns the membership details for specified member accounts for a
|
507
|
+
# behavior graph.
|
508
|
+
#
|
509
|
+
# @option params [required, String] :graph_arn
|
510
|
+
# The ARN of the behavior graph for which to request the member details.
|
511
|
+
#
|
512
|
+
# @option params [required, Array<String>] :account_ids
|
513
|
+
# The list of AWS account identifiers for the member account for which
|
514
|
+
# to return member details.
|
515
|
+
#
|
516
|
+
# You cannot use `GetMembers` to retrieve information about member
|
517
|
+
# accounts that were removed from the behavior graph.
|
518
|
+
#
|
519
|
+
# @return [Types::GetMembersResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
520
|
+
#
|
521
|
+
# * {Types::GetMembersResponse#member_details #member_details} => Array<Types::MemberDetail>
|
522
|
+
# * {Types::GetMembersResponse#unprocessed_accounts #unprocessed_accounts} => Array<Types::UnprocessedAccount>
|
523
|
+
#
|
524
|
+
# @example Request syntax with placeholder values
|
525
|
+
#
|
526
|
+
# resp = client.get_members({
|
527
|
+
# graph_arn: "GraphArn", # required
|
528
|
+
# account_ids: ["AccountId"], # required
|
529
|
+
# })
|
530
|
+
#
|
531
|
+
# @example Response structure
|
532
|
+
#
|
533
|
+
# resp.member_details #=> Array
|
534
|
+
# resp.member_details[0].account_id #=> String
|
535
|
+
# resp.member_details[0].email_address #=> String
|
536
|
+
# resp.member_details[0].graph_arn #=> String
|
537
|
+
# resp.member_details[0].master_id #=> String
|
538
|
+
# resp.member_details[0].status #=> String, one of "INVITED", "VERIFICATION_IN_PROGRESS", "VERIFICATION_FAILED", "ENABLED"
|
539
|
+
# resp.member_details[0].invited_time #=> Time
|
540
|
+
# resp.member_details[0].updated_time #=> Time
|
541
|
+
# resp.unprocessed_accounts #=> Array
|
542
|
+
# resp.unprocessed_accounts[0].account_id #=> String
|
543
|
+
# resp.unprocessed_accounts[0].reason #=> String
|
544
|
+
#
|
545
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/GetMembers AWS API Documentation
|
546
|
+
#
|
547
|
+
# @overload get_members(params = {})
|
548
|
+
# @param [Hash] params ({})
|
549
|
+
def get_members(params = {}, options = {})
|
550
|
+
req = build_request(:get_members, params)
|
551
|
+
req.send_request(options)
|
552
|
+
end
|
553
|
+
|
554
|
+
# Amazon Detective is currently in preview.
|
555
|
+
#
|
556
|
+
# Returns the list of behavior graphs that the calling account is a
|
557
|
+
# master of. This operation can only be called by a master account.
|
558
|
+
#
|
559
|
+
# Because an account can currently only be the master of one behavior
|
560
|
+
# graph within a Region, the results always contain a single graph.
|
561
|
+
#
|
562
|
+
# @option params [String] :next_token
|
563
|
+
# For requests to get the next page of results, the pagination token
|
564
|
+
# that was returned with the previous set of results. The initial
|
565
|
+
# request does not include a pagination token.
|
566
|
+
#
|
567
|
+
# @option params [Integer] :max_results
|
568
|
+
# The maximum number of graphs to return at a time. The total must be
|
569
|
+
# less than the overall limit on the number of results to return, which
|
570
|
+
# is currently 200.
|
571
|
+
#
|
572
|
+
# @return [Types::ListGraphsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
573
|
+
#
|
574
|
+
# * {Types::ListGraphsResponse#graph_list #graph_list} => Array<Types::Graph>
|
575
|
+
# * {Types::ListGraphsResponse#next_token #next_token} => String
|
576
|
+
#
|
577
|
+
# @example Request syntax with placeholder values
|
578
|
+
#
|
579
|
+
# resp = client.list_graphs({
|
580
|
+
# next_token: "PaginationToken",
|
581
|
+
# max_results: 1,
|
582
|
+
# })
|
583
|
+
#
|
584
|
+
# @example Response structure
|
585
|
+
#
|
586
|
+
# resp.graph_list #=> Array
|
587
|
+
# resp.graph_list[0].arn #=> String
|
588
|
+
# resp.graph_list[0].created_time #=> Time
|
589
|
+
# resp.next_token #=> String
|
590
|
+
#
|
591
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/ListGraphs AWS API Documentation
|
592
|
+
#
|
593
|
+
# @overload list_graphs(params = {})
|
594
|
+
# @param [Hash] params ({})
|
595
|
+
def list_graphs(params = {}, options = {})
|
596
|
+
req = build_request(:list_graphs, params)
|
597
|
+
req.send_request(options)
|
598
|
+
end
|
599
|
+
|
600
|
+
# Amazon Detective is currently in preview.
|
601
|
+
#
|
602
|
+
# Retrieves the list of open and accepted behavior graph invitations for
|
603
|
+
# the member account. This operation can only be called by a member
|
604
|
+
# account.
|
605
|
+
#
|
606
|
+
# Open invitations are invitations that the member account has not
|
607
|
+
# responded to.
|
608
|
+
#
|
609
|
+
# The results do not include behavior graphs for which the member
|
610
|
+
# account declined the invitation. The results also do not include
|
611
|
+
# behavior graphs that the member account resigned from or was removed
|
612
|
+
# from.
|
613
|
+
#
|
614
|
+
# @option params [String] :next_token
|
615
|
+
# For requests to retrieve the next page of results, the pagination
|
616
|
+
# token that was returned with the previous page of results. The initial
|
617
|
+
# request does not include a pagination token.
|
618
|
+
#
|
619
|
+
# @option params [Integer] :max_results
|
620
|
+
# The maximum number of behavior graph invitations to return in the
|
621
|
+
# response. The total must be less than the overall limit on the number
|
622
|
+
# of results to return, which is currently 200.
|
623
|
+
#
|
624
|
+
# @return [Types::ListInvitationsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
625
|
+
#
|
626
|
+
# * {Types::ListInvitationsResponse#invitations #invitations} => Array<Types::MemberDetail>
|
627
|
+
# * {Types::ListInvitationsResponse#next_token #next_token} => String
|
628
|
+
#
|
629
|
+
# @example Request syntax with placeholder values
|
630
|
+
#
|
631
|
+
# resp = client.list_invitations({
|
632
|
+
# next_token: "PaginationToken",
|
633
|
+
# max_results: 1,
|
634
|
+
# })
|
635
|
+
#
|
636
|
+
# @example Response structure
|
637
|
+
#
|
638
|
+
# resp.invitations #=> Array
|
639
|
+
# resp.invitations[0].account_id #=> String
|
640
|
+
# resp.invitations[0].email_address #=> String
|
641
|
+
# resp.invitations[0].graph_arn #=> String
|
642
|
+
# resp.invitations[0].master_id #=> String
|
643
|
+
# resp.invitations[0].status #=> String, one of "INVITED", "VERIFICATION_IN_PROGRESS", "VERIFICATION_FAILED", "ENABLED"
|
644
|
+
# resp.invitations[0].invited_time #=> Time
|
645
|
+
# resp.invitations[0].updated_time #=> Time
|
646
|
+
# resp.next_token #=> String
|
647
|
+
#
|
648
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/ListInvitations AWS API Documentation
|
649
|
+
#
|
650
|
+
# @overload list_invitations(params = {})
|
651
|
+
# @param [Hash] params ({})
|
652
|
+
def list_invitations(params = {}, options = {})
|
653
|
+
req = build_request(:list_invitations, params)
|
654
|
+
req.send_request(options)
|
655
|
+
end
|
656
|
+
|
657
|
+
# Amazon Detective is currently in preview.
|
658
|
+
#
|
659
|
+
# Retrieves the list of member accounts for a behavior graph. Does not
|
660
|
+
# return member accounts that were removed from the behavior graph.
|
661
|
+
#
|
662
|
+
# @option params [required, String] :graph_arn
|
663
|
+
# The ARN of the behavior graph for which to retrieve the list of member
|
664
|
+
# accounts.
|
665
|
+
#
|
666
|
+
# @option params [String] :next_token
|
667
|
+
# For requests to retrieve the next page of member account results, the
|
668
|
+
# pagination token that was returned with the previous page of results.
|
669
|
+
# The initial request does not include a pagination token.
|
670
|
+
#
|
671
|
+
# @option params [Integer] :max_results
|
672
|
+
# The maximum number of member accounts to include in the response. The
|
673
|
+
# total must be less than the overall limit on the number of results to
|
674
|
+
# return, which is currently 200.
|
675
|
+
#
|
676
|
+
# @return [Types::ListMembersResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
677
|
+
#
|
678
|
+
# * {Types::ListMembersResponse#member_details #member_details} => Array<Types::MemberDetail>
|
679
|
+
# * {Types::ListMembersResponse#next_token #next_token} => String
|
680
|
+
#
|
681
|
+
# @example Request syntax with placeholder values
|
682
|
+
#
|
683
|
+
# resp = client.list_members({
|
684
|
+
# graph_arn: "GraphArn", # required
|
685
|
+
# next_token: "PaginationToken",
|
686
|
+
# max_results: 1,
|
687
|
+
# })
|
688
|
+
#
|
689
|
+
# @example Response structure
|
690
|
+
#
|
691
|
+
# resp.member_details #=> Array
|
692
|
+
# resp.member_details[0].account_id #=> String
|
693
|
+
# resp.member_details[0].email_address #=> String
|
694
|
+
# resp.member_details[0].graph_arn #=> String
|
695
|
+
# resp.member_details[0].master_id #=> String
|
696
|
+
# resp.member_details[0].status #=> String, one of "INVITED", "VERIFICATION_IN_PROGRESS", "VERIFICATION_FAILED", "ENABLED"
|
697
|
+
# resp.member_details[0].invited_time #=> Time
|
698
|
+
# resp.member_details[0].updated_time #=> Time
|
699
|
+
# resp.next_token #=> String
|
700
|
+
#
|
701
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/ListMembers AWS API Documentation
|
702
|
+
#
|
703
|
+
# @overload list_members(params = {})
|
704
|
+
# @param [Hash] params ({})
|
705
|
+
def list_members(params = {}, options = {})
|
706
|
+
req = build_request(:list_members, params)
|
707
|
+
req.send_request(options)
|
708
|
+
end
|
709
|
+
|
710
|
+
# Amazon Detective is currently in preview.
|
711
|
+
#
|
712
|
+
# Rejects an invitation to contribute the account data to a behavior
|
713
|
+
# graph. This operation must be called by a member account that has the
|
714
|
+
# `INVITED` status.
|
715
|
+
#
|
716
|
+
# @option params [required, String] :graph_arn
|
717
|
+
# The ARN of the behavior graph to reject the invitation to.
|
718
|
+
#
|
719
|
+
# The member account's current member status in the behavior graph must
|
720
|
+
# be `INVITED`.
|
721
|
+
#
|
722
|
+
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
723
|
+
#
|
724
|
+
# @example Request syntax with placeholder values
|
725
|
+
#
|
726
|
+
# resp = client.reject_invitation({
|
727
|
+
# graph_arn: "GraphArn", # required
|
728
|
+
# })
|
729
|
+
#
|
730
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/RejectInvitation AWS API Documentation
|
731
|
+
#
|
732
|
+
# @overload reject_invitation(params = {})
|
733
|
+
# @param [Hash] params ({})
|
734
|
+
def reject_invitation(params = {}, options = {})
|
735
|
+
req = build_request(:reject_invitation, params)
|
736
|
+
req.send_request(options)
|
737
|
+
end
|
738
|
+
|
739
|
+
# @!endgroup
|
740
|
+
|
741
|
+
# @param params ({})
|
742
|
+
# @api private
|
743
|
+
def build_request(operation_name, params = {})
|
744
|
+
handlers = @handlers.for(operation_name)
|
745
|
+
context = Seahorse::Client::RequestContext.new(
|
746
|
+
operation_name: operation_name,
|
747
|
+
operation: config.api.operation(operation_name),
|
748
|
+
client: self,
|
749
|
+
params: params,
|
750
|
+
config: config)
|
751
|
+
context[:gem_name] = 'aws-sdk-detective'
|
752
|
+
context[:gem_version] = '1.0.0'
|
753
|
+
Seahorse::Client::Request.new(handlers, context)
|
754
|
+
end
|
755
|
+
|
756
|
+
# @api private
|
757
|
+
# @deprecated
|
758
|
+
def waiter_names
|
759
|
+
[]
|
760
|
+
end
|
761
|
+
|
762
|
+
class << self
|
763
|
+
|
764
|
+
# @api private
|
765
|
+
attr_reader :identifier
|
766
|
+
|
767
|
+
# @api private
|
768
|
+
def errors_module
|
769
|
+
Errors
|
770
|
+
end
|
771
|
+
|
772
|
+
end
|
773
|
+
end
|
774
|
+
end
|