Class: Vaws::Aws::AcmDescriber

Inherits:
Describer show all
Defined in:
lib/vaws/aws/acm_describer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Describer

#single_option_validation

Constructor Details

#initializeAcmDescriber

Returns a new instance of AcmDescriber.



9
10
11
12
# File 'lib/vaws/aws/acm_describer.rb', line 9

def initialize
  @acm_client = ::Aws::ACM::Client.new
  @term_table = ''
end

Instance Attribute Details

#term_tableObject (readonly)

Returns the value of attribute term_table.



7
8
9
# File 'lib/vaws/aws/acm_describer.rb', line 7

def term_table
  @term_table
end

Instance Method Details

#set_basic_infoObject



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/vaws/aws/acm_describer.rb', line 14

def set_basic_info
  rows       = []
  next_token = nil

  begin
    param_args              = {
      max_items: 1000
    }
    param_args[:next_token] = next_token if next_token
    resp                    = @acm_client.list_certificates(param_args)
    resp.certificate_summary_list.each do |cert|
      cert_arn    = cert.certificate_arn
      cert_domain = cert.domain_name
      rows << [cert_domain, cert_arn]
    end
    next_token = resp.next_token
  end while next_token
  @term_table = Terminal::Table.new :headings => ['Domain', 'Arn'], :rows => rows.sort
end