- What's New
- Service Overview
- User Guide
- Template Reference
-
API Reference
- Before You Start
-
API
- Calling APIs
-
Stacks
- Listing Events of a Stack
- Obtaining Stack Metadata
- Listing Stacks
- Creating a Stack
- Obtaining a Stack Template
- Listing Stack Resources
- Listing Stack Outputs
- Continuing to Deploy a Stack
- Deploying a Stack
- Deleting a Stack
- Updating a Stack
- Deleting a Stack with Conditions
- Continuing to Roll Back a Stack
- Execution Plans
- Template Analysis
- Template Management
-
Stack Sets
- Listing Stack Sets
- Creating a Stack Set
- Obtaining a Stack Set Template
- Listing Stack Set Operations
- Obtaining Metadata of a Stack Set
- Listing Stack Instances
- Creating Stack Instances
- Deleting Stack Instance Deprecated
- Updating Stack Instances
- Deleting Stack Instances
- Deploying a Stack Set
- Deleting a Stack Set
- Updating a Stack Set
- Obtaining Metadata of a Stack Set Operation
- Obtaining a Stack Instance
- Customized Providers
- Resource Formation - Hook
- Resource Formation - Module Management
- Permissions and Supported Actions
- Appendix
- Change History
- FAQs
- Videos
-
More Documents
-
User Guide (ME-Abu Dhabi Region)
- Service Overview
- Getting Started
- Stack Management
- CTS
-
Template Reference
- Template Introduction
-
List of Elements
- Resource Indexes
- AOS.Stack
- CCE.Addon.AutoScaler
- CCE.Cluster
- CCE.HelmRelease
- CCE.NodePool
- CCE.Pod
- CCE.Storage.OBS
- CCE.Storage.SFS
- DCS.Redis
- ECS.CloudServer
- ECS.KeyPair
- NAT.Instance
- NAT.SNatRule
- OBS.Bucket
- RDS.MySQL
- SFS.FileSystem
- ULB.Healthmonitor
- ULB.Listener
- ULB.LoadBalancer
- ULB.Member
- ULB.Pool
- VPC.EIP
- VPC.SecurityGroup
- VPC.SecurityGroupRule
- VPC.Subnet
- VPC.VPC
-
Data Structure
- AOS.BatchItem
- Basic.KeyValuePair
- Basic.Label
- Basic.LabelSelector
- Basic.NameAndSecretValue
- Basic.NameKeyPair
- Basic.NameValuePair
- CCE.Addon.AutoScaler.Node
- CCE.DataVolume
- CCE.HelmChart
- CCE.Labels
- CCE.NodePool
- CCE.PublicIP
- DCS.InstanceBackupPolicy
- DCS.PeriodicalBackupPlan
- ECS.DataVolume
- ECS.EIP
- ECS.ExtendParam
- ECS.MountedVolumes
- ECS.NICS
- ECS.Personality
- ECS.PublicIP
- ECS.RootVolume
- ECS.SecurityGroup
- ECS.ServerTags
- ECS.VolumeExtendParam
- K8S.PodSecurityContext
- K8S.SecurityContext.SeLinuxOptions
- MySQL.DBUser
- MySQL.DataBase
- MySQL.DataStore
- RDS.BackupStrategy
- RDS.HA.Mysql
- RDS.Volume
- ULB.StickySession
- VPC.BandWidth
- VPC.PublicIP
- Appendix
- FAQs
- Change History
-
API Reference (ME-Abu Dhabi Region)
- Before You Start
- API Overview
- Calling APIs
-
API
- Creating a Template
- Querying a Template List
- Updating a Template
- Deleting a Template
- Downloading a Template
- Querying a Template
- Querying the Input Parameters of a Template
- Creating a Stack
- Deleting a Stack
- Executing a Stack Lifecycle
- Querying a Stack List
- Querying a Stack
- Querying a Stack Element List
- Querying a Stack Element
- Querying a Stack Output
- Querying Stack Input
- Querying the Execution Record of a Stack
- Querying a Stack Execution Record List
- Appendix
- Change History
-
API Reference (Kuala Lumpur Region)
- Before You Start
-
API
- Calling APIs
-
Stacks
- Listing Events of a Stack
- Obtaining Stack Metadata
- Listing Stacks
- Creating a Stack
- Obtaining a Stack Template
- Listing Stack Resources
- Listing Stack Outputs
- Continuing to Deploy a Stack
- Deploying a Stack
- Deleting a Stack
- Updating a Stack
- Deleting a Stack with Conditions
- Continuing to Roll Back a Stack
- Execution Plans
- Template Analysis
- Template Management
-
Stack Sets
- Listing Stack Sets
- Creating a Stack Set
- Obtaining a Stack Set Template
- Listing Stack Set Operations
- Obtaining Metadata of a Stack Set
- Listing Stack Instances
- Creating Stack Instances
- Deleting Stack Instance Deprecated
- Updating Stack Instances
- Deploying a Stack Set
- Deleting Stack Instances
- Deleting a Stack Set
- Updating a Stack Set
- Obtaining Metadata of a Stack Set Operation
- Obtaining a Stack Instance
- Appendix
- Change History
- User Guide (Kuala Lumpur Region)
-
User Guide (ME-Abu Dhabi Region)
- General Reference
Copied.
Templates (Cloud-Based Automation Scripts)
AOS templates are text files in YAML or JSON format. They describe the cloud objects that you want, including applications, resources, and services. AOS creates various cloud objects automatically from AOS templates.
Each automated process requires a descriptive language to control its execution flow. For example, a shell script (text file) describes how to automatically run commands. Similarly, an AOS template describes the process of creating and deleting cloud objects.
The following is an example execution logic of a shell script:
A shell script has the following features:
- A script is a text file.
- If a script is properly written, it can be reused.
An AOS template has the same execution logic as a shell script. The AOS service functions as the interpreter of AOS templates and executes actions according to templates. An AOS template can be considered as cloud automation standards.
A good shell script or function should have inputs, execution logic, and returned values. Likewise, a good template also should have inputs, orchestration, and outputs. A good template eases knowledge transfer and sharing.

Elements (Cloud Objects)
Cloud objects can be cloud resources, services, or applications. Cloud resources are the most common cloud objects. AOS treats cloud objects as elements. A template is a collection of elements.
- Cloud resources: including resources such as Elastic Cloud Server (ECS) and Virtual Private Cloud (VPC).
- Cloud services: including services such as Distributed Cache Service (DCS).
- Cloud applications: including applications such as containerized applications in Cloud Container Engine (CCE).
You need to set inputs to create any cloud object. After a cloud object is created, a result is displayed. The following figure uses an ECS (VM) as an example.

Inputs (Properties)
Inputs are requirements or parameters involved during the creation of a cloud object. The parameters required by a cloud object are determined by the characteristics of the object. Some objects require many parameters, for example, VMs. Some objects can be created with a few parameters or without parameters, for example, Object Storage Service (OBS) buckets. Some input parameters are complex and consist of multiple basic parameters, for example, network attributes of VMs.

The syntax is as follows:
Cloud object (element): description: description of the cloud object properties: # Parameters of the cloud object Property 1: # Parameter 1 Property 2: # Parameter 2 Property...: # Parameter...
Orchestration (Elements)
If elements are initialized just one by one according to the order in which they are arranged, no orchestration is required. AOS supports orchestration of elements with complex dependencies between them. The initialization (input) of an element depends on the result (output) of another element. Such a relationship can be specified by using an AOS template.
In an AOS template, you can specify the output of any element as the input of another element. The initialization process can be controlled freely, which is called orchestration. Only orchestration can meet various automation requirements.
An AOS template is the collection of objects that you want to orchestrate. To be more specific, an AOS template is a collection of objects that you want to control during the initialization process.

The relationship between elements is classified into two types: dependency and inclusion.
- Dependency: The input of an element depends on the output of another element. If element A depends on element B, element A can be created only after element B is successfully created.
- Inclusion: An element is a part of another element. If element A contains element B, element B can be created only after element A is successfully created.
Outputs (Return Values)
Outputs are the results returned after a cloud object is successfully created. The returned results of a cloud object are determined by the characteristics of the object. Some objects have many results, and some objects have few results.
The output of a cloud object is used in the following two scenarios. Generally, it is used together with the get_attribute built-in function.
- The output is used as an input of another cloud object.
- The output is used as the result of the entire stack.
The syntax is as follows:
# Result of another ECS. The service name is Service. value: {get_attribute: [ecs, Service, ports, 0, nodePort]}
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