I’m not sure if this is possible, but I generally wouldn’t recommend this approach anyway, since you’d need to hard code all the different variables in your rule based on the environments.
What we do is store these attribute in the source configuration itself using the /sources API:
That way we can not only re-use the same rule between environments but even in many cases use the same rule in different sources in the same environment.