CFModel
¶
CFModel
¶
Template that describes AWS infrastructure.
Properties:
- AWSTemplateFormatVersion
- Conditions: Conditions that control behaviour of the template.
- Description: Description for the template.
- Mappings: A 3 level mapping of keys and associated values.
- Metadata: Additional information about the template.
- Outputs: Output values of the template.
- Parameters: Parameters to the template.
- Resources: Stack resources and their properties.
- Rules
- Transform: For serverless applications, specifies the version of the AWS Serverless Application Model (AWS SAM) to use.
More info at AWS Docs
resolve(self, extra_params=None)
¶
Resolve all intrinsic functions on the template.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
extra_params |
|
Values of parameters passed to the Cloudformation. |
None |
Returns:
Type | Description |
---|---|
CFModel |
A new CFModel. |
Source code in pycfmodel/model/cf_model.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
|
resources_filtered_by_type(self, allowed_types)
¶
Filtered resources based on types.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
allowed_types |
Collection[Union[str, Type[pycfmodel.model.resources.resource.Resource]]] |
Collection of desired types. |
required |
Returns:
Type | Description |
---|---|
Dict[str, Dict[str, pycfmodel.model.resources.resource.Resource]] |
Dictionary where key is the logical id and value is the resource. |
Source code in pycfmodel/model/cf_model.py
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
|
¶
Parameter
¶
CloudFormation Parameter object representation
get_ref_value(self, provided_value=None)
¶
Calculates the parameter value to be used in the template.
- If
NoEcho
property is set, it uses a constant value. - If it is a list of numbers or a comma delimited list, returns the string version of each element in a list.
- Returns None if
provided_value
andDefault
areNone
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
provided_value |
|
Value injected in the template |
None |
Returns:
Type | Description |
---|---|
Optional[str] |
The computed value. |
Source code in pycfmodel/model/parameter.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
|