Google Cloud (GCP) Classic
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:
getNetworkEndpointGroup Result
The following output properties are available:
- Default
Port 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.
- Network
Endpoint stringType 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
- Self
Link string - Zone string
- Default
Port 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.
- Network
Endpoint stringType 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
- Self
Link string - Zone string
- default
Port 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.
- network
Endpoint StringType 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
- self
Link String - zone String
- default
Port 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.
- network
Endpoint stringType 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
- self
Link 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_ strtype 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
- default
Port 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.
- network
Endpoint StringType 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
- self
Link 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.