1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. compute
  5. getNetworks
Google Cloud Classic v7.29.0 published on Wednesday, Jun 26, 2024 by Pulumi

gcp.compute.getNetworks

Explore with Pulumi AI

gcp logo
Google Cloud Classic v7.29.0 published on Wednesday, Jun 26, 2024 by Pulumi

    List all networks in a specified Google Cloud project.

    Example Usage

    data "google_compute_networks" "my-networks" {
      project = "my-cloud-project"
    }
    

    Using getNetworks

    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 getNetworks(args: GetNetworksArgs, opts?: InvokeOptions): Promise<GetNetworksResult>
    function getNetworksOutput(args: GetNetworksOutputArgs, opts?: InvokeOptions): Output<GetNetworksResult>
    def get_networks(project: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetNetworksResult
    def get_networks_output(project: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetNetworksResult]
    func GetNetworks(ctx *Context, args *GetNetworksArgs, opts ...InvokeOption) (*GetNetworksResult, error)
    func GetNetworksOutput(ctx *Context, args *GetNetworksOutputArgs, opts ...InvokeOption) GetNetworksResultOutput

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

    public static class GetNetworks 
    {
        public static Task<GetNetworksResult> InvokeAsync(GetNetworksArgs args, InvokeOptions? opts = null)
        public static Output<GetNetworksResult> Invoke(GetNetworksInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetNetworksResult> getNetworks(GetNetworksArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: gcp:compute/getNetworks:getNetworks
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Project string
    The name of the project.
    Project string
    The name of the project.
    project String
    The name of the project.
    project string
    The name of the project.
    project str
    The name of the project.
    project String
    The name of the project.

    getNetworks Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Networks List<string>
    The list of networks in the specified project.
    SelfLink string
    The URI of the resource.
    Project string
    The project name being queried.
    Id string
    The provider-assigned unique ID for this managed resource.
    Networks []string
    The list of networks in the specified project.
    SelfLink string
    The URI of the resource.
    Project string
    The project name being queried.
    id String
    The provider-assigned unique ID for this managed resource.
    networks List<String>
    The list of networks in the specified project.
    selfLink String
    The URI of the resource.
    project String
    The project name being queried.
    id string
    The provider-assigned unique ID for this managed resource.
    networks string[]
    The list of networks in the specified project.
    selfLink string
    The URI of the resource.
    project string
    The project name being queried.
    id str
    The provider-assigned unique ID for this managed resource.
    networks Sequence[str]
    The list of networks in the specified project.
    self_link str
    The URI of the resource.
    project str
    The project name being queried.
    id String
    The provider-assigned unique ID for this managed resource.
    networks List<String>
    The list of networks in the specified project.
    selfLink String
    The URI of the resource.
    project String
    The project name being queried.

    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
    Google Cloud Classic v7.29.0 published on Wednesday, Jun 26, 2024 by Pulumi