OOS implements the Operations as Code (Ops as Code) philosophy, where templates are how you write code. This guide defines the standards for writing OOS templates. These standards apply to all public templates that Alibaba Cloud provides.
Purpose
-
Make templates easy to read and understand.
-
Simplify ongoing template maintenance.
-
Enable sharing within your organization and establish uniform O&M standards.
Standards
-
Clearly state the purpose of every template. Describe the O&M operations it performs and the goals it achieves.
-
Use an uppercase prefix for all actions. Use camel case for the last section of the action name, such as ACS::ExecuteAPI or ACS::ECS::RunInstances.
-
Use consistent indentation. Indent with two spaces. Do not mix tabs and spaces.
-
Arrange properties in a logical order to improve readability. Use the action's syntax as a reference.
-
For a template, use the following field order: FormatVersion, Description, Parameters, RamRole, Tasks, Outputs.
-
For a task, use the following field order: Name, Action, Description, Properties, Loop, Outputs.
-
For the Properties of an ACS::ExecuteAPI action, use the following order: Service, API, Parameters.
-
-
In an ACS::ExecuteAPI action, use uppercase for the Service name, such as ECS or RDS.
-
Do not start JQ selectors, such as PropertySelector and ValueSelector, with a dot (.). The system is compatible with selectors that start with a dot, but the syntax is cleaner without it. Use camel case for parameter, task, and output names, such as InstanceId and CreateInstance.