/
dax.ex
285 lines (218 loc) · 8.5 KB
/
dax.ex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
# WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
# See https://github.com/aws-beam/aws-codegen for more details.
defmodule AWS.DAX do
@moduledoc """
DAX is a managed caching service engineered for Amazon DynamoDB.
DAX dramatically speeds up database reads by caching frequently-accessed data
from DynamoDB, so applications can access that data with sub-millisecond
latency. You can create a DAX cluster easily, using the AWS Management Console.
With a few simple modifications to your code, your application can begin taking
advantage of the DAX cluster and realize significant improvements in read
performance.
"""
alias AWS.Client
alias AWS.Request
def metadata do
%{
abbreviation: "Amazon DAX",
api_version: "2017-04-19",
content_type: "application/x-amz-json-1.1",
credential_scope: nil,
endpoint_prefix: "dax",
global?: false,
protocol: "json",
service_id: "DAX",
signature_version: "v4",
signing_name: "dax",
target_prefix: "AmazonDAXV3"
}
end
@doc """
Creates a DAX cluster.
All nodes in the cluster run the same DAX caching software.
"""
def create_cluster(%Client{} = client, input, options \\ []) do
meta = metadata()
Request.request_post(client, meta, "CreateCluster", input, options)
end
@doc """
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.
"""
def create_parameter_group(%Client{} = client, input, options \\ []) do
meta = metadata()
Request.request_post(client, meta, "CreateParameterGroup", input, options)
end
@doc """
Creates a new subnet group.
"""
def create_subnet_group(%Client{} = client, input, options \\ []) do
meta = metadata()
Request.request_post(client, meta, "CreateSubnetGroup", input, options)
end
@doc """
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.
"""
def decrease_replication_factor(%Client{} = client, input, options \\ []) do
meta = metadata()
Request.request_post(client, meta, "DecreaseReplicationFactor", input, options)
end
@doc """
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.
"""
def delete_cluster(%Client{} = client, input, options \\ []) do
meta = metadata()
Request.request_post(client, meta, "DeleteCluster", input, options)
end
@doc """
Deletes the specified parameter group.
You cannot delete a parameter group if it is associated with any DAX clusters.
"""
def delete_parameter_group(%Client{} = client, input, options \\ []) do
meta = metadata()
Request.request_post(client, meta, "DeleteParameterGroup", input, options)
end
@doc """
Deletes a subnet group.
You cannot delete a subnet group if it is associated with any DAX clusters.
"""
def delete_subnet_group(%Client{} = client, input, options \\ []) do
meta = metadata()
Request.request_post(client, meta, "DeleteSubnetGroup", input, options)
end
@doc """
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.
"""
def describe_clusters(%Client{} = client, input, options \\ []) do
meta = metadata()
Request.request_post(client, meta, "DescribeClusters", input, options)
end
@doc """
Returns the default system parameter information for the DAX caching software.
"""
def describe_default_parameters(%Client{} = client, input, options \\ []) do
meta = metadata()
Request.request_post(client, meta, "DescribeDefaultParameters", input, options)
end
@doc """
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.
"""
def describe_events(%Client{} = client, input, options \\ []) do
meta = metadata()
Request.request_post(client, meta, "DescribeEvents", input, options)
end
@doc """
Returns a list of parameter group descriptions.
If a parameter group name is specified, the list will contain only the
descriptions for that group.
"""
def describe_parameter_groups(%Client{} = client, input, options \\ []) do
meta = metadata()
Request.request_post(client, meta, "DescribeParameterGroups", input, options)
end
@doc """
Returns the detailed parameter list for a particular parameter group.
"""
def describe_parameters(%Client{} = client, input, options \\ []) do
meta = metadata()
Request.request_post(client, meta, "DescribeParameters", input, options)
end
@doc """
Returns a list of subnet group descriptions.
If a subnet group name is specified, the list will contain only the description
of that group.
"""
def describe_subnet_groups(%Client{} = client, input, options \\ []) do
meta = metadata()
Request.request_post(client, meta, "DescribeSubnetGroups", input, options)
end
@doc """
Adds one or more nodes to a DAX cluster.
"""
def increase_replication_factor(%Client{} = client, input, options \\ []) do
meta = metadata()
Request.request_post(client, meta, "IncreaseReplicationFactor", input, options)
end
@doc """
List all of the tags for a DAX cluster.
You can call `ListTags` up to 10 times per second, per account.
"""
def list_tags(%Client{} = client, input, options \\ []) do
meta = metadata()
Request.request_post(client, meta, "ListTags", input, options)
end
@doc """
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.
"""
def reboot_node(%Client{} = client, input, options \\ []) do
meta = metadata()
Request.request_post(client, meta, "RebootNode", input, options)
end
@doc """
Associates a set of tags with a DAX resource.
You can call `TagResource` up to 5 times per second, per account.
"""
def tag_resource(%Client{} = client, input, options \\ []) do
meta = metadata()
Request.request_post(client, meta, "TagResource", input, options)
end
@doc """
Removes the association of tags from a DAX resource.
You can call `UntagResource` up to 5 times per second, per account.
"""
def untag_resource(%Client{} = client, input, options \\ []) do
meta = metadata()
Request.request_post(client, meta, "UntagResource", input, options)
end
@doc """
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.
"""
def update_cluster(%Client{} = client, input, options \\ []) do
meta = metadata()
Request.request_post(client, meta, "UpdateCluster", input, options)
end
@doc """
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.
"""
def update_parameter_group(%Client{} = client, input, options \\ []) do
meta = metadata()
Request.request_post(client, meta, "UpdateParameterGroup", input, options)
end
@doc """
Modifies an existing subnet group.
"""
def update_subnet_group(%Client{} = client, input, options \\ []) do
meta = metadata()
Request.request_post(client, meta, "UpdateSubnetGroup", input, options)
end
end