UNPKG

1.41 kBTypeScriptView Raw
1import { Construct } from 'constructs';
2import { CfnRefElement } from './cfn-element';
3declare type Mapping = {
4 [k1: string]: {
5 [k2: string]: any;
6 };
7};
8export interface CfnMappingProps {
9 /**
10 * Mapping of key to a set of corresponding set of named values.
11 * The key identifies a map of name-value pairs and must be unique within the mapping.
12 *
13 * For example, if you want to set values based on a region, you can create a mapping
14 * that uses the region name as a key and contains the values you want to specify for
15 * each specific region.
16 *
17 * @default - No mapping.
18 */
19 readonly mapping?: Mapping;
20 readonly lazy?: boolean;
21}
22/**
23 * Represents a CloudFormation mapping.
24 */
25export declare class CfnMapping extends CfnRefElement {
26 private mapping;
27 private readonly lazy?;
28 private lazyRender;
29 private lazyInformed;
30 constructor(scope: Construct, id: string, props?: CfnMappingProps);
31 /**
32 * Sets a value in the map based on the two keys.
33 */
34 setValue(key1: string, key2: string, value: any): void;
35 /**
36 * @returns A reference to a value in the map based on the two keys.
37 */
38 findInMap(key1: string, key2: string): string;
39 /**
40 * @internal
41 */
42 _toCloudFormation(): object;
43 private informLazyUse;
44 private validateMapping;
45 private validateAlphanumeric;
46}
47export {};