Todos os produtos
Search
Central de documentação

Resource Orchestration Service:DATASOURCE::ECS::LaunchTemplate

Última atualização: Jun 27, 2026

O DATASOURCE::ECS::LaunchTemplate consulta informações sobre um modelo de inicialização.

Sintaxe

{
  "Type": "DATASOURCE::ECS::LaunchTemplate",
  "Properties": {
    "LaunchTemplateId": String,
    "RefreshOptions": String
  }
}

Propriedades

Propriedade

Tipo

Obrigatório

Editável

Descrição

Restrição

LaunchTemplateId

String

Sim

Sim

ID do modelo de inicialização.

Nenhuma.

RefreshOptions

String

Não

Sim

Política de atualização dos recursos da fonte de dados durante a atualização da pilha.

Valores válidos:

  • Never (padrão): não atualiza os recursos da fonte de dados ao atualizar a pilha.

  • Always: atualiza os recursos da fonte de dados ao atualizar a pilha.

Valores de retorno

Fn::GetAtt

  • ImageOwnerAlias: alias do proprietário da imagem.

  • PrivateIpAddress: endereço IP privado da instância do Elastic Compute Service (ECS).

  • Description: descrição da instância ECS.

  • ResourceGroupId: ID do grupo de recursos.

  • TemplateTag: tags do modelo de inicialização.

  • UserData: dados do usuário da instância ECS.

  • InstanceChargeType: método de faturamento da instância ECS.

  • SystemDisk: configurações do disco do sistema da instância ECS.

  • RamRoleName: nome da função do Resource Access Management (RAM) da instância ECS.

  • ModifiedTime: hora da modificação.

  • Ipv6AddressCount: quantidade de endereços IPv6 gerados aleatoriamente para a interface de rede elástica (ENI).

  • NetworkType: tipo de rede da instância ECS.

  • ImageId: ID da imagem da instância ECS.

  • SpotPriceLimit: preço horário máximo da instância ECS.

  • InstanceType: tipo da instância ECS.

  • DefaultVersionNumber: número da versão padrão do modelo de inicialização.

  • Tags: tags do modelo de inicialização.

  • HostName: nome do host da instância ECS.

  • SpotStrategy: política de lance para instância ECS com pagamento conforme o uso.

  • PasswordInherit: indica se a senha predefinida da imagem está em uso.

  • TemplateResourceGroupId: ID do grupo de recursos ao qual o modelo de inicialização pertence.

  • KeyPairName: nome do par de chaves.

  • LaunchTemplateName: nome do modelo de inicialização.

  • IoOptimized: indica se a instância ECS é otimizada para E/S.

  • VersionDescription: descrição da versão do modelo de inicialização.

  • CreatedBy: criador do modelo de inicialização.

  • ZoneId: ID da zona.

  • LatestVersionNumber: número da versão mais recente do modelo de inicialização.

  • VSwitchId: ID do vSwitch da instância ECS.

  • CreateTime: hora de criação do modelo de inicialização.

  • NetworkInterface: informações sobre a ENI.

  • Period: duração da assinatura da instância ECS.

  • LaunchTemplateId: ID do modelo de inicialização.

  • DeletionProtection: propriedade de proteção contra exclusão da instância ECS.

  • SecurityGroupIds: IDs dos grupos de segurança aos quais a instância ECS pertence.

  • InternetChargeType: método de medição da largura de banda pública.

  • InstanceName: nome da instância ECS.

  • DeploymentSetId: ID do conjunto de implantação.

  • DataDisk: detalhes do disco de dados.

  • InternetMaxBandwidthOut: largura de banda pública de saída máxima.

  • VpcId: ID da Virtual Private Cloud (VPC).

  • InternetMaxBandwidthIn: largura de banda pública de entrada máxima.

  • SecurityEnhancementStrategy: indica se o reforço de segurança está ativado.

  • AutoReleaseTime: hora de liberação automática.

Exemplos

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  LaunchTemplateId:
    Type: String
    Description:
      en: Template ID.
    Required: true
    AssociationProperty: ALIYUN::ECS::LaunchTemplate::LaunchTemplateId
Resources:
  ExtensionDataSource:
    Type: DATASOURCE::ECS::LaunchTemplate
    Properties:
      LaunchTemplateId:
        Ref: LaunchTemplateId
Outputs:
  ImageOwnerAlias:
    Description: The source of the image.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - ImageOwnerAlias
  PrivateIpAddress:
    Description: The private IP address of the instance.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - PrivateIpAddress
  Description:
    Description: Instance description. 2 to 256 English or Chinese characters in length and cannot start with' http:// 'or' https.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Description
  ResourceGroupId:
    Description: The ID of the resource group to which the instance, Elastic Block Storage (EBS) device, and ENI belong.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - ResourceGroupId
  TemplateTag:
    Description: The tags of the launch template.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - TemplateTag
  UserData:
    Description: The user-defined data of the instance must be encoded in Base64. The maximum original data is 16KB.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - UserData
  InstanceChargeType:
    Description: The billing method of the instance.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - InstanceChargeType
  SystemDisk:
    Description: System disk configuration.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - SystemDisk
  RamRoleName:
    Description: The instance RAM role name. You can use the RAM API [ListRoles](~~ 28713 ~~) to query the created instance RAM roles.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - RamRoleName
  ModifiedTime:
    Description: The time when the launch template was modified.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - ModifiedTime
  Ipv6AddressCount:
    Description: Specify the number of randomly generated IPv6 addresses for the primary network card. The value range is 1 to 10.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Ipv6AddressCount
  NetworkType:
    Description: The network type of the instance.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - NetworkType
  ImageId:
    Description: The ID of the image.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - ImageId
  SpotPriceLimit:
    Description: Set the maximum price per hour for the instance. The maximum number of 3 decimal places is supported. The value of the parameter 'SpotStrategy' is 'SpotWithPriceLimit.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - SpotPriceLimit
  InstanceType:
    Description: The instance type.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - InstanceType
  DefaultVersionNumber:
    Description: The default version number of the template.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - DefaultVersionNumber
  Tags:
    Description: The tags of the launch template.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Tags
  HostName:
    Description: The hostname of the instance.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - HostName
  SpotStrategy:
    Description: The preemption policy for a pay-as-you-go instance. This parameter takes effect when the value of the parameter 'InstanceChargeType' is 'PostPaid.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - SpotStrategy
  PasswordInherit:
    Description: Whether to use the password preset by the image.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - PasswordInherit
  TemplateResourceGroupId:
    Description: Q
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - TemplateResourceGroupId
  KeyPairName:
    Description: The name of the key pair.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - KeyPairName
  LaunchTemplateName:
    Description: The name of the launch template.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - LaunchTemplateName
  IoOptimized:
    Description: Whether to optimize the instance for I/O.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - IoOptimized
  VersionDescription:
    Description: Instance launch template version description. 2 to 256 English or Chinese characters in length and cannot start with' http:// 'or' https.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - VersionDescription
  CreatedBy:
    Description: The creator of the launch template.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - CreatedBy
  ZoneId:
    Description: The ID of the zone to which the instance belongs.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - ZoneId
  LatestVersionNumber:
    Description: The latest version number of the template.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - LatestVersionNumber
  VSwitchId:
    Description: The ID of the vSwitch.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - VSwitchId
  CreateTime:
    Description: The time when the instance launch template was created.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - CreateTime
  NetworkInterface:
    Description: The elastic network interfaces (ENIs).
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - NetworkInterface
  Period:
    Description: 'The duration of the purchase of resources, in months. When creating an instance, the parameter ''InstanceChargeType'' takes effect and is required only when the value of the parameter ''PrePaid'' is ''PrePaid. Value range: 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 48, 60.'
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Period
  LaunchTemplateId:
    Description: The ID of the launch template.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - LaunchTemplateId
  DeletionProtection:
    Description: Instance deletion protection attribute.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - DeletionProtection
  SecurityGroupIds:
    Description: The IDs of one or more security groups to which you want to add the instance.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - SecurityGroupIds
  InternetChargeType:
    Description: Network billing method.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - InternetChargeType
  InstanceName:
    Description: The name of the instance. The length is 2~128 English or Chinese characters. It must start with a large or small letter or Chinese, and cannot start with' http:// 'or' https. It can contain numbers, colons (:), underscores (_), or dashes (-).
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - InstanceName
  DeploymentSetId:
    Description: The ID of the deployment set.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - DeploymentSetId
  DataDisk:
    Description: Data disk information list.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - DataDisk
  InternetMaxBandwidthOut:
    Description: The maximum outbound bandwidth of the public network. The unit is Mbit/s. The value range is 0~100.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - InternetMaxBandwidthOut
  VpcId:
    Description: VPC Id.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - VpcId
  InternetMaxBandwidthIn:
    Description: The maximum public inbound bandwidth, in Mbit/s.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - InternetMaxBandwidthIn
  SecurityEnhancementStrategy:
    Description: Whether to turn on security reinforcement for the operating system.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - SecurityEnhancementStrategy
  AutoReleaseTime:
    Description: 'Automatic release time. According to the [ISO8601](~~ 25696 ~~) standard, and need to use UTC time. The format is: yyyy-MM-ddTHH:mm:ssZ.'
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - AutoReleaseTime
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "LaunchTemplateId": {
      "Type": "String",
      "Description": {
        "en": "Template ID."
      },
      "Required": true,
      "AssociationProperty": "ALIYUN::ECS::LaunchTemplate::LaunchTemplateId"
    }
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::ECS::LaunchTemplate",
      "Properties": {
        "LaunchTemplateId": {
          "Ref": "LaunchTemplateId"
        }
      }
    }
  },
  "Outputs": {
    "ImageOwnerAlias": {
      "Description": "The source of the image.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ImageOwnerAlias"
        ]
      }
    },
    "PrivateIpAddress": {
      "Description": "The private IP address of the instance.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "PrivateIpAddress"
        ]
      }
    },
    "Description": {
      "Description": "Instance description. 2 to 256 English or Chinese characters in length and cannot start with' http:// 'or' https.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Description"
        ]
      }
    },
    "ResourceGroupId": {
      "Description": "The ID of the resource group to which the instance, Elastic Block Storage (EBS) device, and ENI belong.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ResourceGroupId"
        ]
      }
    },
    "TemplateTag": {
      "Description": "The tags of the launch template.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "TemplateTag"
        ]
      }
    },
    "UserData": {
      "Description": "The user-defined data of the instance must be encoded in Base64. The maximum original data is 16KB.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "UserData"
        ]
      }
    },
    "InstanceChargeType": {
      "Description": "The billing method of the instance.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "InstanceChargeType"
        ]
      }
    },
    "SystemDisk": {
      "Description": "System disk configuration.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "SystemDisk"
        ]
      }
    },
    "RamRoleName": {
      "Description": "The instance RAM role name. You can use the RAM API [ListRoles](~~ 28713 ~~) to query the created instance RAM roles.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "RamRoleName"
        ]
      }
    },
    "ModifiedTime": {
      "Description": "The time when the launch template was modified.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ModifiedTime"
        ]
      }
    },
    "Ipv6AddressCount": {
      "Description": "Specify the number of randomly generated IPv6 addresses for the primary network card. The value range is 1 to 10.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Ipv6AddressCount"
        ]
      }
    },
    "NetworkType": {
      "Description": "The network type of the instance.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "NetworkType"
        ]
      }
    },
    "ImageId": {
      "Description": "The ID of the image.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ImageId"
        ]
      }
    },
    "SpotPriceLimit": {
      "Description": "Set the maximum price per hour for the instance. The maximum number of 3 decimal places is supported. The value of the parameter 'SpotStrategy' is 'SpotWithPriceLimit.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "SpotPriceLimit"
        ]
      }
    },
    "InstanceType": {
      "Description": "The instance type.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "InstanceType"
        ]
      }
    },
    "DefaultVersionNumber": {
      "Description": "The default version number of the template.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "DefaultVersionNumber"
        ]
      }
    },
    "Tags": {
      "Description": "The tags of the launch template.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Tags"
        ]
      }
    },
    "HostName": {
      "Description": "The hostname of the instance.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "HostName"
        ]
      }
    },
    "SpotStrategy": {
      "Description": "The preemption policy for a pay-as-you-go instance. This parameter takes effect when the value of the parameter 'InstanceChargeType' is 'PostPaid.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "SpotStrategy"
        ]
      }
    },
    "PasswordInherit": {
      "Description": "Whether to use the password preset by the image.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "PasswordInherit"
        ]
      }
    },
    "TemplateResourceGroupId": {
      "Description": "Q",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "TemplateResourceGroupId"
        ]
      }
    },
    "KeyPairName": {
      "Description": "The name of the key pair.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "KeyPairName"
        ]
      }
    },
    "LaunchTemplateName": {
      "Description": "The name of the launch template.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "LaunchTemplateName"
        ]
      }
    },
    "IoOptimized": {
      "Description": "Whether to optimize the instance for I/O.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "IoOptimized"
        ]
      }
    },
    "VersionDescription": {
      "Description": "Instance launch template version description. 2 to 256 English or Chinese characters in length and cannot start with' http:// 'or' https.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "VersionDescription"
        ]
      }
    },
    "CreatedBy": {
      "Description": "The creator of the launch template.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "CreatedBy"
        ]
      }
    },
    "ZoneId": {
      "Description": "The ID of the zone to which the instance belongs.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ZoneId"
        ]
      }
    },
    "LatestVersionNumber": {
      "Description": "The latest version number of the template.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "LatestVersionNumber"
        ]
      }
    },
    "VSwitchId": {
      "Description": "The ID of the vSwitch.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "VSwitchId"
        ]
      }
    },
    "CreateTime": {
      "Description": "The time when the instance launch template was created.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "CreateTime"
        ]
      }
    },
    "NetworkInterface": {
      "Description": "The elastic network interfaces (ENIs).",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "NetworkInterface"
        ]
      }
    },
    "Period": {
      "Description": "The duration of the purchase of resources, in months. When creating an instance, the parameter 'InstanceChargeType' takes effect and is required only when the value of the parameter 'PrePaid' is 'PrePaid. Value range: 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 48, 60.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Period"
        ]
      }
    },
    "LaunchTemplateId": {
      "Description": "The ID of the launch template.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "LaunchTemplateId"
        ]
      }
    },
    "DeletionProtection": {
      "Description": "Instance deletion protection attribute.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "DeletionProtection"
        ]
      }
    },
    "SecurityGroupIds": {
      "Description": "The IDs of one or more security groups to which you want to add the instance.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "SecurityGroupIds"
        ]
      }
    },
    "InternetChargeType": {
      "Description": "Network billing method.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "InternetChargeType"
        ]
      }
    },
    "InstanceName": {
      "Description": "The name of the instance. The length is 2~128 English or Chinese characters. It must start with a large or small letter or Chinese, and cannot start with' http:// 'or' https. It can contain numbers, colons (:), underscores (_), or dashes (-).",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "InstanceName"
        ]
      }
    },
    "DeploymentSetId": {
      "Description": "The ID of the deployment set.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "DeploymentSetId"
        ]
      }
    },
    "DataDisk": {
      "Description": "Data disk information list.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "DataDisk"
        ]
      }
    },
    "InternetMaxBandwidthOut": {
      "Description": "The maximum outbound bandwidth of the public network. The unit is Mbit/s. The value range is 0~100.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "InternetMaxBandwidthOut"
        ]
      }
    },
    "VpcId": {
      "Description": "VPC Id.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "VpcId"
        ]
      }
    },
    "InternetMaxBandwidthIn": {
      "Description": "The maximum public inbound bandwidth, in Mbit/s.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "InternetMaxBandwidthIn"
        ]
      }
    },
    "SecurityEnhancementStrategy": {
      "Description": "Whether to turn on security reinforcement for the operating system.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "SecurityEnhancementStrategy"
        ]
      }
    },
    "AutoReleaseTime": {
      "Description": "Automatic release time. According to the [ISO8601](~~ 25696 ~~) standard, and need to use UTC time. The format is: yyyy-MM-ddTHH:mm:ssZ.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "AutoReleaseTime"
        ]
      }
    }
  }
}