Google Cloud (GCP) Classic

Pulumi Official
Package maintained by Pulumi
v6.24.0 published on Tuesday, May 17, 2022 by Pulumi

getNetworkEndpointGroup

Use this data source to access a Network Endpoint Group’s attributes.

The NEG may be found by providing either a self_link, or a name and a zone.

Example Usage

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
    public MyStack()
    {
        var neg1 = Output.Create(Gcp.Compute.GetNetworkEndpointGroup.InvokeAsync(new Gcp.Compute.GetNetworkEndpointGroupArgs
        {
            Name = "k8s1-abcdef01-myns-mysvc-8080-4b6bac43",
            Zone = "us-central1-a",
        }));
        var neg2 = Output.Create(Gcp.Compute.GetNetworkEndpointGroup.InvokeAsync(new Gcp.Compute.GetNetworkEndpointGroupArgs
        {
            SelfLink = "https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-a/networkEndpointGroups/k8s1-abcdef01-myns-mysvc-8080-4b6bac43",
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/compute"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := compute.LookupNetworkEndpointGroup(ctx, &compute.LookupNetworkEndpointGroupArgs{
			Name: pulumi.StringRef("k8s1-abcdef01-myns-mysvc-8080-4b6bac43"),
			Zone: pulumi.StringRef("us-central1-a"),
		}, nil)
		if err != nil {
			return err
		}
		_, err = compute.LookupNetworkEndpointGroup(ctx, &compute.LookupNetworkEndpointGroupArgs{
			SelfLink: pulumi.StringRef("https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-a/networkEndpointGroups/k8s1-abcdef01-myns-mysvc-8080-4b6bac43"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var neg1 = Output.of(ComputeFunctions.getNetworkEndpointGroup(GetNetworkEndpointGroupArgs.builder()
            .name("k8s1-abcdef01-myns-mysvc-8080-4b6bac43")
            .zone("us-central1-a")
            .build()));

        final var neg2 = Output.of(ComputeFunctions.getNetworkEndpointGroup(GetNetworkEndpointGroupArgs.builder()
            .selfLink("https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-a/networkEndpointGroups/k8s1-abcdef01-myns-mysvc-8080-4b6bac43")
            .build()));

        }
}
import pulumi
import pulumi_gcp as gcp

neg1 = gcp.compute.get_network_endpoint_group(name="k8s1-abcdef01-myns-mysvc-8080-4b6bac43",
    zone="us-central1-a")
neg2 = gcp.compute.get_network_endpoint_group(self_link="https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-a/networkEndpointGroups/k8s1-abcdef01-myns-mysvc-8080-4b6bac43")
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const neg1 = pulumi.output(gcp.compute.getNetworkEndpointGroup({
    name: "k8s1-abcdef01-myns-mysvc-8080-4b6bac43",
    zone: "us-central1-a",
}));
const neg2 = pulumi.output(gcp.compute.getNetworkEndpointGroup({
    selfLink: "https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-a/networkEndpointGroups/k8s1-abcdef01-myns-mysvc-8080-4b6bac43",
}));
variables:
  neg1:
    Fn::Invoke:
      Function: gcp:compute:getNetworkEndpointGroup
      Arguments:
        name: k8s1-abcdef01-myns-mysvc-8080-4b6bac43
        zone: us-central1-a
  neg2:
    Fn::Invoke:
      Function: gcp:compute:getNetworkEndpointGroup
      Arguments:
        selfLink: https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-a/networkEndpointGroups/k8s1-abcdef01-myns-mysvc-8080-4b6bac43

Using getNetworkEndpointGroup

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 getNetworkEndpointGroup(args: GetNetworkEndpointGroupArgs, opts?: InvokeOptions): Promise<GetNetworkEndpointGroupResult>
function getNetworkEndpointGroupOutput(args: GetNetworkEndpointGroupOutputArgs, opts?: InvokeOptions): Output<GetNetworkEndpointGroupResult>
def get_network_endpoint_group(name: Optional[str] = None,
                               project: Optional[str] = None,
                               self_link: Optional[str] = None,
                               zone: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetNetworkEndpointGroupResult
def get_network_endpoint_group_output(name: Optional[pulumi.Input[str]] = None,
                               project: Optional[pulumi.Input[str]] = None,
                               self_link: Optional[pulumi.Input[str]] = None,
                               zone: Optional[pulumi.Input[str]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetNetworkEndpointGroupResult]
func LookupNetworkEndpointGroup(ctx *Context, args *LookupNetworkEndpointGroupArgs, opts ...InvokeOption) (*LookupNetworkEndpointGroupResult, error)
func LookupNetworkEndpointGroupOutput(ctx *Context, args *LookupNetworkEndpointGroupOutputArgs, opts ...InvokeOption) LookupNetworkEndpointGroupResultOutput

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

public static class GetNetworkEndpointGroup 
{
    public static Task<GetNetworkEndpointGroupResult> InvokeAsync(GetNetworkEndpointGroupArgs args, InvokeOptions? opts = null)
    public static Output<GetNetworkEndpointGroupResult> Invoke(GetNetworkEndpointGroupInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetNetworkEndpointGroupResult> getNetworkEndpointGroup(GetNetworkEndpointGroupArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: gcp:compute/getNetworkEndpointGroup:getNetworkEndpointGroup
  Arguments:
    # Arguments dictionary

The following arguments are supported:

Name string

The Network Endpoint Group name. Provide either this or a self_link.

Project string

The ID of the project to list versions in. If it is not provided, the provider project is used.

SelfLink string

The Network Endpoint Group self_link.

Zone string

The Network Endpoint Group availability zone.

Name string

The Network Endpoint Group name. Provide either this or a self_link.

Project string

The ID of the project to list versions in. If it is not provided, the provider project is used.

SelfLink string

The Network Endpoint Group self_link.

Zone string

The Network Endpoint Group availability zone.

name String

The Network Endpoint Group name. Provide either this or a self_link.

project String

The ID of the project to list versions in. If it is not provided, the provider project is used.

selfLink String

The Network Endpoint Group self_link.

zone String

The Network Endpoint Group availability zone.

name string

The Network Endpoint Group name. Provide either this or a self_link.

project string

The ID of the project to list versions in. If it is not provided, the provider project is used.

selfLink string

The Network Endpoint Group self_link.

zone string

The Network Endpoint Group availability zone.

name str

The Network Endpoint Group name. Provide either this or a self_link.

project str

The ID of the project to list versions in. If it is not provided, the provider project is used.

self_link str

The Network Endpoint Group self_link.

zone str

The Network Endpoint Group availability zone.

name String

The Network Endpoint Group name. Provide either this or a self_link.

project String

The ID of the project to list versions in. If it is not provided, the provider project is used.

selfLink String

The Network Endpoint Group self_link.

zone String

The Network Endpoint Group availability zone.

getNetworkEndpointGroup Result

The following output properties are available:

DefaultPort int

The NEG default port.

Description string

The NEG description.

Id string

The provider-assigned unique ID for this managed resource.

Network string

The network to which all network endpoints in the NEG belong.

NetworkEndpointType string

Type of network endpoints in this network endpoint group.

Size int

Number of network endpoints in the network endpoint group.

Subnetwork string

subnetwork to which all network endpoints in the NEG belong.

Name string
Project string
SelfLink string
Zone string
DefaultPort int

The NEG default port.

Description string

The NEG description.

Id string

The provider-assigned unique ID for this managed resource.

Network string

The network to which all network endpoints in the NEG belong.

NetworkEndpointType string

Type of network endpoints in this network endpoint group.

Size int

Number of network endpoints in the network endpoint group.

Subnetwork string

subnetwork to which all network endpoints in the NEG belong.

Name string
Project string
SelfLink string
Zone string
defaultPort Integer

The NEG default port.

description String

The NEG description.

id String

The provider-assigned unique ID for this managed resource.

network String

The network to which all network endpoints in the NEG belong.

networkEndpointType String

Type of network endpoints in this network endpoint group.

size Integer

Number of network endpoints in the network endpoint group.

subnetwork String

subnetwork to which all network endpoints in the NEG belong.

name String
project String
selfLink String
zone String
defaultPort number

The NEG default port.

description string

The NEG description.

id string

The provider-assigned unique ID for this managed resource.

network string

The network to which all network endpoints in the NEG belong.

networkEndpointType string

Type of network endpoints in this network endpoint group.

size number

Number of network endpoints in the network endpoint group.

subnetwork string

subnetwork to which all network endpoints in the NEG belong.

name string
project string
selfLink string
zone string
default_port int

The NEG default port.

description str

The NEG description.

id str

The provider-assigned unique ID for this managed resource.

network str

The network to which all network endpoints in the NEG belong.

network_endpoint_type str

Type of network endpoints in this network endpoint group.

size int

Number of network endpoints in the network endpoint group.

subnetwork str

subnetwork to which all network endpoints in the NEG belong.

name str
project str
self_link str
zone str
defaultPort Number

The NEG default port.

description String

The NEG description.

id String

The provider-assigned unique ID for this managed resource.

network String

The network to which all network endpoints in the NEG belong.

networkEndpointType String

Type of network endpoints in this network endpoint group.

size Number

Number of network endpoints in the network endpoint group.

subnetwork String

subnetwork to which all network endpoints in the NEG belong.

name String
project String
selfLink String
zone String

Package Details

Repository
https://github.com/pulumi/pulumi-gcp
License
Apache-2.0
Notes

This Pulumi package is based on the google-beta Terraform Provider.