pub struct VpcClient { /* private fields */ }Expand description
Calls VpcService.
VPCs: private networks in a region, each with its own IPv4 and IPv6 address space, isolated from every other VPC. A VPC is created empty: its subnets, security groups, ACLs, route tables and internet gateway are created on their own.
Implementations§
Source§impl VpcClient
impl VpcClient
Sourcepub fn new(client: &Client) -> Self
pub fn new(client: &Client) -> Self
Returns a client of VpcService 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 list_vpcs(
&self,
request: ListVpcsRequest,
) -> Result<ListVpcsResponse, Error>
pub async fn list_vpcs( &self, request: ListVpcsRequest, ) -> Result<ListVpcsResponse, Error>
Lists the VPCs in a region, oldest first.
Sourcepub fn all_vpcs(&self, request: ListVpcsRequest) -> Pages<Vpc>
pub fn all_vpcs(&self, request: ListVpcsRequest) -> Pages<Vpc>
Returns everything list_vpcs 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_vpc(
&self,
request: CreateVpcRequest,
) -> Result<Operation<Vpc>, Error>
pub async fn create_vpc( &self, request: CreateVpcRequest, ) -> Result<Operation<Vpc>, Error>
Creates an empty VPC: no subnets, security groups, ACLs, route tables or internet gateway. It relays DNS through the project’s default DNS policy in its region until a DNS policy association names another. The operation is done once the VPC is recorded.
It answers with an operation to wait on: Operation::wait returns the Vpc once the change is done.
Sourcepub async fn update_vpc(
&self,
request: UpdateVpcRequest,
) -> Result<Operation<Vpc>, Error>
pub async fn update_vpc( &self, request: UpdateVpcRequest, ) -> Result<Operation<Vpc>, Error>
Changes a VPC’s tags. The operation is done once the change is recorded.
It answers with an operation to wait on: Operation::wait returns the Vpc once the change is done.
Sourcepub async fn delete_vpc(
&self,
request: DeleteVpcRequest,
) -> Result<Operation<Empty>, Error>
pub async fn delete_vpc( &self, request: DeleteVpcRequest, ) -> Result<Operation<Empty>, Error>
Deletes a VPC with its DNS policy association. Refused with
FAILED_PRECONDITION while the VPC has subnets, security groups,
ACLs, route tables or an internet gateway, except those the platform
created with it, which are deleted with 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.