Module: Cumulus::ELB
- Defined in:
- lib/elb/ELB.rb,
lib/elb/Commands.rb,
lib/elb/loader/Loader.rb,
lib/elb/manager/Manager.rb,
lib/elb/models/ListenerDiff.rb,
lib/elb/models/AccessLogDiff.rb,
lib/elb/models/ListenerConfig.rb,
lib/elb/models/AccessLogConfig.rb,
lib/elb/models/HealthCheckDiff.rb,
lib/elb/models/LoadBalancerDiff.rb,
lib/elb/models/HealthCheckConfig.rb,
lib/elb/models/LoadBalancerConfig.rb
Defined Under Namespace
Modules: AccessLogChange, HealthCheckChange, ListenerChange, LoadBalancerChange, Loader Classes: AccessLogConfig, AccessLogDiff, Commands, HealthCheckConfig, HealthCheckDiff, ListenerConfig, ListenerDiff, LoadBalancerConfig, LoadBalancerDiff, Manager
Constant Summary collapse
- @@client =
Aws::ElasticLoadBalancing::Client.new(Configuration.instance.client)
Class Method Summary collapse
-
.default_policies ⇒ Object
Public: Provide the default available policies.
-
.elb_attributes(elb_name) ⇒ Object
Public: Provide the attributes for an ELB by name, lazily loaded.
-
.elb_policies(elb_name) ⇒ Object
Public: Provide the policies already created on a load balancer.
-
.elb_tags(elb_name) ⇒ Object
Public: Provide the tags for an ELB by name.
-
.elbs ⇒ Object
Public: Provide a mapping of ELBs to their names.
-
.get_aws(name) ⇒ Object
Public: Static method that will get an ELB from AWS by its name.
-
.get_aws_by_dns_name(dns_name) ⇒ Object
Public: Static method that will get an ELB from AWS by its dns name.
Class Method Details
.default_policies ⇒ Object
Public: Provide the default available policies
Returns a Hash of Aws::ElasticLoadBalancing::Types::PolicyDescription to a policy’s name
60 61 62 |
# File 'lib/elb/ELB.rb', line 60 def default_policies @default_policies ||= Hash[init_default_policies.map { |policy| [policy.policy_name, policy] }] end |
.elb_attributes(elb_name) ⇒ Object
Public: Provide the attributes for an ELB by name, lazily loaded
Returns an array of Aws::ElasticLoadBalancing::Types::LoadBalancerAttributes
52 53 54 55 |
# File 'lib/elb/ELB.rb', line 52 def elb_attributes(elb_name) @elb_attributes ||= {} @elb_attributes[elb_name] ||= init_elb_attributes(elb_name) end |
.elb_policies(elb_name) ⇒ Object
Public: Provide the policies already created on a load balancer
Returns a Hash of Aws::ElasticLoadBalancing::Types::PolicyDescription to a policy’s name
67 68 69 70 |
# File 'lib/elb/ELB.rb', line 67 def elb_policies(elb_name) @elb_policies ||= {} @elb_policies[elb_name] ||= Hash[init_elb_policies(elb_name).map { |policy| [policy.policy_name, policy] }] end |
.elb_tags(elb_name) ⇒ Object
Public: Provide the tags for an ELB by name
Returns an array of Aws::ElasticLoadBalancing::Types::Tag
43 44 45 46 47 |
# File 'lib/elb/ELB.rb', line 43 def (elb_name) ||= [elb_name] end |
.elbs ⇒ Object
Public: Provide a mapping of ELBs to their names. Lazily loads resources.
Returns the ELBs mapped to their names
36 37 38 |
# File 'lib/elb/ELB.rb', line 36 def elbs @elbs ||= init_elbs end |
.get_aws(name) ⇒ Object
Public: Static method that will get an ELB from AWS by its name.
name - the name of the ELB to get
Returns the Aws::ElasticLoadBalancing::Types::LoadBalancerDescription by that name
15 16 17 18 19 20 21 22 |
# File 'lib/elb/ELB.rb', line 15 def get_aws(name) if elbs[name].nil? puts "No ELB named #{name}" exit else elbs[name] end end |
.get_aws_by_dns_name(dns_name) ⇒ Object
Public: Static method that will get an ELB from AWS by its dns name.
dns_name - the dns name of the ELB to get
Returns the Aws::ElasticLoadBalancing::Types::LoadBalancerDescription with that dns name
29 30 31 |
# File 'lib/elb/ELB.rb', line 29 def get_aws_by_dns_name(dns_name) elbs_to_dns_names[dns_name] end |