2017-05-25 129 views
0

我負責使用預先存在的負載平衡器管理AWS賬戶,並且想知道它是經典負載平衡器還是application load balancer如何知道現有AWS ELB是經典負載平衡器還是應用負載平衡器

我找不到既可以通過Web控制檯或ruby API

+0

類型。知道如何以編程方式查詢仍然很好。我注意到有兩個模塊[Aws :: ElasticLoadBalancing](http://docs.aws.amazon.com/sdkforruby/api/Aws/ElasticLoadBalancing.html)和[Aws :: ElasticLoadBalancingV2](http:// docs.aws.amazon.com/sdkforruby/api/Aws/ElasticLoadBalancingV2.html) – victorjtfranco

回答

2

在Web控制檯的信息,當你在你的負載平衡器的名單有,告訴你哪些鍵入一個「類型」列是。

+0

結束了,我從缺乏關注...謝謝! – victorjtfranco

1

With API V2describe-load-balancerscommand會給你ELB的類型。

aws elbv2 describe-load-balancers --names my-load-balancer 

類型將指示接受的答案通過Web控制檯解決的ELB

{ 
    "LoadBalancers": [ 
    { 
     "VpcId": "vpc-3ac0fb5f", 
     "LoadBalancerArn": "arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-load-balancer/50dc6c495c0c9188", 
     "State": { 
      "Code": "active" 
     }, 
     "DNSName": "my-load-balancer-424835706.us-west-2.elb.amazonaws.com", 

     "SecurityGroups": [ 
      "sg-5943793c" 
     ], 
     "LoadBalancerName": "my-load-balancer", 
     "CreatedTime": "2016-03-25T21:26:12.920Z", 
     "Scheme": "internet-facing", 
     "Type": "application", 
     "CanonicalHostedZoneId": "Z2P70J7EXAMPLE", 
     "AvailabilityZones": [ 
      { 
       "SubnetId": "subnet-8360a9e7", 
       "ZoneName": "us-west-2a" 
      }, 
      { 
       "SubnetId": "subnet-b7d581c0", 
       "ZoneName": "us-west-2b" 
      } 
      ] 
     } 
    ] 
}