esp_sdk 2.0.0.rc1 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/Gemfile.lock +1 -15
- data/assets/esp_logo.ans +27 -0
- data/bin/esp_console +2 -6
- data/esp_sdk.gemspec +0 -3
- data/lib/esp/extensions/active_resource/formats/json_api_format.rb +22 -3
- data/lib/esp/resources/alert.rb +6 -0
- data/lib/esp/resources/metadata.rb +50 -0
- data/lib/esp/resources/resource.rb +1 -0
- data/lib/esp/resources/signature.rb +5 -5
- data/lib/esp/version.rb +1 -1
- data/lib/esp.rb +1 -0
- data/lib/esp_sdk.rb +0 -1
- data/rdoc/ActiveResource/Formats.html +2 -0
- data/rdoc/ActiveResource/PaginatedCollection.html +2 -0
- data/rdoc/ActiveResource.html +2 -0
- data/rdoc/ESP/Alert.html +44 -7
- data/rdoc/ESP/CloudTrailEvent.html +2 -0
- data/rdoc/ESP/ContactRequest.html +2 -0
- data/rdoc/ESP/CustomSignature.html +2 -0
- data/rdoc/ESP/Dashboard.html +2 -0
- data/rdoc/ESP/ExternalAccount.html +2 -0
- data/rdoc/ESP/Metadata.html +411 -0
- data/rdoc/ESP/Organization.html +2 -0
- data/rdoc/ESP/Region.html +2 -0
- data/rdoc/ESP/Report.html +2 -0
- data/rdoc/ESP/Service.html +2 -0
- data/rdoc/ESP/Signature.html +9 -7
- data/rdoc/ESP/Stat.html +2 -0
- data/rdoc/ESP/StatCustomSignature.html +2 -0
- data/rdoc/ESP/StatRegion.html +2 -0
- data/rdoc/ESP/StatService.html +2 -0
- data/rdoc/ESP/StatSignature.html +2 -0
- data/rdoc/ESP/SubOrganization.html +2 -0
- data/rdoc/ESP/Suppression/Region.html +2 -0
- data/rdoc/ESP/Suppression/Signature.html +2 -0
- data/rdoc/ESP/Suppression/UniqueIdentifier.html +2 -0
- data/rdoc/ESP/Suppression.html +2 -0
- data/rdoc/ESP/Tag.html +2 -0
- data/rdoc/ESP/Team.html +2 -0
- data/rdoc/ESP/User.html +2 -0
- data/rdoc/ESP.html +3 -0
- data/rdoc/README_md.html +2 -0
- data/rdoc/created.rid +31 -30
- data/rdoc/index.html +2 -0
- data/rdoc/js/search_index.js +1 -1
- data/rdoc/table_of_contents.html +218 -203
- data/test/esp/extensions/active_resource/formats/json_api_format_test.rb +28 -5
- data/test/esp/resources/alert_test.rb +26 -4
- data/test/esp/resources/custom_signature_test.rb +2 -2
- data/test/esp/resources/metadata_test.rb +98 -0
- data/test/esp/resources/resource_test.rb +10 -0
- data/test/esp/resources/signature_test.rb +9 -9
- data/test/esp/resources/suppression_test.rb +4 -4
- data/test/factories/alerts.rb +5 -1
- data/test/factories/cloud_trail_events.rb +1 -1
- data/test/factories/contact_requests.rb +15 -8
- data/test/factories/metadata.rb +9 -0
- data/test/test_helper.rb +0 -1
- metadata +12 -46
@@ -0,0 +1,411 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
6
|
+
|
7
|
+
<title>class ESP::Metadata - ESPSDK</title>
|
8
|
+
|
9
|
+
<link type="text/css" media="screen" href="../rdoc.css" rel="stylesheet">
|
10
|
+
|
11
|
+
<script type="text/javascript">
|
12
|
+
var rdoc_rel_prefix = "../";
|
13
|
+
</script>
|
14
|
+
|
15
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
16
|
+
<script type="text/javascript" charset="utf-8" src="../js/navigation.js"></script>
|
17
|
+
<script type="text/javascript" charset="utf-8" src="../js/search_index.js"></script>
|
18
|
+
<script type="text/javascript" charset="utf-8" src="../js/search.js"></script>
|
19
|
+
<script type="text/javascript" charset="utf-8" src="../js/searcher.js"></script>
|
20
|
+
<script type="text/javascript" charset="utf-8" src="../js/darkfish.js"></script>
|
21
|
+
|
22
|
+
|
23
|
+
<body id="top" class="class">
|
24
|
+
<nav id="metadata">
|
25
|
+
<nav id="home-section" class="section">
|
26
|
+
<h3 class="section-header">
|
27
|
+
<a href="../index.html">Home</a>
|
28
|
+
<a href="../table_of_contents.html#classes">Classes</a>
|
29
|
+
<a href="../table_of_contents.html#methods">Methods</a>
|
30
|
+
</h3>
|
31
|
+
</nav>
|
32
|
+
|
33
|
+
|
34
|
+
<nav id="search-section" class="section project-section" class="initially-hidden">
|
35
|
+
<form action="#" method="get" accept-charset="utf-8">
|
36
|
+
<h3 class="section-header">
|
37
|
+
<input type="text" name="search" placeholder="Search" id="search-field"
|
38
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
39
|
+
</h3>
|
40
|
+
</form>
|
41
|
+
|
42
|
+
<ul id="search-results" class="initially-hidden"></ul>
|
43
|
+
</nav>
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
|
48
|
+
<div id="file-metadata">
|
49
|
+
<nav id="file-list-section" class="section">
|
50
|
+
<h3 class="section-header">Defined In</h3>
|
51
|
+
<ul>
|
52
|
+
<li>lib/esp/resources/metadata.rb
|
53
|
+
</ul>
|
54
|
+
</nav>
|
55
|
+
|
56
|
+
|
57
|
+
</div>
|
58
|
+
|
59
|
+
<div id="class-metadata">
|
60
|
+
|
61
|
+
<nav id="parent-class-section" class="section">
|
62
|
+
<h3 class="section-header">Parent</h3>
|
63
|
+
|
64
|
+
<p class="link">ESP::Resource
|
65
|
+
|
66
|
+
</nav>
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
<!-- Method Quickref -->
|
71
|
+
<nav id="method-list-section" class="section">
|
72
|
+
<h3 class="section-header">Methods</h3>
|
73
|
+
|
74
|
+
<ul class="link-list">
|
75
|
+
|
76
|
+
<li class="calls-super" ><a href="#method-c-find">::find</a>
|
77
|
+
|
78
|
+
<li ><a href="#method-c-for_alert">::for_alert</a>
|
79
|
+
|
80
|
+
<li ><a href="#method-c-where">::where</a>
|
81
|
+
|
82
|
+
<li ><a href="#method-i-destroy">#destroy</a>
|
83
|
+
|
84
|
+
<li ><a href="#method-i-save">#save</a>
|
85
|
+
|
86
|
+
</ul>
|
87
|
+
</nav>
|
88
|
+
|
89
|
+
</div>
|
90
|
+
|
91
|
+
<div id="project-metadata">
|
92
|
+
<nav id="fileindex-section" class="section project-section">
|
93
|
+
<h3 class="section-header">Pages</h3>
|
94
|
+
|
95
|
+
<ul>
|
96
|
+
|
97
|
+
<li class="file"><a href="../README_md.html">README</a>
|
98
|
+
|
99
|
+
</ul>
|
100
|
+
</nav>
|
101
|
+
|
102
|
+
<nav id="classindex-section" class="section project-section">
|
103
|
+
<h3 class="section-header">Class and Module Index</h3>
|
104
|
+
|
105
|
+
<ul class="link-list">
|
106
|
+
|
107
|
+
<li><a href="../ActiveResource.html">ActiveResource</a>
|
108
|
+
|
109
|
+
<li><a href="../ActiveResource/Formats.html">ActiveResource::Formats</a>
|
110
|
+
|
111
|
+
<li><a href="../ActiveResource/PaginatedCollection.html">ActiveResource::PaginatedCollection</a>
|
112
|
+
|
113
|
+
<li><a href="../ESP.html">ESP</a>
|
114
|
+
|
115
|
+
<li><a href="../ESP/Alert.html">ESP::Alert</a>
|
116
|
+
|
117
|
+
<li><a href="../ESP/CloudTrailEvent.html">ESP::CloudTrailEvent</a>
|
118
|
+
|
119
|
+
<li><a href="../ESP/ContactRequest.html">ESP::ContactRequest</a>
|
120
|
+
|
121
|
+
<li><a href="../ESP/CustomSignature.html">ESP::CustomSignature</a>
|
122
|
+
|
123
|
+
<li><a href="../ESP/Dashboard.html">ESP::Dashboard</a>
|
124
|
+
|
125
|
+
<li><a href="../ESP/ExternalAccount.html">ESP::ExternalAccount</a>
|
126
|
+
|
127
|
+
<li><a href="../ESP/Metadata.html">ESP::Metadata</a>
|
128
|
+
|
129
|
+
<li><a href="../ESP/Organization.html">ESP::Organization</a>
|
130
|
+
|
131
|
+
<li><a href="../ESP/Region.html">ESP::Region</a>
|
132
|
+
|
133
|
+
<li><a href="../ESP/Report.html">ESP::Report</a>
|
134
|
+
|
135
|
+
<li><a href="../ESP/Service.html">ESP::Service</a>
|
136
|
+
|
137
|
+
<li><a href="../ESP/Signature.html">ESP::Signature</a>
|
138
|
+
|
139
|
+
<li><a href="../ESP/Stat.html">ESP::Stat</a>
|
140
|
+
|
141
|
+
<li><a href="../ESP/StatCustomSignature.html">ESP::StatCustomSignature</a>
|
142
|
+
|
143
|
+
<li><a href="../ESP/StatRegion.html">ESP::StatRegion</a>
|
144
|
+
|
145
|
+
<li><a href="../ESP/StatService.html">ESP::StatService</a>
|
146
|
+
|
147
|
+
<li><a href="../ESP/StatSignature.html">ESP::StatSignature</a>
|
148
|
+
|
149
|
+
<li><a href="../ESP/SubOrganization.html">ESP::SubOrganization</a>
|
150
|
+
|
151
|
+
<li><a href="../ESP/Suppression.html">ESP::Suppression</a>
|
152
|
+
|
153
|
+
<li><a href="../ESP/Suppression/Region.html">ESP::Suppression::Region</a>
|
154
|
+
|
155
|
+
<li><a href="../ESP/Suppression/Signature.html">ESP::Suppression::Signature</a>
|
156
|
+
|
157
|
+
<li><a href="../ESP/Suppression/UniqueIdentifier.html">ESP::Suppression::UniqueIdentifier</a>
|
158
|
+
|
159
|
+
<li><a href="../ESP/Tag.html">ESP::Tag</a>
|
160
|
+
|
161
|
+
<li><a href="../ESP/Team.html">ESP::Team</a>
|
162
|
+
|
163
|
+
<li><a href="../ESP/User.html">ESP::User</a>
|
164
|
+
|
165
|
+
</ul>
|
166
|
+
</nav>
|
167
|
+
|
168
|
+
</div>
|
169
|
+
</nav>
|
170
|
+
|
171
|
+
<div id="documentation">
|
172
|
+
<h1 class="class">class ESP::Metadata</h1>
|
173
|
+
|
174
|
+
<div id="description" class="description">
|
175
|
+
|
176
|
+
</div><!-- description -->
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
<!-- Methods -->
|
191
|
+
|
192
|
+
<section id="public-class-5Buntitled-5D-method-details" class="method-section section">
|
193
|
+
<h3 class="section-header">Public Class Methods</h3>
|
194
|
+
|
195
|
+
|
196
|
+
<div id="method-c-find" class="method-detail ">
|
197
|
+
|
198
|
+
|
199
|
+
<div class="method-heading">
|
200
|
+
<span class="method-callseq">
|
201
|
+
find(id)
|
202
|
+
</span>
|
203
|
+
|
204
|
+
<span class="method-click-advice">click to toggle source</span>
|
205
|
+
|
206
|
+
</div>
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
<div class="method-description">
|
211
|
+
|
212
|
+
<p>Find a <a href="Metadata.html">Metadata</a> object by id</p>
|
213
|
+
|
214
|
+
<h4 id="method-c-find-label-Parameter">Parameter<span><a href="#method-c-find-label-Parameter">¶</a> <a href="#documentation">↑</a></span></h4>
|
215
|
+
|
216
|
+
<p><code>id</code> | Required | The ID of the metadata object to retrieve</p>
|
217
|
+
|
218
|
+
|
219
|
+
<div class="method-calls-super">
|
220
|
+
Calls superclass method
|
221
|
+
|
222
|
+
</div>
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
<div class="method-source-code" id="find-source">
|
227
|
+
<pre><span class="ruby-comment"># File lib/esp/resources/metadata.rb, line 41</span>
|
228
|
+
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">find</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">arguments</span>)
|
229
|
+
<span class="ruby-identifier">scope</span> = <span class="ruby-identifier">arguments</span>.<span class="ruby-identifier">slice!</span>(<span class="ruby-value">0</span>)
|
230
|
+
<span class="ruby-identifier">options</span> = (<span class="ruby-identifier">arguments</span>.<span class="ruby-identifier">slice!</span>(<span class="ruby-value">0</span>) <span class="ruby-operator">||</span> {}).<span class="ruby-identifier">with_indifferent_access</span>
|
231
|
+
<span class="ruby-keyword">return</span> <span class="ruby-keyword">super</span>(<span class="ruby-identifier">scope</span>, <span class="ruby-identifier">options</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">scope</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Numeric</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:from</span>].<span class="ruby-identifier">present?</span>
|
232
|
+
<span class="ruby-identifier">params</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">fetch</span>(<span class="ruby-value">:params</span>, {}).<span class="ruby-identifier">with_indifferent_access</span>
|
233
|
+
<span class="ruby-identifier">alert_id</span> = <span class="ruby-identifier">params</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value">:alert_id</span>)
|
234
|
+
<span class="ruby-identifier">for_alert</span>(<span class="ruby-identifier">alert_id</span>)
|
235
|
+
<span class="ruby-keyword">end</span></pre>
|
236
|
+
</div><!-- find-source -->
|
237
|
+
|
238
|
+
</div>
|
239
|
+
|
240
|
+
|
241
|
+
|
242
|
+
|
243
|
+
</div><!-- find-method -->
|
244
|
+
|
245
|
+
|
246
|
+
<div id="method-c-for_alert" class="method-detail ">
|
247
|
+
|
248
|
+
<div class="method-heading">
|
249
|
+
<span class="method-name">for_alert</span><span
|
250
|
+
class="method-args">(alert_id = nil)</span>
|
251
|
+
|
252
|
+
<span class="method-click-advice">click to toggle source</span>
|
253
|
+
|
254
|
+
</div>
|
255
|
+
|
256
|
+
|
257
|
+
<div class="method-description">
|
258
|
+
|
259
|
+
<p>Returns a metadata object for the given alert_id Convenience method to use
|
260
|
+
instead of <a href="Metadata.html#method-c-find">::find</a> since an
|
261
|
+
alert_id is required to return metadata.</p>
|
262
|
+
|
263
|
+
<h4 id="method-c-for_alert-label-Parameter">Parameter<span><a href="#method-c-for_alert-label-Parameter">¶</a> <a href="#documentation">↑</a></span></h4>
|
264
|
+
|
265
|
+
<p><code>alert_id</code> | Required | The ID of the alert to retrieve metadata
|
266
|
+
for</p>
|
267
|
+
|
268
|
+
<h4 id="method-c-for_alert-label-Example">Example<span><a href="#method-c-for_alert-label-Example">¶</a> <a href="#documentation">↑</a></span></h4>
|
269
|
+
|
270
|
+
<pre>alerts = ESP::Metadata.for_alert(1194)</pre>
|
271
|
+
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
<div class="method-source-code" id="for_alert-source">
|
276
|
+
<pre><span class="ruby-comment"># File lib/esp/resources/metadata.rb, line 27</span>
|
277
|
+
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">for_alert</span>(<span class="ruby-identifier">alert_id</span> = <span class="ruby-keyword">nil</span>)
|
278
|
+
<span class="ruby-identifier">fail</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-string">"You must supply an alert id."</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">alert_id</span>.<span class="ruby-identifier">present?</span>
|
279
|
+
<span class="ruby-identifier">from</span> = <span class="ruby-node">"#{prefix}alerts/#{alert_id}/metadata.json"</span>
|
280
|
+
<span class="ruby-identifier">find</span>(<span class="ruby-value">:one</span>, <span class="ruby-identifier">from</span><span class="ruby-operator">:</span> <span class="ruby-identifier">from</span>)
|
281
|
+
<span class="ruby-keyword">end</span></pre>
|
282
|
+
</div><!-- for_alert-source -->
|
283
|
+
|
284
|
+
</div>
|
285
|
+
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
</div><!-- for_alert-method -->
|
290
|
+
|
291
|
+
|
292
|
+
<div id="method-c-where" class="method-detail ">
|
293
|
+
|
294
|
+
<div class="method-heading">
|
295
|
+
<span class="method-name">where</span><span
|
296
|
+
class="method-args">(*)</span>
|
297
|
+
|
298
|
+
<span class="method-click-advice">click to toggle source</span>
|
299
|
+
|
300
|
+
</div>
|
301
|
+
|
302
|
+
|
303
|
+
<div class="method-description">
|
304
|
+
|
305
|
+
<p>Not Implemented. You cannot search for <a
|
306
|
+
href="Metadata.html">Metadata</a>.</p>
|
307
|
+
|
308
|
+
|
309
|
+
|
310
|
+
|
311
|
+
<div class="method-source-code" id="where-source">
|
312
|
+
<pre><span class="ruby-comment"># File lib/esp/resources/metadata.rb, line 4</span>
|
313
|
+
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">where</span>(<span class="ruby-operator">*</span>)
|
314
|
+
<span class="ruby-identifier">fail</span> <span class="ruby-constant">ESP</span><span class="ruby-operator">::</span><span class="ruby-constant">NotImplementedError</span>
|
315
|
+
<span class="ruby-keyword">end</span></pre>
|
316
|
+
</div><!-- where-source -->
|
317
|
+
|
318
|
+
</div>
|
319
|
+
|
320
|
+
|
321
|
+
|
322
|
+
|
323
|
+
</div><!-- where-method -->
|
324
|
+
|
325
|
+
|
326
|
+
</section><!-- public-class-method-details -->
|
327
|
+
|
328
|
+
<section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
|
329
|
+
<h3 class="section-header">Public Instance Methods</h3>
|
330
|
+
|
331
|
+
|
332
|
+
<div id="method-i-destroy" class="method-detail ">
|
333
|
+
|
334
|
+
<div class="method-heading">
|
335
|
+
<span class="method-name">destroy</span><span
|
336
|
+
class="method-args">()</span>
|
337
|
+
|
338
|
+
<span class="method-click-advice">click to toggle source</span>
|
339
|
+
|
340
|
+
</div>
|
341
|
+
|
342
|
+
|
343
|
+
<div class="method-description">
|
344
|
+
|
345
|
+
<p>Not Implemented. You cannot destroy <a href="Metadata.html">Metadata</a>.</p>
|
346
|
+
|
347
|
+
|
348
|
+
|
349
|
+
|
350
|
+
<div class="method-source-code" id="destroy-source">
|
351
|
+
<pre><span class="ruby-comment"># File lib/esp/resources/metadata.rb, line 14</span>
|
352
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">destroy</span>
|
353
|
+
<span class="ruby-identifier">fail</span> <span class="ruby-constant">ESP</span><span class="ruby-operator">::</span><span class="ruby-constant">NotImplementedError</span>
|
354
|
+
<span class="ruby-keyword">end</span></pre>
|
355
|
+
</div><!-- destroy-source -->
|
356
|
+
|
357
|
+
</div>
|
358
|
+
|
359
|
+
|
360
|
+
|
361
|
+
|
362
|
+
</div><!-- destroy-method -->
|
363
|
+
|
364
|
+
|
365
|
+
<div id="method-i-save" class="method-detail ">
|
366
|
+
|
367
|
+
<div class="method-heading">
|
368
|
+
<span class="method-name">save</span><span
|
369
|
+
class="method-args">()</span>
|
370
|
+
|
371
|
+
<span class="method-click-advice">click to toggle source</span>
|
372
|
+
|
373
|
+
</div>
|
374
|
+
|
375
|
+
|
376
|
+
<div class="method-description">
|
377
|
+
|
378
|
+
<p>Not Implemented. You cannot create or update <a
|
379
|
+
href="Metadata.html">Metadata</a>.</p>
|
380
|
+
|
381
|
+
|
382
|
+
|
383
|
+
|
384
|
+
<div class="method-source-code" id="save-source">
|
385
|
+
<pre><span class="ruby-comment"># File lib/esp/resources/metadata.rb, line 9</span>
|
386
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">save</span>
|
387
|
+
<span class="ruby-identifier">fail</span> <span class="ruby-constant">ESP</span><span class="ruby-operator">::</span><span class="ruby-constant">NotImplementedError</span>
|
388
|
+
<span class="ruby-keyword">end</span></pre>
|
389
|
+
</div><!-- save-source -->
|
390
|
+
|
391
|
+
</div>
|
392
|
+
|
393
|
+
|
394
|
+
|
395
|
+
|
396
|
+
</div><!-- save-method -->
|
397
|
+
|
398
|
+
|
399
|
+
</section><!-- public-instance-method-details -->
|
400
|
+
|
401
|
+
</section><!-- 5Buntitled-5D -->
|
402
|
+
|
403
|
+
</div><!-- documentation -->
|
404
|
+
|
405
|
+
|
406
|
+
<footer id="validator-badges">
|
407
|
+
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
408
|
+
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 4.0.0.
|
409
|
+
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
410
|
+
</footer>
|
411
|
+
|
data/rdoc/ESP/Organization.html
CHANGED
@@ -136,6 +136,8 @@
|
|
136
136
|
|
137
137
|
<li><a href="../ESP/ExternalAccount.html">ESP::ExternalAccount</a>
|
138
138
|
|
139
|
+
<li><a href="../ESP/Metadata.html">ESP::Metadata</a>
|
140
|
+
|
139
141
|
<li><a href="../ESP/Organization.html">ESP::Organization</a>
|
140
142
|
|
141
143
|
<li><a href="../ESP/Region.html">ESP::Region</a>
|
data/rdoc/ESP/Region.html
CHANGED
@@ -124,6 +124,8 @@
|
|
124
124
|
|
125
125
|
<li><a href="../ESP/ExternalAccount.html">ESP::ExternalAccount</a>
|
126
126
|
|
127
|
+
<li><a href="../ESP/Metadata.html">ESP::Metadata</a>
|
128
|
+
|
127
129
|
<li><a href="../ESP/Organization.html">ESP::Organization</a>
|
128
130
|
|
129
131
|
<li><a href="../ESP/Region.html">ESP::Region</a>
|
data/rdoc/ESP/Report.html
CHANGED
@@ -134,6 +134,8 @@
|
|
134
134
|
|
135
135
|
<li><a href="../ESP/ExternalAccount.html">ESP::ExternalAccount</a>
|
136
136
|
|
137
|
+
<li><a href="../ESP/Metadata.html">ESP::Metadata</a>
|
138
|
+
|
137
139
|
<li><a href="../ESP/Organization.html">ESP::Organization</a>
|
138
140
|
|
139
141
|
<li><a href="../ESP/Region.html">ESP::Region</a>
|
data/rdoc/ESP/Service.html
CHANGED
@@ -124,6 +124,8 @@
|
|
124
124
|
|
125
125
|
<li><a href="../ESP/ExternalAccount.html">ESP::ExternalAccount</a>
|
126
126
|
|
127
|
+
<li><a href="../ESP/Metadata.html">ESP::Metadata</a>
|
128
|
+
|
127
129
|
<li><a href="../ESP/Organization.html">ESP::Organization</a>
|
128
130
|
|
129
131
|
<li><a href="../ESP/Region.html">ESP::Region</a>
|
data/rdoc/ESP/Signature.html
CHANGED
@@ -130,6 +130,8 @@
|
|
130
130
|
|
131
131
|
<li><a href="../ESP/ExternalAccount.html">ESP::ExternalAccount</a>
|
132
132
|
|
133
|
+
<li><a href="../ESP/Metadata.html">ESP::Metadata</a>
|
134
|
+
|
133
135
|
<li><a href="../ESP/Organization.html">ESP::Organization</a>
|
134
136
|
|
135
137
|
<li><a href="../ESP/Region.html">ESP::Region</a>
|
@@ -332,13 +334,13 @@ object populated.</p>
|
|
332
334
|
<p><code>external_account_id</code> | Required | The ID of the external
|
333
335
|
account to run this custom signature against</p>
|
334
336
|
|
335
|
-
<p><code>
|
336
|
-
signature against</p>
|
337
|
+
<p><code>region</code> | Required | <a href="Region.html">Region</a> name to
|
338
|
+
run this custom signature against</p>
|
337
339
|
|
338
340
|
<h4 id="method-i-run-label-Example">Example<span><a href="#method-i-run-label-Example">¶</a> <a href="#documentation">↑</a></span></h4>
|
339
341
|
|
340
342
|
<pre>signature = ESP::Signature.find(3)
|
341
|
-
alerts = signature.run(external_account_id: 3,
|
343
|
+
alerts = signature.run(external_account_id: 3, region: 'us_east_1')</pre>
|
342
344
|
|
343
345
|
|
344
346
|
|
@@ -348,7 +350,7 @@ alerts = signature.run(external_account_id: 3, regions: ['us_east_1'])</
|
|
348
350
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">run</span>(<span class="ruby-identifier">arguments</span> = {})
|
349
351
|
<span class="ruby-identifier">arguments</span> = <span class="ruby-identifier">arguments</span>.<span class="ruby-identifier">with_indifferent_access</span>
|
350
352
|
<span class="ruby-identifier">attributes</span>[<span class="ruby-string">'external_account_id'</span>] <span class="ruby-operator">||=</span> <span class="ruby-identifier">arguments</span>[<span class="ruby-value">:external_account_id</span>]
|
351
|
-
<span class="ruby-identifier">attributes</span>[<span class="ruby-string">'
|
353
|
+
<span class="ruby-identifier">attributes</span>[<span class="ruby-string">'region'</span>] <span class="ruby-operator">||=</span> <span class="ruby-identifier">arguments</span>[<span class="ruby-value">:region</span>]
|
352
354
|
|
353
355
|
<span class="ruby-identifier">response</span> = <span class="ruby-identifier">connection</span>.<span class="ruby-identifier">post</span>(<span class="ruby-node">"#{self.class.prefix}signatures/#{id}/run.json"</span>, <span class="ruby-identifier">to_json</span>)
|
354
356
|
<span class="ruby-constant">ESP</span><span class="ruby-operator">::</span><span class="ruby-constant">Alert</span>.<span class="ruby-identifier">send</span>(<span class="ruby-value">:instantiate_collection</span>, <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">format</span>.<span class="ruby-identifier">decode</span>(<span class="ruby-identifier">response</span>.<span class="ruby-identifier">body</span>))
|
@@ -392,13 +394,13 @@ successful.</p>
|
|
392
394
|
<p><code>external_account_id</code> | Required | The ID of the external
|
393
395
|
account to run this custom signature against</p>
|
394
396
|
|
395
|
-
<p><code>
|
396
|
-
signature against</p>
|
397
|
+
<p><code>region</code> | Required | <a href="Region.html">Region</a> name to
|
398
|
+
run this custom signature against</p>
|
397
399
|
|
398
400
|
<h4 id="method-i-run-21-label-Example">Example<span><a href="#method-i-run-21-label-Example">¶</a> <a href="#documentation">↑</a></span></h4>
|
399
401
|
|
400
402
|
<pre>signature = ESP::Signature.find(3)
|
401
|
-
alerts = signature.run!(external_account_id: 3,
|
403
|
+
alerts = signature.run!(external_account_id: 3, region: 'us_east_1')</pre>
|
402
404
|
|
403
405
|
|
404
406
|
|
data/rdoc/ESP/Stat.html
CHANGED
@@ -216,6 +216,8 @@
|
|
216
216
|
|
217
217
|
<li><a href="../ESP/ExternalAccount.html">ESP::ExternalAccount</a>
|
218
218
|
|
219
|
+
<li><a href="../ESP/Metadata.html">ESP::Metadata</a>
|
220
|
+
|
219
221
|
<li><a href="../ESP/Organization.html">ESP::Organization</a>
|
220
222
|
|
221
223
|
<li><a href="../ESP/Region.html">ESP::Region</a>
|
@@ -204,6 +204,8 @@
|
|
204
204
|
|
205
205
|
<li><a href="../ESP/ExternalAccount.html">ESP::ExternalAccount</a>
|
206
206
|
|
207
|
+
<li><a href="../ESP/Metadata.html">ESP::Metadata</a>
|
208
|
+
|
207
209
|
<li><a href="../ESP/Organization.html">ESP::Organization</a>
|
208
210
|
|
209
211
|
<li><a href="../ESP/Region.html">ESP::Region</a>
|
data/rdoc/ESP/StatRegion.html
CHANGED
@@ -204,6 +204,8 @@
|
|
204
204
|
|
205
205
|
<li><a href="../ESP/ExternalAccount.html">ESP::ExternalAccount</a>
|
206
206
|
|
207
|
+
<li><a href="../ESP/Metadata.html">ESP::Metadata</a>
|
208
|
+
|
207
209
|
<li><a href="../ESP/Organization.html">ESP::Organization</a>
|
208
210
|
|
209
211
|
<li><a href="../ESP/Region.html">ESP::Region</a>
|
data/rdoc/ESP/StatService.html
CHANGED
@@ -204,6 +204,8 @@
|
|
204
204
|
|
205
205
|
<li><a href="../ESP/ExternalAccount.html">ESP::ExternalAccount</a>
|
206
206
|
|
207
|
+
<li><a href="../ESP/Metadata.html">ESP::Metadata</a>
|
208
|
+
|
207
209
|
<li><a href="../ESP/Organization.html">ESP::Organization</a>
|
208
210
|
|
209
211
|
<li><a href="../ESP/Region.html">ESP::Region</a>
|
data/rdoc/ESP/StatSignature.html
CHANGED
@@ -204,6 +204,8 @@
|
|
204
204
|
|
205
205
|
<li><a href="../ESP/ExternalAccount.html">ESP::ExternalAccount</a>
|
206
206
|
|
207
|
+
<li><a href="../ESP/Metadata.html">ESP::Metadata</a>
|
208
|
+
|
207
209
|
<li><a href="../ESP/Organization.html">ESP::Organization</a>
|
208
210
|
|
209
211
|
<li><a href="../ESP/Region.html">ESP::Region</a>
|
@@ -132,6 +132,8 @@
|
|
132
132
|
|
133
133
|
<li><a href="../ESP/ExternalAccount.html">ESP::ExternalAccount</a>
|
134
134
|
|
135
|
+
<li><a href="../ESP/Metadata.html">ESP::Metadata</a>
|
136
|
+
|
135
137
|
<li><a href="../ESP/Organization.html">ESP::Organization</a>
|
136
138
|
|
137
139
|
<li><a href="../ESP/Region.html">ESP::Region</a>
|
@@ -124,6 +124,8 @@
|
|
124
124
|
|
125
125
|
<li><a href="../../ESP/ExternalAccount.html">ESP::ExternalAccount</a>
|
126
126
|
|
127
|
+
<li><a href="../../ESP/Metadata.html">ESP::Metadata</a>
|
128
|
+
|
127
129
|
<li><a href="../../ESP/Organization.html">ESP::Organization</a>
|
128
130
|
|
129
131
|
<li><a href="../../ESP/Region.html">ESP::Region</a>
|
@@ -124,6 +124,8 @@
|
|
124
124
|
|
125
125
|
<li><a href="../../ESP/ExternalAccount.html">ESP::ExternalAccount</a>
|
126
126
|
|
127
|
+
<li><a href="../../ESP/Metadata.html">ESP::Metadata</a>
|
128
|
+
|
127
129
|
<li><a href="../../ESP/Organization.html">ESP::Organization</a>
|
128
130
|
|
129
131
|
<li><a href="../../ESP/Region.html">ESP::Region</a>
|
@@ -124,6 +124,8 @@
|
|
124
124
|
|
125
125
|
<li><a href="../../ESP/ExternalAccount.html">ESP::ExternalAccount</a>
|
126
126
|
|
127
|
+
<li><a href="../../ESP/Metadata.html">ESP::Metadata</a>
|
128
|
+
|
127
129
|
<li><a href="../../ESP/Organization.html">ESP::Organization</a>
|
128
130
|
|
129
131
|
<li><a href="../../ESP/Region.html">ESP::Region</a>
|
data/rdoc/ESP/Suppression.html
CHANGED
@@ -146,6 +146,8 @@
|
|
146
146
|
|
147
147
|
<li><a href="../ESP/ExternalAccount.html">ESP::ExternalAccount</a>
|
148
148
|
|
149
|
+
<li><a href="../ESP/Metadata.html">ESP::Metadata</a>
|
150
|
+
|
149
151
|
<li><a href="../ESP/Organization.html">ESP::Organization</a>
|
150
152
|
|
151
153
|
<li><a href="../ESP/Region.html">ESP::Region</a>
|
data/rdoc/ESP/Tag.html
CHANGED
@@ -122,6 +122,8 @@
|
|
122
122
|
|
123
123
|
<li><a href="../ESP/ExternalAccount.html">ESP::ExternalAccount</a>
|
124
124
|
|
125
|
+
<li><a href="../ESP/Metadata.html">ESP::Metadata</a>
|
126
|
+
|
125
127
|
<li><a href="../ESP/Organization.html">ESP::Organization</a>
|
126
128
|
|
127
129
|
<li><a href="../ESP/Region.html">ESP::Region</a>
|
data/rdoc/ESP/Team.html
CHANGED
@@ -134,6 +134,8 @@
|
|
134
134
|
|
135
135
|
<li><a href="../ESP/ExternalAccount.html">ESP::ExternalAccount</a>
|
136
136
|
|
137
|
+
<li><a href="../ESP/Metadata.html">ESP::Metadata</a>
|
138
|
+
|
137
139
|
<li><a href="../ESP/Organization.html">ESP::Organization</a>
|
138
140
|
|
139
141
|
<li><a href="../ESP/Region.html">ESP::Region</a>
|
data/rdoc/ESP/User.html
CHANGED
@@ -130,6 +130,8 @@
|
|
130
130
|
|
131
131
|
<li><a href="../ESP/ExternalAccount.html">ESP::ExternalAccount</a>
|
132
132
|
|
133
|
+
<li><a href="../ESP/Metadata.html">ESP::Metadata</a>
|
134
|
+
|
133
135
|
<li><a href="../ESP/Organization.html">ESP::Organization</a>
|
134
136
|
|
135
137
|
<li><a href="../ESP/Region.html">ESP::Region</a>
|
data/rdoc/ESP.html
CHANGED
@@ -57,6 +57,7 @@
|
|
57
57
|
<li>lib/esp/resources/custom_signature.rb
|
58
58
|
<li>lib/esp/resources/dashboard.rb
|
59
59
|
<li>lib/esp/resources/external_account.rb
|
60
|
+
<li>lib/esp/resources/metadata.rb
|
60
61
|
<li>lib/esp/resources/organization.rb
|
61
62
|
<li>lib/esp/resources/region.rb
|
62
63
|
<li>lib/esp/resources/report.rb
|
@@ -150,6 +151,8 @@
|
|
150
151
|
|
151
152
|
<li><a href="./ESP/ExternalAccount.html">ESP::ExternalAccount</a>
|
152
153
|
|
154
|
+
<li><a href="./ESP/Metadata.html">ESP::Metadata</a>
|
155
|
+
|
153
156
|
<li><a href="./ESP/Organization.html">ESP::Organization</a>
|
154
157
|
|
155
158
|
<li><a href="./ESP/Region.html">ESP::Region</a>
|