CfnMappingProps

class aws_cdk.core.CfnMappingProps(*, lazy=None, mapping=None)

Bases: object

Parameters:
  • lazy (Optional[bool]) –

  • mapping (Optional[Mapping[str, Mapping[str, Any]]]) – Mapping of key to a set of corresponding set of named values. The key identifies a map of name-value pairs and must be unique within the mapping. For example, if you want to set values based on a region, you can create a mapping that uses the region name as a key and contains the values you want to specify for each specific region. Default: - No mapping.

ExampleMetadata:

infused

Example:

region_table = CfnMapping(self, "RegionTable",
    mapping={
        "us-east-1": {
            "region_name": "US East (N. Virginia)"
        },
        "us-east-2": {
            "region_name": "US East (Ohio)"
        }
    }
)

region_table.find_in_map(Aws.REGION, "regionName")

Attributes

lazy
mapping

Mapping of key to a set of corresponding set of named values.

The key identifies a map of name-value pairs and must be unique within the mapping.

For example, if you want to set values based on a region, you can create a mapping that uses the region name as a key and contains the values you want to specify for each specific region.

Default:
  • No mapping.