// 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.DataintegrationService;
using Oci.Common;
using Oci.Common.Auth;
namespace Oci.Sdk.DotNet.Example.Dataintegration
{
public class UpdateExternalPublicationExample
{
public static async Task Main()
{
// Create a request and dependent object(s).
var updateExternalPublicationDetails = new Oci.DataintegrationService.Models.UpdateExternalPublicationDetails
{
ApplicationId = "ocid1.test.oc1..<unique_ID>EXAMPLE-applicationId-Value",
ApplicationCompartmentId = "ocid1.test.oc1..<unique_ID>EXAMPLE-applicationCompartmentId-Value",
DisplayName = "EXAMPLE-displayName-Value",
Description = "EXAMPLE-description-Value",
ResourceConfiguration = new Oci.DataintegrationService.Models.ResourceConfiguration
{
SparkVersion = "EXAMPLE-sparkVersion-Value",
DriverShape = "EXAMPLE-driverShape-Value",
ExecutorShape = "EXAMPLE-executorShape-Value",
TotalExecutors = 632
},
ConfigurationDetails = new Oci.DataintegrationService.Models.ConfigurationDetails
{
DataAsset = new Oci.DataintegrationService.Models.DataAssetFromOraclePeopleSoftDetails
{
Host = "EXAMPLE-host-Value",
Port = "EXAMPLE-port-Value",
ServiceName = "EXAMPLE-serviceName-Value",
DriverClass = "EXAMPLE-driverClass-Value",
Sid = "EXAMPLE-sid-Value",
WalletSecret = new Oci.DataintegrationService.Models.SensitiveAttribute
{
SecretConfig = new Oci.DataintegrationService.Models.OciVaultSecretConfig
{
SecretId = "ocid1.test.oc1..<unique_ID>EXAMPLE-secretId-Value"
},
Value = "EXAMPLE-value-Value"
},
WalletPasswordSecret = new Oci.DataintegrationService.Models.SensitiveAttribute
{
SecretConfig = new Oci.DataintegrationService.Models.OciVaultSecretConfig
{
SecretId = "ocid1.test.oc1..<unique_ID>EXAMPLE-secretId-Value"
},
Value = "EXAMPLE-value-Value"
},
DefaultConnection = new Oci.DataintegrationService.Models.ConnectionFromOraclePeopleSoftDetails
{
Username = "EXAMPLE-username-Value",
Password = "EXAMPLE-password-Value",
PasswordSecret = new Oci.DataintegrationService.Models.SensitiveAttribute
{
SecretConfig = new Oci.DataintegrationService.Models.OciVaultSecretConfig
{
SecretId = "ocid1.test.oc1..<unique_ID>EXAMPLE-secretId-Value"
},
Value = "EXAMPLE-value-Value"
},
Key = "EXAMPLE-key-Value",
ModelVersion = "EXAMPLE-modelVersion-Value",
ParentRef = new Oci.DataintegrationService.Models.ParentReference
{
Parent = "EXAMPLE-parent-Value",
RootDocId = "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"
},
Name = "EXAMPLE-name-Value",
Description = "EXAMPLE-description-Value",
ObjectVersion = 909,
ObjectStatus = 487,
Identifier = "EXAMPLE-identifier-Value",
PrimarySchema = new Oci.DataintegrationService.Models.Schema
{
Key = "EXAMPLE-key-Value",
ModelType = "EXAMPLE-modelType-Value",
ModelVersion = "EXAMPLE-modelVersion-Value",
ParentRef = new Oci.DataintegrationService.Models.ParentReference
{
Parent = "EXAMPLE-parent-Value",
RootDocId = "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"
},
Name = "EXAMPLE-name-Value",
ResourceName = "EXAMPLE-resourceName-Value",
Description = "EXAMPLE-description-Value",
ObjectVersion = 340,
ExternalKey = "EXAMPLE-externalKey-Value",
IsHasContainers = false,
DefaultConnection = "EXAMPLE-defaultConnection-Value",
ObjectStatus = 798,
Identifier = "EXAMPLE-identifier-Value",
Metadata = new Oci.DataintegrationService.Models.ObjectMetadata
{
CreatedBy = "EXAMPLE-createdBy-Value",
CreatedByName = "EXAMPLE-createdByName-Value",
UpdatedBy = "EXAMPLE-updatedBy-Value",
UpdatedByName = "EXAMPLE-updatedByName-Value",
TimeCreated = DateTime.Parse("05/18/2001 15:41:46"),
TimeUpdated = DateTime.Parse("01/10/2001 11:29:59"),
AggregatorKey = "EXAMPLE-aggregatorKey-Value",
Aggregator = new Oci.DataintegrationService.Models.AggregatorSummary
{
Type = "EXAMPLE-type-Value",
Key = "EXAMPLE-key-Value",
Name = "EXAMPLE-name-Value",
Identifier = "EXAMPLE-identifier-Value",
Description = "EXAMPLE-description-Value"
},
IdentifierPath = "EXAMPLE-identifierPath-Value",
InfoFields = new Dictionary<string, string>()
{
{
"EXAMPLE_KEY_E6pgO",
"EXAMPLE_VALUE_9Ix8pXRmocN1cnrY2BpN"
}
},
RegistryVersion = 264,
Labels = new List<string>
{
"EXAMPLE--Value"
},
IsFavorite = false,
CountStatistics = new Oci.DataintegrationService.Models.CountStatistic
{
ObjectTypeCountList = new List<Oci.DataintegrationService.Models.CountStatisticSummary>
{
new Oci.DataintegrationService.Models.CountStatisticSummary
{
ObjectType = Oci.DataintegrationService.Models.CountStatisticSummary.ObjectTypeEnum.Task,
ObjectCount = 341
}
}
}
}
},
ConnectionProperties = new List<Oci.DataintegrationService.Models.ConnectionProperty>
{
new Oci.DataintegrationService.Models.ConnectionProperty
{
Name = "EXAMPLE-name-Value",
Value = "EXAMPLE-value-Value"
}
},
IsDefault = true,
Metadata = new Oci.DataintegrationService.Models.ObjectMetadata
{
CreatedBy = "EXAMPLE-createdBy-Value",
CreatedByName = "EXAMPLE-createdByName-Value",
UpdatedBy = "EXAMPLE-updatedBy-Value",
UpdatedByName = "EXAMPLE-updatedByName-Value",
TimeCreated = DateTime.Parse("10/19/2044 20:26:33"),
TimeUpdated = DateTime.Parse("03/29/2001 01:06:17"),
AggregatorKey = "EXAMPLE-aggregatorKey-Value",
Aggregator = new Oci.DataintegrationService.Models.AggregatorSummary
{
Type = "EXAMPLE-type-Value",
Key = "EXAMPLE-key-Value",
Name = "EXAMPLE-name-Value",
Identifier = "EXAMPLE-identifier-Value",
Description = "EXAMPLE-description-Value"
},
IdentifierPath = "EXAMPLE-identifierPath-Value",
InfoFields = new Dictionary<string, string>()
{
{
"EXAMPLE_KEY_UYr23",
"EXAMPLE_VALUE_dCnNRC3yTD6YppARbKKr"
}
},
RegistryVersion = 406,
Labels = new List<string>
{
"EXAMPLE--Value"
},
IsFavorite = true,
CountStatistics = new Oci.DataintegrationService.Models.CountStatistic
{
ObjectTypeCountList = new List<Oci.DataintegrationService.Models.CountStatisticSummary>
{
new Oci.DataintegrationService.Models.CountStatisticSummary
{
ObjectType = Oci.DataintegrationService.Models.CountStatisticSummary.ObjectTypeEnum.DataAsset,
ObjectCount = 669
}
}
}
}
},
Key = "EXAMPLE-key-Value",
ModelVersion = "EXAMPLE-modelVersion-Value",
Name = "EXAMPLE-name-Value",
Description = "EXAMPLE-description-Value",
ObjectStatus = 702,
Identifier = "EXAMPLE-identifier-Value",
ExternalKey = "EXAMPLE-externalKey-Value",
AssetProperties = new Dictionary<string, string>()
{
{
"EXAMPLE_KEY_Xxqh9",
"EXAMPLE_VALUE_fwNNN23yaUWPYzY9s3HW"
}
},
NativeTypeSystem = new Oci.DataintegrationService.Models.TypeSystem
{
Key = "EXAMPLE-key-Value",
ModelType = "EXAMPLE-modelType-Value",
ModelVersion = "EXAMPLE-modelVersion-Value",
ParentRef = new Oci.DataintegrationService.Models.ParentReference
{
Parent = "EXAMPLE-parent-Value",
RootDocId = "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"
},
Name = "EXAMPLE-name-Value",
Description = "EXAMPLE-description-Value",
ObjectVersion = 529,
TypeMappingTo = new Dictionary<string, string>()
{
{
"EXAMPLE_KEY_jyNb0",
"EXAMPLE_VALUE_ZFaRTMoxp67ocgR3LbKe"
}
},
TypeMappingFrom = new Dictionary<string, string>()
{
{
"EXAMPLE_KEY_LqQnM",
"EXAMPLE_VALUE_g3NCxIW62zegW402zZAJ"
}
},
ObjectStatus = 80,
Identifier = "EXAMPLE-identifier-Value",
Types = new List<Oci.DataintegrationService.Models.DataType>
{
new Oci.DataintegrationService.Models.DataType
{
DtType = Oci.DataintegrationService.Models.DataType.DtTypeEnum.Structured,
TypeSystemName = "EXAMPLE-typeSystemName-Value",
ConfigDefinition = new Oci.DataintegrationService.Models.ConfigDefinition
{
Key = "EXAMPLE-key-Value",
ModelType = "EXAMPLE-modelType-Value",
ModelVersion = "EXAMPLE-modelVersion-Value",
ParentRef = new Oci.DataintegrationService.Models.ParentReference
{
Parent = "EXAMPLE-parent-Value",
RootDocId = "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"
},
Name = "EXAMPLE-name-Value",
IsContained = true,
ObjectStatus = 710,
ConfigParameterDefinitions = new Dictionary<string, Oci.DataintegrationService.Models.ConfigParameterDefinition>()
{
{
"EXAMPLE_KEY_wHspi",
new Oci.DataintegrationService.Models.ConfigParameterDefinition
{
ParameterName = "EXAMPLE-parameterName-Value",
Description = "EXAMPLE-description-Value",
DefaultValue = "EXAMPLE-defaultValue-Value",
ClassFieldName = "EXAMPLE-classFieldName-Value",
IsStatic = false,
IsClassFieldValue = true
}
}
}
},
Key = "EXAMPLE-key-Value",
ModelVersion = "EXAMPLE-modelVersion-Value",
ParentRef = new Oci.DataintegrationService.Models.ParentReference
{
Parent = "EXAMPLE-parent-Value",
RootDocId = "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"
},
Name = "EXAMPLE-name-Value",
ObjectStatus = 388,
Description = "EXAMPLE-description-Value"
}
}
},
ObjectVersion = 584,
ParentRef = new Oci.DataintegrationService.Models.ParentReference
{
Parent = "EXAMPLE-parent-Value",
RootDocId = "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"
},
Metadata = new Oci.DataintegrationService.Models.ObjectMetadata
{
CreatedBy = "EXAMPLE-createdBy-Value",
CreatedByName = "EXAMPLE-createdByName-Value",
UpdatedBy = "EXAMPLE-updatedBy-Value",
UpdatedByName = "EXAMPLE-updatedByName-Value",
TimeCreated = DateTime.Parse("07/25/2012 08:06:40"),
TimeUpdated = DateTime.Parse("04/26/2033 10:48:58"),
AggregatorKey = "EXAMPLE-aggregatorKey-Value",
Aggregator = new Oci.DataintegrationService.Models.AggregatorSummary
{
Type = "EXAMPLE-type-Value",
Key = "EXAMPLE-key-Value",
Name = "EXAMPLE-name-Value",
Identifier = "EXAMPLE-identifier-Value",
Description = "EXAMPLE-description-Value"
},
IdentifierPath = "EXAMPLE-identifierPath-Value",
InfoFields = new Dictionary<string, string>()
{
{
"EXAMPLE_KEY_z2xbG",
"EXAMPLE_VALUE_2vSufLhZHcDYUGdTEXYD"
}
},
RegistryVersion = 355,
Labels = new List<string>
{
"EXAMPLE--Value"
},
IsFavorite = false,
CountStatistics = new Oci.DataintegrationService.Models.CountStatistic
{
ObjectTypeCountList = new List<Oci.DataintegrationService.Models.CountStatisticSummary>
{
new Oci.DataintegrationService.Models.CountStatisticSummary
{
ObjectType = Oci.DataintegrationService.Models.CountStatisticSummary.ObjectTypeEnum.DataAsset,
ObjectCount = 643
}
}
}
},
KeyMap = new Dictionary<string, string>()
{
{
"EXAMPLE_KEY_6Cqyj",
"EXAMPLE_VALUE_kudcEP2k8TwAUKQP0Tvp"
}
}
},
Connection = new Oci.DataintegrationService.Models.ConnectionFromOracle
{
Username = "EXAMPLE-username-Value",
Password = "EXAMPLE-password-Value",
PasswordSecret = new Oci.DataintegrationService.Models.SensitiveAttribute
{
SecretConfig = new Oci.DataintegrationService.Models.OciVaultSecretConfig
{
SecretId = "ocid1.test.oc1..<unique_ID>EXAMPLE-secretId-Value"
},
Value = "EXAMPLE-value-Value"
},
Key = "EXAMPLE-key-Value",
ModelVersion = "EXAMPLE-modelVersion-Value",
ParentRef = new Oci.DataintegrationService.Models.ParentReference
{
Parent = "EXAMPLE-parent-Value",
RootDocId = "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"
},
Name = "EXAMPLE-name-Value",
Description = "EXAMPLE-description-Value",
ObjectVersion = 701,
ObjectStatus = 841,
Identifier = "EXAMPLE-identifier-Value",
PrimarySchema = new Oci.DataintegrationService.Models.Schema
{
Key = "EXAMPLE-key-Value",
ModelType = "EXAMPLE-modelType-Value",
ModelVersion = "EXAMPLE-modelVersion-Value",
ParentRef = new Oci.DataintegrationService.Models.ParentReference
{
Parent = "EXAMPLE-parent-Value",
RootDocId = "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"
},
Name = "EXAMPLE-name-Value",
ResourceName = "EXAMPLE-resourceName-Value",
Description = "EXAMPLE-description-Value",
ObjectVersion = 298,
ExternalKey = "EXAMPLE-externalKey-Value",
IsHasContainers = false,
DefaultConnection = "EXAMPLE-defaultConnection-Value",
ObjectStatus = 867,
Identifier = "EXAMPLE-identifier-Value",
Metadata = new Oci.DataintegrationService.Models.ObjectMetadata
{
CreatedBy = "EXAMPLE-createdBy-Value",
CreatedByName = "EXAMPLE-createdByName-Value",
UpdatedBy = "EXAMPLE-updatedBy-Value",
UpdatedByName = "EXAMPLE-updatedByName-Value",
TimeCreated = DateTime.Parse("12/30/2044 22:28:40"),
TimeUpdated = DateTime.Parse("01/21/2032 16:17:45"),
AggregatorKey = "EXAMPLE-aggregatorKey-Value",
Aggregator = new Oci.DataintegrationService.Models.AggregatorSummary
{
Type = "EXAMPLE-type-Value",
Key = "EXAMPLE-key-Value",
Name = "EXAMPLE-name-Value",
Identifier = "EXAMPLE-identifier-Value",
Description = "EXAMPLE-description-Value"
},
IdentifierPath = "EXAMPLE-identifierPath-Value",
InfoFields = new Dictionary<string, string>()
{
{
"EXAMPLE_KEY_y86Uo",
"EXAMPLE_VALUE_4k9T1cGam61XnZKcShsO"
}
},
RegistryVersion = 553,
Labels = new List<string>
{
"EXAMPLE--Value"
},
IsFavorite = true,
CountStatistics = new Oci.DataintegrationService.Models.CountStatistic
{
ObjectTypeCountList = new List<Oci.DataintegrationService.Models.CountStatisticSummary>
{
new Oci.DataintegrationService.Models.CountStatisticSummary
{
ObjectType = Oci.DataintegrationService.Models.CountStatisticSummary.ObjectTypeEnum.FunctionLibrary,
ObjectCount = 944
}
}
}
}
},
ConnectionProperties = new List<Oci.DataintegrationService.Models.ConnectionProperty>
{
new Oci.DataintegrationService.Models.ConnectionProperty
{
Name = "EXAMPLE-name-Value",
Value = "EXAMPLE-value-Value"
}
},
IsDefault = false,
Metadata = new Oci.DataintegrationService.Models.ObjectMetadata
{
CreatedBy = "EXAMPLE-createdBy-Value",
CreatedByName = "EXAMPLE-createdByName-Value",
UpdatedBy = "EXAMPLE-updatedBy-Value",
UpdatedByName = "EXAMPLE-updatedByName-Value",
TimeCreated = DateTime.Parse("12/15/2031 16:44:57"),
TimeUpdated = DateTime.Parse("06/06/2019 04:12:03"),
AggregatorKey = "EXAMPLE-aggregatorKey-Value",
Aggregator = new Oci.DataintegrationService.Models.AggregatorSummary
{
Type = "EXAMPLE-type-Value",
Key = "EXAMPLE-key-Value",
Name = "EXAMPLE-name-Value",
Identifier = "EXAMPLE-identifier-Value",
Description = "EXAMPLE-description-Value"
},
IdentifierPath = "EXAMPLE-identifierPath-Value",
InfoFields = new Dictionary<string, string>()
{
{
"EXAMPLE_KEY_MCWuH",
"EXAMPLE_VALUE_JRrulO3vEGCPfFfvsXQf"
}
},
RegistryVersion = 593,
Labels = new List<string>
{
"EXAMPLE--Value"
},
IsFavorite = false,
CountStatistics = new Oci.DataintegrationService.Models.CountStatistic
{
ObjectTypeCountList = new List<Oci.DataintegrationService.Models.CountStatisticSummary>
{
new Oci.DataintegrationService.Models.CountStatisticSummary
{
ObjectType = Oci.DataintegrationService.Models.CountStatisticSummary.ObjectTypeEnum.FunctionLibrary,
ObjectCount = 854
}
}
}
},
KeyMap = new Dictionary<string, string>()
{
{
"EXAMPLE_KEY_kwbLk",
"EXAMPLE_VALUE_qvDoNqVK2nZsHXCyKDTk"
}
}
},
CompartmentId = "ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value",
Schema = new Oci.DataintegrationService.Models.Schema
{
Key = "EXAMPLE-key-Value",
ModelType = "EXAMPLE-modelType-Value",
ModelVersion = "EXAMPLE-modelVersion-Value",
ParentRef = new Oci.DataintegrationService.Models.ParentReference
{
Parent = "EXAMPLE-parent-Value",
RootDocId = "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"
},
Name = "EXAMPLE-name-Value",
ResourceName = "EXAMPLE-resourceName-Value",
Description = "EXAMPLE-description-Value",
ObjectVersion = 440,
ExternalKey = "EXAMPLE-externalKey-Value",
IsHasContainers = false,
DefaultConnection = "EXAMPLE-defaultConnection-Value",
ObjectStatus = 876,
Identifier = "EXAMPLE-identifier-Value",
Metadata = new Oci.DataintegrationService.Models.ObjectMetadata
{
CreatedBy = "EXAMPLE-createdBy-Value",
CreatedByName = "EXAMPLE-createdByName-Value",
UpdatedBy = "EXAMPLE-updatedBy-Value",
UpdatedByName = "EXAMPLE-updatedByName-Value",
TimeCreated = DateTime.Parse("12/04/2015 12:43:25"),
TimeUpdated = DateTime.Parse("07/16/2006 03:38:06"),
AggregatorKey = "EXAMPLE-aggregatorKey-Value",
Aggregator = new Oci.DataintegrationService.Models.AggregatorSummary
{
Type = "EXAMPLE-type-Value",
Key = "EXAMPLE-key-Value",
Name = "EXAMPLE-name-Value",
Identifier = "EXAMPLE-identifier-Value",
Description = "EXAMPLE-description-Value"
},
IdentifierPath = "EXAMPLE-identifierPath-Value",
InfoFields = new Dictionary<string, string>()
{
{
"EXAMPLE_KEY_7QRZM",
"EXAMPLE_VALUE_K9TiWML4KTlodzQOIU73"
}
},
RegistryVersion = 831,
Labels = new List<string>
{
"EXAMPLE--Value"
},
IsFavorite = false,
CountStatistics = new Oci.DataintegrationService.Models.CountStatistic
{
ObjectTypeCountList = new List<Oci.DataintegrationService.Models.CountStatisticSummary>
{
new Oci.DataintegrationService.Models.CountStatisticSummary
{
ObjectType = Oci.DataintegrationService.Models.CountStatisticSummary.ObjectTypeEnum.Connection,
ObjectCount = 482
}
}
}
}
}
}
};
var updateExternalPublicationRequest = new Oci.DataintegrationService.Requests.UpdateExternalPublicationRequest
{
WorkspaceId = "ocid1.test.oc1..<unique_ID>EXAMPLE-workspaceId-Value",
TaskKey = "EXAMPLE-taskKey-Value",
ExternalPublicationsKey = "EXAMPLE-externalPublicationsKey-Value",
UpdateExternalPublicationDetails = updateExternalPublicationDetails,
OpcRequestId = "NFXUF4VJGGSHSSRKMZJI<unique_ID>",
IfMatch = "EXAMPLE-ifMatch-Value"
};
// 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 DataIntegrationClient(provider, new ClientConfiguration()))
{
var response = await client.UpdateExternalPublication(updateExternalPublicationRequest);
// Retrieve value from the response.
var applicationIdValue = response.ExternalPublication.ApplicationId;
}
}
catch (Exception e)
{
Console.WriteLine($"UpdateExternalPublication Failed with {e.Message}");
throw e;
}
}
}
}