Class: AWSCDK::SMSVoice::CfnProtectConfiguration::CountryRuleProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::SMSVoice::CfnProtectConfiguration::CountryRuleProperty
- Defined in:
- sms_voice/cfn_protect_configuration.rb
Overview
Specifies the type of protection to use for a country.
For example, to set Canada as allowed, the CountryRule would be formatted as follows:
{ "CountryCode": "CA", "ProtectStatus": "ALLOW" }
Instance Attribute Summary collapse
-
#country_code ⇒ String
readonly
The two-character code, in ISO 3166-1 alpha-2 format, for the country or region.
-
#protect_status ⇒ String
readonly
The types of protection that can be used.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(country_code:, protect_status:) ⇒ CountryRuleProperty
constructor
A new instance of CountryRuleProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(country_code:, protect_status:) ⇒ CountryRuleProperty
Returns a new instance of CountryRuleProperty.
585 586 587 588 589 590 |
# File 'sms_voice/cfn_protect_configuration.rb', line 585 def initialize(country_code:, protect_status:) @country_code = country_code Jsii::Type.check_type(@country_code, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "countryCode") @protect_status = protect_status Jsii::Type.check_type(@protect_status, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "protectStatus") end |
Instance Attribute Details
#country_code ⇒ String (readonly)
The two-character code, in ISO 3166-1 alpha-2 format, for the country or region.
596 597 598 |
# File 'sms_voice/cfn_protect_configuration.rb', line 596 def country_code @country_code end |
#protect_status ⇒ String (readonly)
The types of protection that can be used.
601 602 603 |
# File 'sms_voice/cfn_protect_configuration.rb', line 601 def protect_status @protect_status end |
Class Method Details
.jsii_properties ⇒ Object
603 604 605 606 607 608 |
# File 'sms_voice/cfn_protect_configuration.rb', line 603 def self.jsii_properties { :country_code => "countryCode", :protect_status => "protectStatus", } end |
Instance Method Details
#to_jsii ⇒ Object
610 611 612 613 614 615 616 617 |
# File 'sms_voice/cfn_protect_configuration.rb', line 610 def to_jsii result = {} result.merge!({ "countryCode" => @country_code, "protectStatus" => @protect_status, }) result.compact end |