// 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("04/29/2035 01:03:12"),
TimeIntervalEnd = DateTime.Parse("01/02/2015 01:49:42"),
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 = 224,
ForecastDays = 30,
ForecastModel = Oci.OpsiService.Requests.SummarizeExadataInsightResourceForecastTrendRequest.ForecastModelEnum.MlAuto,
CdbName = new List<string>
{
"EXAMPLE--Value"
},
HostName = new List<string>
{
"EXAMPLE--Value"
},
Limit = 7,
Confidence = 41,
SortOrder = Oci.OpsiService.Models.SortOrder.Desc,
SortBy = Oci.OpsiService.Requests.SummarizeExadataInsightResourceForecastTrendRequest.SortByEnum.Name,
Page = "EXAMPLE-page-Value",
OpcRequestId = "4L9NNNMK18XX7W44PXK2<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;
}
}
}
}