# 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_task_response = data_integration_client.create_task(
    workspace_id="ocid1.test.oc1..<unique_ID>EXAMPLE-workspaceId-Value",
    create_task_details=oci.data_integration.models.CreateTaskFromOCIDataflowTask(
        model_type="OCI_DATAFLOW_TASK",
        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=512,
            key="EXAMPLE-key-Value",
            is_favorite=False),
        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"),
        description="EXAMPLE-description-Value",
        object_status=854,
        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_zkhRO': {
                                    'stringValue': 'EXAMPLE-stringValue-Value',
                                    'intValue': 897,
                                    '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=39,
                        name="EXAMPLE-name-Value",
                        description="EXAMPLE-description-Value",
                        port_type="CONTROL",
                        fields=[
                            oci.data_integration.models.PivotField(
                                model_type="PIVOT_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_Eqb5n': {
                                            'stringValue': 'EXAMPLE-stringValue-Value',
                                            'intValue': 425,
                                            '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=42,
                                name="EXAMPLE-name-Value",
                                description="EXAMPLE-description-Value",
                                expr=oci.data_integration.models.Expression(
                                    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"),
                                    expr_string="EXAMPLE-exprString-Value",
                                    config_values=oci.data_integration.models.ConfigValues(
                                        config_param_values={
                                            'EXAMPLE_KEY_OhC19': {
                                                'stringValue': 'EXAMPLE-stringValue-Value',
                                                'intValue': 846,
                                                '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=827),
                                use_type=oci.data_integration.models.ConfiguredType(
                                    model_type="CONFIGURED_TYPE",
                                    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",
                                    object_status=233,
                                    description="EXAMPLE-description-Value",
                                    wrapped_type="EXAMPLE-wrappedType-Value",
                                    config_values=oci.data_integration.models.ConfigValues(
                                        config_param_values={
                                            'EXAMPLE_KEY_axXz4': {
                                                'stringValue': 'EXAMPLE-stringValue-Value',
                                                'intValue': 527,
                                                '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")),
                                    config_definition=oci.data_integration.models.ConfigDefinition(
                                        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",
                                        is_contained=False,
                                        object_status=945,
                                        config_parameter_definitions={
                                            'EXAMPLE_KEY_ssvyD': {
                                                'parameterType': {
                                                    'modelType': 'DERIVED_TYPE',
                                                    'key': 'EXAMPLE-key-Value',
                                                    'modelVersion': 'EXAMPLE-modelVersion-Value',
                                                    'parentRef': {
                                                        'parent': 'EXAMPLE-parent-Value',
                                                        'rootDocId': 'ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value'},
                                                    'name': 'EXAMPLE-name-Value',
                                                    'objectStatus': 162,
                                                    'description': 'EXAMPLE-description-Value'},
                                                'parameterName': 'EXAMPLE-parameterName-Value',
                                                'description': 'EXAMPLE-description-Value',
                                                'defaultValue': 'EXAMPLE-defaultValue-Value',
                                                'classFieldName': 'EXAMPLE-classFieldName-Value',
                                                'isStatic': True,
                                                'isClassFieldValue': False}})),
                                type=oci.data_integration.models.ConfiguredType(
                                    model_type="CONFIGURED_TYPE",
                                    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",
                                    object_status=689,
                                    description="EXAMPLE-description-Value",
                                    wrapped_type="EXAMPLE-wrappedType-Value",
                                    config_values=oci.data_integration.models.ConfigValues(
                                        config_param_values={
                                            'EXAMPLE_KEY_qPBJb': {
                                                'stringValue': 'EXAMPLE-stringValue-Value',
                                                'intValue': 521,
                                                '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")),
                                    config_definition=oci.data_integration.models.ConfigDefinition(
                                        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",
                                        is_contained=False,
                                        object_status=314,
                                        config_parameter_definitions={
                                            'EXAMPLE_KEY_hM9P7': {
                                                'parameterName': 'EXAMPLE-parameterName-Value',
                                                'description': 'EXAMPLE-description-Value',
                                                'defaultValue': 'EXAMPLE-defaultValue-Value',
                                                'classFieldName': 'EXAMPLE-classFieldName-Value',
                                                'isStatic': True,
                                                'isClassFieldValue': True}})),
                                column_name_pattern="EXAMPLE-columnNamePattern-Value")])],
        output_ports=[
            oci.data_integration.models.OutputPort(
                model_type="OUTPUT_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_wwTKu': {
                            'stringValue': 'EXAMPLE-stringValue-Value',
                            'intValue': 256,
                            '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=173,
                name="EXAMPLE-name-Value",
                description="EXAMPLE-description-Value",
                port_type="CONTROL")],
        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_9lZyW': {
                            'stringValue': 'EXAMPLE-stringValue-Value',
                            'intValue': 426,
                            '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=545,
                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=False,
                output_aggregation_type="MAX",
                type_name="EXAMPLE-typeName-Value",
                used_for="EXAMPLE-usedFor-Value")],
        op_config_values=oci.data_integration.models.ConfigValues(
            config_param_values={
                'EXAMPLE_KEY_oT3eg': {
                    'stringValue': 'EXAMPLE-stringValue-Value',
                    'intValue': 82,
                    '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")),
        config_provider_delegate=oci.data_integration.models.CreateConfigProvider(
            bindings={
                'EXAMPLE_KEY_vTbhe': {
                    'simpleValue': 'EXAMPLE-simpleValue-Value',
                    'rootObjectValue': 'EXAMPLE-rootObjectValue-Value'}}),
        is_concurrent_allowed=True,
        dataflow_application=oci.data_integration.models.DataflowApplication(
            application_id="ocid1.test.oc1..<unique_ID>EXAMPLE-applicationId-Value",
            compartment_id="ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value",
            config_values=oci.data_integration.models.ConfigValues(
                config_param_values={
                    'EXAMPLE_KEY_EKdgz': {
                        'stringValue': 'EXAMPLE-stringValue-Value',
                        'intValue': 206,
                        '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"))),
        driver_shape_details=oci.data_integration.models.ShapeDetails(
            config_values=oci.data_integration.models.ConfigValues(
                config_param_values={
                    'EXAMPLE_KEY_s4G7a': {
                        'stringValue': 'EXAMPLE-stringValue-Value',
                        'intValue': 952,
                        '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"))),
        executor_shape_details=oci.data_integration.models.ShapeDetails(
            config_values=oci.data_integration.models.ConfigValues(
                config_param_values={
                    'EXAMPLE_KEY_4c5tv': {
                        'stringValue': 'EXAMPLE-stringValue-Value',
                        'intValue': 8,
                        '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")))),
    opc_retry_token="EXAMPLE-opcRetryToken-Value",
    opc_request_id="RRGPJKDM2DHWN9RYOIRY<unique_ID>")

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