Class: Serverspec::Type::AWS::ElasticLoadBalancing::LoadBalancer
- Inherits:
-
Base
- Object
- Base
- Serverspec::Type::AWS::ElasticLoadBalancing::LoadBalancer
- Defined in:
- lib/resources/elasticloadbalancing/load_balancer.rb
Overview
The LoadBalancer class exposes the ElasticLoadBalancing::LoadBalancer resources
Instance Method Summary collapse
-
#availability_zones ⇒ Array(String)
The Availability Zones for the load balancer.
-
#backend_server_descriptions ⇒ Array(Hash)
Information about the back-end servers.
-
#canonical_hosted_zone_name ⇒ String
The Amazon Route 53 hosted zone associated with the load balancer.
-
#canonical_hosted_zone_name_id ⇒ String
The ID of the Amazon Route 53 hosted zone name associated with the load balancer.
-
#dns_name ⇒ String
The external DNS name of the load balancer.
-
#health_check ⇒ Hash
Information about the health checks conducted on the load balancer.
-
#initialize(elb_name, instance = nil) ⇒ LoadBalancer
constructor
AWS SDK for Ruby v2 Aws::ElasticLoadBalancing::LoadBalancer wrapper for initializing a LoadBalancer resource rubocop:disable LineLength rubocop:enable LineLength.
-
#instances ⇒ Array(Hash)
The IDs of the instances for the load balancer.
-
#internal? ⇒ Boolean
Indicates whether the scheme is internal.
-
#internet_facing? ⇒ Boolean
Indicates whether the scheme is internet-facing.
-
#listeners ⇒ Array(Hash)
The listeners for the load balancer.
-
#policies ⇒ Hash
The policies defined for the load balancer.
-
#security_groups ⇒ Array(String)
The security groups for the load balancer.
-
#source_security_group ⇒ Hash
The security group that you can use as part of your inbound rules for your load balancer's back-end application instances.
-
#subnets ⇒ Array(String)
The IDs of the subnets for the load balancer.
-
#to_s ⇒ String
Returns the string representation of ElasticLoadBalancing::LoadBalancer.
-
#vpc_id ⇒ String
The ID of the VPC for the load balancer.
Constructor Details
#initialize(elb_name, instance = nil) ⇒ LoadBalancer
AWS SDK for Ruby v2 Aws::ElasticLoadBalancing::LoadBalancer wrapper for initializing a LoadBalancer resource rubocop:disable LineLength rubocop:enable LineLength
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/resources/elasticloadbalancing/load_balancer.rb', line 19 def initialize(elb_name, instance = nil) check_init_arg( 'elb_name', 'ElasticLoadBalancing::LoadBalancer', elb_name ) @elb_name = elb_name get_instance instance get_elb elb_name end |
Instance Method Details
#availability_zones ⇒ Array(String)
The Availability Zones for the load balancer
86 87 88 |
# File 'lib/resources/elasticloadbalancing/load_balancer.rb', line 86 def availability_zones @elb.availability_zones end |
#backend_server_descriptions ⇒ Array(Hash)
Information about the back-end servers
80 81 82 |
# File 'lib/resources/elasticloadbalancing/load_balancer.rb', line 80 def backend_server_descriptions @elb.backend_server_descriptions end |
#canonical_hosted_zone_name ⇒ String
The Amazon Route 53 hosted zone associated with the load balancer
55 56 57 |
# File 'lib/resources/elasticloadbalancing/load_balancer.rb', line 55 def canonical_hosted_zone_name @elb.canonical_hosted_zone_name end |
#canonical_hosted_zone_name_id ⇒ String
The ID of the Amazon Route 53 hosted zone name associated with the load balancer
62 63 64 |
# File 'lib/resources/elasticloadbalancing/load_balancer.rb', line 62 def canonical_hosted_zone_name_id @elb.canonical_hosted_zone_name_id end |
#dns_name ⇒ String
The external DNS name of the load balancer
49 50 51 |
# File 'lib/resources/elasticloadbalancing/load_balancer.rb', line 49 def dns_name @elb.dns_name end |
#health_check ⇒ Hash
Information about the health checks conducted on the load balancer
114 115 116 |
# File 'lib/resources/elasticloadbalancing/load_balancer.rb', line 114 def health_check @elb.health_check end |
#instances ⇒ Array(Hash)
The IDs of the instances for the load balancer
104 105 106 107 108 109 110 |
# File 'lib/resources/elasticloadbalancing/load_balancer.rb', line 104 def instances instances = [] @elb.instances.each do |inst| instances << inst.instance_id end instances end |
#internal? ⇒ Boolean
Indicates whether the scheme is internal
38 39 40 |
# File 'lib/resources/elasticloadbalancing/load_balancer.rb', line 38 def internal? @elb.scheme == 'internal' end |
#internet_facing? ⇒ Boolean
Indicates whether the scheme is internet-facing
43 44 45 |
# File 'lib/resources/elasticloadbalancing/load_balancer.rb', line 43 def internet_facing? @elb.scheme == 'internet-facing' end |
#listeners ⇒ Array(Hash)
The listeners for the load balancer
68 69 70 |
# File 'lib/resources/elasticloadbalancing/load_balancer.rb', line 68 def listeners @elb.listener_descriptions end |
#policies ⇒ Hash
The policies defined for the load balancer
74 75 76 |
# File 'lib/resources/elasticloadbalancing/load_balancer.rb', line 74 def policies @elb.policies end |
#security_groups ⇒ Array(String)
The security groups for the load balancer. Valid only for load balancers in a VPC
131 132 133 |
# File 'lib/resources/elasticloadbalancing/load_balancer.rb', line 131 def security_groups @elb.security_groups end |
#source_security_group ⇒ Hash
The security group that you can use as part of your inbound rules for your load balancer's back-end application instances. To only allow traffic from load balancers, add a security group rule to your back end instance that specifies this source security group as the inbound source
124 125 126 |
# File 'lib/resources/elasticloadbalancing/load_balancer.rb', line 124 def source_security_group @elb.source_security_group end |
#subnets ⇒ Array(String)
The IDs of the subnets for the load balancer
92 93 94 |
# File 'lib/resources/elasticloadbalancing/load_balancer.rb', line 92 def subnets @elb.subnets end |
#to_s ⇒ String
Returns the string representation of ElasticLoadBalancing::LoadBalancer
33 34 35 |
# File 'lib/resources/elasticloadbalancing/load_balancer.rb', line 33 def to_s "ElasticLoadBalancing LoadBalancer: #{@elb_name}" end |
#vpc_id ⇒ String
The ID of the VPC for the load balancer
98 99 100 |
# File 'lib/resources/elasticloadbalancing/load_balancer.rb', line 98 def vpc_id @elb.vpc_id end |