pub struct SecurityGroupRuleClient { /* private fields */ }Expand description
Calls SecurityGroupRuleService.
Security group rules: the traffic a security group allows, each rule to or from one peer. Rules only allow, so their order doesn’t matter. A rule is immutable: it is created and deleted, never changed, so to change one, delete it and create its replacement. Creating the replacement first leaves no window in which neither rule allows the traffic.
Implementations§
Source§impl SecurityGroupRuleClient
impl SecurityGroupRuleClient
Sourcepub fn new(client: &Client) -> Self
pub fn new(client: &Client) -> Self
Returns a client of SecurityGroupRuleService 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_security_group_rule(
&self,
request: GetSecurityGroupRuleRequest,
) -> Result<SecurityGroupRule, Error>
pub async fn get_security_group_rule( &self, request: GetSecurityGroupRuleRequest, ) -> Result<SecurityGroupRule, Error>
Returns a security group rule.
Sourcepub async fn list_security_group_rules(
&self,
request: ListSecurityGroupRulesRequest,
) -> Result<ListSecurityGroupRulesResponse, Error>
pub async fn list_security_group_rules( &self, request: ListSecurityGroupRulesRequest, ) -> Result<ListSecurityGroupRulesResponse, Error>
Lists a security group’s rules of both directions, oldest first.
Sourcepub fn all_security_group_rules(
&self,
request: ListSecurityGroupRulesRequest,
) -> Pages<SecurityGroupRule>
pub fn all_security_group_rules( &self, request: ListSecurityGroupRulesRequest, ) -> Pages<SecurityGroupRule>
Returns everything list_security_group_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_security_group_rule(
&self,
request: CreateSecurityGroupRuleRequest,
) -> Result<Operation<SecurityGroupRule>, Error>
pub async fn create_security_group_rule( &self, request: CreateSecurityGroupRuleRequest, ) -> Result<Operation<SecurityGroupRule>, Error>
Adds a rule to a security group. A rule identical to one the group
has in every field, description included, is refused with
FAILED_PRECONDITION. A group holds at most 120 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 SecurityGroupRule once the change is done.
Sourcepub async fn delete_security_group_rule(
&self,
request: DeleteSecurityGroupRuleRequest,
) -> Result<Operation<Empty>, Error>
pub async fn delete_security_group_rule( &self, request: DeleteSecurityGroupRuleRequest, ) -> Result<Operation<Empty>, Error>
Removes a rule from its security group. 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.