-
Notifications
You must be signed in to change notification settings - Fork 16
DescribeLoadBalancers API call doesn't return IpAddressType
value for Gateway Load Balancer
#341
Comments
IpAddressType
value for Gateway Load Balancer
Hi @ParthaI , The reason you are seeing an empty string for I was able to verify it with the following GO code: func main() {
cfg, err := config.LoadDefaultConfig(context.TODO(), config.WithRegion("us-east-1"), config.WithClientLogMode(aws.LogRequestWithBody|aws.LogResponseWithBody))
if err != nil {
log.Fatalf("unable to load SDK config, %v", err)
}
svc := elasticloadbalancingv2.NewFromConfig(cfg)
result, err := svc.DescribeLoadBalancers(context.Background(), &elasticloadbalancingv2.DescribeLoadBalancersInput{})
if err != nil {
log.Fatalf("failed to retrieve lbs: , %v", err)
}
for _, v := range result.LoadBalancers {
fmt.Printf("type is: %v", v.IpAddressType)
}
} Response: <DescribeLoadBalancersResponse xmlns="http://elasticloadbalancing.amazonaws.com/doc/2015-12-01/">
<DescribeLoadBalancersResult>
<LoadBalancers>
<member>
<LoadBalancerArn>REDACTED</LoadBalancerArn>
<AvailabilityZones>
<member>
<SubnetId>REDACTED</SubnetId>
<ZoneName>us-east-1a</ZoneName>
</member>
</AvailabilityZones>
<Type>gateway</Type>
<LoadBalancerName>testlb</LoadBalancerName>
<VpcId>REDACTED</VpcId>
<CreatedTime>2022-08-31T16:32:31.524Z</CreatedTime>
<State>
<Code>active</Code>
</State>
</member>
</LoadBalancers>
</DescribeLoadBalancersResult>
<ResponseMetadata>
<RequestId>REDACTED</RequestId>
</ResponseMetadata>
</DescribeLoadBalancersResponse>
And with the CLI:
Response: {
"LoadBalancers": [
{
"LoadBalancerArn": "REDACTED",
"CreatedTime": "2022-08-31T16:32:31.524000+00:00",
"LoadBalancerName": "testlb",
"VpcId": "REDACTED",
"State": {
"Code": "active"
},
"Type": "gateway",
"AvailabilityZones": [
{
"ZoneName": "us-east-1a",
"SubnetId": "REDACTED"
}
]
}
]
} I have created an internal ticket with the ELB service team and hopefully we can get that sorted out for you. Please keep an eye on this ticket for updates. Thanks,
|
This is now added: $ aws elbv2 describe-load-balancers --region us-east-1
{
"LoadBalancers": [
{
"LoadBalancerArn": "arn:aws:elasticloadbalancing:us-east-1:REDACTED:loadbalancer/gwy/testlb/REDACTED",
"CreatedTime": "2022-08-31T16:32:31.524000+00:00",
"LoadBalancerName": "testlb",
"VpcId": "vpc-REDADTED",
"State": {
"Code": "active"
},
"Type": "gateway",
"AvailabilityZones": [
{
"ZoneName": "us-east-1a",
"SubnetId": "subnet-REDACTED"
}
],
"IpAddressType": "ipv4"
}
]
} Thank you for your patience. |
This issue is now closed. Comments on closed issues are hard for our team to see. |
Describe the bug
The API DescribeLoadBalancers doesn't return
IpAddressType
value for Gateway Load Balancer but however we are getting theIpAddressType
value for Application Load Balancer.Expected Behavior
We should get the
IpAddressType
value for Gateway Load Balancer.Current Behavior
We are getting an empty string for
IpAddressType
attribute for Gateway Load Balancer though the data is available in AWS console.Reproduction Steps
Make the DescribeLoadBalancers API call and please verify the
IpAddressType
value in the result.Possible Solution
No response
Additional Information/Context
No response
AWS Go SDK V2 Module Versions Used
github.com/aws/aws-sdk-go-v2 v1.16.11
Compiler and Version used
go version go1.19 darwin/arm64
Operating System and version
Mac
The text was updated successfully, but these errors were encountered: