Class: AWSCDK::SMSVoice::CfnProtectConfiguration::CountryRuleProperty

Inherits:
Jsii::Struct
  • Object
show all
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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(country_code:, protect_status:) ⇒ CountryRuleProperty

Returns a new instance of CountryRuleProperty.

Parameters:

  • country_code (String)

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

  • protect_status (String)

    The types of protection that can be used.



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_codeString (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_statusString (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_propertiesObject



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_jsiiObject



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