All Products
Search
Document Center

Resource Orchestration Service:DATASOURCE::ECS::LaunchTemplates

更新時間:Feb 05, 2025

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

Syntax

{
  "Type": "DATASOURCE::ECS::LaunchTemplates",
  "Properties": {
    "LaunchTemplateName": String,
    "LaunchTemplateId": String,
    "TemplateResourceGroupId": String,
    "RefreshOptions": 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.

RefreshOptions

String

No

Yes

The refresh policy for data source resources when the stack is updated.

Valid values:

  • Never (default): does not refresh data source resources when the stack is updated.

  • Always: refreshes data source resources when the stack is updated.

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

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
{
  "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"
        ]
      }
    }
  }
}