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

    Constructors
    Modifier
    Constructor
    Description
    protected
    Fact(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    Fact(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static List<List<String>>
    Return all pairs of (region, factName) that are defined.
    static String
    find(String region, String name)
    Retrieves a fact from this Fact database.
    static List<String>
    Returns the list of names of registered facts.
    static List<String>
     
    static void
    Registers a new fact in this Fact database.
    static void
    register(IFact fact, Boolean allowReplacing)
    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

      @Stability(Stable) @NotNull public static List<List<String>> 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 the FactName 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

      @Stability(Stable) public static void register(@NotNull IFact fact)
      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 the FactName 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

      @Stability(Stable) public static void unregister(@NotNull String region, @NotNull String name)
      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

      @Stability(Stable) @NotNull public static List<String> getNames()
      Returns the list of names of registered facts.

      All facts will be present in at least one region.

    • getRegions

      @Stability(Stable) @NotNull public static List<String> 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.