ONS Notification Data Plane Functions

Package: DBMS_CLOUD_OCI_ONS_NOTIFICATION_DATA_PLANE

CHANGE_SUBSCRIPTION_COMPARTMENT Function

Moves a subscription into a different compartment within the same tenancy. For information about moving resources between compartments, see Moving Resources to a Different Compartment. Transactions Per Minute (TPM) per-tenancy limit for this operation: 60.

Syntax

FUNCTION change_subscription_compartment (
  subscription_id varchar2,
  change_subscription_compartment_details dbms_cloud_oci_ons_change_compartment_details_t,
  opc_retry_token varchar2 DEFAULT NULL,
  opc_request_id varchar2 DEFAULT NULL,
  if_match varchar2 DEFAULT NULL,
  region varchar2 DEFAULT NULL, 
  endpoint varchar2 DEFAULT NULL,
  credential_name varchar2 DEFAULT NULL
) RETURN dbms_cloud_oci_ons_notification_data_plane_change_subscription_compartment_response_t;

Parameters

Parameter Description

subscription_id

(required) The OCID of the subscription to move.

change_subscription_compartment_details

(required) The configuration details for the move operation.

opc_retry_token

(optional) 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 that 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).

opc_request_id

(optional) The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

if_match

(optional) Used 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.

region

(optional) OCI region id. e.g us-phoenix-1 for US West (Phoenix).

endpoint

(optional) The endpoint of the service to call using this function. e.g https://notification.{region}.{secondLevelDomain}.If both endpoint and region are given, then endpoint takes precedence.

credential_name

(optional) The name of the credential for authenticating with the corresponding cloud native API.

CREATE_SUBSCRIPTION Function

Creates a subscription for the specified topic and sends a subscription confirmation URL to the endpoint. The subscription remains in \"Pending\" status until it has been confirmed. Transactions Per Minute (TPM) per-tenancy limit for this operation: 60.

Syntax

FUNCTION create_subscription (
  create_subscription_details dbms_cloud_oci_ons_create_subscription_details_t,
  opc_retry_token varchar2 DEFAULT NULL,
  opc_request_id varchar2 DEFAULT NULL,
  region varchar2 DEFAULT NULL, 
  endpoint varchar2 DEFAULT NULL,
  credential_name varchar2 DEFAULT NULL
) RETURN dbms_cloud_oci_ons_notification_data_plane_create_subscription_response_t;

Parameters

Parameter Description

create_subscription_details

(required) The subscription to create.

opc_retry_token

(optional) 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 that 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).

opc_request_id

(optional) The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

region

(optional) OCI region id. e.g us-phoenix-1 for US West (Phoenix).

endpoint

(optional) The endpoint of the service to call using this function. e.g https://notification.{region}.{secondLevelDomain}.If both endpoint and region are given, then endpoint takes precedence.

credential_name

(optional) The name of the credential for authenticating with the corresponding cloud native API.

DELETE_SUBSCRIPTION Function

Deletes the specified subscription. Transactions Per Minute (TPM) per-tenancy limit for this operation: 60.

Syntax

FUNCTION delete_subscription (
  subscription_id varchar2,
  opc_request_id varchar2 DEFAULT NULL,
  if_match varchar2 DEFAULT NULL,
  region varchar2 DEFAULT NULL, 
  endpoint varchar2 DEFAULT NULL,
  credential_name varchar2 DEFAULT NULL
) RETURN dbms_cloud_oci_ons_notification_data_plane_delete_subscription_response_t;

Parameters

Parameter Description

subscription_id

(required) The OCID of the subscription to delete.

opc_request_id

(optional) The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

if_match

(optional) Used 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.

region

(optional) OCI region id. e.g us-phoenix-1 for US West (Phoenix).

endpoint

(optional) The endpoint of the service to call using this function. e.g https://notification.{region}.{secondLevelDomain}.If both endpoint and region are given, then endpoint takes precedence.

credential_name

(optional) The name of the credential for authenticating with the corresponding cloud native API.

GET_CONFIRM_SUBSCRIPTION Function

Gets the confirmation details for the specified subscription. Transactions Per Minute (TPM) per-tenancy limit for this operation: 60.

Syntax

FUNCTION get_confirm_subscription (
  id varchar2,
  token varchar2,
  protocol varchar2,
  opc_request_id varchar2 DEFAULT NULL,
  region varchar2 DEFAULT NULL, 
  endpoint varchar2 DEFAULT NULL,
  credential_name varchar2 DEFAULT NULL
) RETURN dbms_cloud_oci_ons_notification_data_plane_get_confirm_subscription_response_t;

Parameters

Parameter Description

id

(required) The OCID of the subscription to get the confirmation details for.

token

(required) The subscription confirmation token.

protocol

(required) The protocol used for the subscription. Allowed values: * `CUSTOM_HTTPS` * `EMAIL` * `HTTPS` (deprecated; for PagerDuty endpoints, use `PAGERDUTY`) * `ORACLE_FUNCTIONS` * `PAGERDUTY` * `SLACK` * `SMS` .

opc_request_id

(optional) The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

region

(optional) OCI region id. e.g us-phoenix-1 for US West (Phoenix).

endpoint

(optional) The endpoint of the service to call using this function. e.g https://notification.{region}.{secondLevelDomain}.If both endpoint and region are given, then endpoint takes precedence.

credential_name

(optional) The name of the credential for authenticating with the corresponding cloud native API.

GET_SUBSCRIPTION Function

Gets the specified subscription's configuration information. Transactions Per Minute (TPM) per-tenancy limit for this operation: 60.

Syntax

FUNCTION get_subscription (
  subscription_id varchar2,
  opc_request_id varchar2 DEFAULT NULL,
  region varchar2 DEFAULT NULL, 
  endpoint varchar2 DEFAULT NULL,
  credential_name varchar2 DEFAULT NULL
) RETURN dbms_cloud_oci_ons_notification_data_plane_get_subscription_response_t;

Parameters

Parameter Description

subscription_id

(required) The OCID of the subscription to retrieve.

opc_request_id

(optional) The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

region

(optional) OCI region id. e.g us-phoenix-1 for US West (Phoenix).

endpoint

(optional) The endpoint of the service to call using this function. e.g https://notification.{region}.{secondLevelDomain}.If both endpoint and region are given, then endpoint takes precedence.

credential_name

(optional) The name of the credential for authenticating with the corresponding cloud native API.

GET_UNSUBSCRIPTION Function

Unsubscribes the subscription from the topic. Transactions Per Minute (TPM) per-tenancy limit for this operation: 60.

Syntax

FUNCTION get_unsubscription (
  id varchar2,
  token varchar2,
  protocol varchar2,
  opc_request_id varchar2 DEFAULT NULL,
  region varchar2 DEFAULT NULL, 
  endpoint varchar2 DEFAULT NULL,
  credential_name varchar2 DEFAULT NULL
) RETURN dbms_cloud_oci_ons_notification_data_plane_get_unsubscription_response_t;

Parameters

Parameter Description

id

(required) The OCID of the subscription to unsubscribe from.

token

(required) The subscription confirmation token.

protocol

(required) The protocol used for the subscription. Allowed values: * `CUSTOM_HTTPS` * `EMAIL` * `HTTPS` (deprecated; for PagerDuty endpoints, use `PAGERDUTY`) * `ORACLE_FUNCTIONS` * `PAGERDUTY` * `SLACK` * `SMS` .

opc_request_id

(optional) The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

region

(optional) OCI region id. e.g us-phoenix-1 for US West (Phoenix).

endpoint

(optional) The endpoint of the service to call using this function. e.g https://notification.{region}.{secondLevelDomain}.If both endpoint and region are given, then endpoint takes precedence.

credential_name

(optional) The name of the credential for authenticating with the corresponding cloud native API.

LIST_SUBSCRIPTIONS Function

Lists the subscriptions in the specified compartment or topic. Transactions Per Minute (TPM) per-tenancy limit for this operation: 60.

Syntax

FUNCTION list_subscriptions (
  compartment_id varchar2,
  topic_id varchar2 DEFAULT NULL,
  page varchar2 DEFAULT NULL,
  limit number DEFAULT NULL,
  opc_request_id varchar2 DEFAULT NULL,
  region varchar2 DEFAULT NULL, 
  endpoint varchar2 DEFAULT NULL,
  credential_name varchar2 DEFAULT NULL
) RETURN dbms_cloud_oci_ons_notification_data_plane_list_subscriptions_response_t;

Parameters

Parameter Description

compartment_id

(required) The OCID of the compartment.

topic_id

(optional) Return all subscriptions that are subscribed to the given topic OCID. Either this query parameter or the compartmentId query parameter must be set.

page

(optional) 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.

limit

(optional) For list pagination. The maximum number of results per page, or items to return in a paginated \"List\" call. For important details about how pagination works, see List Pagination.

opc_request_id

(optional) The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

region

(optional) OCI region id. e.g us-phoenix-1 for US West (Phoenix).

endpoint

(optional) The endpoint of the service to call using this function. e.g https://notification.{region}.{secondLevelDomain}.If both endpoint and region are given, then endpoint takes precedence.

credential_name

(optional) The name of the credential for authenticating with the corresponding cloud native API.

PUBLISH_MESSAGE Function

Publishes a message to the specified topic. The topic endpoint is required for this operation. To get the topic endpoint, use GET_TOPIC Function and review the `apiEndpoint` value in the response (NOTIFICATION_TOPIC Type). Limits information follows. Message size limit per request: 64KB. Message delivery rate limit per endpoint: 60 messages per minute for HTTP-based protocols, 10 messages per minute for the `EMAIL` protocol. HTTP-based protocols use URL endpoints that begin with \"http:\" or \"https:\". Transactions Per Minute (TPM) per-tenancy limit for this operation: 60 per topic. (This TPM limit represents messages per minute.) For more information about publishing messages, see Publishing Messages. For steps to request a limit increase, see Requesting a Service Limit Increase.

Syntax

FUNCTION publish_message (
  topic_id varchar2,
  message_details dbms_cloud_oci_ons_message_details_t,
  opc_request_id varchar2 DEFAULT NULL,
  message_type varchar2 DEFAULT NULL,
  region varchar2 DEFAULT NULL, 
  endpoint varchar2 DEFAULT NULL,
  credential_name varchar2 DEFAULT NULL
) RETURN dbms_cloud_oci_ons_notification_data_plane_publish_message_response_t;

Parameters

Parameter Description

topic_id

(required) The OCID of the topic.

message_details

(required) The message to publish.

opc_request_id

(optional) The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

message_type

(optional) **Deprecated.** Support for JSON is deprecated. You can send a JSON payload even when transmitting the payload as a raw string. Configure your receiving system to read the raw payload as JSON format. Type of message body in the request. For `messageType` of JSON, a default key-value pair is required. Example: `{\"default\": \"Alarm breached\", \"Email\": \"Alarm breached: <url>\"}.`

Allowed values are: 'JSON', 'RAW_TEXT'

region

(optional) OCI region id. e.g us-phoenix-1 for US West (Phoenix).

endpoint

(optional) The endpoint of the service to call using this function. e.g https://notification.{region}.{secondLevelDomain}.If both endpoint and region are given, then endpoint takes precedence.

credential_name

(optional) The name of the credential for authenticating with the corresponding cloud native API.

RESEND_SUBSCRIPTION_CONFIRMATION Function

Resends the confirmation details for the specified subscription. Transactions Per Minute (TPM) per-tenancy limit for this operation: 60.

Syntax

FUNCTION resend_subscription_confirmation (
  id varchar2,
  opc_request_id varchar2 DEFAULT NULL,
  region varchar2 DEFAULT NULL, 
  endpoint varchar2 DEFAULT NULL,
  credential_name varchar2 DEFAULT NULL
) RETURN dbms_cloud_oci_ons_notification_data_plane_resend_subscription_confirmation_response_t;

Parameters

Parameter Description

id

(required) The OCID of the subscription to resend the confirmation for.

opc_request_id

(optional) The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

region

(optional) OCI region id. e.g us-phoenix-1 for US West (Phoenix).

endpoint

(optional) The endpoint of the service to call using this function. e.g https://notification.{region}.{secondLevelDomain}.If both endpoint and region are given, then endpoint takes precedence.

credential_name

(optional) The name of the credential for authenticating with the corresponding cloud native API.

UPDATE_SUBSCRIPTION Function

Updates the specified subscription's configuration. Transactions Per Minute (TPM) per-tenancy limit for this operation: 60.

Syntax

FUNCTION update_subscription (
  subscription_id varchar2,
  update_subscription_details dbms_cloud_oci_ons_update_subscription_details_t,
  opc_request_id varchar2 DEFAULT NULL,
  if_match varchar2 DEFAULT NULL,
  region varchar2 DEFAULT NULL, 
  endpoint varchar2 DEFAULT NULL,
  credential_name varchar2 DEFAULT NULL
) RETURN dbms_cloud_oci_ons_notification_data_plane_update_subscription_response_t;

Parameters

Parameter Description

subscription_id

(required) The OCID of the subscription to update.

update_subscription_details

(required) The configuration details for updating the subscription.

opc_request_id

(optional) The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

if_match

(optional) Used 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.

region

(optional) OCI region id. e.g us-phoenix-1 for US West (Phoenix).

endpoint

(optional) The endpoint of the service to call using this function. e.g https://notification.{region}.{secondLevelDomain}.If both endpoint and region are given, then endpoint takes precedence.

credential_name

(optional) The name of the credential for authenticating with the corresponding cloud native API.