# 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 'date'
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_task_schedule_response =
data_integration_client.create_task_schedule(
'ocid1.test.oc1..<unique_ID>EXAMPLE-workspaceId-Value',
'EXAMPLE-applicationKey-Value',
OCI::DataIntegration::Models::CreateTaskScheduleDetails.new(
name: 'EXAMPLE-name-Value',
identifier: 'EXAMPLE-identifier-Value',
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'
),
description: 'EXAMPLE-description-Value',
object_version: 622,
object_status: 654,
schedule_ref:
OCI::DataIntegration::Models::Schedule.new(
key: 'EXAMPLE-key-Value',
model_version: 'EXAMPLE-modelVersion-Value',
model_type: 'EXAMPLE-modelType-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',
description: 'EXAMPLE-description-Value',
object_version: 463,
object_status: 306,
identifier: 'EXAMPLE-identifier-Value',
frequency_details:
OCI::DataIntegration::Models::MonthlyFrequencyDetails.new(
model_type: 'MONTHLY',
frequency: 'CUSTOM',
interval: 431,
time:
OCI::DataIntegration::Models::Time.new(
hour: 8, minute: 58, second: 5
),
days: [54]
),
timezone: 'EXAMPLE-timezone-Value',
is_daylight_adjustment_enabled: true,
metadata:
OCI::DataIntegration::Models::ObjectMetadata.new(
created_by: 'EXAMPLE-createdBy-Value',
created_by_name: 'EXAMPLE-createdByName-Value',
updated_by: 'EXAMPLE-updatedBy-Value',
updated_by_name: 'EXAMPLE-updatedByName-Value',
time_created: DateTime.parse('2044-09-23T23:39:49.105Z'),
time_updated: DateTime.parse('2049-03-03T18:53:15.233Z'),
aggregator_key: 'EXAMPLE-aggregatorKey-Value',
aggregator:
OCI::DataIntegration::Models::AggregatorSummary.new(
type: 'EXAMPLE-type-Value',
key: 'EXAMPLE-key-Value',
name: 'EXAMPLE-name-Value',
identifier: 'EXAMPLE-identifier-Value',
description: 'EXAMPLE-description-Value'
),
identifier_path: 'EXAMPLE-identifierPath-Value',
info_fields: {
'EXAMPLE_KEY_8m3yS' => 'EXAMPLE_VALUE_Gp8b0GQ31VPNwbm8fsQt'
},
registry_version: 940,
labels: %w[EXAMPLE--Value],
is_favorite: false,
count_statistics:
OCI::DataIntegration::Models::CountStatistic.new(
object_type_count_list: [
OCI::DataIntegration::Models::CountStatisticSummary.new(
object_type: 'USER_DEFINED_FUNCTION', object_count: 92
)
]
)
)
),
is_enabled: false,
number_of_retries: 444,
retry_delay: 4469.1787,
retry_delay_unit: 'DAYS',
start_time_millis: 30,
end_time_millis: 943,
is_concurrent_allowed: false,
is_backfill_enabled: true,
auth_mode: 'USER_CERTIFICATE',
expected_duration: 9369.116,
expected_duration_unit: 'DAYS',
registry_metadata:
OCI::DataIntegration::Models::RegistryMetadata.new(
aggregator_key: 'EXAMPLE-aggregatorKey-Value',
labels: %w[EXAMPLE--Value],
registry_version: 427,
key: 'EXAMPLE-key-Value',
is_favorite: true
)
)
)
# Get the data from response
puts "#{create_task_schedule_response.data}"