Interface ICfnIncludeProps
Construction properties of {@link CfnInclude}.
Namespace: Amazon.CDK.CloudFormation.Include
Assembly: Amazon.CDK.CloudFormation.Include.dll
Syntax (csharp)
public interface ICfnIncludeProps
Syntax (vb)
Public Interface ICfnIncludeProps
Remarks
ExampleMetadata: infused
Examples
var parentTemplate = new CfnInclude(this, "ParentStack", new CfnIncludeProps {
TemplateFile = "path/to/my-parent-template.json",
LoadNestedStacks = new Dictionary<string, CfnIncludeProps> {
{ "ChildStack", new CfnIncludeProps {
TemplateFile = "path/to/my-nested-template.json"
} }
}
});
Synopsis
Properties
LoadNestedStacks | Specifies the template files that define nested stacks that should be included. |
Parameters | Specifies parameters to be replaced by the values in this mapping. |
PreserveLogicalIds | Whether the resources should have the same logical IDs in the resulting CDK template as they did in the original CloudFormation template file. |
TemplateFile | Path to the template file. |
Properties
LoadNestedStacks
Specifies the template files that define nested stacks that should be included.
virtual IDictionary<string, ICfnIncludeProps> LoadNestedStacks { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, ICfnIncludeProps>
Remarks
If your template specifies a stack that isn't included here, it won't be created as a NestedStack resource, and it won't be accessible from the {@link CfnInclude.getNestedStack} method (but will still be accessible from the {@link CfnInclude.getResource} method).
If you include a stack here with an ID that isn't in the template, or is in the template but is not a nested stack, template creation will fail and an error will be thrown.
Default: - no nested stacks will be included
Parameters
Specifies parameters to be replaced by the values in this mapping.
virtual IDictionary<string, object> Parameters { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Remarks
Any parameters in the template that aren't specified here will be left unmodified. If you include a parameter here with an ID that isn't in the template, template creation will fail and an error will be thrown.
Default: - no parameters will be replaced
PreserveLogicalIds
Whether the resources should have the same logical IDs in the resulting CDK template as they did in the original CloudFormation template file.
virtual Nullable<bool> PreserveLogicalIds { get; }
Property Value
System.Nullable<System.Boolean>
Remarks
If you're vending a Construct using an existing CloudFormation template,
make sure to pass this as false
.
Note: regardless of whether this option is true or false, the {@link CfnInclude.getResource} and related methods always uses the original logical ID of the resource/element, as specified in the template file.
Default: true
TemplateFile
Path to the template file.
string TemplateFile { get; }
Property Value
System.String
Remarks
Both JSON and YAML template formats are supported.