openapi: 3.2.0
info:
description: "API for the Events Service. Use this API to manage rules and actions that create automation \nin your tenancy. For more information, see [Overview of Events](/iaas/Content/Events/Concepts/eventsoverview.htm).\n"
title: Events API
version: '20181201'
x-provenance:
method: harvested
first_party: true
publisher: Oracle
source: https://docs.oracle.com/en-us/iaas/api/specs/589e549735dd190d78e8fb6ff9891048de06687f3bb47308774991e267d754a9.yaml
harvested: '2026-08-04'
note: Published by Oracle as the contract for the Events API OCI service and stored verbatim; API Evangelist added only this provenance block.
x-evidence:
- url: https://docs.oracle.com/en-us/iaas/api/specs/index.json
what: Oracle's own index of every OCI service specification
- url: https://docs.oracle.com/en-us/iaas/api/specs/589e549735dd190d78e8fb6ff9891048de06687f3bb47308774991e267d754a9.yaml
what: the harvested document for Events API
servers:
- url: https://events.$region.oraclecloud.com/20181201
tags:
- name: events
paths:
/rules:
get:
description: 'Lists rules for this compartment.
'
operationId: ListRules
parameters:
- $ref: '#/components/parameters/CompartmentIdQueryParam'
- $ref: '#/components/parameters/PaginationLimitQueryParam'
- $ref: '#/components/parameters/PaginationTokenQueryParam'
- $ref: '#/components/parameters/ListRulesFilterByLifecycleStateQueryParam'
- description: 'A filter to return only rules with descriptions that match the displayName string
in this parameter.
Example: `"This rule sends a notification upon completion of DbaaS backup."`
'
in: query
name: displayName
required: false
schema:
type: string
maxLength: 1024
minLength: 1
- description: 'Specifies the attribute with which to sort the rules.
Default: `timeCreated`
* **TIME_CREATED:** Sorts by timeCreated.
* **DISPLAY_NAME:** Sorts by displayName.
* **ID:** Sorts by id.
'
in: query
name: sortBy
required: false
schema:
type: string
enum:
- TIME_CREATED
- ID
- DISPLAY_NAME
- $ref: '#/components/parameters/SortOrderQueryParam'
- $ref: '#/components/parameters/OpcRequestIdHeaderParam'
responses:
200:
description: Succesfully retrieved summary of rules.
headers:
opc-next-page:
description: 'For list pagination. When this header appears in the response, additional pages of
results remain. For important details about how pagination works, see
[List Pagination](/iaas/Content/API/Concepts/usingapi.htm#nine).
'
schema:
type: string
opc-request-id:
description: 'Unique Oracle-assigned identifier for the request. If you need to contact Oracle about
a particular request, please provide the request ID.
'
schema:
type: string
content:
application/json:
schema:
items:
$ref: '#/components/schemas/RuleSummary'
type: array
400:
$ref: '#/components/responses/400'
401:
$ref: '#/components/responses/401'
403:
$ref: '#/components/responses/403'
404:
$ref: '#/components/responses/404'
429:
$ref: '#/components/responses/429'
500:
$ref: '#/components/responses/500'
default:
$ref: '#/components/responses/DefaultError'
summary: Lists rules for this compartment.
tags:
- events
x-example: 'GET /20181201/rules?compartmentId=<compartment_OCID>
Host: events.us-phoenix-1.oraclecloud.com
<authorization and other headers>
'
post:
description: 'Creates a new rule.
'
operationId: CreateRule
parameters:
- $ref: '#/components/parameters/RetryTokenHeader'
- $ref: '#/components/parameters/OpcRequestIdHeaderParam'
responses:
200:
description: Succesfully created rule.
headers:
etag:
description: 'For optimistic concurrency control. Add this value to the `if-match` parameter
in a PUT or DELETE operation. The resource will be updated only if the value you
provide matches the `etag` on the resource.
'
schema:
type: string
opc-request-id:
description: 'Unique Oracle-assigned identifier for the request. If you need to contact Oracle about
a particular request, please provide the request ID.
'
schema:
type: string
content:
application/json:
schema:
$ref: '#/components/schemas/Rule'
400:
$ref: '#/components/responses/400'
401:
$ref: '#/components/responses/401'
403:
$ref: '#/components/responses/403'
404:
$ref: '#/components/responses/404'
429:
$ref: '#/components/responses/429'
500:
$ref: '#/components/responses/500'
default:
$ref: '#/components/responses/DefaultError'
summary: Creates a new rule
tags:
- events
x-example: "POST /20181201/rules\nHost: events.us-phoenix-1.oraclecloud.com\n<authorization and other headers>\n\n{\n \"displayName\": \"This rule sends a notification upon completion of DbaaS backup\",\n \"condition\": \"{\n \\\"eventType\\\": \\\"com.oraclecloud.databaseservice.autonomous.database.backup.end\\\"\n }\",\n \"compartmentId\": \"ocid.compartment.oc1..<unique_ID>\",\n \"isEnabled\": true,\n \"freeformTags\": {\n \"Department\": \"Finance\"\n },\n \"definedTags\": {\n Operations\": {\n \"CostCenter\": \"42\"\n },\n \"actions\": {\n \"actions\": [\n {\n \"actionType\": \"ONS\",\n \"id\": \"ocid.action.oc1..<unique_ID>\",\n \"lifecycleMessage\":null,\n \"lifecycleState\": \"CREATING\"\n }\n ]\n }\n}\n"
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateRuleDetails'
description: Specification of the rule to create
required: true
/rules/{ruleId}:
delete:
description: Deletes a rule.
operationId: DeleteRule
parameters:
- $ref: '#/components/parameters/RuleIdPathParam'
- $ref: '#/components/parameters/IfMatchHeader'
- $ref: '#/components/parameters/OpcRequestIdHeaderParam'
responses:
204:
description: Rule deleted successfully.
headers:
opc-request-id:
description: 'Unique Oracle-assigned identifier for the request. If you need to contact Oracle
about a particular request, please provide the request ID.
'
schema:
type: string
400:
$ref: '#/components/responses/400'
401:
$ref: '#/components/responses/401'
403:
$ref: '#/components/responses/403'
404:
$ref: '#/components/responses/404'
429:
$ref: '#/components/responses/429'
500:
$ref: '#/components/responses/500'
default:
$ref: '#/components/responses/DefaultError'
summary: Deletes a rule
tags:
- events
x-example: 'DELETE /20181201/rules/<rule_OCID>
Host: events.us-phoenix-1.oraclecloud.com
<authorization and other headers>
'
x-related-resource: '#/definitions/Rule'
get:
description: Retrieves a rule.
operationId: GetRule
parameters:
- $ref: '#/components/parameters/RuleIdPathParam'
- $ref: '#/components/parameters/OpcRequestIdHeaderParam'
responses:
200:
description: Succesfully retrieved rule.
headers:
etag:
description: 'For optimistic concurrency control. Add this value to the `if-match` parameter
in a PUT or DELETE operation. The resource will be updated only if the value you
provide matches the `etag` on the resource.
'
schema:
type: string
opc-request-id:
description: 'Unique Oracle-assigned identifier for the request. If you need to contact Oracle about
a particular request, please provide the request ID.
'
schema:
type: string
content:
application/json:
schema:
$ref: '#/components/schemas/Rule'
400:
$ref: '#/components/responses/400'
401:
$ref: '#/components/responses/401'
403:
$ref: '#/components/responses/403'
404:
$ref: '#/components/responses/404'
429:
$ref: '#/components/responses/429'
500:
$ref: '#/components/responses/500'
default:
$ref: '#/components/responses/DefaultError'
summary: Retrieves a rule
tags:
- events
x-example: 'GET /20181201/rules/<rule_OCID>
Host: events.us-phoenix-1.oraclecloud.com
<authorization and other headers>
'
put:
description: 'Updates a rule.
'
operationId: UpdateRule
parameters:
- $ref: '#/components/parameters/RuleIdPathParam'
- $ref: '#/components/parameters/IfMatchHeader'
- $ref: '#/components/parameters/OpcRequestIdHeaderParam'
responses:
200:
description: 'Succesfully updated rule.
'
headers:
etag:
description: 'For optimistic concurrency control. Add this value to the `if-match` parameter
in a PUT or DELETE operation. The resource will be updated only if the value you
provide matches the `etag` on the resource.
'
schema:
type: string
opc-request-id:
description: 'Unique Oracle-assigned identifier for the request. If you need to contact Oracle about
a particular request, please provide the request ID.
'
schema:
type: string
content:
application/json:
schema:
$ref: '#/components/schemas/Rule'
400:
$ref: '#/components/responses/400'
401:
$ref: '#/components/responses/401'
403:
$ref: '#/components/responses/403'
404:
$ref: '#/components/responses/404'
412:
$ref: '#/components/responses/412'
429:
$ref: '#/components/responses/429'
500:
$ref: '#/components/responses/500'
default:
$ref: '#/components/responses/DefaultError'
summary: Updates a rule
tags:
- events
x-example: "PUT /20181201/rules/<rule_OCID>\nHost: events.us-phoenix-1.oraclecloud.com\n<authorization and other headers>\n\n{\n \"displayName\": \"This rule sends a notification upon completion of DbaaS backup\",\n \"condition\": \"{\n \\\"eventType\\\": \\\"com.oraclecloud.databaseservice.autonomous.database.backup.end\\\"\n }\",\n \"isEnabled\": true,\n \"freeformTags\": {\n \"Department\": \"Finance\"\n },\n \"definedTags\": {\n Operations\": {\n \"CostCenter\": \"42\"\n },\n \"actions\": {\n \"actions\": [\n {\n \"actionType\": \"ONS\",\n \"id\": \"ocid.action.oc1..<unique_ID>\",\n \"lifecycleMessage\":null,\n \"lifecycleState\": \"CREATING\"\n }\n ]\n }\n}\n"
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateRuleDetails'
description: The new rule spec to apply
required: true
/rules/{ruleId}/actions/changeCompartment:
post:
description: "Moves a rule into a different compartment within the same tenancy. For information about moving \nresources between compartments, see [Moving Resources to a Different Compartment](/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).\n"
operationId: ChangeRuleCompartment
parameters:
- $ref: '#/components/parameters/IfMatchHeader'
- $ref: '#/components/parameters/OpcRequestIdHeaderParam'
- $ref: '#/components/parameters/RetryTokenHeader'
- $ref: '#/components/parameters/RuleIdPathParam'
responses:
204:
description: Response returned for a successful change compartment request.
headers:
opc-request-id:
description: 'Unique Oracle-assigned identifier for the request. If you need to contact Oracle about
a particular request, please provide the request ID.
'
schema:
type: string
401:
$ref: '#/components/responses/401'
404:
$ref: '#/components/responses/404'
409:
$ref: '#/components/responses/409'
500:
$ref: '#/components/responses/500'
summary: Moves a rule into a different compartment. When provided, If-Match is checked against ETag values of the resource.
tags:
- events
x-related-resource: '#/definitions/Rule'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ChangeRuleCompartmentDetails'
required: true
components:
parameters:
PaginationTokenQueryParam:
description: 'For list pagination. The value of the opc-next-page response header from the previous
"List" call. For important details about how pagination works, see
[List Pagination](/iaas/Content/API/Concepts/usingapi.htm#nine).
'
in: query
name: page
required: false
schema:
type: string
maxLength: 1024
minLength: 1
RuleIdPathParam:
description: 'The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of this rule.
'
in: path
name: ruleId
required: true
schema:
type: string
CompartmentIdQueryParam:
description: 'The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the compartment to which this rule belongs.
'
in: query
name: compartmentId
required: true
schema:
type: string
maxLength: 1024
minLength: 1
IfMatchHeader:
description: 'For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match
parameter to the value of the etag from a previous GET or POST response for that resource. The resource
will be updated or deleted only if the etag you provide matches the resource''s current etag value.
'
in: header
name: if-match
schema:
type: string
PaginationLimitQueryParam:
description: 'The maximum number of items to return. 1 is the minimum, 50 is the maximum.
Default: 10
'
in: query
name: limit
required: false
schema:
type: integer
default: 5
maximum: 50
minimum: 1
ListRulesFilterByLifecycleStateQueryParam:
description: 'A filter to return only rules that match the lifecycle state in this parameter.
Example: `Creating`
'
in: query
name: lifecycleState
required: false
x-obmcs-enumref: '#/definitions/Rule/lifecycleState'
schema:
type: string
SortOrderQueryParam:
description: 'Specifies sort order.
* **ASC:** Ascending sort order.
* **DESC:** Descending sort order.
'
in: query
name: sortOrder
required: false
schema:
type: string
enum:
- ASC
- DESC
RetryTokenHeader:
description: 'A token that uniquely identifies a request so it can be retried in case of a timeout or
server error without risk of executing that same action again. Retry tokens expire after 24
hours, but can be invalidated before then due to conflicting operations (for example, if a resource
has been deleted and purged from the system, then a retry of the original creation request
may be rejected).
'
in: header
name: opc-retry-token
schema:
type: string
maxLength: 64
minLength: 1
OpcRequestIdHeaderParam:
description: 'The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
particular request, please provide the request ID.
'
in: header
name: opc-request-id
required: false
schema:
type: string
schemas:
UpdateRuleDetails:
description: The rule attributes that you can update.
properties:
actions:
$ref: '#/components/schemas/ActionDetailsList'
condition:
description: "A filter that specifies the event that will trigger actions associated with this rule. A few \nimportant things to remember about filters:\n\n* Fields not mentioned in the condition are ignored. You can create a valid filter that matches\nall events with two curly brackets: `{}` \n\n For more examples, see \n[Matching Events with Filters](/iaas/Content/Events/Concepts/filterevents.htm). \n* For a condition with fields to match an event, the event must contain all the field names \nlisted in the condition. Field names must appear in the condition with the same nesting \nstructure used in the event. \n\n For a list of reference events, see \n[Services that Produce Events](/iaas/Content/Events/Reference/eventsproducers.htm). \n* Rules apply to events in the compartment in which you create them and any child compartments. \nThis means that a condition specified by a rule only matches events emitted from resources in \nthe compartment or any of its child compartments. \n* Wildcard matching is supported with the asterisk (*) character. \n\n For examples of wildcard matching, see \n[Matching Events with Filters](/iaas/Content/Events/Concepts/filterevents.htm)\n\nExample: `\\\"eventType\\\": \\\"com.oraclecloud.databaseservice.autonomous.database.backup.end\\\"`\n"
minLength: 1
type: string
definedTags:
additionalProperties:
additionalProperties:
description: 'The value of the tag. Only the String type is supported.
'
type: object
description: 'Key-value pair representing a defined tag key and value, scoped to a namespace.
Example: `{"CostCenter": "42"}''
'
type: object
description: 'Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](/iaas/Content/General/Concepts/resourcetags.htm).
Example: `{"Operations": {"CostCenter": "42"}}`
'
type: object
description:
description: 'A string that describes the details of the rule. It does not have to be unique, and you can change it. Avoid entering
confidential information.
'
maxLength: 1024
minLength: 0
type: string
displayName:
description: 'A string that describes the rule. It does not have to be unique, and you can change it. Avoid entering
confidential information.
'
maxLength: 255
minLength: 1
type: string
freeformTags:
additionalProperties:
type: string
description: 'Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. Exists for cross-compatibility only.
For more information, see [Resource Tags](/iaas/Content/General/Concepts/resourcetags.htm).
Example: `{"Department": "Finance"}`
'
type: object
isEnabled:
description: 'Whether or not this rule is currently enabled.
Example: `true`
'
type: boolean
type: object
x-example: "{\n \"displayName\": \"This rule sends a notification upon completion of DbaaS backup\",\n \"condition\": \"{\n \\\"eventType\\\": \\\"com.oraclecloud.databaseservice.autonomous.database.backup.end\\\"\n }\",\n \"isEnabled\": true,\n \"freeformTags\": {\n \"Department\": \"Finance\"\n },\n \"definedTags\": {\n \"Operations\": {\n \"CostCenter\": \"42\"\n },\n \"actions\": {\n \"actions\": [\n {\n \"actionType\": \"ONS\",\n \"id\": \"ocid.action.oc1..<unique_ID>\",\n \"lifecycleMessage\":null,\n \"lifecycleState\": \"CREATING\"\n }\n ]\n }\n}\n"
Error:
description: Error details.
properties:
code:
description: 'A short error code that defines the error, meant for programmatic parsing. See
[API Errors](/iaas/Content/API/References/apierrors.htm).
'
type: string
message:
description: 'A human-readable error string.
'
type: string
required:
- code
- message
type: object
x-example: "{\n \"code\" : \"400\",\n \"message\" : \"Bad Request\"\n}\n"
RuleSummary:
description: 'The summary details of rules for Events. For more information, see
[Managing Rules for Events](/iaas/Content/Events/Task/managingrules.htm).
'
properties:
compartmentId:
description: 'The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the compartment to which this rule belongs.
'
maxLength: 1024
minLength: 1
type: string
condition:
description: "A filter that specifies the event that will trigger actions associated with this rule. A few \nimportant things to remember about filters:\n\n* Fields not mentioned in the condition are ignored. You can create a valid filter that matches\nall events with two curly brackets: `{}` \n\n For more examples, see \n[Matching Events with Filters](/iaas/Content/Events/Concepts/filterevents.htm). \n* For a condition with fields to match an event, the event must contain all the field names \nlisted in the condition. Field names must appear in the condition with the same nesting \nstructure used in the event. \n\n For a list of reference events, see \n[Services that Produce Events](/iaas/Content/Events/Reference/eventsproducers.htm). \n* Rules apply to events in the compartment in which you create them and any child compartments. \nThis means that a condition specified by a rule only matches events emitted from resources in \nthe compartment or any of its child compartments. \n* Wildcard matching is supported with the asterisk (*) character. \n\n For examples of wildcard matching, see \n[Matching Events with Filters](/iaas/Content/Events/Concepts/filterevents.htm)\n\nExample: `\\\"eventType\\\": \\\"com.oraclecloud.databaseservice.autonomous.database.backup.end\\\"`\n"
type: string
definedTags:
additionalProperties:
additionalProperties:
description: 'The value of the tag. Only the String type is supported.
'
type: object
description: 'Key-value pair representing a defined tag key and value, scoped to a namespace.
Example: `{"CostCenter": "42"}''
'
type: object
description: 'Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](/iaas/Content/General/Concepts/resourcetags.htm).
Example: `{"Operations": {"CostCenter": "42"}}`
'
type: object
description:
description: 'A string that describes the details of the rule. It does not have to be unique, and you can change it. Avoid entering
confidential information.
'
maxLength: 1024
minLength: 0
type: string
displayName:
description: 'A string that describes the rule. It does not have to be unique, and you can change it. Avoid entering
confidential information.
Example: `"This rule sends a notification upon completion of DbaaS backup."`
'
maxLength: 255
minLength: 1
type: string
freeformTags:
additionalProperties:
type: string
description: 'Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. Exists for cross-compatibility only.
For more information, see [Resource Tags](/iaas/Content/General/Concepts/resourcetags.htm).
Example: `{"Department": "Finance"}`
'
type: object
id:
description: 'The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of this rule.
'
maxLength: 1024
minLength: 1
type: string
isEnabled:
default: true
description: 'Whether or not this rule is currently enabled.
Example: `true`
'
type: boolean
lifecycleState:
type: string
x-obmcs-enumref: '#/definitions/Rule/lifecycleState'
timeCreated:
description: 'The time this rule was created, expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339)
timestamp format.
Example: `2018-09-12T22:47:12.613Z`
'
format: date-time
type: string
required:
- id
- displayName
- lifecycleState
- condition
- compartmentId
- isEnabled
- timeCreated
type: object
x-example: "{\n \"displayName\": \"This rule sends a notification upon completion of DbaaS backup\",\n \"lifecycleState\": \"CREATING\",\n \"condition\": \"{\n \\\"eventType\\\": \\\"com.oraclecloud.databaseservice.autonomous.database.backup.end\\\"\n }\",\n \"compartmentId\": \"ocid.compartment.oc1..<unique_ID>\",\n \"isEnabled\": true,\n \"id\": \"ocid.rule.oc1..<unique_ID>\",\n \"timeCreated\": \"2018-09-12T22:47:12.613Z\",\n \"freeformTags\": {\n \"Department\": \"Finance\"\n },\n \"definedTags\": {\n \"Operations\": {\n \"CostCenter\": \"42\"\n },\n}\n"
ActionList:
description: 'A list of Action objects associated with a rule.
'
properties:
actions:
description: 'A list of one or more Action objects.
'
items:
$ref: '#/components/schemas/Action'
maxItems: 10
minItems: 1
type: array
required:
- actions
type: object
x-example: "{\n \"actions\": { }\n}\n"
Rule:
description: 'The configuration details of an Events rule. For more information, see
[Managing Rules for Events](/iaas/Content/Events/Task/managingrules.htm).
'
properties:
actions:
$ref: '#/components/schemas/ActionList'
compartmentId:
description: 'The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the compartment to which this rule belongs.
'
maxLength: 1024
minLength: 1
type: string
condition:
description: "A filter that specifies the event that will trigger actions associated with this rule. A few \nimportant things to remember about filters:\n\n* Fields not mentioned in the condition are ignored. You can create a valid filter that matches\nall events with two curly brackets: `{}` \n\n For more examples, see \n[Matching Events with Filters](/iaas/Content/Events/Concepts/filterevents.htm). \n* For a condition with fields to match an event, the event must contain all the field names \nlisted in the condition. Field names must appear in the condition with the same nesting \nstructure used in the event. \n\n For a list of reference events, see \n[Services that Produce Events](/iaas/Content/Events/Reference/eventsproducers.htm). \n* Rules apply to events in the compartment in which you create them and any child compartments. \nThis means that a condition specified by a rule only matches events emitted from resources in \nthe compartment or any of its child compartments. \n* Wildcard matching is supported with the asterisk (*) character. \n\n For examples of wildcard matching, see \n[Matching Events with Filters](/iaas/Content/Events/Concepts/filterevents.htm)\n\nExample: `\\\"eventType\\\": \\\"com.oraclecloud.databaseservice.autonomous.database.backup.end\\\"`\n"
type: string
definedTags:
additionalProperties:
additionalProperties:
description: 'The value of the tag. Only the String type is supported.
'
type: object
description: 'Key-value pair representing a defined tag key and value, scoped to a namespace.
Example: `{"CostCenter": "42"}''
'
type: object
description: 'Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](/iaas/Content/General/Concepts/resourcetags.htm).
Example: `{"Operations": {"CostCenter": "42"}}`
'
type: object
description:
description: 'A string that describes the details of the rule. It does not have to be unique, and you can change it. Avoid entering
confidential information.
'
maxLength: 1024
minLength: 0
type: string
displayName:
description: 'A string that describes the rule. It does not have to be unique, and you can change it. Avoid entering
confidential information.
Example: `"This rule sends a notification upon completion of DbaaS backup."`
'
maxLength: 255
minLength: 1
type: string
freeformTags:
additionalProperties:
type: string
description: 'Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. Exists for cross-compatibility only.
For more information, see [Resource Tags](/iaas/Content/General/Concepts/resourcetags.htm).
Example: `{"Department": "Finance"}`
'
type: object
id:
description: 'The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of this rule.
'
maxLength: 1024
minLength: 1
type: string
isEnabled:
default: true
description: 'Whether or not this rule is currently enabled.
Example: `true`
'
type: boolean
lifecycleMessage:
description: 'A message generated by the Events service about the current state of this rule.
'
type: string
lifecycleState:
description: 'The current state of the rule.
'
enum:
- CREATING
- ACTIVE
- INACTIVE
- UPDATING
- DELETING
- DELETED
- FAILED
type: string
timeCreated:
description: 'The time this rule was created, expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339)
timestamp format.
Example: `2018-09-12T22:47:12.613Z`
'
format: date-time
type: string
required:
- displayName
- lifecycleState
- condition
- actions
- id
- timeCreated
- compartmentId
- isEnabled
type: object
x-example: "{\n \"displayName\": \"This rule sends a notification upon completion of DbaaS backup\",\n \"lifecycleState\": \"CREATING\",\n \"condition\": \"{\n \\\"eventType\\\": \\\"com.oraclecloud.databaseservice.autonomous.database.backup.end\\\"\n }\",\n \"compartmentId\": \"ocid.compartment.oc1..<unique_ID>\",\n \"isEnabled\": true,\n \"freeformTags\": {\n \"Department\": \"Finance\"\n },\n \"definedTags\": {\n Operations\": {\n \"CostCenter\": \"42\"\n },\n \"actions\": {\n \"actions\": [\n {\n \"actionType\": \"ONS\",\n \"id\": \"ocid.action.oc1..<unique_ID>\",\n \"lifecycleMessage\":null,\n \"lifecycleState\": \"CREATING\"\n }\n ]\n },\n \"id\": \"ocid.rule.oc1..<unique_ID>\",\n \"timeCreated\": \"2018-09-12T22:47:12.613Z\",\n \"lifecycleMessage\":null\n}\n"
CreateRuleDetails:
description: Object used to create an events1.0 rule and events2.0 system rule.
properties:
actions:
$ref: '#/components/schemas/ActionDetailsList'
compartmentId:
description: 'The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the compartment to which this rule belongs.
'
maxLength: 1024
minLength: 1
type: string
condition:
description: "A filter that specifies the event that will trigger actions associated with this rule. A few \nimportant things to remember about filters:\n\n* Fields not mentioned in the condition are ignored. You can create a valid filter that matches\nall events with two curly brackets: `{}` \n\n For more examples, see \n[Matching Events with Filters](/iaas/Content/Events/Concepts/filterevents.htm). \n* For a condition with fields to match an event, the event must contain all the field names \nlisted in the condition. Field names must appear in the condition with the same nesting \nstructure used in the event. \n\n For a list of reference events, see \n[Services that Produce Events](/iaas/Content/Events/Reference/eventsproducers.htm). \n* Rules apply to events in the compartment in which you create them and any child compartments. \nThis means that a condition specified by a rule only matches events emitted from resources in \nthe compartment or any of its child compartments. \n* Wildcard matching is supported with the asterisk (*) character. \n\n For examples of wildcard matching, see \n[Matching Events with Filters](/iaas/Content/Events/Concepts/filterevents.htm)\n\nExample: `\\\"eventType\\\": \\\"com.oraclecloud.databaseservice.autonomous.database.backup.end\\\"`\n"
type: string
definedTags:
additionalProperties:
additionalProperties:
description: 'The value of the tag. Only the String type is supported.
'
type: object
description: 'Key-value pair representing a defined tag key and value, scoped to a namespace.
Example: `{"CostCenter": "42"}''
'
type: object
description: 'Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](/iaas/Content/General/Concepts/resourcetags.htm).
Example: `{"Operations": {"CostCenter": "42"}}`
'
type: object
description:
description: 'A string that describes the details of the rule. It does not have to be unique, and you can change it. Avoid entering
confidential information.
'
maxLength: 1024
minLength: 0
type: string
displayName:
description: 'A string that describes the rule. It does not have to be unique, and you can change it. Avoid entering
confidential information.
'
maxLength: 255
minLength: 1
type: string
freeformTags:
additionalProperties:
type: string
description: 'Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. Exists for cross-compatibility only.
For more information, see [Resource Tags](/iaas/Content/General/Concepts/resourcetags.htm).
Example: `{"Department": "Finance"}`
'
type: object
isEnabled:
default: true
description: 'Whether or not this rule is currently enabled.
Example: `true`
'
type: boolean
required:
- displayName
- isEnabled
- condition
- actions
- compartmentId
type: object
x-example: "{\n \"displayName\": \"This rule sends a notification upon completion of DbaaS backup\",\n \"condition\": \"{\n \\\"eventType\\\": \\\"com.oraclecloud.databaseservice.autonomous.database.backup.end\\\"\n }\",\n \"compartmentId\": \"ocid.compartment.oc1..<unique_ID>\",\n \"isEnabled\": true,\n \"freeformTags\": {\n \"Department\": \"Finance\"\n },\n \"definedTags\": {\n \"Operations\": {\n \"CostCenter\": \"42\"\n },\n \"actions\": {\n \"actions\": [\n {\n \"actionType\": \"ONS\",\n \"id\": \"ocid.action.oc1..<unique_ID>\",\n \"lifecycleMessage\":null,\n \"lifecycleState\": \"CREATING\"\n }\n ]\n }\n}\n"
ChangeRuleCompartmentDetails:
description: 'Specifies which compartment to move a rule to when changing a rule''s compartment.
'
properties:
compartmentId:
description: 'The [OCID](/Content/General/Concepts/identifiers.htm) of the compartment
into which the resource should be moved.
'
maxLength: 255
minLength: 1
type: string
required:
- compartmentId
type: object
x-example: "{\n \"compartmentId\": \"ocid.compartment.oc1..<unique_ID>\"\n}\n"
ActionDetailsList:
description: A list of ActionDetails objects to create for a rule.
properties:
actions:
description: 'A list of one or more ActionDetails objects.
'
items:
$ref: '#/components/schemas/ActionDetails'
maxItems: 10
minItems: 1
type: array
required:
- actions
type: object
x-example: "{\n \"actions\": [ ]\n}\n"
Action:
description: 'An object that represents an action to trigger for events that match a rule.
'
discriminator:
propertyName: actionType
properties:
actionType:
description: 'The action to perform if the condition in the rule matches an event.
* **ONS:** Send to an Oracle Notification Service topic.
* **OSS:** Send to a stream from Oracle Streaming Service.
* **FAAS:** Send to an Oracle Functions Service endpoint.
'
enum:
- ONS
- OSS
- FAAS
type: string
description:
description: 'A string that describes the details of the action. It does not have to be unique, and you can change it. Avoid entering
confidential information.
'
maxLength: 1024
minLength: 0
type: string
id:
description: 'The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the action.
'
maxLength: 1024
minLength: 1
type: string
isEnabled:
default: true
description: 'Whether or not this action is currently enabled.
Example: `true`
'
type: boolean
lifecycleMessage:
description: 'A message generated by the Events service about the current state of this action.
'
type: string
lifecycleState:
description: 'The current state of the rule.
'
enum:
- CREATING
- ACTIVE
- INACTIVE
- UPDATING
- DELETING
- DELETED
- FAILED
type: string
required:
- actionType
- id
- lifecycleState
- lifecycleMessage
type: object
x-example: "{\n \"actions\": [\n {\n \"actionType\": \"ONS\",\n \"id\": \"ocid.action.oc1..<unique_ID>\",\n \"lifecycleMessage\":null,\n \"lifecycleState\": \"CREATING\"\n }\n ]\n} \n"
ActionDetails:
description: 'Object used to create an action.
'
discriminator:
propertyName: actionType
properties:
actionType:
description: 'The action to perform if the condition in the rule matches an event.
* **ONS:** Send to an Oracle Notification Service topic.
* **OSS:** Send to a stream from Oracle Streaming Service.
* **FAAS:** Send to an Oracle Functions Service endpoint.
'
enum:
- ONS
- OSS
- FAAS
type: string
description:
description: 'A string that describes the details of the action. It does not have to be unique, and you can change it. Avoid entering
confidential information.
'
maxLength: 1024
minLength: 0
type: string
isEnabled:
default: true
description: 'Whether or not this action is currently enabled.
Example: `true`
'
type: boolean
required:
- actionType
- isEnabled
type: object
x-example: "{\n \"actionType\": \"ONS\",\n \"isEnabled\": true,\n \"description\": \"Notification action\" \n}\n"
responses:
DefaultError:
description: An error has occurred.
headers:
opc-request-id:
description: 'Unique Oracle-assigned identifier for the request. If you need to contact Oracle about
a particular request, please provide the request ID.
'
schema:
type: string
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
x-oracle-package: com.oracle.pic.events.control