- 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.
DescribeDBInstancesCommand
Returns information about provisioned Amazon DocumentDB instances. This API supports pagination.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { DocDBClient, DescribeDBInstancesCommand } from "@aws-sdk/client-docdb"; // ES Modules import
// const { DocDBClient, DescribeDBInstancesCommand } = require("@aws-sdk/client-docdb"); // CommonJS import
const client = new DocDBClient(config);
const input = { // DescribeDBInstancesMessage
DBInstanceIdentifier: "STRING_VALUE",
Filters: [ // FilterList
{ // Filter
Name: "STRING_VALUE", // required
Values: [ // FilterValueList // required
"STRING_VALUE",
],
},
],
MaxRecords: Number("int"),
Marker: "STRING_VALUE",
};
const command = new DescribeDBInstancesCommand(input);
const response = await client.send(command);
// { // DBInstanceMessage
// Marker: "STRING_VALUE",
// DBInstances: [ // DBInstanceList
// { // DBInstance
// DBInstanceIdentifier: "STRING_VALUE",
// DBInstanceClass: "STRING_VALUE",
// Engine: "STRING_VALUE",
// DBInstanceStatus: "STRING_VALUE",
// Endpoint: { // Endpoint
// Address: "STRING_VALUE",
// Port: Number("int"),
// HostedZoneId: "STRING_VALUE",
// },
// InstanceCreateTime: new Date("TIMESTAMP"),
// PreferredBackupWindow: "STRING_VALUE",
// BackupRetentionPeriod: Number("int"),
// VpcSecurityGroups: [ // VpcSecurityGroupMembershipList
// { // VpcSecurityGroupMembership
// VpcSecurityGroupId: "STRING_VALUE",
// Status: "STRING_VALUE",
// },
// ],
// AvailabilityZone: "STRING_VALUE",
// DBSubnetGroup: { // DBSubnetGroup
// DBSubnetGroupName: "STRING_VALUE",
// DBSubnetGroupDescription: "STRING_VALUE",
// VpcId: "STRING_VALUE",
// SubnetGroupStatus: "STRING_VALUE",
// Subnets: [ // SubnetList
// { // Subnet
// SubnetIdentifier: "STRING_VALUE",
// SubnetAvailabilityZone: { // AvailabilityZone
// Name: "STRING_VALUE",
// },
// SubnetStatus: "STRING_VALUE",
// },
// ],
// DBSubnetGroupArn: "STRING_VALUE",
// },
// PreferredMaintenanceWindow: "STRING_VALUE",
// PendingModifiedValues: { // PendingModifiedValues
// DBInstanceClass: "STRING_VALUE",
// AllocatedStorage: Number("int"),
// MasterUserPassword: "STRING_VALUE",
// Port: Number("int"),
// BackupRetentionPeriod: Number("int"),
// MultiAZ: true || false,
// EngineVersion: "STRING_VALUE",
// LicenseModel: "STRING_VALUE",
// Iops: Number("int"),
// DBInstanceIdentifier: "STRING_VALUE",
// StorageType: "STRING_VALUE",
// CACertificateIdentifier: "STRING_VALUE",
// DBSubnetGroupName: "STRING_VALUE",
// PendingCloudwatchLogsExports: { // PendingCloudwatchLogsExports
// LogTypesToEnable: [ // LogTypeList
// "STRING_VALUE",
// ],
// LogTypesToDisable: [
// "STRING_VALUE",
// ],
// },
// },
// LatestRestorableTime: new Date("TIMESTAMP"),
// EngineVersion: "STRING_VALUE",
// AutoMinorVersionUpgrade: true || false,
// PubliclyAccessible: true || false,
// StatusInfos: [ // DBInstanceStatusInfoList
// { // DBInstanceStatusInfo
// StatusType: "STRING_VALUE",
// Normal: true || false,
// Status: "STRING_VALUE",
// Message: "STRING_VALUE",
// },
// ],
// DBClusterIdentifier: "STRING_VALUE",
// StorageEncrypted: true || false,
// KmsKeyId: "STRING_VALUE",
// DbiResourceId: "STRING_VALUE",
// CACertificateIdentifier: "STRING_VALUE",
// CopyTagsToSnapshot: true || false,
// PromotionTier: Number("int"),
// DBInstanceArn: "STRING_VALUE",
// EnabledCloudwatchLogsExports: [
// "STRING_VALUE",
// ],
// CertificateDetails: { // CertificateDetails
// CAIdentifier: "STRING_VALUE",
// ValidTill: new Date("TIMESTAMP"),
// },
// PerformanceInsightsEnabled: true || false,
// PerformanceInsightsKMSKeyId: "STRING_VALUE",
// },
// ],
// };
DescribeDBInstancesCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
DBInstanceIdentifier | string | undefined | The user-provided instance identifier. If this parameter is specified, information from only the specific instance is returned. This parameter isn't case sensitive. Constraints:
|
Filters | Filter[] | undefined | A filter that specifies one or more instances to describe. Supported filters:
|
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 |
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. |
DescribeDBInstancesCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
DBInstances | DBInstance[] | undefined | Detailed information about one or more instances. |
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 |
---|---|---|
DBInstanceNotFoundFault | client | |
DocDBServiceException | Base exception class for all service exceptions from DocDB service. |