aws_account_utils 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 79a564cff80b5c7490a6c9f586818af44291a017
4
+ data.tar.gz: c790580762a7dca94ab5d59bce32d18484bc1851
5
+ SHA512:
6
+ metadata.gz: 4e8678b02ed10dd429002d841ca3a3676cb55f24a09543c2786ec11f1eff7363dbbceb931188e4ea7afe6c735449588a05b34abc064086d27af49dc736d93901
7
+ data.tar.gz: 8561de0dd6419b28957d01ef5589b1beeece3ca8246bb381fd40175ba450d64e554fd3863da99f1cae4a554067019b9da5ef2442945fc5b5a0d56c52f925a1e0
@@ -0,0 +1,50 @@
1
+ # This is a sample .codeclimate.yml configured for Engine analysis on Code
2
+ # Climate Platform. For an overview of the Code Climate Platform, see here:
3
+ # http://docs.codeclimate.com/article/300-the-codeclimate-platform
4
+
5
+ # Under the engines key, you can configure which engines will analyze your repo.
6
+ # Each key is an engine name. For each value, you need to specify enabled: true
7
+ # to enable the engine as well as any other engines-specific configuration.
8
+
9
+ # For more details, see here:
10
+ # http://docs.codeclimate.com/article/289-configuring-your-repository-via-codeclimate-yml#platform
11
+
12
+ # For a list of all available engines, see here:
13
+ # http://docs.codeclimate.com/article/296-engines-available-engines
14
+
15
+ engines:
16
+ # to turn on an engine, add it here and set enabled to `true`
17
+ # to turn off an engine, set enabled to `false` or remove it
18
+ rubocop:
19
+ enabled: true
20
+ golint:
21
+ enabled: true
22
+ gofmt:
23
+ enabled: true
24
+ eslint:
25
+ enabled: true
26
+ csslint:
27
+ enabled: true
28
+
29
+ # Engines can analyze files and report issues on them, but you can separately
30
+ # decide which files will receive ratings based on those issues. This is
31
+ # specified by path patterns under the ratings key.
32
+
33
+ # For more details see here:
34
+ # http://docs.codeclimate.com/article/289-configuring-your-repository-via-codeclimate-yml#platform
35
+
36
+ # Note: If the ratings key is not specified, this will result in a 0.0 GPA on your dashboard.
37
+
38
+ # ratings:
39
+ # paths:
40
+ # - app/**
41
+ # - lib/**
42
+ # - "**.rb"
43
+ # - "**.go"
44
+
45
+ # You can globally exclude files from being analyzed by any engine using the
46
+ # exclude_paths key.
47
+
48
+ #exclude_paths:
49
+ #- spec/**/*
50
+ #- vendor/**/*
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
@@ -0,0 +1 @@
1
+ aws_account_utils
@@ -0,0 +1 @@
1
+ 2.1.2
@@ -0,0 +1,13 @@
1
+ # Contributor Code of Conduct
2
+
3
+ As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
4
+
5
+ We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, age, or religion.
6
+
7
+ Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
8
+
9
+ Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
10
+
11
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
12
+
13
+ This Code of Conduct is adapted from the [Contributor Covenant](http:contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in aws_account_utils.gemspec
4
+ gemspec
@@ -0,0 +1,415 @@
1
+ # AwsAccountUtils
2
+
3
+ A collection of helpers for creating and modifying AWS account details that can not be done using any existing AWS API
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'aws_account_utils'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install aws_account_utils
20
+
21
+ ## Usage
22
+
23
+ Operations
24
+ =================
25
+ * [create_account](#create_account)
26
+ * [change_root_password](#change_root_password)
27
+ * [check_enterprise_support](#check_enterprise_support)
28
+ * [confirm_consolidated_billing](#confirm_consolidated_billing)
29
+ * [create_root_access_keys](#create_root_access_keys)
30
+ * [delete_root_access_keys](#delete_root_access_keys)
31
+ * [email_opt_out](#email_opt_out)
32
+ * [enable_enterprise_support](#enable_enterprise_support)
33
+ * [enable_iam_billing](#enable_iam_billing)
34
+ * [logout_from_console](#logout_from_console)
35
+ * [request_consolidated_billing](#request_consolidated_billing)
36
+ * [set_alternate_contacts](#set_alternate_contacts)
37
+ * [set_challenge_questions](#set_challenge_questions)
38
+
39
+ create_account
40
+ ------------
41
+
42
+ > Creates a new AWS Account and with the miminal amount of information and
43
+ > returns the account number of the new account.
44
+
45
+ `#create_account(account_name:, account_email, account_password:, account_details:)`
46
+
47
+ **Examples:**
48
+ ```Ruby
49
+ details = { 'fullName' => 'Hermen Munster',
50
+ 'company' => 'The Munsters',
51
+ 'addressLine1' => '1313 Mockingbird Lane',
52
+ 'city' => 'Mockingbird Heights',
53
+ 'state' => 'CA',
54
+ 'postalCode' => '92000',
55
+ 'phoneNumber' => '(800) 555-1212',
56
+ 'guess' => 'Test Account' }
57
+
58
+ resp = aws_utils.create_account(account_name: 'My Test Account 01',
59
+ account_email: 'adfefef@gmail.com',
60
+ account_password: 'foobar1212121',
61
+ account_details: details)
62
+ resp #=> String
63
+ ```
64
+
65
+ **Paramaters:**
66
+ ```
67
+ account_name: (required, String) - The account name to associate with this new account
68
+ account_email: (required, String) - The email to associate with this new account
69
+ account_password: (required, String) - The password to use with this new account
70
+ account_details: (required, Hash) - Hash of account deatails
71
+ ```
72
+
73
+ **Returns:**
74
+
75
+ `1234-1223-1242 #Accont Number => String`
76
+
77
+ change_root_password
78
+ ------------
79
+
80
+
81
+ > Changes the account password
82
+
83
+ `change_root_password(account_email:, account_password:, new_password:)`
84
+
85
+ **Examples:**
86
+ ```Ruby
87
+
88
+ resp #=> String
89
+ ```
90
+
91
+ **Paramaters:**
92
+ ```
93
+ account_email: (required, String) - The email to associate with this new account
94
+ account_password: (required, String) - The old password to use with this new account
95
+ new_password: (required, String) - The new password to use with this new account
96
+ ```
97
+
98
+ **Returns:**
99
+
100
+ `#return => Boolean`
101
+
102
+ ---
103
+
104
+ check_enterprise_support
105
+ ------------
106
+
107
+ > Checks if enterprise support is enabled
108
+
109
+ `check_enterprise_support(account_email:, account_password:)`
110
+
111
+ **Examples:**
112
+ ```Ruby
113
+
114
+ resp #=> String
115
+ ```
116
+
117
+ **Paramaters:**
118
+ ```
119
+ account_email: (required, String) - The email to associate with this new account
120
+ account_password: (required, String) - The password to use with this new account
121
+ ```
122
+
123
+ **Returns:**
124
+
125
+ `#return => Boolean`
126
+
127
+ ---
128
+
129
+ confirm_consolidated_billing
130
+ ------------
131
+
132
+ > Confirms consolidated billing
133
+
134
+ `confirm_consolidated_billing(account_email:, account_password:, confirmation_link:)`
135
+
136
+ **Examples:**
137
+ ```Ruby
138
+
139
+ resp #=> String
140
+ ```
141
+
142
+ **Paramaters:**
143
+ ```
144
+ account_email: (required, String) - The email to associate with this new account
145
+ account_password: (required, String) - The password to use with this new account
146
+ ```
147
+
148
+ **Returns:**
149
+
150
+ `#return => Boolean`
151
+
152
+ ---
153
+
154
+ create_root_access_keys
155
+ ------------
156
+
157
+ > Creates access and secret key for root account
158
+
159
+ `create_root_access_keys(account_email:, account_password:)`
160
+ **Examples:**
161
+ ```Ruby
162
+
163
+ resp #=> String
164
+ ```
165
+
166
+ **Paramaters:**
167
+ ```
168
+ account_email: (required, String) - The email to associate with this new account
169
+ account_password: (required, String) - The password to use with this new account
170
+ ```
171
+
172
+ **Returns:**
173
+
174
+ `#return => Boolean`
175
+
176
+ ---
177
+
178
+ delete_root_access_keys
179
+ ------------
180
+
181
+ > Deletes ALL root access/secret keys from the root of the account
182
+
183
+ `delete_root_access_keys(account_email:, account_password:)`
184
+
185
+ **Examples:**
186
+ ```Ruby
187
+
188
+ resp #=> String
189
+ ```
190
+
191
+ **Paramaters:**
192
+ ```
193
+ account_email: (required, String) - The email to associate with this new account
194
+ account_password: (required, String) - The password to use with this new account
195
+ ```
196
+
197
+ **Returns:**
198
+
199
+ `#return => Boolean`
200
+
201
+ ---
202
+
203
+ email_opt_out
204
+ ------------
205
+
206
+ > Opts account out of all email marketing
207
+
208
+ `email_opt_out(account_email:, account_password:)`
209
+
210
+ **Examples:**
211
+ ```Ruby
212
+
213
+ resp #=> String
214
+ ```
215
+
216
+ **Paramaters:**
217
+ ```
218
+ account_email: (required, String) - The email to associate with this new account
219
+ account_password: (required, String) - The password to use with this new account
220
+ ```
221
+
222
+ **Returns:**
223
+
224
+ `#return => Boolean`
225
+
226
+ ---
227
+
228
+ enable_enterprise_support
229
+ ------------
230
+
231
+ > Enables enterprise support
232
+
233
+ `enable_enterprise_support(account_email:, account_password:)`
234
+
235
+ **Examples:**
236
+ ```Ruby
237
+
238
+ resp #=> String
239
+ ```
240
+
241
+ **Paramaters:**
242
+ ```
243
+ account_email: (required, String) - The email to associate with this new account
244
+ account_password: (required, String) - The password to use with this new account
245
+ ```
246
+
247
+ **Returns:**
248
+
249
+ `#return => Boolean`
250
+
251
+ ---
252
+
253
+ enable_iam_billing
254
+ ------------
255
+
256
+ > Sets the account to enable IAM billing
257
+
258
+ `enable_iam_billing(account_email:, account_password:)`
259
+ **Examples:**
260
+ ```Ruby
261
+
262
+ resp #=> String
263
+ ```
264
+
265
+ **Paramaters:**
266
+ ```
267
+ account_email: (required, String) - The email to associate with this new account
268
+ account_password: (required, String) - The password to use with this new account
269
+ ```
270
+
271
+ **Returns:**
272
+
273
+ `#return => Boolean`
274
+
275
+ ---
276
+
277
+ existing_consolidated_billing
278
+ ------------
279
+
280
+ > Checks to see if consolidated billing has been setup
281
+
282
+ `existing_consolidated_billing?(account_email:, account_password:)`
283
+
284
+ **Examples:**
285
+ ```Ruby
286
+
287
+ resp #=> String
288
+ ```
289
+
290
+ **Paramaters:**
291
+ ```
292
+ account_email: (required, String) - The email to associate with this new account
293
+ account_password: (required, String) - The password to use with this new account
294
+ ```
295
+
296
+ **Returns:**
297
+
298
+ `#return => Boolean`
299
+
300
+ ---
301
+
302
+ logout_from_console
303
+ ------------
304
+
305
+ > Logs out of the console
306
+
307
+ `logout_from_console`
308
+
309
+ **Examples:**
310
+ ```Ruby
311
+
312
+ resp #=> String
313
+ ```
314
+
315
+ **Paramaters:**
316
+ ```
317
+ account_email: (required, String) - The email to associate with this new account
318
+ account_password: (required, String) - The password to use with this new account
319
+ ```
320
+
321
+ **Returns:**
322
+
323
+ `#return => Boolean`
324
+
325
+ ---
326
+
327
+ request_consolidated_billing
328
+ ------------
329
+
330
+ > Requests consolidated billing to be setup with your master account. An email is sent to the
331
+ > account being added with a link. That link should be passed into `confirm_consolidated_billing`
332
+
333
+ `request_consolidated_billing(master_account_email:, master_account_password:, account_email:)`
334
+
335
+ **Examples:**
336
+ ```Ruby
337
+
338
+ resp #=> String
339
+ ```
340
+
341
+ **Paramaters:**
342
+ ```
343
+ account_email: (required, String) - The email to associate with this new account
344
+ account_password: (required, String) - The password to use with this new account
345
+ ```
346
+
347
+ **Returns:**
348
+
349
+ `#return => Boolean`
350
+
351
+ ---
352
+
353
+ set_alternate_contacts
354
+ ------------
355
+
356
+ > Sets alternate contacts for the account
357
+
358
+ `set_alternate_contacts(account_email:, account_password:, contact_info:)`
359
+
360
+ **Examples:**
361
+ ```Ruby
362
+
363
+ resp #=> String
364
+ ```
365
+
366
+ **Paramaters:**
367
+ ```
368
+ account_email: (required, String) - The email to associate with this new account
369
+ account_password: (required, String) - The password to use with this new account
370
+ ```
371
+
372
+ **Returns:**
373
+
374
+ `#return => Boolean`
375
+
376
+ ---
377
+
378
+ set_challenge_questions
379
+ ------------
380
+
381
+ > Sets the accounts challenge security questions
382
+
383
+ `set_challenge_questions(account_email:, account_password:, answers:)`
384
+
385
+ **Examples:**
386
+ ```Ruby
387
+
388
+ resp #=> String
389
+ ```
390
+
391
+ **Paramaters:**
392
+ ```
393
+ account_email: (required, String) - The email to associate with this new account
394
+ account_password: (required, String) - The password to use with this new account
395
+ ```
396
+
397
+ **Returns:**
398
+
399
+ `#return => Boolean`
400
+
401
+ ---
402
+
403
+ ## Development
404
+
405
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment.
406
+
407
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
408
+
409
+ ## Contributing
410
+
411
+ 1. Fork it ( https://github.com/[my-github-username]/aws_account_utils/fork )
412
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
413
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
414
+ 4. Push to the branch (`git push origin my-new-feature`)
415
+ 5. Create a new Pull Request