Class Parameter
Represents a template parameter
Inherited Members
Namespace: Firefly.CloudFormationParser.TemplateObjects
Assembly: Firefly.CloudFormationParser.dll
Syntax
public class Parameter : IParameter, ITemplateObject
Properties
| Improve this Doc View SourceAllowedPattern
Gets the allowed pattern as a regular expression.
Declaration
[YamlIgnore]
public Regex AllowedPattern { get; }
Property Value
Type | Description |
---|---|
Regex | The allowed pattern, or |
AllowedPatternString
Gets or sets a regular expression that represents the patterns to allow for String types. The pattern must match the entire parameter value provided.
Use the convenience property AllowedPattern to access the pattern as a regular expression.
Declaration
[YamlMember(Order = 5, Alias = "AllowedPattern", ScalarStyle = ScalarStyle.SingleQuoted, DefaultValuesHandling = DefaultValuesHandling.OmitNull)]
public string AllowedPatternString { get; set; }
Property Value
Type | Description |
---|---|
String | The allowed pattern, which will be |
AllowedValues
Gets an array containing the list of values allowed for the parameter.
Declaration
[YamlMember(Order = 6, DefaultValuesHandling = DefaultValuesHandling.OmitEmptyCollections)]
public List<string> AllowedValues { get; set; }
Property Value
Type | Description |
---|---|
List<String> | The allowed values, which will be |
ConstraintDescription
Gets a string that explains a constraint when the constraint is violated..
Declaration
[YamlMember(Order = 3, DefaultValuesHandling = DefaultValuesHandling.OmitNull)]
public string ConstraintDescription { get; set; }
Property Value
Type | Description |
---|---|
String | The constraint description, which will be |
CurrentValue
Gets the current value of this parameter
This value may be set by passing a Dictionary<TKey,TValue> of string,object to ParameterValues method.
Declaration
[YamlIgnore]
public object CurrentValue { get; }
Property Value
Type | Description |
---|---|
Object | The current value, which will be |
Default
Gets 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.
Declaration
[YamlMember(Order = 2, DefaultValuesHandling = DefaultValuesHandling.OmitNull)]
public string Default { get; set; }
Property Value
Type | Description |
---|---|
String | The default value, which will be |
Description
Gets a string of up to 4000 characters that describes the parameter.
Declaration
[YamlMember(Order = 0, DefaultValuesHandling = DefaultValuesHandling.OmitNull)]
public string Description { get; set; }
Property Value
Type | Description |
---|---|
String | Description of the parameter, which will be |
HasMaxLength
Gets a value indicating whether this parameter has a maximum length.
Declaration
[YamlIgnore]
public bool HasMaxLength { get; }
Property Value
Type | Description |
---|---|
Boolean |
|
HasMaxValue
Gets a value indicating whether this parameter has a maximum value.
Declaration
[YamlIgnore]
public bool HasMaxValue { get; }
Property Value
Type | Description |
---|---|
Boolean |
|
HasMinLength
Gets a value indicating whether this parameter has a minimum length.
Declaration
[YamlIgnore]
public bool HasMinLength { get; }
Property Value
Type | Description |
---|---|
Boolean |
|
HasMinValue
Gets a value indicating whether this parameter has a minimum value.
Declaration
[YamlIgnore]
public bool HasMinValue { get; }
Property Value
Type | Description |
---|---|
Boolean |
|
IsSsmParameter
Gets a value indicating whether this parameter is populated from SSM Parameter Store
Declaration
[YamlIgnore]
public bool IsSsmParameter { get; }
Property Value
Type | Description |
---|---|
Boolean |
|
MaxLength
Gets an integer value that determines the largest number of characters you want to allow for String types.
Declaration
[YamlMember(Order = 8, DefaultValuesHandling = DefaultValuesHandling.OmitNull)]
public int? MaxLength { get; set; }
Property Value
Type | Description |
---|---|
Nullable<Int32> | The maximum length, which will be |
MaxValue
Gets a numeric value that determines the largest numeric value you want to allow for Number types.
Declaration
[YamlMember(Order = 10, DefaultValuesHandling = DefaultValuesHandling.OmitNull)]
public double? MaxValue { get; set; }
Property Value
Type | Description |
---|---|
Nullable<Double> | The maximum value, which will be |
MinLength
Gets an integer value that determines the smallest number of characters you want to allow for String types.
Declaration
[YamlMember(Order = 7, DefaultValuesHandling = DefaultValuesHandling.OmitNull)]
public int? MinLength { get; set; }
Property Value
Type | Description |
---|---|
Nullable<Int32> | The minimum length. |
MinValue
Gets a numeric value that determines the smallest numeric value you want to allow for Number types.
Declaration
[YamlMember(Order = 9, DefaultValuesHandling = DefaultValuesHandling.OmitNull)]
public double? MinValue { get; set; }
Property Value
Type | Description |
---|---|
Nullable<Double> | The minimum value, which will be |
Name
Gets or sets the name of the object
Names are set on these objects for convenience by the post-processing stage, as they are not part of the object definition as per CloudFormation. They are set as follows:
- Parameter - The parameter name
- Resource - The logical ID
- Output - The output name
Declaration
[YamlIgnore]
public string Name { get; set; }
Property Value
Type | Description |
---|---|
String | The name. |
NoEcho
Gets a value indicating whether to mask the parameter value to prevent it from being displayed in the console, command line tools, or API.
Declaration
[YamlMember(Order = 4, DefaultValuesHandling = DefaultValuesHandling.OmitDefaults)]
public bool NoEcho { get; set; }
Property Value
Type | Description |
---|---|
Boolean | If |
Template
Gets or sets the template which this object is contained in.
Declaration
[YamlIgnore]
public ITemplate Template { get; set; }
Property Value
Type | Description |
---|---|
ITemplate | The template. |
Type
Gets the data type for the parameter.
Declaration
[YamlMember(Order = 1)]
public string Type { get; set; }
Property Value
Type | Description |
---|---|
String | The AWS Parameter type. |
Methods
| Improve this Doc View SourceGetClrType()
Gets the CLR type for the parameter given the AWS type specified for it in the template.
Declaration
public Type GetClrType()
Returns
Type | Description |
---|---|
Type | CLR type |
GetCurrentValue()
Gets the current value of the parameter.
Declaration
public object GetCurrentValue()
Returns
Type | Description |
---|---|
Object | Current value. |
SetCurrentValue(IDictionary<String, Object>)
Sets the current value of this parameter to use in evaluations.
Declaration
public void SetCurrentValue(IDictionary<string, object> parameterValues)
Parameters
Type | Name | Description |
---|---|---|
IDictionary<String, Object> | parameterValues | The parameter values. |
Exceptions
Type | Condition |
---|---|
InvalidCastException |
|
ArgumentException |
|