Class Fact
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.regioninfo.Fact
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-11-15T10:25:08.927Z")
@Stability(Stable)
public class Fact
extends software.amazon.jsii.JsiiObject
A database of regional information.
Example:
public class MyFact implements IFact { public final Object region; public final Object name; public final Object value; } Fact.register(new MyFact());
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturn all pairs of (region, factName) that are defined.static String
Retrieves a fact from this Fact database.getNames()
Returns the list of names of registered facts.static void
Registers a new fact in this Fact database.static void
Registers a new fact in this Fact database.static String
requireFact
(String region, String name) Retrieve a fact from the Fact database.static void
unregister
(String region, String name) Removes a fact from the database.static void
unregister
(String region, String name, String value) Removes a fact from the database.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
Fact
protected Fact(software.amazon.jsii.JsiiObjectRef objRef) -
Fact
protected Fact(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
-
-
Method Details
-
definedFacts
Return all pairs of (region, factName) that are defined. -
find
@Stability(Stable) @Nullable public static String find(@NotNull String region, @NotNull String name) Retrieves a fact from this Fact database.- Parameters:
region
- the name of the region (e.g:us-east-1
). This parameter is required.name
- the name of the fact being looked up (see theFactName
class for details). This parameter is required.- Returns:
- the fact value if it is known, and
undefined
otherwise.
-
register
@Stability(Stable) public static void register(@NotNull IFact fact, @Nullable Boolean allowReplacing) Registers a new fact in this Fact database.- Parameters:
fact
- the new fact to be registered. This parameter is required.allowReplacing
- whether new facts can replace existing facts or not.
-
register
Registers a new fact in this Fact database.- Parameters:
fact
- the new fact to be registered. This parameter is required.
-
requireFact
@Stability(Stable) @NotNull public static String requireFact(@NotNull String region, @NotNull String name) Retrieve a fact from the Fact database.(retrieval will fail if the specified region or fact name does not exist.)
- Parameters:
region
- the name of the region (e.g:us-east-1
). This parameter is required.name
- the name of the fact being looked up (see theFactName
class for details). This parameter is required.
-
unregister
@Stability(Stable) public static void unregister(@NotNull String region, @NotNull String name, @Nullable String value) Removes a fact from the database.- Parameters:
region
- the region for which the fact is to be removed. This parameter is required.name
- the name of the fact to remove. This parameter is required.value
- the value that should be removed (removal will fail if the value is specified, but does not match the current stored value).
-
unregister
Removes a fact from the database.- Parameters:
region
- the region for which the fact is to be removed. This parameter is required.name
- the name of the fact to remove. This parameter is required.
-
getNames
Returns the list of names of registered facts.All facts will be present in at least one region.
-
getRegions
- Returns:
- the list of names of AWS Regions for which there is at least one registered fact. This includes Regions defined in AWS_REGIONS plus custom defined regions.
-