All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awscdk.regioninfo.Fact Maven / Gradle / Ivy

There is a newer version: 2.167.2
Show newest version
package software.amazon.awscdk.regioninfo;

/**
 * A database of regional information.
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-09-24T10:56:41.808Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.regioninfo.$Module.class, fqn = "@aws-cdk/region-info.Fact")
public class Fact extends software.amazon.jsii.JsiiObject {

    protected Fact(final software.amazon.jsii.JsiiObjectRef objRef) {
        super(objRef);
    }

    protected Fact(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
        super(initializationMode);
    }

    /**
     * Return all pairs of (region, factName) that are defined.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    public static @org.jetbrains.annotations.NotNull java.util.List> definedFacts() {
        return java.util.Collections.unmodifiableList(software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.awscdk.regioninfo.Fact.class, "definedFacts", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)))));
    }

    /**
     * Retrieves a fact from this Fact database.
     * 

* @return the fact value if it is known, and undefined otherwise. * @param region the name of the region (e.g: us-east-1). This parameter is required. * @param name the name of the fact being looked up (see the FactName class for details). This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.Nullable java.lang.String find(final @org.jetbrains.annotations.NotNull java.lang.String region, final @org.jetbrains.annotations.NotNull java.lang.String name) { return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.awscdk.regioninfo.Fact.class, "find", software.amazon.jsii.NativeType.forClass(java.lang.String.class), new Object[] { java.util.Objects.requireNonNull(region, "region is required"), java.util.Objects.requireNonNull(name, "name is required") }); } /** * Registers a new fact in this Fact database. *

* @param fact the new fact to be registered. This parameter is required. * @param allowReplacing whether new facts can replace existing facts or not. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static void register(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.regioninfo.IFact fact, final @org.jetbrains.annotations.Nullable java.lang.Boolean allowReplacing) { software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.awscdk.regioninfo.Fact.class, "register", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(fact, "fact is required"), allowReplacing }); } /** * Registers a new fact in this Fact database. *

* @param fact the new fact to be registered. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static void register(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.regioninfo.IFact fact) { software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.awscdk.regioninfo.Fact.class, "register", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(fact, "fact is required") }); } /** * Retrieve a fact from the Fact database. *

* (retrieval will fail if the specified region or * fact name does not exist.) *

* @param region the name of the region (e.g: us-east-1). This parameter is required. * @param name the name of the fact being looked up (see the FactName class for details). This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.NotNull java.lang.String requireFact(final @org.jetbrains.annotations.NotNull java.lang.String region, final @org.jetbrains.annotations.NotNull java.lang.String name) { return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.awscdk.regioninfo.Fact.class, "requireFact", software.amazon.jsii.NativeType.forClass(java.lang.String.class), new Object[] { java.util.Objects.requireNonNull(region, "region is required"), java.util.Objects.requireNonNull(name, "name is required") }); } /** * Removes a fact from the database. *

* @param region the region for which the fact is to be removed. This parameter is required. * @param name the name of the fact to remove. This parameter is required. * @param value the value that should be removed (removal will fail if the value is specified, but does not match the current stored value). */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static void unregister(final @org.jetbrains.annotations.NotNull java.lang.String region, final @org.jetbrains.annotations.NotNull java.lang.String name, final @org.jetbrains.annotations.Nullable java.lang.String value) { software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.awscdk.regioninfo.Fact.class, "unregister", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(region, "region is required"), java.util.Objects.requireNonNull(name, "name is required"), value }); } /** * Removes a fact from the database. *

* @param region the region for which the fact is to be removed. This parameter is required. * @param name the name of the fact to remove. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static void unregister(final @org.jetbrains.annotations.NotNull java.lang.String region, final @org.jetbrains.annotations.NotNull java.lang.String name) { software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.awscdk.regioninfo.Fact.class, "unregister", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(region, "region is required"), java.util.Objects.requireNonNull(name, "name is required") }); } /** * Returns the list of names of registered facts. *

* All facts will be present in at least one region. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.NotNull java.util.List getNames() { return java.util.Collections.unmodifiableList(software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.awscdk.regioninfo.Fact.class, "names", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)))); } /** * @return 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. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.NotNull java.util.List getRegions() { return java.util.Collections.unmodifiableList(software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.awscdk.regioninfo.Fact.class, "regions", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)))); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy