# 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
update_task_response = data_integration_client.update_task(
    workspace_id="ocid1.test.oc1..<unique_ID>EXAMPLE-workspaceId-Value",
    task_key="EXAMPLE-taskKey-Value",
    update_task_details=oci.data_integration.models.UpdateTaskFromSQLTask(
        model_type="SQL_TASK",
        key="EXAMPLE-key-Value",
        object_version=339,
        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_status=365,
        identifier="EXAMPLE-identifier-Value",
        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_NRsOt': {
                                'stringValue': 'EXAMPLE-stringValue-Value',
                                'intValue': 730,
                                '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=280,
                    name="EXAMPLE-name-Value",
                    description="EXAMPLE-description-Value",
                    port_type="CONTROL",
                    fields=[
                        oci.data_integration.models.OutputField(
                            model_type="OUTPUT_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_a9u3U': {
                                        'stringValue': 'EXAMPLE-stringValue-Value',
                                        'intValue': 255,
                                        '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=468,
                            name="EXAMPLE-name-Value",
                            description="EXAMPLE-description-Value",
                            type=oci.data_integration.models.DerivedType(
                                model_type="DERIVED_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=41,
                                description="EXAMPLE-description-Value"),
                            labels=["EXAMPLE--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_b2WTN': {
                            'stringValue': 'EXAMPLE-stringValue-Value',
                            'intValue': 330,
                            '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=702,
                name="EXAMPLE-name-Value",
                description="EXAMPLE-description-Value",
                port_type="DATA",
                fields=[
                    oci.data_integration.models.OutputField(
                        model_type="OUTPUT_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_BLAiR': {
                                    'stringValue': 'EXAMPLE-stringValue-Value',
                                    'intValue': 112,
                                    '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=128,
                        name="EXAMPLE-name-Value",
                        description="EXAMPLE-description-Value",
                        type=oci.data_integration.models.ArrayType(
                            model_type="ARRAY_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=748,
                            description="EXAMPLE-description-Value",
                            element_type="EXAMPLE-elementType-Value"),
                        labels=["EXAMPLE--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_0WqnZ': {
                            'stringValue': 'EXAMPLE-stringValue-Value',
                            'intValue': 889,
                            '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=620,
                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="SUM",
                type_name="EXAMPLE-typeName-Value",
                used_for="EXAMPLE-usedFor-Value")],
        op_config_values=oci.data_integration.models.ConfigValues(
            config_param_values={
                'EXAMPLE_KEY_kkZXI': {
                    'stringValue': 'EXAMPLE-stringValue-Value',
                    'intValue': 90,
                    '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")),
        is_concurrent_allowed=True,
        registry_metadata=oci.data_integration.models.RegistryMetadata(
            aggregator_key="EXAMPLE-aggregatorKey-Value",
            labels=["EXAMPLE--Value"],
            registry_version=380,
            key="EXAMPLE-key-Value",
            is_favorite=True),
        script=oci.data_integration.models.Script(
            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"),
            object_status=33),
        sql_script_type="SQL_CODE",
        operation="EXAMPLE-operation-Value"),
    opc_request_id="EIYKKN0OPA0G0MVR2ZFW<unique_ID>",
    if_match="EXAMPLE-ifMatch-Value")

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

Was this article helpful?