- 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
Show all
Copied.
inputs
To enable a template to be more commonly used, do not set all parameter values of the elements to fixed values. For example, it is advised to set the image ID of a VM as an input of a template. In this case, you can select different images every time you use the template to create a stack.
The inputs section is optional and defines the inputs of a stack created based on a template. A maximum of 60 input parameters can be defined in a template. Each input parameter must have a unique name so that the value can be obtained by using the get_input built-in function. If an input parameter is defined repeatedly, the latest definition will overwrite the previous one.
Function scope: node_templates and outputs sections. That is, input parameters can be transferred in the properties of node_templates and values of outputs.
Format of the inputs section:
<Input parameter name>: type: <Type> default: <Default value> constraints: <Constraints> description: <Description> label: <Label> invisible: <Whether command outputs are visible>
In addition to the reusability of a template, methods of restricting and verifying user inputs also need to be considered during template input design. Template designers must understand parameter statements.
Property |
Mandatory |
Type |
Value Constraint |
Description |
---|---|---|---|---|
Input parameter name |
Yes |
String |
The value must be 1 to 20 characters long. Only lowercase letters, digits, and hyphens (-) are allowed. |
A maximum of 60 input parameter names can be defined and each name must be unique. |
type |
Yes |
|
When the type is set to password, no output is visible. Currently, only the passwords entered at the system level can be decrypted. If a common parameter is defined as a password, encrypted information may be obtained and such information fails to be decrypted. |
Parameter type. |
description |
No |
String |
The value must be 0 to 255 characters long. |
Parameter description information. |
default |
No |
String |
When creating a stack, you can enter a value to replace the default value. If no default value is set, you must enter the value of this parameter.
NOTICE:
The default value type must be the same as the defined parameter type. If they are inconsistent, the parser may perform automatic conversion, resulting in an unexpected result. |
Default parameter value. |
label |
No |
String |
The value is a string of 0 to 64 characters. |
Label of a parameter. The label defined here can be displayed by category during stack creation. |
constraints |
No |
String |
There are several constraints. You can define only one rule for each condition of an input parameter. If any of the constraints is not met, the parameter is considered invalid.
|
Parameter constraints, which are used to restrict the valid value range of an input parameter. |
invisible |
No |
- |
When invisible of an input parameter is set to true, ****** is displayed. |
Whether the output is visible. |
Example configuration of inputs:
tosca_definitions_version: cloud_tosca_version_1_0 inputs: # defines the variables of a stack created based on a template. instance: description: number of ECSs to be created default: 1 image: description: ID of the image used by the ECS type: Cloud.ECS.Image.Id vpc: description: ID of the VPC to which the ECS belongs subnet: description: ID of the subnet to which the ECS belongs
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