DocDB class

Amazon DocumentDB is a fast, reliable, and fully managed database service. Amazon DocumentDB makes it easy to set up, operate, and scale MongoDB-compatible databases in the cloud. With Amazon DocumentDB, you can run the same application code and use the same drivers and tools that you use with MongoDB.

Constructors

DocDB({required String region, AwsClientCredentials? credentials, AwsClientCredentialsProvider? credentialsProvider, Client? client, String? endpointUrl})

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addSourceIdentifierToSubscription({required String sourceIdentifier, required String subscriptionName}) Future<AddSourceIdentifierToSubscriptionResult>
Adds a source identifier to an existing event notification subscription.
addTagsToResource({required String resourceName, required List<Tag> tags}) Future<void>
Adds metadata tags to an Amazon DocumentDB resource. You can use these tags with cost allocation reporting to track costs that are associated with Amazon DocumentDB resources or in a Condition statement in an Identity and Access Management (IAM) policy for Amazon DocumentDB.
applyPendingMaintenanceAction({required String applyAction, required String optInType, required String resourceIdentifier}) Future<ApplyPendingMaintenanceActionResult>
Applies a pending maintenance action to a resource (for example, to an Amazon DocumentDB instance).
close() → void
Closes the internal HTTP client if none was provided at creation. If a client was passed as a constructor argument, this becomes a noop.
copyDBClusterParameterGroup({required String sourceDBClusterParameterGroupIdentifier, required String targetDBClusterParameterGroupDescription, required String targetDBClusterParameterGroupIdentifier, List<Tag>? tags}) Future<CopyDBClusterParameterGroupResult>
Copies the specified cluster parameter group.
copyDBClusterSnapshot({required String sourceDBClusterSnapshotIdentifier, required String targetDBClusterSnapshotIdentifier, bool? copyTags, String? kmsKeyId, String? preSignedUrl, List<Tag>? tags}) Future<CopyDBClusterSnapshotResult>
Copies a snapshot of a cluster.
createDBCluster({required String dBClusterIdentifier, required String engine, List<String>? availabilityZones, int? backupRetentionPeriod, String? dBClusterParameterGroupName, String? dBSubnetGroupName, bool? deletionProtection, List<String>? enableCloudwatchLogsExports, String? engineVersion, String? globalClusterIdentifier, String? kmsKeyId, bool? manageMasterUserPassword, String? masterUserPassword, String? masterUserSecretKmsKeyId, String? masterUsername, String? networkType, int? port, String? preSignedUrl, String? preferredBackupWindow, String? preferredMaintenanceWindow, ServerlessV2ScalingConfiguration? serverlessV2ScalingConfiguration, bool? storageEncrypted, String? storageType, List<Tag>? tags, List<String>? vpcSecurityGroupIds}) Future<CreateDBClusterResult>
Creates a new Amazon DocumentDB cluster.
createDBClusterParameterGroup({required String dBClusterParameterGroupName, required String dBParameterGroupFamily, required String description, List<Tag>? tags}) Future<CreateDBClusterParameterGroupResult>
Creates a new cluster parameter group.
createDBClusterSnapshot({required String dBClusterIdentifier, required String dBClusterSnapshotIdentifier, List<Tag>? tags}) Future<CreateDBClusterSnapshotResult>
Creates a snapshot of a cluster.
createDBInstance({required String dBClusterIdentifier, required String dBInstanceClass, required String dBInstanceIdentifier, required String engine, bool? autoMinorVersionUpgrade, String? availabilityZone, String? cACertificateIdentifier, bool? copyTagsToSnapshot, bool? enablePerformanceInsights, String? performanceInsightsKMSKeyId, String? preferredMaintenanceWindow, int? promotionTier, List<Tag>? tags}) Future<CreateDBInstanceResult>
Creates a new instance.
createDBSubnetGroup({required String dBSubnetGroupDescription, required String dBSubnetGroupName, required List<String> subnetIds, List<Tag>? tags}) Future<CreateDBSubnetGroupResult>
Creates a new subnet group. subnet groups must contain at least one subnet in at least two Availability Zones in the Amazon Web Services Region.
createEventSubscription({required String snsTopicArn, required String subscriptionName, bool? enabled, List<String>? eventCategories, List<String>? sourceIds, String? sourceType, List<Tag>? tags}) Future<CreateEventSubscriptionResult>
Creates an Amazon DocumentDB event notification subscription. This action requires a topic Amazon Resource Name (ARN) created by using the Amazon DocumentDB console, the Amazon SNS console, or the Amazon SNS API. To obtain an ARN with Amazon SNS, you must create a topic in Amazon SNS and subscribe to the topic. The ARN is displayed in the Amazon SNS console.
createGlobalCluster({required String globalClusterIdentifier, String? databaseName, bool? deletionProtection, String? engine, String? engineVersion, String? sourceDBClusterIdentifier, bool? storageEncrypted}) Future<CreateGlobalClusterResult>
Creates an Amazon DocumentDB global cluster that can span multiple multiple Amazon Web Services Regions. The global cluster contains one primary cluster with read-write capability, and up-to 10 read-only secondary clusters. Global clusters uses storage-based fast replication across regions with latencies less than one second, using dedicated infrastructure with no impact to your workload’s performance.
deleteDBCluster({required String dBClusterIdentifier, String? finalDBSnapshotIdentifier, bool? skipFinalSnapshot}) Future<DeleteDBClusterResult>
Deletes a previously provisioned cluster. When you delete a cluster, all automated backups for that cluster are deleted and can't be recovered. Manual DB cluster snapshots of the specified cluster are not deleted.
deleteDBClusterParameterGroup({required String dBClusterParameterGroupName}) Future<void>
Deletes a specified cluster parameter group. The cluster parameter group to be deleted can't be associated with any clusters.
deleteDBClusterSnapshot({required String dBClusterSnapshotIdentifier}) Future<DeleteDBClusterSnapshotResult>
Deletes a cluster snapshot. If the snapshot is being copied, the copy operation is terminated.
deleteDBInstance({required String dBInstanceIdentifier}) Future<DeleteDBInstanceResult>
Deletes a previously provisioned instance.
deleteDBSubnetGroup({required String dBSubnetGroupName}) Future<void>
Deletes a subnet group.
deleteEventSubscription({required String subscriptionName}) Future<DeleteEventSubscriptionResult>
Deletes an Amazon DocumentDB event notification subscription.
deleteGlobalCluster({required String globalClusterIdentifier}) Future<DeleteGlobalClusterResult>
Deletes a global cluster. The primary and secondary clusters must already be detached or deleted before attempting to delete a global cluster.
describeCertificates({String? certificateIdentifier, List<Filter>? filters, String? marker, int? maxRecords}) Future<CertificateMessage>
Returns a list of certificate authority (CA) certificates provided by Amazon DocumentDB for this Amazon Web Services account.
describeDBClusterParameterGroups({String? dBClusterParameterGroupName, List<Filter>? filters, String? marker, int? maxRecords}) Future<DBClusterParameterGroupsMessage>
Returns a list of DBClusterParameterGroup descriptions. If a DBClusterParameterGroupName parameter is specified, the list contains only the description of the specified cluster parameter group.
describeDBClusterParameters({required String dBClusterParameterGroupName, List<Filter>? filters, String? marker, int? maxRecords, String? source}) Future<DBClusterParameterGroupDetails>
Returns the detailed parameter list for a particular cluster parameter group.
describeDBClusters({String? dBClusterIdentifier, List<Filter>? filters, String? marker, int? maxRecords}) Future<DBClusterMessage>
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.
describeDBClusterSnapshotAttributes({required String dBClusterSnapshotIdentifier}) Future<DescribeDBClusterSnapshotAttributesResult>
Returns a list of cluster snapshot attribute names and values for a manual DB cluster snapshot.
describeDBClusterSnapshots({String? dBClusterIdentifier, String? dBClusterSnapshotIdentifier, List<Filter>? filters, bool? includePublic, bool? includeShared, String? marker, int? maxRecords, String? snapshotType}) Future<DBClusterSnapshotMessage>
Returns information about cluster snapshots. This API operation supports pagination.
describeDBEngineVersions({String? dBParameterGroupFamily, bool? defaultOnly, String? engine, String? engineVersion, List<Filter>? filters, bool? listSupportedCharacterSets, bool? listSupportedTimezones, String? marker, int? maxRecords}) Future<DBEngineVersionMessage>
Returns a list of the available engines.
describeDBInstances({String? dBInstanceIdentifier, List<Filter>? filters, String? marker, int? maxRecords}) Future<DBInstanceMessage>
Returns information about provisioned Amazon DocumentDB instances. This API supports pagination.
describeDBSubnetGroups({String? dBSubnetGroupName, List<Filter>? filters, String? marker, int? maxRecords}) Future<DBSubnetGroupMessage>
Returns a list of DBSubnetGroup descriptions. If a DBSubnetGroupName is specified, the list will contain only the descriptions of the specified DBSubnetGroup.
describeEngineDefaultClusterParameters({required String dBParameterGroupFamily, List<Filter>? filters, String? marker, int? maxRecords}) Future<DescribeEngineDefaultClusterParametersResult>
Returns the default engine and system parameter information for the cluster database engine.
describeEventCategories({List<Filter>? filters, String? sourceType}) Future<EventCategoriesMessage>
Displays a list of categories for all event source types, or, if specified, for a specified source type.
describeEvents({int? duration, DateTime? endTime, List<String>? eventCategories, List<Filter>? filters, String? marker, int? maxRecords, String? sourceIdentifier, SourceType? sourceType, DateTime? startTime}) Future<EventsMessage>
Returns events related to instances, security groups, snapshots, and DB parameter groups for the past 14 days. You can obtain events specific to a particular DB instance, security group, snapshot, or parameter group by providing the name as a parameter. By default, the events of the past hour are returned.
describeEventSubscriptions({List<Filter>? filters, String? marker, int? maxRecords, String? subscriptionName}) Future<EventSubscriptionsMessage>
Lists all the subscription descriptions for a customer account. The description for a subscription includes SubscriptionName, SNSTopicARN, CustomerID, SourceType, SourceID, CreationTime, and Status.
describeGlobalClusters({List<Filter>? filters, String? globalClusterIdentifier, String? marker, int? maxRecords}) Future<GlobalClustersMessage>
Returns information about Amazon DocumentDB global clusters. This API supports pagination.
describeOrderableDBInstanceOptions({required String engine, String? dBInstanceClass, String? engineVersion, List<Filter>? filters, String? licenseModel, String? marker, int? maxRecords, bool? vpc}) Future<OrderableDBInstanceOptionsMessage>
Returns a list of orderable instance options for the specified engine.
describePendingMaintenanceActions({List<Filter>? filters, String? marker, int? maxRecords, String? resourceIdentifier}) Future<PendingMaintenanceActionsMessage>
Returns a list of resources (for example, instances) that have at least one pending maintenance action.
failoverDBCluster({String? dBClusterIdentifier, String? targetDBInstanceIdentifier}) Future<FailoverDBClusterResult>
Forces a failover for a cluster.
failoverGlobalCluster({required String globalClusterIdentifier, required String targetDbClusterIdentifier, bool? allowDataLoss, bool? switchover}) Future<FailoverGlobalClusterResult>
Promotes the specified secondary DB cluster to be the primary DB cluster in the global cluster when failing over a global cluster occurs.
listTagsForResource({required String resourceName, List<Filter>? filters}) Future<TagListMessage>
Lists all tags on an Amazon DocumentDB resource.
modifyDBCluster({required String dBClusterIdentifier, bool? allowMajorVersionUpgrade, bool? applyImmediately, int? backupRetentionPeriod, CloudwatchLogsExportConfiguration? cloudwatchLogsExportConfiguration, String? dBClusterParameterGroupName, bool? deletionProtection, String? engineVersion, bool? manageMasterUserPassword, String? masterUserPassword, String? masterUserSecretKmsKeyId, String? networkType, String? newDBClusterIdentifier, int? port, String? preferredBackupWindow, String? preferredMaintenanceWindow, bool? rotateMasterUserPassword, ServerlessV2ScalingConfiguration? serverlessV2ScalingConfiguration, String? storageType, List<String>? vpcSecurityGroupIds}) Future<ModifyDBClusterResult>
Modifies a setting for an Amazon DocumentDB cluster. You can change one or more database configuration parameters by specifying these parameters and the new values in the request.
modifyDBClusterParameterGroup({required String dBClusterParameterGroupName, required List<Parameter> parameters}) Future<DBClusterParameterGroupNameMessage>
Modifies the parameters of a cluster parameter group. To modify more than one parameter, submit a list of the following: ParameterName, ParameterValue, and ApplyMethod. A maximum of 20 parameters can be modified in a single request.
modifyDBClusterSnapshotAttribute({required String attributeName, required String dBClusterSnapshotIdentifier, List<String>? valuesToAdd, List<String>? valuesToRemove}) Future<ModifyDBClusterSnapshotAttributeResult>
Adds an attribute and values to, or removes an attribute and values from, a manual cluster snapshot.
modifyDBInstance({required String dBInstanceIdentifier, bool? applyImmediately, bool? autoMinorVersionUpgrade, String? cACertificateIdentifier, bool? certificateRotationRestart, bool? copyTagsToSnapshot, String? dBInstanceClass, bool? enablePerformanceInsights, String? newDBInstanceIdentifier, String? performanceInsightsKMSKeyId, String? preferredMaintenanceWindow, int? promotionTier}) Future<ModifyDBInstanceResult>
Modifies settings for an instance. You can change one or more database configuration parameters by specifying these parameters and the new values in the request.
modifyDBSubnetGroup({required String dBSubnetGroupName, required List<String> subnetIds, String? dBSubnetGroupDescription}) Future<ModifyDBSubnetGroupResult>
Modifies an existing subnet group. subnet groups must contain at least one subnet in at least two Availability Zones in the Amazon Web Services Region.
modifyEventSubscription({required String subscriptionName, bool? enabled, List<String>? eventCategories, String? snsTopicArn, String? sourceType}) Future<ModifyEventSubscriptionResult>
Modifies an existing Amazon DocumentDB event notification subscription.
modifyGlobalCluster({required String globalClusterIdentifier, bool? deletionProtection, String? newGlobalClusterIdentifier}) Future<ModifyGlobalClusterResult>
Modify a setting for an Amazon DocumentDB global cluster. You can change one or more configuration parameters (for example: deletion protection), or the global cluster identifier by specifying these parameters and the new values in the request.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
rebootDBInstance({required String dBInstanceIdentifier, bool? forceFailover}) Future<RebootDBInstanceResult>
You might need to reboot your instance, usually for maintenance reasons. For example, if you make certain changes, or if you change the cluster parameter group that is associated with the instance, you must reboot the instance for the changes to take effect.
removeFromGlobalCluster({required String dbClusterIdentifier, required String globalClusterIdentifier}) Future<RemoveFromGlobalClusterResult>
Detaches an Amazon DocumentDB secondary cluster from a global cluster. The cluster becomes a standalone cluster with read-write capability instead of being read-only and receiving data from a primary in a different region.
removeSourceIdentifierFromSubscription({required String sourceIdentifier, required String subscriptionName}) Future<RemoveSourceIdentifierFromSubscriptionResult>
Removes a source identifier from an existing Amazon DocumentDB event notification subscription.
removeTagsFromResource({required String resourceName, required List<String> tagKeys}) Future<void>
Removes metadata tags from an Amazon DocumentDB resource.
resetDBClusterParameterGroup({required String dBClusterParameterGroupName, List<Parameter>? parameters, bool? resetAllParameters}) Future<DBClusterParameterGroupNameMessage>
Modifies the parameters of a cluster parameter group to the default value. To reset specific parameters, submit a list of the following: ParameterName and ApplyMethod. To reset the entire cluster parameter group, specify the DBClusterParameterGroupName and ResetAllParameters parameters.
restoreDBClusterFromSnapshot({required String dBClusterIdentifier, required String engine, required String snapshotIdentifier, List<String>? availabilityZones, String? dBClusterParameterGroupName, String? dBSubnetGroupName, bool? deletionProtection, List<String>? enableCloudwatchLogsExports, String? engineVersion, String? kmsKeyId, String? networkType, int? port, ServerlessV2ScalingConfiguration? serverlessV2ScalingConfiguration, String? storageType, List<Tag>? tags, List<String>? vpcSecurityGroupIds}) Future<RestoreDBClusterFromSnapshotResult>
Creates a new cluster from a snapshot or cluster snapshot.
restoreDBClusterToPointInTime({required String dBClusterIdentifier, required String sourceDBClusterIdentifier, String? dBSubnetGroupName, bool? deletionProtection, List<String>? enableCloudwatchLogsExports, String? kmsKeyId, String? networkType, int? port, DateTime? restoreToTime, String? restoreType, ServerlessV2ScalingConfiguration? serverlessV2ScalingConfiguration, String? storageType, List<Tag>? tags, bool? useLatestRestorableTime, List<String>? vpcSecurityGroupIds}) Future<RestoreDBClusterToPointInTimeResult>
Restores a cluster to an arbitrary point in time. Users can restore to any point in time before LatestRestorableTime for up to BackupRetentionPeriod days. The target cluster is created from the source cluster with the same configuration as the original cluster, except that the new cluster is created with the default security group.
startDBCluster({required String dBClusterIdentifier}) Future<StartDBClusterResult>
Restarts the stopped cluster that is specified by DBClusterIdentifier. For more information, see Stopping and Starting an Amazon DocumentDB Cluster.
stopDBCluster({required String dBClusterIdentifier}) Future<StopDBClusterResult>
Stops the running cluster that is specified by DBClusterIdentifier. The cluster must be in the available state. For more information, see Stopping and Starting an Amazon DocumentDB Cluster.
switchoverGlobalCluster({required String globalClusterIdentifier, required String targetDbClusterIdentifier}) Future<SwitchoverGlobalClusterResult>
Switches over the specified secondary Amazon DocumentDB cluster to be the new primary Amazon DocumentDB cluster in the global database cluster.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited