Class: AWSCDK::RegionInfo::Fact
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::RegionInfo::Fact
- Defined in:
- region_info/fact.rb
Overview
A database of regional information.
Class Method Summary collapse
-
.defined_facts ⇒ Array<Array<String>>
Return all pairs of (region, factName) that are defined.
-
.find(region, name) ⇒ String?
Retrieves a fact from this Fact database.
- .jsii_overridable_methods ⇒ Object
-
.names ⇒ Array<String>
Returns the list of names of registered facts.
- .regions ⇒ Array<String>
-
.register(fact, allow_replacing = nil) ⇒ void
Registers a new fact in this Fact database.
-
.require_fact(region, name) ⇒ String
Retrieve a fact from the Fact database.
-
.unregister(region, name, value = nil) ⇒ void
Removes a fact from the database.
Instance Method Summary collapse
-
#initialize(*args) ⇒ Fact
constructor
A new instance of Fact.
Constructor Details
#initialize(*args) ⇒ Fact
Returns a new instance of Fact.
8 9 10 |
# File 'region_info/fact.rb', line 8 def initialize(*args) raise NoMethodError, "aws-cdk-lib.region_info.Fact does not have a visible constructor; use the provided factory methods" end |
Class Method Details
.defined_facts ⇒ Array<Array<String>>
Return all pairs of (region, factName) that are defined.
20 21 22 |
# File 'region_info/fact.rb', line 20 def self.defined_facts() Jsii::Kernel.instance.call_static("aws-cdk-lib.region_info.Fact", "definedFacts", []) end |
.find(region, name) ⇒ String?
Retrieves a fact from this Fact database.
29 30 31 32 33 |
# File 'region_info/fact.rb', line 29 def self.find(region, name) Jsii::Type.check_type(region, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "region") Jsii::Type.check_type(name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") Jsii::Kernel.instance.call_static("aws-cdk-lib.region_info.Fact", "find", [region, name]) end |
.jsii_overridable_methods ⇒ Object
12 13 14 15 |
# File 'region_info/fact.rb', line 12 def self.jsii_overridable_methods { } end |
.names ⇒ Array<String>
Returns the list of names of registered facts.
All facts will be present in at least one region.
78 79 80 |
# File 'region_info/fact.rb', line 78 def self.names() Jsii::Kernel.instance.get_static("aws-cdk-lib.region_info.Fact", "names") end |
.regions ⇒ Array<String>
83 84 85 |
# File 'region_info/fact.rb', line 83 def self.regions() Jsii::Kernel.instance.get_static("aws-cdk-lib.region_info.Fact", "regions") end |
.register(fact, allow_replacing = nil) ⇒ void
This method returns an undefined value.
Registers a new fact in this Fact database.
40 41 42 43 44 |
# File 'region_info/fact.rb', line 40 def self.register(fact, allow_replacing = nil) Jsii::Type.check_type(fact, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5yZWdpb25faW5mby5JRmFjdCJ9")), "fact") Jsii::Type.check_type(allow_replacing, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "allowReplacing") unless allow_replacing.nil? Jsii::Kernel.instance.call_static("aws-cdk-lib.region_info.Fact", "register", [fact, allow_replacing]) end |
.require_fact(region, name) ⇒ String
Retrieve a fact from the Fact database.
(retrieval will fail if the specified region or fact name does not exist.)
54 55 56 57 58 |
# File 'region_info/fact.rb', line 54 def self.require_fact(region, name) Jsii::Type.check_type(region, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "region") Jsii::Type.check_type(name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") Jsii::Kernel.instance.call_static("aws-cdk-lib.region_info.Fact", "requireFact", [region, name]) end |
.unregister(region, name, value = nil) ⇒ void
This method returns an undefined value.
Removes a fact from the database.
66 67 68 69 70 71 |
# File 'region_info/fact.rb', line 66 def self.unregister(region, name, value = nil) Jsii::Type.check_type(region, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "region") Jsii::Type.check_type(name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "value") unless value.nil? Jsii::Kernel.instance.call_static("aws-cdk-lib.region_info.Fact", "unregister", [region, name, value]) end |