Subscription

class oci.ons.models.Subscription(**kwargs)

Bases: object

The subscription’s configuration. For general information about subscriptions, see Notifications Overview.

Attributes

LIFECYCLE_STATE_ACTIVE A constant which can be used with the lifecycle_state property of a Subscription.
LIFECYCLE_STATE_DELETED A constant which can be used with the lifecycle_state property of a Subscription.
LIFECYCLE_STATE_PENDING A constant which can be used with the lifecycle_state property of a Subscription.
compartment_id [Required] Gets the compartment_id of this Subscription.
created_time Gets the created_time of this Subscription.
defined_tags Gets the defined_tags of this Subscription.
deliver_policy Gets the deliver_policy of this Subscription.
endpoint [Required] Gets the endpoint of this Subscription.
etag Gets the etag of this Subscription.
freeform_tags Gets the freeform_tags of this Subscription.
id [Required] Gets the id of this Subscription.
lifecycle_state [Required] Gets the lifecycle_state of this Subscription.
protocol [Required] Gets the protocol of this Subscription.
topic_id [Required] Gets the topic_id of this Subscription.

Methods

__init__(**kwargs) Initializes a new Subscription object with values from keyword arguments.
LIFECYCLE_STATE_ACTIVE = 'ACTIVE'

A constant which can be used with the lifecycle_state property of a Subscription. This constant has a value of “ACTIVE”

LIFECYCLE_STATE_DELETED = 'DELETED'

A constant which can be used with the lifecycle_state property of a Subscription. This constant has a value of “DELETED”

LIFECYCLE_STATE_PENDING = 'PENDING'

A constant which can be used with the lifecycle_state property of a Subscription. This constant has a value of “PENDING”

__init__(**kwargs)

Initializes a new Subscription object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class):

Parameters:
  • id (str) – The value to assign to the id property of this Subscription.
  • topic_id (str) – The value to assign to the topic_id property of this Subscription.
  • protocol (str) – The value to assign to the protocol property of this Subscription.
  • endpoint (str) – The value to assign to the endpoint property of this Subscription.
  • lifecycle_state (str) – The value to assign to the lifecycle_state property of this Subscription. Allowed values for this property are: “PENDING”, “ACTIVE”, “DELETED”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
  • compartment_id (str) – The value to assign to the compartment_id property of this Subscription.
  • created_time (int) – The value to assign to the created_time property of this Subscription.
  • deliver_policy (str) – The value to assign to the deliver_policy property of this Subscription.
  • etag (str) – The value to assign to the etag property of this Subscription.
  • freeform_tags (dict(str, str)) – The value to assign to the freeform_tags property of this Subscription.
  • defined_tags (dict(str, dict(str, object))) – The value to assign to the defined_tags property of this Subscription.
compartment_id

[Required] Gets the compartment_id of this Subscription. The OCID of the compartment for the subscription.

Returns:The compartment_id of this Subscription.
Return type:str
created_time

Gets the created_time of this Subscription. The time when this suscription was created.

Returns:The created_time of this Subscription.
Return type:int
defined_tags

Gets the defined_tags of this Subscription. Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.

Example: {“Operations”: {“CostCenter”: “42”}}

Returns:The defined_tags of this Subscription.
Return type:dict(str, dict(str, object))
deliver_policy

Gets the deliver_policy of this Subscription. The delivery policy of the subscription. Stored as a JSON string.

Returns:The deliver_policy of this Subscription.
Return type:str
endpoint

[Required] Gets the endpoint of this Subscription. A locator that corresponds to the subscription protocol. For example, an email address for a subscription that uses the EMAIL protocol, or a URL for a subscription that uses an HTTP-based protocol.

Returns:The endpoint of this Subscription.
Return type:str
etag

Gets the etag of this Subscription. For optimistic concurrency control. See if-match.

Returns:The etag of this Subscription.
Return type:str
freeform_tags

Gets the freeform_tags of this Subscription. Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags.

Example: {“Department”: “Finance”}

Returns:The freeform_tags of this Subscription.
Return type:dict(str, str)
id

[Required] Gets the id of this Subscription. The OCID of the subscription.

Returns:The id of this Subscription.
Return type:str
lifecycle_state

[Required] Gets the lifecycle_state of this Subscription. The lifecycle state of the subscription. The status of a new subscription is PENDING; when confirmed, the subscription status changes to ACTIVE.

Allowed values for this property are: “PENDING”, “ACTIVE”, “DELETED”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

Returns:The lifecycle_state of this Subscription.
Return type:str
protocol

[Required] Gets the protocol of this Subscription. The protocol used for the subscription.

Allowed values:
  • CUSTOM_HTTPS
  • EMAIL
  • HTTPS (deprecated; for PagerDuty endpoints, use PAGERDUTY)
  • ORACLE_FUNCTIONS
  • PAGERDUTY
  • SLACK
  • SMS

For information about subscription protocols, see To create a subscription.

Returns:The protocol of this Subscription.
Return type:str
topic_id

[Required] Gets the topic_id of this Subscription. The OCID of the associated topic.

Returns:The topic_id of this Subscription.
Return type:str