# This is an automatically generated code sample.
# To make this code sample work in your Oracle Cloud tenancy,
# please replace the values for any parameters whose current values do not fit
# your use case (such as resource IDs, strings containing ‘EXAMPLE’ or ‘unique_id’, and
# boolean, number, and enum parameters with values not fitting your use case).

import oci
from datetime import datetime

# Create a default config using DEFAULT profile in default location
# Refer to
# https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm#SDK_and_CLI_Configuration_File
# for more info
config = oci.config.from_file()


# Initialize service client with default config file
database_client = oci.database.DatabaseClient(config)


# Send the request to service, some parameters are not required, see API
# doc for more info
update_autonomous_database_response = database_client.update_autonomous_database(
    autonomous_database_id="ocid1.test.oc1..<unique_ID>EXAMPLE-autonomousDatabaseId-Value",
    update_autonomous_database_details=oci.database.models.UpdateAutonomousDatabaseDetails(
        backup_retention_period_in_days=1430,
        compute_model="ECPU",
        in_memory_percentage=698,
        local_adg_auto_failover_max_data_loss_limit=730,
        cpu_core_count=91,
        long_term_backup_schedule=oci.database.models.LongTermBackUpScheduleDetails(
            repeat_cadence="ONE_TIME",
            time_of_backup=datetime.strptime(
                "2013-01-01T19:35:10.936Z",
                "%Y-%m-%dT%H:%M:%S.%fZ"),
            retention_period_in_days=3285,
            is_disabled=False),
        is_dev_tier=True,
        compute_count=4031.7673,
        ocpu_count=8847.49,
        data_storage_size_in_tbs=32,
        data_storage_size_in_gbs=31112,
        display_name="EXAMPLE-displayName-Value",
        is_free_tier=False,
        admin_password="EXAMPLE-adminPassword-Value",
        db_name="EXAMPLE-dbName-Value",
        freeform_tags={
            'EXAMPLE_KEY_l5d5a': 'EXAMPLE_VALUE_c6wHZcP4MRFu7CAfls8W'},
        defined_tags={
            'EXAMPLE_KEY_KyaDn': {
                'EXAMPLE_KEY_So4Ye': 'EXAMPLE--Value'}},
        db_workload="APEX",
        license_model="BRING_YOUR_OWN_LICENSE",
        is_access_control_enabled=False,
        whitelisted_ips=["EXAMPLE--Value"],
        are_primary_whitelisted_ips_used=False,
        standby_whitelisted_ips=["EXAMPLE--Value"],
        is_auto_scaling_enabled=True,
        is_refreshable_clone=True,
        refreshable_mode="MANUAL",
        is_local_data_guard_enabled=True,
        is_data_guard_enabled=True,
        peer_db_id="ocid1.test.oc1..<unique_ID>EXAMPLE-peerDbId-Value",
        db_version="EXAMPLE-dbVersion-Value",
        open_mode="READ_WRITE",
        permission_level="UNRESTRICTED",
        subnet_id="ocid1.test.oc1..<unique_ID>EXAMPLE-subnetId-Value",
        private_endpoint_label="EXAMPLE-privateEndpointLabel-Value",
        private_endpoint_ip="EXAMPLE-privateEndpointIp-Value",
        nsg_ids=["EXAMPLE--Value"],
        auto_refresh_frequency_in_seconds=420237,
        auto_refresh_point_lag_in_seconds=286836,
        time_of_auto_refresh_start=datetime.strptime(
            "2025-11-16T01:12:05.456Z",
            "%Y-%m-%dT%H:%M:%S.%fZ"),
        customer_contacts=[
            oci.database.models.CustomerContact(
                email="EXAMPLE-email-Value")],
        is_mtls_connection_required=False,
        resource_pool_leader_id="ocid1.test.oc1..<unique_ID>EXAMPLE-resourcePoolLeaderId-Value",
        resource_pool_summary=oci.database.models.ResourcePoolSummary(
            pool_size=599,
            is_disabled=True),
        scheduled_operations=[
            oci.database.models.ScheduledOperationDetails(
                day_of_week=oci.database.models.DayOfWeek(
                    name="MONDAY"),
                scheduled_start_time="EXAMPLE-scheduledStartTime-Value",
                scheduled_stop_time="EXAMPLE-scheduledStopTime-Value")],
        is_auto_scaling_for_storage_enabled=False,
        database_edition="STANDARD_EDITION",
        db_tools_details=[
            oci.database.models.DatabaseTool(
                name="DATA_TRANSFORMS",
                is_enabled=False,
                compute_count=212.81769,
                max_idle_time_in_minutes=422)],
        secret_id="ocid1.test.oc1..<unique_ID>EXAMPLE-secretId-Value",
        secret_version_number=28),
    if_match="EXAMPLE-ifMatch-Value",
    opc_request_id="VIAFRLKZSMRVTURFVZ8Z<unique_ID>")

# Get the data from response
print(update_autonomous_database_response.data)