# 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).

require 'oci'

# 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::ConfigFileLoader.load_config

# Initialize service client with default config file
database_client = OCI::Database::DatabaseClient.new(config: config)

# Send the request to service, some parameters are not required, see API doc for more info
update_autonomous_vm_cluster_response =
  database_client.update_autonomous_vm_cluster(
    'ocid1.test.oc1..<unique_ID>EXAMPLE-autonomousVmClusterId-Value',
    OCI::Database::Models::UpdateAutonomousVmClusterDetails.new(
      maintenance_window_details:
        OCI::Database::Models::MaintenanceWindow.new(
          preference: 'NO_PREFERENCE',
          patching_mode: 'ROLLING',
          is_custom_action_timeout_enabled: true,
          custom_action_timeout_in_mins: 102,
          is_monthly_patching_enabled: true,
          months: [OCI::Database::Models::Month.new(name: 'AUGUST')],
          weeks_of_month: [1],
          days_of_week: [
            OCI::Database::Models::DayOfWeek.new(name: 'WEDNESDAY')
          ],
          hours_of_day: [2],
          lead_time_in_weeks: 3
        ),
      license_model: 'BRING_YOUR_OWN_LICENSE',
      freeform_tags: {
        'EXAMPLE_KEY_d50lh' => 'EXAMPLE_VALUE_VIdK6DRxKdaWmWmbRXvX'
      },
      defined_tags: {
        'EXAMPLE_KEY_4YwG8' => { 'EXAMPLE_KEY_6iQYm' => 'EXAMPLE--Value' }
      },
      autonomous_data_storage_size_in_tbs: 5959.0317,
      cpu_core_count_per_node: 675,
      total_container_databases: 350
    )
  )

# Get the data from response
puts "#{update_autonomous_vm_cluster_response.data}"