Class: AWSCDK::DMS::CfnEventSubscriptionProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
dms/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 Amazon Resource Name (ARN) of the Amazon SNS topic created for event notification.

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

    Indicates whether to activate the subscription.

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

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

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

    A list of identifiers for which AWS DMS provides notification events.

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

    The type of AWS DMS resource that generates the events.

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

    The name of the AWS DMS event notification subscription.

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

    One or more tags to be assigned to the event subscription.



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'dms/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)

Indicates whether to activate the subscription.

If you don't specify this property, CloudFormation activates the subscription.



46
47
48
# File 'dms/cfn_event_subscription_props.rb', line 46

def enabled
  @enabled
end

#event_categoriesArray<String>? (readonly)

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

If you don't specify this property, you are notified about all event categories. For more information, see Working with Events and Notifications in the AWS DMS User Guide .



53
54
55
# File 'dms/cfn_event_subscription_props.rb', line 53

def event_categories
  @event_categories
end

#sns_topic_arnString (readonly)

The Amazon Resource Name (ARN) of the Amazon SNS topic created for event notification.

The ARN is created by Amazon SNS when you create a topic and subscribe to it.



39
40
41
# File 'dms/cfn_event_subscription_props.rb', line 39

def sns_topic_arn
  @sns_topic_arn
end

#source_idsArray<String>? (readonly)

A list of identifiers for which AWS DMS provides notification events.

If you don't specify a value, notifications are provided for all sources.

If you specify multiple values, they must be of the same type. For example, if you specify a database instance ID, then all of the other values must be database instance IDs.



62
63
64
# File 'dms/cfn_event_subscription_props.rb', line 62

def source_ids
  @source_ids
end

#source_typeString? (readonly)

The type of AWS DMS resource that generates the events.

For example, if you want to be notified of events generated by a replication instance, you set this parameter to replication-instance . If this value isn't specified, all events are returned.

Valid values : replication-instance | replication-task



71
72
73
# File 'dms/cfn_event_subscription_props.rb', line 71

def source_type
  @source_type
end

#subscription_nameString? (readonly)

The name of the AWS DMS event notification subscription.

This name must be less than 255 characters.



78
79
80
# File 'dms/cfn_event_subscription_props.rb', line 78

def subscription_name
  @subscription_name
end

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

One or more tags to be assigned to the event subscription.



83
84
85
# File 'dms/cfn_event_subscription_props.rb', line 83

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



85
86
87
88
89
90
91
92
93
94
95
# File 'dms/cfn_event_subscription_props.rb', line 85

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



97
98
99
100
101
102
103
104
105
106
107
108
109
# File 'dms/cfn_event_subscription_props.rb', line 97

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