pub struct AclRuleClient { /* private fields */ }Expand description
Calls AclRuleService.
ACL rules: what an ACL accepts or drops, each rule in its place in one
direction. A rule is immutable: it is created and deleted, never changed,
so to change one, delete it and create its replacement. A direction
holds one rule per priority, so a replacement at the same priority can
only be created once the old rule is deleted: between the two, neither
rule applies. A replacement at a free priority can be created first.
Implementations§
Source§impl AclRuleClient
impl AclRuleClient
Sourcepub fn new(client: &Client) -> Self
pub fn new(client: &Client) -> Self
Returns a client of AclRuleService 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_acl_rule(
&self,
request: GetAclRuleRequest,
) -> Result<AclRule, Error>
pub async fn get_acl_rule( &self, request: GetAclRuleRequest, ) -> Result<AclRule, Error>
Returns an ACL rule.
Sourcepub async fn list_acl_rules(
&self,
request: ListAclRulesRequest,
) -> Result<ListAclRulesResponse, Error>
pub async fn list_acl_rules( &self, request: ListAclRulesRequest, ) -> Result<ListAclRulesResponse, Error>
Lists an ACL’s rules of both directions, oldest first.
Sourcepub fn all_acl_rules(&self, request: ListAclRulesRequest) -> Pages<AclRule>
pub fn all_acl_rules(&self, request: ListAclRulesRequest) -> Pages<AclRule>
Returns everything list_acl_rules 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_acl_rule(
&self,
request: CreateAclRuleRequest,
) -> Result<Operation<AclRule>, Error>
pub async fn create_acl_rule( &self, request: CreateAclRuleRequest, ) -> Result<Operation<AclRule>, Error>
Adds a rule to an ACL. Refused with FAILED_PRECONDITION when a rule
of the same direction has the same priority. An ACL holds at most 40
rules by default, both directions together, as the quota sets. 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 AclRule once the change is done.
Sourcepub async fn delete_acl_rule(
&self,
request: DeleteAclRuleRequest,
) -> Result<Operation<Empty>, Error>
pub async fn delete_acl_rule( &self, request: DeleteAclRuleRequest, ) -> Result<Operation<Empty>, Error>
Removes a rule from its ACL. 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.