pub struct SubnetClient { /* private fields */ }Expand description
Calls SubnetService.
Subnets: the part of a VPC in one zone. Network interfaces get their private addresses from a subnet. Its route table association decides where its traffic goes, and its ACL association what crosses its edge.
Implementations§
Source§impl SubnetClient
impl SubnetClient
Sourcepub fn new(client: &Client) -> Self
pub fn new(client: &Client) -> Self
Returns a client of SubnetService that sends its calls through client.
Sourcepub fn service(&self) -> &Service
pub fn service(&self) -> &Service
The endpoint the client sends its calls to, which also serves the operations its methods answer with.
Sourcepub async fn get_subnet(
&self,
request: GetSubnetRequest,
) -> Result<Subnet, Error>
pub async fn get_subnet( &self, request: GetSubnetRequest, ) -> Result<Subnet, Error>
Returns a subnet.
Sourcepub async fn list_subnets(
&self,
request: ListSubnetsRequest,
) -> Result<ListSubnetsResponse, Error>
pub async fn list_subnets( &self, request: ListSubnetsRequest, ) -> Result<ListSubnetsResponse, Error>
Lists the subnets in a zone, oldest first. For every zone’s subnets,
list the zones whose services name network with the location
service (location.origincloudapis.eu), then each zone’s subnets.
Sourcepub fn all_subnets(&self, request: ListSubnetsRequest) -> Pages<Subnet>
pub fn all_subnets(&self, request: ListSubnetsRequest) -> Pages<Subnet>
Returns everything list_subnets lists from request’s page on, fetching the next page as the stream reaches it. A page that fails ends the stream with its error.
Sourcepub async fn create_subnet(
&self,
request: CreateSubnetRequest,
) -> Result<Operation<Subnet>, Error>
pub async fn create_subnet( &self, request: CreateSubnetRequest, ) -> Result<Operation<Subnet>, Error>
Creates a subnet in a VPC, with the next free IPv4 and IPv6 ranges of the VPC’s address space, and no route table or ACL association. The operation is done once the change is recorded; the network applies it within seconds.
It answers with an operation to wait on: Operation::wait returns the Subnet once the change is done.
Sourcepub async fn update_subnet(
&self,
request: UpdateSubnetRequest,
) -> Result<Operation<Subnet>, Error>
pub async fn update_subnet( &self, request: UpdateSubnetRequest, ) -> Result<Operation<Subnet>, Error>
Changes a subnet’s public address assignment or tags.
auto_assign_public_ip applies to launches afterwards that create
their interface. The operation is done once the change is recorded.
It answers with an operation to wait on: Operation::wait returns the Subnet once the change is done.
Sourcepub async fn delete_subnet(
&self,
request: DeleteSubnetRequest,
) -> Result<Operation<Empty>, Error>
pub async fn delete_subnet( &self, request: DeleteSubnetRequest, ) -> Result<Operation<Empty>, Error>
Deletes a subnet with its route table and ACL associations and its unattached network interfaces. Refused while an interface in it is attached or a NAT gateway lives in it. The operation is done once the change is recorded; the network applies it within seconds.
It answers with an operation to wait on, which has no result: Operation::wait returns once the change is done.