Class: AWSCDK::SMSVoice::CfnPhoneNumberProps

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

Overview

Properties for defining a CfnPhoneNumber.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(iso_country_code:, mandatory_keywords:, number_capabilities:, number_type:, deletion_protection_enabled: nil, optional_keywords: nil, opt_out_list_name: nil, self_managed_opt_outs_enabled: nil, tags: nil, two_way: nil) ⇒ CfnPhoneNumberProps

Returns a new instance of CfnPhoneNumberProps.

Parameters:

  • iso_country_code (String)

    The two-character code, in ISO 3166-1 alpha-2 format, for the country or region.

  • mandatory_keywords (AWSCDK::IResolvable, AWSCDK::SMSVoice::CfnPhoneNumber::MandatoryKeywordsProperty)

    Creates or updates a MandatoryKeyword configuration on an origination phone number For more information, see Keywords in the End User Messaging User Guide.

  • number_capabilities (Array<String>)

    Indicates if the phone number will be used for text messages, voice messages, or both.

  • number_type (String)

    The type of phone number to request.

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

    By default this is set to false.

  • optional_keywords (AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::SMSVoice::CfnPhoneNumber::OptionalKeywordProperty>, nil) (defaults to: nil)

    A keyword is a word that you can search for on a particular phone number or pool.

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

    The name of the OptOutList associated with the phone number.

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

    When set to false and an end recipient sends a message that begins with HELP or STOP to one of your dedicated numbers, End User Messaging automatically replies with a customizable message and adds the end recipient to the OptOutList.

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

    An array of tags (key and value pairs) to associate with the requested phone number.

  • two_way (AWSCDK::IResolvable, AWSCDK::SMSVoice::CfnPhoneNumber::TwoWayProperty, nil) (defaults to: nil)

    Describes the two-way SMS configuration for a phone number.



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'sms_voice/cfn_phone_number_props.rb', line 19

def initialize(iso_country_code:, mandatory_keywords:, number_capabilities:, number_type:, deletion_protection_enabled: nil, optional_keywords: nil, opt_out_list_name: nil, self_managed_opt_outs_enabled: nil, tags: nil, two_way: nil)
  @iso_country_code = iso_country_code
  Jsii::Type.check_type(@iso_country_code, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "isoCountryCode")
  @mandatory_keywords = mandatory_keywords.is_a?(Hash) ? ::AWSCDK::SMSVoice::CfnPhoneNumber::MandatoryKeywordsProperty.new(**mandatory_keywords.transform_keys(&:to_sym)) : mandatory_keywords
  Jsii::Type.check_type(@mandatory_keywords, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zbXN2b2ljZS5DZm5QaG9uZU51bWJlci5NYW5kYXRvcnlLZXl3b3Jkc1Byb3BlcnR5In1dfX0=")), "mandatoryKeywords")
  @number_capabilities = number_capabilities
  Jsii::Type.check_type(@number_capabilities, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "numberCapabilities")
  @number_type = number_type
  Jsii::Type.check_type(@number_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "numberType")
  @deletion_protection_enabled = deletion_protection_enabled
  Jsii::Type.check_type(@deletion_protection_enabled, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "deletionProtectionEnabled") unless @deletion_protection_enabled.nil?
  @optional_keywords = optional_keywords
  Jsii::Type.check_type(@optional_keywords, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc21zdm9pY2UuQ2ZuUGhvbmVOdW1iZXIuT3B0aW9uYWxLZXl3b3JkUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "optionalKeywords") unless @optional_keywords.nil?
  @opt_out_list_name = opt_out_list_name
  Jsii::Type.check_type(@opt_out_list_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "optOutListName") unless @opt_out_list_name.nil?
  @self_managed_opt_outs_enabled = self_managed_opt_outs_enabled
  Jsii::Type.check_type(@self_managed_opt_outs_enabled, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "selfManagedOptOutsEnabled") unless @self_managed_opt_outs_enabled.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?
  @two_way = two_way.is_a?(Hash) ? ::AWSCDK::SMSVoice::CfnPhoneNumber::TwoWayProperty.new(**two_way.transform_keys(&:to_sym)) : two_way
  Jsii::Type.check_type(@two_way, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zbXN2b2ljZS5DZm5QaG9uZU51bWJlci5Ud29XYXlQcm9wZXJ0eSJ9XX19")), "twoWay") unless @two_way.nil?
end

Instance Attribute Details

#deletion_protection_enabledBoolean, ... (readonly)

By default this is set to false.

When set to true the phone number can't be deleted.



70
71
72
# File 'sms_voice/cfn_phone_number_props.rb', line 70

def deletion_protection_enabled
  @deletion_protection_enabled
end

#iso_country_codeString (readonly)

The two-character code, in ISO 3166-1 alpha-2 format, for the country or region.



46
47
48
# File 'sms_voice/cfn_phone_number_props.rb', line 46

def iso_country_code
  @iso_country_code
end

#mandatory_keywordsAWSCDK::IResolvable, AWSCDK::SMSVoice::CfnPhoneNumber::MandatoryKeywordsProperty (readonly)

Creates or updates a MandatoryKeyword configuration on an origination phone number For more information, see Keywords in the End User Messaging User Guide.



51
52
53
# File 'sms_voice/cfn_phone_number_props.rb', line 51

def mandatory_keywords
  @mandatory_keywords
end

#number_capabilitiesArray<String> (readonly)

Indicates if the phone number will be used for text messages, voice messages, or both.



56
57
58
# File 'sms_voice/cfn_phone_number_props.rb', line 56

def number_capabilities
  @number_capabilities
end

#number_typeString (readonly)

The type of phone number to request.

The ShortCode number type is not supported in AWS CloudFormation .



63
64
65
# File 'sms_voice/cfn_phone_number_props.rb', line 63

def number_type
  @number_type
end

#opt_out_list_nameString? (readonly)

The name of the OptOutList associated with the phone number.



82
83
84
# File 'sms_voice/cfn_phone_number_props.rb', line 82

def opt_out_list_name
  @opt_out_list_name
end

#optional_keywordsAWSCDK::IResolvable, ... (readonly)

A keyword is a word that you can search for on a particular phone number or pool.

It is also a specific word or phrase that an end user can send to your number to elicit a response, such as an informational message or a special offer. When your number receives a message that begins with a keyword, End User Messaging responds with a customizable message. Optional keywords are differentiated from mandatory keywords. For more information, see Keywords in the End User Messaging User Guide.



77
78
79
# File 'sms_voice/cfn_phone_number_props.rb', line 77

def optional_keywords
  @optional_keywords
end

#self_managed_opt_outs_enabledBoolean, ... (readonly)

When set to false and an end recipient sends a message that begins with HELP or STOP to one of your dedicated numbers, End User Messaging automatically replies with a customizable message and adds the end recipient to the OptOutList.

When set to true you're responsible for responding to HELP and STOP requests. You're also responsible for tracking and honoring opt-out request. For more information see Self-managed opt-outs



89
90
91
# File 'sms_voice/cfn_phone_number_props.rb', line 89

def self_managed_opt_outs_enabled
  @self_managed_opt_outs_enabled
end

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

An array of tags (key and value pairs) to associate with the requested phone number.



94
95
96
# File 'sms_voice/cfn_phone_number_props.rb', line 94

def tags
  @tags
end

#two_wayAWSCDK::IResolvable, ... (readonly)

Describes the two-way SMS configuration for a phone number.

For more information, see Two-way SMS messaging in the End User Messaging User Guide.



101
102
103
# File 'sms_voice/cfn_phone_number_props.rb', line 101

def two_way
  @two_way
end

Class Method Details

.jsii_propertiesObject



103
104
105
106
107
108
109
110
111
112
113
114
115
116
# File 'sms_voice/cfn_phone_number_props.rb', line 103

def self.jsii_properties
  {
    :iso_country_code => "isoCountryCode",
    :mandatory_keywords => "mandatoryKeywords",
    :number_capabilities => "numberCapabilities",
    :number_type => "numberType",
    :deletion_protection_enabled => "deletionProtectionEnabled",
    :optional_keywords => "optionalKeywords",
    :opt_out_list_name => "optOutListName",
    :self_managed_opt_outs_enabled => "selfManagedOptOutsEnabled",
    :tags => "tags",
    :two_way => "twoWay",
  }
end

Instance Method Details

#to_jsiiObject



118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# File 'sms_voice/cfn_phone_number_props.rb', line 118

def to_jsii
  result = {}
  result.merge!({
    "isoCountryCode" => @iso_country_code,
    "mandatoryKeywords" => @mandatory_keywords,
    "numberCapabilities" => @number_capabilities,
    "numberType" => @number_type,
    "deletionProtectionEnabled" => @deletion_protection_enabled,
    "optionalKeywords" => @optional_keywords,
    "optOutListName" => @opt_out_list_name,
    "selfManagedOptOutsEnabled" => @self_managed_opt_outs_enabled,
    "tags" => @tags,
    "twoWay" => @two_way,
  })
  result.compact
end