Class: UpdateBucketPolicy
- Inherits:
-
Thor
- Object
- Thor
- UpdateBucketPolicy
- Defined in:
- lib/cicd/builder/environments-list/mixlib/lib/update_bucket_policy.rb
Overview
Constant Summary collapse
- KNOWN =
%w(38.117.159.162/32 70.151.98.131/32 )
Instance Attribute Summary collapse
-
#accounts ⇒ Object
readonly
Returns the value of attribute accounts.
-
#clients ⇒ Object
readonly
Returns the value of attribute clients.
-
#environments ⇒ Object
readonly
Returns the value of attribute environments.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#stacks ⇒ Object
readonly
Returns the value of attribute stacks.
Instance Method Summary collapse
-
#initialize(args = [], local_options = {}, config = {}) ⇒ UpdateBucketPolicy
constructor
A new instance of UpdateBucketPolicy.
- #inspect ⇒ Object
- #read ⇒ Object
- #update ⇒ Object
- #write ⇒ Object
Constructor Details
#initialize(args = [], local_options = {}, config = {}) ⇒ UpdateBucketPolicy
Returns a new instance of UpdateBucketPolicy.
312 313 314 |
# File 'lib/cicd/builder/environments-list/mixlib/lib/update_bucket_policy.rb', line 312 def initialize(args = [], = {}, config = {}) super(args,,config) end |
Instance Attribute Details
#accounts ⇒ Object (readonly)
Returns the value of attribute accounts.
49 50 51 |
# File 'lib/cicd/builder/environments-list/mixlib/lib/update_bucket_policy.rb', line 49 def accounts @accounts end |
#clients ⇒ Object (readonly)
Returns the value of attribute clients.
49 50 51 |
# File 'lib/cicd/builder/environments-list/mixlib/lib/update_bucket_policy.rb', line 49 def clients @clients end |
#environments ⇒ Object (readonly)
Returns the value of attribute environments.
49 50 51 |
# File 'lib/cicd/builder/environments-list/mixlib/lib/update_bucket_policy.rb', line 49 def environments @environments end |
#logger ⇒ Object
Returns the value of attribute logger.
50 51 52 |
# File 'lib/cicd/builder/environments-list/mixlib/lib/update_bucket_policy.rb', line 50 def logger @logger end |
#stacks ⇒ Object (readonly)
Returns the value of attribute stacks.
49 50 51 |
# File 'lib/cicd/builder/environments-list/mixlib/lib/update_bucket_policy.rb', line 49 def stacks @stacks end |
Instance Method Details
#inspect ⇒ Object
331 332 333 334 335 336 337 338 339 340 |
# File 'lib/cicd/builder/environments-list/mixlib/lib/update_bucket_policy.rb', line 331 def inspect() prepare_accounts() inspect_bucket_policy() @policies.each do |pol| logger.debug JSON.pretty_generate(pol, { indent: "\t", space: ' '}) end 0 end |
#read ⇒ Object
317 318 319 320 321 322 323 324 325 326 327 328 |
# File 'lib/cicd/builder/environments-list/mixlib/lib/update_bucket_policy.rb', line 317 def read() prepare_accounts read_bucket_policy n = 1 @policies.each do |pol| logger.step "#{n+=1}\n"+JSON.pretty_generate(pol, { indent: "\t", space: ' '}) end 0 end |
#update ⇒ Object
343 344 345 346 347 348 349 |
# File 'lib/cicd/builder/environments-list/mixlib/lib/update_bucket_policy.rb', line 343 def update() prepare_accounts() update_bucket_policy() 0 end |
#write ⇒ Object
352 353 354 355 356 357 358 359 360 361 |
# File 'lib/cicd/builder/environments-list/mixlib/lib/update_bucket_policy.rb', line 352 def write() prepare_accounts @options[:inifile] = @options[:bucketini] @logger.info .ai write_bucket_policy 0 end |