1. Packages
  2. Packages
  3. Google Cloud (GCP) Classic
  4. API Docs
  5. compute
  6. getTargetHttpProxy
Viewing docs for Google Cloud v9.30.0
published on Monday, Jul 13, 2026 by Pulumi
gcp logo
Viewing docs for Google Cloud v9.30.0
published on Monday, Jul 13, 2026 by Pulumi

    Get information about a Compute Engine TargetHttpProxy.

    For more information see the official documentation and the API.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const _default = gcp.compute.getTargetHttpProxy({
        name: defaultGoogleComputeTargetHttpProxy.name,
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    default = gcp.compute.get_target_http_proxy(name=default_google_compute_target_http_proxy["name"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/compute"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := compute.LookupTargetHttpProxy(ctx, &compute.LookupTargetHttpProxyArgs{
    			Name: defaultGoogleComputeTargetHttpProxy.Name,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = Gcp.Compute.GetTargetHttpProxy.Invoke(new()
        {
            Name = defaultGoogleComputeTargetHttpProxy.Name,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.compute.ComputeFunctions;
    import com.pulumi.gcp.compute.inputs.GetTargetHttpProxyArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var default = ComputeFunctions.getTargetHttpProxy(GetTargetHttpProxyArgs.builder()
                .name(defaultGoogleComputeTargetHttpProxy.name())
                .build());
    
        }
    }
    
    variables:
      default:
        fn::invoke:
          function: gcp:compute:getTargetHttpProxy
          arguments:
            name: ${defaultGoogleComputeTargetHttpProxy.name}
    
    pulumi {
      required_providers {
        gcp = {
          source = "pulumi/gcp"
        }
      }
    }
    
    data "gcp_compute_gettargethttpproxy" "default" {
      name = defaultGoogleComputeTargetHttpProxy.name
    }
    

    Using getTargetHttpProxy

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getTargetHttpProxy(args: GetTargetHttpProxyArgs, opts?: InvokeOptions): Promise<GetTargetHttpProxyResult>
    function getTargetHttpProxyOutput(args: GetTargetHttpProxyOutputArgs, opts?: InvokeOptions): Output<GetTargetHttpProxyResult>
    def get_target_http_proxy(name: Optional[str] = None,
                              project: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetTargetHttpProxyResult
    def get_target_http_proxy_output(name: pulumi.Input[Optional[str]] = None,
                              project: pulumi.Input[Optional[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetTargetHttpProxyResult]
    func LookupTargetHttpProxy(ctx *Context, args *LookupTargetHttpProxyArgs, opts ...InvokeOption) (*LookupTargetHttpProxyResult, error)
    func LookupTargetHttpProxyOutput(ctx *Context, args *LookupTargetHttpProxyOutputArgs, opts ...InvokeOption) LookupTargetHttpProxyResultOutput

    > Note: This function is named LookupTargetHttpProxy in the Go SDK.

    public static class GetTargetHttpProxy 
    {
        public static Task<GetTargetHttpProxyResult> InvokeAsync(GetTargetHttpProxyArgs args, InvokeOptions? opts = null)
        public static Output<GetTargetHttpProxyResult> Invoke(GetTargetHttpProxyInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetTargetHttpProxyResult> getTargetHttpProxy(GetTargetHttpProxyArgs args, InvokeOptions options)
    public static Output<GetTargetHttpProxyResult> getTargetHttpProxy(GetTargetHttpProxyArgs args, InvokeOptions options)
    
    fn::invoke:
      function: gcp:compute/getTargetHttpProxy:getTargetHttpProxy
      arguments:
        # arguments dictionary
    data "gcp_compute_get_target_http_proxy" "name" {
        # arguments
    }

    The following arguments are supported:

    Name string
    Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    Name string
    Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    name string
    Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    name String
    Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    name string
    Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    name str
    Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
    project str
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    name String
    Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    getTargetHttpProxy Result

    The following output properties are available:

    CreationTimestamp string
    DeletionPolicy string
    Description string
    Fingerprint string
    HttpKeepAliveTimeoutSec int
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    ProxyBind bool
    ProxyId int
    SelfLink string
    UrlMap string
    Project string
    CreationTimestamp string
    DeletionPolicy string
    Description string
    Fingerprint string
    HttpKeepAliveTimeoutSec int
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    ProxyBind bool
    ProxyId int
    SelfLink string
    UrlMap string
    Project string
    creation_timestamp string
    deletion_policy string
    description string
    fingerprint string
    http_keep_alive_timeout_sec number
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    proxy_bind bool
    proxy_id number
    self_link string
    url_map string
    project string
    creationTimestamp String
    deletionPolicy String
    description String
    fingerprint String
    httpKeepAliveTimeoutSec Integer
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    proxyBind Boolean
    proxyId Integer
    selfLink String
    urlMap String
    project String
    creationTimestamp string
    deletionPolicy string
    description string
    fingerprint string
    httpKeepAliveTimeoutSec number
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    proxyBind boolean
    proxyId number
    selfLink string
    urlMap string
    project string
    creation_timestamp str
    deletion_policy str
    description str
    fingerprint str
    http_keep_alive_timeout_sec int
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    proxy_bind bool
    proxy_id int
    self_link str
    url_map str
    project str
    creationTimestamp String
    deletionPolicy String
    description String
    fingerprint String
    httpKeepAliveTimeoutSec Number
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    proxyBind Boolean
    proxyId Number
    selfLink String
    urlMap String
    project String

    Package Details

    Repository
    Google Cloud (GCP) Classic pulumi/pulumi-gcp
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the google-beta Terraform Provider.
    gcp logo
    Viewing docs for Google Cloud v9.30.0
    published on Monday, Jul 13, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial