Artifact Registry Events
Oracle Cloud Infrastructure Events are JSON files that are emitted with some service operations and carry information about that operation.
Artifact Registry emits events when you:
- Create, update, or delete a repository.
- List the repositories of a specific compartment.
- Move a repository and its artifacts to a new compartment.
- Upload an artifact into a repository.
- Download, get details, update, or delete an artifact from a repository.
- List the artifacts of a specific repository.
Repository Events
When you create, update, list, delete or change compartment of a repository, Artifact Registry creates an event.
Here are the event types that repositories emit:
Friendly Name | Event Type |
---|---|
Artifact Repository Create |
|
Artifact Repository List |
|
Artifact Repository Update |
|
Artifact Repository Change Compartment |
|
Artifact Repository Delete |
|
- Example for Creating a Repository
-
{ "eventType": "com.oraclecloud.artifacts.createrepository", "cloudEventsVersion": "0.1", "eventTypeVersion": "2.0", "source": "RepositoryService", "eventTime": "2019-08-16T15:09:04.550Z", "contentType": "application/json", "data": { "compartmentId": "ocid1.compartment.oc1..<unique_ID>", "compartmentName": "example_compartment", "resourceName": "repo1", "resourceId": "ocid1.artifactrepository.oc1..<unique_ID>", "availabilityDomain": "all" }, "eventID": "<unique_ID>" }
Artifact Events
When you upload, update, delete, or get details of an artifact, or when you list the artifacts of a repository, Artifact Registry creates an event.
Here are the event types that artifacts emit:
Friendly Name | Event Type |
---|---|
Generic Artifact Upload By Path |
|
Generic Artifact List |
|
Generic Artifact Update |
|
Generic Artifact Update By Path |
|
Generic Artifact Download |
|
Generic Artifact Download By Path |
|
Generic Artifact Get |
|
Generic Artifact Get By Path |
|
Generic Artifact Delete |
|
- Example for Uploading an Artifact
-
{ "eventType": "com.oraclecloud.artifacts.putgenericartifactcontentbypath", "cloudEventsVersion": "0.1", "eventTypeVersion": "2.0", "source": "GenericArtifactService", "eventTime": "2019-08-16T15:09:04.550Z", "contentType": "application/json", "data": { "compartmentId": "ocid1.compartment.oc1..<unique_ID>", "compartmentName": "example_compartment", "resourceName": "path:version", "resourceId": "ocid1.genericartifact.oc1..<unique_ID>", "availabilityDomain": "all" }, "eventID": "<unique_ID>" }
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, refer to: