Class: AWSCDK::SMSVoice::CfnPhoneNumber::TwoWayProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
sms_voice/cfn_phone_number.rb

Overview

The phone number's two-way SMS configuration object.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(enabled:, channel_arn: nil, channel_role: nil) ⇒ TwoWayProperty

Returns a new instance of TwoWayProperty.

Parameters:

  • enabled (Boolean, AWSCDK::IResolvable)

    By default this is set to false.

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

    The Amazon Resource Name (ARN) of the two way channel.

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

    An optional IAM Role Arn for a service to assume, to be able to post inbound SMS messages.



823
824
825
826
827
828
829
830
# File 'sms_voice/cfn_phone_number.rb', line 823

def initialize(enabled:, channel_arn: nil, channel_role: nil)
  @enabled = enabled
  Jsii::Type.check_type(@enabled, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "enabled")
  @channel_arn = channel_arn
  Jsii::Type.check_type(@channel_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "channelArn") unless @channel_arn.nil?
  @channel_role = channel_role
  Jsii::Type.check_type(@channel_role, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "channelRole") unless @channel_role.nil?
end

Instance Attribute Details

#channel_arnString? (readonly)

The Amazon Resource Name (ARN) of the two way channel.



843
844
845
# File 'sms_voice/cfn_phone_number.rb', line 843

def channel_arn
  @channel_arn
end

#channel_roleString? (readonly)

An optional IAM Role Arn for a service to assume, to be able to post inbound SMS messages.



848
849
850
# File 'sms_voice/cfn_phone_number.rb', line 848

def channel_role
  @channel_role
end

#enabledBoolean, AWSCDK::IResolvable (readonly)

By default this is set to false.

When set to true you can receive incoming text messages from your end recipients using the TwoWayChannelArn.



838
839
840
# File 'sms_voice/cfn_phone_number.rb', line 838

def enabled
  @enabled
end

Class Method Details

.jsii_propertiesObject



850
851
852
853
854
855
856
# File 'sms_voice/cfn_phone_number.rb', line 850

def self.jsii_properties
  {
    :enabled => "enabled",
    :channel_arn => "channelArn",
    :channel_role => "channelRole",
  }
end

Instance Method Details

#to_jsiiObject



858
859
860
861
862
863
864
865
866
# File 'sms_voice/cfn_phone_number.rb', line 858

def to_jsii
  result = {}
  result.merge!({
    "enabled" => @enabled,
    "channelArn" => @channel_arn,
    "channelRole" => @channel_role,
  })
  result.compact
end