create_load_balancer requires port definitions

Throw the appropriate error when defining a loadbalancer with no ports
This commit is contained in:
Jack Danger Canty 2017-06-12 16:42:42 -07:00
commit c8794e842d
3 changed files with 27 additions and 2 deletions

View file

@ -47,3 +47,11 @@ class DuplicateLoadBalancerName(ELBClientError):
"DuplicateLoadBalancerName",
"The specified load balancer name already exists for this account: {0}"
.format(name))
class EmptyListenersError(ELBClientError):
def __init__(self):
super(EmptyListenersError, self).__init__(
"ValidationError",
"Listeners cannot be empty")