Show / Hide Table of Contents

Class Subscription

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

Inheritance
object
Subscription
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Oci.OnsService.Models
Assembly: OCI.DotNetSDK.Ons.dll
Syntax
public class Subscription

Properties

CompartmentId

Declaration
[Required(ErrorMessage = "CompartmentId is required.")]
[JsonProperty(PropertyName = "compartmentId")]
public string CompartmentId { get; set; }
Property Value
Type Description
string

The OCID of the compartment for the subscription.

Remarks

Required

CreatedTime

Declaration
[JsonProperty(PropertyName = "createdTime")]
public long? CreatedTime { get; set; }
Property Value
Type Description
long?

The time when this suscription was created.

DefinedTags

Declaration
[JsonProperty(PropertyName = "definedTags")]
public Dictionary<string, Dictionary<string, object>> DefinedTags { get; set; }
Property Value
Type Description
Dictionary<string, Dictionary<string, object>>

Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
Example: {"Operations": {"CostCenter": "42"}}

DeliverPolicy

Declaration
[JsonProperty(PropertyName = "deliverPolicy")]
public string DeliverPolicy { get; set; }
Property Value
Type Description
string

The delivery policy of the subscription. Stored as a JSON string.

Endpoint

Declaration
[Required(ErrorMessage = "Endpoint is required.")]
[JsonProperty(PropertyName = "endpoint")]
public string Endpoint { get; set; }
Property Value
Type Description
string

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.

Remarks

Required

Etag

Declaration
[JsonProperty(PropertyName = "etag")]
public string Etag { get; set; }
Property Value
Type Description
string

For optimistic concurrency control. See if-match.

FreeformTags

Declaration
[JsonProperty(PropertyName = "freeformTags")]
public Dictionary<string, string> FreeformTags { get; set; }
Property Value
Type Description
Dictionary<string, string>

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"}

Id

Declaration
[Required(ErrorMessage = "Id is required.")]
[JsonProperty(PropertyName = "id")]
public string Id { get; set; }
Property Value
Type Description
string

The OCID of the subscription.

Remarks

Required

LifecycleState

Declaration
[Required(ErrorMessage = "LifecycleState is required.")]
[JsonProperty(PropertyName = "lifecycleState")]
[JsonConverter(typeof(ResponseEnumConverter))]
public Subscription.LifecycleStateEnum? LifecycleState { get; set; }
Property Value
Type Description
Subscription.LifecycleStateEnum?

The lifecycle state of the subscription. The status of a new subscription is PENDING; when confirmed, the subscription status changes to ACTIVE.

Remarks

Required

Protocol

Declaration
[Required(ErrorMessage = "Protocol is required.")]
[JsonProperty(PropertyName = "protocol")]
public string Protocol { get; set; }
Property Value
Type Description
string

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.
Remarks

Required

TopicId

Declaration
[Required(ErrorMessage = "TopicId is required.")]
[JsonProperty(PropertyName = "topicId")]
public string TopicId { get; set; }
Property Value
Type Description
string

The OCID of the associated topic.

Remarks

Required

In this article
Back to top