# 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).

import oci

# Create a default config using DEFAULT profile in default location
# Refer to
# https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm#SDK_and_CLI_Configuration_File
# for more info
config = oci.config.from_file()


# Initialize service client with default config file
data_integration_client = oci.data_integration.DataIntegrationClient(config)


# Send the request to service, some parameters are not required, see API
# doc for more info
create_data_flow_response = data_integration_client.create_data_flow(
    workspace_id="ocid1.test.oc1..<unique_ID>EXAMPLE-workspaceId-Value",
    create_data_flow_details=oci.data_integration.models.CreateDataFlowDetails(
        name="EXAMPLE-name-Value",
        identifier="EXAMPLE-identifier-Value",
        registry_metadata=oci.data_integration.models.RegistryMetadata(
            aggregator_key="EXAMPLE-aggregatorKey-Value",
            labels=["EXAMPLE--Value"],
            registry_version=73,
            key="EXAMPLE-key-Value",
            is_favorite=True),
        key="EXAMPLE-key-Value",
        model_version="EXAMPLE-modelVersion-Value",
        parent_ref=oci.data_integration.models.ParentReference(
            parent="EXAMPLE-parent-Value",
            root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
        nodes=[
            oci.data_integration.models.FlowNode(
                key="EXAMPLE-key-Value",
                model_type="EXAMPLE-modelType-Value",
                model_version="EXAMPLE-modelVersion-Value",
                parent_ref=oci.data_integration.models.ParentReference(
                    parent="EXAMPLE-parent-Value",
                    root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
                name="EXAMPLE-name-Value",
                description="EXAMPLE-description-Value",
                input_links=[
                            oci.data_integration.models.InputLink(
                                model_type="INPUT_LINK",
                                key="EXAMPLE-key-Value",
                                model_version="EXAMPLE-modelVersion-Value",
                                parent_ref=oci.data_integration.models.ParentReference(
                                    parent="EXAMPLE-parent-Value",
                                    root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
                                object_status=708,
                                description="EXAMPLE-description-Value",
                                port="EXAMPLE-port-Value",
                                from_link="EXAMPLE-fromLink-Value",
                                field_map=oci.data_integration.models.RuleBasedFieldMap(
                                    model_type="RULE_BASED_FIELD_MAP",
                                    description="EXAMPLE-description-Value",
                                    key="EXAMPLE-key-Value",
                                    model_version="EXAMPLE-modelVersion-Value",
                                    parent_ref=oci.data_integration.models.ParentReference(
                                            parent="EXAMPLE-parent-Value",
                                            root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
                                    config_values=oci.data_integration.models.ConfigValues(
                                        config_param_values={
                                            'EXAMPLE_KEY_5T17L': {
                                                'stringValue': 'EXAMPLE-stringValue-Value',
                                                'intValue': 955,
                                                'objectValue': 'EXAMPLE-objectValue-Value',
                                                'refValue': 'EXAMPLE-refValue-Value',
                                                'parameterValue': 'EXAMPLE-parameterValue-Value',
                                                'rootObjectValue': 'EXAMPLE-rootObjectValue-Value'}},
                                        parent_ref=oci.data_integration.models.ParentReference(
                                            parent="EXAMPLE-parent-Value",
                                            root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")),
                                    map_type="MAPBYPOSITION",
                                    from_pattern="EXAMPLE-fromPattern-Value",
                                    to_pattern="EXAMPLE-toPattern-Value",
                                    is_java_regex_syntax=False,
                                    object_status=850,
                                    from_rule_config=oci.data_integration.models.RuleTypeConfig(
                                        model_type="RULE_TYPE_CONFIGS",
                                        key="EXAMPLE-key-Value",
                                        model_version="EXAMPLE-modelVersion-Value",
                                        parent_ref=oci.data_integration.models.ParentReference(
                                            parent="EXAMPLE-parent-Value",
                                            root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
                                        scope="EXAMPLE-scope-Value",
                                        scope_reference=oci.data_integration.models.ScopeReference(
                                            reference_object="EXAMPLE-referenceObject-Value",
                                            reference_type="DIRECT_REF",
                                            ref_object_name="EXAMPLE-refObjectName-Value"),
                                        is_order_by_rule=False,
                                        projection_rules=[
                                            oci.data_integration.models.NamePatternRule(
                                                model_type="NAME_PATTERN_RULE",
                                                key="EXAMPLE-key-Value",
                                                model_version="EXAMPLE-modelVersion-Value",
                                                parent_ref=oci.data_integration.models.ParentReference(
                                                    parent="EXAMPLE-parent-Value",
                                                    root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
                                                is_java_regex_syntax=True,
                                                config_values=oci.data_integration.models.ConfigValues(
                                                    config_param_values={
                                                        'EXAMPLE_KEY_JKx2d': {
                                                            'stringValue': 'EXAMPLE-stringValue-Value',
                                                            'intValue': 92,
                                                            'objectValue': 'EXAMPLE-objectValue-Value',
                                                            'refValue': 'EXAMPLE-refValue-Value',
                                                            'parameterValue': 'EXAMPLE-parameterValue-Value',
                                                            'rootObjectValue': 'EXAMPLE-rootObjectValue-Value'}},
                                                    parent_ref=oci.data_integration.models.ParentReference(
                                                        parent="EXAMPLE-parent-Value",
                                                        root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")),
                                                object_status=38,
                                                description="EXAMPLE-description-Value",
                                                is_skip_remaining_rules_on_match=True,
                                                scope="EXAMPLE-scope-Value",
                                                is_cascade=True,
                                                matching_strategy="NAME_ONLY",
                                                is_case_sensitive=True,
                                                rule_type="EXCLUDE",
                                                pattern="EXAMPLE-pattern-Value")],
                                        config_values=oci.data_integration.models.ConfigValues(
                                            config_param_values={
                                                'EXAMPLE_KEY_G2wxx': {
                                                    'stringValue': 'EXAMPLE-stringValue-Value',
                                                    'intValue': 486,
                                                    'objectValue': 'EXAMPLE-objectValue-Value',
                                                    'refValue': 'EXAMPLE-refValue-Value',
                                                    'parameterValue': 'EXAMPLE-parameterValue-Value',
                                                    'rootObjectValue': 'EXAMPLE-rootObjectValue-Value'}},
                                            parent_ref=oci.data_integration.models.ParentReference(
                                                parent="EXAMPLE-parent-Value",
                                                root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")),
                                        object_status=201),
                                    to_rule_config=oci.data_integration.models.RuleTypeConfig(
                                        model_type="RULE_TYPE_CONFIGS",
                                        key="EXAMPLE-key-Value",
                                        model_version="EXAMPLE-modelVersion-Value",
                                        parent_ref=oci.data_integration.models.ParentReference(
                                            parent="EXAMPLE-parent-Value",
                                            root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
                                        scope="EXAMPLE-scope-Value",
                                        scope_reference=oci.data_integration.models.ScopeReference(
                                            reference_object="EXAMPLE-referenceObject-Value",
                                            reference_type="DIRECT_REF",
                                            ref_object_name="EXAMPLE-refObjectName-Value"),
                                        is_order_by_rule=True,
                                        projection_rules=[
                                            oci.data_integration.models.GroupedNamePatternRule(
                                                model_type="GROUPED_NAME_PATTERN_RULE",
                                                key="EXAMPLE-key-Value",
                                                model_version="EXAMPLE-modelVersion-Value",
                                                parent_ref=oci.data_integration.models.ParentReference(
                                                    parent="EXAMPLE-parent-Value",
                                                    root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
                                                is_java_regex_syntax=False,
                                                config_values=oci.data_integration.models.ConfigValues(
                                                    config_param_values={
                                                        'EXAMPLE_KEY_7Gwrm': {
                                                            'stringValue': 'EXAMPLE-stringValue-Value',
                                                            'intValue': 581,
                                                            'objectValue': 'EXAMPLE-objectValue-Value',
                                                            'refValue': 'EXAMPLE-refValue-Value',
                                                            'parameterValue': 'EXAMPLE-parameterValue-Value',
                                                            'rootObjectValue': 'EXAMPLE-rootObjectValue-Value'}},
                                                    parent_ref=oci.data_integration.models.ParentReference(
                                                        parent="EXAMPLE-parent-Value",
                                                        root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")),
                                                object_status=547,
                                                description="EXAMPLE-description-Value",
                                                name="EXAMPLE-name-Value",
                                                is_skip_remaining_rules_on_match=True,
                                                scope="EXAMPLE-scope-Value",
                                                is_cascade=False,
                                                matching_strategy="TAGS_ONLY",
                                                is_case_sensitive=False,
                                                rule_type="INCLUDE",
                                                pattern="EXAMPLE-pattern-Value")],
                                        config_values=oci.data_integration.models.ConfigValues(
                                            config_param_values={
                                                'EXAMPLE_KEY_cMG7C': {
                                                    'stringValue': 'EXAMPLE-stringValue-Value',
                                                    'intValue': 200,
                                                    'objectValue': 'EXAMPLE-objectValue-Value',
                                                    'refValue': 'EXAMPLE-refValue-Value',
                                                    'parameterValue': 'EXAMPLE-parameterValue-Value',
                                                    'rootObjectValue': 'EXAMPLE-rootObjectValue-Value'}},
                                            parent_ref=oci.data_integration.models.ParentReference(
                                                parent="EXAMPLE-parent-Value",
                                                root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")),
                                        object_status=676)))],
                output_links=[
                            oci.data_integration.models.OutputLink(
                                model_type="OUTPUT_LINK",
                                key="EXAMPLE-key-Value",
                                model_version="EXAMPLE-modelVersion-Value",
                                parent_ref=oci.data_integration.models.ParentReference(
                                    parent="EXAMPLE-parent-Value",
                                    root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
                                object_status=494,
                                description="EXAMPLE-description-Value",
                                port="EXAMPLE-port-Value",
                                to_links=["EXAMPLE--Value"])],
                operator=oci.data_integration.models.Split(
                            model_type="SPLIT_OPERATOR",
                            key="EXAMPLE-key-Value",
                            model_version="EXAMPLE-modelVersion-Value",
                            parent_ref=oci.data_integration.models.ParentReference(
                                parent="EXAMPLE-parent-Value",
                                root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
                            name="EXAMPLE-name-Value",
                            description="EXAMPLE-description-Value",
                            object_version=365,
                            input_ports=[
                                oci.data_integration.models.InputPort(
                                    model_type="INPUT_PORT",
                                    key="EXAMPLE-key-Value",
                                    model_version="EXAMPLE-modelVersion-Value",
                                    parent_ref=oci.data_integration.models.ParentReference(
                                        parent="EXAMPLE-parent-Value",
                                        root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
                                    config_values=oci.data_integration.models.ConfigValues(
                                        config_param_values={
                                            'EXAMPLE_KEY_uTQB4': {
                                                'stringValue': 'EXAMPLE-stringValue-Value',
                                                'intValue': 361,
                                                'objectValue': 'EXAMPLE-objectValue-Value',
                                                'refValue': 'EXAMPLE-refValue-Value',
                                                'parameterValue': 'EXAMPLE-parameterValue-Value',
                                                'rootObjectValue': 'EXAMPLE-rootObjectValue-Value'}},
                                        parent_ref=oci.data_integration.models.ParentReference(
                                            parent="EXAMPLE-parent-Value",
                                            root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")),
                                    object_status=529,
                                    name="EXAMPLE-name-Value",
                                    description="EXAMPLE-description-Value",
                                    port_type="MODEL",
                                    fields=[
                                        oci.data_integration.models.FlowPort(
                                            model_type="FLOW_PORT",
                                            key="EXAMPLE-key-Value",
                                            model_version="EXAMPLE-modelVersion-Value",
                                            parent_ref=oci.data_integration.models.ParentReference(
                                                parent="EXAMPLE-parent-Value",
                                                root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
                                            config_values=oci.data_integration.models.ConfigValues(
                                                config_param_values={
                                                    'EXAMPLE_KEY_ZZ95l': {
                                                        'stringValue': 'EXAMPLE-stringValue-Value',
                                                        'intValue': 116,
                                                        'objectValue': 'EXAMPLE-objectValue-Value',
                                                        'refValue': 'EXAMPLE-refValue-Value',
                                                        'parameterValue': 'EXAMPLE-parameterValue-Value',
                                                        'rootObjectValue': 'EXAMPLE-rootObjectValue-Value'}},
                                                parent_ref=oci.data_integration.models.ParentReference(
                                                    parent="EXAMPLE-parent-Value",
                                                    root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")),
                                            object_status=741,
                                            name="EXAMPLE-name-Value",
                                            description="EXAMPLE-description-Value")])],
                            output_ports=[
                                oci.data_integration.models.ShapeField(
                                    model_type="SHAPE_FIELD",
                                    key="EXAMPLE-key-Value",
                                    model_version="EXAMPLE-modelVersion-Value",
                                    parent_ref=oci.data_integration.models.ParentReference(
                                        parent="EXAMPLE-parent-Value",
                                        root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
                                    config_values=oci.data_integration.models.ConfigValues(
                                        config_param_values={
                                            'EXAMPLE_KEY_sFMUk': {
                                                'stringValue': 'EXAMPLE-stringValue-Value',
                                                'intValue': 238,
                                                'objectValue': 'EXAMPLE-objectValue-Value',
                                                'refValue': 'EXAMPLE-refValue-Value',
                                                'parameterValue': 'EXAMPLE-parameterValue-Value',
                                                'rootObjectValue': 'EXAMPLE-rootObjectValue-Value'}},
                                        parent_ref=oci.data_integration.models.ParentReference(
                                            parent="EXAMPLE-parent-Value",
                                            root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")),
                                    object_status=526,
                                    name="EXAMPLE-name-Value",
                                    description="EXAMPLE-description-Value",
                                    type="EXAMPLE-type-Value",
                                    labels=["EXAMPLE--Value"],
                                    native_shape_field=oci.data_integration.models.NativeShapeField(
                                        name="EXAMPLE-name-Value",
                                        model_type="EXAMPLE-modelType-Value",
                                        type="EXAMPLE-type-Value",
                                        config_values=oci.data_integration.models.ConfigValues(
                                            config_param_values={
                                                'EXAMPLE_KEY_103ga': {
                                                    'stringValue': 'EXAMPLE-stringValue-Value',
                                                    'intValue': 493,
                                                    'objectValue': 'EXAMPLE-objectValue-Value',
                                                    'refValue': 'EXAMPLE-refValue-Value',
                                                    'parameterValue': 'EXAMPLE-parameterValue-Value',
                                                    'rootObjectValue': 'EXAMPLE-rootObjectValue-Value'}},
                                            parent_ref=oci.data_integration.models.ParentReference(
                                                parent="EXAMPLE-parent-Value",
                                                root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")),
                                        position=655,
                                        default_value_string="EXAMPLE-defaultValueString-Value",
                                        is_mandatory=True))],
                            object_status=73,
                            identifier="EXAMPLE-identifier-Value",
                            parameters=[
                                oci.data_integration.models.Parameter(
                                    model_type="PARAMETER",
                                    key="EXAMPLE-key-Value",
                                    model_version="EXAMPLE-modelVersion-Value",
                                    parent_ref=oci.data_integration.models.ParentReference(
                                        parent="EXAMPLE-parent-Value",
                                        root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
                                    config_values=oci.data_integration.models.ConfigValues(
                                        config_param_values={
                                            'EXAMPLE_KEY_0U3St': {
                                                'stringValue': 'EXAMPLE-stringValue-Value',
                                                'intValue': 725,
                                                'objectValue': 'EXAMPLE-objectValue-Value',
                                                'refValue': 'EXAMPLE-refValue-Value',
                                                'parameterValue': 'EXAMPLE-parameterValue-Value',
                                                'rootObjectValue': 'EXAMPLE-rootObjectValue-Value'}},
                                        parent_ref=oci.data_integration.models.ParentReference(
                                            parent="EXAMPLE-parent-Value",
                                            root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")),
                                    object_status=127,
                                    name="EXAMPLE-name-Value",
                                    description="EXAMPLE-description-Value",
                                    type="EXAMPLE-type-Value",
                                    default_value="EXAMPLE-defaultValue-Value",
                                    root_object_default_value="EXAMPLE-rootObjectDefaultValue-Value",
                                    is_input=True,
                                    is_output=True,
                                    output_aggregation_type="MIN",
                                    type_name="EXAMPLE-typeName-Value",
                                    used_for="EXAMPLE-usedFor-Value")],
                            op_config_values=oci.data_integration.models.ConfigValues(
                                config_param_values={
                                    'EXAMPLE_KEY_MXOlJ': {
                                        'stringValue': 'EXAMPLE-stringValue-Value',
                                        'intValue': 260,
                                        'objectValue': 'EXAMPLE-objectValue-Value',
                                        'refValue': 'EXAMPLE-refValue-Value',
                                        'parameterValue': 'EXAMPLE-parameterValue-Value',
                                        'rootObjectValue': 'EXAMPLE-rootObjectValue-Value'}},
                                parent_ref=oci.data_integration.models.ParentReference(
                                    parent="EXAMPLE-parent-Value",
                                    root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")),
                            data_routing_strategy="ALL"),
                ui_properties=oci.data_integration.models.UIProperties(
                    coordinate_x=4024.9688,
                    coordinate_y=8799.476),
                object_status=722)],
        parameters=[
            oci.data_integration.models.Parameter(
                model_type="PARAMETER",
                key="EXAMPLE-key-Value",
                model_version="EXAMPLE-modelVersion-Value",
                parent_ref=oci.data_integration.models.ParentReference(
                    parent="EXAMPLE-parent-Value",
                    root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
                config_values=oci.data_integration.models.ConfigValues(
                    config_param_values={
                        'EXAMPLE_KEY_q7Bt8': {
                            'stringValue': 'EXAMPLE-stringValue-Value',
                            'intValue': 406,
                            'objectValue': 'EXAMPLE-objectValue-Value',
                            'refValue': 'EXAMPLE-refValue-Value',
                            'parameterValue': 'EXAMPLE-parameterValue-Value',
                            'rootObjectValue': 'EXAMPLE-rootObjectValue-Value'}},
                    parent_ref=oci.data_integration.models.ParentReference(
                        parent="EXAMPLE-parent-Value",
                        root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")),
                object_status=815,
                name="EXAMPLE-name-Value",
                description="EXAMPLE-description-Value",
                type="EXAMPLE-type-Value",
                default_value="EXAMPLE-defaultValue-Value",
                root_object_default_value="EXAMPLE-rootObjectDefaultValue-Value",
                is_input=False,
                is_output=True,
                output_aggregation_type="MIN",
                type_name="EXAMPLE-typeName-Value",
                used_for="EXAMPLE-usedFor-Value")],
        description="EXAMPLE-description-Value",
        flow_config_values=oci.data_integration.models.ConfigValues(
            config_param_values={
                'EXAMPLE_KEY_C9NqT': {
                    'stringValue': 'EXAMPLE-stringValue-Value',
                    'intValue': 537,
                    'objectValue': 'EXAMPLE-objectValue-Value',
                    'refValue': 'EXAMPLE-refValue-Value',
                    'parameterValue': 'EXAMPLE-parameterValue-Value',
                    'rootObjectValue': 'EXAMPLE-rootObjectValue-Value'}},
            parent_ref=oci.data_integration.models.ParentReference(
                parent="EXAMPLE-parent-Value",
                root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")),
        object_status=333),
    opc_retry_token="EXAMPLE-opcRetryToken-Value",
    opc_request_id="J4QBDMZMXJXGPS8NQTAL<unique_ID>")

# Get the data from response
print(create_data_flow_response.data)