Todos os produtos
Search
Central de documentação

Resource Orchestration Service:DATASOURCE::ENS::Image

Última atualização: Jun 27, 2026

Consulta os detalhes de uma imagem personalizada.

Sintaxe

{
  "Type": "DATASOURCE::ENS::Image",
  "Properties": {
    "ImageId": String,
    "RefreshOptions": String
  }
}

Propriedades

Propriedade

Tipo

Obrigatória

Editável

Descrição

Restrição

ImageId

String

Sim

Sim

ID da imagem.

Nenhuma.

RefreshOptions

String

Não

Sim

Política de atualização dos recursos de source de dados ao atualizar a pilha.

Valores válidos:

  • Never (padrão): não atualiza os recursos de source de dados durante a atualização da pilha.

  • Always: atualiza os recursos de source de dados durante a atualização da pilha.

Valores de retorno

Fn::GetAtt

  • ImageOwnerAlias: alias do proprietário da imagem.

  • ImageName: nome da imagem.

  • SnapshotId: ID do snapshot.

  • Platform: plataforma.

  • Architecture: arquitetura da imagem.

  • ImageSize: tamanho da imagem. Unidade: GiB.

  • InstanceId: ID da instância.

  • OsVersion: versão do sistema operacional.

  • CreateTime: horário de criação da imagem.

  • ImageId: ID da imagem.

  • ComputeType: propriedade de computação.

Exemplos

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  ImageId:
    Type: String
    Description:
      en: The ID of the image. Fuzzy search is supported.
    Required: true
Resources:
  ExtensionDataSource:
    Type: DATASOURCE::ENS::Image
    Properties:
      ImageId:
        Ref: ImageId
Outputs:
  ImageOwnerAlias:
    Description: |-
      The source of the image. Valid values:
      - **others**: a custom image that is shared by other Alibaba Cloud accounts.
      - **self**: your own custom image.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - ImageOwnerAlias
  ImageName:
    Description: The name of the image.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - ImageName
  SnapshotId:
    Description: The ID of the snapshot corresponding to the image.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - SnapshotId
  Platform:
    Description: |-
      The type of operating system used by the image. Valid values:
      - **centos**
      - **ubuntu**
      - **alios**
      - **debian**
      - **rhel**
      - **windows**
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Platform
  Architecture:
    Description: |-
      The image architecture. Valid values:
      - **i386**
      - **x86_64**
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Architecture
  ImageSize:
    Description: 'The size of the image. Unit: GiB.'
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - ImageSize
  InstanceId:
    Description: The ID of the instance corresponding to the image.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - InstanceId
  OsVersion:
    Description: The operating system version.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - OsVersion
  CreateTime:
    Description: The image creation time. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - CreateTime
  ImageId:
    Description: The ID of the image.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - ImageId
  ComputeType:
    Description: 'Computing type. ens_vm/ens: x86 computing. bare_metal: x86 bare machine or x86 bare metal. arm_vm: ARM computing. arm_bare_metal: ARM bare machine or ARM bare metal. pcfarm: heterogeneous computing.'
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - ComputeType
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "ImageId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the image. Fuzzy search is supported."
      },
      "Required": true
    }
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::ENS::Image",
      "Properties": {
        "ImageId": {
          "Ref": "ImageId"
        }
      }
    }
  },
  "Outputs": {
    "ImageOwnerAlias": {
      "Description": "The source of the image. Valid values:\n- **others**: a custom image that is shared by other Alibaba Cloud accounts.\n- **self**: your own custom image.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ImageOwnerAlias"
        ]
      }
    },
    "ImageName": {
      "Description": "The name of the image.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ImageName"
        ]
      }
    },
    "SnapshotId": {
      "Description": "The ID of the snapshot corresponding to the image.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "SnapshotId"
        ]
      }
    },
    "Platform": {
      "Description": "The type of operating system used by the image. Valid values:\n- **centos**\n- **ubuntu**\n- **alios**\n- **debian**\n- **rhel**\n- **windows**",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Platform"
        ]
      }
    },
    "Architecture": {
      "Description": "The image architecture. Valid values:\n- **i386**\n- **x86_64**",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Architecture"
        ]
      }
    },
    "ImageSize": {
      "Description": "The size of the image. Unit: GiB.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ImageSize"
        ]
      }
    },
    "InstanceId": {
      "Description": "The ID of the instance corresponding to the image.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "InstanceId"
        ]
      }
    },
    "OsVersion": {
      "Description": "The operating system version.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "OsVersion"
        ]
      }
    },
    "CreateTime": {
      "Description": "The image creation time. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "CreateTime"
        ]
      }
    },
    "ImageId": {
      "Description": "The ID of the image.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ImageId"
        ]
      }
    },
    "ComputeType": {
      "Description": "Computing type. ens_vm/ens: x86 computing. bare_metal: x86 bare machine or x86 bare metal. arm_vm: ARM computing. arm_bare_metal: ARM bare machine or ARM bare metal. pcfarm: heterogeneous computing.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ComputeType"
        ]
      }
    }
  }
}