DocDB

public struct DocDB

Client object for interacting with AWS DocDB service.

Amazon DocumentDB API documentation

  • Initialize the DocDB client

    Declaration

    Swift

    public init(accessKeyId: String? = nil, secretAccessKey: String? = nil, sessionToken: String? = nil, region: AWSSDKSwiftCore.Region? = nil, endpoint: String? = nil, middlewares: [AWSServiceMiddleware] = [], eventLoopGroupProvider: AWSClient.EventLoopGroupProvider = .useAWSClientShared)

    Parameters

    accessKeyId

    Public access key provided by AWS

    secretAccessKey

    Private access key provided by AWS

    sessionToken

    Token provided by STS.AssumeRole() which allows access to another AWS account

    region

    Region of server you want to communicate with

    endpoint

    Custom endpoint URL to use instead of standard AWS servers

    middlewares

    Array of middlewares to apply to requests and responses

    eventLoopGroupProvider

    EventLoopGroup to use. Use useAWSClientShared if the client shall manage its own EventLoopGroup.

  • 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 AWS Identity and Access Management (IAM) policy for Amazon DocumentDB.

    Declaration

    Swift

    @discardableResult
    public func addTagsToResource(_ input: AddTagsToResourceMessage) -> EventLoopFuture<Void>
  • Applies a pending maintenance action to a resource (for example, to a DB instance).

    Declaration

    Swift

    public func applyPendingMaintenanceAction(_ input: ApplyPendingMaintenanceActionMessage) -> EventLoopFuture<ApplyPendingMaintenanceActionResult>
  • Copies the specified cluster parameter group.

    Declaration

    Swift

    public func copyDBClusterParameterGroup(_ input: CopyDBClusterParameterGroupMessage) -> EventLoopFuture<CopyDBClusterParameterGroupResult>
  • Copies a snapshot of a cluster. To copy a cluster snapshot from a shared manual cluster snapshot, SourceDBClusterSnapshotIdentifier must be the Amazon Resource Name (ARN) of the shared cluster snapshot. To cancel the copy operation after it is in progress, delete the target cluster snapshot identified by TargetDBClusterSnapshotIdentifier while that DB cluster snapshot is in the copying status.

    Declaration

    Swift

    public func copyDBClusterSnapshot(_ input: CopyDBClusterSnapshotMessage) -> EventLoopFuture<CopyDBClusterSnapshotResult>
  • Creates a new Amazon DocumentDB cluster.

    Declaration

    Swift

    public func createDBCluster(_ input: CreateDBClusterMessage) -> EventLoopFuture<CreateDBClusterResult>
  • Creates a new cluster parameter group. Parameters in a cluster parameter group apply to all of the instances in a DB cluster. A cluster parameter group is initially created with the default parameters for the database engine used by instances in the cluster. To provide custom values for any of the parameters, you must modify the group after you create it. After you create a DB cluster parameter group, you must associate it with your cluster. For the new DB cluster parameter group and associated settings to take effect, you must then reboot the instances in the cluster without failover. After you create a cluster parameter group, you should wait at least 5 minutes before creating your first cluster that uses that cluster parameter group as the default parameter group. This allows Amazon DocumentDB to fully complete the create action before the cluster parameter group is used as the default for a new cluster. This step is especially important for parameters that are critical when creating the default database for a cluster, such as the character set for the default database defined by the character_set_database parameter.

    Declaration

    Swift

    public func createDBClusterParameterGroup(_ input: CreateDBClusterParameterGroupMessage) -> EventLoopFuture<CreateDBClusterParameterGroupResult>
  • Creates a snapshot of a cluster.

    Declaration

    Swift

    public func createDBClusterSnapshot(_ input: CreateDBClusterSnapshotMessage) -> EventLoopFuture<CreateDBClusterSnapshotResult>
  • Creates a new instance.

    Declaration

    Swift

    public func createDBInstance(_ input: CreateDBInstanceMessage) -> EventLoopFuture<CreateDBInstanceResult>
  • Creates a new subnet group. subnet groups must contain at least one subnet in at least two Availability Zones in the AWS Region.

    Declaration

    Swift

    public func createDBSubnetGroup(_ input: CreateDBSubnetGroupMessage) -> EventLoopFuture<CreateDBSubnetGroupResult>
  • 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.

    Declaration

    Swift

    public func deleteDBCluster(_ input: DeleteDBClusterMessage) -> EventLoopFuture<DeleteDBClusterResult>
  • Deletes a specified cluster parameter group. The cluster parameter group to be deleted can’t be associated with any clusters.

    Declaration

    Swift

    @discardableResult
    public func deleteDBClusterParameterGroup(_ input: DeleteDBClusterParameterGroupMessage) -> EventLoopFuture<Void>
  • Deletes a cluster snapshot. If the snapshot is being copied, the copy operation is terminated. The cluster snapshot must be in the available state to be deleted.

    Declaration

    Swift

    public func deleteDBClusterSnapshot(_ input: DeleteDBClusterSnapshotMessage) -> EventLoopFuture<DeleteDBClusterSnapshotResult>
  • Deletes a previously provisioned instance.

    Declaration

    Swift

    public func deleteDBInstance(_ input: DeleteDBInstanceMessage) -> EventLoopFuture<DeleteDBInstanceResult>
  • Deletes a subnet group. The specified database subnet group must not be associated with any DB instances.

    Declaration

    Swift

    @discardableResult
    public func deleteDBSubnetGroup(_ input: DeleteDBSubnetGroupMessage) -> EventLoopFuture<Void>
  • Returns a list of certificate authority (CA) certificates provided by Amazon DocumentDB for this AWS account.

    Declaration

    Swift

    public func describeCertificates(_ input: DescribeCertificatesMessage) -> EventLoopFuture<CertificateMessage>
  • Returns a list of DBClusterParameterGroup descriptions. If a DBClusterParameterGroupName parameter is specified, the list contains only the description of the specified cluster parameter group.

    Declaration

    Swift

    public func describeDBClusterParameterGroups(_ input: DescribeDBClusterParameterGroupsMessage) -> EventLoopFuture<DBClusterParameterGroupsMessage>
  • Returns the detailed parameter list for a particular cluster parameter group.

    Declaration

    Swift

    public func describeDBClusterParameters(_ input: DescribeDBClusterParametersMessage) -> EventLoopFuture<DBClusterParameterGroupDetails>
  • Returns a list of cluster snapshot attribute names and values for a manual DB cluster snapshot. When you share snapshots with other AWS accounts, DescribeDBClusterSnapshotAttributes returns the restore attribute and a list of IDs for the AWS accounts that are authorized to copy or restore the manual cluster snapshot. If all is included in the list of values for the restore attribute, then the manual cluster snapshot is public and can be copied or restored by all AWS accounts.

    Declaration

    Swift

    public func describeDBClusterSnapshotAttributes(_ input: DescribeDBClusterSnapshotAttributesMessage) -> EventLoopFuture<DescribeDBClusterSnapshotAttributesResult>
  • Returns information about cluster snapshots. This API operation supports pagination.

    Declaration

    Swift

    public func describeDBClusterSnapshots(_ input: DescribeDBClusterSnapshotsMessage) -> EventLoopFuture<DBClusterSnapshotMessage>
  • 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.

    Declaration

    Swift

    public func describeDBClusters(_ input: DescribeDBClustersMessage) -> EventLoopFuture<DBClusterMessage>
  • Returns a list of the available engines.

    Declaration

    Swift

    public func describeDBEngineVersions(_ input: DescribeDBEngineVersionsMessage) -> EventLoopFuture<DBEngineVersionMessage>
  • Returns information about provisioned Amazon DocumentDB instances. This API supports pagination.

    Declaration

    Swift

    public func describeDBInstances(_ input: DescribeDBInstancesMessage) -> EventLoopFuture<DBInstanceMessage>
  • Returns a list of DBSubnetGroup descriptions. If a DBSubnetGroupName is specified, the list will contain only the descriptions of the specified DBSubnetGroup.

    Declaration

    Swift

    public func describeDBSubnetGroups(_ input: DescribeDBSubnetGroupsMessage) -> EventLoopFuture<DBSubnetGroupMessage>
  • Returns the default engine and system parameter information for the cluster database engine.

    Declaration

    Swift

    public func describeEngineDefaultClusterParameters(_ input: DescribeEngineDefaultClusterParametersMessage) -> EventLoopFuture<DescribeEngineDefaultClusterParametersResult>
  • Displays a list of categories for all event source types, or, if specified, for a specified source type.

    Declaration

    Swift

    public func describeEventCategories(_ input: DescribeEventCategoriesMessage) -> EventLoopFuture<EventCategoriesMessage>
  • 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.

    Declaration

    Swift

    public func describeEvents(_ input: DescribeEventsMessage) -> EventLoopFuture<EventsMessage>
  • Returns a list of orderable instance options for the specified engine.

    Declaration

    Swift

    public func describeOrderableDBInstanceOptions(_ input: DescribeOrderableDBInstanceOptionsMessage) -> EventLoopFuture<OrderableDBInstanceOptionsMessage>
  • Returns a list of resources (for example, instances) that have at least one pending maintenance action.

    Declaration

    Swift

    public func describePendingMaintenanceActions(_ input: DescribePendingMaintenanceActionsMessage) -> EventLoopFuture<PendingMaintenanceActionsMessage>
  • Forces a failover for a cluster. A failover for a cluster promotes one of the Amazon DocumentDB replicas (read-only instances) in the cluster to be the primary instance (the cluster writer). If the primary instance fails, Amazon DocumentDB automatically fails over to an Amazon DocumentDB replica, if one exists. You can force a failover when you want to simulate a failure of a primary instance for testing.

    Declaration

    Swift

    public func failoverDBCluster(_ input: FailoverDBClusterMessage) -> EventLoopFuture<FailoverDBClusterResult>
  • Lists all tags on an Amazon DocumentDB resource.

    Declaration

    Swift

    public func listTagsForResource(_ input: ListTagsForResourceMessage) -> EventLoopFuture<TagListMessage>
  • 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.

    Declaration

    Swift

    public func modifyDBCluster(_ input: ModifyDBClusterMessage) -> EventLoopFuture<ModifyDBClusterResult>
  • 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. Changes to dynamic parameters are applied immediately. Changes to static parameters require a reboot or maintenance window before the change can take effect. After you create a cluster parameter group, you should wait at least 5 minutes before creating your first cluster that uses that cluster parameter group as the default parameter group. This allows Amazon DocumentDB to fully complete the create action before the parameter group is used as the default for a new cluster. This step is especially important for parameters that are critical when creating the default database for a cluster, such as the character set for the default database defined by the character_set_database parameter.

    Declaration

    Swift

    public func modifyDBClusterParameterGroup(_ input: ModifyDBClusterParameterGroupMessage) -> EventLoopFuture<DBClusterParameterGroupNameMessage>
  • Adds an attribute and values to, or removes an attribute and values from, a manual DB cluster snapshot. To share a manual cluster snapshot with other AWS accounts, specify restore as the AttributeName, and use the ValuesToAdd parameter to add a list of IDs of the AWS accounts that are authorized to restore the manual cluster snapshot. Use the value all to make the manual cluster snapshot public, which means that it can be copied or restored by all AWS accounts. Do not add the all value for any manual DB cluster snapshots that contain private information that you don’t want available to all AWS accounts. If a manual cluster snapshot is encrypted, it can be shared, but only by specifying a list of authorized AWS account IDs for the ValuesToAdd parameter. You can’t use all as a value for that parameter in this case.

    Declaration

    Swift

    public func modifyDBClusterSnapshotAttribute(_ input: ModifyDBClusterSnapshotAttributeMessage) -> EventLoopFuture<ModifyDBClusterSnapshotAttributeResult>
  • 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.

    Declaration

    Swift

    public func modifyDBInstance(_ input: ModifyDBInstanceMessage) -> EventLoopFuture<ModifyDBInstanceResult>
  • Modifies an existing subnet group. subnet groups must contain at least one subnet in at least two Availability Zones in the AWS Region.

    Declaration

    Swift

    public func modifyDBSubnetGroup(_ input: ModifyDBSubnetGroupMessage) -> EventLoopFuture<ModifyDBSubnetGroupResult>
  • 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. Rebooting an instance restarts the database engine service. Rebooting an instance results in a momentary outage, during which the instance status is set to rebooting.

    Declaration

    Swift

    public func rebootDBInstance(_ input: RebootDBInstanceMessage) -> EventLoopFuture<RebootDBInstanceResult>
  • Removes metadata tags from an Amazon DocumentDB resource.

    Declaration

    Swift

    @discardableResult
    public func removeTagsFromResource(_ input: RemoveTagsFromResourceMessage) -> EventLoopFuture<Void>
  • 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. When you reset the entire group, dynamic parameters are updated immediately and static parameters are set to pending-reboot to take effect on the next DB instance reboot.

    Declaration

    Swift

    public func resetDBClusterParameterGroup(_ input: ResetDBClusterParameterGroupMessage) -> EventLoopFuture<DBClusterParameterGroupNameMessage>
  • Creates a new cluster from a snapshot or cluster snapshot. If a snapshot is specified, the target cluster is created from the source DB snapshot with a default configuration and default security group. If a cluster snapshot is specified, the target cluster is created from the source cluster restore point with the same configuration as the original source DB cluster, except that the new cluster is created with the default security group.

    Declaration

    Swift

    public func restoreDBClusterFromSnapshot(_ input: RestoreDBClusterFromSnapshotMessage) -> EventLoopFuture<RestoreDBClusterFromSnapshotResult>
  • 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.

    Declaration

    Swift

    public func restoreDBClusterToPointInTime(_ input: RestoreDBClusterToPointInTimeMessage) -> EventLoopFuture<RestoreDBClusterToPointInTimeResult>
  • Restarts the stopped cluster that is specified by DBClusterIdentifier. For more information, see Stopping and Starting an Amazon DocumentDB Cluster.

    Declaration

    Swift

    public func startDBCluster(_ input: StartDBClusterMessage) -> EventLoopFuture<StartDBClusterResult>
  • 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.

    Declaration

    Swift

    public func stopDBCluster(_ input: StopDBClusterMessage) -> EventLoopFuture<StopDBClusterResult>
  • Undocumented

    See more

    Declaration

    Swift

    public enum ApplyMethod : String, CustomStringConvertible, Codable
  • Undocumented

    See more

    Declaration

    Swift

    public enum SourceType : String, CustomStringConvertible, Codable