# 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).

from datetime import datetime
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_science_client = oci.data_science.DataScienceClient(config)


# Send the request to service, some parameters are not required, see API
# doc for more info
update_schedule_response = data_science_client.update_schedule(
    schedule_id="ocid1.test.oc1..<unique_ID>EXAMPLE-scheduleId-Value",
    update_schedule_details=oci.data_science.models.UpdateScheduleDetails(
        display_name="EXAMPLE-displayName-Value",
        description="EXAMPLE-description-Value",
        trigger=oci.data_science.models.ScheduleICalTrigger(
            trigger_type="ICAL",
            recurrence="EXAMPLE-recurrence-Value",
            time_start=datetime.strptime(
                "2021-07-06T18:00:12.798Z",
                "%Y-%m-%dT%H:%M:%S.%fZ"),
            time_end=datetime.strptime(
                "2034-12-13T21:04:53.163Z",
                "%Y-%m-%dT%H:%M:%S.%fZ")),
        action=oci.data_science.models.ScheduleHttpAction(
            action_type="HTTP",
            action_details=oci.data_science.models.CreatePipelineRunScheduleActionDetails(
                http_action_type="CREATE_PIPELINE_RUN",
                create_pipeline_run_details=oci.data_science.models.CreatePipelineRunDetails(
                    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.data_science.models.PipelineDefaultConfigurationDetails(
                        type="DEFAULT",
                        maximum_runtime_in_minutes=11069,
                        environment_variables={
                            'EXAMPLE_KEY_jLXQI': 'EXAMPLE_VALUE_ZsrV7mKL3hamZsME6gKJ'},
                        command_line_arguments="EXAMPLE-commandLineArguments-Value"),
                    log_configuration_override_details=oci.data_science.models.PipelineLogConfigurationDetails(
                        enable_logging=True,
                        enable_auto_log_creation=True,
                        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.data_science.models.PipelineStepOverrideDetails(
                            step_name="EXAMPLE-stepName-Value",
                            step_configuration_details=oci.data_science.models.PipelineStepConfigurationDetails(
                                maximum_runtime_in_minutes=26303,
                                environment_variables={
                                    'EXAMPLE_KEY_LYIjE': 'EXAMPLE_VALUE_SwlhOwuLyR8dm6w2rIZz'},
                                command_line_arguments="EXAMPLE-commandLineArguments-Value"),
                            step_container_configuration_details=oci.data_science.models.PipelineOcirContainerConfigurationDetails(
                                container_type="OCIR_CONTAINER",
                                image="EXAMPLE-image-Value",
                                cmd=["EXAMPLE--Value"],
                                entrypoint=["EXAMPLE--Value"],
                                image_digest="EXAMPLE-imageDigest-Value",
                                image_signature_id="ocid1.test.oc1..<unique_ID>EXAMPLE-imageSignatureId-Value"),
                            step_dataflow_configuration_details=oci.data_science.models.PipelineDataflowConfigurationDetails(
                                configuration="EXAMPLE-configuration-Value",
                                driver_shape="EXAMPLE-driverShape-Value",
                                driver_shape_config_details=oci.data_science.models.PipelineShapeConfigDetails(
                                    ocpus=58.704742,
                                    memory_in_gbs=386.5069),
                                executor_shape="EXAMPLE-executorShape-Value",
                                executor_shape_config_details=oci.data_science.models.PipelineShapeConfigDetails(
                                    ocpus=44.65664,
                                    memory_in_gbs=232.32971),
                                num_executors=168,
                                warehouse_bucket_uri="EXAMPLE-warehouseBucketUri-Value",
                                logs_bucket_uri="EXAMPLE-logsBucketUri-Value"))],
                    freeform_tags={
                        'EXAMPLE_KEY_NoPYr': 'EXAMPLE_VALUE_KAGHyJCZSfSYrzAGhByP'},
                    defined_tags={
                        'EXAMPLE_KEY_FLhc4': {
                            'EXAMPLE_KEY_QfUtf': 'EXAMPLE--Value'}},
                    system_tags={
                        'EXAMPLE_KEY_kkDm4': {
                            'EXAMPLE_KEY_j71NU': 'EXAMPLE--Value'}}))),
        log_details=oci.data_science.models.ScheduleLogDetails(
            log_group_id="ocid1.test.oc1..<unique_ID>EXAMPLE-logGroupId-Value",
            log_id="ocid1.test.oc1..<unique_ID>EXAMPLE-logId-Value"),
        freeform_tags={
            'EXAMPLE_KEY_rtBW6': 'EXAMPLE_VALUE_Y5wCPCxJI0sSJUALcptl'},
        defined_tags={
            'EXAMPLE_KEY_a6pHB': {
                'EXAMPLE_KEY_Xaclg': 'EXAMPLE--Value'}}),
    if_match="EXAMPLE-ifMatch-Value",
    opc_request_id="YJC3O8XM5WUF1VUBL5JI<unique_ID>")

# Get the data from response
print(update_schedule_response.headers)

Was this article helpful?