Show / Hide Table of Contents

Class Template

Represents an entire CloudFormation Template

Inheritance
Object
Template
Implements
ITemplate
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 Template : ITemplate

Properties

| Improve this Doc View Source

AWSTemplateFormatVersion

Gets or sets the AWS template format version.

The AWS CloudFormation template version that the template conforms to. The template format version isn't the same as the API or WSDL version. The template format version can change independently of the API and WSDL versions.

Declaration
[YamlMember(Order = 0)]
public string AWSTemplateFormatVersion { get; set; }
Property Value
Type Description
String

The AWS template format version.

| Improve this Doc View Source

Conditions

Gets or sets the conditions.

Conditions that control whether certain resources are created or whether certain resource properties are assigned a value during stack creation or update. For example, you could conditionally create a resource that depends on whether the stack is for a production or test environment.

Declaration
[YamlMember(Order = 6)]
public ConditionSection Conditions { get; set; }
Property Value
Type Description
ConditionSection

The conditions.

| Improve this Doc View Source

DependencyGraph

Gets a directed edge graph of dependencies between inputs, resources and outputs.

Declaration
[YamlIgnore]
public BidirectionalGraph<IVertex, TaggedEdge<IVertex, EdgeDetail>> DependencyGraph { get; }
Property Value
Type Description
QuikGraph.BidirectionalGraph<IVertex, QuikGraph.TaggedEdge<IVertex, EdgeDetail>>

The dependency graph.

| Improve this Doc View Source

Description

Gets or sets the template's description.

A text string that describes the template. This section must always follow the template format version section.

Declaration
[YamlMember(Order = 2)]
public string Description { get; set; }
Property Value
Type Description
String

The template's description which will be null if the template did not provide this property.

| Improve this Doc View Source

EvaluatedConditions

Gets the value of each condition where the dictionary key is the condition name, post evaluation.

Declaration
[YamlIgnore]
public Dictionary<string, bool> EvaluatedConditions { get; }
Property Value
Type Description
Dictionary<String, Boolean>

The evaluated conditions.

| Improve this Doc View Source

Globals

Gets or sets the globals.

Globals are unique to AWS SAM

Declaration
[YamlMember(Order = 8)]
public GlobalSection Globals { get; set; }
Property Value
Type Description
GlobalSection

The conditions.

| Improve this Doc View Source

IsSAMTemplate

Gets a value indicating whether this instance is a Serverless Application Model template.

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

true if this instance is a SAM template; otherwise, false.

| Improve this Doc View Source

Mappings

Gets or sets the mappings.

A mapping of keys and associated values that you can use to specify conditional parameter values, similar to a lookup table. You can match a key to a corresponding value by using the Fn::FindInMap intrinsic function in the Resources and Outputs sections.

Declaration
[YamlMember(Order = 7)]
public MappingSection Mappings { get; set; }
Property Value
Type Description
MappingSection

The mappings which will be null if the template did not provide this property.

| Improve this Doc View Source

Metadata

Gets or sets the metadata - objects that provide additional information about the template.

Declaration
[YamlMember(Order = 3)]
public MetadataSection Metadata { get; set; }
Property Value
Type Description
MetadataSection

The metadata.

| Improve this Doc View Source

Outputs

Gets the outputs.

Describes the values that are returned whenever you view your stack's properties. For example, you can declare an output for an S3 bucket name and then call the aws cloudformation describe-stacks AWS CLI command to view the name.

Declaration
[YamlIgnore]
public IEnumerable<IOutput> Outputs { get; }
Property Value
Type Description
IEnumerable<IOutput>

The outputs.

| Improve this Doc View Source

Parameters

Gets the parameters.

Values to pass to your template at runtime (when you create or update a stack). You can refer to parameters from the Resources and Outputs sections of the template.

Declaration
[YamlIgnore]
public IEnumerable<IParameter> Parameters { get; }
Property Value
Type Description
IEnumerable<IParameter>

The parameters.

| Improve this Doc View Source

ParsedOutputs

Gets or sets the parsed outputs.

Use the convenience property Outputs to access the outputs.

Declaration
[YamlMember(Alias = "Outputs", Order = 10)]
public OutputSection ParsedOutputs { get; set; }
Property Value
Type Description
OutputSection

The parsed outputs.

| Improve this Doc View Source

ParsedParameters

Gets or sets the parsed parameters.

Use the convenience property Parameters to access the parameters.

Declaration
[YamlMember(Alias = "Parameters", Order = 4)]
public ParameterSection ParsedParameters { get; set; }
Property Value
Type Description
ParameterSection

The parsed parameters.

| Improve this Doc View Source

ParsedResources

Gets or sets the parsed resources.

Use the convenience property Resources to access the resources.

Declaration
[YamlMember(Alias = "Resources", Order = 9)]
public ResourceSection ParsedResources { get; set; }
Property Value
Type Description
ResourceSection

The parsed resources.

Remarks

Not null as templates must have resources.

| Improve this Doc View Source

PseudoParameters

Gets any pseudo parameters discovered during template deserialization.

Declaration
[YamlIgnore]
public List<IParameter> PseudoParameters { get; }
Property Value
Type Description
List<IParameter>

The pseudo parameters.

| Improve this Doc View Source

Resources

Gets the resources.

Specifies the stack resources and their properties, such as an Amazon Elastic Compute Cloud instance or an Amazon Simple Storage Service bucket. You can refer to resources in the Resources and Outputs sections of the template.

Declaration
[YamlIgnore]
public IEnumerable<IResource> Resources { get; }
Property Value
Type Description
IEnumerable<IResource>

The resources.

| Improve this Doc View Source

Rules

Gets or sets the rules.

Validates a parameter or a combination of parameters passed to a template during a stack creation or stack update.

Declaration
[YamlMember(Order = 5)]
public RuleSection Rules { get; set; }
Property Value
Type Description
RuleSection

The rules.

| Improve this Doc View Source

Transform

Gets or sets the transformations.

For serverless applications (also referred to as Lambda-based applications), specifies the version of the AWS Serverless Application Model (AWS SAM) to use. When you specify a transform, you can use AWS SAM syntax to declare resources in your template. The model defines the syntax that you can use and how it's processed.

You can also use AWS::Include transforms to work with template snippets that are stored separately from the main AWS CloudFormation template. You can store your snippet files in an Amazon S3 bucket and then reuse the functions across multiple templates.

Declaration
[YamlMember(Order = 1)]
public object Transform { get; set; }
Property Value
Type Description
Object

The transformations which will be null if the template did not provide this property.

| Improve this Doc View Source

UserParameterValues

Gets any values for parameters set up from IDeserializerSettings

Declaration
[YamlIgnore]
public IDictionary<string, object> UserParameterValues { get; }
Property Value
Type Description
IDictionary<String, Object>

The parameter values.

Methods

| Improve this Doc View Source

Deserialize(IDeserializerSettings)

Deserializes a YAML or JSON template.

Declaration
public static async Task<ITemplate> Deserialize(IDeserializerSettings settings)
Parameters
Type Name Description
IDeserializerSettings settings

A IDeserializerSettings implementation defining what to deserialize and how.

Returns
Type Description
Task<ITemplate>

Deserialized template.

Exceptions
Type Condition
ArgumentException

Content property cannot be null - settings

| Improve this Doc View Source

Serialize(ITemplate)

Serializes a template to YAML.

Declaration
public static string Serialize(ITemplate template)
Parameters
Type Name Description
ITemplate template

The template to serialize.

Returns
Type Description
String

YAML string.

Implements

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