You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.
Class: Aws::DAX::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::DAX::Client
- Defined in:
- (unknown)
Overview
An 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.
Region
You can configure a default region in the following locations:
ENV['AWS_REGION']
Aws.config[:region]
Go here for a list of supported regions.
Credentials
Default credentials are loaded automatically from the following locations:
ENV['AWS_ACCESS_KEY_ID']
andENV['AWS_SECRET_ACCESS_KEY']
Aws.config[:credentials]
- The shared credentials ini file at
~/.aws/credentials
(more information) - From an instance profile when running on EC2
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
:
# load credentials from disk
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.
Instance Attribute Summary
Attributes inherited from Seahorse::Client::Base
Constructor collapse
-
#initialize(options = {}) ⇒ Aws::DAX::Client
constructor
Constructs an API client.
API Operations collapse
-
#create_cluster(options = {}) ⇒ Types::CreateClusterResponse
Creates a DAX cluster.
-
#create_parameter_group(options = {}) ⇒ Types::CreateParameterGroupResponse
Creates a new parameter group.
-
#create_subnet_group(options = {}) ⇒ Types::CreateSubnetGroupResponse
Creates a new subnet group.
.
-
#decrease_replication_factor(options = {}) ⇒ Types::DecreaseReplicationFactorResponse
Removes one or more nodes from a DAX cluster.
You cannot use
DecreaseReplicationFactor
to remove the last node in a DAX cluster. -
#delete_cluster(options = {}) ⇒ Types::DeleteClusterResponse
Deletes a previously provisioned DAX cluster.
-
#delete_parameter_group(options = {}) ⇒ Types::DeleteParameterGroupResponse
Deletes the specified parameter group.
-
#delete_subnet_group(options = {}) ⇒ Types::DeleteSubnetGroupResponse
Deletes a subnet group.
You cannot delete a subnet group if it is associated with any DAX clusters.
-
#describe_clusters(options = {}) ⇒ Types::DescribeClustersResponse
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.
-
#describe_default_parameters(options = {}) ⇒ Types::DescribeDefaultParametersResponse
Returns the default system parameter information for the DAX caching software.
.
-
#describe_events(options = {}) ⇒ Types::DescribeEventsResponse
Returns events related to DAX clusters and parameter groups.
-
#describe_parameter_groups(options = {}) ⇒ Types::DescribeParameterGroupsResponse
Returns a list of parameter group descriptions.
-
#describe_parameters(options = {}) ⇒ Types::DescribeParametersResponse
Returns the detailed parameter list for a particular parameter group.
.
-
#describe_subnet_groups(options = {}) ⇒ Types::DescribeSubnetGroupsResponse
Returns a list of subnet group descriptions.
-
#increase_replication_factor(options = {}) ⇒ Types::IncreaseReplicationFactorResponse
Adds one or more nodes to a DAX cluster.
.
-
#list_tags(options = {}) ⇒ Types::ListTagsResponse
List all of the tags for a DAX cluster.
-
#reboot_node(options = {}) ⇒ Types::RebootNodeResponse
Reboots a single node of a DAX cluster.
-
#tag_resource(options = {}) ⇒ Types::TagResourceResponse
Associates a set of tags with a DAX resource.
-
#untag_resource(options = {}) ⇒ Types::UntagResourceResponse
Removes the association of tags from a DAX resource.
-
#update_cluster(options = {}) ⇒ Types::UpdateClusterResponse
Modifies the settings for a DAX cluster.
-
#update_parameter_group(options = {}) ⇒ Types::UpdateParameterGroupResponse
Modifies the parameters of a parameter group.
-
#update_subnet_group(options = {}) ⇒ Types::UpdateSubnetGroupResponse
Modifies an existing subnet group.
.
Instance Method Summary collapse
-
#wait_until(waiter_name, params = {}) {|waiter| ... } ⇒ Boolean
Waiters polls an API operation until a resource enters a desired state.
-
#waiter_names ⇒ Array<Symbol>
Returns the list of supported waiters.
Methods inherited from Seahorse::Client::Base
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
Constructor Details
#initialize(options = {}) ⇒ Aws::DAX::Client
Constructs an API client.
Instance Method Details
#create_cluster(options = {}) ⇒ Types::CreateClusterResponse
Creates a DAX cluster. All nodes in the cluster run the same DAX caching software.
#create_parameter_group(options = {}) ⇒ Types::CreateParameterGroupResponse
Creates a new parameter group. A parameter group is a collection of parameters that you apply to all of the nodes in a DAX cluster.
#create_subnet_group(options = {}) ⇒ Types::CreateSubnetGroupResponse
Creates a new subnet group.
#decrease_replication_factor(options = {}) ⇒ Types::DecreaseReplicationFactorResponse
Removes 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.
#delete_cluster(options = {}) ⇒ Types::DeleteClusterResponse
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::DeleteParameterGroupResponse
Deletes the specified parameter group. You cannot delete a parameter group if it is associated with any DAX clusters.
#delete_subnet_group(options = {}) ⇒ Types::DeleteSubnetGroupResponse
Deletes a subnet group.
You cannot delete a subnet group if it is associated with any DAX clusters.
#describe_clusters(options = {}) ⇒ Types::DescribeClustersResponse
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. 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_default_parameters(options = {}) ⇒ Types::DescribeDefaultParametersResponse
Returns the default system parameter information for the DAX caching software.
#describe_events(options = {}) ⇒ Types::DescribeEventsResponse
Returns 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::DescribeParameterGroupsResponse
Returns a list of parameter group descriptions. If a parameter group name is specified, the list will contain only the descriptions for that group.
#describe_parameters(options = {}) ⇒ Types::DescribeParametersResponse
Returns the detailed parameter list for a particular parameter group.
#describe_subnet_groups(options = {}) ⇒ Types::DescribeSubnetGroupsResponse
Returns a list of subnet group descriptions. If a subnet group name is specified, the list will contain only the description of that group.
#increase_replication_factor(options = {}) ⇒ Types::IncreaseReplicationFactorResponse
Adds one or more nodes to a DAX cluster.
#list_tags(options = {}) ⇒ Types::ListTagsResponse
List all of the tags for a DAX cluster. You can call ListTags
up to 10 times per second, per account.
#reboot_node(options = {}) ⇒ Types::RebootNodeResponse
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.
#tag_resource(options = {}) ⇒ Types::TagResourceResponse
Associates a set of tags with a DAX resource. You can call TagResource
up to 5 times per second, per account.
#untag_resource(options = {}) ⇒ Types::UntagResourceResponse
Removes the association of tags from a DAX resource. You can call UntagResource
up to 5 times per second, per account.
#update_cluster(options = {}) ⇒ Types::UpdateClusterResponse
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::UpdateParameterGroupResponse
Modifies 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.
#update_subnet_group(options = {}) ⇒ Types::UpdateSubnetGroupResponse
Modifies an existing subnet group.
#wait_until(waiter_name, params = {}) {|waiter| ... } ⇒ Boolean
Waiters polls an API operation until a resource enters a desired state.
Basic Usage
Waiters 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)
Configuration
You 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: |
---|