// 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.RuleBasedEntityMap
{
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_kZl27",
new Oci.DataintegrationService.Models.ConfigParameterValue
{
StringValue = "EXAMPLE-stringValue-Value",
IntValue = 489,
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"
}
},
MapType = Oci.DataintegrationService.Models.RuleBasedEntityMap.MapTypeEnum.Mapbyname,
FromPattern = "EXAMPLE-fromPattern-Value",
ToPattern = "EXAMPLE-toPattern-Value",
IsJavaRegexSyntax = false,
ObjectStatus = 93,
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 = 940,
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 = 608,
Description = "EXAMPLE-description-Value",
Port = "EXAMPLE-port-Value"
}
},
Operator = new Oci.DataintegrationService.Models.ExpressionOperator
{
TriggerRule = Oci.DataintegrationService.Models.ExpressionOperator.TriggerRuleEnum.AllComplete,
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 = 17,
InputPorts = new List<Oci.DataintegrationService.Models.InputPort>
{
new Oci.DataintegrationService.Models.InputPort
{
PortType = Oci.DataintegrationService.Models.InputPort.PortTypeEnum.Control,
Fields = new List<Oci.DataintegrationService.Models.TypedObject>
{
new Oci.DataintegrationService.Models.OutputPort
{
PortType = Oci.DataintegrationService.Models.OutputPort.PortTypeEnum.Control,
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_REg75",
new Oci.DataintegrationService.Models.ConfigParameterValue
{
StringValue = "EXAMPLE-stringValue-Value",
IntValue = 807,
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 = 205,
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_oTH7e",
new Oci.DataintegrationService.Models.ConfigParameterValue
{
StringValue = "EXAMPLE-stringValue-Value",
IntValue = 76,
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 = 526,
Name = "EXAMPLE-name-Value",
Description = "EXAMPLE-description-Value"
}
},
OutputPorts = new List<Oci.DataintegrationService.Models.TypedObject>
{
new Oci.DataintegrationService.Models.InputPort
{
PortType = Oci.DataintegrationService.Models.InputPort.PortTypeEnum.Data,
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_dtaUZ",
new Oci.DataintegrationService.Models.ConfigParameterValue
{
StringValue = "EXAMPLE-stringValue-Value",
IntValue = 43,
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 = 453,
Name = "EXAMPLE-name-Value",
Description = "EXAMPLE-description-Value"
}
},
ObjectStatus = 571,
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 = false,
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_zLiuJ",
new Oci.DataintegrationService.Models.ConfigParameterValue
{
StringValue = "EXAMPLE-stringValue-Value",
IntValue = 230,
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 = 287,
Name = "EXAMPLE-name-Value",
Description = "EXAMPLE-description-Value"
}
},
OpConfigValues = new Oci.DataintegrationService.Models.ConfigValues
{
ConfigParamValues = new Dictionary<string, Oci.DataintegrationService.Models.ConfigParameterValue>()
{
{
"EXAMPLE_KEY_HEed1",
new Oci.DataintegrationService.Models.ConfigParameterValue
{
StringValue = "EXAMPLE-stringValue-Value",
IntValue = 45,
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 = 900
}
},
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 = true,
OutputAggregationType = Oci.DataintegrationService.Models.Parameter.OutputAggregationTypeEnum.Sum,
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_dPa4e",
new Oci.DataintegrationService.Models.ConfigParameterValue
{
StringValue = "EXAMPLE-stringValue-Value",
IntValue = 512,
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 = 58,
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_qZkSD",
new Oci.DataintegrationService.Models.ConfigParameterValue
{
StringValue = "EXAMPLE-stringValue-Value",
IntValue = 955,
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 = 145,
RegistryMetadata = new Oci.DataintegrationService.Models.RegistryMetadata
{
AggregatorKey = "EXAMPLE-aggregatorKey-Value",
Labels = new List<string>
{
"EXAMPLE--Value"
},
RegistryVersion = 895,
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 = "OGTZESHCPV84LXQ5FSLT<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;
}
}
}
}