Template
Overview
ZStack Cloud allows you to perform scenario-based encapsulations for global settings. You can configure a global setting as needed with just one click, which helps to improve the O&M efficiency.
The following three types of scenario-based encapsulation templates
are supported:
- Recommended configuration for production
- HA quick recovery
- VM performance optimization
Inventory
Global Configuration Template Inventory
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| uuid | The UUID. For more information, see Resource Property. | 3.6.0 | ||
| name | The name. For more information, see Resource Property. | 3.6.0 | ||
| description | The description. For more information, see Resource Property. | Yes | 3.6.0 | |
| type | The template type. | 3.6.0 | ||
| groupBy | Groups rows into subgroups based on values of columns or expressions. This field is equivalent to the Group By clause in MySQL, such as groupBy=type. | Yes | 3.6.0 | |
| userTags | The user tags. For more information, see CreateUserTag. | Yes | 3.6.0 | |
| systemTags | The system tags. For more information, see CreateSystemTag. | Yes | 3.6.0 |
Sample
{
"inventories": [
{
"uuid": "reservedCapacity",
"name": "scenes1",
"type": "System",
"description": "For scenes1"
}
]
}Template Configuration Inventory
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| category | The configuration type. | 3.6.0 | ||
| name | The name. For more information, see Resource Property. | 3.6.0 | ||
| defaultValue | The default value of the template. | 3.6.0 | ||
| templateUuid | The template UUID. | 3.6.0 | ||
| value | The template value. | 3.6.0 | ||
| groupBy | Groups rows into subgroups based on values of columns or expressions. This field is equivalent to the Group By clause in MySQL, such as groupBy=type. | Yes | 3.6.0 | |
| userTags | The user tags. For more information, see CreateUserTag. | Yes | 3.6.0 | |
| systemTags | The system tags. For more information, see CreateSystemTag. | Yes | 3.6.0 |
Sample
{
"inventories": [
{
"templateUuid": "0000111122223333",
"category": "backupStorage",
"name": "reservedCapacity",
"defaultValue": "1G",
"value": "2G"
}
]
}Operations
ApplyTemplateConfig
Uses a template setting. For
example,
ApplyTemplateConfig templateUuid=b86c9016b4f24953a9edefb53ca0678cParameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| templateUuid | The template UUID. | 3.6.0 | ||
| userTags | The user tags. For more information, see CreateUserTag. | Yes | 3.6.0 | |
| systemTags | The system tags. For more information, see CreateSystemTag. | Yes | 3.6.0 | |
| timeout | Yes |
QueryGlobalConfigTemplate
Queries all the template information. For
example,
QueryGlobalConfigTemplatePrimitive Fields of Query
QueryTemplateConfig
Queries a template setting. For example,
QueryTemplateConfigPrimitive Fields of Query
UpdateTemplateConfig
Updates a template setting. For
example,
UpdateTemplateConfig templateUuid=000011112222 category=vm name=emulateHyperV value=trueParameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| templateUuid | The template UUID. | 3.6.0 | ||
| category | The corresponding global setting category. | 3.6.0 | ||
| name | The corresponding global setting name. | 3.6.0 | ||
| value | The template value. | 3.6.0 | ||
| userTags | The user tags. For more information, see CreateUserTag. | Yes | 3.6.0 | |
| systemTags | The system tags. For more information, see CreateSystemTag. | Yes | 3.6.0 | |
| timeout | Yes |
ResetTemplateConfig
Resets a template setting. For
example,
ResetTemplateConfig templateUuid=b86c9016b4f24953a9edefb53ca0678cParameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| templateUuid | The template UUID. | 3.6.0 | ||
| userTags | The user tags. For more information, see CreateUserTag. | Yes | 3.6.0 | |
| systemTags | The system tags. For more information, see CreateSystemTag. | Yes | 3.6.0 | |
| timeout | Yes |
RevertTemplateConfig
Revert a template to the default setting. For
example,
RevertTemplateConfig templateUuid=fd5ae067a0b037d2af3a6ec060c4be86Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| templateUuid | The template UUID. | 4.6.21 | ||
| userTags | The user tags. For more information, see CreateUserTag. | Yes | 4.6.21 | |
| systemTags | The system tags. For more information, see CreateSystemTag. | Yes | 4.6.21 | |
| timeout | Yes |
Tags
You can create a user tag on a global setting by using CreateUserTag
resourceType=GlobalConfigVO. For
example,
CreateUserTag resourceType=GlobalConfigVO tag=Test1 \
resourceUuid=3fd25b9e5b87423bba5612a45c1f5ecc