# 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
jms_client = OCI::Jms::JavaManagementServiceClient.new(config: config)

# Send the request to service, some parameters are not required, see API doc for more info
update_fleet_advanced_feature_configuration_response =
  jms_client.update_fleet_advanced_feature_configuration(
    'ocid1.test.oc1..<unique_ID>EXAMPLE-fleetId-Value',
    OCI::Jms::Models::UpdateFleetAdvancedFeatureConfigurationDetails.new(
      analytic_namespace: 'EXAMPLE-analyticNamespace-Value',
      analytic_bucket_name: 'EXAMPLE-analyticBucketName-Value',
      lcm:
        OCI::Jms::Models::Lcm.new(
          is_enabled: false,
          post_installation_actions:
            OCI::Jms::Models::PostInstallationActionSettings.new(
              disabled_tls_versions: %w[TLS_1_0 TLS_1_1],
              should_replace_certificates_operating_system: true,
              minimum_key_size_settings:
                OCI::Jms::Models::MinimumKeySizeSettings.new(
                  tls: [
                    OCI::Jms::Models::KeySizeAlgorithm.new(
                      name: 'EC', key_size: 311
                    )
                  ],
                  jar: [
                    OCI::Jms::Models::KeySizeAlgorithm.new(
                      name: 'DH', key_size: 148
                    )
                  ],
                  certpath: [
                    OCI::Jms::Models::KeySizeAlgorithm.new(
                      name: 'DSA', key_size: 443
                    )
                  ]
                ),
              add_logging_handler: false,
              global_logging_level: 'OFF',
              proxies:
                OCI::Jms::Models::Proxies.new(
                  use_system_proxies: false,
                  http_proxy_host: 'EXAMPLE-httpProxyHost-Value',
                  http_proxy_port: 18_807,
                  https_proxy_host: 'EXAMPLE-httpsProxyHost-Value',
                  https_proxy_port: 5594,
                  ftp_proxy_host: 'EXAMPLE-ftpProxyHost-Value',
                  ftp_proxy_port: 40_429,
                  socks_proxy_host: 'EXAMPLE-socksProxyHost-Value',
                  socks_proxy_port: 7613
                )
            )
        ),
      crypto_event_analysis:
        OCI::Jms::Models::CryptoEventAnalysis.new(
          is_enabled: true,
          summarized_events_log:
            OCI::Jms::Models::SummarizedEventsLog.new(
              log_group_id:
                'ocid1.test.oc1..<unique_ID>EXAMPLE-logGroupId-Value',
              log_id: 'ocid1.test.oc1..<unique_ID>EXAMPLE-logId-Value'
            )
        ),
      advanced_usage_tracking:
        OCI::Jms::Models::AdvancedUsageTracking.new(is_enabled: true),
      jfr_recording: OCI::Jms::Models::JfrRecording.new(is_enabled: true),
      performance_tuning_analysis:
        OCI::Jms::Models::PerformanceTuningAnalysis.new(is_enabled: true),
      java_migration_analysis:
        OCI::Jms::Models::JavaMigrationAnalysis.new(is_enabled: false)
    )
  )

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