Consulte les informations sur les versions des modèles de lancement des instances ECS, telles que le nombre total de modèles de lancement, les noms des modèles et les numéros de version des modèles.
Testez maintenant
Testez cette API dans OpenAPI Explorer, sans signature manuelle. Les appels réussis génèrent automatiquement du code SDK correspondant à vos paramètres. Téléchargez-le avec une sécurité intégrée des identifiants pour une utilisation locale. Testez cette API dans OpenAPI Explorer, sans signature manuelle. Les appels réussis génèrent automatiquement du code SDK correspondant à vos paramètres. Téléchargez-le avec une sécurité intégrée des identifiants pour une utilisation locale.
Test
Autorisation RAM
|
ecs:DescribeLaunchTemplateVersions |
list |
LaunchTemplate
LaunchTemplate
|
Aucune | Aucune |
Paramètres de requête
|
Paramètre |
Type |
Requis |
Description |
Exemple |
| RegionId |
string |
Oui |
L'identifiant de la région du modèle de lancement. Vous pouvez appeler DescribeRegions pour obtenir la liste la plus récente des régions. |
cn-hangzhou |
| LaunchTemplateVersion |
array |
Non |
Un ou plusieurs numéros de version du modèle de lancement. |
1 |
|
integer |
Non |
Un ou plusieurs numéros de version du modèle de lancement. |
1 |
|
| LaunchTemplateId |
string |
Non |
L'identifiant du modèle de lancement. Vous devez spécifier LaunchTemplateId ou LaunchTemplateName pour déterminer le modèle. |
lt-bp168lnahrdwl39p**** |
| LaunchTemplateName |
string |
Non |
Le nom du modèle de lancement. Vous devez spécifier LaunchTemplateId ou LaunchTemplateName pour déterminer le modèle. |
testLaunchTemplateName |
| MinVersion |
integer |
Non |
Le numéro de version minimum utilisé pour filtrer les résultats de la requête. Utilisé conjointement avec MaxVersion pour consulter les informations de version dans la plage comprise entre les numéros de version minimum et maximum. |
1 |
| MaxVersion |
integer |
Non |
Le numéro de version maximum utilisé pour filtrer les résultats de la requête. Utilisé conjointement avec MinVersion pour consulter les informations de version dans la plage comprise entre les numéros de version minimum et maximum. |
10 |
| DefaultVersion |
boolean |
Non |
Indique si la version par défaut doit être consultée. |
true |
| DetailFlag |
boolean |
Non |
Indique si les informations de configuration détaillées du modèle doivent être interrogées. Valeurs valides :
Valeur par défaut : true. |
true |
| PageNumber |
integer |
Non |
Le numéro de page de la liste des modèles de lancement. Valeur minimale : 1. Valeur par défaut : 1. |
1 |
| PageSize |
integer |
Non |
Le nombre d'entrées par page dans une requête paginée. Définissez ce paramètre pour la pagination. Valeur par défaut : 10. |
10 |
Éléments de réponse
|
Élément |
Type |
Description |
Exemple |
|
object |
La collection d'informations de version. |
||
| PageSize |
integer |
Le nombre d'entrées par page dans une requête paginée. Définissez ce paramètre pour la pagination. |
10 |
| RequestId |
string |
L'identifiant de la requête. |
3989ED0C-20A1-4351-A127-2067FF8390AX |
| PageNumber |
integer |
Le numéro de page actuel. |
1 |
| TotalCount |
integer |
Le nombre total de modèles de lancement. |
1 |
| LaunchTemplateVersionSets |
object |
||
| LaunchTemplateVersionSet |
array<object> |
Les informations sur les versions du modèle. |
|
|
array<object> |
Les informations sur les versions du modèle. |
||
| LaunchTemplateName |
string |
The template name. |
testLaunchTemplateName |
| DefaultVersion |
boolean |
Indicates whether the template is the default version. |
true |
| VersionNumber |
integer |
The template version number. |
1 |
| ModifiedTime |
string |
The time when the template was last modified. |
2022-01-17T08:40:00Z |
| LaunchTemplateId |
string |
The template ID. |
lt-bp67acfmxazb4p**** |
| CreateTime |
string |
The time when the template was created. |
2022-01-17T08:22:43Z |
| CreatedBy |
string |
The creator of the template, which is the Alibaba Cloud account ID. |
123456789**** |
| VersionDescription |
string |
The description of the template version. |
testVersionDescription |
| LaunchTemplateData |
object |
The detailed template configuration. |
|
| DeploymentSetId |
string |
The ID of the deployment set. |
ds-bp1brhwhoqinyjd6**** |
| VpcId |
string |
The virtual private cloud (VPC) ID. |
v-bp67acfmxazb4p**** |
| SystemDisk.PerformanceLevel |
string |
The performance level (PL) of the enterprise SSD (ESSD) used as the system disk. Settings valid values:
For more information about how to select an ESSD performance level, see ESSDs. |
PL0 |
| KeyPairName |
string |
The name of the key pair. |
testKeyPairName |
| SecurityGroupId |
string |
The security group ID of the instance. Remarque
SecurityGroupId and SecurityGroupIds are not returned at the same time. |
sg-bp67acfmxazb4p**** |
| NetworkType |
string |
The network type. Valid values:
|
vpc |
| SpotStrategy |
string |
The bidding policy for the pay-as-you-go instance. Valid values:
|
NoSpot |
| EnableVmOsConfig |
boolean |
Indicates whether the operating system configuration of the instance is enabled. |
false |
| Description |
string |
The description of the instance. |
testInstanceDescription |
| SpotDuration |
integer |
The protection period of the spot instance. Unit: hours. Valid values:
Alibaba Cloud sends an ECS system event notification 5 minutes before the instance is released. Spot instances are billed by second. Select an appropriate protection period based on the expected task execution duration. Remarque
This parameter is returned only when SpotStrategy is set to SpotWithPriceLimit or SpotAsPriceGo. |
1 |
| InstanceName |
string |
Instance name |
testInstanceName |
| SecurityEnhancementStrategy |
string |
Specifies whether security hardening is enabled. |
active |
| UserData |
string |
The instance user data, which is Base64-encoded. |
SGVsbG9FQ1M= |
| SystemDisk.DiskName |
string |
The name of the system disk. |
testSystemDiskName |
| SystemDisk.Size |
integer |
The system disk size. Unit: GiB. |
40 |
| SpotPriceLimit |
number |
The maximum hourly price of the instance. |
0.98 |
| PasswordInherit |
boolean |
Indicates whether the username and password pair preset in the image is inherited. |
true |
| PrivateIpAddress |
string |
The private IP address of the instance. |
10.1.**.** |
| ImageId |
string |
The image ID used by the instance. |
m-bp67acfmxazb4p**** |
| SystemDisk.DeleteWithInstance |
boolean |
Indicates whether the system disk is released together with the instance. Valid values:
|
true |
| SystemDisk.Category |
string |
The category of the system disk. Valid values:
For retired instance types that are not I/O optimized instances, the default value is cloud. For other instances, the default value is cloud_efficiency. |
cloud_ssd |
| AutoReleaseTime |
string |
The automatic release time. |
2018-05-14T14:18:00Z |
| SystemDisk.Description |
string |
The description of the system disk. |
testSystemDiskDescription |
| ImageOwnerAlias |
string |
The source of the image. Valid values:
|
system |
| HostName |
string |
The hostname of the instance. |
testHostName |
| SystemDisk.Iops |
integer |
The total IOPS of the system disk. |
101800 |
| SystemDisk.AutoSnapshotPolicyId |
string |
The automatic snapshot policy ID. |
sp-bp1j0alc2z1fhvie**** |
| InternetMaxBandwidthOut |
integer |
The maximum outbound public bandwidth. |
100 |
| InternetMaxBandwidthIn |
integer |
The maximum inbound public bandwidth. |
5 |
| InstanceType |
string |
The instance type. |
ecs.g5.large |
| Period |
integer |
The subscription duration of the resource. |
1 |
| InstanceChargeType |
string |
The billing method of the instance. Valid values:
|
Postpaid |
| IoOptimized |
string |
Indicates whether the instance is I/O optimized. |
none |
| RamRoleName |
string |
The name of the instance RAM role. |
testRamRoleName |
| VSwitchId |
string |
The vSwitch ID of the instance. |
vsw-bp67acfmxazb4p**** |
| ResourceGroupId |
string |
The ID of the resource group to which the launch template belongs. |
rg-bp67acfmxazb4p**** |
| InternetChargeType |
string |
The billing method for public bandwidth. |
PayByTraffic |
| ZoneId |
string |
The zone ID. |
cn-hangzhou-g |
| Ipv6AddressCount |
integer |
The number of IPv6 addresses assigned to the instance. |
1 |
| DataDisks |
object |
||
| DataDisk |
array<object> |
The collection of data disks. |
|
|
object |
The collection of data disks. |
||
| PerformanceLevel |
string |
The performance level of the enterprise SSD (ESSD) used as a data disk. This parameter is returned only when Category is set to cloud_essd. Settings valid values:
|
PL1 |
| Description |
string |
The description of the data disk. |
testDiskDescription |
| SnapshotId |
string |
The snapshot ID used by the data disk. |
s-bp67acfmxazb4p**** |
| Device |
string |
The mount point of the data disk. The naming convention varies based on the number of data disks attached:
Remarque
This parameter is used only for full image (whole-machine image) scenarios. You can set this parameter to the mount point of a data disk in the full image and modify the corresponding DataDisk.N.Size and DataDisk.N.Category parameters to change the category and size of the data disk in the full image. |
/dev/xvdb |
| Size |
integer |
The size of the data disk. |
2000 |
| DiskName |
string |
The name of the data disk. |
testDiskName |
| Category |
string |
The category of data disk N. Valid values:
For I/O optimized instances, the default value is cloud_efficiency. For non-I/O optimized instances, the default value is cloud. Default value description:
|
cloud_ssd |
| DeleteWithInstance |
boolean |
Indicates whether the data disk is released together with the instance. |
true |
| Encrypted |
string |
Indicates whether the data disk is encrypted. |
false |
| ProvisionedIops |
integer |
The provisioned read/write IOPS of the ESSD AutoPL disk. Valid values: 0 to min{50,000, 1,000 × capacity - baseline performance}. Baseline performance = min{1,800 + 50 × capacity, 50,000} Remarque
This parameter is supported only when DiskCategory is set to cloud_auto. For more information, see ESSD AutoPL disks and Modify the provisioned performance of an ESSD AutoPL disk. |
50000 |
| BurstingEnabled |
boolean |
Indicates whether the performance burst feature is enabled. Valid values:
|
true |
| AutoSnapshotPolicyId |
string |
The automatic snapshot policy ID. |
sp-wz91dz3ghear2a5s**** |
| KMSKeyId |
string |
The Key Management Service (KMS) key ID of the data disk. |
0e478b7a-4262-4802-b8cb-00d3fb40**** |
| NetworkInterfaces |
object |
||
| NetworkInterface |
array<object> |
The collection of secondary Elastic Network Interface (ENI) attributes. |
|
|
array<object> |
The collection of secondary Elastic Network Interface (ENI) attributes. |
||
| NetworkInterfaceName |
string |
The name of the secondary network interface controller (NIC). |
testNetworkInterfaceName |
| VSwitchId |
string |
The vSwitch ID of the network interface controller (NIC). |
vsw-bp67acfmxazb4p**** |
| Description |
string |
The description of the secondary network interface controller (NIC). |
testNetworkInterfacesDescription |
| PrimaryIpAddress |
string |
The primary private IP address of the secondary network interface controller (NIC). |
203.0.*.* |
| SecurityGroupId |
string |
The security group ID of the secondary network interface controller (NIC). The security group must belong to the same VPC. Remarque
SecurityGroupId and SecurityGroupIds are not returned at the same time. |
sg-bp67acfmxazb4p**** |
| SecurityGroupIds |
object |
||
| SecurityGroupId |
array |
One or more security groups to which the secondary network interface controller (NIC) belongs. Remarque
SecurityGroupId and SecurityGroupIds are not returned at the same time. |
|
|
string |
One or more security groups to which the secondary network interface controller (NIC) belongs. Remarque
SecurityGroupId and SecurityGroupIds are not returned at the same time. |
["sg-bp15ed6xe1yxeycg7****"] |
|
| InstanceType |
string |
The instance type. |
ecs.s2.xlarge |
| NetworkInterfaceTrafficMode |
string |
The communication mode of the primary ENI. Valid values:
|
Standard |
| DeleteOnRelease |
boolean |
Indicates whether the ENI is retained when the instance is released. Valid values:
|
true |
| Tags |
object |
||
| InstanceTag |
array<object> |
The list of instance tags. |
|
|
object |
The list of instance tags. |
||
| Key |
string |
The tag key of the instance. |
TestKey |
| Value |
string |
The tag value of the instance. |
TestValue |
| SecurityGroupIds |
object |
||
| SecurityGroupId |
array |
One or more security groups to which the instance belongs. Remarque
SecurityGroupId and SecurityGroupIds are not returned at the same time. |
|
|
string |
One or more security groups to which the instance belongs. Remarque
SecurityGroupId and SecurityGroupIds are not returned at the same time. |
["sg-bp15ed6xe1yxeycg7****"] |
|
| SystemDisk.ProvisionedIops |
integer |
The provisioned read/write IOPS of the ESSD AutoPL disk. Valid values: 0 to min{50,000, 1,000 × capacity - baseline performance}. Baseline performance = min{1,800 + 50 × capacity, 50,000} Remarque
This parameter is supported only when DiskCategory is set to cloud_auto. For more information, see ESSD AutoPL disks and Modify the provisioned performance of an ESSD AutoPL disk. |
50000 |
| SystemDisk.BurstingEnabled |
boolean |
Indicates whether the performance burst feature is enabled. Valid values:
|
true |
| SystemDisk.Encrypted |
string |
Indicates whether the system disk is encrypted. Valid values:
Default value: false. Remarque
Hong Kong (China) Zone D and Singapore Zone A do not support system disk encryption when you create an instance. |
false |
| DeletionProtection |
boolean |
The release protection property of the instance, which specifies whether the instance can be released from the ECS console or by calling the DeleteInstance operation. Valid values:
Default value: false. Remarque
This property applies only to pay-as-you-go instances and can only restrict manual release operations. It does not take effect on system-initiated releases. |
false |
| CreditSpecification |
string |
The running mode of the burstable instance. Valid values:
|
Standard |
| AutoRenew |
boolean |
Indicates whether auto-renewal is enabled. This parameter takes effect only when InstanceChargeType is set to PrePaid. Valid values:
Default value: false. |
true |
| AutoRenewPeriod |
integer |
The auto-renewal period. Valid values: When PeriodUnit is set to Month: 1, 2, 3, 6, 12, 24, 36, 48, or 60. Default value: 1. |
1 |
| PeriodUnit |
string |
The unit of the subscription billing method duration. Valid values: Month (default). |
Month |
| HttpEndpoint |
string |
Indicates whether the access channel for instance metadata is enabled. Valid values:
Default value: enabled. Remarque
For more information about instance metadata, see Overview of instance metadata. |
enabled |
| HttpTokens |
string |
Specifies whether to forcefully use the security-hardened mode (IMDSv2) to access instance metadata. Valid values:
Default value: optional. Remarque
For more information about the modes for accessing instance metadata, see Overview of instance metadata. |
optional |
| HttpPutResponseHopLimit |
integer |
Remarque
This parameter is not available for use. |
3 |
| SystemDisk.KMSKeyId |
string |
The KMS key ID of the system disk. |
0e478b7a-4262-4802-b8cb-00d3fb40**** |
| ImageOptions |
object |
The image-related property information. |
|
| LoginAsNonRoot |
boolean |
Indicates whether instances created from this image support logon as the ecs-user user. Valid values:
|
false |
| SecurityOptions |
object |
The security options. |
|
| TrustedSystemMode |
string |
The trusted system pattern. Set the value to vTPM. The following instance families support the trusted system pattern:
|
vTPM |
Exemples
JSON format
{
"PageSize": 10,
"RequestId": "3989ED0C-20A1-4351-A127-2067FF8390AX",
"PageNumber": 1,
"TotalCount": 1,
"LaunchTemplateVersionSets": {
"LaunchTemplateVersionSet": [
{
"LaunchTemplateName": "testLaunchTemplateName",
"DefaultVersion": true,
"VersionNumber": 1,
"ModifiedTime": "2022-01-17T08:40:00Z",
"LaunchTemplateId": "lt-bp67acfmxazb4p****",
"CreateTime": "2022-01-17T08:22:43Z",
"CreatedBy": "123456789****",
"VersionDescription": "testVersionDescription",
"LaunchTemplateData": {
"DeploymentSetId": "ds-bp1brhwhoqinyjd6****",
"VpcId": "v-bp67acfmxazb4p****",
"SystemDisk.PerformanceLevel": "PL0",
"KeyPairName": "testKeyPairName",
"SecurityGroupId": "sg-bp67acfmxazb4p****",
"NetworkType": "vpc",
"SpotStrategy": "NoSpot",
"EnableVmOsConfig": false,
"Description": "testInstanceDescription",
"SpotDuration": 1,
"InstanceName": "testInstanceName",
"SecurityEnhancementStrategy": "active",
"UserData": "SGVsbG9FQ1M=",
"SystemDisk.DiskName": "testSystemDiskName",
"SystemDisk.Size": 40,
"SpotPriceLimit": 0.98,
"PasswordInherit": true,
"PrivateIpAddress": "10.1.**.**",
"ImageId": "m-bp67acfmxazb4p****",
"SystemDisk.DeleteWithInstance": true,
"SystemDisk.Category": "cloud_ssd",
"AutoReleaseTime": "2018-05-14T14:18:00Z",
"SystemDisk.Description": "testSystemDiskDescription",
"ImageOwnerAlias": "system",
"HostName": "testHostName",
"SystemDisk.Iops": 101800,
"SystemDisk.AutoSnapshotPolicyId": "sp-bp1j0alc2z1fhvie****",
"InternetMaxBandwidthOut": 100,
"InternetMaxBandwidthIn": 5,
"InstanceType": "ecs.g5.large",
"Period": 1,
"InstanceChargeType": "Postpaid",
"IoOptimized": "none",
"RamRoleName": "testRamRoleName",
"VSwitchId": "vsw-bp67acfmxazb4p****",
"ResourceGroupId": "rg-bp67acfmxazb4p****",
"InternetChargeType": "PayByTraffic",
"ZoneId": "cn-hangzhou-g",
"Ipv6AddressCount": 1,
"DataDisks": {
"DataDisk": [
{
"PerformanceLevel": "PL1",
"Description": "testDiskDescription",
"SnapshotId": "s-bp67acfmxazb4p****",
"Device": "/dev/xvdb\n",
"Size": 2000,
"DiskName": "testDiskName",
"Category": "cloud_ssd",
"DeleteWithInstance": true,
"Encrypted": "false",
"ProvisionedIops": 50000,
"BurstingEnabled": true,
"AutoSnapshotPolicyId": "sp-wz91dz3ghear2a5s****",
"KMSKeyId": "0e478b7a-4262-4802-b8cb-00d3fb40****"
}
]
},
"NetworkInterfaces": {
"NetworkInterface": [
{
"NetworkInterfaceName": "testNetworkInterfaceName",
"VSwitchId": "vsw-bp67acfmxazb4p****",
"Description": "testNetworkInterfacesDescription",
"PrimaryIpAddress": "203.0.*.*",
"SecurityGroupId": "sg-bp67acfmxazb4p****",
"SecurityGroupIds": {
"SecurityGroupId": [
"[\"sg-bp15ed6xe1yxeycg7****\"]"
]
},
"InstanceType": "ecs.s2.xlarge",
"NetworkInterfaceTrafficMode": "Standard",
"DeleteOnRelease": true
}
]
},
"Tags": {
"InstanceTag": [
{
"Key": "TestKey",
"Value": "TestValue"
}
]
},
"SecurityGroupIds": {
"SecurityGroupId": [
"[\"sg-bp15ed6xe1yxeycg7****\"]"
]
},
"SystemDisk.ProvisionedIops": 50000,
"SystemDisk.BurstingEnabled": true,
"SystemDisk.Encrypted": "false",
"DeletionProtection": false,
"CreditSpecification": "Standard",
"AutoRenew": true,
"AutoRenewPeriod": 1,
"PeriodUnit": "Month",
"HttpEndpoint": "enabled",
"HttpTokens": "optional",
"HttpPutResponseHopLimit": 3,
"SystemDisk.KMSKeyId": "0e478b7a-4262-4802-b8cb-00d3fb40****\n",
"ImageOptions": {
"LoginAsNonRoot": false
},
"SecurityOptions": {
"TrustedSystemMode": "vTPM"
}
}
}
]
}
}
Codes d'erreur
|
Code de statut HTTP |
Code d'erreur |
Message d'erreur |
Description |
|---|---|---|---|
| 400 | InvalidRegion.NotExist | %s | The specified region does not exist. |
| 400 | MissingParameter | %s | A parameter is not specified. |
| 400 | InvalidParameter | %s | The specified parameter is invalid. |
| 500 | InternalError | The request processing has failed due to some unknown error, exception or failure. | An internal error has occurred. Try again later. |
| 403 | InnerServiceFailed | %s | An internal service cannot be called. |
| 404 | InvalidLaunchTemplate.NotFound | The specified LaunchTemplate is not found. | The specified launch template does not exist. |
Consultez Codes d'erreur pour la liste complète.
Notes de version
Consultez Notes de version pour la liste complète.