# 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_exadb_vm_cluster_response =
  database_client.update_exadb_vm_cluster(
    'ocid1.test.oc1..<unique_ID>EXAMPLE-exadbVmClusterId-Value',
    OCI::Database::Models::UpdateExadbVmClusterDetails.new(
      display_name: 'EXAMPLE-displayName-Value',
      total_e_cpu_count: 51,
      enabled_e_cpu_count: 977,
      vm_file_system_storage:
        OCI::Database::Models::ExadbVmClusterStorageDetails.new(
          total_size_in_gbs: 158
        ),
      node_count: 647,
      license_model: 'BRING_YOUR_OWN_LICENSE',
      ssh_public_keys: %w[EXAMPLE--Value],
      nsg_ids: %w[EXAMPLE--Value],
      backup_network_nsg_ids: %w[EXAMPLE--Value],
      freeform_tags: {
        'EXAMPLE_KEY_tT5w6' => 'EXAMPLE_VALUE_h4kjyU1L7dG2UwucMHiw'
      },
      defined_tags: {
        'EXAMPLE_KEY_BFhCs' => { 'EXAMPLE_KEY_3a2Bf' => 'EXAMPLE--Value' }
      },
      security_attributes: {
        'EXAMPLE_KEY_2LifQ' => { 'EXAMPLE_KEY_8OF4d' => 'EXAMPLE--Value' }
      },
      data_collection_options:
        OCI::Database::Models::DataCollectionOptions.new(
          is_diagnostics_events_enabled: true,
          is_health_monitoring_enabled: false,
          is_incident_logs_enabled: false
        ),
      system_version: 'EXAMPLE-systemVersion-Value',
      grid_image_id: 'ocid1.test.oc1..<unique_ID>EXAMPLE-gridImageId-Value',
      update_action: 'ROLLING_APPLY'
    )
  )

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