def _ForwardingRuleTarget(forwarding_rule):
  """Gets the API-level target or backend-service of the given rule."""
  backend_service = forwarding_rule.get('backendService', None)
  if backend_service is not None:
    return backend_service
  else:
    return forwarding_rule.get('target', None)