get_in_map
If a mapping table is defined in the template, you can use the get_in_map function to obtain the mapping table content from the node_templates and outputs sections.
Syntax
get_in_map: [map_name, top_level_key, second_level_key]
Parameter Description
Parameter |
Mandatory |
Description |
---|---|---|
map_name |
Yes |
Mapping name |
top_level_key |
Yes |
Mapping object name |
second_level_key |
Yes |
Mapping object property |
Return Value
Value of the corresponding field in the mapping table.
Examples
Obtaining the mapped content using the get_in_map function:
mappings: regionMap: ae-ad-1: flavor: c2.medium image_id: f2003c7b-99c4-4616-be19-334beaca81b1 node_templates: myecs: type: Cloud.ECS.CloudServer properties: availabilityZone: ae-ad-1a flavor: get_in_map: - regionMap - get_input: Cloud.Region - flavor imageId: get_in_map: - regionMap - get_input: Cloud.Region - image_id ...
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot