Class CfnMapping

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-08T21:35:01.494Z") @Stability(Stable) public class CfnMapping extends CfnRefElement
Represents a CloudFormation mapping.

Example:

 CfnMapping regionTable = CfnMapping.Builder.create(this, "RegionTable")
         .mapping(Map.of(
                 "us-east-1", Map.of(
                         "regionName", "US East (N. Virginia)"),
                 "us-east-2", Map.of(
                         "regionName", "US East (Ohio)")))
         .build();
 regionTable.findInMap(Aws.REGION, "regionName");
 
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    A fluent builder for CfnMapping.

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode

    Nested classes/interfaces inherited from interface software.constructs.IConstruct

    software.constructs.IConstruct.Jsii$Default
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    CfnMapping(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    CfnMapping(software.amazon.jsii.JsiiObjectRef objRef)
     
     
    CfnMapping(software.constructs.Construct scope, String id)
     
     
    CfnMapping(software.constructs.Construct scope, String id, CfnMappingProps props)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    findInMap(String key1, String key2)
     
    findInMap(String key1, String key2, String defaultValue)
     
    void
    setValue(String key1, String key2, Object value)
    Sets a value in the map based on the two keys.

    Methods inherited from class software.amazon.awscdk.CfnRefElement

    getRef

    Methods inherited from class software.amazon.awscdk.CfnElement

    getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId

    Methods inherited from class software.constructs.Construct

    getNode, isConstruct, toString

    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, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Constructor Details

    • CfnMapping

      protected CfnMapping(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnMapping

      protected CfnMapping(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnMapping

      @Stability(Stable) public CfnMapping(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable CfnMappingProps props)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props -
    • CfnMapping

      @Stability(Stable) public CfnMapping(@NotNull software.constructs.Construct scope, @NotNull String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
  • Method Details

    • findInMap

      @Stability(Stable) @NotNull public String findInMap(@NotNull String key1, @NotNull String key2, @Nullable String defaultValue)
      Parameters:
      key1 - This parameter is required.
      key2 - This parameter is required.
      defaultValue -
      Returns:
      A reference to a value in the map based on the two keys. If mapping is lazy, the value from the map or default value is returned instead of the reference and the mapping is not rendered in the template.
    • findInMap

      @Stability(Stable) @NotNull public String findInMap(@NotNull String key1, @NotNull String key2)
      Parameters:
      key1 - This parameter is required.
      key2 - This parameter is required.
      Returns:
      A reference to a value in the map based on the two keys. If mapping is lazy, the value from the map or default value is returned instead of the reference and the mapping is not rendered in the template.
    • setValue

      @Stability(Stable) public void setValue(@NotNull String key1, @NotNull String key2, @NotNull Object value)
      Sets a value in the map based on the two keys.

      Parameters:
      key1 - This parameter is required.
      key2 - This parameter is required.
      value - This parameter is required.