get Network Endpoint Group
suspend fun getNetworkEndpointGroup(argument: GetNetworkEndpointGroupPlainArgs): GetNetworkEndpointGroupResult
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
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.GetNetworkEndpointGroupArgs;
import java.util.List;
import java.util.ArrayList;
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 neg1 = ComputeFunctions.getNetworkEndpointGroup(GetNetworkEndpointGroupArgs.builder()
.name("k8s1-abcdef01-myns-mysvc-8080-4b6bac43")
.zone("us-central1-a")
.build());
final var neg2 = 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());
}
}
Content copied to clipboard
Return
A collection of values returned by getNetworkEndpointGroup.
Parameters
argument
A collection of arguments for invoking getNetworkEndpointGroup.
suspend fun getNetworkEndpointGroup(name: String? = null, project: String? = null, selfLink: String? = null, zone: String? = null): GetNetworkEndpointGroupResult
Return
A collection of values returned by getNetworkEndpointGroup.
Parameters
name
The Network Endpoint Group name. Provide either this or a self_link
.
project
The ID of the project to list versions in. If it is not provided, the provider project is used.
self Link
The Network Endpoint Group self\_link.
zone
The Network Endpoint Group availability zone.
See also
suspend fun getNetworkEndpointGroup(argument: suspend GetNetworkEndpointGroupPlainArgsBuilder.() -> Unit): GetNetworkEndpointGroupResult
Return
A collection of values returned by getNetworkEndpointGroup.
Parameters
argument
Builder for com.pulumi.gcp.compute.kotlin.inputs.GetNetworkEndpointGroupPlainArgs.