Class: AWSCDK::NotificationsContacts::CfnEmailContactProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
notifications_contacts/cfn_email_contact_props.rb

Overview

Properties for defining a CfnEmailContact.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(email_address:, name:, tags: nil) ⇒ CfnEmailContactProps

Returns a new instance of CfnEmailContactProps.

Parameters:

  • email_address (String)

    The email address of the contact.

  • name (String)

    The name of the contact.

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

    A list of tags to apply to the email contact.



12
13
14
15
16
17
18
19
# File 'notifications_contacts/cfn_email_contact_props.rb', line 12

def initialize(email_address:, name:, tags: nil)
  @email_address = email_address
  Jsii::Type.check_type(@email_address, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "emailAddress")
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  @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

#email_addressString (readonly)

The email address of the contact.

The activation and notification emails are sent here.



27
28
29
# File 'notifications_contacts/cfn_email_contact_props.rb', line 27

def email_address
  @email_address
end

#nameString (readonly)

The name of the contact.



32
33
34
# File 'notifications_contacts/cfn_email_contact_props.rb', line 32

def name
  @name
end

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

A list of tags to apply to the email contact.



37
38
39
# File 'notifications_contacts/cfn_email_contact_props.rb', line 37

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



39
40
41
42
43
44
45
# File 'notifications_contacts/cfn_email_contact_props.rb', line 39

def self.jsii_properties
  {
    :email_address => "emailAddress",
    :name => "name",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



47
48
49
50
51
52
53
54
55
# File 'notifications_contacts/cfn_email_contact_props.rb', line 47

def to_jsii
  result = {}
  result.merge!({
    "emailAddress" => @email_address,
    "name" => @name,
    "tags" => @tags,
  })
  result.compact
end