pub struct Subnet {Show 16 fields
pub name: String,
pub urn: String,
pub vpc: String,
pub route_table: String,
pub acl: String,
pub auto_assign_public_ip: bool,
pub ipv4_cidr_block: String,
pub ipv6_cidr_block: String,
pub ipv4_gateway: String,
pub ipv6_gateway: String,
pub ipv4_dns_servers: Vec<String>,
pub ipv6_dns_servers: Vec<String>,
pub available_ipv4_address_count: i64,
pub create_time: Option<Timestamp>,
pub creator: String,
pub tags: BTreeMap<String, String>,
}Expand description
The part of a VPC in one zone, with its own address ranges.
Fields§
§name: StringThe subnet’s resource name.
urn: StringThe subnet’s URN, the identifier access policies and the audit log use.
vpc: StringThe VPC the subnet is part of, in the same project and in the zone’s
region. For now a VPC lives in one zone of its region: a subnet in
another zone is refused with FAILED_PRECONDITION.
route_table: StringThe route table that decides where the subnet’s traffic goes, as the
subnet’s route table association (a RouteTableAssociation) sets it.
A subnet reaches, and is reached from, the internet for an address
family only if its own route table has that family’s default route (a
Route with that family’s default destination). Empty while it has
none: a subnet with no route table has no route out of its VPC and isn’t
reachable from the internet, even when the VPC has an internet gateway.
acl: StringThe ACL that filters traffic in and out of the subnet, as the subnet’s
ACL association (an AclAssociation) sets it. Empty while it has
none: nothing is filtered at the subnet’s edge, and its interfaces’
security groups still apply.
auto_assign_public_ip: boolWhether a launch that creates its network interface in the subnet,
as the GraphQL API’s launchInstance does, gives that interface a
floating IP of its own, released when the instance is terminated.
CreateInstance takes existing interfaces, so an instance it launches
gets none: create a floating IP and a floating IP association for its
interface instead.
ipv4_cidr_block: StringThe subnet’s IPv4 range.
ipv6_cidr_block: StringThe subnet’s IPv6 range, a /72.
ipv4_gateway: StringThe IPv4 address of the subnet’s router.
ipv6_gateway: StringThe IPv6 address of the subnet’s router.
ipv4_dns_servers: Vec<String>The DNS servers instances in the subnet use over IPv4.
ipv6_dns_servers: Vec<String>The DNS servers instances in the subnet use over IPv6.
available_ipv4_address_count: i64How many IPv4 addresses in the subnet are free for interfaces.
create_time: Option<Timestamp>When the subnet was created.
creator: StringThe principal that created the subnet, such as user:<id> or
service_account:<id>; empty for one the platform created.
Labels of your own, at most 50. The origin:name tag is the name the
console shows.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Subnet
impl<'de> Deserialize<'de> for Subnet
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Source§impl Message for Subnet
impl Message for Subnet
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.