esp_sdk 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/CHANGELOG.md +6 -1
- data/Gemfile.lock +11 -1
- data/README.md +287 -28
- data/bin/esp +15 -0
- data/esp_sdk.gemspec +2 -0
- data/lib/esp/aws_clients.rb +60 -0
- data/lib/esp/commands/add_external_account.rb +57 -0
- data/lib/esp/commands/commands_tasks.rb +106 -0
- data/lib/esp/commands/console.rb +68 -0
- data/lib/esp/extensions/active_resource/formats/json_api_format.rb +12 -4
- data/lib/esp/extensions/active_resource/paginated_collection.rb +5 -5
- data/lib/esp/extensions/active_resource/validations.rb +1 -1
- data/lib/esp/external_account_creator.rb +77 -0
- data/lib/esp/resources/alert.rb +30 -34
- data/lib/esp/resources/cloud_trail_event.rb +5 -0
- data/lib/esp/resources/contact_request.rb +6 -5
- data/lib/esp/resources/custom_signature.rb +32 -56
- data/lib/esp/resources/dashboard.rb +8 -1
- data/lib/esp/resources/external_account.rb +27 -19
- data/lib/esp/resources/organization.rb +27 -3
- data/lib/esp/resources/region.rb +15 -3
- data/lib/esp/resources/report.rb +28 -24
- data/lib/esp/resources/resource.rb +26 -10
- data/lib/esp/resources/service.rb +5 -0
- data/lib/esp/resources/signature.rb +28 -12
- data/lib/esp/resources/stat.rb +21 -2
- data/lib/esp/resources/stat_custom_signature.rb +30 -4
- data/lib/esp/resources/stat_region.rb +29 -3
- data/lib/esp/resources/stat_service.rb +29 -3
- data/lib/esp/resources/stat_signature.rb +29 -3
- data/lib/esp/resources/sub_organization.rb +27 -3
- data/lib/esp/resources/suppression/region.rb +14 -32
- data/lib/esp/resources/suppression/signature.rb +14 -40
- data/lib/esp/resources/suppression/unique_identifier.rb +8 -6
- data/lib/esp/resources/suppression.rb +43 -5
- data/lib/esp/resources/tag.rb +5 -0
- data/lib/esp/resources/team.rb +33 -9
- data/lib/esp/resources/user.rb +29 -3
- data/lib/esp/version.rb +1 -1
- data/lib/esp.rb +25 -5
- data/test/esp/aws_clients_test.rb +101 -0
- data/test/esp/extensions/active_resource/formats/json_api_format_test.rb +26 -12
- data/test/esp/extensions/active_resource/paginated_collection_test.rb +93 -72
- data/test/esp/extensions/active_resource/validations_test.rb +2 -12
- data/test/esp/external_account_creator_test.rb +153 -0
- data/test/esp/resources/alert_test.rb +71 -33
- data/test/esp/resources/cloud_trail_event_test.rb +9 -1
- data/test/esp/resources/contact_request_test.rb +8 -0
- data/test/esp/resources/custom_signature_test.rb +8 -0
- data/test/esp/resources/dashboard_test.rb +8 -0
- data/test/esp/resources/external_account_test.rb +8 -0
- data/test/esp/resources/metadata_test.rb +1 -1
- data/test/esp/resources/organization_test.rb +8 -0
- data/test/esp/resources/region_test.rb +12 -4
- data/test/esp/resources/report_test.rb +13 -4
- data/test/esp/resources/resource_test.rb +208 -64
- data/test/esp/resources/service_test.rb +8 -0
- data/test/esp/resources/signature_test.rb +15 -9
- data/test/esp/resources/stat_custom_signature_test.rb +9 -1
- data/test/esp/resources/stat_region_test.rb +23 -1
- data/test/esp/resources/stat_service_test.rb +23 -1
- data/test/esp/resources/stat_signature_test.rb +23 -1
- data/test/esp/resources/stat_test.rb +52 -8
- data/test/esp/resources/sub_organization_test.rb +8 -0
- data/test/esp/resources/suppression/region_test.rb +10 -2
- data/test/esp/resources/suppression/signature_test.rb +10 -2
- data/test/esp/resources/suppression/unique_identifier_test.rb +10 -2
- data/test/esp/resources/suppression_test.rb +74 -14
- data/test/esp/resources/tag_test.rb +9 -1
- data/test/esp/resources/team_test.rb +8 -0
- data/test/esp/resources/user_test.rb +49 -19
- data/test/esp_test.rb +19 -1
- data/test/factories/alerts.rb +70 -0
- data/test/factories/organizations.rb +2 -2
- data/test/factories/regions.rb +1 -1
- data/test/factories/sub_organizations.rb +1 -1
- data/test/factories/suppressions.rb +109 -3
- data/test/factories/users.rb +65 -2
- data/test/test_helper.rb +9 -8
- metadata +41 -69
- data/bin/esp_console +0 -67
- data/rdoc/ActiveResource/Formats.html +0 -178
- data/rdoc/ActiveResource/PaginatedCollection.html +0 -912
- data/rdoc/ActiveResource.html +0 -182
- data/rdoc/ESP/Alert.html +0 -808
- data/rdoc/ESP/CloudTrailEvent.html +0 -377
- data/rdoc/ESP/ContactRequest.html +0 -368
- data/rdoc/ESP/CustomSignature.html +0 -748
- data/rdoc/ESP/Dashboard.html +0 -357
- data/rdoc/ESP/ExternalAccount.html +0 -567
- data/rdoc/ESP/Metadata.html +0 -411
- data/rdoc/ESP/Organization.html +0 -592
- data/rdoc/ESP/Region.html +0 -401
- data/rdoc/ESP/Report.html +0 -624
- data/rdoc/ESP/Service.html +0 -382
- data/rdoc/ESP/Signature.html +0 -557
- data/rdoc/ESP/Stat.html +0 -1780
- data/rdoc/ESP/StatCustomSignature.html +0 -1601
- data/rdoc/ESP/StatRegion.html +0 -1600
- data/rdoc/ESP/StatService.html +0 -1600
- data/rdoc/ESP/StatSignature.html +0 -1600
- data/rdoc/ESP/SubOrganization.html +0 -542
- data/rdoc/ESP/Suppression/Region.html +0 -456
- data/rdoc/ESP/Suppression/Signature.html +0 -472
- data/rdoc/ESP/Suppression/UniqueIdentifier.html +0 -419
- data/rdoc/ESP/Suppression.html +0 -651
- data/rdoc/ESP/Tag.html +0 -373
- data/rdoc/ESP/Team.html +0 -586
- data/rdoc/ESP/User.html +0 -485
- data/rdoc/ESP.html +0 -549
- data/rdoc/README_md.html +0 -503
- data/rdoc/created.rid +0 -31
- data/rdoc/images/add.png +0 -0
- data/rdoc/images/arrow_up.png +0 -0
- data/rdoc/images/brick.png +0 -0
- data/rdoc/images/brick_link.png +0 -0
- data/rdoc/images/bug.png +0 -0
- data/rdoc/images/bullet_black.png +0 -0
- data/rdoc/images/bullet_toggle_minus.png +0 -0
- data/rdoc/images/bullet_toggle_plus.png +0 -0
- data/rdoc/images/date.png +0 -0
- data/rdoc/images/delete.png +0 -0
- data/rdoc/images/find.png +0 -0
- data/rdoc/images/loadingAnimation.gif +0 -0
- data/rdoc/images/macFFBgHack.png +0 -0
- data/rdoc/images/package.png +0 -0
- data/rdoc/images/page_green.png +0 -0
- data/rdoc/images/page_white_text.png +0 -0
- data/rdoc/images/page_white_width.png +0 -0
- data/rdoc/images/plugin.png +0 -0
- data/rdoc/images/ruby.png +0 -0
- data/rdoc/images/tag_blue.png +0 -0
- data/rdoc/images/tag_green.png +0 -0
- data/rdoc/images/transparent.png +0 -0
- data/rdoc/images/wrench.png +0 -0
- data/rdoc/images/wrench_orange.png +0 -0
- data/rdoc/images/zoom.png +0 -0
- data/rdoc/index.html +0 -136
- data/rdoc/js/darkfish.js +0 -155
- data/rdoc/js/jquery.js +0 -4
- data/rdoc/js/navigation.js +0 -142
- data/rdoc/js/search.js +0 -94
- data/rdoc/js/search_index.js +0 -1
- data/rdoc/js/searcher.js +0 -228
- data/rdoc/rdoc.css +0 -595
- data/rdoc/table_of_contents.html +0 -942
data/rdoc/ESP/Suppression.html
DELETED
|
@@ -1,651 +0,0 @@
|
|
|
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::Suppression - 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.rb
|
|
53
|
-
<li>lib/esp/resources/alert.rb
|
|
54
|
-
<li>lib/esp/resources/custom_signature.rb
|
|
55
|
-
<li>lib/esp/resources/region.rb
|
|
56
|
-
<li>lib/esp/resources/signature.rb
|
|
57
|
-
<li>lib/esp/resources/suppression.rb
|
|
58
|
-
<li>lib/esp/resources/suppression/region.rb
|
|
59
|
-
<li>lib/esp/resources/suppression/signature.rb
|
|
60
|
-
<li>lib/esp/resources/suppression/unique_identifier.rb
|
|
61
|
-
</ul>
|
|
62
|
-
</nav>
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
</div>
|
|
66
|
-
|
|
67
|
-
<div id="class-metadata">
|
|
68
|
-
|
|
69
|
-
<nav id="parent-class-section" class="section">
|
|
70
|
-
<h3 class="section-header">Parent</h3>
|
|
71
|
-
|
|
72
|
-
<p class="link">ESP::Resource
|
|
73
|
-
|
|
74
|
-
</nav>
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
<!-- Method Quickref -->
|
|
79
|
-
<nav id="method-list-section" class="section">
|
|
80
|
-
<h3 class="section-header">Methods</h3>
|
|
81
|
-
|
|
82
|
-
<ul class="link-list">
|
|
83
|
-
|
|
84
|
-
<li ><a href="#method-c-all">::all</a>
|
|
85
|
-
|
|
86
|
-
<li ><a href="#method-c-find">::find</a>
|
|
87
|
-
|
|
88
|
-
<li ><a href="#method-i-created_by">#created_by</a>
|
|
89
|
-
|
|
90
|
-
<li ><a href="#method-i-custom_signatures">#custom_signatures</a>
|
|
91
|
-
|
|
92
|
-
<li ><a href="#method-i-deactivate">#deactivate</a>
|
|
93
|
-
|
|
94
|
-
<li ><a href="#method-i-deactivate-21">#deactivate!</a>
|
|
95
|
-
|
|
96
|
-
<li ><a href="#method-i-destroy">#destroy</a>
|
|
97
|
-
|
|
98
|
-
<li ><a href="#method-i-external_accounts">#external_accounts</a>
|
|
99
|
-
|
|
100
|
-
<li ><a href="#method-i-organization">#organization</a>
|
|
101
|
-
|
|
102
|
-
<li ><a href="#method-i-regions">#regions</a>
|
|
103
|
-
|
|
104
|
-
<li ><a href="#method-i-save">#save</a>
|
|
105
|
-
|
|
106
|
-
<li ><a href="#method-i-signatures">#signatures</a>
|
|
107
|
-
|
|
108
|
-
</ul>
|
|
109
|
-
</nav>
|
|
110
|
-
|
|
111
|
-
</div>
|
|
112
|
-
|
|
113
|
-
<div id="project-metadata">
|
|
114
|
-
<nav id="fileindex-section" class="section project-section">
|
|
115
|
-
<h3 class="section-header">Pages</h3>
|
|
116
|
-
|
|
117
|
-
<ul>
|
|
118
|
-
|
|
119
|
-
<li class="file"><a href="../README_md.html">README</a>
|
|
120
|
-
|
|
121
|
-
</ul>
|
|
122
|
-
</nav>
|
|
123
|
-
|
|
124
|
-
<nav id="classindex-section" class="section project-section">
|
|
125
|
-
<h3 class="section-header">Class and Module Index</h3>
|
|
126
|
-
|
|
127
|
-
<ul class="link-list">
|
|
128
|
-
|
|
129
|
-
<li><a href="../ActiveResource.html">ActiveResource</a>
|
|
130
|
-
|
|
131
|
-
<li><a href="../ActiveResource/Formats.html">ActiveResource::Formats</a>
|
|
132
|
-
|
|
133
|
-
<li><a href="../ActiveResource/PaginatedCollection.html">ActiveResource::PaginatedCollection</a>
|
|
134
|
-
|
|
135
|
-
<li><a href="../ESP.html">ESP</a>
|
|
136
|
-
|
|
137
|
-
<li><a href="../ESP/Alert.html">ESP::Alert</a>
|
|
138
|
-
|
|
139
|
-
<li><a href="../ESP/CloudTrailEvent.html">ESP::CloudTrailEvent</a>
|
|
140
|
-
|
|
141
|
-
<li><a href="../ESP/ContactRequest.html">ESP::ContactRequest</a>
|
|
142
|
-
|
|
143
|
-
<li><a href="../ESP/CustomSignature.html">ESP::CustomSignature</a>
|
|
144
|
-
|
|
145
|
-
<li><a href="../ESP/Dashboard.html">ESP::Dashboard</a>
|
|
146
|
-
|
|
147
|
-
<li><a href="../ESP/ExternalAccount.html">ESP::ExternalAccount</a>
|
|
148
|
-
|
|
149
|
-
<li><a href="../ESP/Metadata.html">ESP::Metadata</a>
|
|
150
|
-
|
|
151
|
-
<li><a href="../ESP/Organization.html">ESP::Organization</a>
|
|
152
|
-
|
|
153
|
-
<li><a href="../ESP/Region.html">ESP::Region</a>
|
|
154
|
-
|
|
155
|
-
<li><a href="../ESP/Report.html">ESP::Report</a>
|
|
156
|
-
|
|
157
|
-
<li><a href="../ESP/Service.html">ESP::Service</a>
|
|
158
|
-
|
|
159
|
-
<li><a href="../ESP/Signature.html">ESP::Signature</a>
|
|
160
|
-
|
|
161
|
-
<li><a href="../ESP/Stat.html">ESP::Stat</a>
|
|
162
|
-
|
|
163
|
-
<li><a href="../ESP/StatCustomSignature.html">ESP::StatCustomSignature</a>
|
|
164
|
-
|
|
165
|
-
<li><a href="../ESP/StatRegion.html">ESP::StatRegion</a>
|
|
166
|
-
|
|
167
|
-
<li><a href="../ESP/StatService.html">ESP::StatService</a>
|
|
168
|
-
|
|
169
|
-
<li><a href="../ESP/StatSignature.html">ESP::StatSignature</a>
|
|
170
|
-
|
|
171
|
-
<li><a href="../ESP/SubOrganization.html">ESP::SubOrganization</a>
|
|
172
|
-
|
|
173
|
-
<li><a href="../ESP/Suppression.html">ESP::Suppression</a>
|
|
174
|
-
|
|
175
|
-
<li><a href="../ESP/Suppression/Region.html">ESP::Suppression::Region</a>
|
|
176
|
-
|
|
177
|
-
<li><a href="../ESP/Suppression/Signature.html">ESP::Suppression::Signature</a>
|
|
178
|
-
|
|
179
|
-
<li><a href="../ESP/Suppression/UniqueIdentifier.html">ESP::Suppression::UniqueIdentifier</a>
|
|
180
|
-
|
|
181
|
-
<li><a href="../ESP/Tag.html">ESP::Tag</a>
|
|
182
|
-
|
|
183
|
-
<li><a href="../ESP/Team.html">ESP::Team</a>
|
|
184
|
-
|
|
185
|
-
<li><a href="../ESP/User.html">ESP::User</a>
|
|
186
|
-
|
|
187
|
-
</ul>
|
|
188
|
-
</nav>
|
|
189
|
-
|
|
190
|
-
</div>
|
|
191
|
-
</nav>
|
|
192
|
-
|
|
193
|
-
<div id="documentation">
|
|
194
|
-
<h1 class="class">class ESP::Suppression</h1>
|
|
195
|
-
|
|
196
|
-
<div id="description" class="description">
|
|
197
|
-
|
|
198
|
-
</div><!-- description -->
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
<section id="5Buntitled-5D" class="documentation-section">
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
<!-- Methods -->
|
|
213
|
-
|
|
214
|
-
<section id="public-class-5Buntitled-5D-method-details" class="method-section section">
|
|
215
|
-
<h3 class="section-header">Public Class Methods</h3>
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
<div id="method-c-all" class="method-detail ">
|
|
219
|
-
|
|
220
|
-
<div class="method-heading">
|
|
221
|
-
<span class="method-name">all</span><span
|
|
222
|
-
class="method-args">()</span>
|
|
223
|
-
|
|
224
|
-
<span class="method-click-advice">click to toggle source</span>
|
|
225
|
-
|
|
226
|
-
</div>
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
<div class="method-description">
|
|
230
|
-
|
|
231
|
-
<p>Return a paginated <a href="Suppression.html">Suppression</a> list</p>
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
<div class="method-source-code" id="all-source">
|
|
237
|
-
<pre><span class="ruby-comment"># File lib/esp/resources/suppression.rb, line 85</span>
|
|
238
|
-
</pre>
|
|
239
|
-
</div><!-- all-source -->
|
|
240
|
-
|
|
241
|
-
</div>
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
</div><!-- all-method -->
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
<div id="method-c-find" class="method-detail ">
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
<div class="method-heading">
|
|
253
|
-
<span class="method-callseq">
|
|
254
|
-
find(id)
|
|
255
|
-
</span>
|
|
256
|
-
|
|
257
|
-
<span class="method-click-advice">click to toggle source</span>
|
|
258
|
-
|
|
259
|
-
</div>
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
<div class="method-description">
|
|
264
|
-
|
|
265
|
-
<p>Find a <a href="Suppression.html">Suppression</a> by id</p>
|
|
266
|
-
|
|
267
|
-
<h4 id="method-c-find-label-Parameter">Parameter<span><a href="#method-c-find-label-Parameter">¶</a> <a href="#documentation">↑</a></span></h4>
|
|
268
|
-
|
|
269
|
-
<p><code>id</code> | Required | The ID of the suppression to retrieve</p>
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
<div class="method-source-code" id="find-source">
|
|
275
|
-
<pre><span class="ruby-comment"># File lib/esp/resources/suppression.rb, line 83</span>
|
|
276
|
-
</pre>
|
|
277
|
-
</div><!-- find-source -->
|
|
278
|
-
|
|
279
|
-
</div>
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
</div><!-- find-method -->
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
</section><!-- public-class-method-details -->
|
|
288
|
-
|
|
289
|
-
<section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
|
|
290
|
-
<h3 class="section-header">Public Instance Methods</h3>
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
<div id="method-i-created_by" class="method-detail ">
|
|
294
|
-
|
|
295
|
-
<div class="method-heading">
|
|
296
|
-
<span class="method-name">created_by</span><span
|
|
297
|
-
class="method-args">()</span>
|
|
298
|
-
|
|
299
|
-
<span class="method-click-advice">click to toggle source</span>
|
|
300
|
-
|
|
301
|
-
</div>
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
<div class="method-description">
|
|
305
|
-
|
|
306
|
-
<p>The user who created the suppression.</p>
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
<div class="method-source-code" id="created_by-source">
|
|
312
|
-
<pre><span class="ruby-comment"># File lib/esp/resources/suppression.rb, line 9</span>
|
|
313
|
-
<span class="ruby-identifier">belongs_to</span> <span class="ruby-value">:created_by</span>, <span class="ruby-identifier">class_name</span><span class="ruby-operator">:</span> <span class="ruby-string">'ESP::User'</span>
|
|
314
|
-
</pre>
|
|
315
|
-
</div><!-- created_by-source -->
|
|
316
|
-
|
|
317
|
-
</div>
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
</div><!-- created_by-method -->
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
<div id="method-i-custom_signatures" class="method-detail ">
|
|
326
|
-
|
|
327
|
-
<div class="method-heading">
|
|
328
|
-
<span class="method-name">custom_signatures</span><span
|
|
329
|
-
class="method-args">()</span>
|
|
330
|
-
|
|
331
|
-
<span class="method-click-advice">click to toggle source</span>
|
|
332
|
-
|
|
333
|
-
</div>
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
<div class="method-description">
|
|
337
|
-
|
|
338
|
-
<p>The custom signatures being suppressed.</p>
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
<div class="method-source-code" id="custom_signatures-source">
|
|
344
|
-
<pre><span class="ruby-comment"># File lib/esp/resources/suppression.rb, line 28</span>
|
|
345
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">custom_signatures</span>
|
|
346
|
-
<span class="ruby-keyword">return</span> [] <span class="ruby-keyword">unless</span> <span class="ruby-identifier">respond_to?</span> <span class="ruby-value">:custom_signature_ids</span>
|
|
347
|
-
<span class="ruby-constant">ESP</span><span class="ruby-operator">::</span><span class="ruby-constant">CustomSignature</span>.<span class="ruby-identifier">find</span>(<span class="ruby-value">:all</span>, <span class="ruby-identifier">params</span><span class="ruby-operator">:</span> { <span class="ruby-identifier">id</span><span class="ruby-operator">:</span> <span class="ruby-identifier">custom_signature_ids</span> })
|
|
348
|
-
<span class="ruby-keyword">end</span></pre>
|
|
349
|
-
</div><!-- custom_signatures-source -->
|
|
350
|
-
|
|
351
|
-
</div>
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
</div><!-- custom_signatures-method -->
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
<div id="method-i-deactivate" class="method-detail ">
|
|
360
|
-
|
|
361
|
-
<div class="method-heading">
|
|
362
|
-
<span class="method-name">deactivate</span><span
|
|
363
|
-
class="method-args">()</span>
|
|
364
|
-
|
|
365
|
-
<span class="method-click-advice">click to toggle source</span>
|
|
366
|
-
|
|
367
|
-
</div>
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
<div class="method-description">
|
|
371
|
-
|
|
372
|
-
<p>Deactivate the current suppression instance. The current object will be
|
|
373
|
-
updated with the new status if successful. If not successful, populates its
|
|
374
|
-
errors object.</p>
|
|
375
|
-
|
|
376
|
-
<h3 id="method-i-deactivate-label-Once+deactivated+the+suppression+cannot+be+reactivated.">Once deactivated the suppression cannot be reactivated.<span><a href="#method-i-deactivate-label-Once+deactivated+the+suppression+cannot+be+reactivated.">¶</a> <a href="#documentation">↑</a></span></h3>
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
<div class="method-source-code" id="deactivate-source">
|
|
382
|
-
<pre><span class="ruby-comment"># File lib/esp/resources/suppression.rb, line 62</span>
|
|
383
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">deactivate</span>
|
|
384
|
-
<span class="ruby-identifier">patch</span>(<span class="ruby-value">:deactivate</span>).<span class="ruby-identifier">tap</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">response</span><span class="ruby-operator">|</span>
|
|
385
|
-
<span class="ruby-identifier">load_attributes_from_response</span>(<span class="ruby-identifier">response</span>)
|
|
386
|
-
<span class="ruby-keyword">end</span>
|
|
387
|
-
<span class="ruby-keyword">rescue</span> <span class="ruby-constant">ActiveResource</span><span class="ruby-operator">::</span><span class="ruby-constant">BadRequest</span>, <span class="ruby-constant">ActiveResource</span><span class="ruby-operator">::</span><span class="ruby-constant">ResourceInvalid</span>, <span class="ruby-constant">ActiveResource</span><span class="ruby-operator">::</span><span class="ruby-constant">UnauthorizedAccess</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">error</span>
|
|
388
|
-
<span class="ruby-identifier">load_remote_errors</span>(<span class="ruby-identifier">error</span>, <span class="ruby-keyword">true</span>)
|
|
389
|
-
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">code</span> = <span class="ruby-identifier">error</span>.<span class="ruby-identifier">response</span>.<span class="ruby-identifier">code</span>
|
|
390
|
-
<span class="ruby-keyword">false</span>
|
|
391
|
-
<span class="ruby-keyword">end</span></pre>
|
|
392
|
-
</div><!-- deactivate-source -->
|
|
393
|
-
|
|
394
|
-
</div>
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
</div><!-- deactivate-method -->
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
<div id="method-i-deactivate-21" class="method-detail ">
|
|
403
|
-
|
|
404
|
-
<div class="method-heading">
|
|
405
|
-
<span class="method-name">deactivate!</span><span
|
|
406
|
-
class="method-args">()</span>
|
|
407
|
-
|
|
408
|
-
<span class="method-click-advice">click to toggle source</span>
|
|
409
|
-
|
|
410
|
-
</div>
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
<div class="method-description">
|
|
414
|
-
|
|
415
|
-
<p>Deactivate the current suppression instance. The current object will be
|
|
416
|
-
updated with the new status if successful. Throws an error if not
|
|
417
|
-
successful.</p>
|
|
418
|
-
|
|
419
|
-
<h3 id="method-i-deactivate-21-label-Once+deactivated+the+suppression+cannot+be+reactivated.">Once deactivated the suppression cannot be reactivated.<span><a href="#method-i-deactivate-21-label-Once+deactivated+the+suppression+cannot+be+reactivated.">¶</a> <a href="#documentation">↑</a></span></h3>
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
<div class="method-source-code" id="deactivate-21-source">
|
|
425
|
-
<pre><span class="ruby-comment"># File lib/esp/resources/suppression.rb, line 52</span>
|
|
426
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">deactivate!</span>
|
|
427
|
-
<span class="ruby-keyword">return</span> <span class="ruby-keyword">self</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">deactivate</span>
|
|
428
|
-
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">message</span> = <span class="ruby-identifier">errors</span>.<span class="ruby-identifier">full_messages</span>.<span class="ruby-identifier">join</span>(<span class="ruby-string">' '</span>)
|
|
429
|
-
<span class="ruby-identifier">fail</span>(<span class="ruby-constant">ActiveResource</span><span class="ruby-operator">::</span><span class="ruby-constant">ResourceInvalid</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword">self</span>)) <span class="ruby-comment"># rubocop:disable Style/RaiseArgs</span>
|
|
430
|
-
<span class="ruby-keyword">end</span></pre>
|
|
431
|
-
</div><!-- deactivate-21-source -->
|
|
432
|
-
|
|
433
|
-
</div>
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
</div><!-- deactivate-21-method -->
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
<div id="method-i-destroy" class="method-detail ">
|
|
442
|
-
|
|
443
|
-
<div class="method-heading">
|
|
444
|
-
<span class="method-name">destroy</span><span
|
|
445
|
-
class="method-args">()</span>
|
|
446
|
-
|
|
447
|
-
<span class="method-click-advice">click to toggle source</span>
|
|
448
|
-
|
|
449
|
-
</div>
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
<div class="method-description">
|
|
453
|
-
|
|
454
|
-
<p>Not Implemented. You cannot destroy a <a
|
|
455
|
-
href="Suppression.html">Suppression</a>.</p>
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
<div class="method-source-code" id="destroy-source">
|
|
461
|
-
<pre><span class="ruby-comment"># File lib/esp/resources/suppression.rb, line 44</span>
|
|
462
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">destroy</span>
|
|
463
|
-
<span class="ruby-identifier">fail</span> <span class="ruby-constant">ESP</span><span class="ruby-operator">::</span><span class="ruby-constant">NotImplementedError</span>
|
|
464
|
-
<span class="ruby-keyword">end</span></pre>
|
|
465
|
-
</div><!-- destroy-source -->
|
|
466
|
-
|
|
467
|
-
</div>
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
</div><!-- destroy-method -->
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
<div id="method-i-external_accounts" class="method-detail ">
|
|
476
|
-
|
|
477
|
-
<div class="method-heading">
|
|
478
|
-
<span class="method-name">external_accounts</span><span
|
|
479
|
-
class="method-args">()</span>
|
|
480
|
-
|
|
481
|
-
<span class="method-click-advice">click to toggle source</span>
|
|
482
|
-
|
|
483
|
-
</div>
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
<div class="method-description">
|
|
487
|
-
|
|
488
|
-
<p>The external accounts affected by this suppression.</p>
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
<div class="method-source-code" id="external_accounts-source">
|
|
494
|
-
<pre><span class="ruby-comment"># File lib/esp/resources/suppression.rb, line 17</span>
|
|
495
|
-
<span class="ruby-identifier">has_many</span> <span class="ruby-value">:external_accounts</span>, <span class="ruby-identifier">class_name</span><span class="ruby-operator">:</span> <span class="ruby-string">'ESP::ExternalAccount'</span>
|
|
496
|
-
</pre>
|
|
497
|
-
</div><!-- external_accounts-source -->
|
|
498
|
-
|
|
499
|
-
</div>
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
</div><!-- external_accounts-method -->
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
<div id="method-i-organization" class="method-detail ">
|
|
508
|
-
|
|
509
|
-
<div class="method-heading">
|
|
510
|
-
<span class="method-name">organization</span><span
|
|
511
|
-
class="method-args">()</span>
|
|
512
|
-
|
|
513
|
-
<span class="method-click-advice">click to toggle source</span>
|
|
514
|
-
|
|
515
|
-
</div>
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
<div class="method-description">
|
|
519
|
-
|
|
520
|
-
<p>The organization this sub organization belongs to.</p>
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
<div class="method-source-code" id="organization-source">
|
|
526
|
-
<pre><span class="ruby-comment"># File lib/esp/resources/suppression.rb, line 5</span>
|
|
527
|
-
<span class="ruby-identifier">belongs_to</span> <span class="ruby-value">:organization</span>, <span class="ruby-identifier">class_name</span><span class="ruby-operator">:</span> <span class="ruby-string">'ESP::Organization'</span>
|
|
528
|
-
</pre>
|
|
529
|
-
</div><!-- organization-source -->
|
|
530
|
-
|
|
531
|
-
</div>
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
</div><!-- organization-method -->
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
<div id="method-i-regions" class="method-detail ">
|
|
540
|
-
|
|
541
|
-
<div class="method-heading">
|
|
542
|
-
<span class="method-name">regions</span><span
|
|
543
|
-
class="method-args">()</span>
|
|
544
|
-
|
|
545
|
-
<span class="method-click-advice">click to toggle source</span>
|
|
546
|
-
|
|
547
|
-
</div>
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
<div class="method-description">
|
|
551
|
-
|
|
552
|
-
<p>The regions affected by this suppression.</p>
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
<div class="method-source-code" id="regions-source">
|
|
558
|
-
<pre><span class="ruby-comment"># File lib/esp/resources/suppression.rb, line 13</span>
|
|
559
|
-
<span class="ruby-identifier">has_many</span> <span class="ruby-value">:regions</span>, <span class="ruby-identifier">class_name</span><span class="ruby-operator">:</span> <span class="ruby-string">'ESP::Region'</span>
|
|
560
|
-
</pre>
|
|
561
|
-
</div><!-- regions-source -->
|
|
562
|
-
|
|
563
|
-
</div>
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
</div><!-- regions-method -->
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
<div id="method-i-save" class="method-detail ">
|
|
572
|
-
|
|
573
|
-
<div class="method-heading">
|
|
574
|
-
<span class="method-name">save</span><span
|
|
575
|
-
class="method-args">()</span>
|
|
576
|
-
|
|
577
|
-
<span class="method-click-advice">click to toggle source</span>
|
|
578
|
-
|
|
579
|
-
</div>
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
<div class="method-description">
|
|
583
|
-
|
|
584
|
-
<p>Not Implemented. You cannot create or update a <a
|
|
585
|
-
href="Suppression.html">Suppression</a>.</p>
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
<div class="method-source-code" id="save-source">
|
|
591
|
-
<pre><span class="ruby-comment"># File lib/esp/resources/suppression.rb, line 39</span>
|
|
592
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">save</span>
|
|
593
|
-
<span class="ruby-identifier">fail</span> <span class="ruby-constant">ESP</span><span class="ruby-operator">::</span><span class="ruby-constant">NotImplementedError</span>
|
|
594
|
-
<span class="ruby-keyword">end</span></pre>
|
|
595
|
-
</div><!-- save-source -->
|
|
596
|
-
|
|
597
|
-
</div>
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
</div><!-- save-method -->
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
<div id="method-i-signatures" class="method-detail ">
|
|
606
|
-
|
|
607
|
-
<div class="method-heading">
|
|
608
|
-
<span class="method-name">signatures</span><span
|
|
609
|
-
class="method-args">()</span>
|
|
610
|
-
|
|
611
|
-
<span class="method-click-advice">click to toggle source</span>
|
|
612
|
-
|
|
613
|
-
</div>
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
<div class="method-description">
|
|
617
|
-
|
|
618
|
-
<p>The signatures being suppressed.</p>
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
<div class="method-source-code" id="signatures-source">
|
|
624
|
-
<pre><span class="ruby-comment"># File lib/esp/resources/suppression.rb, line 21</span>
|
|
625
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">signatures</span>
|
|
626
|
-
<span class="ruby-keyword">return</span> [] <span class="ruby-keyword">unless</span> <span class="ruby-identifier">respond_to?</span> <span class="ruby-value">:signature_ids</span>
|
|
627
|
-
<span class="ruby-constant">ESP</span><span class="ruby-operator">::</span><span class="ruby-constant">Signature</span>.<span class="ruby-identifier">find</span>(<span class="ruby-value">:all</span>, <span class="ruby-identifier">params</span><span class="ruby-operator">:</span> { <span class="ruby-identifier">id</span><span class="ruby-operator">:</span> <span class="ruby-identifier">signature_ids</span> })
|
|
628
|
-
<span class="ruby-keyword">end</span></pre>
|
|
629
|
-
</div><!-- signatures-source -->
|
|
630
|
-
|
|
631
|
-
</div>
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
</div><!-- signatures-method -->
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
</section><!-- public-instance-method-details -->
|
|
640
|
-
|
|
641
|
-
</section><!-- 5Buntitled-5D -->
|
|
642
|
-
|
|
643
|
-
</div><!-- documentation -->
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
<footer id="validator-badges">
|
|
647
|
-
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
|
648
|
-
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 4.0.0.
|
|
649
|
-
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
|
650
|
-
</footer>
|
|
651
|
-
|