- 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.
StopDBClusterCommand
Stops an Amazon Aurora DB cluster. When you stop a DB cluster, Aurora retains the DB cluster's metadata, including its endpoints and DB parameter groups. Aurora also retains the transaction logs so you can do a point-in-time restore if necessary.
For more information, see Stopping and Starting an Aurora Cluster in the Amazon Aurora User Guide.
This operation only applies to Aurora DB clusters.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { RDSClient, StopDBClusterCommand } from "@aws-sdk/client-rds"; // ES Modules import
// const { RDSClient, StopDBClusterCommand } = require("@aws-sdk/client-rds"); // CommonJS import
const client = new RDSClient(config);
const input = { // StopDBClusterMessage
DBClusterIdentifier: "STRING_VALUE", // required
};
const command = new StopDBClusterCommand(input);
const response = await client.send(command);
// { // StopDBClusterResult
// DBCluster: { // DBCluster
// AllocatedStorage: Number("int"),
// AvailabilityZones: [ // AvailabilityZones
// "STRING_VALUE",
// ],
// BackupRetentionPeriod: Number("int"),
// CharacterSetName: "STRING_VALUE",
// DatabaseName: "STRING_VALUE",
// DBClusterIdentifier: "STRING_VALUE",
// DBClusterParameterGroup: "STRING_VALUE",
// DBSubnetGroup: "STRING_VALUE",
// Status: "STRING_VALUE",
// AutomaticRestartTime: new Date("TIMESTAMP"),
// PercentProgress: "STRING_VALUE",
// EarliestRestorableTime: new Date("TIMESTAMP"),
// Endpoint: "STRING_VALUE",
// ReaderEndpoint: "STRING_VALUE",
// CustomEndpoints: [ // StringList
// "STRING_VALUE",
// ],
// MultiAZ: true || false,
// Engine: "STRING_VALUE",
// EngineVersion: "STRING_VALUE",
// LatestRestorableTime: new Date("TIMESTAMP"),
// Port: Number("int"),
// MasterUsername: "STRING_VALUE",
// DBClusterOptionGroupMemberships: [ // DBClusterOptionGroupMemberships
// { // DBClusterOptionGroupStatus
// DBClusterOptionGroupName: "STRING_VALUE",
// Status: "STRING_VALUE",
// },
// ],
// PreferredBackupWindow: "STRING_VALUE",
// PreferredMaintenanceWindow: "STRING_VALUE",
// ReplicationSourceIdentifier: "STRING_VALUE",
// ReadReplicaIdentifiers: [ // ReadReplicaIdentifierList
// "STRING_VALUE",
// ],
// StatusInfos: [ // DBClusterStatusInfoList
// { // DBClusterStatusInfo
// StatusType: "STRING_VALUE",
// Normal: true || false,
// Status: "STRING_VALUE",
// Message: "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",
// FeatureName: "STRING_VALUE",
// },
// ],
// IAMDatabaseAuthenticationEnabled: true || false,
// CloneGroupId: "STRING_VALUE",
// ClusterCreateTime: new Date("TIMESTAMP"),
// EarliestBacktrackTime: new Date("TIMESTAMP"),
// BacktrackWindow: Number("long"),
// BacktrackConsumedChangeRecords: Number("long"),
// EnabledCloudwatchLogsExports: [ // LogTypeList
// "STRING_VALUE",
// ],
// Capacity: Number("int"),
// EngineMode: "STRING_VALUE",
// ScalingConfigurationInfo: { // ScalingConfigurationInfo
// MinCapacity: Number("int"),
// MaxCapacity: Number("int"),
// AutoPause: true || false,
// SecondsUntilAutoPause: Number("int"),
// TimeoutAction: "STRING_VALUE",
// SecondsBeforeTimeout: Number("int"),
// },
// RdsCustomClusterConfiguration: { // RdsCustomClusterConfiguration
// InterconnectSubnetId: "STRING_VALUE",
// TransitGatewayMulticastDomainId: "STRING_VALUE",
// ReplicaMode: "open-read-only" || "mounted",
// },
// DeletionProtection: true || false,
// HttpEndpointEnabled: true || false,
// ActivityStreamMode: "sync" || "async",
// ActivityStreamStatus: "stopped" || "starting" || "started" || "stopping",
// ActivityStreamKmsKeyId: "STRING_VALUE",
// ActivityStreamKinesisStreamName: "STRING_VALUE",
// CopyTagsToSnapshot: true || false,
// CrossAccountClone: true || false,
// DomainMemberships: [ // DomainMembershipList
// { // DomainMembership
// Domain: "STRING_VALUE",
// Status: "STRING_VALUE",
// FQDN: "STRING_VALUE",
// IAMRoleName: "STRING_VALUE",
// OU: "STRING_VALUE",
// AuthSecretArn: "STRING_VALUE",
// DnsIps: [
// "STRING_VALUE",
// ],
// },
// ],
// TagList: [ // TagList
// { // Tag
// Key: "STRING_VALUE",
// Value: "STRING_VALUE",
// },
// ],
// GlobalWriteForwardingStatus: "enabled" || "disabled" || "enabling" || "disabling" || "unknown",
// GlobalWriteForwardingRequested: true || false,
// PendingModifiedValues: { // ClusterPendingModifiedValues
// PendingCloudwatchLogsExports: { // PendingCloudwatchLogsExports
// LogTypesToEnable: [
// "STRING_VALUE",
// ],
// LogTypesToDisable: [
// "STRING_VALUE",
// ],
// },
// DBClusterIdentifier: "STRING_VALUE",
// MasterUserPassword: "STRING_VALUE",
// IAMDatabaseAuthenticationEnabled: true || false,
// EngineVersion: "STRING_VALUE",
// BackupRetentionPeriod: Number("int"),
// AllocatedStorage: Number("int"),
// RdsCustomClusterConfiguration: {
// InterconnectSubnetId: "STRING_VALUE",
// TransitGatewayMulticastDomainId: "STRING_VALUE",
// ReplicaMode: "open-read-only" || "mounted",
// },
// Iops: Number("int"),
// StorageType: "STRING_VALUE",
// CertificateDetails: { // CertificateDetails
// CAIdentifier: "STRING_VALUE",
// ValidTill: new Date("TIMESTAMP"),
// },
// },
// DBClusterInstanceClass: "STRING_VALUE",
// StorageType: "STRING_VALUE",
// Iops: Number("int"),
// PubliclyAccessible: true || false,
// AutoMinorVersionUpgrade: true || false,
// MonitoringInterval: Number("int"),
// MonitoringRoleArn: "STRING_VALUE",
// DatabaseInsightsMode: "standard" || "advanced",
// PerformanceInsightsEnabled: true || false,
// PerformanceInsightsKMSKeyId: "STRING_VALUE",
// PerformanceInsightsRetentionPeriod: Number("int"),
// ServerlessV2ScalingConfiguration: { // ServerlessV2ScalingConfigurationInfo
// MinCapacity: Number("double"),
// MaxCapacity: Number("double"),
// SecondsUntilAutoPause: Number("int"),
// },
// NetworkType: "STRING_VALUE",
// DBSystemId: "STRING_VALUE",
// MasterUserSecret: { // MasterUserSecret
// SecretArn: "STRING_VALUE",
// SecretStatus: "STRING_VALUE",
// KmsKeyId: "STRING_VALUE",
// },
// IOOptimizedNextAllowedModificationTime: new Date("TIMESTAMP"),
// LocalWriteForwardingStatus: "enabled" || "disabled" || "enabling" || "disabling" || "requested",
// AwsBackupRecoveryPointArn: "STRING_VALUE",
// LimitlessDatabase: { // LimitlessDatabase
// Status: "active" || "not-in-use" || "enabled" || "disabled" || "enabling" || "disabling" || "modifying-max-capacity" || "error",
// MinRequiredACU: Number("double"),
// },
// StorageThroughput: Number("int"),
// ClusterScalabilityType: "standard" || "limitless",
// CertificateDetails: {
// CAIdentifier: "STRING_VALUE",
// ValidTill: new Date("TIMESTAMP"),
// },
// EngineLifecycleSupport: "STRING_VALUE",
// },
// };
Example Usage
StopDBClusterCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
DBClusterIdentifier Required | string | undefined | The DB cluster identifier of the Amazon Aurora DB cluster to be stopped. This parameter is stored as a lowercase string. |
StopDBClusterCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
DBCluster | DBCluster | undefined | Contains the details of an Amazon Aurora DB cluster or Multi-AZ DB cluster. For an Amazon Aurora DB cluster, this data type is used as a response element in the operations For a Multi-AZ DB cluster, this data type is used as a response element in the operations For more information on Amazon Aurora DB clusters, see What is Amazon Aurora? in the Amazon Aurora User Guide. For more information on Multi-AZ DB clusters, see Multi-AZ deployments with two readable standby DB instances in the Amazon RDS User Guide. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
DBClusterNotFoundFault | client | |
InvalidDBClusterStateFault | client | The requested operation can't be performed while the cluster is in this state. |
InvalidDBInstanceStateFault | client | The DB instance isn't in a valid state. |
RDSServiceException | Base exception class for all service exceptions from RDS service. |