// 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.OpsiService;
using Oci.Common;
using Oci.Common.Auth;
namespace Oci.Sdk.DotNet.Example.Opsi
{
public class SummarizeExadataInsightResourceForecastTrendExample
{
public static async Task Main()
{
// Create a request and dependent object(s).
var summarizeExadataInsightResourceForecastTrendRequest = new Oci.OpsiService.Requests.SummarizeExadataInsightResourceForecastTrendRequest
{
ResourceType = "EXAMPLE-resourceType-Value",
ResourceMetric = "EXAMPLE-resourceMetric-Value",
ExadataInsightId = "ocid1.test.oc1..<unique_ID>EXAMPLE-exadataInsightId-Value",
AnalysisTimeInterval = "EXAMPLE-analysisTimeInterval-Value",
TimeIntervalStart = DateTime.Parse("02/11/2035 09:16:37"),
TimeIntervalEnd = DateTime.Parse("08/23/2025 17:20:46"),
DatabaseInsightId = new List<string>
{
"EXAMPLE--Value"
},
HostInsightId = new List<string>
{
"EXAMPLE--Value"
},
StorageServerName = new List<string>
{
"EXAMPLE--Value"
},
ExadataType = new List<string>
{
"EXAMPLE--Value"
},
Statistic = Oci.OpsiService.Requests.SummarizeExadataInsightResourceForecastTrendRequest.StatisticEnum.Max,
ForecastStartDay = 203,
ForecastDays = 28,
ForecastModel = Oci.OpsiService.Requests.SummarizeExadataInsightResourceForecastTrendRequest.ForecastModelEnum.Linear,
CdbName = new List<string>
{
"EXAMPLE--Value"
},
HostName = new List<string>
{
"EXAMPLE--Value"
},
Limit = 2,
Confidence = 34,
SortOrder = Oci.OpsiService.Models.SortOrder.Asc,
SortBy = Oci.OpsiService.Requests.SummarizeExadataInsightResourceForecastTrendRequest.SortByEnum.Id,
Page = "EXAMPLE-page-Value",
OpcRequestId = "ZEITT8X4YYY3HALNBUQJ<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 OperationsInsightsClient(provider, new ClientConfiguration()))
{
var response = await client.SummarizeExadataInsightResourceForecastTrend(summarizeExadataInsightResourceForecastTrendRequest);
// Retrieve value from the response.
var exadataInsightIdValue = response.SummarizeExadataInsightResourceForecastTrendCollection.ExadataInsightId;
}
}
catch (Exception e)
{
Console.WriteLine($"SummarizeExadataInsightResourceForecastTrend Failed with {e.Message}");
throw e;
}
}
}
}