updateAutonomousDatabase method

Future<UpdateAutonomousDatabaseOutput> updateAutonomousDatabase({
  1. required String autonomousDatabaseId,
  2. String? adminPassword,
  3. AdminPasswordSource? adminPasswordSource,
  4. AdminPasswordSourceConfigurationInput? adminPasswordSourceConfiguration,
  5. List<String>? allowlistedIps,
  6. int? autoRefreshFrequencyInSeconds,
  7. int? autoRefreshPointLagInSeconds,
  8. AutonomousMaintenanceScheduleType? autonomousMaintenanceScheduleType,
  9. int? backupRetentionPeriodInDays,
  10. double? byolComputeCountLimit,
  11. double? computeCount,
  12. int? cpuCoreCount,
  13. List<CustomerContact>? customerContactsToSendToOCI,
  14. int? dataStorageSizeInGBs,
  15. int? dataStorageSizeInTBs,
  16. DatabaseEdition? databaseEdition,
  17. String? dbName,
  18. List<DatabaseTool>? dbToolsDetails,
  19. String? dbVersion,
  20. DbWorkload? dbWorkload,
  21. String? displayName,
  22. EncryptionKeyConfigurationInput? encryptionKeyConfiguration,
  23. EncryptionKeyProviderInput? encryptionKeyProvider,
  24. bool? isAutoScalingEnabled,
  25. bool? isAutoScalingForStorageEnabled,
  26. bool? isBackupRetentionLocked,
  27. bool? isDisconnectPeer,
  28. bool? isLocalDataGuardEnabled,
  29. bool? isMtlsConnectionRequired,
  30. bool? isRefreshableClone,
  31. LicenseModel? licenseModel,
  32. int? localAdgAutoFailoverMaxDataLossLimit,
  33. LongTermBackupSchedule? longTermBackupSchedule,
  34. OpenMode? openMode,
  35. String? peerDbId,
  36. PermissionLevel? permissionLevel,
  37. String? privateEndpointIp,
  38. String? privateEndpointLabel,
  39. RefreshableMode? refreshableMode,
  40. String? resourcePoolLeaderId,
  41. ResourcePoolSummary? resourcePoolSummary,
  42. List<ScheduledOperationDetails>? scheduledOperations,
  43. List<String>? standbyAllowlistedIps,
  44. StandbyAllowlistedIpsSource? standbyAllowlistedIpsSource,
  45. DateTime? timeOfAutoRefreshStart,
})

Updates the properties of an Autonomous Database.

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

Parameter autonomousDatabaseId : The unique identifier of the Autonomous Database to update.

Parameter adminPassword : The new 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 autoRefreshFrequencyInSeconds : The frequency, in seconds, at which the refreshable clone Autonomous Database is automatically refreshed.

Parameter autoRefreshPointLagInSeconds : The time lag, in seconds, between the refreshable clone and its source 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 computeCount : The compute capacity, in number of ECPUs or 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 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 new name of the Autonomous Database.

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 new user-friendly name for the Autonomous Database.

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 isDisconnectPeer : Specifies whether to disconnect the Autonomous Database from its peer database.

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 isRefreshableClone : Specifies whether the Autonomous Database is a refreshable clone.

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

Parameter localAdgAutoFailoverMaxDataLossLimit : The maximum data loss limit, in seconds, for automatic failover to the local Oracle Data Guard standby database.

Parameter longTermBackupSchedule : The long-term backup schedule for the Autonomous Database.

Parameter openMode : The mode in which to open the Autonomous Database, either read-only or read/write.

Parameter peerDbId : The unique identifier of the peer Autonomous Database.

Parameter permissionLevel : The permission level of 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 refreshableMode : The refresh mode of the refreshable clone 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 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 timeOfAutoRefreshStart : The date and time at which the automatic refresh of the refreshable clone Autonomous Database starts.

Implementation

Future<UpdateAutonomousDatabaseOutput> updateAutonomousDatabase({
  required String autonomousDatabaseId,
  String? adminPassword,
  AdminPasswordSource? adminPasswordSource,
  AdminPasswordSourceConfigurationInput? adminPasswordSourceConfiguration,
  List<String>? allowlistedIps,
  int? autoRefreshFrequencyInSeconds,
  int? autoRefreshPointLagInSeconds,
  AutonomousMaintenanceScheduleType? autonomousMaintenanceScheduleType,
  int? backupRetentionPeriodInDays,
  double? byolComputeCountLimit,
  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? isDisconnectPeer,
  bool? isLocalDataGuardEnabled,
  bool? isMtlsConnectionRequired,
  bool? isRefreshableClone,
  LicenseModel? licenseModel,
  int? localAdgAutoFailoverMaxDataLossLimit,
  LongTermBackupSchedule? longTermBackupSchedule,
  OpenMode? openMode,
  String? peerDbId,
  PermissionLevel? permissionLevel,
  String? privateEndpointIp,
  String? privateEndpointLabel,
  RefreshableMode? refreshableMode,
  String? resourcePoolLeaderId,
  ResourcePoolSummary? resourcePoolSummary,
  List<ScheduledOperationDetails>? scheduledOperations,
  List<String>? standbyAllowlistedIps,
  StandbyAllowlistedIpsSource? standbyAllowlistedIpsSource,
  DateTime? timeOfAutoRefreshStart,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'Odb.UpdateAutonomousDatabase'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'autonomousDatabaseId': autonomousDatabaseId,
      if (adminPassword != null) 'adminPassword': adminPassword,
      if (adminPasswordSource != null)
        'adminPasswordSource': adminPasswordSource.value,
      if (adminPasswordSourceConfiguration != null)
        'adminPasswordSourceConfiguration': adminPasswordSourceConfiguration,
      if (allowlistedIps != null) 'allowlistedIps': allowlistedIps,
      if (autoRefreshFrequencyInSeconds != null)
        'autoRefreshFrequencyInSeconds': autoRefreshFrequencyInSeconds,
      if (autoRefreshPointLagInSeconds != null)
        'autoRefreshPointLagInSeconds': autoRefreshPointLagInSeconds,
      if (autonomousMaintenanceScheduleType != null)
        'autonomousMaintenanceScheduleType':
            autonomousMaintenanceScheduleType.value,
      if (backupRetentionPeriodInDays != null)
        'backupRetentionPeriodInDays': backupRetentionPeriodInDays,
      if (byolComputeCountLimit != null)
        'byolComputeCountLimit': _s.encodeJsonDouble(byolComputeCountLimit),
      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 (isDisconnectPeer != null) 'isDisconnectPeer': isDisconnectPeer,
      if (isLocalDataGuardEnabled != null)
        'isLocalDataGuardEnabled': isLocalDataGuardEnabled,
      if (isMtlsConnectionRequired != null)
        'isMtlsConnectionRequired': isMtlsConnectionRequired,
      if (isRefreshableClone != null)
        'isRefreshableClone': isRefreshableClone,
      if (licenseModel != null) 'licenseModel': licenseModel.value,
      if (localAdgAutoFailoverMaxDataLossLimit != null)
        'localAdgAutoFailoverMaxDataLossLimit':
            localAdgAutoFailoverMaxDataLossLimit,
      if (longTermBackupSchedule != null)
        'longTermBackupSchedule': longTermBackupSchedule,
      if (openMode != null) 'openMode': openMode.value,
      if (peerDbId != null) 'peerDbId': peerDbId,
      if (permissionLevel != null) 'permissionLevel': permissionLevel.value,
      if (privateEndpointIp != null) 'privateEndpointIp': privateEndpointIp,
      if (privateEndpointLabel != null)
        'privateEndpointLabel': privateEndpointLabel,
      if (refreshableMode != null) 'refreshableMode': refreshableMode.value,
      if (resourcePoolLeaderId != null)
        'resourcePoolLeaderId': resourcePoolLeaderId,
      if (resourcePoolSummary != null)
        'resourcePoolSummary': resourcePoolSummary,
      if (scheduledOperations != null)
        'scheduledOperations': scheduledOperations,
      if (standbyAllowlistedIps != null)
        'standbyAllowlistedIps': standbyAllowlistedIps,
      if (standbyAllowlistedIpsSource != null)
        'standbyAllowlistedIpsSource': standbyAllowlistedIpsSource.value,
      if (timeOfAutoRefreshStart != null)
        'timeOfAutoRefreshStart': iso8601ToJson(timeOfAutoRefreshStart),
    },
  );

  return UpdateAutonomousDatabaseOutput.fromJson(jsonResponse.body);
}