# 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).
require '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::ConfigFileLoader.load_config
# Initialize service client with default config file
data_integration_client =
OCI::DataIntegration::DataIntegrationClient.new(config: 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(
'ocid1.test.oc1..<unique_ID>EXAMPLE-workspaceId-Value',
OCI::DataIntegration::Models::CreateUserDefinedFunctionDetails.new(
name: 'EXAMPLE-name-Value',
identifier: 'EXAMPLE-identifier-Value',
registry_metadata:
OCI::DataIntegration::Models::RegistryMetadata.new(
aggregator_key: 'EXAMPLE-aggregatorKey-Value',
labels: %w[EXAMPLE--Value],
registry_version: 981,
key: 'EXAMPLE-key-Value',
is_favorite: false
),
key: 'EXAMPLE-key-Value',
model_version: 'EXAMPLE-modelVersion-Value',
parent_ref:
OCI::DataIntegration::Models::ParentReference.new(
parent: 'EXAMPLE-parent-Value',
root_doc_id: 'ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value'
),
signatures: [
OCI::DataIntegration::Models::FunctionSignature.new(
key: 'EXAMPLE-key-Value',
model_type: 'DIS_FUNCTION_SIGNATURE',
model_version: 'EXAMPLE-modelVersion-Value',
parent_ref:
OCI::DataIntegration::Models::ParentReference.new(
parent: 'EXAMPLE-parent-Value',
root_doc_id: 'ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value'
),
name: 'EXAMPLE-name-Value',
ret_type:
OCI::DataIntegration::Models::ConfiguredType.new(
model_type: 'CONFIGURED_TYPE',
key: 'EXAMPLE-key-Value',
model_version: 'EXAMPLE-modelVersion-Value',
parent_ref:
OCI::DataIntegration::Models::ParentReference.new(
parent: 'EXAMPLE-parent-Value',
root_doc_id:
'ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value'
),
name: 'EXAMPLE-name-Value',
object_status: 668,
description: 'EXAMPLE-description-Value',
wrapped_type: 'EXAMPLE-wrappedType-Value',
config_values:
OCI::DataIntegration::Models::ConfigValues.new(
config_param_values: {
'EXAMPLE_KEY_6t3Aq' => {
'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::DataIntegration::Models::ParentReference.new(
parent: 'EXAMPLE-parent-Value',
root_doc_id:
'ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value'
)
),
config_definition:
OCI::DataIntegration::Models::ConfigDefinition.new(
key: 'EXAMPLE-key-Value',
model_type: 'EXAMPLE-modelType-Value',
model_version: 'EXAMPLE-modelVersion-Value',
parent_ref:
OCI::DataIntegration::Models::ParentReference.new(
parent: 'EXAMPLE-parent-Value',
root_doc_id:
'ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value'
),
name: 'EXAMPLE-name-Value',
is_contained: false,
object_status: 21,
config_parameter_definitions: {
'EXAMPLE_KEY_77oLc' => {
'parameterType' => {
'modelType' => 'ARRAY_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' => 677,
'description' => 'EXAMPLE-description-Value',
'elementType' => 'EXAMPLE-elementType-Value'
},
'parameterName' => 'EXAMPLE-parameterName-Value',
'description' => 'EXAMPLE-description-Value',
'defaultValue' => 'EXAMPLE-defaultValue-Value',
'classFieldName' => 'EXAMPLE-classFieldName-Value',
'isStatic' => False,
'isClassFieldValue' => True
}
}
)
),
arguments: [
OCI::DataIntegration::Models::InputProxyField.new(
model_type: 'INPUT_PROXY_FIELD',
key: 'EXAMPLE-key-Value',
model_version: 'EXAMPLE-modelVersion-Value',
parent_ref:
OCI::DataIntegration::Models::ParentReference.new(
parent: 'EXAMPLE-parent-Value',
root_doc_id:
'ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value'
),
config_values:
OCI::DataIntegration::Models::ConfigValues.new(
config_param_values: {
'EXAMPLE_KEY_3EOBq' => {
'stringValue' => 'EXAMPLE-stringValue-Value',
'intValue' => 709,
'objectValue' => 'EXAMPLE-objectValue-Value',
'refValue' => 'EXAMPLE-refValue-Value',
'parameterValue' => 'EXAMPLE-parameterValue-Value',
'rootObjectValue' => 'EXAMPLE-rootObjectValue-Value'
}
},
parent_ref:
OCI::DataIntegration::Models::ParentReference.new(
parent: 'EXAMPLE-parent-Value',
root_doc_id:
'ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value'
)
),
object_status: 341,
name: 'EXAMPLE-name-Value',
description: 'EXAMPLE-description-Value',
scope: 'EXAMPLE-scope-Value',
type:
OCI::DataIntegration::Models::DerivedType.new(
model_type: 'DERIVED_TYPE',
key: 'EXAMPLE-key-Value',
model_version: 'EXAMPLE-modelVersion-Value',
parent_ref:
OCI::DataIntegration::Models::ParentReference.new(
parent: 'EXAMPLE-parent-Value',
root_doc_id:
'ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value'
),
name: 'EXAMPLE-name-Value',
object_status: 504,
description: 'EXAMPLE-description-Value'
),
labels: %w[EXAMPLE--Value]
)
],
description: 'EXAMPLE-description-Value',
object_status: 248
)
],
expr:
OCI::DataIntegration::Models::Expression.new(
key: 'EXAMPLE-key-Value',
model_type: 'EXAMPLE-modelType-Value',
model_version: 'EXAMPLE-modelVersion-Value',
parent_ref:
OCI::DataIntegration::Models::ParentReference.new(
parent: 'EXAMPLE-parent-Value',
root_doc_id: 'ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value'
),
expr_string: 'EXAMPLE-exprString-Value',
config_values:
OCI::DataIntegration::Models::ConfigValues.new(
config_param_values: {
'EXAMPLE_KEY_taUT8' => {
'stringValue' => 'EXAMPLE-stringValue-Value',
'intValue' => 103,
'objectValue' => 'EXAMPLE-objectValue-Value',
'refValue' => 'EXAMPLE-refValue-Value',
'parameterValue' => 'EXAMPLE-parameterValue-Value',
'rootObjectValue' => 'EXAMPLE-rootObjectValue-Value'
}
},
parent_ref:
OCI::DataIntegration::Models::ParentReference.new(
parent: 'EXAMPLE-parent-Value',
root_doc_id:
'ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value'
)
),
object_status: 807
),
description: 'EXAMPLE-description-Value',
object_status: 4
)
)
# Get the data from response
puts "#{create_user_defined_function_response.data}"