# 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_science_client = OCI::DataScience::DataScienceClient.new(config: config)

# Send the request to service, some parameters are not required, see API doc for more info
create_pipeline_run_response =
  data_science_client.create_pipeline_run(
    OCI::DataScience::Models::CreatePipelineRunDetails.new(
      compartment_id: 'ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value',
      pipeline_id: 'ocid1.test.oc1..<unique_ID>EXAMPLE-pipelineId-Value',
      project_id: 'ocid1.test.oc1..<unique_ID>EXAMPLE-projectId-Value',
      display_name: 'EXAMPLE-displayName-Value',
      configuration_override_details:
        OCI::DataScience::Models::PipelineDefaultConfigurationDetails.new(
          type: 'DEFAULT',
          maximum_runtime_in_minutes: 1302,
          environment_variables: {
            'EXAMPLE_KEY_qb0BX' => 'EXAMPLE_VALUE_ECqy4PKZP1FI6aHxEsDK'
          },
          command_line_arguments: 'EXAMPLE-commandLineArguments-Value'
        ),
      log_configuration_override_details:
        OCI::DataScience::Models::PipelineLogConfigurationDetails.new(
          enable_logging: true,
          enable_auto_log_creation: false,
          log_group_id: 'ocid1.test.oc1..<unique_ID>EXAMPLE-logGroupId-Value',
          log_id: 'ocid1.test.oc1..<unique_ID>EXAMPLE-logId-Value'
        ),
      step_override_details: [
        OCI::DataScience::Models::PipelineStepOverrideDetails.new(
          step_name: 'EXAMPLE-stepName-Value',
          step_configuration_details:
            OCI::DataScience::Models::PipelineStepConfigurationDetails.new(
              maximum_runtime_in_minutes: 28_369,
              environment_variables: {
                'EXAMPLE_KEY_nvvPf' => 'EXAMPLE_VALUE_iXIvVc6v8FBe5YP1C9iQ'
              },
              command_line_arguments: 'EXAMPLE-commandLineArguments-Value'
            )
        )
      ],
      freeform_tags: {
        'EXAMPLE_KEY_baQON' => 'EXAMPLE_VALUE_nvZ5qVnzo77jHwXYtI26'
      },
      defined_tags: {
        'EXAMPLE_KEY_OMnjI' => { 'EXAMPLE_KEY_yOn1H' => 'EXAMPLE--Value' }
      },
      system_tags: {
        'EXAMPLE_KEY_gazhe' => { 'EXAMPLE_KEY_Mp89n' => 'EXAMPLE--Value' }
      }
    )
  )

# Get the data from response
puts "#{create_pipeline_run_response.data}"