code: def _update_limits_from_api(self):
          
          self.connect()
          logger.debug("Querying ELB DescribeAccountLimits for limits")
          attribs = self.conn.describe_account_limits()
          name_to_limits = {
              'classic-load-balancers': 'Active load balancers',
              'classic-listeners': 'Listeners per load balancer',
              'classic-registered-instances':
                  'Registered instances per load balancer'
          }
          for attrib in attribs['Limits']:
              if int(attrib.get('Max', 0)) == 0:
                  continue
              name = attrib.get('Name', 'unknown')
              if name not in name_to_limits:
                  continue
              self.limits[name_to_limits[name]]._set_api_limit(int(attrib['Max']))
          # connect to ELBv2 API as well
          self.conn2 = client('elbv2', **self._boto3_connection_kwargs)
          logger.debug("Connected to %s in region %s",
                       'elbv2', self.conn2._client_config.region_name)
          logger.debug("Querying ELBv2 (ALB) DescribeAccountLimits for limits")
          attribs = self.conn2.describe_account_limits()
          name_to_limits = {
              'target-groups': 'Target groups',
              'listeners-per-application-load-balancer':
                  'Listeners per application load balancer',
              'rules-per-application-load-balancer':
                  'Rules per application load balancer',
              'network-load-balancers': 'Network load balancers',
              'listeners-per-network-load-balancer':
                  'Listeners per network load balancer'
          }
          for attrib in attribs['Limits']:
              if int(attrib.get('Max', 0)) == 0:
                  continue
              name = attrib.get('Name', 'unknown')
              if name not in name_to_limits:
                  continue
              self.limits[name_to_limits[name]]._set_api_limit(int(attrib['Max']))
          logger.debug("Done setting limits from API")
docs: Query ELB's DescribeAccountLimits API action, and update limits
          with the quotas returned. Updates ``self.limits``.