You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add support for restoring database/cluster from a snapshot (#19)
* add support for creating database instance from snapshot
* support for restoring clusters
* readme
* Support for creating and deleting (manual) snapshots (#20)
* support for deleting snapshots
* add support for creating snapshots
* fixup
* move to orchestrator functions
* fix readme
Co-authored-by: Tenyo Grozev <[email protected]>
* fixup
* fix else-if workflow
Co-authored-by: Tenyo Grozev <[email protected]>
To get details about a specific database instance or cluster:
@@ -139,57 +196,6 @@ To get details about _all_ database instances in the given account (to list both
139
196
GET http://127.0.0.1:3000/v1/rds/{account}[?all=true]
140
197
```
141
198
142
-
### Modifying database parameters
143
-
144
-
You can specify either cluster or instance parameters in the PUT to modify a cluster or an instance.
145
-
146
-
For example, to change the master password for an Aurora cluster:
147
-
148
-
```
149
-
PUT http://127.0.0.1:3000/v1/rds/{account}/myaurora
150
-
{
151
-
"Cluster": {
152
-
"MasterUserPassword": "EXAMPLE",
153
-
"ApplyImmediately": true
154
-
}
155
-
}
156
-
```
157
-
158
-
### Updating tags for a database
159
-
160
-
You can pass a list of tags (Key/Value pairs) to add or updated on the given database. If there is an RDS cluster and instance with the same name, the tags for both will be updated.
161
-
162
-
```
163
-
PUT http://127.0.0.1:3000/v1/rds/{account}/myaurora
164
-
{
165
-
"Tags": [
166
-
{
167
-
"Key": "NewTag",
168
-
"Value": "new"
169
-
}
170
-
]
171
-
}
172
-
```
173
-
174
-
### Deleting a database
175
-
176
-
By default, a final snapshot is _not_ created when deleting a database instance. You can override that by adding `snapshot=true` query parameter.
The API will check if the database instance belongs to a cluster and will automatically delete the cluster if this is the last member.
183
-
184
-
### Stopping and starting a database/cluster
185
-
186
-
```
187
-
PUT http://127.0.0.1:3000/v1/rds/{account}/myaurora/power
188
-
{
189
-
"state": "stop|start"
190
-
}
191
-
```
192
-
193
199
### Getting a list of snapshots for a database/cluster
194
200
195
201
This will return list of snapshots (with details) for the specified database in either `DBClusterSnapshots` or `DBSnapshots`, depending if it's a cluster or an instance.
@@ -281,6 +287,76 @@ GET http://127.0.0.1:3000/v1/rds/{account}/snapshots/rds:mydbinstance-2021-07-22
281
287
}
282
288
```
283
289
290
+
### Creating a database snapshot
291
+
292
+
This will create a manual snapshot of the specified database.
293
+
294
+
```
295
+
POST http://127.0.0.1:3000/v1/rds/{account}/{db}/snapshots
296
+
{
297
+
"SnapshotIdentifier": "mytestbackup-1"
298
+
}
299
+
```
300
+
301
+
### Deleting a specific snapshot
302
+
303
+
This will delete a manual snapshot (automatic snapshots cannot be deleted but can be controlled by the backup retention period).
You can specify either cluster or instance parameters in the PUT to modify a cluster or an instance.
312
+
313
+
For example, to change the master password for an Aurora cluster:
314
+
315
+
```
316
+
PUT http://127.0.0.1:3000/v1/rds/{account}/myaurora
317
+
{
318
+
"Cluster": {
319
+
"MasterUserPassword": "EXAMPLE",
320
+
"ApplyImmediately": true
321
+
}
322
+
}
323
+
```
324
+
325
+
### Updating tags for a database
326
+
327
+
You can pass a list of tags (Key/Value pairs) to add or updated on the given database. If there is an RDS cluster and instance with the same name, the tags for both will be updated.
328
+
329
+
```
330
+
PUT http://127.0.0.1:3000/v1/rds/{account}/myaurora
331
+
{
332
+
"Tags": [
333
+
{
334
+
"Key": "NewTag",
335
+
"Value": "new"
336
+
}
337
+
]
338
+
}
339
+
```
340
+
341
+
### Deleting a database
342
+
343
+
By default, a final snapshot is _not_ created when deleting a database instance. You can override that by adding `snapshot=true` query parameter.
0 commit comments