LogStash::ConvergeResult::FailedAction while tryting to use pipeline output

Hi folks,

this is my test.conf:

input {
  beats {
    port => 6150
  }
}
   
output {

  if [agent][type] == "metricbeat" {
    elasticsearch {
	  ...
    } 
	} else if [fields][log_type] == "audit" {
	elasticsearch {
	  ...
    } 
    } else if [kubernetes][namespace] == "default" {
    pipeline { send_to => [virtual-Address]}  
  
    } else if [kubernetes][namespace]  =~ /^kube-*/ {
    elasticsearch {
	  ...
    }
    } else {
    elasticsearch {
	  ...
    }
	}
}

When starting logstash I have following error:

[2021-05-20T18:03:19,011][ERROR][logstash.agent ] Failed to execute action {:id=>:test, :action_type=>LogStash::ConvergeResult::FailedAction, :message=>"Expected one of [A-Za-z0-9_-], [ \\t\\r\\n], \"#\", \"{\" at line 46, column 54 (byte 2044) after output {...}

When I remove exactly this part:

else if [kubernetes][namespace] == "default" {
    pipeline { send_to => [virtual-Address]}  

the pipeline runs without any issues.

Ok apparently one is not allowed to use "-" in the virtualAddress name. Are there any other limitations to the name of the virtual address?

Thanks