Compute V1 Client - Class NetworkEndpointGroup (1.28.0)

Reference documentation and code samples for the Compute V1 Client class NetworkEndpointGroup.

Represents a collection of network endpoints. A network endpoint group (NEG) defines how a set of endpoints should be reached, whether they are reachable, and where they are located. For more information about using NEGs for different use cases, see Network endpoint groups overview.

Generated from protobuf message google.cloud.compute.v1.NetworkEndpointGroup

Namespace

Google \ Cloud \ Compute \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
dataarray

Optional. Data for populating the Message object.

↳ annotationsarray|Google\Protobuf\Internal\MapField

Optional. Metadata defined as annotations on the network endpoint group.

↳ app_engineNetworkEndpointGroupAppEngine

Optional. Only valid when networkEndpointType is SERVERLESS. Only one of cloudRun, appEngine or cloudFunction may be set.

↳ cloud_functionNetworkEndpointGroupCloudFunction

Optional. Only valid when networkEndpointType is SERVERLESS. Only one of cloudRun, appEngine or cloudFunction may be set.

↳ cloud_runNetworkEndpointGroupCloudRun

Optional. Only valid when networkEndpointType is SERVERLESS. Only one of cloudRun, appEngine or cloudFunction may be set.

↳ creation_timestampstring

[Output Only] Creation timestamp in RFC3339 text format.

↳ default_portint

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.

↳ descriptionstring

An optional description of this resource. Provide this property when you create the resource.

↳ idint|string

[Output Only] The unique identifier for the resource. This identifier is defined by the server.

↳ kindstring

[Output Only] Type of the resource. Always compute#networkEndpointGroup for network endpoint group.

↳ namestring

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.

↳ networkstring

The URL of the network to which all network endpoints in the NEG belong. Uses default project network if unspecified.

↳ network_endpoint_typestring

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. Check the NetworkEndpointType enum for the list of possible values.

↳ psc_dataNetworkEndpointGroupPscData

Optional. Only valid when networkEndpointType is PRIVATE_SERVICE_CONNECT.

↳ psc_target_servicestring

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.

↳ regionstring

[Output Only] The URL of the region where the network endpoint group is located.

↳ self_linkstring

[Output Only] Server-defined URL for the resource.

↳ sizeint

[Output only] Number of network endpoints in the network endpoint group.

↳ subnetworkstring

Optional 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.

getAnnotations

Optional. Metadata defined as annotations on the network endpoint group.

Returns
TypeDescription
Google\Protobuf\Internal\MapField

setAnnotations

Optional. Metadata defined as annotations on the network endpoint group.

Parameter
NameDescription
vararray|Google\Protobuf\Internal\MapField
Returns
TypeDescription
$this

getAppEngine

Optional. Only valid when networkEndpointType is SERVERLESS. Only one of cloudRun, appEngine or cloudFunction may be set.

Returns
TypeDescription
NetworkEndpointGroupAppEngine|null

hasAppEngine

clearAppEngine

setAppEngine

Optional. Only valid when networkEndpointType is SERVERLESS. Only one of cloudRun, appEngine or cloudFunction may be set.

Parameter
NameDescription
varNetworkEndpointGroupAppEngine
Returns
TypeDescription
$this

getCloudFunction

Optional. Only valid when networkEndpointType is SERVERLESS. Only one of cloudRun, appEngine or cloudFunction may be set.

Returns
TypeDescription
NetworkEndpointGroupCloudFunction|null

hasCloudFunction

clearCloudFunction

setCloudFunction

Optional. Only valid when networkEndpointType is SERVERLESS. Only one of cloudRun, appEngine or cloudFunction may be set.

Parameter
NameDescription
varNetworkEndpointGroupCloudFunction
Returns
TypeDescription
$this

getCloudRun

Optional. Only valid when networkEndpointType is SERVERLESS. Only one of cloudRun, appEngine or cloudFunction may be set.

Returns
TypeDescription
NetworkEndpointGroupCloudRun|null

hasCloudRun

clearCloudRun

setCloudRun

Optional. Only valid when networkEndpointType is SERVERLESS. Only one of cloudRun, appEngine or cloudFunction may be set.

Parameter
NameDescription
varNetworkEndpointGroupCloudRun
Returns
TypeDescription
$this

getCreationTimestamp

[Output Only] Creation timestamp in RFC3339 text format.

Returns
TypeDescription
string

hasCreationTimestamp

clearCreationTimestamp

setCreationTimestamp

[Output Only] Creation timestamp in RFC3339 text format.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getDefaultPort

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.

Returns
TypeDescription
int

hasDefaultPort

clearDefaultPort

setDefaultPort

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.

Parameter
NameDescription
varint
Returns
TypeDescription
$this

getDescription

An optional description of this resource. Provide this property when you create the resource.

Returns
TypeDescription
string

hasDescription

clearDescription

setDescription

An optional description of this resource. Provide this property when you create the resource.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getId

[Output Only] The unique identifier for the resource. This identifier is defined by the server.

Returns
TypeDescription
int|string

hasId

clearId

setId

[Output Only] The unique identifier for the resource. This identifier is defined by the server.

Parameter
NameDescription
varint|string
Returns
TypeDescription
$this

getKind

[Output Only] Type of the resource. Always compute#networkEndpointGroup for network endpoint group.

Returns
TypeDescription
string

hasKind

clearKind

setKind

[Output Only] Type of the resource. Always compute#networkEndpointGroup for network endpoint group.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getName

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.

Returns
TypeDescription
string

hasName

clearName

setName

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.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getNetwork

The URL of the network to which all network endpoints in the NEG belong. Uses default project network if unspecified.

Returns
TypeDescription
string

hasNetwork

clearNetwork

setNetwork

The URL of the network to which all network endpoints in the NEG belong. Uses default project network if unspecified.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getNetworkEndpointType

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.

Check the NetworkEndpointType enum for the list of possible values.

Returns
TypeDescription
string

hasNetworkEndpointType

clearNetworkEndpointType

setNetworkEndpointType

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.

Check the NetworkEndpointType enum for the list of possible values.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getPscData

Optional. Only valid when networkEndpointType is PRIVATE_SERVICE_CONNECT.

Returns
TypeDescription
NetworkEndpointGroupPscData|null

hasPscData

clearPscData

setPscData

Optional. Only valid when networkEndpointType is PRIVATE_SERVICE_CONNECT.

Parameter
NameDescription
varNetworkEndpointGroupPscData
Returns
TypeDescription
$this

getPscTargetService

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.

Returns
TypeDescription
string

hasPscTargetService

clearPscTargetService

setPscTargetService

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.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getRegion

[Output Only] The URL of the region where the network endpoint group is located.

Returns
TypeDescription
string

hasRegion

clearRegion

setRegion

[Output Only] The URL of the region where the network endpoint group is located.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

[Output Only] Server-defined URL for the resource.

Returns
TypeDescription
string

[Output Only] Server-defined URL for the resource.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getSize

[Output only] Number of network endpoints in the network endpoint group.

Returns
TypeDescription
int

hasSize

clearSize

setSize

[Output only] Number of network endpoints in the network endpoint group.

Parameter
NameDescription
varint
Returns
TypeDescription
$this

getSubnetwork

Optional URL of the subnetwork to which all network endpoints in the NEG belong.

Returns
TypeDescription
string

hasSubnetwork

clearSubnetwork

setSubnetwork

Optional URL of the subnetwork to which all network endpoints in the NEG belong.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getZone

[Output Only] The URL of the zone where the network endpoint group is located.

Returns
TypeDescription
string

hasZone

clearZone

setZone

[Output Only] The URL of the zone where the network endpoint group is located.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this