In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces how to avoid the need to fill in a large number of configuration parameters every time you create an instance-create an instance startup template, which is very detailed and has a certain reference value. Interested friends must read it!
CreateLaunchTemplate
Create an instance startup template, referred to as the template. The instance startup template eliminates the need to fill in a large number of configuration parameters every time you create an instance.
Description
The instance launch template contains relevant configurations for creating instances, such as the region to which the instance belongs, image ID, instance specification, security group ID, public network bandwidth, and so on. If an instance configuration is not specified in the template, you need to specify that configuration for the instance when you create the instance. After you create a template (CreateLaunchTemplate), the initial version of the template is 1, and you can later create multiple template versions (CreateLaunchTemplateVersion) based on that version, with the version number increasing sequentially from 1. If you do not specify the template version number when you create the instance (RunInstances), the default version will be used.
When calling this interface, you need to be aware of:
You can create up to 30 instance launch templates in a region, and each template can have up to 30 versions.
Most of the parameters of the instance startup template are optional. When creating a template, we will not verify the existence and validity of the parameter values in the template. The validity of the parameter value is only verified when the instance is actually created.
If a configuration is set in the instance startup template, the configuration cannot be filtered when the instance (RunInstances) is created. For example, if the template sets the value of HostName in HostName=LocalHost,RunInstances to be empty, the hostname of the instance is still LocalHost. If you want to override the HostName=LocalHost configuration, you can take HostName=MyHost or other parameter values in RunInstances.
Request parameter
Return parameters
Example
Request example
Https://ecs.aliyuncs.com/?Action=CreateLaunchTemplate&RegionId=cn-hangzhou&LaunchTemplateName=lt-name1&InstanceType=ecs.cm4.6xlarge&SecurityGroupId=sg-securitygroupid&
Return the example
XML format
04F0F334-1335-436C-A1D7-6C044FExxxxx lt-m5eiaupmvm2op9dxxxxx
JSON format
{"RequestId": "04F0F334-1335-436C-A1D7-6C044FExxxxx", "LaunchTemplateId": "lt-m5eiaupmvm2op9dxxxxx"}
Error code
The following are the error codes specific to this API. For more error codes, please visit the API error Center.
The above is how to avoid the need to fill in a large number of configuration parameters every time you create an instance-- all the contents of the instance startup template. Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.