Puppet Function: gcompute_target_http_proxy_ref
- Defined in:
- lib/puppet/functions/gcompute_target_http_proxy_ref.rb
- Function type:
- Ruby 4.x API
Overview
Builds a reference to a target HTTP proxy to be used in the global forwarding rule.
Arguments:
- name: string
the name of the proxy
- project_name: string
the name of the project that hosts the proxy
Examples:
- gcompute_target_http_proxy_ref('my-http-proxy', 'my-project')
39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/puppet/functions/gcompute_target_http_proxy_ref.rb', line 39 Puppet::Functions.create_function(:gcompute_target_http_proxy_ref) do dispatch :gcompute_target_http_proxy_ref do param 'String', :name param 'String', :project_name end def gcompute_target_http_proxy_ref(name, project_name) URI.join('https://www.googleapis.com/compute/v1/', "projects/#{project_name}/global/targetHttpProxies/#{name}").to_s end end |