Skip to main content

NetworkEndpointGroup

Struct NetworkEndpointGroup 

Source
#[non_exhaustive]
pub struct NetworkEndpointGroup {
Show 19 fields pub annotations: HashMap<String, String>, pub app_engine: Option<NetworkEndpointGroupAppEngine>, pub cloud_function: Option<NetworkEndpointGroupCloudFunction>, pub cloud_run: Option<NetworkEndpointGroupCloudRun>, pub creation_timestamp: Option<String>, pub default_port: Option<i32>, pub description: Option<String>, pub id: Option<u64>, pub kind: Option<String>, pub name: Option<String>, pub network: Option<String>, pub network_endpoint_type: Option<NetworkEndpointType>, pub psc_data: Option<NetworkEndpointGroupPscData>, pub psc_target_service: Option<String>, pub region: Option<String>, pub self_link: Option<String>, pub size: Option<i32>, pub subnetwork: Option<String>, pub zone: Option<String>, /* private fields */
}
Available on crate features global-network-endpoint-groups or network-endpoint-groups or region-network-endpoint-groups only.
Expand description

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, seeNetwork endpoint groups overview.

Note: Use the following APIs to manage network endpoint groups:

  • To manage NEGs with zonal scope (such as zonal NEGs, hybrid connectivity NEGs): zonal API
  • To manage NEGs with regional scope (such as regional internet NEGs, serverless NEGs, Private Service Connect NEGs): regional API
  • To manage NEGs with global scope (such as global internet NEGs):global API

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§annotations: HashMap<String, String>

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

§app_engine: Option<NetworkEndpointGroupAppEngine>

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

§cloud_function: Option<NetworkEndpointGroupCloudFunction>

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

§cloud_run: Option<NetworkEndpointGroupCloudRun>

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

§creation_timestamp: Option<String>

Output only. [Output Only] Creation timestamp inRFC3339 text format.

§default_port: Option<i32>

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: Option<String>

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

§id: Option<u64>

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

§kind: Option<String>

Output only. [Output Only] Type of the resource. Alwayscompute#networkEndpointGroup for network endpoint group.

§name: Option<String>

Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply withRFC1035. 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.

§network: Option<String>

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

§network_endpoint_type: Option<NetworkEndpointType>

Type of network endpoints in this network endpoint group. Can be one ofGCE_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.

§psc_data: Option<NetworkEndpointGroupPscData>

Optional. Only valid when networkEndpointType isPRIVATE_SERVICE_CONNECT.

§psc_target_service: Option<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 isPRIVATE_SERVICE_CONNECT.

§region: Option<String>

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

§self_link: Option<String>

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

§size: Option<i32>

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

§subnetwork: Option<String>

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

§zone: Option<String>

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

Implementations§

Source§

impl NetworkEndpointGroup

Source

pub fn new() -> Self

Source

pub fn set_annotations<T, K, V>(self, v: T) -> Self
where T: IntoIterator<Item = (K, V)>, K: Into<String>, V: Into<String>,

Sets the value of annotations.

§Example
let x = NetworkEndpointGroup::new().set_annotations([
    ("key0", "abc"),
    ("key1", "xyz"),
]);
Source

pub fn set_app_engine<T>(self, v: T) -> Self

Sets the value of app_engine.

§Example
use google_cloud_compute_v1::model::NetworkEndpointGroupAppEngine;
let x = NetworkEndpointGroup::new().set_app_engine(NetworkEndpointGroupAppEngine::default()/* use setters */);
Source

pub fn set_or_clear_app_engine<T>(self, v: Option<T>) -> Self

Sets or clears the value of app_engine.

§Example
use google_cloud_compute_v1::model::NetworkEndpointGroupAppEngine;
let x = NetworkEndpointGroup::new().set_or_clear_app_engine(Some(NetworkEndpointGroupAppEngine::default()/* use setters */));
let x = NetworkEndpointGroup::new().set_or_clear_app_engine(None::<NetworkEndpointGroupAppEngine>);
Source

pub fn set_cloud_function<T>(self, v: T) -> Self

Sets the value of cloud_function.

§Example
use google_cloud_compute_v1::model::NetworkEndpointGroupCloudFunction;
let x = NetworkEndpointGroup::new().set_cloud_function(NetworkEndpointGroupCloudFunction::default()/* use setters */);
Source

pub fn set_or_clear_cloud_function<T>(self, v: Option<T>) -> Self

Sets or clears the value of cloud_function.

§Example
use google_cloud_compute_v1::model::NetworkEndpointGroupCloudFunction;
let x = NetworkEndpointGroup::new().set_or_clear_cloud_function(Some(NetworkEndpointGroupCloudFunction::default()/* use setters */));
let x = NetworkEndpointGroup::new().set_or_clear_cloud_function(None::<NetworkEndpointGroupCloudFunction>);
Source

pub fn set_cloud_run<T>(self, v: T) -> Self

Sets the value of cloud_run.

§Example
use google_cloud_compute_v1::model::NetworkEndpointGroupCloudRun;
let x = NetworkEndpointGroup::new().set_cloud_run(NetworkEndpointGroupCloudRun::default()/* use setters */);
Source

pub fn set_or_clear_cloud_run<T>(self, v: Option<T>) -> Self

Sets or clears the value of cloud_run.

§Example
use google_cloud_compute_v1::model::NetworkEndpointGroupCloudRun;
let x = NetworkEndpointGroup::new().set_or_clear_cloud_run(Some(NetworkEndpointGroupCloudRun::default()/* use setters */));
let x = NetworkEndpointGroup::new().set_or_clear_cloud_run(None::<NetworkEndpointGroupCloudRun>);
Source

pub fn set_creation_timestamp<T>(self, v: T) -> Self
where T: Into<String>,

Sets the value of creation_timestamp.

§Example
let x = NetworkEndpointGroup::new().set_creation_timestamp("example");
Source

pub fn set_or_clear_creation_timestamp<T>(self, v: Option<T>) -> Self
where T: Into<String>,

Sets or clears the value of creation_timestamp.

§Example
let x = NetworkEndpointGroup::new().set_or_clear_creation_timestamp(Some("example"));
let x = NetworkEndpointGroup::new().set_or_clear_creation_timestamp(None::<String>);
Source

pub fn set_default_port<T>(self, v: T) -> Self
where T: Into<i32>,

Sets the value of default_port.

§Example
let x = NetworkEndpointGroup::new().set_default_port(42);
Source

pub fn set_or_clear_default_port<T>(self, v: Option<T>) -> Self
where T: Into<i32>,

Sets or clears the value of default_port.

§Example
let x = NetworkEndpointGroup::new().set_or_clear_default_port(Some(42));
let x = NetworkEndpointGroup::new().set_or_clear_default_port(None::<i32>);
Source

pub fn set_description<T>(self, v: T) -> Self
where T: Into<String>,

Sets the value of description.

§Example
let x = NetworkEndpointGroup::new().set_description("example");
Source

pub fn set_or_clear_description<T>(self, v: Option<T>) -> Self
where T: Into<String>,

Sets or clears the value of description.

§Example
let x = NetworkEndpointGroup::new().set_or_clear_description(Some("example"));
let x = NetworkEndpointGroup::new().set_or_clear_description(None::<String>);
Source

pub fn set_id<T>(self, v: T) -> Self
where T: Into<u64>,

Sets the value of id.

§Example
let x = NetworkEndpointGroup::new().set_id(42_u32);
Source

pub fn set_or_clear_id<T>(self, v: Option<T>) -> Self
where T: Into<u64>,

Sets or clears the value of id.

§Example
let x = NetworkEndpointGroup::new().set_or_clear_id(Some(42_u32));
let x = NetworkEndpointGroup::new().set_or_clear_id(None::<u32>);
Source

pub fn set_kind<T>(self, v: T) -> Self
where T: Into<String>,

Sets the value of kind.

§Example
let x = NetworkEndpointGroup::new().set_kind("example");
Source

pub fn set_or_clear_kind<T>(self, v: Option<T>) -> Self
where T: Into<String>,

Sets or clears the value of kind.

§Example
let x = NetworkEndpointGroup::new().set_or_clear_kind(Some("example"));
let x = NetworkEndpointGroup::new().set_or_clear_kind(None::<String>);
Source

pub fn set_name<T>(self, v: T) -> Self
where T: Into<String>,

Sets the value of name.

§Example
let x = NetworkEndpointGroup::new().set_name("example");
Source

pub fn set_or_clear_name<T>(self, v: Option<T>) -> Self
where T: Into<String>,

Sets or clears the value of name.

§Example
let x = NetworkEndpointGroup::new().set_or_clear_name(Some("example"));
let x = NetworkEndpointGroup::new().set_or_clear_name(None::<String>);
Source

pub fn set_network<T>(self, v: T) -> Self
where T: Into<String>,

Sets the value of network.

§Example
let x = NetworkEndpointGroup::new().set_network("example");
Source

pub fn set_or_clear_network<T>(self, v: Option<T>) -> Self
where T: Into<String>,

Sets or clears the value of network.

§Example
let x = NetworkEndpointGroup::new().set_or_clear_network(Some("example"));
let x = NetworkEndpointGroup::new().set_or_clear_network(None::<String>);
Source

pub fn set_network_endpoint_type<T>(self, v: T) -> Self

Sets the value of network_endpoint_type.

§Example
use google_cloud_compute_v1::model::network_endpoint_group::NetworkEndpointType;
let x0 = NetworkEndpointGroup::new().set_network_endpoint_type(NetworkEndpointType::GceVmIpPort);
let x1 = NetworkEndpointGroup::new().set_network_endpoint_type(NetworkEndpointType::GceVmIpPortmap);
let x2 = NetworkEndpointGroup::new().set_network_endpoint_type(NetworkEndpointType::InternetFqdnPort);
Source

pub fn set_or_clear_network_endpoint_type<T>(self, v: Option<T>) -> Self

Sets or clears the value of network_endpoint_type.

§Example
use google_cloud_compute_v1::model::network_endpoint_group::NetworkEndpointType;
let x0 = NetworkEndpointGroup::new().set_or_clear_network_endpoint_type(Some(NetworkEndpointType::GceVmIpPort));
let x1 = NetworkEndpointGroup::new().set_or_clear_network_endpoint_type(Some(NetworkEndpointType::GceVmIpPortmap));
let x2 = NetworkEndpointGroup::new().set_or_clear_network_endpoint_type(Some(NetworkEndpointType::InternetFqdnPort));
let x_none = NetworkEndpointGroup::new().set_or_clear_network_endpoint_type(None::<NetworkEndpointType>);
Source

pub fn set_psc_data<T>(self, v: T) -> Self

Sets the value of psc_data.

§Example
use google_cloud_compute_v1::model::NetworkEndpointGroupPscData;
let x = NetworkEndpointGroup::new().set_psc_data(NetworkEndpointGroupPscData::default()/* use setters */);
Source

pub fn set_or_clear_psc_data<T>(self, v: Option<T>) -> Self

Sets or clears the value of psc_data.

§Example
use google_cloud_compute_v1::model::NetworkEndpointGroupPscData;
let x = NetworkEndpointGroup::new().set_or_clear_psc_data(Some(NetworkEndpointGroupPscData::default()/* use setters */));
let x = NetworkEndpointGroup::new().set_or_clear_psc_data(None::<NetworkEndpointGroupPscData>);
Source

pub fn set_psc_target_service<T>(self, v: T) -> Self
where T: Into<String>,

Sets the value of psc_target_service.

§Example
let x = NetworkEndpointGroup::new().set_psc_target_service("example");
Source

pub fn set_or_clear_psc_target_service<T>(self, v: Option<T>) -> Self
where T: Into<String>,

Sets or clears the value of psc_target_service.

§Example
let x = NetworkEndpointGroup::new().set_or_clear_psc_target_service(Some("example"));
let x = NetworkEndpointGroup::new().set_or_clear_psc_target_service(None::<String>);
Source

pub fn set_region<T>(self, v: T) -> Self
where T: Into<String>,

Sets the value of region.

§Example
let x = NetworkEndpointGroup::new().set_region("example");
Source

pub fn set_or_clear_region<T>(self, v: Option<T>) -> Self
where T: Into<String>,

Sets or clears the value of region.

§Example
let x = NetworkEndpointGroup::new().set_or_clear_region(Some("example"));
let x = NetworkEndpointGroup::new().set_or_clear_region(None::<String>);

Sets the value of self_link.

§Example
let x = NetworkEndpointGroup::new().set_self_link("example");

Sets or clears the value of self_link.

§Example
let x = NetworkEndpointGroup::new().set_or_clear_self_link(Some("example"));
let x = NetworkEndpointGroup::new().set_or_clear_self_link(None::<String>);
Source

pub fn set_size<T>(self, v: T) -> Self
where T: Into<i32>,

Sets the value of size.

§Example
let x = NetworkEndpointGroup::new().set_size(42);
Source

pub fn set_or_clear_size<T>(self, v: Option<T>) -> Self
where T: Into<i32>,

Sets or clears the value of size.

§Example
let x = NetworkEndpointGroup::new().set_or_clear_size(Some(42));
let x = NetworkEndpointGroup::new().set_or_clear_size(None::<i32>);
Source

pub fn set_subnetwork<T>(self, v: T) -> Self
where T: Into<String>,

Sets the value of subnetwork.

§Example
let x = NetworkEndpointGroup::new().set_subnetwork("example");
Source

pub fn set_or_clear_subnetwork<T>(self, v: Option<T>) -> Self
where T: Into<String>,

Sets or clears the value of subnetwork.

§Example
let x = NetworkEndpointGroup::new().set_or_clear_subnetwork(Some("example"));
let x = NetworkEndpointGroup::new().set_or_clear_subnetwork(None::<String>);
Source

pub fn set_zone<T>(self, v: T) -> Self
where T: Into<String>,

Sets the value of zone.

§Example
let x = NetworkEndpointGroup::new().set_zone("example");
Source

pub fn set_or_clear_zone<T>(self, v: Option<T>) -> Self
where T: Into<String>,

Sets or clears the value of zone.

§Example
let x = NetworkEndpointGroup::new().set_or_clear_zone(Some("example"));
let x = NetworkEndpointGroup::new().set_or_clear_zone(None::<String>);

Trait Implementations§

Source§

impl Clone for NetworkEndpointGroup

Source§

fn clone(&self) -> NetworkEndpointGroup

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for NetworkEndpointGroup

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for NetworkEndpointGroup

Source§

fn default() -> NetworkEndpointGroup

Returns the “default value” for a type. Read more
Source§

impl Message for NetworkEndpointGroup

Source§

fn typename() -> &'static str

The typename of this message.
Source§

impl PartialEq for NetworkEndpointGroup

Source§

fn eq(&self, other: &NetworkEndpointGroup) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for NetworkEndpointGroup

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,