interface CfnMappingProps
Language | Type name |
---|---|
.NET | Amazon.CDK.CfnMappingProps |
Go | github.com/aws/aws-cdk-go/awscdk/v2#CfnMappingProps |
Java | software.amazon.awscdk.CfnMappingProps |
Python | aws_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)',
},
},
lazy: true,
});
regionTable.findInMap('us-east-2', 'regionName');
Properties
Name | Type | Description |
---|---|---|
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.