pub struct SecurityGroupClient { /* private fields */ }Expand description
Calls SecurityGroupService.
Security groups: stateful filters on network interfaces. A group holds
rules (SecurityGroupRuleService), and applies to the interfaces that a
security group association names it for
(SecurityGroupAssociationService). An interface admits the traffic any
of its groups allows, and the replies to what it sends; everything else
is dropped.
Implementations§
Source§impl SecurityGroupClient
impl SecurityGroupClient
Sourcepub fn new(client: &Client) -> Self
pub fn new(client: &Client) -> Self
Returns a client of SecurityGroupService 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(
&self,
request: GetSecurityGroupRequest,
) -> Result<SecurityGroup, Error>
pub async fn get_security_group( &self, request: GetSecurityGroupRequest, ) -> Result<SecurityGroup, Error>
Returns a security group.
Sourcepub async fn list_security_groups(
&self,
request: ListSecurityGroupsRequest,
) -> Result<ListSecurityGroupsResponse, Error>
pub async fn list_security_groups( &self, request: ListSecurityGroupsRequest, ) -> Result<ListSecurityGroupsResponse, Error>
Lists the security groups in a region, oldest first.
Sourcepub fn all_security_groups(
&self,
request: ListSecurityGroupsRequest,
) -> Pages<SecurityGroup>
pub fn all_security_groups( &self, request: ListSecurityGroupsRequest, ) -> Pages<SecurityGroup>
Returns everything list_security_groups 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(
&self,
request: CreateSecurityGroupRequest,
) -> Result<Operation<SecurityGroup>, Error>
pub async fn create_security_group( &self, request: CreateSecurityGroupRequest, ) -> Result<Operation<SecurityGroup>, Error>
Creates a security group in a VPC, with no rules: it allows nothing until rules are added. The operation is done once the security group is recorded.
It answers with an operation to wait on: Operation::wait returns the SecurityGroup once the change is done.
Sourcepub async fn update_security_group(
&self,
request: UpdateSecurityGroupRequest,
) -> Result<Operation<SecurityGroup>, Error>
pub async fn update_security_group( &self, request: UpdateSecurityGroupRequest, ) -> Result<Operation<SecurityGroup>, Error>
Changes a security group’s tags. The operation is done once the change is recorded.
It answers with an operation to wait on: Operation::wait returns the SecurityGroup once the change is done.
Sourcepub async fn delete_security_group(
&self,
request: DeleteSecurityGroupRequest,
) -> Result<Operation<Empty>, Error>
pub async fn delete_security_group( &self, request: DeleteSecurityGroupRequest, ) -> Result<Operation<Empty>, Error>
Deletes a security group with its rules. Refused for a group the platform created with its VPC, which goes with the VPC, and while a security group association names 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.