Method: globalNetworkEndpointGroups.attachNetworkEndpoints

Attach a network endpoint to the specified network endpoint group.

HTTP request


The URL uses gRPC Transcoding syntax.

Path parameters



Project ID for this request.



The name of the network endpoint group where you are attaching network endpoints to. It should comply with RFC1035.

Query parameters



An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.

For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Request body

The request body contains data with the following structure:

JSON representation
  "networkEndpoints": [
      "ipAddress": string,
      "fqdn": string,
      "port": integer,
      "instance": string,
      "annotations": {
        string: string,


Optional IPv4 address of network endpoint. The IP address must belong to a VM in Compute Engine (either the primary IP or as part of an aliased IP range). If the IP address is not specified, then the primary IP address for the VM instance in the network that the network endpoint group belongs to will be used.



Optional fully qualified domain name of network endpoint. This can only be specified when NetworkEndpointGroup.network_endpoint_type is NON_GCP_FQDN_PORT.



Optional port number of network endpoint. If not specified, the defaultPort for the network endpoint group will be used.



The name for a specific VM instance that the IP address belongs to. This is required for network endpoints of type GCE_VM_IP_PORT. The instance must be in the same zone of network endpoint group.

The name must be 1-63 characters long, and comply with RFC1035.


map (key: string, value: string)

Metadata defined as annotations on the network endpoint.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

Response body

If successful, the response body contains data with the following structure:

Represents an Operation resource.

Google Compute Engine has three Operation resources:

You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.

Operations can be global, regional or zonal.

  • For global operations, use the globalOperations resource.
  • For regional operations, use the regionOperations resource.
  • For zonal operations, use the zonalOperations resource.

For more information, read Global, Regional, and Zonal Resources.

JSON representation
  "id": string,
  "creationTimestamp": string,
  "name": string,
  "zone": string,
  "clientOperationId": string,
  "operationType": string,
  "targetLink": string,
  "targetId": string,
  "status": enum,
  "statusMessage": string,
  "user": string,