Class: AWSCDK::Neptune::CfnEventSubscriptionProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
neptune/cfn_event_subscription_props.rb

Overview

Properties for defining a CfnEventSubscription.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(sns_topic_arn:, enabled: nil, event_categories: nil, source_ids: nil, source_type: nil, subscription_name: nil, tags: nil) ⇒ CfnEventSubscriptionProps

Returns a new instance of CfnEventSubscriptionProps.

Parameters:

  • sns_topic_arn (String)

    The topic ARN of the event notification subscription.

  • enabled (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    A Boolean value indicating if the subscription is enabled.

  • event_categories (Array<String>, nil) (defaults to: nil)

    A list of event categories for a SourceType that you want to subscribe to.

  • source_ids (Array<String>, nil) (defaults to: nil)

    The list of identifiers of the event sources for which events will be returned.

  • source_type (String, nil) (defaults to: nil)

    The source type for the event notification subscription.

  • subscription_name (String, nil) (defaults to: nil)

    The name of the subscription.

  • tags (Array<AWSCDK::CfnTag>, nil) (defaults to: nil)

    An array of key-value pairs to apply to this resource.



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'neptune/cfn_event_subscription_props.rb', line 16

def initialize(sns_topic_arn:, enabled: nil, event_categories: nil, source_ids: nil, source_type: nil, subscription_name: nil, tags: nil)
  @sns_topic_arn = sns_topic_arn
  Jsii::Type.check_type(@sns_topic_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "snsTopicArn")
  @enabled = enabled
  Jsii::Type.check_type(@enabled, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "enabled") unless @enabled.nil?
  @event_categories = event_categories
  Jsii::Type.check_type(@event_categories, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "eventCategories") unless @event_categories.nil?
  @source_ids = source_ids
  Jsii::Type.check_type(@source_ids, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "sourceIds") unless @source_ids.nil?
  @source_type = source_type
  Jsii::Type.check_type(@source_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "sourceType") unless @source_type.nil?
  @subscription_name = subscription_name
  Jsii::Type.check_type(@subscription_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "subscriptionName") unless @subscription_name.nil?
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
end

Instance Attribute Details

#enabledBoolean, ... (readonly)

Note:

Default: - true

A Boolean value indicating if the subscription is enabled.

True indicates the subscription is enabled.



45
46
47
# File 'neptune/cfn_event_subscription_props.rb', line 45

def enabled
  @enabled
end

#event_categoriesArray<String>? (readonly)

A list of event categories for a SourceType that you want to subscribe to.

You can see a list of the categories for a given SourceType in the Events topic in the Amazon Neptune User Guide or by using the DescribeEventCategories action.



52
53
54
# File 'neptune/cfn_event_subscription_props.rb', line 52

def event_categories
  @event_categories
end

#sns_topic_arnString (readonly)

The topic ARN of the event notification subscription.



37
38
39
# File 'neptune/cfn_event_subscription_props.rb', line 37

def sns_topic_arn
  @sns_topic_arn
end

#source_idsArray<String>? (readonly)

The list of identifiers of the event sources for which events will be returned.

If not specified, then all sources are included in the response. An identifier must begin with a letter and must contain only ASCII letters, digits, and hyphens; it cannot end with a hyphen or contain two consecutive hyphens.



59
60
61
# File 'neptune/cfn_event_subscription_props.rb', line 59

def source_ids
  @source_ids
end

#source_typeString? (readonly)

The source type for the event notification subscription.



64
65
66
# File 'neptune/cfn_event_subscription_props.rb', line 64

def source_type
  @source_type
end

#subscription_nameString? (readonly)

The name of the subscription.



69
70
71
# File 'neptune/cfn_event_subscription_props.rb', line 69

def subscription_name
  @subscription_name
end

#tagsArray<AWSCDK::CfnTag>? (readonly)

An array of key-value pairs to apply to this resource.



74
75
76
# File 'neptune/cfn_event_subscription_props.rb', line 74

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



76
77
78
79
80
81
82
83
84
85
86
# File 'neptune/cfn_event_subscription_props.rb', line 76

def self.jsii_properties
  {
    :sns_topic_arn => "snsTopicArn",
    :enabled => "enabled",
    :event_categories => "eventCategories",
    :source_ids => "sourceIds",
    :source_type => "sourceType",
    :subscription_name => "subscriptionName",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



88
89
90
91
92
93
94
95
96
97
98
99
100
# File 'neptune/cfn_event_subscription_props.rb', line 88

def to_jsii
  result = {}
  result.merge!({
    "snsTopicArn" => @sns_topic_arn,
    "enabled" => @enabled,
    "eventCategories" => @event_categories,
    "sourceIds" => @source_ids,
    "sourceType" => @source_type,
    "subscriptionName" => @subscription_name,
    "tags" => @tags,
  })
  result.compact
end