restoreDBInstanceFromDBSnapshot method
Future<RestoreDBInstanceFromDBSnapshotResult>
restoreDBInstanceFromDBSnapshot({
- required String dBInstanceIdentifier,
- required String dBSnapshotIdentifier,
- bool? autoMinorVersionUpgrade,
- String? availabilityZone,
- String? dBInstanceClass,
- String? dBName,
- String? dBSubnetGroupName,
- String? engine,
- int? iops,
- String? licenseModel,
- bool? multiAZ,
- String? optionGroupName,
- int? port,
- bool? publiclyAccessible,
May throw DBInstanceAlreadyExistsFault. May throw DBSnapshotNotFoundFault. May throw InstanceQuotaExceededFault. May throw InsufficientDBInstanceCapacityFault. May throw InvalidDBSnapshotStateFault. May throw StorageQuotaExceededFault. May throw InvalidVPCNetworkStateFault. May throw InvalidRestoreFault. May throw DBSubnetGroupNotFoundFault. May throw DBSubnetGroupDoesNotCoverEnoughAZs. May throw InvalidSubnet. May throw ProvisionedIopsNotAvailableInAZFault. May throw OptionGroupNotFoundFault.
Implementation
Future<RestoreDBInstanceFromDBSnapshotResult>
restoreDBInstanceFromDBSnapshot({
required String dBInstanceIdentifier,
required String dBSnapshotIdentifier,
bool? autoMinorVersionUpgrade,
String? availabilityZone,
String? dBInstanceClass,
String? dBName,
String? dBSubnetGroupName,
String? engine,
int? iops,
String? licenseModel,
bool? multiAZ,
String? optionGroupName,
int? port,
bool? publiclyAccessible,
}) async {
ArgumentError.checkNotNull(dBInstanceIdentifier, 'dBInstanceIdentifier');
ArgumentError.checkNotNull(dBSnapshotIdentifier, 'dBSnapshotIdentifier');
final $request = <String, dynamic>{};
$request['DBInstanceIdentifier'] = dBInstanceIdentifier;
$request['DBSnapshotIdentifier'] = dBSnapshotIdentifier;
autoMinorVersionUpgrade
?.also((arg) => $request['AutoMinorVersionUpgrade'] = arg);
availabilityZone?.also((arg) => $request['AvailabilityZone'] = arg);
dBInstanceClass?.also((arg) => $request['DBInstanceClass'] = arg);
dBName?.also((arg) => $request['DBName'] = arg);
dBSubnetGroupName?.also((arg) => $request['DBSubnetGroupName'] = arg);
engine?.also((arg) => $request['Engine'] = arg);
iops?.also((arg) => $request['Iops'] = arg);
licenseModel?.also((arg) => $request['LicenseModel'] = arg);
multiAZ?.also((arg) => $request['MultiAZ'] = 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: 'RestoreDBInstanceFromDBSnapshot',
version: '2013-01-10',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
shape: shapes['RestoreDBInstanceFromDBSnapshotMessage'],
shapes: shapes,
resultWrapper: 'RestoreDBInstanceFromDBSnapshotResult',
);
return RestoreDBInstanceFromDBSnapshotResult.fromXml($result);
}