Class: AWSCDK::IVS::CfnPlaybackRestrictionPolicyProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::IVS::CfnPlaybackRestrictionPolicyProps
- Defined in:
- ivs/cfn_playback_restriction_policy_props.rb
Overview
Properties for defining a CfnPlaybackRestrictionPolicy.
Instance Attribute Summary collapse
-
#allowed_countries ⇒ Array<String>?
readonly
A list of country codes that control geoblocking restrictions.
-
#allowed_origins ⇒ Array<String>?
readonly
A list of origin sites that control CORS restriction.
-
#enable_strict_origin_enforcement ⇒ Boolean, ...
readonly
Whether channel playback is constrained by the origin site.
-
#name ⇒ String?
readonly
Playback-restriction-policy name.
-
#tags ⇒ Array<AWSCDK::CfnTag>?
readonly
An array of key-value pairs to apply to this resource.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(allowed_countries: nil, allowed_origins: nil, enable_strict_origin_enforcement: nil, name: nil, tags: nil) ⇒ CfnPlaybackRestrictionPolicyProps
constructor
A new instance of CfnPlaybackRestrictionPolicyProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(allowed_countries: nil, allowed_origins: nil, enable_strict_origin_enforcement: nil, name: nil, tags: nil) ⇒ CfnPlaybackRestrictionPolicyProps
Returns a new instance of CfnPlaybackRestrictionPolicyProps.
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'ivs/cfn_playback_restriction_policy_props.rb', line 14 def initialize(allowed_countries: nil, allowed_origins: nil, enable_strict_origin_enforcement: nil, name: nil, tags: nil) @allowed_countries = allowed_countries Jsii::Type.check_type(@allowed_countries, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "allowedCountries") unless @allowed_countries.nil? @allowed_origins = allowed_origins Jsii::Type.check_type(@allowed_origins, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "allowedOrigins") unless @allowed_origins.nil? @enable_strict_origin_enforcement = enable_strict_origin_enforcement Jsii::Type.check_type(@enable_strict_origin_enforcement, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "enableStrictOriginEnforcement") unless @enable_strict_origin_enforcement.nil? @name = name Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.nil? @tags = .is_a?(Array) ? .map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil? end |
Instance Attribute Details
#allowed_countries ⇒ Array<String>? (readonly)
A list of country codes that control geoblocking restrictions.
Allowed values are the officially assigned ISO 3166-1 alpha-2 codes. Default: All countries (an empty array).
33 34 35 |
# File 'ivs/cfn_playback_restriction_policy_props.rb', line 33 def allowed_countries @allowed_countries end |
#allowed_origins ⇒ Array<String>? (readonly)
A list of origin sites that control CORS restriction.
Allowed values are the same as valid values of the Origin header defined at https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin"
40 41 42 |
# File 'ivs/cfn_playback_restriction_policy_props.rb', line 40 def allowed_origins @allowed_origins end |
#enable_strict_origin_enforcement ⇒ Boolean, ... (readonly)
Default: - false
Whether channel playback is constrained by the origin site.
46 47 48 |
# File 'ivs/cfn_playback_restriction_policy_props.rb', line 46 def enable_strict_origin_enforcement @enable_strict_origin_enforcement end |
#name ⇒ String? (readonly)
Playback-restriction-policy name.
51 52 53 |
# File 'ivs/cfn_playback_restriction_policy_props.rb', line 51 def name @name end |
#tags ⇒ Array<AWSCDK::CfnTag>? (readonly)
An array of key-value pairs to apply to this resource.
For more information, see Tag .
58 59 60 |
# File 'ivs/cfn_playback_restriction_policy_props.rb', line 58 def @tags end |
Class Method Details
.jsii_properties ⇒ Object
60 61 62 63 64 65 66 67 68 |
# File 'ivs/cfn_playback_restriction_policy_props.rb', line 60 def self.jsii_properties { :allowed_countries => "allowedCountries", :allowed_origins => "allowedOrigins", :enable_strict_origin_enforcement => "enableStrictOriginEnforcement", :name => "name", :tags => "tags", } end |
Instance Method Details
#to_jsii ⇒ Object
70 71 72 73 74 75 76 77 78 79 80 |
# File 'ivs/cfn_playback_restriction_policy_props.rb', line 70 def to_jsii result = {} result.merge!({ "allowedCountries" => @allowed_countries, "allowedOrigins" => @allowed_origins, "enableStrictOriginEnforcement" => @enable_strict_origin_enforcement, "name" => @name, "tags" => @tags, }) result.compact end |