All Products
Search
Document Center

Resource Orchestration Service:DATASOURCE::ECS::LaunchTemplates

最終更新日:Sep 06, 2024

DATASOURCE::ECS::LaunchTemplates is used to query launch templates.

Syntax

{
  "Type": "DATASOURCE::ECS::LaunchTemplates",
  "Properties": {
    "LaunchTemplateName": String,
    "LaunchTemplateId": String,
    "TemplateResourceGroupId": String
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

LaunchTemplateName

String

No

Yes

The name of the launch template.

None.

LaunchTemplateId

String

No

Yes

The ID of the launch template.

None.

TemplateResourceGroupId

String

No

Yes

The ID of the resource group to which the launch template belongs.

None.

Return values

Fn::GetAtt

  • LaunchTemplateIds: the IDs of the launch templates.

  • LaunchTemplates: details of the launch templates.

Property

Type

Description

Constraint

LaunchTemplateIds

List

The IDs of the launch templates.

None.

LaunchTemplates

List

Details of the launch templates.

None.

LatestVersionNumber

Integer

The most recent version number of the launch template.

None.

ModifiedTime

String

The modification time.

None.

TemplateResourceGroupId

String

The ID of the resource group to which the launch template belongs.

None.

LaunchTemplateName

String

The name of the launch template.

None.

LaunchTemplateId

String

The ID of the launch template.

None.

TemplateTag

List

The tags of the launch template.

None.

DefaultVersionNumber

Integer

The default version number of the launch template.

None.

CreatedBy

String

The creator of the launch template.

None.

CreateTime

String

The creation time of the launch template.

None.

Examples

  • YAML format

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      LaunchTemplateId:
        Type: String
        Description:
          en: The ID of the launch template.
        Required: false
        AssociationProperty: ALIYUN::ECS::LaunchTemplate::LaunchTemplateId
    Resources:
      ExtensionDataSource:
        Type: DATASOURCE::ECS::LaunchTemplates
        Properties:
          LaunchTemplateId:
            Ref: LaunchTemplateId
    Outputs:
      LaunchTemplateIds:
        Description: The list of launch template IDs.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - LaunchTemplateIds
      LaunchTemplates:
        Description: The list of launch templates.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - LaunchTemplates
    
  • JSON format

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "LaunchTemplateId": {
          "Type": "String",
          "Description": {
            "en": "The ID of the launch template."
          },
          "Required": false,
          "AssociationProperty": "ALIYUN::ECS::LaunchTemplate::LaunchTemplateId"
        }
      },
      "Resources": {
        "ExtensionDataSource": {
          "Type": "DATASOURCE::ECS::LaunchTemplates",
          "Properties": {
            "LaunchTemplateId": {
              "Ref": "LaunchTemplateId"
            }
          }
        }
      },
      "Outputs": {
        "LaunchTemplateIds": {
          "Description": "The list of launch template IDs.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "LaunchTemplateIds"
            ]
          }
        },
        "LaunchTemplates": {
          "Description": "The list of launch templates.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "LaunchTemplates"
            ]
          }
        }
      }
    }