Class: Aws::DocDB::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::DocDB::Client
- Includes:
- ClientStubs
- Defined in:
- gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb
Overview
An API client for DocDB. To construct a client, you need to configure a :region
and :credentials
.
client = Aws::DocDB::Client.new(
region: region_name,
credentials: credentials,
# ...
)
For details on configuring region and credentials see the developer guide.
See #initialize for a full list of supported configuration options.
Instance Attribute Summary
Attributes inherited from Seahorse::Client::Base
API Operations collapse
-
#add_source_identifier_to_subscription(params = {}) ⇒ Types::AddSourceIdentifierToSubscriptionResult
Adds a source identifier to an existing event notification subscription.
-
#add_tags_to_resource(params = {}) ⇒ Struct
Adds metadata tags to an Amazon DocumentDB resource.
-
#apply_pending_maintenance_action(params = {}) ⇒ Types::ApplyPendingMaintenanceActionResult
Applies a pending maintenance action to a resource (for example, to an Amazon DocumentDB instance).
-
#copy_db_cluster_parameter_group(params = {}) ⇒ Types::CopyDBClusterParameterGroupResult
Copies the specified cluster parameter group.
-
#copy_db_cluster_snapshot(params = {}) ⇒ Types::CopyDBClusterSnapshotResult
Copies a snapshot of a cluster.
-
#create_db_cluster(params = {}) ⇒ Types::CreateDBClusterResult
Creates a new Amazon DocumentDB cluster.
-
#create_db_cluster_parameter_group(params = {}) ⇒ Types::CreateDBClusterParameterGroupResult
Creates a new cluster parameter group.
-
#create_db_cluster_snapshot(params = {}) ⇒ Types::CreateDBClusterSnapshotResult
Creates a snapshot of a cluster.
-
#create_db_instance(params = {}) ⇒ Types::CreateDBInstanceResult
Creates a new instance.
-
#create_db_subnet_group(params = {}) ⇒ Types::CreateDBSubnetGroupResult
Creates a new subnet group.
-
#create_event_subscription(params = {}) ⇒ Types::CreateEventSubscriptionResult
Creates an Amazon DocumentDB event notification subscription.
-
#create_global_cluster(params = {}) ⇒ Types::CreateGlobalClusterResult
Creates an Amazon DocumentDB global cluster that can span multiple multiple Amazon Web Services Regions.
-
#delete_db_cluster(params = {}) ⇒ Types::DeleteDBClusterResult
Deletes a previously provisioned cluster.
-
#delete_db_cluster_parameter_group(params = {}) ⇒ Struct
Deletes a specified cluster parameter group.
-
#delete_db_cluster_snapshot(params = {}) ⇒ Types::DeleteDBClusterSnapshotResult
Deletes a cluster snapshot.
-
#delete_db_instance(params = {}) ⇒ Types::DeleteDBInstanceResult
Deletes a previously provisioned instance.
-
#delete_db_subnet_group(params = {}) ⇒ Struct
Deletes a subnet group.
-
#delete_event_subscription(params = {}) ⇒ Types::DeleteEventSubscriptionResult
Deletes an Amazon DocumentDB event notification subscription.
-
#delete_global_cluster(params = {}) ⇒ Types::DeleteGlobalClusterResult
Deletes a global cluster.
-
#describe_certificates(params = {}) ⇒ Types::CertificateMessage
Returns a list of certificate authority (CA) certificates provided by Amazon DocumentDB for this Amazon Web Services account.
-
#describe_db_cluster_parameter_groups(params = {}) ⇒ Types::DBClusterParameterGroupsMessage
Returns a list of
DBClusterParameterGroup
descriptions. -
#describe_db_cluster_parameters(params = {}) ⇒ Types::DBClusterParameterGroupDetails
Returns the detailed parameter list for a particular cluster parameter group.
-
#describe_db_cluster_snapshot_attributes(params = {}) ⇒ Types::DescribeDBClusterSnapshotAttributesResult
Returns a list of cluster snapshot attribute names and values for a manual DB cluster snapshot.
-
#describe_db_cluster_snapshots(params = {}) ⇒ Types::DBClusterSnapshotMessage
Returns information about cluster snapshots.
-
#describe_db_clusters(params = {}) ⇒ Types::DBClusterMessage
Returns information about provisioned Amazon DocumentDB clusters.
-
#describe_db_engine_versions(params = {}) ⇒ Types::DBEngineVersionMessage
Returns a list of the available engines.
-
#describe_db_instances(params = {}) ⇒ Types::DBInstanceMessage
Returns information about provisioned Amazon DocumentDB instances.
-
#describe_db_subnet_groups(params = {}) ⇒ Types::DBSubnetGroupMessage
Returns a list of
DBSubnetGroup
descriptions. -
#describe_engine_default_cluster_parameters(params = {}) ⇒ Types::DescribeEngineDefaultClusterParametersResult
Returns the default engine and system parameter information for the cluster database engine.
-
#describe_event_categories(params = {}) ⇒ Types::EventCategoriesMessage
Displays a list of categories for all event source types, or, if specified, for a specified source type.
-
#describe_event_subscriptions(params = {}) ⇒ Types::EventSubscriptionsMessage
Lists all the subscription descriptions for a customer account.
-
#describe_events(params = {}) ⇒ Types::EventsMessage
Returns events related to instances, security groups, snapshots, and DB parameter groups for the past 14 days.
-
#describe_global_clusters(params = {}) ⇒ Types::GlobalClustersMessage
Returns information about Amazon DocumentDB global clusters.
-
#describe_orderable_db_instance_options(params = {}) ⇒ Types::OrderableDBInstanceOptionsMessage
Returns a list of orderable instance options for the specified engine.
-
#describe_pending_maintenance_actions(params = {}) ⇒ Types::PendingMaintenanceActionsMessage
Returns a list of resources (for example, instances) that have at least one pending maintenance action.
-
#failover_db_cluster(params = {}) ⇒ Types::FailoverDBClusterResult
Forces a failover for a cluster.
-
#failover_global_cluster(params = {}) ⇒ Types::FailoverGlobalClusterResult
Promotes the specified secondary DB cluster to be the primary DB cluster in the global cluster when failing over a global cluster occurs.
-
#list_tags_for_resource(params = {}) ⇒ Types::TagListMessage
Lists all tags on an Amazon DocumentDB resource.
-
#modify_db_cluster(params = {}) ⇒ Types::ModifyDBClusterResult
Modifies a setting for an Amazon DocumentDB cluster.
-
#modify_db_cluster_parameter_group(params = {}) ⇒ Types::DBClusterParameterGroupNameMessage
Modifies the parameters of a cluster parameter group.
-
#modify_db_cluster_snapshot_attribute(params = {}) ⇒ Types::ModifyDBClusterSnapshotAttributeResult
Adds an attribute and values to, or removes an attribute and values from, a manual cluster snapshot.
-
#modify_db_instance(params = {}) ⇒ Types::ModifyDBInstanceResult
Modifies settings for an instance.
-
#modify_db_subnet_group(params = {}) ⇒ Types::ModifyDBSubnetGroupResult
Modifies an existing subnet group.
-
#modify_event_subscription(params = {}) ⇒ Types::ModifyEventSubscriptionResult
Modifies an existing Amazon DocumentDB event notification subscription.
-
#modify_global_cluster(params = {}) ⇒ Types::ModifyGlobalClusterResult
Modify a setting for an Amazon DocumentDB global cluster.
-
#reboot_db_instance(params = {}) ⇒ Types::RebootDBInstanceResult
You might need to reboot your instance, usually for maintenance reasons.
-
#remove_from_global_cluster(params = {}) ⇒ Types::RemoveFromGlobalClusterResult
Detaches an Amazon DocumentDB secondary cluster from a global cluster.
-
#remove_source_identifier_from_subscription(params = {}) ⇒ Types::RemoveSourceIdentifierFromSubscriptionResult
Removes a source identifier from an existing Amazon DocumentDB event notification subscription.
-
#remove_tags_from_resource(params = {}) ⇒ Struct
Removes metadata tags from an Amazon DocumentDB resource.
-
#reset_db_cluster_parameter_group(params = {}) ⇒ Types::DBClusterParameterGroupNameMessage
Modifies the parameters of a cluster parameter group to the default value.
-
#restore_db_cluster_from_snapshot(params = {}) ⇒ Types::RestoreDBClusterFromSnapshotResult
Creates a new cluster from a snapshot or cluster snapshot.
-
#restore_db_cluster_to_point_in_time(params = {}) ⇒ Types::RestoreDBClusterToPointInTimeResult
Restores a cluster to an arbitrary point in time.
-
#start_db_cluster(params = {}) ⇒ Types::StartDBClusterResult
Restarts the stopped cluster that is specified by
DBClusterIdentifier
. -
#stop_db_cluster(params = {}) ⇒ Types::StopDBClusterResult
Stops the running cluster that is specified by
DBClusterIdentifier
. -
#switchover_global_cluster(params = {}) ⇒ Types::SwitchoverGlobalClusterResult
Switches over the specified secondary Amazon DocumentDB cluster to be the new primary Amazon DocumentDB cluster in the global database cluster.
Instance Method Summary collapse
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
-
#wait_until(waiter_name, params = {}, options = {}) {|w.waiter| ... } ⇒ Boolean
Polls an API operation until a resource enters a desired state.
Methods included from ClientStubs
#api_requests, #stub_data, #stub_responses
Methods inherited from Seahorse::Client::Base
add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins
Methods included from Seahorse::Client::HandlerBuilder
#handle, #handle_request, #handle_response
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
446 447 448 |
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 446 def initialize(*args) super end |
Instance Method Details
#add_source_identifier_to_subscription(params = {}) ⇒ Types::AddSourceIdentifierToSubscriptionResult
Adds a source identifier to an existing event notification subscription.
504 505 506 507 |
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 504 def add_source_identifier_to_subscription(params = {}, = {}) req = build_request(:add_source_identifier_to_subscription, params) req.send_request() end |
#add_tags_to_resource(params = {}) ⇒ Struct
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.
539 540 541 542 |
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 539 def (params = {}, = {}) req = build_request(:add_tags_to_resource, params) req.send_request() end |
#apply_pending_maintenance_action(params = {}) ⇒ Types::ApplyPendingMaintenanceActionResult
Applies a pending maintenance action to a resource (for example, to an Amazon DocumentDB instance).
597 598 599 600 |
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 597 def apply_pending_maintenance_action(params = {}, = {}) req = build_request(:apply_pending_maintenance_action, params) req.send_request() end |
#copy_db_cluster_parameter_group(params = {}) ⇒ Types::CopyDBClusterParameterGroupResult
Copies the specified cluster parameter group.
672 673 674 675 |
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 672 def copy_db_cluster_parameter_group(params = {}, = {}) req = build_request(:copy_db_cluster_parameter_group, params) req.send_request() end |
#copy_db_cluster_snapshot(params = {}) ⇒ Types::CopyDBClusterSnapshotResult
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. You can only copy a shared DB
cluster snapshot, whether encrypted or not, in the same Amazon Web
Services Region.
To cancel the copy operation after it is in progress, delete the
target cluster snapshot identified by
TargetDBClusterSnapshotIdentifier
while that cluster snapshot is in
the copying status.
840 841 842 843 |
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 840 def copy_db_cluster_snapshot(params = {}, = {}) req = build_request(:copy_db_cluster_snapshot, params) req.send_request() end |
#create_db_cluster(params = {}) ⇒ Types::CreateDBClusterResult
Creates a new Amazon DocumentDB cluster.
1114 1115 1116 1117 |
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 1114 def create_db_cluster(params = {}, = {}) req = build_request(:create_db_cluster, params) req.send_request() end |
#create_db_cluster_parameter_group(params = {}) ⇒ Types::CreateDBClusterParameterGroupResult
Creates a new cluster parameter group.
Parameters in a cluster parameter group apply to all of the instances in a cluster.
A cluster parameter group is initially created with the default
parameters for the database engine used by instances in the cluster.
In Amazon DocumentDB, you cannot make modifications directly to the
default.docdb3.6
cluster parameter group. If your Amazon DocumentDB
cluster is using the default cluster parameter group and you want to
modify a value in it, you must first create a new parameter
group or copy an existing parameter group, modify it, and
then apply the modified parameter group to your cluster. For the new
cluster parameter group and associated settings to take effect, you
must then reboot the instances in the cluster without failover. For
more information, see Modifying Amazon DocumentDB Cluster Parameter
Groups.
1194 1195 1196 1197 |
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 1194 def create_db_cluster_parameter_group(params = {}, = {}) req = build_request(:create_db_cluster_parameter_group, params) req.send_request() end |
#create_db_cluster_snapshot(params = {}) ⇒ Types::CreateDBClusterSnapshotResult
Creates a snapshot of a cluster.
1273 1274 1275 1276 |
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 1273 def create_db_cluster_snapshot(params = {}, = {}) req = build_request(:create_db_cluster_snapshot, params) req.send_request() end |
#create_db_instance(params = {}) ⇒ Types::CreateDBInstanceResult
Creates a new instance.
1483 1484 1485 1486 |
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 1483 def create_db_instance(params = {}, = {}) req = build_request(:create_db_instance, params) req.send_request() end |
#create_db_subnet_group(params = {}) ⇒ Types::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.
1544 1545 1546 1547 |
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 1544 def create_db_subnet_group(params = {}, = {}) req = build_request(:create_db_subnet_group, params) req.send_request() end |
#create_event_subscription(params = {}) ⇒ Types::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.
You can specify the type of source (SourceType
) that you want to be
notified of. You can also provide a list of Amazon DocumentDB sources
(SourceIds
) that trigger the events, and you can provide a list of
event categories (EventCategories
) for events that you want to be
notified of. For example, you can specify SourceType = db-instance
,
SourceIds = mydbinstance1, mydbinstance2
and EventCategories =
Availability, Backup
.
If you specify both the SourceType
and SourceIds
(such as
SourceType = db-instance
and SourceIdentifier = myDBInstance1
),
you are notified of all the db-instance
events for the specified
source. If you specify a SourceType
but do not specify a
SourceIdentifier
, you receive notice of the events for that source
type for all your Amazon DocumentDB sources. If you do not specify
either the SourceType
or the SourceIdentifier
, you are notified of
events generated from all Amazon DocumentDB sources belonging to your
customer account.
1667 1668 1669 1670 |
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 1667 def create_event_subscription(params = {}, = {}) req = build_request(:create_event_subscription, params) req.send_request() end |
#create_global_cluster(params = {}) ⇒ Types::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 give 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.
You can create a global cluster that is initially empty, and then add a primary and a secondary to it. Or you can specify an existing cluster during the create operation, and this cluster becomes the primary of the global cluster.
1753 1754 1755 1756 |
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 1753 def create_global_cluster(params = {}, = {}) req = build_request(:create_global_cluster, params) req.send_request() end |
#delete_db_cluster(params = {}) ⇒ Types::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.
1866 1867 1868 1869 |
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 1866 def delete_db_cluster(params = {}, = {}) req = build_request(:delete_db_cluster, params) req.send_request() end |
#delete_db_cluster_parameter_group(params = {}) ⇒ Struct
Deletes a specified cluster parameter group. The cluster parameter group to be deleted can't be associated with any clusters.
1897 1898 1899 1900 |
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 1897 def delete_db_cluster_parameter_group(params = {}, = {}) req = build_request(:delete_db_cluster_parameter_group, params) req.send_request() end |
#delete_db_cluster_snapshot(params = {}) ⇒ Types::DeleteDBClusterSnapshotResult
Deletes a cluster snapshot. If the snapshot is being copied, the copy operation is terminated.
available
state to be deleted.
1951 1952 1953 1954 |
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 1951 def delete_db_cluster_snapshot(params = {}, = {}) req = build_request(:delete_db_cluster_snapshot, params) req.send_request() end |
#delete_db_instance(params = {}) ⇒ Types::DeleteDBInstanceResult
Deletes a previously provisioned instance.
2049 2050 2051 2052 |
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 2049 def delete_db_instance(params = {}, = {}) req = build_request(:delete_db_instance, params) req.send_request() end |
#delete_db_subnet_group(params = {}) ⇒ Struct
Deletes a subnet group.
2087 2088 2089 2090 |
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 2087 def delete_db_subnet_group(params = {}, = {}) req = build_request(:delete_db_subnet_group, params) req.send_request() end |
#delete_event_subscription(params = {}) ⇒ Types::DeleteEventSubscriptionResult
Deletes an Amazon DocumentDB event notification subscription.
2127 2128 2129 2130 |
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 2127 def delete_event_subscription(params = {}, = {}) req = build_request(:delete_event_subscription, params) req.send_request() end |
#delete_global_cluster(params = {}) ⇒ Types::DeleteGlobalClusterResult
Deletes a global cluster. The primary and secondary clusters must already be detached or deleted before attempting to delete a global cluster.
2174 2175 2176 2177 |
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 2174 def delete_global_cluster(params = {}, = {}) req = build_request(:delete_global_cluster, params) req.send_request() end |
#describe_certificates(params = {}) ⇒ Types::CertificateMessage
Returns a list of certificate authority (CA) certificates provided by Amazon DocumentDB for this Amazon Web Services account.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
2253 2254 2255 2256 |
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 2253 def describe_certificates(params = {}, = {}) req = build_request(:describe_certificates, params) req.send_request() end |
#describe_db_cluster_parameter_groups(params = {}) ⇒ Types::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.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
2325 2326 2327 2328 |
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 2325 def describe_db_cluster_parameter_groups(params = {}, = {}) req = build_request(:describe_db_cluster_parameter_groups, params) req.send_request() end |
#describe_db_cluster_parameters(params = {}) ⇒ Types::DBClusterParameterGroupDetails
Returns the detailed parameter list for a particular cluster parameter group.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
2407 2408 2409 2410 |
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 2407 def describe_db_cluster_parameters(params = {}, = {}) req = build_request(:describe_db_cluster_parameters, params) req.send_request() end |
#describe_db_cluster_snapshot_attributes(params = {}) ⇒ Types::DescribeDBClusterSnapshotAttributesResult
Returns a list of cluster snapshot attribute names and values for a manual DB cluster snapshot.
When you share snapshots with other Amazon Web Services accounts,
DescribeDBClusterSnapshotAttributes
returns the restore
attribute
and a list of IDs for the Amazon Web Services 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
Amazon Web Services accounts.
2449 2450 2451 2452 |
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 2449 def describe_db_cluster_snapshot_attributes(params = {}, = {}) req = build_request(:describe_db_cluster_snapshot_attributes, params) req.send_request() end |
#describe_db_cluster_snapshots(params = {}) ⇒ Types::DBClusterSnapshotMessage
Returns information about cluster snapshots. This API operation supports pagination.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
2591 2592 2593 2594 |
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 2591 def describe_db_cluster_snapshots(params = {}, = {}) req = build_request(:describe_db_cluster_snapshots, params) req.send_request() end |
#describe_db_clusters(params = {}) ⇒ Types::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.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
2714 2715 2716 2717 |
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 2714 def describe_db_clusters(params = {}, = {}) req = build_request(:describe_db_clusters, params) req.send_request() end |
#describe_db_engine_versions(params = {}) ⇒ Types::DBEngineVersionMessage
Returns a list of the available engines.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
2822 2823 2824 2825 |
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 2822 def describe_db_engine_versions(params = {}, = {}) req = build_request(:describe_db_engine_versions, params) req.send_request() end |
#describe_db_instances(params = {}) ⇒ Types::DBInstanceMessage
Returns information about provisioned Amazon DocumentDB instances. This API supports pagination.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
The following waiters are defined for this operation (see #wait_until for detailed usage):
- db_instance_available
- db_instance_deleted
2970 2971 2972 2973 |
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 2970 def describe_db_instances(params = {}, = {}) req = build_request(:describe_db_instances, params) req.send_request() end |
#describe_db_subnet_groups(params = {}) ⇒ Types::DBSubnetGroupMessage
Returns a list of DBSubnetGroup
descriptions. If a
DBSubnetGroupName
is specified, the list will contain only the
descriptions of the specified DBSubnetGroup
.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
3039 3040 3041 3042 |
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 3039 def describe_db_subnet_groups(params = {}, = {}) req = build_request(:describe_db_subnet_groups, params) req.send_request() end |
#describe_engine_default_cluster_parameters(params = {}) ⇒ Types::DescribeEngineDefaultClusterParametersResult
Returns the default engine and system parameter information for the cluster database engine.
3107 3108 3109 3110 |
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 3107 def describe_engine_default_cluster_parameters(params = {}, = {}) req = build_request(:describe_engine_default_cluster_parameters, params) req.send_request() end |
#describe_event_categories(params = {}) ⇒ Types::EventCategoriesMessage
Displays a list of categories for all event source types, or, if specified, for a specified source type.
3150 3151 3152 3153 |
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 3150 def describe_event_categories(params = {}, = {}) req = build_request(:describe_event_categories, params) req.send_request() end |
#describe_event_subscriptions(params = {}) ⇒ Types::EventSubscriptionsMessage
Lists all the subscription descriptions for a customer account. The
description for a subscription includes SubscriptionName
,
SNSTopicARN
, CustomerID
, SourceType
, SourceID
, CreationTime
,
and Status
.
If you specify a SubscriptionName
, lists the description for that
subscription.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
3227 3228 3229 3230 |
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 3227 def describe_event_subscriptions(params = {}, = {}) req = build_request(:describe_event_subscriptions, params) req.send_request() end |
#describe_events(params = {}) ⇒ Types::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.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
3346 3347 3348 3349 |
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 3346 def describe_events(params = {}, = {}) req = build_request(:describe_events, params) req.send_request() end |
#describe_global_clusters(params = {}) ⇒ Types::GlobalClustersMessage
Returns information about Amazon DocumentDB global clusters. This API supports pagination.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
3426 3427 3428 3429 |
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 3426 def describe_global_clusters(params = {}, = {}) req = build_request(:describe_global_clusters, params) req.send_request() end |
#describe_orderable_db_instance_options(params = {}) ⇒ Types::OrderableDBInstanceOptionsMessage
Returns a list of orderable instance options for the specified engine.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
3512 3513 3514 3515 |
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 3512 def (params = {}, = {}) req = build_request(:describe_orderable_db_instance_options, params) req.send_request() end |
#describe_pending_maintenance_actions(params = {}) ⇒ Types::PendingMaintenanceActionsMessage
Returns a list of resources (for example, instances) that have at least one pending maintenance action.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
3590 3591 3592 3593 |
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 3590 def describe_pending_maintenance_actions(params = {}, = {}) req = build_request(:describe_pending_maintenance_actions, params) req.send_request() end |
#failover_db_cluster(params = {}) ⇒ Types::FailoverDBClusterResult
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.
3684 3685 3686 3687 |
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 3684 def failover_db_cluster(params = {}, = {}) req = build_request(:failover_db_cluster, params) req.send_request() end |
#failover_global_cluster(params = {}) ⇒ Types::FailoverGlobalClusterResult
Promotes the specified secondary DB cluster to be the primary DB cluster in the global cluster when failing over a global cluster occurs.
Use this operation to respond to an unplanned event, such as a regional disaster in the primary region. Failing over can result in a loss of write transaction data that wasn't replicated to the chosen secondary before the failover event occurred. However, the recovery process that promotes a DB instance on the chosen seconday DB cluster to be the primary writer DB instance guarantees that the data is in a transactionally consistent state.
3785 3786 3787 3788 |
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 3785 def failover_global_cluster(params = {}, = {}) req = build_request(:failover_global_cluster, params) req.send_request() end |
#list_tags_for_resource(params = {}) ⇒ Types::TagListMessage
Lists all tags on an Amazon DocumentDB resource.
3825 3826 3827 3828 |
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 3825 def (params = {}, = {}) req = build_request(:list_tags_for_resource, params) req.send_request() end |
#modify_db_cluster(params = {}) ⇒ Types::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.
4060 4061 4062 4063 |
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 4060 def modify_db_cluster(params = {}, = {}) req = build_request(:modify_db_cluster, params) req.send_request() end |
#modify_db_cluster_parameter_group(params = {}) ⇒ Types::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.
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.
4123 4124 4125 4126 |
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 4123 def modify_db_cluster_parameter_group(params = {}, = {}) req = build_request(:modify_db_cluster_parameter_group, params) req.send_request() end |
#modify_db_cluster_snapshot_attribute(params = {}) ⇒ Types::ModifyDBClusterSnapshotAttributeResult
Adds an attribute and values to, or removes an attribute and values from, a manual cluster snapshot.
To share a manual cluster snapshot with other Amazon Web Services
accounts, specify restore
as the AttributeName
, and use the
ValuesToAdd
parameter to add a list of IDs of the Amazon Web
Services 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 Amazon
Web Services accounts. Do not add the all
value for any manual
cluster snapshots that contain private information that you don't
want available to all Amazon Web Services accounts. If a manual
cluster snapshot is encrypted, it can be shared, but only by
specifying a list of authorized Amazon Web Services account IDs for
the ValuesToAdd
parameter. You can't use all
as a value for that
parameter in this case.
4203 4204 4205 4206 |
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 4203 def modify_db_cluster_snapshot_attribute(params = {}, = {}) req = build_request(:modify_db_cluster_snapshot_attribute, params) req.send_request() end |
#modify_db_instance(params = {}) ⇒ Types::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.
4434 4435 4436 4437 |
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 4434 def modify_db_instance(params = {}, = {}) req = build_request(:modify_db_instance, params) req.send_request() end |
#modify_db_subnet_group(params = {}) ⇒ Types::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.
4486 4487 4488 4489 |
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 4486 def modify_db_subnet_group(params = {}, = {}) req = build_request(:modify_db_subnet_group, params) req.send_request() end |
#modify_event_subscription(params = {}) ⇒ Types::ModifyEventSubscriptionResult
Modifies an existing Amazon DocumentDB event notification subscription.
4550 4551 4552 4553 |
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 4550 def modify_event_subscription(params = {}, = {}) req = build_request(:modify_event_subscription, params) req.send_request() end |
#modify_global_cluster(params = {}) ⇒ Types::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.
4623 4624 4625 4626 |
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 4623 def modify_global_cluster(params = {}, = {}) req = build_request(:modify_global_cluster, params) req.send_request() end |
#reboot_db_instance(params = {}) ⇒ Types::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.
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.
4735 4736 4737 4738 |
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 4735 def reboot_db_instance(params = {}, = {}) req = build_request(:reboot_db_instance, params) req.send_request() end |
#remove_from_global_cluster(params = {}) ⇒ Types::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.
4789 4790 4791 4792 |
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 4789 def remove_from_global_cluster(params = {}, = {}) req = build_request(:remove_from_global_cluster, params) req.send_request() end |
#remove_source_identifier_from_subscription(params = {}) ⇒ Types::RemoveSourceIdentifierFromSubscriptionResult
Removes a source identifier from an existing Amazon DocumentDB event notification subscription.
4835 4836 4837 4838 |
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 4835 def remove_source_identifier_from_subscription(params = {}, = {}) req = build_request(:remove_source_identifier_from_subscription, params) req.send_request() end |
#remove_tags_from_resource(params = {}) ⇒ Struct
Removes metadata tags from an Amazon DocumentDB resource.
4862 4863 4864 4865 |
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 4862 def (params = {}, = {}) req = build_request(:remove_tags_from_resource, params) req.send_request() end |
#reset_db_cluster_parameter_group(params = {}) ⇒ Types::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.
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.
4924 4925 4926 4927 |
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 4924 def reset_db_cluster_parameter_group(params = {}, = {}) req = build_request(:reset_db_cluster_parameter_group, params) req.send_request() end |
#restore_db_cluster_from_snapshot(params = {}) ⇒ Types::RestoreDBClusterFromSnapshotResult
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.
5135 5136 5137 5138 |
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 5135 def restore_db_cluster_from_snapshot(params = {}, = {}) req = build_request(:restore_db_cluster_from_snapshot, params) req.send_request() end |
#restore_db_cluster_to_point_in_time(params = {}) ⇒ Types::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.
5359 5360 5361 5362 |
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 5359 def restore_db_cluster_to_point_in_time(params = {}, = {}) req = build_request(:restore_db_cluster_to_point_in_time, params) req.send_request() end |
#start_db_cluster(params = {}) ⇒ Types::StartDBClusterResult
Restarts the stopped cluster that is specified by
DBClusterIdentifier
. For more information, see Stopping and
Starting an Amazon DocumentDB Cluster.
5437 5438 5439 5440 |
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 5437 def start_db_cluster(params = {}, = {}) req = build_request(:start_db_cluster, params) req.send_request() end |
#stop_db_cluster(params = {}) ⇒ Types::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.
5515 5516 5517 5518 |
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 5515 def stop_db_cluster(params = {}, = {}) req = build_request(:stop_db_cluster, params) req.send_request() end |
#switchover_global_cluster(params = {}) ⇒ Types::SwitchoverGlobalClusterResult
Switches over the specified secondary Amazon DocumentDB cluster to be the new primary Amazon DocumentDB cluster in the global database cluster.
5585 5586 5587 5588 |
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 5585 def switchover_global_cluster(params = {}, = {}) req = build_request(:switchover_global_cluster, params) req.send_request() end |
#wait_until(waiter_name, params = {}, options = {}) {|w.waiter| ... } ⇒ Boolean
Polls an API operation until a resource enters a desired state.
Basic Usage
A waiter will call an API operation until:
- It is successful
- It enters a terminal state
- It makes the maximum number of attempts
In between attempts, the waiter will sleep.
# polls in a loop, sleeping between attempts
client.wait_until(waiter_name, params)
Configuration
You can configure the maximum number of polling attempts, and the delay (in seconds) between each polling attempt. You can pass configuration as the final arguments hash.
# poll for ~25 seconds
client.wait_until(waiter_name, params, {
max_attempts: 5,
delay: 5,
})
Callbacks
You can be notified before each polling attempt and before each
delay. If you throw :success
or :failure
from these callbacks,
it will terminate the waiter.
started_at = Time.now
client.wait_until(waiter_name, params, {
# disable max attempts
max_attempts: nil,
# poll for 1 hour, instead of a number of attempts
before_wait: -> (attempts, response) do
throw :failure if Time.now - started_at > 3600
end
})
Handling Errors
When a waiter is unsuccessful, it will raise an error. All of the failure errors extend from Waiters::Errors::WaiterFailed.
begin
client.wait_until(...)
rescue Aws::Waiters::Errors::WaiterFailed
# resource did not enter the desired state in time
end
Valid Waiters
The following table lists the valid waiter names, the operations they call,
and the default :delay
and :max_attempts
values.
waiter_name | params | :delay | :max_attempts |
---|---|---|---|
db_instance_available | #describe_db_instances | 30 | 60 |
db_instance_deleted | #describe_db_instances | 30 | 60 |
5701 5702 5703 5704 5705 |
# File 'gems/aws-sdk-docdb/lib/aws-sdk-docdb/client.rb', line 5701 def wait_until(waiter_name, params = {}, = {}) w = waiter(waiter_name, ) yield(w.waiter) if block_given? # deprecated w.wait(params) end |