Resource Orchestration Service (ROS) allows you to use the elements of one-dimensional arrays, multidimensional arrays, and jsonSchema in templates to extend JSON data and enhance the verification logic of JSON data.
One-dimensional array
A one-dimensional array is a collection of elements of the same type. The elements in a one-dimensional array support all types of ROS template parameters.
Sample template
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
listParameter:
Type: Json
AssociationProperty: List[Parameter]
AssociationPropertyMetadata:
Parameter:
Type: String
Default:
- a
- b
- c
Sample GUI
When you use the sample template to create a stack or stack group in the ROS console, the elements in the one-dimensional array are rendered as parameters and values.
Multidimensional array
A multidimensional array is a collection of elements of different types. The elements in a multidimensional array support all types of ROS template parameters.
Sample template
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
listParameters:
Type: Json
AssociationProperty: List[Parameters]
AssociationPropertyMetadata:
Parameters:
p1:
Type: String
p2:
Type: Boolean
ListMetadata:
ShowHeader: true
ShowRemove: true
ShowAddition: true
Order:
- p2
- p1
Default:
- p1: p10
p2: true
- p1: p11
p2: false
Sample GUI
When you use the sample template to create a stack or stack group in the ROS console, the elements in the multidimensional array are rendered as parameters and values.
jsonSchema
jsonSchema is used to define and render the schema
of elements. The elements in jsonSchema support all types of ROS template parameters.
Sample template
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
jsonSchema:
Type: Json
AssociationPropertyMetadata:
Parameters:
a:
Type: String
Description: a from Json
Default: '123'
b:
Type: Boolean
Description: b from Json
Default: true
c:
Type: String
Description: c from Json
AssociationProperty: ALIYUN::ECS::VSwitch::VSwitchId
d:
Type: String
Description: d from Json
Default: d
Sample GUI
When you use the sample template to create a stack or stack group in the ROS console, the elements in jsonSchema are rendered as parameters and values.