code: def _update_limits_from_api(self):
          
          logger.debug('Setting DirectoryService limits from API')
          self.connect()
          resp = self.conn.get_directory_limits()
          directory_limits = resp['DirectoryLimits']
          self.limits['CloudOnlyDirectories']._set_api_limit(
              directory_limits['CloudOnlyDirectoriesLimit']
          )
          self.limits['CloudOnlyMicrosoftAD']._set_api_limit(
              directory_limits['CloudOnlyMicrosoftADLimit']
          )
          self.limits['ConnectedDirectories']._set_api_limit(
              directory_limits['ConnectedDirectoriesLimit']
          )
docs: Call the service's API action to retrieve limit/quota information, and
          update AwsLimit objects in ``self.limits`` with this information.