createAutonomousDatabase method

Future<CreateAutonomousDatabaseOutput> createAutonomousDatabase({
  1. String? adminPassword,
  2. AdminPasswordSource? adminPasswordSource,
  3. AdminPasswordSourceConfigurationInput? adminPasswordSourceConfiguration,
  4. List<String>? allowlistedIps,
  5. AutonomousMaintenanceScheduleType? autonomousMaintenanceScheduleType,
  6. int? backupRetentionPeriodInDays,
  7. double? byolComputeCountLimit,
  8. String? characterSet,
  9. String? clientToken,
  10. double? computeCount,
  11. int? cpuCoreCount,
  12. List<CustomerContact>? customerContactsToSendToOCI,
  13. int? dataStorageSizeInGBs,
  14. int? dataStorageSizeInTBs,
  15. DatabaseEdition? databaseEdition,
  16. String? dbName,
  17. List<DatabaseTool>? dbToolsDetails,
  18. String? dbVersion,
  19. DbWorkload? dbWorkload,
  20. String? displayName,
  21. EncryptionKeyConfigurationInput? encryptionKeyConfiguration,
  22. EncryptionKeyProviderInput? encryptionKeyProvider,
  23. bool? isAutoScalingEnabled,
  24. bool? isAutoScalingForStorageEnabled,
  25. bool? isBackupRetentionLocked,
  26. bool? isLocalDataGuardEnabled,
  27. bool? isMtlsConnectionRequired,
  28. LicenseModel? licenseModel,
  29. String? ncharacterSet,
  30. String? odbNetworkId,
  31. String? privateEndpointIp,
  32. String? privateEndpointLabel,
  33. String? resourcePoolLeaderId,
  34. ResourcePoolSummary? resourcePoolSummary,
  35. List<ScheduledOperationDetails>? scheduledOperations,
  36. SourceType? source,
  37. SourceConfiguration? sourceConfiguration,
  38. List<String>? standbyAllowlistedIps,
  39. StandbyAllowlistedIpsSource? standbyAllowlistedIpsSource,
  40. Map<String, String>? tags,
  41. TransportableTablespace? transportableTablespace,
})

Creates a new Autonomous Database.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw ValidationException.

Parameter adminPassword : The password for the ADMIN user of the Autonomous Database.

Parameter adminPasswordSource : The source of the admin password for the Autonomous Database. When set to CUSTOMER_MANAGED_AWS_SECRET, the admin password is retrieved from an Amazon Web Services Secrets Manager secret.

Parameter adminPasswordSourceConfiguration : The configuration of the admin password source for the Autonomous Database.

Parameter allowlistedIps : The list of IP addresses that are allowed to access the Autonomous Database.

Parameter autonomousMaintenanceScheduleType : The maintenance schedule type for the Autonomous Database.

Parameter backupRetentionPeriodInDays : The retention period, in days, for automatic backups of the Autonomous Database.

Parameter byolComputeCountLimit : The maximum number of compute resources that you can allocate to the Autonomous Database under the bring-your-own-license (BYOL) model.

Parameter characterSet : The character set to use for the Autonomous Database.

Parameter clientToken : A client-provided token to ensure the idempotency of the request.

Parameter computeCount : The compute capacity, in number of Elastic CPUs (ECPUs) or Oracle CPUs (OCPUs), to assign to the Autonomous Database.

Parameter cpuCoreCount : The number of CPU cores to allocate to the Autonomous Database.

Parameter customerContactsToSendToOCI : The list of customer contacts to receive operational notifications from Oracle Cloud Infrastructure (OCI) for the Autonomous Database.

Parameter dataStorageSizeInGBs : The size, in gigabytes (GB), of the data volume to allocate for the Autonomous Database.

Parameter dataStorageSizeInTBs : The size, in terabytes (TB), of the data volume to allocate for the Autonomous Database.

Parameter databaseEdition : The Oracle Database edition to apply to the Autonomous Database.

Parameter dbName : The name of the Autonomous Database. The name must begin with an alphabetic character and can contain a maximum of 30 alphanumeric characters. Special characters are not permitted. The name must be unique in the Amazon Web Services account.

Parameter dbToolsDetails : The list of database management tools to enable for the Autonomous Database.

Parameter dbVersion : The Oracle Database software version to use for the Autonomous Database.

Parameter dbWorkload : The intended use of the Autonomous Database, such as transaction processing, data warehouse, JSON database, or APEX.

Parameter displayName : The user-friendly name for the Autonomous Database. The name does not have to be unique.

Parameter encryptionKeyConfiguration : The configuration of the encryption key to use for the Autonomous Database.

Parameter encryptionKeyProvider : The provider of the encryption key to use for the Autonomous Database.

Parameter isAutoScalingEnabled : Specifies whether to enable automatic scaling of the compute resources for the Autonomous Database.

Parameter isAutoScalingForStorageEnabled : Specifies whether to enable automatic scaling of the storage for the Autonomous Database.

Parameter isBackupRetentionLocked : Specifies whether to lock the backup retention period of the Autonomous Database to prevent it from being shortened.

Parameter isLocalDataGuardEnabled : Specifies whether to enable local Oracle Data Guard for the Autonomous Database.

Parameter isMtlsConnectionRequired : Specifies whether mutual TLS (mTLS) authentication is required to connect to the Autonomous Database.

Parameter licenseModel : The Oracle license model to apply to the Autonomous Database.

Parameter ncharacterSet : The national character set to use for the Autonomous Database.

Parameter odbNetworkId : The unique identifier of the ODB network to be used for the Autonomous Database.

Parameter privateEndpointIp : The private endpoint IP address for the Autonomous Database.

Parameter privateEndpointLabel : The private endpoint label for the Autonomous Database.

Parameter resourcePoolLeaderId : The unique identifier of the resource pool leader Autonomous Database.

Parameter resourcePoolSummary : The configuration of the resource pool for the Autonomous Database.

Parameter scheduledOperations : The list of scheduled start and stop times for the Autonomous Database.

Parameter source : The source from which to create the Autonomous Database, such as a clone, backup, or cross-Region copy.

Parameter sourceConfiguration : The configuration details for the source used to create the Autonomous Database.

Parameter standbyAllowlistedIps : The list of IP addresses that are allowed to access the standby Autonomous Database.

Parameter standbyAllowlistedIpsSource : The source of the allowlisted IP addresses for the standby Autonomous Database.

Parameter tags : The list of resource tags to apply to the Autonomous Database. Each tag is a key-value pair with no predefined name, type, or namespace.

Parameter transportableTablespace : The transportable tablespace configuration to use when creating the Autonomous Database.

Implementation

Future<CreateAutonomousDatabaseOutput> createAutonomousDatabase({
  String? adminPassword,
  AdminPasswordSource? adminPasswordSource,
  AdminPasswordSourceConfigurationInput? adminPasswordSourceConfiguration,
  List<String>? allowlistedIps,
  AutonomousMaintenanceScheduleType? autonomousMaintenanceScheduleType,
  int? backupRetentionPeriodInDays,
  double? byolComputeCountLimit,
  String? characterSet,
  String? clientToken,
  double? computeCount,
  int? cpuCoreCount,
  List<CustomerContact>? customerContactsToSendToOCI,
  int? dataStorageSizeInGBs,
  int? dataStorageSizeInTBs,
  DatabaseEdition? databaseEdition,
  String? dbName,
  List<DatabaseTool>? dbToolsDetails,
  String? dbVersion,
  DbWorkload? dbWorkload,
  String? displayName,
  EncryptionKeyConfigurationInput? encryptionKeyConfiguration,
  EncryptionKeyProviderInput? encryptionKeyProvider,
  bool? isAutoScalingEnabled,
  bool? isAutoScalingForStorageEnabled,
  bool? isBackupRetentionLocked,
  bool? isLocalDataGuardEnabled,
  bool? isMtlsConnectionRequired,
  LicenseModel? licenseModel,
  String? ncharacterSet,
  String? odbNetworkId,
  String? privateEndpointIp,
  String? privateEndpointLabel,
  String? resourcePoolLeaderId,
  ResourcePoolSummary? resourcePoolSummary,
  List<ScheduledOperationDetails>? scheduledOperations,
  SourceType? source,
  SourceConfiguration? sourceConfiguration,
  List<String>? standbyAllowlistedIps,
  StandbyAllowlistedIpsSource? standbyAllowlistedIpsSource,
  Map<String, String>? tags,
  TransportableTablespace? transportableTablespace,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'Odb.CreateAutonomousDatabase'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (adminPassword != null) 'adminPassword': adminPassword,
      if (adminPasswordSource != null)
        'adminPasswordSource': adminPasswordSource.value,
      if (adminPasswordSourceConfiguration != null)
        'adminPasswordSourceConfiguration': adminPasswordSourceConfiguration,
      if (allowlistedIps != null) 'allowlistedIps': allowlistedIps,
      if (autonomousMaintenanceScheduleType != null)
        'autonomousMaintenanceScheduleType':
            autonomousMaintenanceScheduleType.value,
      if (backupRetentionPeriodInDays != null)
        'backupRetentionPeriodInDays': backupRetentionPeriodInDays,
      if (byolComputeCountLimit != null)
        'byolComputeCountLimit': _s.encodeJsonDouble(byolComputeCountLimit),
      if (characterSet != null) 'characterSet': characterSet,
      'clientToken': clientToken ?? _s.generateIdempotencyToken(),
      if (computeCount != null)
        'computeCount': _s.encodeJsonDouble(computeCount),
      if (cpuCoreCount != null) 'cpuCoreCount': cpuCoreCount,
      if (customerContactsToSendToOCI != null)
        'customerContactsToSendToOCI': customerContactsToSendToOCI,
      if (dataStorageSizeInGBs != null)
        'dataStorageSizeInGBs': dataStorageSizeInGBs,
      if (dataStorageSizeInTBs != null)
        'dataStorageSizeInTBs': dataStorageSizeInTBs,
      if (databaseEdition != null) 'databaseEdition': databaseEdition.value,
      if (dbName != null) 'dbName': dbName,
      if (dbToolsDetails != null) 'dbToolsDetails': dbToolsDetails,
      if (dbVersion != null) 'dbVersion': dbVersion,
      if (dbWorkload != null) 'dbWorkload': dbWorkload.value,
      if (displayName != null) 'displayName': displayName,
      if (encryptionKeyConfiguration != null)
        'encryptionKeyConfiguration': encryptionKeyConfiguration,
      if (encryptionKeyProvider != null)
        'encryptionKeyProvider': encryptionKeyProvider.value,
      if (isAutoScalingEnabled != null)
        'isAutoScalingEnabled': isAutoScalingEnabled,
      if (isAutoScalingForStorageEnabled != null)
        'isAutoScalingForStorageEnabled': isAutoScalingForStorageEnabled,
      if (isBackupRetentionLocked != null)
        'isBackupRetentionLocked': isBackupRetentionLocked,
      if (isLocalDataGuardEnabled != null)
        'isLocalDataGuardEnabled': isLocalDataGuardEnabled,
      if (isMtlsConnectionRequired != null)
        'isMtlsConnectionRequired': isMtlsConnectionRequired,
      if (licenseModel != null) 'licenseModel': licenseModel.value,
      if (ncharacterSet != null) 'ncharacterSet': ncharacterSet,
      if (odbNetworkId != null) 'odbNetworkId': odbNetworkId,
      if (privateEndpointIp != null) 'privateEndpointIp': privateEndpointIp,
      if (privateEndpointLabel != null)
        'privateEndpointLabel': privateEndpointLabel,
      if (resourcePoolLeaderId != null)
        'resourcePoolLeaderId': resourcePoolLeaderId,
      if (resourcePoolSummary != null)
        'resourcePoolSummary': resourcePoolSummary,
      if (scheduledOperations != null)
        'scheduledOperations': scheduledOperations,
      if (source != null) 'source': source.value,
      if (sourceConfiguration != null)
        'sourceConfiguration': sourceConfiguration,
      if (standbyAllowlistedIps != null)
        'standbyAllowlistedIps': standbyAllowlistedIps,
      if (standbyAllowlistedIpsSource != null)
        'standbyAllowlistedIpsSource': standbyAllowlistedIpsSource.value,
      if (tags != null) 'tags': tags,
      if (transportableTablespace != null)
        'transportableTablespace': transportableTablespace,
    },
  );

  return CreateAutonomousDatabaseOutput.fromJson(jsonResponse.body);
}