Menu
AWS OpsWorks
User Guide (API Version 2013-02-18)

Elastic Load Balancing Data Bag (aws_opsworks_elastic_load_balancer)

Represents an Elastic Load Balancing load balancer's settings.

The following example shows how to use Chef search to search through a single data bag item and then multiple data bag items to write messages to the Chef log with the Elastic Load Balancing load balancers' names and DNS names:

Copy
elastic_load_balancer = search("aws_opsworks_elastic_load_balancer").first Chef::Log.info("********** The ELB's name is '#{elastic_load_balancer['elastic_load_balancer_name']}' **********") Chef::Log.info("********** The ELB's DNS name is '#{elastic_load_balancer['dns_name']}' **********") search("aws_opsworks_elastic_load_balancer").each do |elastic_load_balancer| Chef::Log.info("********** The ELB's name is '#{elastic_load_balancer['elastic_load_balancer_name']}' **********") Chef::Log.info("********** The ELB's DNS name is '#{elastic_load_balancer['dns_name']}' **********") end
elastic_load_balancer_name

The load balancer's name (string).

dns_name

The load balancer's DNS name (string).

layer_id

The AWS OpsWorks Stacks ID of the layer that the load balancer is assigned to (string).