You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.
Class: Aws::DAX::Client OverviewAn API client for Amazon DynamoDB Accelerator (DAX). To construct a client, you need to configure a :region
and :credentials
.
dax = Aws::DAX::Client.new(
region: region_name,
credentials: credentials,
)
See #initialize for a full list of supported configuration options.
RegionYou can configure a default region in the following locations:
ENV['AWS_REGION']
Aws.config[:region]
Go here for a list of supported regions.
CredentialsDefault credentials are loaded automatically from the following locations:
ENV['AWS_ACCESS_KEY_ID']
and ENV['AWS_SECRET_ACCESS_KEY']
Aws.config[:credentials]
~/.aws/credentials
(more information)You can also construct a credentials object from one of the following classes:
Alternatively, you configure credentials with :access_key_id
and :secret_access_key
:
creds = YAML.load(File.read('/path/to/secrets'))
Aws::DAX::Client.new(
access_key_id: creds['access_key_id'],
secret_access_key: creds['secret_access_key']
)
Always load your credentials from outside your application. Avoid configuring credentials statically and never commit them to source control.
Attribute Summary collapseConstructs an API client.
Creates a new parameter group.
Creates a new subnet group.
.
Removes one or more nodes from a DAX cluster.
You cannot use DecreaseReplicationFactor
to remove the last node in a DAX cluster.
Deletes a previously provisioned DAX cluster.
Deletes the specified parameter group.
Deletes a subnet group.
You cannot delete a subnet group if it is associated with any DAX clusters.
.
Returns information about all provisioned DAX clusters if no cluster identifier is specified, or about a specific DAX cluster if a cluster identifier is supplied.
If the cluster is in the CREATING state, only cluster level information will be displayed until all of the nodes are successfully provisioned.
If the cluster is in the DELETING state, only cluster level information will be displayed.
If nodes are currently being added to the DAX cluster, node endpoint information and creation time for the additional nodes will not be displayed until they are completely provisioned.
Returns the default system parameter information for the DAX caching software.
.
Returns events related to DAX clusters and parameter groups.
Returns a list of parameter group descriptions.
Returns the detailed parameter list for a particular parameter group.
.
Returns a list of subnet group descriptions.
Adds one or more nodes to a DAX cluster.
.
List all of the tags for a DAX cluster.
Reboots a single node of a DAX cluster.
Associates a set of tags with a DAX resource.
Removes the association of tags from a DAX resource.
Modifies the settings for a DAX cluster.
Modifies the parameters of a parameter group.
Modifies an existing subnet group.
.
Waiters polls an API operation until a resource enters a desired state.
Returns the list of supported waiters.
add_plugin, api, #build_request, clear_plugins, define, new, #operation, #operation_names, plugins, remove_plugin, set_api, set_plugins
Methods included from Seahorse::Client::HandlerBuilder#handle, #handle_request, #handle_response
Instance Method Details #create_cluster(options = {}) ⇒ Types::CreateClusterResponseCreates a DAX cluster. All nodes in the cluster run the same DAX caching software.
#create_parameter_group(options = {}) ⇒ Types::CreateParameterGroupResponseCreates a new parameter group. A parameter group is a collection of parameters that you apply to all of the nodes in a DAX cluster.
#decrease_replication_factor(options = {}) ⇒ Types::DecreaseReplicationFactorResponseRemoves one or more nodes from a DAX cluster.
You cannot use DecreaseReplicationFactor
to remove the last node in a DAX cluster. If you need to do this, use DeleteCluster
instead.
Deletes a previously provisioned DAX cluster. DeleteCluster deletes all associated nodes, node endpoints and the DAX cluster itself. When you receive a successful response from this action, DAX immediately begins deleting the cluster; you cannot cancel or revert this action.
#delete_parameter_group(options = {}) ⇒ Types::DeleteParameterGroupResponseDeletes the specified parameter group. You cannot delete a parameter group if it is associated with any DAX clusters.
#delete_subnet_group(options = {}) ⇒ Types::DeleteSubnetGroupResponseDeletes a subnet group.
You cannot delete a subnet group if it is associated with any DAX clusters.
#describe_clusters(options = {}) ⇒ Types::DescribeClustersResponseReturns information about all provisioned DAX clusters if no cluster identifier is specified, or about a specific DAX cluster if a cluster identifier is supplied.
If the cluster is in the CREATING state, only cluster level information will be displayed until all of the nodes are successfully provisioned.
If the cluster is in the DELETING state, only cluster level information will be displayed.
If nodes are currently being added to the DAX cluster, node endpoint information and creation time for the additional nodes will not be displayed until they are completely provisioned. When the DAX cluster state is available, the cluster is ready for use.
If nodes are currently being removed from the DAX cluster, no endpoint information for the removed nodes is displayed.
#describe_events(options = {}) ⇒ Types::DescribeEventsResponseReturns events related to DAX clusters and parameter groups. You can obtain events specific to a particular DAX cluster or parameter group by providing the name as a parameter.
By default, only the events occurring within the last 24 hours are returned; however, you can retrieve up to 14 days' worth of events if necessary.
#describe_parameter_groups(options = {}) ⇒ Types::DescribeParameterGroupsResponseReturns a list of parameter group descriptions. If a parameter group name is specified, the list will contain only the descriptions for that group.
#describe_subnet_groups(options = {}) ⇒ Types::DescribeSubnetGroupsResponseReturns a list of subnet group descriptions. If a subnet group name is specified, the list will contain only the description of that group.
#list_tags(options = {}) ⇒ Types::ListTagsResponseList all of the tags for a DAX cluster. You can call ListTags
up to 10 times per second, per account.
Reboots a single node of a DAX cluster. The reboot action takes place as soon as possible. During the reboot, the node status is set to REBOOTING.
RebootNode
restarts the DAX engine process and does not remove the contents of the cache.
Associates a set of tags with a DAX resource. You can call TagResource
up to 5 times per second, per account.
Removes the association of tags from a DAX resource. You can call UntagResource
up to 5 times per second, per account.
Modifies the settings for a DAX cluster. You can use this action to change one or more cluster configuration parameters by specifying the parameters and the new values.
#update_parameter_group(options = {}) ⇒ Types::UpdateParameterGroupResponseModifies the parameters of a parameter group. You can modify up to 20 parameters in a single request by submitting a list parameter name and value pairs.
#wait_until(waiter_name, params = {}) {|waiter| ... } ⇒ BooleanWaiters polls an API operation until a resource enters a desired state.
Basic UsageWaiters will poll until they are succesful, they fail by entering a terminal state, or until a maximum number of attempts are made.
# polls in a loop, sleeping between attempts client.waiter_until(waiter_name, params)
ConfigurationYou can configure the maximum number of polling attempts, and the delay (in seconds) between each polling attempt. You configure waiters by passing a block to #wait_until:
# poll for ~25 seconds
client.wait_until(...) do |w|
w.max_attempts = 5
w.delay = 5
end
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(...) do |w|
# disable max attempts
w.max_attempts = nil
# poll for 1 hour, instead of a number of attempts
w.before_wait do |attempts, response|
throw :failure if Time.now - started_at > 3600
end
end
Handling Errors
When a waiter is successful, it returns true
. When a waiter fails, it raises an error. All errors raised extend from Waiters::Errors::WaiterFailed.
begin
client.wait_until(...)
rescue Aws::Waiters::Errors::WaiterFailed
# resource did not enter the desired state in time
end
#waiter_names ⇒ Array<Symbol>
Returns the list of supported waiters. The following table lists the supported waiters and the client method they call:
Waiter Name Client Method Default Delay: Default Max Attempts:RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4