createDBInstance method

Future<CreateDBInstanceResult> createDBInstance({
  1. required int allocatedStorage,
  2. required String dBInstanceClass,
  3. required String dBInstanceIdentifier,
  4. required String engine,
  5. required String masterUserPassword,
  6. required String masterUsername,
  7. bool? autoMinorVersionUpgrade,
  8. String? availabilityZone,
  9. int? backupRetentionPeriod,
  10. String? characterSetName,
  11. String? dBName,
  12. String? dBParameterGroupName,
  13. List<String>? dBSecurityGroups,
  14. String? dBSubnetGroupName,
  15. String? engineVersion,
  16. int? iops,
  17. String? licenseModel,
  18. bool? multiAZ,
  19. String? optionGroupName,
  20. int? port,
  21. String? preferredBackupWindow,
  22. String? preferredMaintenanceWindow,
  23. bool? publiclyAccessible,
  24. List<String>? vpcSecurityGroupIds,
})

Implementation

Future<CreateDBInstanceResult> createDBInstance({
  required int allocatedStorage,
  required String dBInstanceClass,
  required String dBInstanceIdentifier,
  required String engine,
  required String masterUserPassword,
  required String masterUsername,
  bool? autoMinorVersionUpgrade,
  String? availabilityZone,
  int? backupRetentionPeriod,
  String? characterSetName,
  String? dBName,
  String? dBParameterGroupName,
  List<String>? dBSecurityGroups,
  String? dBSubnetGroupName,
  String? engineVersion,
  int? iops,
  String? licenseModel,
  bool? multiAZ,
  String? optionGroupName,
  int? port,
  String? preferredBackupWindow,
  String? preferredMaintenanceWindow,
  bool? publiclyAccessible,
  List<String>? vpcSecurityGroupIds,
}) async {
  ArgumentError.checkNotNull(allocatedStorage, 'allocatedStorage');
  ArgumentError.checkNotNull(dBInstanceClass, 'dBInstanceClass');
  ArgumentError.checkNotNull(dBInstanceIdentifier, 'dBInstanceIdentifier');
  ArgumentError.checkNotNull(engine, 'engine');
  ArgumentError.checkNotNull(masterUserPassword, 'masterUserPassword');
  ArgumentError.checkNotNull(masterUsername, 'masterUsername');
  final $request = <String, dynamic>{};
  $request['AllocatedStorage'] = allocatedStorage;
  $request['DBInstanceClass'] = dBInstanceClass;
  $request['DBInstanceIdentifier'] = dBInstanceIdentifier;
  $request['Engine'] = engine;
  $request['MasterUserPassword'] = masterUserPassword;
  $request['MasterUsername'] = masterUsername;
  autoMinorVersionUpgrade
      ?.also((arg) => $request['AutoMinorVersionUpgrade'] = arg);
  availabilityZone?.also((arg) => $request['AvailabilityZone'] = arg);
  backupRetentionPeriod
      ?.also((arg) => $request['BackupRetentionPeriod'] = arg);
  characterSetName?.also((arg) => $request['CharacterSetName'] = arg);
  dBName?.also((arg) => $request['DBName'] = arg);
  dBParameterGroupName?.also((arg) => $request['DBParameterGroupName'] = arg);
  dBSecurityGroups?.also((arg) => $request['DBSecurityGroups'] = arg);
  dBSubnetGroupName?.also((arg) => $request['DBSubnetGroupName'] = arg);
  engineVersion?.also((arg) => $request['EngineVersion'] = 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);
  preferredBackupWindow
      ?.also((arg) => $request['PreferredBackupWindow'] = arg);
  preferredMaintenanceWindow
      ?.also((arg) => $request['PreferredMaintenanceWindow'] = arg);
  publiclyAccessible?.also((arg) => $request['PubliclyAccessible'] = arg);
  vpcSecurityGroupIds?.also((arg) => $request['VpcSecurityGroupIds'] = arg);
  final $result = await _protocol.send(
    $request,
    action: 'CreateDBInstance',
    version: '2013-02-12',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['CreateDBInstanceMessage'],
    shapes: shapes,
    resultWrapper: 'CreateDBInstanceResult',
  );
  return CreateDBInstanceResult.fromXml($result);
}