pub struct Firewall { /* private fields */ }
Expand description
Implements a client for the App Engine Admin API.
§Example
let client = Firewall::builder().build().await?;
// use `client` to make requests to the App Engine Admin API.
§Service Description
Firewall resources are used to define a collection of access control rules for an Application. Each rule is defined with a position which specifies the rule’s order in the sequence of rules, an IP range to be matched against requests, and an action to take upon matching requests.
Every request is evaluated against the Firewall rules in priority order. Processesing stops at the first rule which matches the request’s IP address. A final rule always specifies an action that applies to all remaining IP addresses. The default final rule for a newly-created application will be set to “allow” if not otherwise specified by the user.
§Configuration
To configure Firewall
use the with_*
methods in the type returned
by builder(). The default configuration should
work for most applications. Common configuration changes include
- with_endpoint(): by default this client uses the global default endpoint
(
https://appengine.googleapis.com
). Applications using regional endpoints or running in restricted networks (e.g. a network configured override this default. - with_credentials(): by default this client uses Application Default Credentials. Applications using custom authentication may need to override this default.
§Pooling and Cloning
Firewall
holds a connection pool internally, it is advised to
create one and the reuse it. You do not need to wrap Firewall
in
an Rc or Arc to reuse it, because it
already uses an Arc
internally.
Implementations§
Source§impl Firewall
impl Firewall
Sourcepub fn builder() -> ClientBuilder
pub fn builder() -> ClientBuilder
Returns a builder for Firewall.
let client = Firewall::builder().build().await?;
Sourcepub fn from_stub<T>(stub: T) -> Selfwhere
T: Firewall + 'static,
pub fn from_stub<T>(stub: T) -> Selfwhere
T: Firewall + 'static,
Creates a new client from the provided stub.
The most common case for calling this function is in tests mocking the client’s behavior.
Sourcepub fn list_ingress_rules(&self) -> ListIngressRules
pub fn list_ingress_rules(&self) -> ListIngressRules
Lists the firewall rules of an application.
Sourcepub fn batch_update_ingress_rules(&self) -> BatchUpdateIngressRules
pub fn batch_update_ingress_rules(&self) -> BatchUpdateIngressRules
Replaces the entire firewall ruleset in one bulk operation. This overrides and replaces the rules of an existing firewall with the new rules.
If the final rule does not match traffic with the ‘*’ wildcard IP range, then an “allow all” rule is explicitly added to the end of the list.
Sourcepub fn create_ingress_rule(&self) -> CreateIngressRule
pub fn create_ingress_rule(&self) -> CreateIngressRule
Creates a firewall rule for the application.
Sourcepub fn get_ingress_rule(&self) -> GetIngressRule
pub fn get_ingress_rule(&self) -> GetIngressRule
Gets the specified firewall rule.
Sourcepub fn update_ingress_rule(&self) -> UpdateIngressRule
pub fn update_ingress_rule(&self) -> UpdateIngressRule
Updates the specified firewall rule.
Sourcepub fn delete_ingress_rule(&self) -> DeleteIngressRule
pub fn delete_ingress_rule(&self) -> DeleteIngressRule
Deletes the specified firewall rule.
Sourcepub fn list_operations(&self) -> ListOperations
pub fn list_operations(&self) -> ListOperations
Provides the Operations service functionality in this service.
Sourcepub fn get_operation(&self) -> GetOperation
pub fn get_operation(&self) -> GetOperation
Provides the Operations service functionality in this service.