Skip to content

RDS

Bases: DuploResourceV3

Resource for managing RDS instances.

Commands

apply

Apply a RDS

Create or Update a RDS resource with Duplocloud cli.

CLI Usage

duploctl rds apply -f 'rds.yaml'
Contents of the rds.yaml file
Identifier: mydb01
MasterUsername: fuzlletonnian
MasterPassword: superstrongpassword
Engine: 0
EngineVersion: 8.0.40
AllocatedStorage: 30
Cloud: 0
StorageType: gp3
SizeEx: db.t3.small

Returns:

Name Type Description
message dict

Success message.

Parameters:

--file, -f, --cli-input
A file to read the input from
FileType('r') action: YamlAction
--patches, --add, --remove, --copy, --replace, --test, --move
The json patch to apply
str action: JsonPatchAction

change_password

Change the password of a DB instance.

Parameters:

name positional
The resource name
str
password positional
The password to use
str
--save-secret, --save
Save the secret to secrets manager.

create

Create a DB instance.

Model: AmazonRDSRequest
{
  "description": "AmazonRDSRequest",
  "properties": {},
  "title": "AmazonRDSRequest",
  "type": "object"
}

Parameters:

--file, -f, --cli-input
A file to read the input from
AmazonRDSRequest action: YamlAction

delete

Delete a DB instance by name.

CLI Usage
duploctl rds delete <name>

Returns:

Name Type Description
message dict

A success message.

Raises:

Type Description
DuploError

If the DB instance could not be found or deleted.

Parameters:

name positional
The resource name
str

engine_versions

List supported RDS engine versions and instance types.

final_snapshot

Toggle final snapshot for a DB instance.

Parameters:

name positional
The resource name
str
--enable, -y
Enable or disable the feature
bool action: BooleanOptionalAction
--immediate, -i
Apply the change immediately

find

Find RDS resources by name.

cli usage
duploctl rds find <name>

Returns:

Name Type Description
resource dict

The RDS object.

Raises:

Type Description
DuploError

If the {{kind}} could not be found.

Parameters:

name positional
The resource name
str

find_cluster

Find a DB instance by name.

Returns: The DB instance object. Raises: DuploError: If the DB instance could not be found.

Parameters:

name positional
The resource name
str

iam_auth

Toggle IAM authentication for a DB instance.

Parameters:

name positional
The resource name
str
--enable, -y
Enable or disable the feature
bool action: BooleanOptionalAction
--immediate, -i
Apply the change immediately

list

Retrieve a List of RDS resources

cli usage
duploctl rds list

Returns:

Name Type Description
list list

A list of RDS.

logging

Enable or disable logging for a DB instance.

Parameters:

name positional
The resource name
str
--enable, -y
Enable or disable the feature
bool action: BooleanOptionalAction

modify

Modify a DB instance via the ModifyRDSDBInstance endpoint.

Sends an arbitrary request body to the AWS ModifyRDSDBInstance API for the named DB instance. Used internally by higher-level commands like iam_auth, final_snapshot, and retention_period.

CLI Usage
duploctl rds modify <name> -f payload.yaml

Returns:

Name Type Description
message dict

A success message.

Parameters:

name positional
The resource name
str
--file, -f, --cli-input
A file to read the input from
FileType('r') action: YamlAction

reboot

Reboot a DB instance.

Parameters:

name positional
The resource name
str

restore

Restore a DB instance from a snapshot.

Parameters:

name positional
The resource name
str
--target, --target-name
The target name to use
str
--time, --time
The time to use
str

retention_period

Set the retention period for a DB instance.

Parameters:

name positional
The resource name
str
days positional
The days to use
int
--immediate, -i
Apply the change immediately

set_instance_size

Set the size of a DB instance.

Parameters:

name positional
The resource name
str
size positional
The instance size to use
str

set_monitor_interval

Set the monitoring interval for a DB instance.

Parameters:

name positional
The resource name
str
interval positional
The monitoring interval to use
int
1 5 10 15 30 60
--immediate, -i
Apply the change immediately

snapshot

Take a snapshot of a DB instance.

Parameters:

name positional
The resource name
str

start

Start a DB instance, or its cluster for Aurora/cluster engines.

Mirror of stop: routes Aurora/cluster engines to the cluster start endpoint and regular RDS to the instance start endpoint. Aurora Serverless v1 resumes automatically and is skipped.

CLI Usage
duploctl rds start <name>

Returns:

Name Type Description
message

A success message.

Parameters:

name positional
The resource name
str

stop

Stop a DB instance, or its cluster for Aurora/cluster engines.

Aurora and other cluster engines cannot be stopped at the member instance level; AWS only supports stop/start on the cluster. This command inspects the named resource's engine and routes to the correct existing endpoint. Aurora Serverless v1 auto-pauses and is skipped.

CLI Usage
duploctl rds stop <name>

Returns:

Name Type Description
message

A success message.

Parameters:

name positional
The resource name
str

update

Update a V3 resource by name.

Returns:

Name Type Description
message

Success message.

Raises:

Type Description
DuploError

If the resource could not be created.

Parameters:

name positional
The resource name
str
--file, -f, --cli-input
A file to read the input from
FileType('r') action: YamlAction
--patches, --add, --remove, --copy, --replace, --test, --move
The json patch to apply
str action: JsonPatchAction

Methods

name_from_body

start_resources

Start every RDS resource in the tenant with correct routing.

Mirror of stop_resources.

Parameters:

Name Type Description Default
exclude

Instance identifiers to leave stopped.

()

Returns:

Type Description

A list of (name, DuploError) for resources that failed for a

genuine reason (empty if all succeeded or were benign/skipped).

stop_resources

Stop every RDS resource in the tenant with correct routing.

Lists all RDS resources, classifies each by engine, and stops them: regular instances via the instance endpoint, Aurora/cluster engines via the cluster endpoint (deduped so a multi-node cluster is stopped once), and Aurora Serverless v1 / DocumentDB skipped. Resources already stopped/stopping are treated as benign.

Parameters:

Name Type Description Default
exclude

Instance identifiers to leave running.

()

Returns:

Type Description

A list of (name, DuploError) for resources that failed for a

genuine reason (empty if all succeeded or were benign/skipped).