#[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 */
}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.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
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
impl NetworkEndpointGroup
pub fn new() -> Self
Sourcepub fn set_annotations<T, K, V>(self, v: T) -> Self
pub fn set_annotations<T, K, V>(self, v: T) -> Self
Sets the value of annotations.
§Example
let x = NetworkEndpointGroup::new().set_annotations([
("key0", "abc"),
("key1", "xyz"),
]);Sourcepub fn set_app_engine<T>(self, v: T) -> Selfwhere
T: Into<NetworkEndpointGroupAppEngine>,
pub fn set_app_engine<T>(self, v: T) -> Selfwhere
T: Into<NetworkEndpointGroupAppEngine>,
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 */);Sourcepub fn set_or_clear_app_engine<T>(self, v: Option<T>) -> Selfwhere
T: Into<NetworkEndpointGroupAppEngine>,
pub fn set_or_clear_app_engine<T>(self, v: Option<T>) -> Selfwhere
T: Into<NetworkEndpointGroupAppEngine>,
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>);Sourcepub fn set_cloud_function<T>(self, v: T) -> Selfwhere
T: Into<NetworkEndpointGroupCloudFunction>,
pub fn set_cloud_function<T>(self, v: T) -> Selfwhere
T: Into<NetworkEndpointGroupCloudFunction>,
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 */);Sourcepub fn set_or_clear_cloud_function<T>(self, v: Option<T>) -> Selfwhere
T: Into<NetworkEndpointGroupCloudFunction>,
pub fn set_or_clear_cloud_function<T>(self, v: Option<T>) -> Selfwhere
T: Into<NetworkEndpointGroupCloudFunction>,
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>);Sourcepub fn set_cloud_run<T>(self, v: T) -> Selfwhere
T: Into<NetworkEndpointGroupCloudRun>,
pub fn set_cloud_run<T>(self, v: T) -> Selfwhere
T: Into<NetworkEndpointGroupCloudRun>,
Sourcepub fn set_or_clear_cloud_run<T>(self, v: Option<T>) -> Selfwhere
T: Into<NetworkEndpointGroupCloudRun>,
pub fn set_or_clear_cloud_run<T>(self, v: Option<T>) -> Selfwhere
T: Into<NetworkEndpointGroupCloudRun>,
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>);Sourcepub fn set_creation_timestamp<T>(self, v: T) -> Self
pub fn set_creation_timestamp<T>(self, v: T) -> Self
Sets the value of creation_timestamp.
§Example
let x = NetworkEndpointGroup::new().set_creation_timestamp("example");Sourcepub fn set_or_clear_creation_timestamp<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_creation_timestamp<T>(self, v: Option<T>) -> Self
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>);Sourcepub fn set_default_port<T>(self, v: T) -> Self
pub fn set_default_port<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_default_port<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_default_port<T>(self, v: Option<T>) -> Self
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>);Sourcepub fn set_description<T>(self, v: T) -> Self
pub fn set_description<T>(self, v: T) -> Self
Sets the value of description.
§Example
let x = NetworkEndpointGroup::new().set_description("example");Sourcepub fn set_or_clear_description<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_description<T>(self, v: Option<T>) -> Self
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>);Sourcepub fn set_or_clear_id<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_id<T>(self, v: Option<T>) -> Self
Sourcepub fn set_or_clear_kind<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_kind<T>(self, v: Option<T>) -> Self
Sourcepub fn set_or_clear_name<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_name<T>(self, v: Option<T>) -> Self
Sourcepub fn set_network<T>(self, v: T) -> Self
pub fn set_network<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_network<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_network<T>(self, v: Option<T>) -> Self
Sourcepub fn set_network_endpoint_type<T>(self, v: T) -> Selfwhere
T: Into<NetworkEndpointType>,
pub fn set_network_endpoint_type<T>(self, v: T) -> Selfwhere
T: Into<NetworkEndpointType>,
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);Sourcepub fn set_or_clear_network_endpoint_type<T>(self, v: Option<T>) -> Selfwhere
T: Into<NetworkEndpointType>,
pub fn set_or_clear_network_endpoint_type<T>(self, v: Option<T>) -> Selfwhere
T: Into<NetworkEndpointType>,
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>);Sourcepub fn set_psc_data<T>(self, v: T) -> Selfwhere
T: Into<NetworkEndpointGroupPscData>,
pub fn set_psc_data<T>(self, v: T) -> Selfwhere
T: Into<NetworkEndpointGroupPscData>,
Sourcepub fn set_or_clear_psc_data<T>(self, v: Option<T>) -> Selfwhere
T: Into<NetworkEndpointGroupPscData>,
pub fn set_or_clear_psc_data<T>(self, v: Option<T>) -> Selfwhere
T: Into<NetworkEndpointGroupPscData>,
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>);Sourcepub fn set_psc_target_service<T>(self, v: T) -> Self
pub fn set_psc_target_service<T>(self, v: T) -> Self
Sets the value of psc_target_service.
§Example
let x = NetworkEndpointGroup::new().set_psc_target_service("example");Sourcepub fn set_or_clear_psc_target_service<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_psc_target_service<T>(self, v: Option<T>) -> Self
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>);Sourcepub fn set_region<T>(self, v: T) -> Self
pub fn set_region<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_region<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_region<T>(self, v: Option<T>) -> Self
Sourcepub fn set_self_link<T>(self, v: T) -> Self
pub fn set_self_link<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_self_link<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_self_link<T>(self, v: Option<T>) -> Self
Sourcepub fn set_or_clear_size<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_size<T>(self, v: Option<T>) -> Self
Sourcepub fn set_subnetwork<T>(self, v: T) -> Self
pub fn set_subnetwork<T>(self, v: T) -> Self
Sets the value of subnetwork.
§Example
let x = NetworkEndpointGroup::new().set_subnetwork("example");Sourcepub fn set_or_clear_subnetwork<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_subnetwork<T>(self, v: Option<T>) -> Self
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>);Trait Implementations§
Source§impl Clone for NetworkEndpointGroup
impl Clone for NetworkEndpointGroup
Source§fn clone(&self) -> NetworkEndpointGroup
fn clone(&self) -> NetworkEndpointGroup
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more