# CfnParameterProps

- Source: [`core/lib/cfn-parameter.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0/packages/aws-cdk-lib/core/lib/cfn-parameter.ts#L10)

## Example

```ts
const stack = new Stack();
const durToken = new CfnParameter(stack, 'MyParameter', {
  type: 'Number',
  default: 60,
});
new CustomResource(stack, 'MyCustomResource', {
  serviceToken: 'MyServiceToken',
  serviceTimeout: Duration.seconds(durToken.valueAsNumber),
});
```

## Properties

- `allowedPattern`: string = No constraints on patterns allowed for parameter. — A regular expression that represents the patterns to allow for String types.

  **Default:** No constraints on patterns allowed for parameter.

- `allowedValues`: string[] = No constraints on values allowed for parameter. — An array containing the list of values allowed for the parameter.

  **Default:** No constraints on values allowed for parameter.

- `constraintDescription`: string = No description with customized error message when user specifies invalid values. — A string that explains a constraint when the constraint is violated.

  For example, without a constraint description, a parameter that has an allowed
  pattern of [A-Za-z0-9]+ displays the following error message when the user specifies
  an invalid value:

  **Default:** No description with customized error message when user specifies invalid values.

- `default`: any = No default value for parameter. — A value of the appropriate type for the template to use if no value is specified when a stack is created.

  If you define constraints for the parameter, you must specify
  a value that adheres to those constraints.

- `description`: string = No description for the parameter. — A string of up to 4000 characters that describes the parameter.

  **Default:** No description for the parameter.

- `maxLength`: number = None. — An integer value that determines the largest number of characters you want to allow for String types.

- `maxValue`: number = None. — A numeric value that determines the largest numeric value you want to allow for Number types.

- `minLength`: number = None. — An integer value that determines the smallest number of characters you want to allow for String types.

- `minValue`: number = None. — A numeric value that determines the smallest numeric value you want to allow for Number types.

- `noEcho`: boolean = Parameter values are not masked. — Whether to mask the parameter value when anyone makes a call that describes the stack.

  If you set the value to ``true``, the parameter value is masked with asterisks (``*****``).

- `type`: string = String — The data type for the parameter (DataType).

## Used as props by

- [`CfnParameter`](/v2/docs/aws-cdk-lib.CfnParameter)
