Class: AWSCDK::Connect::CfnNotificationProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
connect/cfn_notification_props.rb

Overview

Properties for defining a CfnNotification.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(content:, instance_arn:, expires_at: nil, priority: nil, recipients: nil, tags: nil) ⇒ CfnNotificationProps

Returns a new instance of CfnNotificationProps.

Parameters:

  • content (AWSCDK::IResolvable, AWSCDK::Connect::CfnNotification::NotificationContentProperty)

    The content of a notification.

  • instance_arn (String)

    The identifier of the Amazon Connect instance.

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

    The time a notification will expire.

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

    The priority of notification.

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

    The recipients of the notification.

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

    One or more tags.



15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'connect/cfn_notification_props.rb', line 15

def initialize(content:, instance_arn:, expires_at: nil, priority: nil, recipients: nil, tags: nil)
  @content = content.is_a?(Hash) ? ::AWSCDK::Connect::CfnNotification::NotificationContentProperty.new(**content.transform_keys(&:to_sym)) : content
  Jsii::Type.check_type(@content, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb25uZWN0LkNmbk5vdGlmaWNhdGlvbi5Ob3RpZmljYXRpb25Db250ZW50UHJvcGVydHkifV19fQ==")), "content")
  @instance_arn = instance_arn
  Jsii::Type.check_type(@instance_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "instanceArn")
  @expires_at = expires_at
  Jsii::Type.check_type(@expires_at, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "expiresAt") unless @expires_at.nil?
  @priority = priority
  Jsii::Type.check_type(@priority, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "priority") unless @priority.nil?
  @recipients = recipients
  Jsii::Type.check_type(@recipients, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "recipients") unless @recipients.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

#expires_atString? (readonly)

The time a notification will expire.



44
45
46
# File 'connect/cfn_notification_props.rb', line 44

def expires_at
  @expires_at
end

#instance_arnString (readonly)

The identifier of the Amazon Connect instance.



39
40
41
# File 'connect/cfn_notification_props.rb', line 39

def instance_arn
  @instance_arn
end

#priorityString? (readonly)

The priority of notification.

In the Amazon Connect console, when you create a notification, you are prompted to assign one of the following priorities: High (HIGH) or LOW (LOW)



51
52
53
# File 'connect/cfn_notification_props.rb', line 51

def priority
  @priority
end

#recipientsArray<String>? (readonly)

The recipients of the notification.



56
57
58
# File 'connect/cfn_notification_props.rb', line 56

def recipients
  @recipients
end

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

One or more tags.



61
62
63
# File 'connect/cfn_notification_props.rb', line 61

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



63
64
65
66
67
68
69
70
71
72
# File 'connect/cfn_notification_props.rb', line 63

def self.jsii_properties
  {
    :content => "content",
    :instance_arn => "instanceArn",
    :expires_at => "expiresAt",
    :priority => "priority",
    :recipients => "recipients",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



74
75
76
77
78
79
80
81
82
83
84
85
# File 'connect/cfn_notification_props.rb', line 74

def to_jsii
  result = {}
  result.merge!({
    "content" => @content,
    "instanceArn" => @instance_arn,
    "expiresAt" => @expires_at,
    "priority" => @priority,
    "recipients" => @recipients,
    "tags" => @tags,
  })
  result.compact
end