- 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.
DescribeClustersCommand
Returns properties of provisioned clusters including general cluster properties, cluster database properties, maintenance and backup properties, and security and access properties. This operation supports pagination. For more information about managing clusters, go to Amazon Redshift Clusters in the Amazon Redshift Cluster Management Guide.
If you specify both tag keys and tag values in the same request, Amazon Redshift returns all clusters that match any combination of the specified keys and values. For example, if you have owner
and environment
for tag keys, and admin
and test
for tag values, all clusters that have any combination of those values are returned.
If both tag keys and values are omitted from the request, clusters are returned regardless of whether they have tag keys or values associated with them.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { RedshiftClient, DescribeClustersCommand } from "@aws-sdk/client-redshift"; // ES Modules import
// const { RedshiftClient, DescribeClustersCommand } = require("@aws-sdk/client-redshift"); // CommonJS import
const client = new RedshiftClient(config);
const input = { // DescribeClustersMessage
ClusterIdentifier: "STRING_VALUE",
MaxRecords: Number("int"),
Marker: "STRING_VALUE",
TagKeys: [ // TagKeyList
"STRING_VALUE",
],
TagValues: [ // TagValueList
"STRING_VALUE",
],
};
const command = new DescribeClustersCommand(input);
const response = await client.send(command);
// { // ClustersMessage
// Marker: "STRING_VALUE",
// Clusters: [ // ClusterList
// { // Cluster
// ClusterIdentifier: "STRING_VALUE",
// NodeType: "STRING_VALUE",
// ClusterStatus: "STRING_VALUE",
// ClusterAvailabilityStatus: "STRING_VALUE",
// ModifyStatus: "STRING_VALUE",
// MasterUsername: "STRING_VALUE",
// DBName: "STRING_VALUE",
// Endpoint: { // Endpoint
// Address: "STRING_VALUE",
// Port: Number("int"),
// VpcEndpoints: [ // VpcEndpointsList
// { // VpcEndpoint
// VpcEndpointId: "STRING_VALUE",
// VpcId: "STRING_VALUE",
// NetworkInterfaces: [ // NetworkInterfaceList
// { // NetworkInterface
// NetworkInterfaceId: "STRING_VALUE",
// SubnetId: "STRING_VALUE",
// PrivateIpAddress: "STRING_VALUE",
// AvailabilityZone: "STRING_VALUE",
// Ipv6Address: "STRING_VALUE",
// },
// ],
// },
// ],
// },
// ClusterCreateTime: new Date("TIMESTAMP"),
// AutomatedSnapshotRetentionPeriod: Number("int"),
// ManualSnapshotRetentionPeriod: Number("int"),
// ClusterSecurityGroups: [ // ClusterSecurityGroupMembershipList
// { // ClusterSecurityGroupMembership
// ClusterSecurityGroupName: "STRING_VALUE",
// Status: "STRING_VALUE",
// },
// ],
// VpcSecurityGroups: [ // VpcSecurityGroupMembershipList
// { // VpcSecurityGroupMembership
// VpcSecurityGroupId: "STRING_VALUE",
// Status: "STRING_VALUE",
// },
// ],
// ClusterParameterGroups: [ // ClusterParameterGroupStatusList
// { // ClusterParameterGroupStatus
// ParameterGroupName: "STRING_VALUE",
// ParameterApplyStatus: "STRING_VALUE",
// ClusterParameterStatusList: [ // ClusterParameterStatusList
// { // ClusterParameterStatus
// ParameterName: "STRING_VALUE",
// ParameterApplyStatus: "STRING_VALUE",
// ParameterApplyErrorDescription: "STRING_VALUE",
// },
// ],
// },
// ],
// ClusterSubnetGroupName: "STRING_VALUE",
// VpcId: "STRING_VALUE",
// AvailabilityZone: "STRING_VALUE",
// PreferredMaintenanceWindow: "STRING_VALUE",
// PendingModifiedValues: { // PendingModifiedValues
// MasterUserPassword: "STRING_VALUE",
// NodeType: "STRING_VALUE",
// NumberOfNodes: Number("int"),
// ClusterType: "STRING_VALUE",
// ClusterVersion: "STRING_VALUE",
// AutomatedSnapshotRetentionPeriod: Number("int"),
// ClusterIdentifier: "STRING_VALUE",
// PubliclyAccessible: true || false,
// EnhancedVpcRouting: true || false,
// MaintenanceTrackName: "STRING_VALUE",
// EncryptionType: "STRING_VALUE",
// },
// ClusterVersion: "STRING_VALUE",
// AllowVersionUpgrade: true || false,
// NumberOfNodes: Number("int"),
// PubliclyAccessible: true || false,
// Encrypted: true || false,
// RestoreStatus: { // RestoreStatus
// Status: "STRING_VALUE",
// CurrentRestoreRateInMegaBytesPerSecond: Number("double"),
// SnapshotSizeInMegaBytes: Number("long"),
// ProgressInMegaBytes: Number("long"),
// ElapsedTimeInSeconds: Number("long"),
// EstimatedTimeToCompletionInSeconds: Number("long"),
// },
// DataTransferProgress: { // DataTransferProgress
// Status: "STRING_VALUE",
// CurrentRateInMegaBytesPerSecond: Number("double"),
// TotalDataInMegaBytes: Number("long"),
// DataTransferredInMegaBytes: Number("long"),
// EstimatedTimeToCompletionInSeconds: Number("long"),
// ElapsedTimeInSeconds: Number("long"),
// },
// HsmStatus: { // HsmStatus
// HsmClientCertificateIdentifier: "STRING_VALUE",
// HsmConfigurationIdentifier: "STRING_VALUE",
// Status: "STRING_VALUE",
// },
// ClusterSnapshotCopyStatus: { // ClusterSnapshotCopyStatus
// DestinationRegion: "STRING_VALUE",
// RetentionPeriod: Number("long"),
// ManualSnapshotRetentionPeriod: Number("int"),
// SnapshotCopyGrantName: "STRING_VALUE",
// },
// ClusterPublicKey: "STRING_VALUE",
// ClusterNodes: [ // ClusterNodesList
// { // ClusterNode
// NodeRole: "STRING_VALUE",
// PrivateIPAddress: "STRING_VALUE",
// PublicIPAddress: "STRING_VALUE",
// },
// ],
// ElasticIpStatus: { // ElasticIpStatus
// ElasticIp: "STRING_VALUE",
// Status: "STRING_VALUE",
// },
// ClusterRevisionNumber: "STRING_VALUE",
// Tags: [ // TagList
// { // Tag
// Key: "STRING_VALUE",
// Value: "STRING_VALUE",
// },
// ],
// KmsKeyId: "STRING_VALUE",
// EnhancedVpcRouting: true || false,
// IamRoles: [ // ClusterIamRoleList
// { // ClusterIamRole
// IamRoleArn: "STRING_VALUE",
// ApplyStatus: "STRING_VALUE",
// },
// ],
// PendingActions: [ // PendingActionsList
// "STRING_VALUE",
// ],
// MaintenanceTrackName: "STRING_VALUE",
// ElasticResizeNumberOfNodeOptions: "STRING_VALUE",
// DeferredMaintenanceWindows: [ // DeferredMaintenanceWindowsList
// { // DeferredMaintenanceWindow
// DeferMaintenanceIdentifier: "STRING_VALUE",
// DeferMaintenanceStartTime: new Date("TIMESTAMP"),
// DeferMaintenanceEndTime: new Date("TIMESTAMP"),
// },
// ],
// SnapshotScheduleIdentifier: "STRING_VALUE",
// SnapshotScheduleState: "MODIFYING" || "ACTIVE" || "FAILED",
// ExpectedNextSnapshotScheduleTime: new Date("TIMESTAMP"),
// ExpectedNextSnapshotScheduleTimeStatus: "STRING_VALUE",
// NextMaintenanceWindowStartTime: new Date("TIMESTAMP"),
// ResizeInfo: { // ResizeInfo
// ResizeType: "STRING_VALUE",
// AllowCancelResize: true || false,
// },
// AvailabilityZoneRelocationStatus: "STRING_VALUE",
// ClusterNamespaceArn: "STRING_VALUE",
// TotalStorageCapacityInMegaBytes: Number("long"),
// AquaConfiguration: { // AquaConfiguration
// AquaStatus: "enabled" || "disabled" || "applying",
// AquaConfigurationStatus: "enabled" || "disabled" || "auto",
// },
// DefaultIamRoleArn: "STRING_VALUE",
// ReservedNodeExchangeStatus: { // ReservedNodeExchangeStatus
// ReservedNodeExchangeRequestId: "STRING_VALUE",
// Status: "REQUESTED" || "PENDING" || "IN_PROGRESS" || "RETRYING" || "SUCCEEDED" || "FAILED",
// RequestTime: new Date("TIMESTAMP"),
// SourceReservedNodeId: "STRING_VALUE",
// SourceReservedNodeType: "STRING_VALUE",
// SourceReservedNodeCount: Number("int"),
// TargetReservedNodeOfferingId: "STRING_VALUE",
// TargetReservedNodeType: "STRING_VALUE",
// TargetReservedNodeCount: Number("int"),
// },
// CustomDomainName: "STRING_VALUE",
// CustomDomainCertificateArn: "STRING_VALUE",
// CustomDomainCertificateExpiryDate: new Date("TIMESTAMP"),
// MasterPasswordSecretArn: "STRING_VALUE",
// MasterPasswordSecretKmsKeyId: "STRING_VALUE",
// IpAddressType: "STRING_VALUE",
// MultiAZ: "STRING_VALUE",
// MultiAZSecondary: { // SecondaryClusterInfo
// AvailabilityZone: "STRING_VALUE",
// ClusterNodes: [
// {
// NodeRole: "STRING_VALUE",
// PrivateIPAddress: "STRING_VALUE",
// PublicIPAddress: "STRING_VALUE",
// },
// ],
// },
// },
// ],
// };
DescribeClustersCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
ClusterIdentifier | string | undefined | The unique identifier of a cluster whose properties you are requesting. This parameter is case sensitive. The default is that all clusters defined for an account are returned. |
Marker | string | undefined | An optional parameter that specifies the starting point to return a set of response records. When the results of a DescribeClusters request exceed the value specified in Constraints: You can specify either the ClusterIdentifier parameter or the Marker parameter, but not both. |
MaxRecords | number | undefined | The maximum number of response records to return in each call. If the number of remaining response records exceeds the specified Default: Constraints: minimum 20, maximum 100. |
TagKeys | string[] | undefined | A tag key or keys for which you want to return all matching clusters that are associated with the specified key or keys. For example, suppose that you have clusters that are tagged with keys called |
TagValues | string[] | undefined | A tag value or values for which you want to return all matching clusters that are associated with the specified tag value or values. For example, suppose that you have clusters that are tagged with values called |
DescribeClustersCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Clusters | Cluster[] | undefined | A list of |
Marker | string | undefined | A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned marker value in the |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
ClusterNotFoundFault | client | The |
InvalidTagFault | client | The tag is invalid. |
RedshiftServiceException | Base exception class for all service exceptions from Redshift service. |