aws-cdk-lib.CfnMappingProps

interface CfnMappingProps

LanguageType name
.NETAmazon.CDK.CfnMappingProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2#CfnMappingProps
Javasoftware.amazon.awscdk.CfnMappingProps
Pythonaws_cdk.CfnMappingProps
TypeScript (source)aws-cdk-lib » CfnMappingProps

Example

const regionTable = new CfnMapping(this, 'RegionTable', {
  mapping: {
    'us-east-1': {
      regionName: 'US East (N. Virginia)',
      // ...
    },
    'us-east-2': {
      regionName: 'US East (Ohio)',
      // ...
    },
    // ...
  }
});

regionTable.findInMap(Aws.REGION, 'regionName')

Properties

NameTypeDescription
lazy?boolean
mapping?{ [string]: { [string]: any } }Mapping of key to a set of corresponding set of named values.

lazy?

Type: boolean (optional)


mapping?

Type: { [string]: { [string]: any } } (optional, default: No 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.