// 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.ManagementdashboardService;
using Oci.Common;
using Oci.Common.Auth;
namespace Oci.Sdk.DotNet.Example.Managementdashboard
{
public class UpdateManagementDashboardExample
{
public static async Task Main()
{
// Create a request and dependent object(s).
var updateManagementDashboardDetails = new Oci.ManagementdashboardService.Models.UpdateManagementDashboardDetails
{
ProviderId = "ocid1.test.oc1..<unique_ID>EXAMPLE-providerId-Value",
ProviderName = "EXAMPLE-providerName-Value",
ProviderVersion = "EXAMPLE-providerVersion-Value",
Tiles = new List<Oci.ManagementdashboardService.Models.ManagementDashboardTileDetails>
{
new Oci.ManagementdashboardService.Models.ManagementDashboardTileDetails
{
DisplayName = "EXAMPLE-displayName-Value",
SavedSearchId = "ocid1.test.oc1..<unique_ID>EXAMPLE-savedSearchId-Value",
Row = 360,
Column = 542,
Height = 538,
Width = 454,
Nls = "EXAMPLE-nls-Value",
UiConfig = "EXAMPLE-uiConfig-Value",
DataConfig = new List<Object>
{
"EXAMPLE-dataConfig-Value"
},
State = Oci.ManagementdashboardService.Models.ManagementDashboardTileDetails.StateEnum.Unauthorized,
DrilldownConfig = "EXAMPLE-drilldownConfig-Value",
ParametersMap = "EXAMPLE-parametersMap-Value"
}
},
DisplayName = "EXAMPLE-displayName-Value",
Description = "EXAMPLE-description-Value",
CompartmentId = "ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value",
IsOobDashboard = false,
IsShowInHome = false,
MetadataVersion = "EXAMPLE-metadataVersion-Value",
IsShowDescription = false,
ScreenImage = "EXAMPLE-screenImage-Value",
Nls = "EXAMPLE-nls-Value",
UiConfig = "EXAMPLE-uiConfig-Value",
DataConfig = new List<Object>
{
"EXAMPLE-dataConfig-Value"
},
Type = "EXAMPLE-type-Value",
IsFavorite = true,
ParametersConfig = new List<Object>
{
"EXAMPLE-parametersConfig-Value"
},
FeaturesConfig = "EXAMPLE-featuresConfig-Value",
DrilldownConfig = new List<Object>
{
"EXAMPLE-drilldownConfig-Value"
},
FreeformTags = new Dictionary<string, string>()
{
{
"EXAMPLE_KEY_EhyqV",
"EXAMPLE_VALUE_oBO23O6S9qazb56tImZw"
}
},
DefinedTags = new Dictionary<string, Dictionary<string, Object>>()
{
{
"EXAMPLE_KEY_fABG9",
new Dictionary<string, Object>()
{
{
"EXAMPLE_KEY_Cbelo",
"EXAMPLE--Value"
}
}
}
}
};
var updateManagementDashboardRequest = new Oci.ManagementdashboardService.Requests.UpdateManagementDashboardRequest
{
ManagementDashboardId = "ocid1.test.oc1..<unique_ID>EXAMPLE-managementDashboardId-Value",
UpdateManagementDashboardDetails = updateManagementDashboardDetails,
IfMatch = "EXAMPLE-ifMatch-Value",
OpcRetryToken = "EXAMPLE-opcRetryToken-Value",
OpcRequestId = "Z9Z3ACWYHCQUJRIZZU9R<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 DashxApisClient(provider, new ClientConfiguration()))
{
var response = await client.UpdateManagementDashboard(updateManagementDashboardRequest);
// Retrieve value from the response.
var id = response.ManagementDashboard.Id;
}
}
catch (Exception e)
{
Console.WriteLine($"UpdateManagementDashboard Failed with {e.Message}");
throw e;
}
}
}
}