OS Management Hub Events

Some OS Management Hub resources emit events as part of the Oracle Cloud Infrastructure Events service.

You can create automation based on state changes of resources by using event types, rules, and actions. You can define rules that trigger a specific action when an event occurs. For more information, see Overview of Events and Get Started with Events. For information about managing rules for events, see Managing Rules for Events.

OS Management Hub resources that emit events include:

Lifecycle Environment Event Types

These are the event types that the lifecycle environment resource emits:

Friendly Name Event Type
Attach Managed Instances To Lifecycle Stage
com.oraclecloud.osmh.attachmanagedinstancestolifecyclestage
Create Lifecycle Environment
com.oraclecloud.osmh.createlifecycleenvironment
Delete Lifecycle Environment
com.oraclecloud.osmh.deletelifecycleenvironment
Detach Managed Instances From Lifecycle Stage
com.oraclecloud.osmh.detachmanagedinstancesfromlifecyclestage
Promote Software Source To Lifecycle Stage
com.oraclecloud.osmh.promotesoftwaresourcetolifecyclestage
Update Lifecycle Environment
com.oraclecloud.osmh.updatelifecycleenvironment

Lifecycle Environment Example

This is a reference event for a lifecycle environment:

{
  "eventType": "com.oraclecloud.osmh.attachmanagedinstancestolifecyclestage",
  "cloudEventsVersion": "0.1",
  "eventTypeVersion": "2.0",
  "source": "osmhprod-lifecycle-environment",
  "eventTime": "2024-01-08T22:04:53Z",
  "contentType": "application/json",
  "data": {
    "eventName": "AttachManagedInstancesToLifecycleStage",
    "compartmentId": "ocid1.compartment.oc1..<unique_ID>",
    "compartmentName": "example_compartment",
    "resourceName": "My test resource",
    "resourceId": "ocid1.example_regional_resource.oc1.iad.<unique_ID>",
    "availabilityDomain": "<availability_domain>"
  },
  "eventID": "<unique_ID>",
  "extensions": {
    "compartmentId": "ocid1.compartment.oc1..<unique_ID>",
  }
}

Managed Instance Event Types

These are the event types that the managed instance resource emits:

Friendly Name Event Type
Attach Profile to Managed Instance
com.oraclecloud.osmh.attachprofiletomanagedinstance
Attach Software Sources to Managed Instance
com.oraclecloud.osmh.attachsoftwaresourcestomanagedinstance
Delete Managed Instance
com.oraclecloud.osmh.deletemanagedinstance
Disable Module Stream On Managed Instance
com.oraclecloud.osmh.disablemodulestreamonmanagedinstance
Enable Module Stream On Managed Instance
com.oraclecloud.osmh.enablemodulestreamonmanagedinstance
Install All Windows Updates On Managed Instances In Compartment
com.oraclecloud.osmh.installallwindowsupdatesonmanagedinstancesincompartment
Install Module Stream Profile On Managed Instance
com.oraclecloud.osmh.installmodulestreamprofileonmanagedinstance
Install Packages On Managed Instance
com.oraclecloud.osmh.installpackagesonmanagedinstance
Install Windows Updates On Managed Instance
com.oraclecloud.osmh.installwindowsupdatesonmanagedinstance
Manage Module Streams On Managed Instance
com.oraclecloud.osmh.managemodulestreamsonmanagedinstance
Refresh Software On Managed Instance
com.oraclecloud.osmh.refreshsoftwareonmanagedinstance
Remove Module Stream Profile From Managed Instance
com.oraclecloud.osmh.removemodulestreamprofilefrommanagedinstance
Remove Packages From Managed Instance
com.oraclecloud.osmh.removepackagesfrommanagedinstance
Switch Module Stream On Managed Instance
com.oraclecloud.osmh.switchmodulestreamonmanagedinstance
Update All Packages On Managed Instances In Compartment
com.oraclecloud.osmh.updateallpackagesonmanagedinstancesincompartment
Update Managed Instance
com.oraclecloud.osmh.updatemanagedinstance
Update Packages On Managed Instance
com.oraclecloud.osmh.updatepackagesonmanagedinstance

Managed Instance Example

This is a reference event for a managed instance:

{
  "eventType": "com.oraclecloud.osmh.installpackagesonmanagedinstance",
  "cloudEventsVersion": "0.1",
  "eventTypeVersion": "2.0",
  "source": "osmhprod-managed-instance",
  "eventTime": "2024-01-08T17:13:55Z",
  "contentType": "application/json",
  "data": {
    "eventName": "InstallPackagesOnManagedInstance",
    "compartmentId": "ocid1.compartment.oc1..<unique_ID>",
    "compartmentName": "example_compartment",
    "resourceName": "My test resource",
    "resourceId": "ocid1.example_regional_resource.oc1.iad.<unique_ID>",
    "availabilityDomain": "<availability_domain>"
  },
  "eventID": "<unique_ID>",
  "extensions": {
    "compartmentId": "ocid1.compartment.oc1..<unique_ID>"
  }
}

Managed Instance Group Event Types

These are the event types that managed instance group resource emits:

Friendly Name Event Type
Attach Managed Instances to Managed Instance Group
com.oraclecloud.osmh.attachmanagedinstancestomanagedinstancegroup
Attach Software Sources to Managed Instance Group

com.oraclecloud.osmh.attachsoftwaresourcestomanagedinstancegroup
Change Managed Instance Group Compartment
com.oraclecloud.osmh.changemanagedinstancegroupcompartment
Create Managed Instance Group
com.oraclecloud.osmh.createmanagedinstancegroup
Detach Managed Instances From Managed Instance Group
com.oraclecloud.osmh.detachmanagedinstancesfrommanagedinstancegroup
Detach Software Sources From Managed Instance Group
com.oraclecloud.osmh.detachsoftwaresourcesfrommanagedinstancegroup
Disable Module Stream On Managed Instance Group
com.oraclecloud.osmh.disablemodulestreamonmanagedinstancegroup
Enable Module Stream On Managed Instance Group
com.oraclecloud.osmh.enablemodulestreamonmanagedinstancegroup
Install Module Stream Profile On Managed Instance Group
com.oraclecloud.osmh.installmodulestreamprofileonmanagedinstancegroup
Install Packages On Managed Instance Group
com.oraclecloud.osmh.installpackagesonmanagedinstancegroup
Remove Module Stream Profile From Managed Instance Group
com.oraclecloud.osmh.removemodulestreamprofilefrommanagedinstancegroup
Remove Packages From Managed Instance Group
com.oraclecloud.osmh.removepackagesfrommanagedinstancegroup
Update All Packages On Managed Instance Group
com.oraclecloud.osmh.updateallpackagesonmanagedinstancegroup
Update Managed Instance Group
com.oraclecloud.osmh.updatemanagedinstancegroup

Managed Instance Group Example

This is a reference event for a managed instance group:

{
  "eventType": "com.oraclecloud.osmh.attachmanagedinstancetomanagedinstancegroup",
  "cloudEventsVersion": "0.1",
  "eventTypeVersion": "2.0",
  "source": "osmhprod-managed-instance-group",
  "eventTime": "2024-01-11T17:02:13Z",
  "contentType": "application/json",
  "data": {
    "eventName": "AttachManagedInstanceToManagedInstanceGroup",
    "compartmentId": "ocid1.compartment.oc1..<unique_ID>",
    "compartmentName": "example_compartment",
    "resourceName": "My test resource",
    "resourceId": "ocid1.example_regional_resource.oc1.iad.<unique_ID>",
    "availabilityDomain": "<availability_domain>"
  },
  "eventID": "<unique_ID>",
  "extensions": {
    "compartmentId": "ocid1.compartment.oc1..<unique_ID>"
  }
}

Scheduled Job Event Types

These are the event types that the scheduled job resource emits:

Friendly Name Event Type
Change Scheduled Job Compartment
com.oraclecloud.osmh.changescheduledjobcompartment
Create Scheduled Job
com.oraclecloud.osmh.createscheduledjob
Delete Scheduled Job
com.oraclecloud.osmh.deletescheduledjob
Run Scheduled Job Now
com.oraclecloud.osmh.runscheduledjobnow
Update Scheduled Job
com.oraclecloud.osmh.updatescheduledjob

Scheduled Job Example

This is a reference event for a scheduled job:

{
  "eventType": "com.oraclecloud.osmh.updatescheduledjob",
  "cloudEventsVersion": "0.1",
  "eventTypeVersion": "2.0",
  "source": "osmhprod-scheduled-job",
  "eventTime": "2024-01-09T18:33:49Z",
  "contentType": "application/json",
  "data": {
    "eventName": "UpdateScheduledJob",
    "compartmentId": "ocid1.compartment.oc1..<unique_ID>",
    "compartmentName": "example_compartment",
    "resourceName": "My test resource",
    "resourceId": "ocid1.example_regional_resource.oc1.iad.<unique_ID>",
    "availabilityDomain": "<availability_domain>"
  },
  "eventID": "<unique_ID>",
  "extensions": {
    "compartmentId": "ocid1.compartment.oc1..<unique_ID>"
  }
}

Software Source Event Types

These are the event types that the software source resource emits:

Friendly Name Event Type
Add Packages To Software Source
com.oraclecloud.osmh.addpackagestosoftwaresource
Change Availability Of Software Sources
com.oraclecloud.osmh.changeavailabilityofsoftwaresources
Change Software Source Compartment
com.oraclecloud.osmh.changesoftwaresourcecompartment
Create Software Source
com.oraclecloud.osmh.createsoftwaresource
Delete Software Source
com.oraclecloud.osmh.deletesoftwaresource
Update Software Source
com.oraclecloud.osmh.updatesoftwaresource

Software Source Example

This is a reference event for a software source:

{
  "eventType": "com.oraclecloud.osmh.addpackagestosoftwaresource",
  "cloudEventsVersion": "0.1",
  "eventTypeVersion": "2.0",
  "source": "osmhprod-software-source",
  "eventTime": "2024-01-09T17:33:56Z",
  "contentType": "application/json",
  "data": {
    "eventName": "AddPackagesToSoftwareSource",
    "compartmentId": "ocid1.compartment.oc1..<unique_ID>",
    "compartmentName": "example_compartment",
    "resourceName": "My test resource",
    "resourceId": "ocid1.example_regional_resource.oc1.iad.<unique_ID>",
    "availabilityDomain": "<availability_domain>"
  },
  "eventID": "<unique_ID>",
  "extensions": {
    "compartmentId": "ocid1.compartment.oc1..<unique_ID>"
  }
}