// 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 CreateDataFlowExample
{
public static async Task Main()
{
// Create a request and dependent object(s).
var createDataFlowDetails = new Oci.DataintegrationService.Models.CreateDataFlowDetails
{
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",
Identifier = "EXAMPLE-identifier-Value",
Nodes = new List<Oci.DataintegrationService.Models.FlowNode>
{
new Oci.DataintegrationService.Models.FlowNode
{
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",
InputLinks = new List<Oci.DataintegrationService.Models.InputLink>
{
new Oci.DataintegrationService.Models.InputLink
{
FromLink = "EXAMPLE-fromLink-Value",
FieldMap = new Oci.DataintegrationService.Models.DirectFieldMap
{
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"
},
ConfigValues = new Oci.DataintegrationService.Models.ConfigValues
{
ConfigParamValues = new Dictionary<string, Oci.DataintegrationService.Models.ConfigParameterValue>()
{
{
"EXAMPLE_KEY_F6ifJ",
new Oci.DataintegrationService.Models.ConfigParameterValue
{
StringValue = "EXAMPLE-stringValue-Value",
IntValue = 358,
ObjectValue = "EXAMPLE-objectValue-Value",
RefValue = "EXAMPLE-refValue-Value",
ParameterValue = "EXAMPLE-parameterValue-Value",
RootObjectValue = "EXAMPLE-rootObjectValue-Value"
}
}
},
ParentRef = new Oci.DataintegrationService.Models.ParentReference
{
Parent = "EXAMPLE-parent-Value",
RootDocId = "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"
}
},
SourceTypedObject = "EXAMPLE-sourceTypedObject-Value",
TargetTypedObject = "EXAMPLE-targetTypedObject-Value",
SourceScopeReference = new Oci.DataintegrationService.Models.ScopeReference
{
ReferenceObject = "EXAMPLE-referenceObject-Value",
ReferenceType = Oci.DataintegrationService.Models.ScopeReference.ReferenceTypeEnum.OciFunctionOutputShape,
RefObjectName = "EXAMPLE-refObjectName-Value"
},
TargetScopeReference = new Oci.DataintegrationService.Models.ScopeReference
{
ReferenceObject = "EXAMPLE-referenceObject-Value",
ReferenceType = Oci.DataintegrationService.Models.ScopeReference.ReferenceTypeEnum.DirectRef,
RefObjectName = "EXAMPLE-refObjectName-Value"
},
ObjectStatus = 368,
Description = "EXAMPLE-description-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"
},
ObjectStatus = 493,
Description = "EXAMPLE-description-Value",
Port = "EXAMPLE-port-Value"
}
},
OutputLinks = new List<Oci.DataintegrationService.Models.OutputLink>
{
new Oci.DataintegrationService.Models.OutputLink
{
ToLinks = new List<string>
{
"EXAMPLE--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"
},
ObjectStatus = 940,
Description = "EXAMPLE-description-Value",
Port = "EXAMPLE-port-Value"
}
},
Operator = new Oci.DataintegrationService.Models.Projection
{
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 = 303,
InputPorts = new List<Oci.DataintegrationService.Models.InputPort>
{
new Oci.DataintegrationService.Models.InputPort
{
PortType = Oci.DataintegrationService.Models.InputPort.PortTypeEnum.Data,
Fields = new List<Oci.DataintegrationService.Models.TypedObject>
{
new Oci.DataintegrationService.Models.AbstractField
{
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"
},
ConfigValues = new Oci.DataintegrationService.Models.ConfigValues
{
ConfigParamValues = new Dictionary<string, Oci.DataintegrationService.Models.ConfigParameterValue>()
{
{
"EXAMPLE_KEY_URfVf",
new Oci.DataintegrationService.Models.ConfigParameterValue
{
StringValue = "EXAMPLE-stringValue-Value",
IntValue = 615,
ObjectValue = "EXAMPLE-objectValue-Value",
RefValue = "EXAMPLE-refValue-Value",
ParameterValue = "EXAMPLE-parameterValue-Value",
RootObjectValue = "EXAMPLE-rootObjectValue-Value"
}
}
},
ParentRef = new Oci.DataintegrationService.Models.ParentReference
{
Parent = "EXAMPLE-parent-Value",
RootDocId = "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"
}
},
ObjectStatus = 431,
Name = "EXAMPLE-name-Value",
Description = "EXAMPLE-description-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"
},
ConfigValues = new Oci.DataintegrationService.Models.ConfigValues
{
ConfigParamValues = new Dictionary<string, Oci.DataintegrationService.Models.ConfigParameterValue>()
{
{
"EXAMPLE_KEY_63iX8",
new Oci.DataintegrationService.Models.ConfigParameterValue
{
StringValue = "EXAMPLE-stringValue-Value",
IntValue = 121,
ObjectValue = "EXAMPLE-objectValue-Value",
RefValue = "EXAMPLE-refValue-Value",
ParameterValue = "EXAMPLE-parameterValue-Value",
RootObjectValue = "EXAMPLE-rootObjectValue-Value"
}
}
},
ParentRef = new Oci.DataintegrationService.Models.ParentReference
{
Parent = "EXAMPLE-parent-Value",
RootDocId = "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"
}
},
ObjectStatus = 877,
Name = "EXAMPLE-name-Value",
Description = "EXAMPLE-description-Value"
}
},
OutputPorts = new List<Oci.DataintegrationService.Models.TypedObject>
{
new Oci.DataintegrationService.Models.InputProxyField
{
Scope = "EXAMPLE-scope-Value",
Type = new Oci.DataintegrationService.Models.ConfiguredType
{
WrappedType = "EXAMPLE-wrappedType-Value",
ConfigValues = new Oci.DataintegrationService.Models.ConfigValues
{
ConfigParamValues = new Dictionary<string, Oci.DataintegrationService.Models.ConfigParameterValue>()
{
{
"EXAMPLE_KEY_0hpAN",
new Oci.DataintegrationService.Models.ConfigParameterValue
{
StringValue = "EXAMPLE-stringValue-Value",
IntValue = 638,
ObjectValue = "EXAMPLE-objectValue-Value",
RefValue = "EXAMPLE-refValue-Value",
ParameterValue = "EXAMPLE-parameterValue-Value",
RootObjectValue = "EXAMPLE-rootObjectValue-Value"
}
}
},
ParentRef = new Oci.DataintegrationService.Models.ParentReference
{
Parent = "EXAMPLE-parent-Value",
RootDocId = "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-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 = false,
ObjectStatus = 350,
ConfigParameterDefinitions = new Dictionary<string, Oci.DataintegrationService.Models.ConfigParameterDefinition>()
{
{
"EXAMPLE_KEY_5hazM",
new Oci.DataintegrationService.Models.ConfigParameterDefinition
{
ParameterName = "EXAMPLE-parameterName-Value",
Description = "EXAMPLE-description-Value",
DefaultValue = "EXAMPLE-defaultValue-Value",
ClassFieldName = "EXAMPLE-classFieldName-Value",
IsStatic = true,
IsClassFieldValue = false
}
}
}
},
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 = 157,
Description = "EXAMPLE-description-Value"
},
Labels = new List<string>
{
"EXAMPLE--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"
},
ConfigValues = new Oci.DataintegrationService.Models.ConfigValues
{
ConfigParamValues = new Dictionary<string, Oci.DataintegrationService.Models.ConfigParameterValue>()
{
{
"EXAMPLE_KEY_h2LLn",
new Oci.DataintegrationService.Models.ConfigParameterValue
{
StringValue = "EXAMPLE-stringValue-Value",
IntValue = 396,
ObjectValue = "EXAMPLE-objectValue-Value",
RefValue = "EXAMPLE-refValue-Value",
ParameterValue = "EXAMPLE-parameterValue-Value",
RootObjectValue = "EXAMPLE-rootObjectValue-Value"
}
}
},
ParentRef = new Oci.DataintegrationService.Models.ParentReference
{
Parent = "EXAMPLE-parent-Value",
RootDocId = "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"
}
},
ObjectStatus = 877,
Name = "EXAMPLE-name-Value",
Description = "EXAMPLE-description-Value"
}
},
ObjectStatus = 233,
Identifier = "EXAMPLE-identifier-Value",
Parameters = new List<Oci.DataintegrationService.Models.Parameter>
{
new Oci.DataintegrationService.Models.Parameter
{
Type = "EXAMPLE-type-Value",
DefaultValue = "EXAMPLE-defaultValue-Value",
RootObjectDefaultValue = "EXAMPLE-rootObjectDefaultValue-Value",
IsInput = true,
IsOutput = false,
OutputAggregationType = Oci.DataintegrationService.Models.Parameter.OutputAggregationTypeEnum.Max,
TypeName = "EXAMPLE-typeName-Value",
UsedFor = "EXAMPLE-usedFor-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"
},
ConfigValues = new Oci.DataintegrationService.Models.ConfigValues
{
ConfigParamValues = new Dictionary<string, Oci.DataintegrationService.Models.ConfigParameterValue>()
{
{
"EXAMPLE_KEY_QKRsO",
new Oci.DataintegrationService.Models.ConfigParameterValue
{
StringValue = "EXAMPLE-stringValue-Value",
IntValue = 109,
ObjectValue = "EXAMPLE-objectValue-Value",
RefValue = "EXAMPLE-refValue-Value",
ParameterValue = "EXAMPLE-parameterValue-Value",
RootObjectValue = "EXAMPLE-rootObjectValue-Value"
}
}
},
ParentRef = new Oci.DataintegrationService.Models.ParentReference
{
Parent = "EXAMPLE-parent-Value",
RootDocId = "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"
}
},
ObjectStatus = 636,
Name = "EXAMPLE-name-Value",
Description = "EXAMPLE-description-Value"
}
},
OpConfigValues = new Oci.DataintegrationService.Models.ConfigValues
{
ConfigParamValues = new Dictionary<string, Oci.DataintegrationService.Models.ConfigParameterValue>()
{
{
"EXAMPLE_KEY_gM3qp",
new Oci.DataintegrationService.Models.ConfigParameterValue
{
StringValue = "EXAMPLE-stringValue-Value",
IntValue = 683,
ObjectValue = "EXAMPLE-objectValue-Value",
RefValue = "EXAMPLE-refValue-Value",
ParameterValue = "EXAMPLE-parameterValue-Value",
RootObjectValue = "EXAMPLE-rootObjectValue-Value"
}
}
},
ParentRef = new Oci.DataintegrationService.Models.ParentReference
{
Parent = "EXAMPLE-parent-Value",
RootDocId = "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"
}
}
},
UiProperties = new Oci.DataintegrationService.Models.UIProperties
{
CoordinateX = new System.Decimal
{
},
CoordinateY = new System.Decimal
{
}
},
ObjectStatus = 330
}
},
Parameters = new List<Oci.DataintegrationService.Models.Parameter>
{
new Oci.DataintegrationService.Models.Parameter
{
Type = "EXAMPLE-type-Value",
DefaultValue = "EXAMPLE-defaultValue-Value",
RootObjectDefaultValue = "EXAMPLE-rootObjectDefaultValue-Value",
IsInput = false,
IsOutput = false,
OutputAggregationType = Oci.DataintegrationService.Models.Parameter.OutputAggregationTypeEnum.Min,
TypeName = "EXAMPLE-typeName-Value",
UsedFor = "EXAMPLE-usedFor-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"
},
ConfigValues = new Oci.DataintegrationService.Models.ConfigValues
{
ConfigParamValues = new Dictionary<string, Oci.DataintegrationService.Models.ConfigParameterValue>()
{
{
"EXAMPLE_KEY_u13te",
new Oci.DataintegrationService.Models.ConfigParameterValue
{
StringValue = "EXAMPLE-stringValue-Value",
IntValue = 252,
ObjectValue = "EXAMPLE-objectValue-Value",
RefValue = "EXAMPLE-refValue-Value",
ParameterValue = "EXAMPLE-parameterValue-Value",
RootObjectValue = "EXAMPLE-rootObjectValue-Value"
}
}
},
ParentRef = new Oci.DataintegrationService.Models.ParentReference
{
Parent = "EXAMPLE-parent-Value",
RootDocId = "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"
}
},
ObjectStatus = 947,
Name = "EXAMPLE-name-Value",
Description = "EXAMPLE-description-Value"
}
},
Description = "EXAMPLE-description-Value",
FlowConfigValues = new Oci.DataintegrationService.Models.ConfigValues
{
ConfigParamValues = new Dictionary<string, Oci.DataintegrationService.Models.ConfigParameterValue>()
{
{
"EXAMPLE_KEY_Vsqzr",
new Oci.DataintegrationService.Models.ConfigParameterValue
{
StringValue = "EXAMPLE-stringValue-Value",
IntValue = 995,
ObjectValue = "EXAMPLE-objectValue-Value",
RefValue = "EXAMPLE-refValue-Value",
ParameterValue = "EXAMPLE-parameterValue-Value",
RootObjectValue = "EXAMPLE-rootObjectValue-Value"
}
}
},
ParentRef = new Oci.DataintegrationService.Models.ParentReference
{
Parent = "EXAMPLE-parent-Value",
RootDocId = "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"
}
},
ObjectStatus = 76,
RegistryMetadata = new Oci.DataintegrationService.Models.RegistryMetadata
{
AggregatorKey = "EXAMPLE-aggregatorKey-Value",
Labels = new List<string>
{
"EXAMPLE--Value"
},
RegistryVersion = 564,
Key = "EXAMPLE-key-Value",
IsFavorite = true
}
};
var createDataFlowRequest = new Oci.DataintegrationService.Requests.CreateDataFlowRequest
{
WorkspaceId = "ocid1.test.oc1..<unique_ID>EXAMPLE-workspaceId-Value",
CreateDataFlowDetails = createDataFlowDetails,
OpcRetryToken = "EXAMPLE-opcRetryToken-Value",
OpcRequestId = "7ZIDYPJ9OTTPQU8S8CJX<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 DataIntegrationClient(provider, new ClientConfiguration()))
{
var response = await client.CreateDataFlow(createDataFlowRequest);
// Retrieve value from the response.
var keyValue = response.DataFlow.Key;
}
}
catch (Exception e)
{
Console.WriteLine($"CreateDataFlow Failed with {e.Message}");
throw e;
}
}
}
}