// 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).
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Oci.JmsService;
using Oci.Common;
using Oci.Common.Auth;
namespace Oci.Sdk.DotNet.Example.Jms
{
public class UpdateFleetAdvancedFeatureConfigurationExample
{
public static async Task Main()
{
// Create a request and dependent object(s).
var updateFleetAdvancedFeatureConfigurationDetails = new Oci.JmsService.Models.UpdateFleetAdvancedFeatureConfigurationDetails
{
AnalyticNamespace = "EXAMPLE-analyticNamespace-Value",
AnalyticBucketName = "EXAMPLE-analyticBucketName-Value",
Lcm = new Oci.JmsService.Models.Lcm
{
IsEnabled = true,
PostInstallationActions = new Oci.JmsService.Models.PostInstallationActionSettings
{
DisabledTlsVersions = new List<Oci.JmsService.Models.TlsVersions>
{
Oci.JmsService.Models.TlsVersions.Tls10,
Oci.JmsService.Models.TlsVersions.Tls11
},
ShouldReplaceCertificatesOperatingSystem = false,
MinimumKeySizeSettings = new Oci.JmsService.Models.MinimumKeySizeSettings
{
Tls = new List<Oci.JmsService.Models.KeySizeAlgorithm>
{
new Oci.JmsService.Models.KeySizeAlgorithm
{
Name = Oci.JmsService.Models.Algorithms.Dh,
KeySize = 534
}
},
Jar = new List<Oci.JmsService.Models.KeySizeAlgorithm>
{
new Oci.JmsService.Models.KeySizeAlgorithm
{
Name = Oci.JmsService.Models.Algorithms.Dh,
KeySize = 405
}
},
Certpath = new List<Oci.JmsService.Models.KeySizeAlgorithm>
{
new Oci.JmsService.Models.KeySizeAlgorithm
{
Name = Oci.JmsService.Models.Algorithms.Ec,
KeySize = 925
}
}
},
AddLoggingHandler = false,
GlobalLoggingLevel = Oci.JmsService.Models.GlobalLoggingLevel.Severe,
Proxies = new Oci.JmsService.Models.Proxies
{
UseSystemProxies = false,
HttpProxyHost = "EXAMPLE-httpProxyHost-Value",
HttpProxyPort = 59129,
HttpsProxyHost = "EXAMPLE-httpsProxyHost-Value",
HttpsProxyPort = 49793,
FtpProxyHost = "EXAMPLE-ftpProxyHost-Value",
FtpProxyPort = 35484,
SocksProxyHost = "EXAMPLE-socksProxyHost-Value",
SocksProxyPort = 4147
}
}
},
CryptoEventAnalysis = new Oci.JmsService.Models.CryptoEventAnalysis
{
IsEnabled = true,
SummarizedEventsLog = new Oci.JmsService.Models.SummarizedEventsLog
{
LogGroupId = "ocid1.test.oc1..<unique_ID>EXAMPLE-logGroupId-Value",
LogId = "ocid1.test.oc1..<unique_ID>EXAMPLE-logId-Value"
}
},
AdvancedUsageTracking = new Oci.JmsService.Models.AdvancedUsageTracking
{
IsEnabled = false
},
JfrRecording = new Oci.JmsService.Models.JfrRecording
{
IsEnabled = false
},
PerformanceTuningAnalysis = new Oci.JmsService.Models.PerformanceTuningAnalysis
{
IsEnabled = false
},
JavaMigrationAnalysis = new Oci.JmsService.Models.JavaMigrationAnalysis
{
IsEnabled = true
}
};
var updateFleetAdvancedFeatureConfigurationRequest = new Oci.JmsService.Requests.UpdateFleetAdvancedFeatureConfigurationRequest
{
FleetId = "ocid1.test.oc1..<unique_ID>EXAMPLE-fleetId-Value",
UpdateFleetAdvancedFeatureConfigurationDetails = updateFleetAdvancedFeatureConfigurationDetails,
OpcRetryToken = "EXAMPLE-opcRetryToken-Value",
IfMatch = "EXAMPLE-ifMatch-Value",
OpcRequestId = "79PDCMTG57WND5DFXI75<unique_ID>"
};
// Create a default authentication provider that uses the DEFAULT
// profile in the configuration file.
// Refer to <see href="https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm#SDK_and_CLI_Configuration_File>the public documentation</see> on how to prepare a configuration file.
var provider = new ConfigFileAuthenticationDetailsProvider("DEFAULT");
try
{
// Create a service client and send the request.
using (var client = new JavaManagementServiceClient(provider, new ClientConfiguration()))
{
var response = await client.UpdateFleetAdvancedFeatureConfiguration(updateFleetAdvancedFeatureConfigurationRequest);
// Retrieve value from the response.
var analyticNamespaceValue = response.FleetAdvancedFeatureConfiguration.AnalyticNamespace;
}
}
catch (Exception e)
{
Console.WriteLine($"UpdateFleetAdvancedFeatureConfiguration Failed with {e.Message}");
throw e;
}
}
}
}