- 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.
DescribeDBClustersCommand
Returns information about provisioned Amazon DocumentDB clusters. This API operation supports pagination. For certain management features such as cluster and instance lifecycle management, Amazon DocumentDB leverages operational technology that is shared with Amazon RDS and Amazon Neptune. Use the filterName=engine,Values=docdb
filter parameter to return only Amazon DocumentDB clusters.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { DocDBClient, DescribeDBClustersCommand } from "@aws-sdk/client-docdb"; // ES Modules import
// const { DocDBClient, DescribeDBClustersCommand } = require("@aws-sdk/client-docdb"); // CommonJS import
const client = new DocDBClient(config);
const input = { // DescribeDBClustersMessage
DBClusterIdentifier: "STRING_VALUE",
Filters: [ // FilterList
{ // Filter
Name: "STRING_VALUE", // required
Values: [ // FilterValueList // required
"STRING_VALUE",
],
},
],
MaxRecords: Number("int"),
Marker: "STRING_VALUE",
};
const command = new DescribeDBClustersCommand(input);
const response = await client.send(command);
// { // DBClusterMessage
// Marker: "STRING_VALUE",
// DBClusters: [ // DBClusterList
// { // DBCluster
// AvailabilityZones: [ // AvailabilityZones
// "STRING_VALUE",
// ],
// BackupRetentionPeriod: Number("int"),
// DBClusterIdentifier: "STRING_VALUE",
// DBClusterParameterGroup: "STRING_VALUE",
// DBSubnetGroup: "STRING_VALUE",
// Status: "STRING_VALUE",
// PercentProgress: "STRING_VALUE",
// EarliestRestorableTime: new Date("TIMESTAMP"),
// Endpoint: "STRING_VALUE",
// ReaderEndpoint: "STRING_VALUE",
// MultiAZ: true || false,
// Engine: "STRING_VALUE",
// EngineVersion: "STRING_VALUE",
// LatestRestorableTime: new Date("TIMESTAMP"),
// Port: Number("int"),
// MasterUsername: "STRING_VALUE",
// PreferredBackupWindow: "STRING_VALUE",
// PreferredMaintenanceWindow: "STRING_VALUE",
// ReplicationSourceIdentifier: "STRING_VALUE",
// ReadReplicaIdentifiers: [ // ReadReplicaIdentifierList
// "STRING_VALUE",
// ],
// DBClusterMembers: [ // DBClusterMemberList
// { // DBClusterMember
// DBInstanceIdentifier: "STRING_VALUE",
// IsClusterWriter: true || false,
// DBClusterParameterGroupStatus: "STRING_VALUE",
// PromotionTier: Number("int"),
// },
// ],
// VpcSecurityGroups: [ // VpcSecurityGroupMembershipList
// { // VpcSecurityGroupMembership
// VpcSecurityGroupId: "STRING_VALUE",
// Status: "STRING_VALUE",
// },
// ],
// HostedZoneId: "STRING_VALUE",
// StorageEncrypted: true || false,
// KmsKeyId: "STRING_VALUE",
// DbClusterResourceId: "STRING_VALUE",
// DBClusterArn: "STRING_VALUE",
// AssociatedRoles: [ // DBClusterRoles
// { // DBClusterRole
// RoleArn: "STRING_VALUE",
// Status: "STRING_VALUE",
// },
// ],
// CloneGroupId: "STRING_VALUE",
// ClusterCreateTime: new Date("TIMESTAMP"),
// EnabledCloudwatchLogsExports: [ // LogTypeList
// "STRING_VALUE",
// ],
// DeletionProtection: true || false,
// StorageType: "STRING_VALUE",
// MasterUserSecret: { // ClusterMasterUserSecret
// SecretArn: "STRING_VALUE",
// SecretStatus: "STRING_VALUE",
// KmsKeyId: "STRING_VALUE",
// },
// },
// ],
// };
DescribeDBClustersCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
DBClusterIdentifier | string | undefined | The user-provided cluster identifier. If this parameter is specified, information from only the specific cluster is returned. This parameter isn't case sensitive. Constraints:
|
Filters | Filter[] | undefined | A filter that specifies one or more clusters 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. |
DescribeDBClustersCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
DBClusters | DBCluster[] | undefined | A list of clusters. |
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 |
---|---|---|
DBClusterNotFoundFault | client | |
DocDBServiceException | Base exception class for all service exceptions from DocDB service. |