Skip to content

describe_db_security_groups async

describe_db_security_groups(
    *,
    config_overrides: Optional[AsyncRDSClientConfig] = None,
    db_security_group_name: Optional[String] = None,
    filters: Optional[FilterList] = None,
    max_records: Optional[IntegerOptional] = None,
    marker: Optional[String] = None,
) -> DBSecurityGroupMessage

Returns a list of DBSecurityGroup descriptions. If a DBSecurityGroupName is specified, the list will contain only the descriptions of the specified DB security group.

EC2-Classic was retired on August 15, 2022. If you haven't migrated from EC2-Classic to a VPC, we recommend that you migrate as soon as possible. For more information, see Migrate from EC2-Classic to a VPC in the Amazon EC2 User Guide, the blog EC2-Classic Networking is Retiring – Here’s How to Prepare, and Moving a DB instance not in a VPC into a VPC in the Amazon RDS User Guide.

Parameters:

  • db_security_group_name (Optional[String], default: None ) –

    The name of the DB security group to return details for.

  • filters (Optional[FilterList], default: None ) –

    This parameter isn't currently supported.

  • max_records (Optional[IntegerOptional], default: None ) –

    The maximum number of records to include in the response. If more records exist than the specified MaxRecords value, a pagination token called a marker is included in the response so that you can retrieve the remaining results.

    Default: 100

    Constraints: Minimum 20, maximum 100.

  • marker (Optional[String], default: None ) –

    An optional pagination token provided by a previous DescribeDBSecurityGroups request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords.

Raises:

Examples:

To list DB security group settings This example lists settings for the specified security group.

>>> await client.describe_db_security_groups(db_security_group_name='mydbsecuritygroup')
Source code in docs_src/capo_rds/_services/async_rds.py
async def describe_db_security_groups(
    self,
    *,
    config_overrides: Optional[AsyncRDSClientConfig] = None,
    db_security_group_name: Optional["capo_rds.types.string.String"] = None,
    filters: Optional["capo_rds.types.filter_list.FilterList"] = None,
    max_records: Optional["capo_rds.types.integer_optional.IntegerOptional"] = None,
    marker: Optional["capo_rds.types.string.String"] = None,
) -> "capo_rds.types.db_security_group_message.DBSecurityGroupMessage":
    """<p>Returns a list of <code>DBSecurityGroup</code> descriptions. If a <code>DBSecurityGroupName</code> is specified, the list will contain only the descriptions of the specified DB security group.</p> <note> <p>EC2-Classic was retired on August 15, 2022. If you haven't migrated from EC2-Classic to a VPC, we recommend that you migrate as soon as possible. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html">Migrate from EC2-Classic to a VPC</a> in the <i>Amazon EC2 User Guide</i>, the blog <a href="http://aws.amazon.com/blogs/aws/ec2-classic-is-retiring-heres-how-to-prepare/">EC2-Classic Networking is Retiring – Here’s How to Prepare</a>, and <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.Non-VPC2VPC.html">Moving a DB instance not in a VPC into a VPC</a> in the <i>Amazon RDS User Guide</i>.</p> </note>

    Args:
        db_security_group_name: <p>The name of the DB security group to return details for.</p>
        filters: <p>This parameter isn't currently supported.</p>
        max_records: <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a pagination token called a marker is included in the response so that you can retrieve the remaining results.</p> <p>Default: 100</p> <p>Constraints: Minimum 20, maximum 100.</p>
        marker: <p>An optional pagination token provided by a previous <code>DescribeDBSecurityGroups</code> request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>

    Raises:
        capo_rds.errors.db_security_group_not_found_fault.DBSecurityGroupNotFoundFault: <p> <code>DBSecurityGroupName</code> doesn't refer to an existing DB security group.</p>
        capo_rds.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        To list DB security group settings
        This example lists settings for the specified security group.

        >>> await client.describe_db_security_groups(db_security_group_name='mydbsecuritygroup')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_rds.types.describe_db_security_groups_message.DescribeDBSecurityGroupsMessage]",
    ) -> AsyncOperationResponse[
        "capo_rds.types.db_security_group_message.DBSecurityGroupMessage"
    ]:
        import capo_rds._operations.amazon_rd_sv19.describe_db_security_groups

        (
            output,
            http_response,
        ) = await capo_rds._operations.amazon_rd_sv19.describe_db_security_groups.async_describe_db_security_groups(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeDBSecurityGroups")
    )
    input_: capo_rds.types.describe_db_security_groups_message.DescribeDBSecurityGroupsMessage = {}
    if db_security_group_name is not None:
        input_["db_security_group_name"] = db_security_group_name
    if filters is not None:
        input_["filters"] = filters
    if max_records is not None:
        input_["max_records"] = max_records
    if marker is not None:
        input_["marker"] = marker

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output