#[non_exhaustive]pub struct NetworkPolicy {
pub name: String,
pub create_time: Option<Timestamp>,
pub update_time: Option<Timestamp>,
pub internet_access: Option<NetworkService>,
pub external_ip: Option<NetworkService>,
pub edge_services_cidr: String,
pub uid: String,
pub vmware_engine_network: String,
pub description: String,
pub vmware_engine_network_canonical: String,
/* private fields */
}Expand description
Represents a network policy resource. Network policies are regional resources. You can use a network policy to enable or disable internet access and external IP access. Network policies are associated with a VMware Engine network, which might span across regions. For a given region, a network policy applies to all private clouds in the VMware Engine network associated with the policy.
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.name: StringOutput only. The resource name of this network policy.
Resource names are schemeless URIs that follow the conventions in
https://cloud.google.com/apis/design/resource_names.
For example:
projects/my-project/locations/us-central1/networkPolicies/my-network-policy
create_time: Option<Timestamp>Output only. Creation time of this resource.
update_time: Option<Timestamp>Output only. Last update time of this resource.
internet_access: Option<NetworkService>Network service that allows VMware workloads to access the internet.
external_ip: Option<NetworkService>Network service that allows External IP addresses to be assigned to VMware
workloads. This service can only be enabled when internet_access is also
enabled.
edge_services_cidr: StringRequired. IP address range in CIDR notation used to create internet access and external IP access. An RFC 1918 CIDR block, with a “/26” prefix, is required. The range cannot overlap with any prefixes either in the consumer VPC network or in use by the private clouds attached to that VPC network.
uid: StringOutput only. System-generated unique identifier for the resource.
vmware_engine_network: StringOptional. The relative resource name of the VMware Engine network.
Specify the name in the following form:
projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}
where {project} can either be a project number or a project ID.
description: StringOptional. User-provided description for this network policy.
vmware_engine_network_canonical: StringOutput only. The canonical name of the VMware Engine network in the form:
projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}
Implementations§
Source§impl NetworkPolicy
impl NetworkPolicy
pub fn new() -> Self
Sourcepub fn set_create_time<T>(self, v: T) -> Self
pub fn set_create_time<T>(self, v: T) -> Self
Sets the value of create_time.
Sourcepub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of create_time.
Sourcepub fn set_update_time<T>(self, v: T) -> Self
pub fn set_update_time<T>(self, v: T) -> Self
Sets the value of update_time.
Sourcepub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of update_time.
Sourcepub fn set_internet_access<T>(self, v: T) -> Selfwhere
T: Into<NetworkService>,
pub fn set_internet_access<T>(self, v: T) -> Selfwhere
T: Into<NetworkService>,
Sets the value of internet_access.
Sourcepub fn set_or_clear_internet_access<T>(self, v: Option<T>) -> Selfwhere
T: Into<NetworkService>,
pub fn set_or_clear_internet_access<T>(self, v: Option<T>) -> Selfwhere
T: Into<NetworkService>,
Sets or clears the value of internet_access.
Sourcepub fn set_external_ip<T>(self, v: T) -> Selfwhere
T: Into<NetworkService>,
pub fn set_external_ip<T>(self, v: T) -> Selfwhere
T: Into<NetworkService>,
Sets the value of external_ip.
Sourcepub fn set_or_clear_external_ip<T>(self, v: Option<T>) -> Selfwhere
T: Into<NetworkService>,
pub fn set_or_clear_external_ip<T>(self, v: Option<T>) -> Selfwhere
T: Into<NetworkService>,
Sets or clears the value of external_ip.
Sourcepub fn set_edge_services_cidr<T: Into<String>>(self, v: T) -> Self
pub fn set_edge_services_cidr<T: Into<String>>(self, v: T) -> Self
Sets the value of edge_services_cidr.
Sourcepub fn set_vmware_engine_network<T: Into<String>>(self, v: T) -> Self
pub fn set_vmware_engine_network<T: Into<String>>(self, v: T) -> Self
Sets the value of vmware_engine_network.
Sourcepub fn set_description<T: Into<String>>(self, v: T) -> Self
pub fn set_description<T: Into<String>>(self, v: T) -> Self
Sets the value of description.
Sourcepub fn set_vmware_engine_network_canonical<T: Into<String>>(self, v: T) -> Self
pub fn set_vmware_engine_network_canonical<T: Into<String>>(self, v: T) -> Self
Sets the value of vmware_engine_network_canonical.
Trait Implementations§
Source§impl Clone for NetworkPolicy
impl Clone for NetworkPolicy
Source§fn clone(&self) -> NetworkPolicy
fn clone(&self) -> NetworkPolicy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more