Creating Automation Using Events

Create automation based on state changes for Data Science resources using the Event service types, rules, and actions.

These Data Science resources emit events, and explain how to set up event notifications: 

Project Event Types

These are the event types that projects emit:

Friendly Name Event Type
Create Project
com.oraclecloud.datascience.createproject
Delete Project Begin
com.oraclecloud.datascience.deleteproject.begin
Delete Project End
com.oraclecloud.datascience.deleteproject.end
Update Project
com.oraclecloud.datascience.updateproject

Project Example

This is a reference event for projects:

{
    "eventType": "com.oraclecloud.datascience.createproject",
    "cloudEventsVersion": "0.1",
    "eventTypeVersion": "2.0",
    "source": "datascience",
    "eventTime": "2019-11-22T01:43:35.246Z",
    "eventID": "<unique_ID>",
    "contentType": "application/json",
    "data": {
      "compartmentId": "ocid1.compartment.oc1..<unique_ID>",
      "compartmentName": "example_compartment",
      "resourceName": "example_project",
      "resourceId": "ocid1.datascienceproject.oc1.iad.<unique_ID>",
      "availabilityDomain": "<availability_domain>",
      "freeFormTags": {
        "Department": "Finance"
      },
      "definedTags": {
        "Operations": {
          "CostCenter": "42"
        }
      }
    },
    "extensions": {
      "compartmentId": "ocid1.compartment.oc1..<unique_ID>"
    }
}

Notebook Session Event Types

These are the event types that notebook sessions emit:

Friendly Name Event Type
Activate Notebook Session Begin
com.oraclecloud.datascience.activatenotebooksession.begin
Activate Notebook Session End
com.oraclecloud.datascience.activatenotebooksession.end
Create Notebook Session Begin
com.oraclecloud.datascience.createnotebooksession.begin
Create Notebook Session End
com.oraclecloud.datascience.createnotebooksession.end
Deactivate Notebook Session Begin
com.oraclecloud.datascience.deactivatenotebooksession.begin
Deactivate Notebook Session End
com.oraclecloud.datascience.deactivatenotebooksession.end
Delete Notebook Session Begin
com.oraclecloud.datascience.deletenotebooksession.begin
Delete Notebook Session End
com.oraclecloud.datascience.deletenotebooksession.end
Update Notebook Session
com.oraclecloud.datascience.updatenotebooksession

Notebook Session Example

This is a reference event for notebook sessions:

{
    "eventType": "com.oraclecloud.datascience.updatenotebooksession",
    "cloudEventsVersion": "0.1",
    "eventTypeVersion": "2.0",
    "source": "datascience",
    "eventTime": "2019-11-22T01:43:35.246Z",
    "eventID": "<unique_ID>",
    "contentType": "application/json",
    "data": {
      "compartmentId": "ocid1.compartment.oc1..<unique_ID>",
      "compartmentName": "example_compartment",
      "resourceName": "example_notebook_session",
      "resourceId": "ocid1.datasciencenotebooksession.oc1.iad.<unique_ID>",
      "availabilityDomain": "<availability_domain>",
      "freeFormTags": {
        "Department": "Finance"
      },
      "definedTags": {
        "Operations": {
          "CostCenter": "42"
        }
      }
    },
    "extensions": {
      "compartmentId": "ocid1.compartment.oc1..<unique_ID>"
    }
}

Model Event Types

These are the event types that models emit:

Friendly Name Event Type
Activate Model
com.oraclecloud.datascience.activatemodel
Create Model
com.oraclecloud.datascience.createmodel
Deactivate Model
com.oraclecloud.datascience.deactivatemodel
Delete Model
com.oraclecloud.datascience.deletemodel
Update Model
com.oraclecloud.datascience.updatemodel

Model Example

This is a reference event for models:

{
    "eventType": "com.oraclecloud.datascience.deletemodel",
    "cloudEventsVersion": "0.1",
    "eventTypeVersion": "2.0",
    "source": "datascience",
    "eventTime": "2019-11-22T01:43:35.246Z",
    "eventID": "<unique_ID>",
    "contentType": "application/json",
    "data": {
      "compartmentId": "ocid1.compartment.oc1..<unique_ID>",
      "compartmentName": "example_compartment",
      "resourceName": "example_model",
      "resourceId": "ocid1.datasciencemodel.oc1.iad.<unique_ID>",
      "availabilityDomain": "<availability_domain>",
      "freeFormTags": {
        "Department": "Finance"
      },
      "definedTags": {
        "Operations": {
          "CostCenter": "42"
        }
      }
    },
    "extensions": {
      "compartmentId": "ocid1.compartment.oc1..<unique_ID>"
    }
}

Model Deployment Event Types

These are the event types that model deployments emit:

Friendly Name Event Type
Activate Model Deployment
com.oraclecloud.datascience.activatemodeldeployment.begin
com.oraclecloud.datascience.activatemodeldeployment.end
Create Model Deployment
com.oraclecloud.datascience.createmodeldeployment.begin
com.oraclecloud.datascience.createmodeldeployment.end
Deactivate Model Deployment
com.oraclecloud.datascience.deactivatemodeldeployment.begin
com.oraclecloud.datascience.deactivatemodeldeployment.end
Delete Model Deployment
com.oraclecloud.datascience.deletemodeldeployment.begin
com.oraclecloud.datascience.deletemodeldeployment.end
Update Model Deployment
com.oraclecloud.datascience.updatemodeldeployment.begin
com.oraclecloud.datascience.updatemodeldeployment.end

Model Deployment Example

This is a reference event for model deployments:

"exampleEvent": {
    "eventType": "com.oraclecloud.datascience.createmodeldeployment.begin",
    "cloudEventsVersion": "0.1",
    "eventTypeVersion": "2.0",
    "source": "datascience",
    "eventTime": "2021-03-03T01:43:35.246Z",
    "eventID": "unique_ID",
    "contentType": "application/json",
    "data": {
      "compartmentId": "ocid1.compartment.oc1..unique_ID",
      "compartmentName": "example_compartment",
      "resourceName": "example_model_deployment",
      "resourceId": "ocid1.datasciencemodeldeployment.oc1.iad.unique_ID",
      "availabilityDomain": "availability_domain",
      "freeFormTags": {
        "Department": "Finance"
      },
      "definedTags": {
        "Operations": {
          "CostCenter": "42"
        }
      }
    },

Job and Job Run Event Types

These are the event types that job and job runs emit:

Friendly Name Event Type
Job — Create
com.oraclecloud.datascience.createjob
Job — Delete begin
com.oraclecloud.datascience.deletejob.begin
Job — Delete end
com.oraclecloud.datascience.deletejob.end
Job — Update
com.oraclecloud.datascience.updatejob
Job Run — Cancel begin
com.oraclecloud.datascience.canceljobrun.begin
Job Run — Cancel end
com.oraclecloud.datascience.canceljobrun.end
Job Run — Create begin
com.oraclecloud.datascience.createjobrun.begin
Job Run — Create end
com.oraclecloud.datascience.createjobrun.end
Job Run — Delete
com.oraclecloud.datascience.deletejobrun
Job Run — Failed
com.oraclecloud.datascience.failedjobrun
Job Run — Succeeded
com.oraclecloud.datascience.succeededjobrun
Job Run — Timeout
com.oraclecloud.datascience.timeoutjobrun
Job Run — Update
com.oraclecloud.datascience.updatejobrun

Pipeline and Pipeline Run Event Types

These are the event types that pipeline and pipeline runs emit:

Friendly Name Event Type
Pipeline - Create
com.oraclecloud.datascience.createpipeline
Pipeline - Delete begin
com.oraclecloud.datascience.deletepipeline.begin
Pipeline - Delete end
com.oraclecloud.datascience.deletepipeline.end
Pipeline - Update
com.oraclecloud.datascience.updatepipeline
Pipeline Run - Cancel begin
com.oraclecloud.datascience.cancelpipelinerun.begin
Pipeline Run - Cancel end
com.oraclecloud.datascience.cancelpipelinerun.end
Pipeline Run - Create begin
com.oraclecloud.datascience.createpipelinerun.begin
Pipeline Run - Create end
com.oraclecloud.datascience.createpipelinerun.end
Pipeline Run - Delete
com.oraclecloud.datascience.updatepipelinerun
Pipeline Run - Failed
com.oraclecloud.datascience.failedpipelinerun
Pipeline Run - Succeeded
com.oraclecloud.datascience.succededpipelinerun
Pipeline Run - Timeout
com.oraclecloud.datascience.timeoutpipelinerun
Pipeline Run - Update
com.oraclecloud.datascience.updatepipelinerun

References for Using the Events Service

You can define rules that trigger a specific action when an event occurs. For example, you can set up the Notifications service to send you a Slack message when an artifact uploads to a specific repository.

For more information, see: