# 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_user_defined_function_response = data_integration_client.create_user_defined_function(
    workspace_id="ocid1.test.oc1..<unique_ID>EXAMPLE-workspaceId-Value",
    create_user_defined_function_details=oci.data_integration.models.CreateUserDefinedFunctionDetails(
        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=50,
            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"),
        signatures=[
            oci.data_integration.models.FunctionSignature(
                key="EXAMPLE-key-Value",
                model_type="DIS_FUNCTION_SIGNATURE",
                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",
                ret_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=856,
                    description="EXAMPLE-description-Value",
                    wrapped_type="EXAMPLE-wrappedType-Value",
                    config_values=oci.data_integration.models.ConfigValues(
                        config_param_values={
                            'EXAMPLE_KEY_fXivk': {
                                'stringValue': 'EXAMPLE-stringValue-Value',
                                'intValue': 614,
                                '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=True,
                        object_status=76,
                        config_parameter_definitions={
                            'EXAMPLE_KEY_qqnAt': {
                                'parameterType': {
                                    'modelType': 'DYNAMIC_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': 685,
                                            'description': 'EXAMPLE-description-Value',
                                            'typeHandler': {
                                                'modelType': 'FLATTEN_TYPE_HANDLER',
                                                'key': 'EXAMPLE-key-Value',
                                                'modelVersion': 'EXAMPLE-modelVersion-Value',
                                                'parentRef': {
                                                    'parent': 'EXAMPLE-parent-Value',
                                                    'rootDocId': 'ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value'},
                                                'scope': 'EXAMPLE-scope-Value',
                                                'flattenDetails': 'EXAMPLE-flattenDetails-Value',
                                                'configValues': {
                                                    'configParamValues': {
                                                        'EXAMPLE_KEY_f2pAM': {
                                                            'stringValue': 'EXAMPLE-stringValue-Value',
                                                            'intValue': 854,
                                                            'objectValue': 'EXAMPLE-objectValue-Value',
                                                            'refValue': 'EXAMPLE-refValue-Value',
                                                            'parameterValue': 'EXAMPLE-parameterValue-Value',
                                                            'rootObjectValue': 'EXAMPLE-rootObjectValue-Value'}},
                                                    'parentRef': {
                                                        'parent': 'EXAMPLE-parent-Value',
                                                        'rootDocId': 'ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value'}},
                                                'objectStatus': 691}},
                                'parameterName': 'EXAMPLE-parameterName-Value',
                                'description': 'EXAMPLE-description-Value',
                                'defaultValue': 'EXAMPLE-defaultValue-Value',
                                            'classFieldName': 'EXAMPLE-classFieldName-Value',
                                'isStatic': False,
                                'isClassFieldValue': True}})),
                arguments=[
                    oci.data_integration.models.InputProxyField(
                        model_type="INPUT_PROXY_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_UXBoT': {
                                    'stringValue': 'EXAMPLE-stringValue-Value',
                                    'intValue': 957,
                                    '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=9,
                        name="EXAMPLE-name-Value",
                        description="EXAMPLE-description-Value",
                        scope="EXAMPLE-scope-Value",
                        type=oci.data_integration.models.DynamicType(
                                    model_type="DYNAMIC_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=991,
                                    description="EXAMPLE-description-Value",
                                    type_handler=oci.data_integration.models.FlattenTypeHandler(
                                        model_type="FLATTEN_TYPE_HANDLER",
                                        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",
                                        flatten_details="EXAMPLE-flattenDetails-Value",
                                        config_values=oci.data_integration.models.ConfigValues(
                                            config_param_values={
                                                'EXAMPLE_KEY_Fsb0b': {
                                                    'stringValue': 'EXAMPLE-stringValue-Value',
                                                    'intValue': 743,
                                                    '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=393),
                                    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=True,
                                        object_status=387,
                                        config_parameter_definitions={
                                            'EXAMPLE_KEY_LQQx5': {
                                                'parameterName': 'EXAMPLE-parameterName-Value',
                                                'description': 'EXAMPLE-description-Value',
                                                'defaultValue': 'EXAMPLE-defaultValue-Value',
                                                'classFieldName': 'EXAMPLE-classFieldName-Value',
                                                'isStatic': False,
                                                'isClassFieldValue': False}})),
                        labels=["EXAMPLE--Value"])],
                description="EXAMPLE-description-Value",
                object_status=458)],
        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_dF1bY': {
                        'stringValue': 'EXAMPLE-stringValue-Value',
                        'intValue': 764,
                        '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=237),
        description="EXAMPLE-description-Value",
        object_status=793),
    opc_retry_token="EXAMPLE-opcRetryToken-Value",
    opc_request_id="9QXPTEGDLGPDE0FXZCTE<unique_ID>")

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

Was this article helpful?