Class: AWSCDK::Redshift::CfnEventSubscriptionProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
redshift/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(subscription_name:, enabled: nil, event_categories: nil, severity: nil, sns_topic_arn: nil, source_ids: nil, source_type: nil, tags: nil) ⇒ CfnEventSubscriptionProps

Returns a new instance of CfnEventSubscriptionProps.

Parameters:

  • subscription_name (String)

    The name of the event subscription to be created.

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

    A boolean value;

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

    Specifies the Amazon Redshift event categories to be published by the event notification subscription.

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

    Specifies the Amazon Redshift event severity to be published by the event notification subscription.

  • sns_topic_arn (String, AWSCDK::Interfaces::AWSSNS::ITopicRef, nil) (defaults to: nil)

    The Amazon Resource Name (ARN) of the Amazon SNS topic used to transmit the event notifications.

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

    A list of one or more identifiers of Amazon Redshift source objects.

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

    The type of source that will be generating the events.

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

    A list of tag instances.



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

def initialize(subscription_name:, enabled: nil, event_categories: nil, severity: nil, sns_topic_arn: nil, source_ids: nil, source_type: nil, tags: nil)
  @subscription_name = subscription_name
  Jsii::Type.check_type(@subscription_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "subscriptionName")
  @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?
  @severity = severity
  Jsii::Type.check_type(@severity, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "severity") unless @severity.nil?
  @sns_topic_arn = sns_topic_arn
  Jsii::Type.check_type(@sns_topic_arn, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19zbnMuSVRvcGljUmVmIn1dfX0=")), "snsTopicArn") unless @sns_topic_arn.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?
  @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)

A boolean value;

set to true to activate the subscription, and set to false to create the subscription but not activate it.



54
55
56
# File 'redshift/cfn_event_subscription_props.rb', line 54

def enabled
  @enabled
end

#event_categoriesArray<String>? (readonly)

Specifies the Amazon Redshift event categories to be published by the event notification subscription.

Values: configuration, management, monitoring, security, pending



61
62
63
# File 'redshift/cfn_event_subscription_props.rb', line 61

def event_categories
  @event_categories
end

#severityString? (readonly)

Specifies the Amazon Redshift event severity to be published by the event notification subscription.

Values: ERROR, INFO



68
69
70
# File 'redshift/cfn_event_subscription_props.rb', line 68

def severity
  @severity
end

#sns_topic_arnString, ... (readonly)

The Amazon Resource Name (ARN) of the Amazon SNS topic used to transmit the event notifications.

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



75
76
77
# File 'redshift/cfn_event_subscription_props.rb', line 75

def sns_topic_arn
  @sns_topic_arn
end

#source_idsArray<String>? (readonly)

A list of one or more identifiers of Amazon Redshift source objects.

All of the objects must be of the same type as was specified in the source type parameter. The event subscription will return only events generated by the specified objects. If not specified, then events are returned for all objects within the source type specified.

Example: my-cluster-1, my-cluster-2

Example: my-snapshot-20131010



86
87
88
# File 'redshift/cfn_event_subscription_props.rb', line 86

def source_ids
  @source_ids
end

#source_typeString? (readonly)

The type of source that will be generating the events.

For example, if you want to be notified of events generated by a cluster, you would set this parameter to cluster. If this value is not specified, events are returned for all Amazon Redshift objects in your AWS account . You must specify a source type in order to specify source IDs.

Valid values: cluster, cluster-parameter-group, cluster-security-group, cluster-snapshot, and scheduled-action.



95
96
97
# File 'redshift/cfn_event_subscription_props.rb', line 95

def source_type
  @source_type
end

#subscription_nameString (readonly)

The name of the event subscription to be created.

Constraints:

  • Cannot be null, empty, or blank.
  • Must contain from 1 to 255 alphanumeric characters or hyphens.
  • First character must be a letter.
  • Cannot end with a hyphen or contain two consecutive hyphens.


47
48
49
# File 'redshift/cfn_event_subscription_props.rb', line 47

def subscription_name
  @subscription_name
end

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

A list of tag instances.



100
101
102
# File 'redshift/cfn_event_subscription_props.rb', line 100

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



102
103
104
105
106
107
108
109
110
111
112
113
# File 'redshift/cfn_event_subscription_props.rb', line 102

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

Instance Method Details

#to_jsiiObject



115
116
117
118
119
120
121
122
123
124
125
126
127
128
# File 'redshift/cfn_event_subscription_props.rb', line 115

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