Show / Hide Table of Contents

Class Parameter

Represents a template parameter

Inheritance
Object
Parameter
PseudoParameter
Implements
IParameter
ITemplateObject
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: Firefly.CloudFormationParser.TemplateObjects
Assembly: Firefly.CloudFormationParser.dll
Syntax
public class Parameter : IParameter, ITemplateObject

Properties

| Improve this Doc View Source

AllowedPattern

Gets the allowed pattern as a regular expression.

Declaration
[YamlIgnore]
public Regex AllowedPattern { get; }
Property Value
Type Description
Regex

The allowed pattern, or null if the parameter has no allowed pattern.

| Improve this Doc View Source

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 null if not defined in the template.

| Improve this Doc View Source

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 null if not defined in the template.

| Improve this Doc View Source

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 null if not defined in the template.

| Improve this Doc View Source

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 null if not set by passing a values dictionary to the deserializer.

| Improve this Doc View Source

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 null if not defined in the template.

| Improve this Doc View Source

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 null if not defined in the template.

| Improve this Doc View Source

HasMaxLength

Gets a value indicating whether this parameter has a maximum length.

Declaration
[YamlIgnore]
public bool HasMaxLength { get; }
Property Value
Type Description
Boolean

true if this parameter has a maximum length; otherwise, false.

| Improve this Doc View Source

HasMaxValue

Gets a value indicating whether this parameter has a maximum value.

Declaration
[YamlIgnore]
public bool HasMaxValue { get; }
Property Value
Type Description
Boolean

true if this parameter has a maximum value; otherwise, false.

| Improve this Doc View Source

HasMinLength

Gets a value indicating whether this parameter has a minimum length.

Declaration
[YamlIgnore]
public bool HasMinLength { get; }
Property Value
Type Description
Boolean

true if this parameter has a minimum length; otherwise, false.

| Improve this Doc View Source

HasMinValue

Gets a value indicating whether this parameter has a minimum value.

Declaration
[YamlIgnore]
public bool HasMinValue { get; }
Property Value
Type Description
Boolean

true if this parameter has a minimum value; otherwise, false.

| Improve this Doc View Source

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

true if this is an SSM-populated parameter; else false.

| Improve this Doc View Source

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 null if not defined in the template.

| Improve this Doc View Source

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 null if not defined in the template.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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 null if not defined in the template.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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 true, user interfaces should redact the parameter value when displaying.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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 Source

GetClrType()

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

| Improve this Doc View Source

GetCurrentValue()

Gets the current value of the parameter.

Declaration
public object GetCurrentValue()
Returns
Type Description
Object

Current value.

| Improve this Doc View Source

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
  • Parameter Name - cannot assign array value to Number type
  • Parameter Name - cannot assign value of type type to Number type
  • Parameter Name - cannot assign value of type type to Number type
  • Parameter Name - cannot assign value of type type to Number type
  • Parameter Name - cannot assign array value to String type
ArgumentException
  • Parameter Name - Value 'value' does not match allowed values: string.Join(", ", AllowedValues)
  • Parameter Name - Value 'value' does not match value constraint: MinValue <= x <= MaxValue
  • Parameter Name - Value 'stringVal' does not match pattern: AllowedPattern
  • Parameter Name - Value 'stringVal' does not match allowed values: AllowedValues

Implements

IParameter
ITemplateObject
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX