- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
DescribeDBSecurityGroupsCommand
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.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { RDSClient, DescribeDBSecurityGroupsCommand } from "@aws-sdk/client-rds"; // ES Modules import
// const { RDSClient, DescribeDBSecurityGroupsCommand } = require("@aws-sdk/client-rds"); // CommonJS import
const client = new RDSClient(config);
const input = { // DescribeDBSecurityGroupsMessage
DBSecurityGroupName: "STRING_VALUE",
Filters: [ // FilterList
{ // Filter
Name: "STRING_VALUE", // required
Values: [ // FilterValueList // required
"STRING_VALUE",
],
},
],
MaxRecords: Number("int"),
Marker: "STRING_VALUE",
};
const command = new DescribeDBSecurityGroupsCommand(input);
const response = await client.send(command);
// { // DBSecurityGroupMessage
// Marker: "STRING_VALUE",
// DBSecurityGroups: [ // DBSecurityGroups
// { // DBSecurityGroup
// OwnerId: "STRING_VALUE",
// DBSecurityGroupName: "STRING_VALUE",
// DBSecurityGroupDescription: "STRING_VALUE",
// VpcId: "STRING_VALUE",
// EC2SecurityGroups: [ // EC2SecurityGroupList
// { // EC2SecurityGroup
// Status: "STRING_VALUE",
// EC2SecurityGroupName: "STRING_VALUE",
// EC2SecurityGroupId: "STRING_VALUE",
// EC2SecurityGroupOwnerId: "STRING_VALUE",
// },
// ],
// IPRanges: [ // IPRangeList
// { // IPRange
// Status: "STRING_VALUE",
// CIDRIP: "STRING_VALUE",
// },
// ],
// DBSecurityGroupArn: "STRING_VALUE",
// },
// ],
// };
Example Usage
DescribeDBSecurityGroupsCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
DBSecurityGroupName | string | undefined | The name of the DB security group to return details for. |
Filters | Filter[] | undefined | This parameter isn't currently supported. |
Marker | string | undefined | An optional pagination token provided by a previous |
MaxRecords | number | undefined | The maximum number of records to include in the response. If more records exist than the specified Default: 100 Constraints: Minimum 20, maximum 100. |
DescribeDBSecurityGroupsCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
DBSecurityGroups | DBSecurityGroup[] | undefined | A list of |
Marker | string | undefined | An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
DBSecurityGroupNotFoundFault | client | |
RDSServiceException | Base exception class for all service exceptions from RDS service. |