aws_sdk_ec2/client/
get_security_groups_for_vpc.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3    /// Constructs a fluent builder for the [`GetSecurityGroupsForVpc`](crate::operation::get_security_groups_for_vpc::builders::GetSecurityGroupsForVpcFluentBuilder) operation.
4    /// This operation supports pagination; See [`into_paginator()`](crate::operation::get_security_groups_for_vpc::builders::GetSecurityGroupsForVpcFluentBuilder::into_paginator).
5    ///
6    /// - The fluent builder is configurable:
7    ///   - [`vpc_id(impl Into<String>)`](crate::operation::get_security_groups_for_vpc::builders::GetSecurityGroupsForVpcFluentBuilder::vpc_id) / [`set_vpc_id(Option<String>)`](crate::operation::get_security_groups_for_vpc::builders::GetSecurityGroupsForVpcFluentBuilder::set_vpc_id):<br>required: **true**<br><p>The VPC ID where the security group can be used.</p><br>
8    ///   - [`next_token(impl Into<String>)`](crate::operation::get_security_groups_for_vpc::builders::GetSecurityGroupsForVpcFluentBuilder::next_token) / [`set_next_token(Option<String>)`](crate::operation::get_security_groups_for_vpc::builders::GetSecurityGroupsForVpcFluentBuilder::set_next_token):<br>required: **false**<br><p>The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.</p><br>
9    ///   - [`max_results(i32)`](crate::operation::get_security_groups_for_vpc::builders::GetSecurityGroupsForVpcFluentBuilder::max_results) / [`set_max_results(Option<i32>)`](crate::operation::get_security_groups_for_vpc::builders::GetSecurityGroupsForVpcFluentBuilder::set_max_results):<br>required: **false**<br><p>The maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination">Pagination</a>.</p><br>
10    ///   - [`filters(Filter)`](crate::operation::get_security_groups_for_vpc::builders::GetSecurityGroupsForVpcFluentBuilder::filters) / [`set_filters(Option<Vec::<Filter>>)`](crate::operation::get_security_groups_for_vpc::builders::GetSecurityGroupsForVpcFluentBuilder::set_filters):<br>required: **false**<br><p>The filters. If using multiple filters, the results include security groups which match all filters.</p> <ul>  <li>   <p><code>group-id</code>: The security group ID.</p></li>  <li>   <p><code>description</code>: The security group's description.</p></li>  <li>   <p><code>group-name</code>: The security group name.</p></li>  <li>   <p><code>owner-id</code>: The security group owner ID.</p></li>  <li>   <p><code>primary-vpc-id</code>: The VPC ID in which the security group was created.</p></li> </ul><br>
11    ///   - [`dry_run(bool)`](crate::operation::get_security_groups_for_vpc::builders::GetSecurityGroupsForVpcFluentBuilder::dry_run) / [`set_dry_run(Option<bool>)`](crate::operation::get_security_groups_for_vpc::builders::GetSecurityGroupsForVpcFluentBuilder::set_dry_run):<br>required: **false**<br><p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p><br>
12    /// - On success, responds with [`GetSecurityGroupsForVpcOutput`](crate::operation::get_security_groups_for_vpc::GetSecurityGroupsForVpcOutput) with field(s):
13    ///   - [`next_token(Option<String>)`](crate::operation::get_security_groups_for_vpc::GetSecurityGroupsForVpcOutput::next_token): <p>The token to include in another request to get the next page of items. This value is <code>null</code> when there are no more items to return.</p>
14    ///   - [`security_group_for_vpcs(Option<Vec::<SecurityGroupForVpc>>)`](crate::operation::get_security_groups_for_vpc::GetSecurityGroupsForVpcOutput::security_group_for_vpcs): <p>The security group that can be used by interfaces in the VPC.</p>
15    /// - On failure, responds with [`SdkError<GetSecurityGroupsForVpcError>`](crate::operation::get_security_groups_for_vpc::GetSecurityGroupsForVpcError)
16    pub fn get_security_groups_for_vpc(&self) -> crate::operation::get_security_groups_for_vpc::builders::GetSecurityGroupsForVpcFluentBuilder {
17        crate::operation::get_security_groups_for_vpc::builders::GetSecurityGroupsForVpcFluentBuilder::new(self.handle.clone())
18    }
19}