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.
Implementation
Future<CreateDBInstanceReadReplicaResult> createDBInstanceReadReplica({
required String dBInstanceIdentifier,
required String sourceDBInstanceIdentifier,
bool? autoMinorVersionUpgrade,
String? availabilityZone,
String? dBInstanceClass,
int? iops,
String? optionGroupName,
int? port,
bool? publiclyAccessible,
}) 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);
iops?.also((arg) => $request['Iops'] = arg);
optionGroupName?.also((arg) => $request['OptionGroupName'] = arg);
port?.also((arg) => $request['Port'] = arg);
publiclyAccessible?.also((arg) => $request['PubliclyAccessible'] = arg);
final $result = await _protocol.send(
$request,
action: 'CreateDBInstanceReadReplica',
version: '2013-02-12',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
shape: shapes['CreateDBInstanceReadReplicaMessage'],
shapes: shapes,
resultWrapper: 'CreateDBInstanceReadReplicaResult',
);
return CreateDBInstanceReadReplicaResult.fromXml($result);
}