Skip to main content

network_endpoint_groups

Creates, updates, deletes, gets or lists a network_endpoint_groups resource.

Overview

Namenetwork_endpoint_groups
TypeResource
Idgoogle.compute.network_endpoint_groups

Fields

NameDatatypeDescription
idstring[Output Only] The unique identifier for the resource. This identifier is defined by the server.
namestringName 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]([-a-z0-9]*[a-z0-9])? 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.
descriptionstringAn optional description of this resource. Provide this property when you create the resource.
annotationsobjectMetadata defined as annotations on the network endpoint group.
appEngineobjectConfiguration for an App Engine network endpoint group (NEG). The service is optional, may be provided explicitly or in the URL mask. The version is optional and can only be provided explicitly or in the URL mask when service is present. Note: App Engine service must be in the same project and located in the same region as the Serverless NEG.
cloudFunctionobjectConfiguration for a Cloud Function network endpoint group (NEG). The function must be provided explicitly or in the URL mask. Note: Cloud Function must be in the same project and located in the same region as the Serverless NEG.
cloudRunobjectConfiguration for a Cloud Run network endpoint group (NEG). The service must be provided explicitly or in the URL mask. The tag is optional, may be provided explicitly or in the URL mask. Note: Cloud Run service must be in the same project and located in the same region as the Serverless NEG.
creationTimestampstring[Output Only] Creation timestamp in RFC3339 text format.
defaultPortintegerThe default port used if the port number is not specified in the network endpoint. If the network endpoint type is either GCE_VM_IP, SERVERLESS or PRIVATE_SERVICE_CONNECT, this field must not be specified.
kindstring[Output Only] Type of the resource. Always compute#networkEndpointGroup for network endpoint group.
networkstringThe URL of the network to which all network endpoints in the NEG belong. Uses default project network if unspecified.
networkEndpointTypestringType of network endpoints in this network endpoint group. Can be one of GCE_VM_IP, GCE_VM_IP_PORT, NON_GCP_PRIVATE_IP_PORT, INTERNET_FQDN_PORT, INTERNET_IP_PORT, SERVERLESS, PRIVATE_SERVICE_CONNECT, GCE_VM_IP_PORTMAP.
pscDataobjectAll data that is specifically relevant to only network endpoint groups of type PRIVATE_SERVICE_CONNECT.
pscTargetServicestringThe target service url used to set up private service connection to a Google API or a PSC Producer Service Attachment. An example value is: asia-northeast3-cloudkms.googleapis.com
regionstring[Output Only] The URL of the region where the network endpoint group is located.
selfLinkstring[Output Only] Server-defined URL for the resource.
sizeinteger[Output only] Number of network endpoints in the network endpoint group.
subnetworkstringOptional URL of the subnetwork to which all network endpoints in the NEG belong.
zonestring[Output Only] The URL of the zone where the network endpoint group is located.

Methods

NameAccessible byRequired ParamsDescription
aggregated_listSELECTprojectRetrieves the list of network endpoint groups and sorts them by zone. To prevent failure, Google recommends that you set the returnPartialSuccess parameter to true.
getSELECTnetworkEndpointGroup, project, zoneReturns the specified network endpoint group.
listSELECTproject, zoneRetrieves the list of network endpoint groups that are located in the specified project and zone.
insertINSERTproject, zoneCreates a network endpoint group in the specified project using the parameters that are included in the request.
deleteDELETEnetworkEndpointGroup, project, zoneDeletes the specified network endpoint group. The network endpoints in the NEG and the VM instances they belong to are not terminated when the NEG is deleted. Note that the NEG cannot be deleted if there are backend services referencing it.
attach_network_endpointsEXECnetworkEndpointGroup, project, zoneAttach a list of network endpoints to the specified network endpoint group.
detach_network_endpointsEXECnetworkEndpointGroup, project, zoneDetach a list of network endpoints from the specified network endpoint group.

SELECT examples

Retrieves the list of network endpoint groups and sorts them by zone. To prevent failure, Google recommends that you set the returnPartialSuccess parameter to true.

SELECT
id,
name,
description,
annotations,
appEngine,
cloudFunction,
cloudRun,
creationTimestamp,
defaultPort,
kind,
network,
networkEndpointType,
pscData,
pscTargetService,
region,
selfLink,
size,
subnetwork,
zone
FROM google.compute.network_endpoint_groups
WHERE project = '{{ project }}';

INSERT example

Use the following StackQL query and manifest file to create a new network_endpoint_groups resource.

/*+ create */
INSERT INTO google.compute.network_endpoint_groups (
project,
zone,
name,
description,
networkEndpointType,
size,
region,
zone,
network,
subnetwork,
defaultPort,
annotations,
cloudRun,
appEngine,
cloudFunction,
pscTargetService,
pscData
)
SELECT
'{{ project }}',
'{{ zone }}',
'{{ name }}',
'{{ description }}',
'{{ networkEndpointType }}',
'{{ size }}',
'{{ region }}',
'{{ zone }}',
'{{ network }}',
'{{ subnetwork }}',
'{{ defaultPort }}',
'{{ annotations }}',
'{{ cloudRun }}',
'{{ appEngine }}',
'{{ cloudFunction }}',
'{{ pscTargetService }}',
'{{ pscData }}'
;

DELETE example

Deletes the specified network_endpoint_groups resource.

/*+ delete */
DELETE FROM google.compute.network_endpoint_groups
WHERE networkEndpointGroup = '{{ networkEndpointGroup }}'
AND project = '{{ project }}'
AND zone = '{{ zone }}';