network_endpoint_groups
Creates, updates, deletes, gets or lists a network_endpoint_groups
resource.
Overview
Name | network_endpoint_groups |
Type | Resource |
Id | google.compute.network_endpoint_groups |
Fields
The following fields are returned by SELECT
queries:
- get
- list
- aggregated_list
Successful response
Name | Datatype | Description |
---|---|---|
id | string (uint64) | [Output Only] The unique identifier for the resource. This identifier is defined by the server. |
name | string | Name 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. |
annotations | object | Optional. Metadata defined as annotations on the network endpoint group. |
appEngine | object | Optional. Only valid when networkEndpointType is SERVERLESS. Only one of cloudRun, appEngine or cloudFunction may be set. (id: NetworkEndpointGroupAppEngine) |
cloudFunction | object | Optional. Only valid when networkEndpointType is SERVERLESS. Only one of cloudRun, appEngine or cloudFunction may be set. (id: NetworkEndpointGroupCloudFunction) |
cloudRun | object | Optional. Only valid when networkEndpointType is SERVERLESS. Only one of cloudRun, appEngine or cloudFunction may be set. (id: NetworkEndpointGroupCloudRun) |
creationTimestamp | string | [Output Only] Creation timestamp in RFC3339 text format. |
defaultPort | integer (int32) | The default port used if the port number is not specified in the network endpoint. Optional. If the network endpoint type is either GCE_VM_IP, SERVERLESS or PRIVATE_SERVICE_CONNECT, this field must not be specified. |
description | string | An optional description of this resource. Provide this property when you create the resource. |
kind | string | [Output Only] Type of the resource. Always compute#networkEndpointGroup for network endpoint group. (default: compute#networkEndpointGroup) |
network | string | The URL of the network to which all network endpoints in the NEG belong. Uses default project network if unspecified. |
networkEndpointType | string | Type 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. |
pscData | object | Optional. Only valid when networkEndpointType is PRIVATE_SERVICE_CONNECT. (id: NetworkEndpointGroupPscData) |
pscTargetService | string | The 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. Optional. Only valid when networkEndpointType is PRIVATE_SERVICE_CONNECT. |
region | string | [Output Only] The URL of the region where the network endpoint group is located. |
selfLink | string | [Output Only] Server-defined URL for the resource. |
size | integer (int32) | [Output only] Number of network endpoints in the network endpoint group. |
subnetwork | string | Optional URL of the subnetwork to which all network endpoints in the NEG belong. |
zone | string | [Output Only] The URL of the zone where the network endpoint group is located. |
Successful response
Name | Datatype | Description |
---|---|---|
id | string | [Output Only] Unique identifier for the resource; defined by the server. |
items | array | A list of NetworkEndpointGroup resources. |
kind | string | [Output Only] The resource type, which is always compute#networkEndpointGroupList for network endpoint group lists. (default: compute#networkEndpointGroupList) |
nextPageToken | string | [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. |
selfLink | string | [Output Only] Server-defined URL for this resource. |
warning | object | [Output Only] Informational warning message. |
Successful response
Name | Datatype | Description |
---|---|---|
id | string (uint64) | [Output Only] The unique identifier for the resource. This identifier is defined by the server. |
name | string | Name 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. |
annotations | object | Optional. Metadata defined as annotations on the network endpoint group. |
appEngine | object | Optional. Only valid when networkEndpointType is SERVERLESS. Only one of cloudRun, appEngine or cloudFunction may be set. (id: NetworkEndpointGroupAppEngine) |
cloudFunction | object | Optional. Only valid when networkEndpointType is SERVERLESS. Only one of cloudRun, appEngine or cloudFunction may be set. (id: NetworkEndpointGroupCloudFunction) |
cloudRun | object | Optional. Only valid when networkEndpointType is SERVERLESS. Only one of cloudRun, appEngine or cloudFunction may be set. (id: NetworkEndpointGroupCloudRun) |
creationTimestamp | string | [Output Only] Creation timestamp in RFC3339 text format. |
defaultPort | integer (int32) | The default port used if the port number is not specified in the network endpoint. Optional. If the network endpoint type is either GCE_VM_IP, SERVERLESS or PRIVATE_SERVICE_CONNECT, this field must not be specified. |
description | string | An optional description of this resource. Provide this property when you create the resource. |
kind | string | [Output Only] Type of the resource. Always compute#networkEndpointGroup for network endpoint group. (default: compute#networkEndpointGroup) |
network | string | The URL of the network to which all network endpoints in the NEG belong. Uses default project network if unspecified. |
networkEndpointType | string | Type 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. |
pscData | object | Optional. Only valid when networkEndpointType is PRIVATE_SERVICE_CONNECT. (id: NetworkEndpointGroupPscData) |
pscTargetService | string | The 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. Optional. Only valid when networkEndpointType is PRIVATE_SERVICE_CONNECT. |
region | string | [Output Only] The URL of the region where the network endpoint group is located. |
selfLink | string | [Output Only] Server-defined URL for the resource. |
size | integer (int32) | [Output only] Number of network endpoints in the network endpoint group. |
subnetwork | string | Optional URL of the subnetwork to which all network endpoints in the NEG belong. |
zone | string | [Output Only] The URL of the zone where the network endpoint group is located. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | project , region , networkEndpointGroup | Returns the specified network endpoint group. | |
list | select | project , region | filter , maxResults , orderBy , pageToken , returnPartialSuccess | Retrieves the list of regional network endpoint groups available to the specified project in the given region. |
aggregated_list | select | project | filter , includeAllScopes , maxResults , orderBy , pageToken , returnPartialSuccess , serviceProjectNumber | 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 . |
insert | insert | project , region | requestId | Creates a network endpoint group in the specified project using the parameters that are included in the request. |
delete | delete | project , region , networkEndpointGroup | requestId | Deletes the specified network endpoint group. Note that the NEG cannot be deleted if it is configured as a backend of a backend service. |
attach_network_endpoints | exec | project , region , networkEndpointGroup | requestId | Attach a list of network endpoints to the specified network endpoint group. |
detach_network_endpoints | exec | project , region , networkEndpointGroup | requestId | Detach the network endpoint from the specified network endpoint group. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
networkEndpointGroup | string | |
project | string | |
region | string | |
filter | string | |
includeAllScopes | boolean | |
maxResults | integer (uint32) | |
orderBy | string | |
pageToken | string | |
requestId | string | |
returnPartialSuccess | boolean | |
serviceProjectNumber | string (int64) |
SELECT
examples
- get
- list
- aggregated_list
Returns the specified network endpoint group.
SELECT
id,
name,
annotations,
appEngine,
cloudFunction,
cloudRun,
creationTimestamp,
defaultPort,
description,
kind,
network,
networkEndpointType,
pscData,
pscTargetService,
region,
selfLink,
size,
subnetwork,
zone
FROM google.compute.network_endpoint_groups
WHERE project = '{{ project }}' -- required
AND region = '{{ region }}' -- required
AND networkEndpointGroup = '{{ networkEndpointGroup }}' -- required;
Retrieves the list of regional network endpoint groups available to the specified project in the given region.
SELECT
id,
items,
kind,
nextPageToken,
selfLink,
warning
FROM google.compute.network_endpoint_groups
WHERE project = '{{ project }}' -- required
AND region = '{{ region }}' -- required
AND filter = '{{ filter }}'
AND maxResults = '{{ maxResults }}'
AND orderBy = '{{ orderBy }}'
AND pageToken = '{{ pageToken }}'
AND returnPartialSuccess = '{{ returnPartialSuccess }}';
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,
annotations,
appEngine,
cloudFunction,
cloudRun,
creationTimestamp,
defaultPort,
description,
kind,
network,
networkEndpointType,
pscData,
pscTargetService,
region,
selfLink,
size,
subnetwork,
zone
FROM google.compute.network_endpoint_groups
WHERE project = '{{ project }}' -- required
AND filter = '{{ filter }}'
AND includeAllScopes = '{{ includeAllScopes }}'
AND maxResults = '{{ maxResults }}'
AND orderBy = '{{ orderBy }}'
AND pageToken = '{{ pageToken }}'
AND returnPartialSuccess = '{{ returnPartialSuccess }}'
AND serviceProjectNumber = '{{ serviceProjectNumber }}';
INSERT
examples
- insert
- Manifest
Creates a network endpoint group in the specified project using the parameters that are included in the request.
INSERT INTO google.compute.network_endpoint_groups (
data__kind,
data__id,
data__creationTimestamp,
data__selfLink,
data__name,
data__description,
data__networkEndpointType,
data__size,
data__region,
data__zone,
data__network,
data__subnetwork,
data__defaultPort,
data__annotations,
data__cloudRun,
data__appEngine,
data__cloudFunction,
data__pscTargetService,
data__pscData,
project,
region,
requestId
)
SELECT
'{{ kind }}',
'{{ id }}',
'{{ creationTimestamp }}',
'{{ selfLink }}',
'{{ name }}',
'{{ description }}',
'{{ networkEndpointType }}',
{{ size }},
'{{ region }}',
'{{ zone }}',
'{{ network }}',
'{{ subnetwork }}',
{{ defaultPort }},
'{{ annotations }}',
'{{ cloudRun }}',
'{{ appEngine }}',
'{{ cloudFunction }}',
'{{ pscTargetService }}',
'{{ pscData }}',
'{{ project }}',
'{{ region }}',
'{{ requestId }}'
RETURNING
id,
name,
clientOperationId,
creationTimestamp,
description,
endTime,
error,
httpErrorMessage,
httpErrorStatusCode,
insertTime,
instancesBulkInsertOperationMetadata,
kind,
operationGroupId,
operationType,
progress,
region,
selfLink,
setCommonInstanceMetadataOperationMetadata,
startTime,
status,
statusMessage,
targetId,
targetLink,
user,
warnings,
zone
;
# Description fields are for documentation purposes
- name: network_endpoint_groups
props:
- name: project
value: string
description: Required parameter for the network_endpoint_groups resource.
- name: region
value: string
description: Required parameter for the network_endpoint_groups resource.
- name: kind
value: string
description: >
[Output Only] Type of the resource. Always compute#networkEndpointGroup for network endpoint group.
default: compute#networkEndpointGroup
- name: id
value: string
description: >
[Output Only] The unique identifier for the resource. This identifier is defined by the server.
- name: creationTimestamp
value: string
description: >
[Output Only] Creation timestamp in RFC3339 text format.
- name: selfLink
value: string
description: >
[Output Only] Server-defined URL for the resource.
- name: name
value: string
description: >
Name 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.
- name: description
value: string
description: >
An optional description of this resource. Provide this property when you create the resource.
- name: networkEndpointType
value: string
description: >
Type 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.
valid_values: ['GCE_VM_IP', 'GCE_VM_IP_PORT', 'GCE_VM_IP_PORTMAP', 'INTERNET_FQDN_PORT', 'INTERNET_IP_PORT', 'NON_GCP_PRIVATE_IP_PORT', 'PRIVATE_SERVICE_CONNECT', 'SERVERLESS']
- name: size
value: integer
description: >
[Output only] Number of network endpoints in the network endpoint group.
- name: region
value: string
description: >
[Output Only] The URL of the region where the network endpoint group is located.
- name: zone
value: string
description: >
[Output Only] The URL of the zone where the network endpoint group is located.
- name: network
value: string
description: >
The URL of the network to which all network endpoints in the NEG belong. Uses default project network if unspecified.
- name: subnetwork
value: string
description: >
Optional URL of the subnetwork to which all network endpoints in the NEG belong.
- name: defaultPort
value: integer
description: >
The default port used if the port number is not specified in the network endpoint. Optional. If the network endpoint type is either GCE_VM_IP, SERVERLESS or PRIVATE_SERVICE_CONNECT, this field must not be specified.
- name: annotations
value: object
description: >
Optional. Metadata defined as annotations on the network endpoint group.
- name: cloudRun
value: object
description: >
Optional. Only valid when networkEndpointType is SERVERLESS. Only one of cloudRun, appEngine or cloudFunction may be set.
- name: appEngine
value: object
description: >
Optional. Only valid when networkEndpointType is SERVERLESS. Only one of cloudRun, appEngine or cloudFunction may be set.
- name: cloudFunction
value: object
description: >
Optional. Only valid when networkEndpointType is SERVERLESS. Only one of cloudRun, appEngine or cloudFunction may be set.
- name: pscTargetService
value: string
description: >
The 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. Optional. Only valid when networkEndpointType is PRIVATE_SERVICE_CONNECT.
- name: pscData
value: object
description: >
Optional. Only valid when networkEndpointType is PRIVATE_SERVICE_CONNECT.
- name: requestId
value: string
DELETE
examples
- delete
Deletes the specified network endpoint group. Note that the NEG cannot be deleted if it is configured as a backend of a backend service.
DELETE FROM google.compute.network_endpoint_groups
WHERE project = '{{ project }}' --required
AND region = '{{ region }}' --required
AND networkEndpointGroup = '{{ networkEndpointGroup }}' --required
AND requestId = '{{ requestId }}';
Lifecycle Methods
- attach_network_endpoints
- detach_network_endpoints
Attach a list of network endpoints to the specified network endpoint group.
EXEC google.compute.network_endpoint_groups.attach_network_endpoints
@project='{{ project }}' --required,
@region='{{ region }}' --required,
@networkEndpointGroup='{{ networkEndpointGroup }}' --required,
@requestId='{{ requestId }}'
@@json=
'{
"networkEndpoints": "{{ networkEndpoints }}"
}';
Detach the network endpoint from the specified network endpoint group.
EXEC google.compute.network_endpoint_groups.detach_network_endpoints
@project='{{ project }}' --required,
@region='{{ region }}' --required,
@networkEndpointGroup='{{ networkEndpointGroup }}' --required,
@requestId='{{ requestId }}'
@@json=
'{
"networkEndpoints": "{{ networkEndpoints }}"
}';