createDBInstanceReadReplica method
May throw DBInstanceAlreadyExistsFault. May throw InsufficientDBInstanceCapacityFault. May throw DBParameterGroupNotFoundFault. May throw DBSecurityGroupNotFoundFault. May throw InstanceQuotaExceededFault. May throw StorageQuotaExceededFault. May throw DBInstanceNotFoundFault. May throw InvalidDBInstanceStateFault. May throw DBSubnetGroupNotFoundFault. May throw DBSubnetGroupDoesNotCoverEnoughAZs. May throw InvalidSubnet. May throw InvalidVPCNetworkStateFault. May throw ProvisionedIopsNotAvailableInAZFault. May throw OptionGroupNotFoundFault. May throw DBSubnetGroupNotAllowedFault. May throw InvalidDBSubnetGroupFault.
Implementation
Future<CreateDBInstanceReadReplicaResult> createDBInstanceReadReplica({
required String dBInstanceIdentifier,
required String sourceDBInstanceIdentifier,
bool? autoMinorVersionUpgrade,
String? availabilityZone,
String? dBInstanceClass,
String? dBSubnetGroupName,
int? iops,
String? optionGroupName,
int? port,
bool? publiclyAccessible,
List<Tag>? tags,
}) async {
ArgumentError.checkNotNull(dBInstanceIdentifier, 'dBInstanceIdentifier');
ArgumentError.checkNotNull(
sourceDBInstanceIdentifier, 'sourceDBInstanceIdentifier');
final $request = <String, dynamic>{};
$request['DBInstanceIdentifier'] = dBInstanceIdentifier;
$request['SourceDBInstanceIdentifier'] = sourceDBInstanceIdentifier;
autoMinorVersionUpgrade
?.also((arg) => $request['AutoMinorVersionUpgrade'] = arg);
availabilityZone?.also((arg) => $request['AvailabilityZone'] = arg);
dBInstanceClass?.also((arg) => $request['DBInstanceClass'] = arg);
dBSubnetGroupName?.also((arg) => $request['DBSubnetGroupName'] = arg);
iops?.also((arg) => $request['Iops'] = arg);
optionGroupName?.also((arg) => $request['OptionGroupName'] = arg);
port?.also((arg) => $request['Port'] = arg);
publiclyAccessible?.also((arg) => $request['PubliclyAccessible'] = arg);
tags?.also((arg) => $request['Tags'] = arg);
final $result = await _protocol.send(
$request,
action: 'CreateDBInstanceReadReplica',
version: '2013-09-09',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
shape: shapes['CreateDBInstanceReadReplicaMessage'],
shapes: shapes,
resultWrapper: 'CreateDBInstanceReadReplicaResult',
);
return CreateDBInstanceReadReplicaResult.fromXml($result);
}