Show / Hide Table of Contents

Class DeserializerSettingsBuilder

Builder class to construct an IDeserializerSettings for the template deserialization process.

Inheritance
Object
DeserializerSettingsBuilder
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: Firefly.CloudFormationParser.Serialization.Settings
Assembly: Firefly.CloudFormationParser.dll
Syntax
public class DeserializerSettingsBuilder

Methods

| Improve this Doc View Source

Build()

Builds the settings used by Deserialize(IDeserializerSettings).

Declaration
public IDeserializerSettings Build()
Returns
Type Description
IDeserializerSettings

A new implementation of IDeserializerSettings appropriate for the builder's configuration.

| Improve this Doc View Source

WithAWSAccountId(String)

Specifies the AWS account ID to be used when evaluating AWS::AccountId pseudo-parameter.

Declaration
public DeserializerSettingsBuilder WithAWSAccountId(string accountId)
Parameters
Type Name Description
String accountId

The 12 digit account identifier.

Returns
Type Description
DeserializerSettingsBuilder

This builder

| Improve this Doc View Source

WithAWSRegion(String)

Specifies the AWS region to be used when evaluating AWS::Region pseudo-parameter and Fn::GetAZs.

Declaration
public DeserializerSettingsBuilder WithAWSRegion(string region)
Parameters
Type Name Description
String region

Region to use. Default us-east-1

Returns
Type Description
DeserializerSettingsBuilder

This builder

| Improve this Doc View Source

WithCloudFormationStack(IAmazonCloudFormation, String)

Specifies an existing CloudFormation Stack from which to acquire the template.

Declaration
public DeserializerSettingsBuilder WithCloudFormationStack(IAmazonCloudFormation client, string stackId)
Parameters
Type Name Description
Amazon.CloudFormation.IAmazonCloudFormation client

A configured CloudFormation client that has access to the stack.

String stackId

The stack identifier - name or ARN.

Returns
Type Description
DeserializerSettingsBuilder

This builder

| Improve this Doc View Source

WithExcludeConditionalResources(Boolean)

Sets a value indicating whether to exclude resources and outputs nullified by the evaluation of conditions.

When this is true, the results of the evaluation of conditions in the Conditions block of the template using the values of the parameters as supplied by WithParameterValues(IDictionary<String, Object>) are used to eliminate any resource or output where its Condition property evaluates to false from the template object returned by the call to Deserialize(IDeserializerSettings)

Declaration
public DeserializerSettingsBuilder WithExcludeConditionalResources(bool excludeConditionalResources)
Parameters
Type Name Description
Boolean excludeConditionalResources

if set to true [exclude conditional resources].

Returns
Type Description
DeserializerSettingsBuilder

This builder

| Improve this Doc View Source

WithParameterValues(IDictionary<String, Object>)

Sets an optional dictionary of values to assign to parameters.

If left unset, then parameter defaults where present will be used in evaluations, or where there is no declared default value, the default for the type - empty string, zero for number etc.

Declaration
public DeserializerSettingsBuilder WithParameterValues(IDictionary<string, object> parameterValues)
Parameters
Type Name Description
IDictionary<String, Object> parameterValues

The parameter values.

Returns
Type Description
DeserializerSettingsBuilder

This builder

| Improve this Doc View Source

WithS3Client(IAmazonS3)

Specifies an S3 client to use where a template may reference objects in S3 such as nested stacks or includes.

This is unnecessary if reading a template directly from S3 using WithTemplateS3(IAmazonS3, String, String) or WithTemplateS3(IAmazonS3, Uri)

Declaration
public DeserializerSettingsBuilder WithS3Client(IAmazonS3 client)
Parameters
Type Name Description
Amazon.S3.IAmazonS3 client

The client.

Returns
Type Description
DeserializerSettingsBuilder

This builder

| Improve this Doc View Source

WithStackId(String)

Specifies the CloudFormation Stack ARN to be used when evaluating "AWS::StackId pseudo-parameter.

This is unnecessary if reading a stack directly using WithCloudFormationStack(IAmazonCloudFormation, String)

Declaration
public DeserializerSettingsBuilder WithStackId(string stackId)
Parameters
Type Name Description
String stackId

Name of the stack.

Returns
Type Description
DeserializerSettingsBuilder

This builder

| Improve this Doc View Source

WithStackName(String)

Specifies the CloudFormation Stack name to be used when evaluating "AWS::StackName pseudo-parameter.

This is unnecessary if reading a stack directly using WithCloudFormationStack(IAmazonCloudFormation, String)

Declaration
public DeserializerSettingsBuilder WithStackName(string stackName)
Parameters
Type Name Description
String stackName

Name of the stack.

Returns
Type Description
DeserializerSettingsBuilder

This builder

| Improve this Doc View Source

WithTemplateFile(String)

Specifies template content in a local file.

Declaration
public DeserializerSettingsBuilder WithTemplateFile(string path)
Parameters
Type Name Description
String path

The path to the file.

Returns
Type Description
DeserializerSettingsBuilder

This builder

| Improve this Doc View Source

WithTemplateS3(IAmazonS3, String, String)

Specifies template content as an S3 object.

Declaration
public DeserializerSettingsBuilder WithTemplateS3(IAmazonS3 client, string bucket, string key)
Parameters
Type Name Description
Amazon.S3.IAmazonS3 client

A configured S3 client that has access to the S3 object.

String bucket

The bucket.

String key

The key.

Returns
Type Description
DeserializerSettingsBuilder

This builder

| Improve this Doc View Source

WithTemplateS3(IAmazonS3, Uri)

Specifies template content as an S3 object.

Declaration
public DeserializerSettingsBuilder WithTemplateS3(IAmazonS3 client, Uri templateUri)
Parameters
Type Name Description
Amazon.S3.IAmazonS3 client

A configured S3 client that has access to the S3 object.

Uri templateUri

HTTP or S3 uri pointing to the template.

Returns
Type Description
DeserializerSettingsBuilder

This builder

| Improve this Doc View Source

WithTemplateStream(Stream)

Specifies template content read from an open stream.

Declaration
public DeserializerSettingsBuilder WithTemplateStream(Stream stream)
Parameters
Type Name Description
Stream stream

The stream form which to read the template.

Returns
Type Description
DeserializerSettingsBuilder

This builder

| Improve this Doc View Source

WithTemplateString(String)

Specifies template content as a YAML or JSON string

Declaration
public DeserializerSettingsBuilder WithTemplateString(string templateContent)
Parameters
Type Name Description
String templateContent

Content of the template.

Returns
Type Description
DeserializerSettingsBuilder

This builder

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