esp_sdk 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- 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
@@ -1,567 +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::ExternalAccount - 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/external_account.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 ><a href="#method-c-all">::all</a>
|
77
|
-
|
78
|
-
<li ><a href="#method-c-create">::create</a>
|
79
|
-
|
80
|
-
<li ><a href="#method-c-find">::find</a>
|
81
|
-
|
82
|
-
<li ><a href="#method-i-destroy">#destroy</a>
|
83
|
-
|
84
|
-
<li ><a href="#method-i-generate_external_id">#generate_external_id</a>
|
85
|
-
|
86
|
-
<li ><a href="#method-i-organization">#organization</a>
|
87
|
-
|
88
|
-
<li ><a href="#method-i-save">#save</a>
|
89
|
-
|
90
|
-
<li ><a href="#method-i-sub_organization">#sub_organization</a>
|
91
|
-
|
92
|
-
<li ><a href="#method-i-team">#team</a>
|
93
|
-
|
94
|
-
</ul>
|
95
|
-
</nav>
|
96
|
-
|
97
|
-
</div>
|
98
|
-
|
99
|
-
<div id="project-metadata">
|
100
|
-
<nav id="fileindex-section" class="section project-section">
|
101
|
-
<h3 class="section-header">Pages</h3>
|
102
|
-
|
103
|
-
<ul>
|
104
|
-
|
105
|
-
<li class="file"><a href="../README_md.html">README</a>
|
106
|
-
|
107
|
-
</ul>
|
108
|
-
</nav>
|
109
|
-
|
110
|
-
<nav id="classindex-section" class="section project-section">
|
111
|
-
<h3 class="section-header">Class and Module Index</h3>
|
112
|
-
|
113
|
-
<ul class="link-list">
|
114
|
-
|
115
|
-
<li><a href="../ActiveResource.html">ActiveResource</a>
|
116
|
-
|
117
|
-
<li><a href="../ActiveResource/Formats.html">ActiveResource::Formats</a>
|
118
|
-
|
119
|
-
<li><a href="../ActiveResource/PaginatedCollection.html">ActiveResource::PaginatedCollection</a>
|
120
|
-
|
121
|
-
<li><a href="../ESP.html">ESP</a>
|
122
|
-
|
123
|
-
<li><a href="../ESP/Alert.html">ESP::Alert</a>
|
124
|
-
|
125
|
-
<li><a href="../ESP/CloudTrailEvent.html">ESP::CloudTrailEvent</a>
|
126
|
-
|
127
|
-
<li><a href="../ESP/ContactRequest.html">ESP::ContactRequest</a>
|
128
|
-
|
129
|
-
<li><a href="../ESP/CustomSignature.html">ESP::CustomSignature</a>
|
130
|
-
|
131
|
-
<li><a href="../ESP/Dashboard.html">ESP::Dashboard</a>
|
132
|
-
|
133
|
-
<li><a href="../ESP/ExternalAccount.html">ESP::ExternalAccount</a>
|
134
|
-
|
135
|
-
<li><a href="../ESP/Metadata.html">ESP::Metadata</a>
|
136
|
-
|
137
|
-
<li><a href="../ESP/Organization.html">ESP::Organization</a>
|
138
|
-
|
139
|
-
<li><a href="../ESP/Region.html">ESP::Region</a>
|
140
|
-
|
141
|
-
<li><a href="../ESP/Report.html">ESP::Report</a>
|
142
|
-
|
143
|
-
<li><a href="../ESP/Service.html">ESP::Service</a>
|
144
|
-
|
145
|
-
<li><a href="../ESP/Signature.html">ESP::Signature</a>
|
146
|
-
|
147
|
-
<li><a href="../ESP/Stat.html">ESP::Stat</a>
|
148
|
-
|
149
|
-
<li><a href="../ESP/StatCustomSignature.html">ESP::StatCustomSignature</a>
|
150
|
-
|
151
|
-
<li><a href="../ESP/StatRegion.html">ESP::StatRegion</a>
|
152
|
-
|
153
|
-
<li><a href="../ESP/StatService.html">ESP::StatService</a>
|
154
|
-
|
155
|
-
<li><a href="../ESP/StatSignature.html">ESP::StatSignature</a>
|
156
|
-
|
157
|
-
<li><a href="../ESP/SubOrganization.html">ESP::SubOrganization</a>
|
158
|
-
|
159
|
-
<li><a href="../ESP/Suppression.html">ESP::Suppression</a>
|
160
|
-
|
161
|
-
<li><a href="../ESP/Suppression/Region.html">ESP::Suppression::Region</a>
|
162
|
-
|
163
|
-
<li><a href="../ESP/Suppression/Signature.html">ESP::Suppression::Signature</a>
|
164
|
-
|
165
|
-
<li><a href="../ESP/Suppression/UniqueIdentifier.html">ESP::Suppression::UniqueIdentifier</a>
|
166
|
-
|
167
|
-
<li><a href="../ESP/Tag.html">ESP::Tag</a>
|
168
|
-
|
169
|
-
<li><a href="../ESP/Team.html">ESP::Team</a>
|
170
|
-
|
171
|
-
<li><a href="../ESP/User.html">ESP::User</a>
|
172
|
-
|
173
|
-
</ul>
|
174
|
-
</nav>
|
175
|
-
|
176
|
-
</div>
|
177
|
-
</nav>
|
178
|
-
|
179
|
-
<div id="documentation">
|
180
|
-
<h1 class="class">class ESP::ExternalAccount</h1>
|
181
|
-
|
182
|
-
<div id="description" class="description">
|
183
|
-
|
184
|
-
</div><!-- description -->
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
<section id="5Buntitled-5D" class="documentation-section">
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
<!-- Methods -->
|
199
|
-
|
200
|
-
<section id="public-class-5Buntitled-5D-method-details" class="method-section section">
|
201
|
-
<h3 class="section-header">Public Class Methods</h3>
|
202
|
-
|
203
|
-
|
204
|
-
<div id="method-c-all" class="method-detail ">
|
205
|
-
|
206
|
-
<div class="method-heading">
|
207
|
-
<span class="method-name">all</span><span
|
208
|
-
class="method-args">()</span>
|
209
|
-
|
210
|
-
<span class="method-click-advice">click to toggle source</span>
|
211
|
-
|
212
|
-
</div>
|
213
|
-
|
214
|
-
|
215
|
-
<div class="method-description">
|
216
|
-
|
217
|
-
<p>Return a paginated <a href="CustomSignature.html">CustomSignature</a> list</p>
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
<div class="method-source-code" id="all-source">
|
223
|
-
<pre><span class="ruby-comment"># File lib/esp/resources/external_account.rb, line 41</span>
|
224
|
-
</pre>
|
225
|
-
</div><!-- all-source -->
|
226
|
-
|
227
|
-
</div>
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
</div><!-- all-method -->
|
233
|
-
|
234
|
-
|
235
|
-
<div id="method-c-create" class="method-detail ">
|
236
|
-
|
237
|
-
|
238
|
-
<div class="method-heading">
|
239
|
-
<span class="method-callseq">
|
240
|
-
create(attributes={})
|
241
|
-
</span>
|
242
|
-
|
243
|
-
<span class="method-click-advice">click to toggle source</span>
|
244
|
-
|
245
|
-
</div>
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
<div class="method-description">
|
250
|
-
|
251
|
-
<p>Create an <a href="ExternalAccount.html">ExternalAccount</a>.</p>
|
252
|
-
|
253
|
-
<h4 id="method-c-create-label-Parameter">Parameter<span><a href="#method-c-create-label-Parameter">¶</a> <a href="#documentation">↑</a></span></h4>
|
254
|
-
|
255
|
-
<p><code>attributes</code> | Required | A hash of external account attributes</p>
|
256
|
-
|
257
|
-
<h5 id="method-c-create-label-Valid+Attributes">Valid Attributes<span><a href="#method-c-create-label-Valid+Attributes">¶</a> <a href="#documentation">↑</a></span></h5>
|
258
|
-
|
259
|
-
<p><code>arn</code> | Required | Amazon Resource Name for the IAM role</p>
|
260
|
-
|
261
|
-
<p><code>external_id</code> | Required | External identifier set on the role.
|
262
|
-
This will be set by calling <a
|
263
|
-
href="ExternalAccount.html#method-i-generate_external_id">generate_external_id</a>
|
264
|
-
if not already set.</p>
|
265
|
-
|
266
|
-
<p><code>name</code> | Not Required | The name for this external account</p>
|
267
|
-
|
268
|
-
<p><code>sub_organization_id</code> | Required | The ID of the sub
|
269
|
-
organization the external account will belong to</p>
|
270
|
-
|
271
|
-
<p><code>team_id</code> | Required | The ID of the team the external account
|
272
|
-
will belong to</p>
|
273
|
-
|
274
|
-
<h4 id="method-c-create-label-Example">Example<span><a href="#method-c-create-label-Example">¶</a> <a href="#documentation">↑</a></span></h4>
|
275
|
-
|
276
|
-
<pre>external_account = ESP::ExternalAccount.create(arn: 'arn:from:aws', external_id: 'c40e6af4-a5a0-422a-9a42-3d7d236c3428', sub_organization_id: 4, team_id: 8)</pre>
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
<div class="method-source-code" id="create-source">
|
282
|
-
<pre><span class="ruby-comment"># File lib/esp/resources/external_account.rb, line 66</span>
|
283
|
-
</pre>
|
284
|
-
</div><!-- create-source -->
|
285
|
-
|
286
|
-
</div>
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
</div><!-- create-method -->
|
292
|
-
|
293
|
-
|
294
|
-
<div id="method-c-find" class="method-detail ">
|
295
|
-
|
296
|
-
|
297
|
-
<div class="method-heading">
|
298
|
-
<span class="method-callseq">
|
299
|
-
find(id)
|
300
|
-
</span>
|
301
|
-
|
302
|
-
<span class="method-click-advice">click to toggle source</span>
|
303
|
-
|
304
|
-
</div>
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
<div class="method-description">
|
309
|
-
|
310
|
-
<p>Find an <a href="ExternalAccount.html">ExternalAccount</a> by id</p>
|
311
|
-
|
312
|
-
<h4 id="method-c-find-label-Parameter">Parameter<span><a href="#method-c-find-label-Parameter">¶</a> <a href="#documentation">↑</a></span></h4>
|
313
|
-
|
314
|
-
<p><code>id</code> | Required | The ID of the external account to retrieve</p>
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
<div class="method-source-code" id="find-source">
|
320
|
-
<pre><span class="ruby-comment"># File lib/esp/resources/external_account.rb, line 38</span>
|
321
|
-
</pre>
|
322
|
-
</div><!-- find-source -->
|
323
|
-
|
324
|
-
</div>
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
</div><!-- find-method -->
|
330
|
-
|
331
|
-
|
332
|
-
</section><!-- public-class-method-details -->
|
333
|
-
|
334
|
-
<section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
|
335
|
-
<h3 class="section-header">Public Instance Methods</h3>
|
336
|
-
|
337
|
-
|
338
|
-
<div id="method-i-destroy" class="method-detail ">
|
339
|
-
|
340
|
-
<div class="method-heading">
|
341
|
-
<span class="method-name">destroy</span><span
|
342
|
-
class="method-args">()</span>
|
343
|
-
|
344
|
-
<span class="method-click-advice">click to toggle source</span>
|
345
|
-
|
346
|
-
</div>
|
347
|
-
|
348
|
-
|
349
|
-
<div class="method-description">
|
350
|
-
|
351
|
-
<p>Delete a <a href="CustomSignature.html">CustomSignature</a></p>
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
<div class="method-source-code" id="destroy-source">
|
357
|
-
<pre><span class="ruby-comment"># File lib/esp/resources/external_account.rb, line 88</span>
|
358
|
-
</pre>
|
359
|
-
</div><!-- destroy-source -->
|
360
|
-
|
361
|
-
</div>
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
</div><!-- destroy-method -->
|
367
|
-
|
368
|
-
|
369
|
-
<div id="method-i-generate_external_id" class="method-detail ">
|
370
|
-
|
371
|
-
<div class="method-heading">
|
372
|
-
<span class="method-name">generate_external_id</span><span
|
373
|
-
class="method-args">()</span>
|
374
|
-
|
375
|
-
<span class="method-click-advice">click to toggle source</span>
|
376
|
-
|
377
|
-
</div>
|
378
|
-
|
379
|
-
|
380
|
-
<div class="method-description">
|
381
|
-
|
382
|
-
<p>Helper to generate an external id. Called automatically when creating an <a
|
383
|
-
href="ExternalAccount.html">ExternalAccount</a> if <code>external_id</code>
|
384
|
-
is not already set.</p>
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
<div class="method-source-code" id="generate_external_id-source">
|
390
|
-
<pre><span class="ruby-comment"># File lib/esp/resources/external_account.rb, line 17</span>
|
391
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">generate_external_id</span>
|
392
|
-
<span class="ruby-constant">SecureRandom</span>.<span class="ruby-identifier">uuid</span>
|
393
|
-
<span class="ruby-keyword">end</span></pre>
|
394
|
-
</div><!-- generate_external_id-source -->
|
395
|
-
|
396
|
-
</div>
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
</div><!-- generate_external_id-method -->
|
402
|
-
|
403
|
-
|
404
|
-
<div id="method-i-organization" class="method-detail ">
|
405
|
-
|
406
|
-
<div class="method-heading">
|
407
|
-
<span class="method-name">organization</span><span
|
408
|
-
class="method-args">()</span>
|
409
|
-
|
410
|
-
<span class="method-click-advice">click to toggle source</span>
|
411
|
-
|
412
|
-
</div>
|
413
|
-
|
414
|
-
|
415
|
-
<div class="method-description">
|
416
|
-
|
417
|
-
<p>The organization the external account belongs to.</p>
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
<div class="method-source-code" id="organization-source">
|
423
|
-
<pre><span class="ruby-comment"># File lib/esp/resources/external_account.rb, line 5</span>
|
424
|
-
<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>
|
425
|
-
</pre>
|
426
|
-
</div><!-- organization-source -->
|
427
|
-
|
428
|
-
</div>
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
</div><!-- organization-method -->
|
434
|
-
|
435
|
-
|
436
|
-
<div id="method-i-save" class="method-detail ">
|
437
|
-
|
438
|
-
<div class="method-heading">
|
439
|
-
<span class="method-name">save</span><span
|
440
|
-
class="method-args">()</span>
|
441
|
-
|
442
|
-
<span class="method-click-advice">click to toggle source</span>
|
443
|
-
|
444
|
-
</div>
|
445
|
-
|
446
|
-
|
447
|
-
<div class="method-description">
|
448
|
-
|
449
|
-
<p>Create or update an <a href="ExternalAccount.html">ExternalAccount</a>.</p>
|
450
|
-
|
451
|
-
<h5 id="method-i-save-label-Valid+Attributes">Valid Attributes<span><a href="#method-i-save-label-Valid+Attributes">¶</a> <a href="#documentation">↑</a></span></h5>
|
452
|
-
|
453
|
-
<p><code>arn</code> | Required | Amazon Resource Name for the IAM role</p>
|
454
|
-
|
455
|
-
<p><code>external_id</code> | Required | External identifier set on the role.
|
456
|
-
This will be set by calling <a
|
457
|
-
href="ExternalAccount.html#method-i-generate_external_id">generate_external_id</a>
|
458
|
-
if not already set.</p>
|
459
|
-
|
460
|
-
<p><code>name</code> | Not Required | The name for this external account</p>
|
461
|
-
|
462
|
-
<p><code>sub_organization_id</code> | Required | The ID of the sub
|
463
|
-
organization the external account will belong to</p>
|
464
|
-
|
465
|
-
<p><code>team_id</code> | Required | The ID of the team the external account
|
466
|
-
will belong to</p>
|
467
|
-
|
468
|
-
<h4 id="method-i-save-label-Example">Example<span><a href="#method-i-save-label-Example">¶</a> <a href="#documentation">↑</a></span></h4>
|
469
|
-
|
470
|
-
<pre>external_account = ESP::ExternalAccount.new(arn: 'arn:from:aws', external_id: 'c40e6af4-a5a0-422a-9a42-3d7d236c3428', sub_organization_id: 4, team_id: 8)
|
471
|
-
external_account.save</pre>
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
<div class="method-source-code" id="save-source">
|
477
|
-
<pre><span class="ruby-comment"># File lib/esp/resources/external_account.rb, line 86</span>
|
478
|
-
</pre>
|
479
|
-
</div><!-- save-source -->
|
480
|
-
|
481
|
-
</div>
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
</div><!-- save-method -->
|
487
|
-
|
488
|
-
|
489
|
-
<div id="method-i-sub_organization" class="method-detail ">
|
490
|
-
|
491
|
-
<div class="method-heading">
|
492
|
-
<span class="method-name">sub_organization</span><span
|
493
|
-
class="method-args">()</span>
|
494
|
-
|
495
|
-
<span class="method-click-advice">click to toggle source</span>
|
496
|
-
|
497
|
-
</div>
|
498
|
-
|
499
|
-
|
500
|
-
<div class="method-description">
|
501
|
-
|
502
|
-
<p>The <a
|
503
|
-
href="ExternalAccount.html#method-i-sub_organization">#sub_organization</a>
|
504
|
-
the external account belongs to.</p>
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
<div class="method-source-code" id="sub_organization-source">
|
510
|
-
<pre><span class="ruby-comment"># File lib/esp/resources/external_account.rb, line 9</span>
|
511
|
-
<span class="ruby-identifier">belongs_to</span> <span class="ruby-value">:sub_organization</span>, <span class="ruby-identifier">class_name</span><span class="ruby-operator">:</span> <span class="ruby-string">'ESP::SubOrganization'</span>
|
512
|
-
</pre>
|
513
|
-
</div><!-- sub_organization-source -->
|
514
|
-
|
515
|
-
</div>
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
</div><!-- sub_organization-method -->
|
521
|
-
|
522
|
-
|
523
|
-
<div id="method-i-team" class="method-detail ">
|
524
|
-
|
525
|
-
<div class="method-heading">
|
526
|
-
<span class="method-name">team</span><span
|
527
|
-
class="method-args">()</span>
|
528
|
-
|
529
|
-
<span class="method-click-advice">click to toggle source</span>
|
530
|
-
|
531
|
-
</div>
|
532
|
-
|
533
|
-
|
534
|
-
<div class="method-description">
|
535
|
-
|
536
|
-
<p>The team the external account belongs to.</p>
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
<div class="method-source-code" id="team-source">
|
542
|
-
<pre><span class="ruby-comment"># File lib/esp/resources/external_account.rb, line 13</span>
|
543
|
-
<span class="ruby-identifier">belongs_to</span> <span class="ruby-value">:team</span>, <span class="ruby-identifier">class_name</span><span class="ruby-operator">:</span> <span class="ruby-string">'ESP::Team'</span>
|
544
|
-
</pre>
|
545
|
-
</div><!-- team-source -->
|
546
|
-
|
547
|
-
</div>
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
</div><!-- team-method -->
|
553
|
-
|
554
|
-
|
555
|
-
</section><!-- public-instance-method-details -->
|
556
|
-
|
557
|
-
</section><!-- 5Buntitled-5D -->
|
558
|
-
|
559
|
-
</div><!-- documentation -->
|
560
|
-
|
561
|
-
|
562
|
-
<footer id="validator-badges">
|
563
|
-
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
564
|
-
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 4.0.0.
|
565
|
-
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
566
|
-
</footer>
|
567
|
-
|