Class CfnMapping

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

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:29:54.861Z") @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");
 
  • 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)
      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.
    • 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.