{"id":15286154,"url":"https://github.com/pplu/cfn-perl","last_synced_at":"2025-04-13T03:08:55.860Z","repository":{"id":52118260,"uuid":"170305729","full_name":"pplu/cfn-perl","owner":"pplu","description":"An object model for CloudFormation documents","archived":false,"fork":false,"pushed_at":"2021-05-07T09:14:30.000Z","size":9248,"stargazers_count":0,"open_issues_count":14,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-13T03:08:33.009Z","etag":null,"topics":["cfn","cloudformation","cloudformation-templates","cloudformation-utilities","cloudformation-yaml","perl"],"latest_commit_sha":null,"homepage":"","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pplu.png","metadata":{"files":{"readme":"README.md","changelog":"Changes","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-12T11:21:35.000Z","updated_at":"2021-05-07T09:14:32.000Z","dependencies_parsed_at":"2022-08-29T01:51:22.797Z","dependency_job_id":null,"html_url":"https://github.com/pplu/cfn-perl","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pplu%2Fcfn-perl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pplu%2Fcfn-perl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pplu%2Fcfn-perl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pplu%2Fcfn-perl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pplu","download_url":"https://codeload.github.com/pplu/cfn-perl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248657918,"owners_count":21140846,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cfn","cloudformation","cloudformation-templates","cloudformation-utilities","cloudformation-yaml","perl"],"created_at":"2024-09-30T15:10:47.091Z","updated_at":"2025-04-13T03:08:55.788Z","avatar_url":"https://github.com/pplu.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NAME\n\nCfn - An object model for CloudFormation documents\n\n# DESCRIPTION\n\nThis module helps parse, manipulate, validate and generate CloudFormation documents in JSON\nand YAML formats (see stability section for more information on YAML). It creates an object \nmodel of a CloudFormation template so you can work with the document as a set of objects. \nSee [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html) for\nmore information.\n\nIt provides full blown objects for all know CloudFormation resources. See \n[https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html) for a list\nof all resource types. These objects live in the `Cfn::Resource` namespace.\n\nThe module provides a set of objects representing each piece of CloudFormation. Following is a list of all\nobject types in the distribution:\n\n# Cfn object\n\nThe `Cfn` class is the \"root\" of a CloudFormation document. It represents an entire CloudFormation document.\nIt has attributes and methods to access the parts of a CloudFormation document.\n\n    use Cfn;\n    my $cfn = Cfn-\u003enew;\n    $cfn-\u003eaddResource('MyRes' =\u003e ...);\n    my $res = $cfn-\u003eResource('MyRes');\n\n## Constructors\n\n### new(Resources =\u003e { ... }, Outputs =\u003e { }, ...)\n\nThe default Moose constructor. You can initialize an empty document like this:\n\n    my $cfn = Cfn-\u003enew;\n    print $cfn-\u003eas_json;\n\n### from\\_hashref\n\nCloudFormation documents resemble Perl HashRefs (since they're just JSON datastructures).\nThis method converts a hashref that represents a CloudFormation document into a Cfn object.\n\n    use Data::Dumper;\n    my $cfn = Cfn-\u003efrom_hashref({ Resources =\u003e { R1 =\u003e { Type =\u003e '...', Properties =\u003e { ... } } } });\n    print Dumper($cfn-\u003eResource('R1');\n\n### from\\_json\n\nThis method creates a Cfn object from a JSON string that contains a CloudFormation document in JSON format\n\n### from\\_yaml\n\nThis method creates a Cfn object from a YAML string that contains a CloudFormation document in YAML format\n\n## Attributes\n\n### json\n\nWhen serializing to JSON with `as_json`, the encode method on this object is called passing the\ndocuments hashref representation. By default the JSON generated is \"ugly\", that is, all in one line,\nbut in canonical form (so a given serialization always has attributes in the same order).\n\nYou can specify your own JSON serializer to control how JSON is generated:\n\n    my $cfn = Cfn-\u003enew(json =\u003e JSON-\u003enew-\u003ecanonical-\u003epretty);\n    ...\n    print $cfn-\u003eas_json;\n\n### yaml\n\nHolds a configured `YAML::PP` parser for use when serializing and deserializing to and from YAML.\nMethods `load_string` and `dump_string` are called when needed from convert the object model\nto a YAML document, and to convert a YAML document to a datastructure that can later be coerced\ninto the object model.\n\n### cfn\\_options\n\nA `Cfn::Internal::Options` object instance that controls how the as\\_hashref method converts the Cfn object\nto a datastructure suitable for CloudFormation (only HashRefs, ArrayRefs and Scalars).\n\nYou can specify your own options as a hashref with the attributes to `Cfn::Internal::Options` in the\nconstructor.\n\n    my $cfn = Cfn-\u003enew(cfn_options =\u003e { custom_resource_rename =\u003e 1 });\n    ...\n    print Dumper($cfn-\u003eas_hashref);\n\nSee the `Cfn::Internal::Options` object for more details\n\n### AWSTemplateFormatVersion\n\nA string with the value of the AWSTemplateFormatVersion field of the CloudFormation document. Can be undef.\n\n### Description\n\nA string with the value of the Description field of the CloudFormation document. Can be undef.\n\n### Transform\n\nAn ArrayRef of Strings with the values of the Transform field of the CloudFormation document. Can be undef.\n\n### Parameters\n\nA HashRef of `Cfn::Parameter` objects. The keys are the name of the Parameters. \nThere are a set of convenience methods for accessing this attribute:\n\n    $cfn-\u003eParameter('ParamName') # returns a Cfn::Parameter or undef\n    $cfn-\u003eParameterList # returns a list of the parameters in the document\n    $cfn-\u003eParameterCount # returns the number of parameters in the document\n\n### Mappings\n\nA HashRef of `Cfn::Mapping` objects. The keys are the name of the Mappings. \nThere are a set of convenience methods for accessing this attribute:\n\n    $cfn-\u003eMapping('MappingName') # returns a Cfn::Parameter or undef\n    $cfn-\u003eMappingList # returns a list of the mappings in the document\n    $cfn-\u003eMappingCount # returns the number of mappings in the document\n\n### Conditions\n\nA HashRef of `Cfn::Condition` objects. The keys are the name of the Mappings. \nThere are a set of convenience methods for accessing this attribute:\n\n    $cfn-\u003eMapping('MappingName') # returns a Cfn::Mapping or undef\n    $cfn-\u003eMappingList # returns a list of the mappings in the document\n    $cfn-\u003eMappingCount # returns the number of mappings in the document\n\n### Resources\n\nA HashRef of `Cfn::Resource` objects. The keys are the name of the Resources. \nThere are a set of convenience methods for accessing this attribute:\n\n    $cfn-\u003eResource('ResourceName') # returns a Cfn::Resource or undef\n    $cfn-\u003eResourceList # returns a list of the resources in the document\n    $cfn-\u003eResourceCount # returns the number of resources in the document\n\n### Outputs\n\nA HashRef of `Cfn::Output` objects. The keys are the name of the Outputs. \nThere are a set of convenience methods for accessing this attribute:\n\n    $cfn-\u003eOutput('OutputName') # returns a Cfn::Output or undef\n    $cfn-\u003eOutputList # returns a list of the outputs in the document\n    $cfn-\u003eOutputCount # returns the number of outputs in the document\n\n### Metadata\n\nA HashRef of `Cfn::Value` or subclasses of `Cfn::Value`. Represents the \nMetadata key of the CloudFormation document.\n\nThere are a set of convenience methods for accessing this attribute:\n\n    $cfn-\u003eMetadata('MetadataName') # returns a Cfn::Metadata or undef\n    $cfn-\u003eMetadataList # returns a list of keys in the document Metadata\n    $cfn-\u003eMetadataCount # returns the number of keys in the document Metadata\n\n## Methods\n\n### as\\_hashref\n\nReturns a Perl HashRef representation of the CloudFormation document. This HashRef\nhas no objects in it. It is suitable for converting to JSON and passing to CloudFormation\n\n`as_hashref` triggers the serialization process of the document, which scans the whole\nobject model asking it's components to serialize (calling their `as_hashref`). Objects\ncan decide how they serialize to a hashref.\n\nWhen `$cfn-`as\\_hashref\u003e is invoked, all the dynamic values in the Cfn object will be \ncalled with the `$cfn` instance as the first parameter to their subroutine\n\n    $cfn-\u003eaddResource('R1', 'AWS::IAM::User', Path =\u003e Cfn::DynamicValue-\u003enew(Value =\u003e sub {\n      my $cfn = shift;\n      return $cfn-\u003eResourceCount + 41\n    }));\n    $cfn-\u003eas_hashref-\u003e{ Resources }-\u003e{ R1 }-\u003e{ Properties }-\u003e{ Path } # == 42\n\n### as\\_json\n\nReturns a JSON representation of the current instance\n\n### as\\_yaml\n\nReturns a YAML representation of the current instance\n\n### path\\_to($path)\n\nGiven a path in the format `'Resources.R1.Properties.PropName'` it will return the value\nstored in PropName of the resource R1. Use `'Resource.R1.Properties.ArrayProp.0'` to access\nArrays.\n\n### resolve\\_dynamicvalues\n\nReturns a new `Cfn` object with all `Cfn::DynamicValues` resolved.\n\n### ResourcesOfType($type)\n\nReturns a list of all the Resources of a given type.\n\n    foreach my $iam_user ($cfn-\u003eResourcesOfType('AWS::IAM::User')) {\n      ...\n    }\n\n### addParameter($name, $object)\n\nAdds an already instanced `Cfn::Parameter` object. Throws an exception if the parameter already exists.\n\n    $cfn-\u003eaddParameter('P1', Cfn::Parameter-\u003enew(Type =\u003e 'String', MaxLength =\u003e 5));\n\n### addParameter($name, $type, %properties)\n\nAdds a named parameter to the document with the specified type and properties. See `Cfn::Parameter` for available\nproperties. Throws an exception if the parameter already exists.\n\n    $cfn-\u003eaddParameter('P1', 'String', MaxLength =\u003e 5);\n\n### addMapping($name, $object\\_or\\_hashref);\n\nAdds a named mapping to the mappings of the document. The second parameter can be a `Cfn::Mapping` object or \na HashRef that will be coerced to a `Cfn::Mapping` object\n\n    $cfn-\u003eaddMapping('amis', { 'eu-west-1' =\u003e 'ami-12345678' });\n    $cfn-\u003eaddMapping('amis', Cfn::Mapping-\u003enew(Map =\u003e { 'eu-west-1' =\u003e 'ami-12345678' }));\n    # $cfn-\u003eMapping('amis') is a Cfn::Mapping object\n\n### addOutput($name, $object)\n\nAdds an already instanced `Cfn::Output` object. Throws an exception if the output already exists.\n\n    $cfn-\u003eaddParameter('O1', Cfn::Output-\u003enew(Value =\u003e { Ref =\u003e 'R1' });\n\n### addOutput($name, $output\\[, %output\\_attributes\\]);\n\nAdds a named output to the document. See `Cfn::Output` for available\noutput\\_attributes. Throws an exception if the output already exists.\n\n    $cfn-\u003eaddParameter('O1', { Ref =\u003e 'R1' });\n    $cfn-\u003eaddParameter('O1', { Ref =\u003e 'R1' }, Description =\u003e 'Bla bla');\n\n### addCondition($name, $value)\n\nAdds a named condition to the document. The value parameter should be\na HashRef that expresses a CloudFormation condition. See [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/conditions-section-structure.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/conditions-section-structure.html)\n\n### addResource($name, $object)\n\nAdds a named resource to the document. $object has to be an instance of a \nsubclass of `Cfn::Resource`. Throws an exception if a resource already\nexists with that name.\n\n### addResource($name, $type, %properties)\n\nAdds a named resource to the document, putting the specified properties in the \nresources properties. See subclasses of `Cfn::Resource` for more details.\n\n    $cfn-\u003eaddResource('R1', 'AWS::IAM::User');\n\n    $cfn-\u003eaddResource('R2', 'AWS::IAM::User', Path =\u003e '/');\n    # $cfn-\u003eResource('R2')-\u003eProperties-\u003ePath is '/'\n\nThrows an exception if a resource already exists with that name.\n\n### addResource($name, $name, $properties, $resource\\_attributes)\n\nAdds a named resource to the document. properties and resource\\_attributes\nare hashrefs.\n\n    $cfn-\u003eaddResource('R3', 'AWS::IAM::User', { Path =\u003e '/' });\n    # $cfn-\u003eResource('R3')-\u003eProperties-\u003ePath is '/'\n    $cfn-\u003eaddResource('R3', 'AWS::IAM::User', { Path =\u003e '/' }, { DependsOn =\u003e [ 'R2' ] });\n    # $cfn-\u003eResource('R3')-\u003eDependsOn-\u003e[0] is 'R2'\n\nThrows an exception if a resource already exists with that name.\n\n### addResourceMetadata($name, %metadata);\n\nAdds metadata to the Metadata attribute of a Resource.\n\n    $cfn-\u003eaddResourceMetadata('R1', MyMetadataKey1 =\u003e 'Value');\n    # $cfn-\u003eResource('R1')-\u003eMetadata-\u003e{ MyMedataKey1 } is 'Value'\n\n### addDependsOn($resource\\_name, $depends\\_on1, $depends\\_on2)\n\n    $cfn-\u003eaddDependsOn('R1', 'R2', 'R3');\n    # $cfn-\u003eResource('R1')-\u003eDependsOn is [ 'R2', 'R3' ]\n\n### addDeletionPolicy($resource\\_name)\n\n    Adds a DeletionPolicy to the resource. L\u003chttps://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html\u003e\n\n### addUpdatePolicy($resource\\_name)\n\n    Adds an UpdatePolicy to the resource. L\u003chttps://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html\u003e\n\n# Cfn::Value\n\nIs a base class for the attributes of Cloudformation values. In Cloudformation you can find that in\na resources attributes you can place functions, references, etc.\n\n    \"Attribute\": \"hello\"\n    \"Attribute\": { \"Ref\": \"R1\" }\n    \"Attribute\": { \"Fn::GetAtt\": [ \"R1\", \"InstanceId\" ] }\n\nAll value objects in the Cfn toolkit subclass `Cfn::Value` as a common ancestor. Once the object model is built,\nyou can find that a\n\n    $cfn-\u003eaddResource('R1', 'AWS::IAM::User', Path =\u003e '/');\n    # $cfn-\u003eResource('R1')-\u003eProperties-\u003ePath is a Cfn::Value::Primitive\n\n    $cfn-\u003eaddResource('R1', 'AWS::IAM::User', Path =\u003e { 'Fn::Join' =\u003e [ '/', { Ref =\u003e 'Param1' }, '/' ] });\n    # $cfn-\u003eResource('R1')-\u003eProperties-\u003ePath is a Cfn::Value::Function::Join\n\nAll `Cfn::Value` subclasses have to implement an `as_hashref` method that returns a HashRef suitable for \nconversion to JSON for CloudFormation. A attributes of objects that hold `Cfn::Value` subclasses should\nenable coercion of the attribute so that plain hashrefs can be coerced into the appropiate Cfn::Value objects\n\nHere is a Hierarchy of the different Cfn::Value descendant object:\n\n    Cfn::Value\n    |--Cfn::DynamicValue\n    |--Cfn::Value::Function\n    |  |--Cfn::Value::Function::Condition\n    |  |--Cfn::Value::Function::Ref\n    |     |--Cfn::Value::Function::PseudoParameter\n    |  |--Cfn::Value::Function::GetAtt\n    |--Cfn::Value::Array\n    |--Cfn::Value::Hash\n    |--Cfn::Value::Primitive\n    |  |--Cfn::Boolean\n    |  |--Cfn::Integer\n    |  |--Cfn::Long\n    |  |--Cfn::String\n    |  |--Cfn::Double\n    |  |--Cfn::Timestamp\n    |--Cfn::Value::TypedValue\n    \n\n## Cfn::DynamicValue\n\nThe `Value` attribute of this object is a CodeRef that get's called\nwhen as\\_hashref is called.\n\n    $cfn-\u003eaddResource('R1', 'AWS::IAM::User', Path =\u003e Cfn::DynamicValue-\u003enew(Value =\u003e sub { return 'Hello' });\n    $cfn-\u003epath_to('Resources.R1.Properties.Path') # isa Cfn::DynamicValue\n    $cfn-\u003epath_to('Resources.R1.Properties.Path')-\u003eas_hashref # eq 'Hello'\n\nWhen `$cfn-`as\\_hashref\u003e is invoked, all the dynamic values in the Cfn object will be \ncalled with the `$cfn` instance as the first parameter to their subroutine\n\n    $cfn-\u003eaddResource('R1', 'AWS::IAM::User', Path =\u003e Cfn::DynamicValue-\u003enew(Value =\u003e sub {\n      my $cfn = shift;\n      return $cfn-\u003eResourceCount + 41\n    }));\n    $cfn-\u003eas_hashref-\u003e{ Resources }-\u003e{ R1 }-\u003e{ Properties }-\u003e{ Path } # == 42\n\n## Cfn::Value::Function\n\nAll function statements derive from Cfn::Value::Function. \nThe name of the function can be found in the `Function` attribute\nIt's value can be found in the `Value` attribute\n\n## Cfn::Value::Function::Ref\n\nObject of this class represent a CloudFormation Ref. You can find the value \nof the reference in the `Value` attribute. Note that the Value attribute contains\nanother `Cfn::Value`. It derives from `Cfn::Value::Function`\n\n    $cfn-\u003eaddResource('R1', 'AWS::IAM::User', Path =\u003e { Ref =\u003e 'AWS::Region' });\n    $cfn-\u003epath_to('Resources.R1.Properties.Path') # isa Cfn::Value::Function::PseudoParameter\n\n## Cfn::Value::Function::PseudoParameter\n\nThis is a subclass of `Cfn::Value::Function::Ref` used to hold what CloudFormation\ncalls PseudoParameters.\n\n    $cfn-\u003eaddResource('R1', 'AWS::IAM::User', Path =\u003e { Ref =\u003e 'AWS::Region' });\n    $cfn-\u003epath_to('Resources.R1.Properties.Path') # isa Cfn::Value::Function::PseudoParam\n\n## Cfn::Value::Function::GetAtt\n\nThis class represents 'Fn::GetAtt' nodes in the object model. It's a subclass of `Cfn::Value::Function`.\n\n    $cfn-\u003eaddResource('R1', 'AWS::IAM::User', Path =\u003e { 'Fn::GetAtt' =\u003e [ 'R1', 'InstanceId' ] });\n    $cfn-\u003epath_to('Resources.R1.Properties.Path')             # isa Cfn::Value::Function::GetAtt\n    $cfn-\u003epath_to('Resources.R1.Properties.Path')-\u003eLogicalId  # eq 'R1'\n    $cfn-\u003epath_to('Resources.R1.Properties.Path')-\u003eProperty   # eq 'InstanceId'\n\n## Cfn::Value::Array\n\nThis class represents Arrays in the object model. It's `Value` property is an ArrayRef\nof `Cfn::Values` or `Cfn::Resource::Properties`.\n\nThere is also a subtype called `Cfn::Value::ArrayOfPrimitives` that restricts the values\nin the array to `Cfn::Value::Primitive` types.\n\n## Cfn::Value::Hash\n\nThis class represents JSON objects whose keys are not defined beforehand (arbitrary keys).\nIt's `Value` property is a HashRef of `Cfn::Value`s.\n\n## Cfn::Value::Primitive\n\nThis is a base class for any \"simple\" value (what the CloudFormation spec calls `PrimitiveType`).\nThis classes `Value` attribute has no type constraint, so it actually accepts anything. This class\nis supposed to only be inherited from, specializing the `Value` attribute to a specific type.\n\n## Cfn::Boolean\n\nUsed to store and validate CloudFormation `Boolean` values. Has a `stringy` attribute that controls if `as_hashref`\nreturns a string boolean `\"true\"` or `\"false\"` or a literal `true` or `false`, since these two\nboolean forms are accepted in CloudFormation.\n\n## Cfn::Integer\n\nUsed to store and validate CloudFormation `Integer` values.\n\n## Cfn::Long\n\nUsed to store and validate CloudFormation `Long` values.\n\n## Cfn::String\n\nUsed to store and validate CloudFormation `String` values.\n\n## Cfn::Double\n\nUsed to store and validate CloudFormation `Double` values.\n\n## Cfn::Timestamp\n\nUsed to store CloudFormation `Timestamp` values. Only validates that it's a string.\n\n## Cfn::Value::TypedValue\n\nUsed as a base class for structured properties of CloudFormation resources. The subclasses\nof TypedValue declare Moose attributes that are used to represent and validate that the\nproperties of a CloudFormation resource are well formed.\n\n# Cfn::Resource\n\nRepresents a CloudFormation Resource. All `Cfn::Resource::*` objects (like [Cfn::Resource::AWS::IAM::User](https://metacpan.org/pod/Cfn%3A%3AResource%3A%3AAWS%3A%3AIAM%3A%3AUser))\nuse `Cfn::Resource` as a base class.\n\n## Attributes for Cfn::Resource objects\n\nThe attributes for Cfn::Resource objects map to the attributes of CloudFormation Resources.\n\n    {\n      \"Type\": \"AWS::IAM::User\",\n      \"Properties\": { ... },\n      \"DependsOn\": \"R2\"\n      ...\n    }\n\n### Type\n\nHolds a string with the type of the resource.\n\n### Properties\n\nHolds a `Cfn::Value::Properties` subclass with the properties of the resource.\n\n### DeletionPolicy\n\nHolds the DeletionPolicy. Validates that the DeletionPolicy is valid\n\n### DependsOn\n\nCan hold either a single string or an arrayref of strings. This is because CloudFormation\nsupports `DependsOn` in these two forms. Method `DependsOnList` provides a uniform way\nof accessing the DependsOn attribute.\n\n### Condition\n\nCan hold a String identifying the Condition property of a resource\n\n### Metadata\n\nIs a `Cfn::Value::Hash` for the resources metadata\n\n### UpdatePolicy\n\nHolds the UpdatePolicy. Validates that the UpdatePolicy is valid\n\n### CreationPolicy\n\nHashRef with the CreationPolicy. Doesn't validate CreationPolicies.\n\n## Methods for Cfn::Resource objects\n\n### AttributeList\n\nReturns an ArrayRef of attributes that can be recalled in CloudFormation via `Fn::GetAtt`.\n\nCan also be retrieved as a class method `Cfn::Resource::...-`AttributeList\u003e\n\n### supported\\_regions\n\nReturns an ArrayRef of the AWS regions where the resource can be provisioned.\n\nCan also be retrieved as a class method `Cfn::Resource::...-`supported\\_regions\u003e\n\n### DependsOnList\n\nReturns a list of dependencies from the DependsOn attribute (it doesn't matter\nif the DependsOn attribute is a String or an ArrayRef of Strings.\n\n    my @deps = $cfn-\u003eResource('R1')-\u003eDependsOnList;\n\n### hasAttribute($attribute)\n\nReturns true if the specified attribute is in the `AttributeList`. Note that some resources\n(AWS::CloudFormation::CustomResource) can return true for values that are not in AttributeList\n\n### as\\_hashref\n\nLike `Cfn::Values`, as\\_hashref returns a HashRef representation of the object ready\nfor transforming to JSON.\n\n# Cfn::Resource::Properties\n\nA base class for the objects that the `Properties` attribute of `Cfn::Resource`s hold.\nSubclasses of `Cfn::Resource::Properties` are used to validate and represent the properties\nof resources inside the object model. See [Cfn::Resource::Properties::AWS::IAM::User](https://metacpan.org/pod/Cfn%3A%3AResource%3A%3AProperties%3A%3AAWS%3A%3AIAM%3A%3AUser) for \nan example.\n\nEach subclass of `Cfn::Resource::Properties` has to have attributes to hold the values of \nthe properties of the resource it represents.\n\n# Cfn::Parameter\n\nRepresents a Parameter in a CloudFormation document\n\n    my $cfn = Cfn-\u003enew;\n    $cfn-\u003eaddParameter('P1', 'String', Default =\u003e 5);\n    $cfn-\u003eParameter('P1')-\u003eDefault  # 5\n    $cfn-\u003eParameter('P1')-\u003eNoEcho   # undef\n\n## Cfn::Parameter Attributes\n\n### Type\n\nA string with the type of parameter. Validates that it's a CloudFormation supported parameter type.\n\n### Default\n\nHolds the default value for the parameter\n\n### NoEcho\n\nHolds the NoEcho property of the parameter\n\n### AllowedValues\n\nAn ArrayRef of the allowed values of the parameter\n\n### AllowedPattern\n\nA String holding the pattern that the value of this parameter can take\n\n### MaxLength, MinLength, MaxValue, MinValue\n\nValues holding the MaxLength, MinLength, MaxValue, MinValue of the parameter\n\n### Description\n\nA string description of the parameter\n\n### ConstraintDescription\n\nA string description of the constraint of the parameter\n\n# Cfn::Mapping\n\nThis object represents the value of the `Mappings` key in a CloudFormation\ndocument. It has a `Map` attribute to hold the Mappings in the CloudFormation\ndocument.\n\n# Cfn::Output\n\nRepresents an output object in a CloudFormation document\n\n## Attributes for Cfn::Output objects\n\n    \"Outputs\": {\n      \"Output1\": {\n        \"Value\": { \"Ref\": \"Instance\" }\n      }\n    }\n\n### Value\n\nHolds the Value key of an output. Is a `Cfn::Value`\n\n### Description\n\nHolds a String with the descrption of the output\n\n### Condition\n\nHolds a String with the condition of the output\n\n### Export\n\nHolds a HashRef with the export definition of the object\n\n## Methods for Cfn::Output objects\n\n### as\\_hashref\n\nReturns a HashRef representation of the output that is convertible to JSON\n\n# STABILITY\n\nYAML support is recent, and due to the still evolving YAML::PP module, may break \n(altough the tests are there to detect that). This distribution will try to keep up \nas hard as it can with latest YAML::PP developments.\n\n# SEE ALSO\n\n[https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html)\n\nThis module kind of resembles troposphere (python): [https://github.com/cloudtools/troposphere](https://github.com/cloudtools/troposphere).\n\n# CLI utils\n\nThis distribution includes a series of CLI utilities to help you with CloudFormation:\n\n## cfn\\_list\\_resources \\[STRING\\]\n\nLists all the resources supported by Cfn. If a string is specified, will filter the ones matching\nthe STRING.\n\n## cfn\\_region\\_matrix\n\nDisplays a table of what resource types are supported in each region\n\n## cfn\\_region\\_compatibility FILE\n\nTakes a cloudformation template and calculates in what regions it will be deployable\n\n## cfn\\_resource\\_properties RESOURCE\n\nOutputs information about a resource type: properties accessible via Fn::GetAtt, region availability\nand it's whole property structure.\n\n# AUTHOR\n\n    Jose Luis Martinez\n    CAPSiDE\n    jlmartinez@capside.com\n\n# Contributions\n\nThanks to Sergi Pruneda, Miquel Ruiz, Luis Alberto Gimenez, Eleatzar Colomer, Oriol Soriano, \nRoi Vazquez for years of work on this module.\n\nTINITA for helping make the YAML support possible. First for the YAML::PP module, which is the only\nPerl module to support sufficiently modern YAML features, and also for helping me in the use of\nYAML::PP.\n\n# BUGS and SOURCE\n\nThe source code is located here: [https://github.com/pplu/cfn-perl](https://github.com/pplu/cfn-perl)\n\nPlease report bugs to: [https://github.com/pplu/cfn-perl/issues](https://github.com/pplu/cfn-perl/issues)\n\n# COPYRIGHT and LICENSE\n\nCopyright (c) 2013 by CAPSiDE\nThis code is distributed under the Apache 2 License. The full text of the \nlicense can be found in the LICENSE file included with this module.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpplu%2Fcfn-perl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpplu%2Fcfn-perl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpplu%2Fcfn-perl/lists"}