Elastic Load Balancing 資料包 (彈性負載平衡器) - AWS OpsWorks

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

Elastic Load Balancing 資料包 (彈性負載平衡器)

重要

該 AWS OpsWorks Stacks 服務於 2024 年 5 月 26 日終止使用壽命,並已針對新客戶和現有客戶停用。我們強烈建議客戶盡快將其工作負載移轉至其他解決方案。如果您對移轉有任何疑問,請透過 AWS Re: post 或透過進AWS 階 Support 與 AWS Support 團隊聯絡。

代表 Elastic Load Balancing 負載平衡器的設定。

下列範例顯示如何使用 Chef 搜尋來搜尋單一資料包項目,然後使用多個資料包項目,將訊息寫入具有 Elastic Load Balancing 負載平衡器名稱和 DNS 名稱的 Chef 記錄檔:

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

負載平衡器的名稱 (字串)。

dns_name

負載平衡器的 DNS 名稱 (字串)。

layer_id

負載平衡器指派給的層的 AWS OpsWorks 堆疊 ID (字串)。