module AwsPocketknife::Common::Utils
Public Instance Methods
asg_client()
click to toggle source
# File lib/aws_pocketknife/common/utils.rb, line 38 def asg_client @asg_client ||= AwsPocketknife.asg_client end
cloudwatch_logs_client()
click to toggle source
# File lib/aws_pocketknife/common/utils.rb, line 42 def cloudwatch_logs_client @cloudwatch_logs_client ||= AwsPocketknife.cloudwatch_logs_client end
ec2_client()
click to toggle source
include AwsPocketknife::Common::Logging
# File lib/aws_pocketknife/common/utils.rb, line 10 def ec2_client @ec2_client ||= AwsPocketknife.ec2_client end
ecs_client()
click to toggle source
# File lib/aws_pocketknife/common/utils.rb, line 14 def ecs_client @ecs_client ||= AwsPocketknife.ecs_client end
elastic_beanstalk_client()
click to toggle source
# File lib/aws_pocketknife/common/utils.rb, line 46 def elastic_beanstalk_client @elastic_beanstalk_client ||= AwsPocketknife.elastic_beanstalk_client end
elb_client()
click to toggle source
# File lib/aws_pocketknife/common/utils.rb, line 30 def elb_client @elb_client ||= AwsPocketknife.elb_client end
elb_clientV2()
click to toggle source
# File lib/aws_pocketknife/common/utils.rb, line 34 def elb_clientV2 @elb_clientV2 ||= AwsPocketknife.elb_clientV2 end
get_tag_value(tags: [], tag_key: "")
click to toggle source
# File lib/aws_pocketknife/common/utils.rb, line 59 def get_tag_value(tags: [], tag_key: "") unless tags.empty? or tag_key.length == 0 tag = tags.select { |tag| tag.key == tag_key } return tag[0].value if tag.length == 1 return "" if tag.length == 0 else return "" end end
iam_client()
click to toggle source
# File lib/aws_pocketknife/common/utils.rb, line 18 def iam_client @iam_client ||= AwsPocketknife.iam_client end
nice_print(object: nil)
click to toggle source
github.com/michaeldv/awesome_print
# File lib/aws_pocketknife/common/utils.rb, line 55 def nice_print(object: nil) ap object end
pretty_table(headers: [], data: [])
click to toggle source
# File lib/aws_pocketknife/common/utils.rb, line 50 def pretty_table(headers: [], data: []) puts PrettyTable.new(data, headers).to_s end
rds_client()
click to toggle source
# File lib/aws_pocketknife/common/utils.rb, line 26 def rds_client @rds_client ||= AwsPocketknife.rds_client end
route53_client()
click to toggle source
# File lib/aws_pocketknife/common/utils.rb, line 22 def route53_client @route53_client ||= AwsPocketknife.route53_client end