startDBInstanceAutomatedBackupsReplication method
Enables replication of automated backups to a different Amazon Web Services Region.
This command doesn't apply to RDS Custom.
For more information, see Replicating Automated Backups to Another Amazon Web Services Region in the Amazon RDS User Guide.
May throw DBInstanceAutomatedBackupQuotaExceededFault.
May throw DBInstanceNotFoundFault.
May throw InvalidDBInstanceAutomatedBackupStateFault.
May throw InvalidDBInstanceStateFault.
May throw KMSKeyNotAccessibleFault.
May throw StorageTypeNotSupportedFault.
Parameter sourceDBInstanceArn :
The Amazon Resource Name (ARN) of the source DB instance for the
replicated automated backups, for example,
arn:aws:rds:us-west-2:123456789012:db:mydatabase.
Parameter backupRetentionPeriod :
The retention period for the replicated automated backups.
Parameter kmsKeyId :
The Amazon Web Services KMS key identifier for encryption of the
replicated automated backups. The KMS key ID is the Amazon Resource Name
(ARN) for the KMS encryption key in the destination Amazon Web Services
Region, for example,
arn:aws:kms:us-east-1:123456789012:key/AKIAIOSFODNN7EXAMPLE.
Parameter preSignedUrl :
In an Amazon Web Services GovCloud (US) Region, an URL that contains a
Signature Version 4 signed request for the
StartDBInstanceAutomatedBackupsReplication operation to call
in the Amazon Web Services Region of the source DB instance. The presigned
URL must be a valid request for the
StartDBInstanceAutomatedBackupsReplication API operation that
can run in the Amazon Web Services Region that contains the source DB
instance.
This setting applies only to Amazon Web Services GovCloud (US) Regions. It's ignored in other Amazon Web Services Regions.
To learn how to generate a Signature Version 4 signed request, see Authenticating Requests: Using Query Parameters (Amazon Web Services Signature Version 4) and Signature Version 4 Signing Process.
Parameter tags :
A list of tags to associate with the replicated automated backups.
Implementation
Future<StartDBInstanceAutomatedBackupsReplicationResult>
startDBInstanceAutomatedBackupsReplication({
required String sourceDBInstanceArn,
int? backupRetentionPeriod,
String? kmsKeyId,
String? preSignedUrl,
List<Tag>? tags,
}) async {
final $request = <String, String>{
'SourceDBInstanceArn': sourceDBInstanceArn,
if (backupRetentionPeriod != null)
'BackupRetentionPeriod': backupRetentionPeriod.toString(),
if (kmsKeyId != null) 'KmsKeyId': kmsKeyId,
if (preSignedUrl != null) 'PreSignedUrl': preSignedUrl,
if (tags != null)
if (tags.isEmpty)
'Tags': ''
else
for (var i1 = 0; i1 < tags.length; i1++)
for (var e3 in tags[i1].toQueryMap().entries)
'Tags.Tag.${i1 + 1}.${e3.key}': e3.value,
};
final $result = await _protocol.send(
$request,
action: 'StartDBInstanceAutomatedBackupsReplication',
version: '2014-10-31',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
resultWrapper: 'StartDBInstanceAutomatedBackupsReplicationResult',
);
return StartDBInstanceAutomatedBackupsReplicationResult.fromXml($result);
}