Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions,
see Getting Started with Amazon Web Services in China
(PDF).
Use DescribeLoadBalancers
with a CLI
The following code examples show how to use DescribeLoadBalancers
.
- CLI
-
- Amazon CLI
-
To describe the Classic Load Balancers for an Auto Scaling group
This example describes the Classic Load Balancers for the specified Auto Scaling group.
aws autoscaling describe-load-balancers \
--auto-scaling-group-name my-asg
Output:
{
"LoadBalancers": [
{
"State": "Added",
"LoadBalancerName": "my-load-balancer"
}
]
}
- PowerShell
-
- Tools for PowerShell V4
-
Example 1: This example describes the load balancers for the specified Auto Scaling group.
Get-ASLoadBalancer -AutoScalingGroupName my-asg
Output:
LoadBalancerName State
---------------- -----
my-lb Added
- Tools for PowerShell V5
-
Example 1: This example describes the load balancers for the specified Auto Scaling group.
Get-ASLoadBalancer -AutoScalingGroupName my-asg
Output:
LoadBalancerName State
---------------- -----
my-lb Added
For a complete list of Amazon SDK developer guides and code examples, see
Using this service with an Amazon SDK.
This topic also includes information about getting started and details about previous SDK versions.