Interface IResource
Interface describing a CloudFormation Resource.
Namespace: Firefly.CloudFormationParser
Assembly: Firefly.CloudFormationParser.dll
Syntax
public interface IResource : ITemplateObject
Properties
| Improve this Doc View SourceCondition
Gets or sets the resource's condition.
When present, associates this output with a condition defined in the Conditions
section of the template.
Declaration
string Condition { get; set; }
Property Value
Type | Description |
---|---|
String | The CloudFormation condition which will be |
CreationPolicy
Gets or sets the creation policy.
Declaration
Dictionary<string, object> CreationPolicy { get; set; }
Property Value
Type | Description |
---|---|
Dictionary<String, Object> | The creation policy. |
DeletionPolicy
Gets or sets the deletion policy.
Declaration
string DeletionPolicy { get; set; }
Property Value
Type | Description |
---|---|
String | The deletion policy. |
DependsOn
Gets or sets explicit dependencies on other resources in the template.
You should use the convenience property ExplicitDependencies to get the list of dependencies.
Declaration
object DependsOn { get; set; }
Property Value
Type | Description |
---|---|
Object | The dependencies which will be |
Description
Gets or sets the resource's description.
A string type that describes the output value. The value for the description declaration must be a literal string that's between 0 and 1024 bytes in length.
Declaration
object Description { get; set; }
Property Value
Type | Description |
---|---|
Object | The resource's description which will be |
ExplicitDependencies
Gets the explicit dependencies on other resources in the template.
Declaration
IEnumerable<string> ExplicitDependencies { get; }
Property Value
Type | Description |
---|---|
IEnumerable<String> | A list of explicit dependencies. |
IsSAMResource
Gets a value indicating whether this resource is a SAM declaration..
Declaration
bool IsSAMResource { get; }
Property Value
Type | Description |
---|---|
Boolean |
|
Metadata
Gets or sets the metadata.
You can use the optional Metadata section to include arbitrary JSON or YAML objects that provide details about the resource.
Often used with instances or launch templates to provide data for cfn-init
.
Declaration
Dictionary<string, object> Metadata { get; set; }
Property Value
Type | Description |
---|---|
Dictionary<String, Object> | The metadata. |
Properties
Gets or sets the resource properties.
Resource properties are additional options that you can specify for a resource. For example, for each EC2 instance, you must specify an Amazon Machine Image (AMI) ID for that instance.
Declaration
Dictionary<string, object> Properties { get; set; }
Property Value
Type | Description |
---|---|
Dictionary<String, Object> | The properties. |
Type
Gets or sets the resource type.
The resource type identifies the type of resource that you are declaring. For example, AWS::EC2::Instance declares an EC2 instance.
Declaration
string Type { get; set; }
Property Value
Type | Description |
---|---|
String | The type. |
UpdatePolicy
Gets or sets the update policy.
Declaration
Dictionary<string, object> UpdatePolicy { get; set; }
Property Value
Type | Description |
---|---|
Dictionary<String, Object> | The update policy. |
UpdateReplacePolicy
Gets or sets the update replace policy.
Declaration
string UpdateReplacePolicy { get; set; }
Property Value
Type | Description |
---|---|
String | The update replace policy. |
Version
Gets or sets the resource version.
Declaration
string Version { get; set; }
Property Value
Type | Description |
---|---|
String | The version. |
Remarks
This property is valid for custom resources.
Methods
| Improve this Doc View SourceGetResourcePropertyValue(String)
Gets a resource property value. See Property Manipulation in the documentation.
Declaration
object GetResourcePropertyValue(string propertyPath)
Parameters
Type | Name | Description |
---|---|---|
String | propertyPath | The property path. |
Returns
Type | Description |
---|---|
Object | The value of the property; else |
UpdateResourceProperty(String, Object)
Updates a property of this resource. See Property Manipulation in the documentation.
You would want to do this if you were implementing the functionality of aws cloudformation package
to rewrite local file paths to S3 object locations.
Declaration
void UpdateResourceProperty(string propertyPath, object newValue)
Parameters
Type | Name | Description |
---|---|---|
String | propertyPath | Path to the property you want to set within this resource's |
Object | newValue | The new value. |
Exceptions
Type | Condition |
---|---|
FormatException | Resource format is unknown (not JSON or YAML) |