Todos los productos
Search
Centro de documentos

Resource Orchestration Service:ALIYUN::ECI::ImageCache

Última actualización: Sep 04, 2026

Crea una caché de imágenes para Elastic Container Instance (ECI).

Sintaxis

{
  "Type": "ALIYUN::ECI::ImageCache",
  "Properties": {
    "EipInstanceId": String,
    "Image": List,
    "SecurityGroupId": String,
    "ResourceGroupId": String,
    "VSwitchId": String,
    "ImageRegistryCredential": List,
    "ImageCacheName": String
  }
}

Propiedades

Nombre de la propiedad

Tipo

Obligatorio

Actualización permitida

Descripción

Restricciones

EipInstanceId

String

No

No

ID de la dirección IP elástica (EIP).

La instancia de ECI requiere acceso a Internet para obtener las imágenes. Use una EIP o configure una puerta de enlace NAT para el vSwitch. Se recomienda usar una puerta de enlace NAT.

Image

List

Sí

No

Imágenes para almacenar en caché. Cada elemento es un ID de imagen.

Máximo: 20 imágenes.

SecurityGroupId

String

Sí

No

ID del security group.

Ninguna.

ResourceGroupId

String

No

No

ID del resource group.

Ninguna.

VSwitchId

String

Sí

No

ID del vSwitch.

Ninguna.

ImageRegistryCredential

List

No

No

Credenciales de inicio de sesión del repositorio de imágenes.

No son necesarias para imágenes de Alibaba Cloud Container Registry (ACR). Máximo: 10 repositorios.

ImageCacheName

String

Sí

No

Nombre de la caché de imágenes.

Ninguna.

Sintaxis de ImageRegistryCredential

"ImageRegistryCredential": [
  {
    "Server": String,
    "UserName": String,
    "Password": String
  }
]

Propiedades de ImageRegistryCredential

Nombre de la propiedad

Tipo

Obligatorio

Actualización permitida

Descripción

Restricciones

Server

String

No

No

Dirección del repositorio de imágenes, sin el prefijo http:// ni https://.

Ninguna.

UserName

String

No

No

Nombre de usuario del repositorio de imágenes.

Ninguna.

Password

String

No

No

Contraseña del repositorio de imágenes.

Ninguna.

Valores de retorno

Fn::GetAtt

  • ImageCacheId: ID de la caché de imágenes.

Ejemplos

YAML formato

ROSTemplateFormatVersion: '2015-09-01'
Description: Test ECI ImageCache
Parameters:
  ZoneId:
    Type: String
    AssociationProperty: ALIYUN::ECS::Instance:ZoneId
  VpcId:
    Type: String
    AssociationProperty: ALIYUN::ECS::VPC::VPCId
  VSwitchId:
    Type: String
    AssociationProperty: ALIYUN::ECS::VSwitch::VSwitchId
    AssociationPropertyMetadata:
      VpcId: VpcId
      ZoneId: ZoneId
  SecurityGroupId:
    Type: String
    AssociationProperty: ALIYUN::ECS::SecurityGroup::SecurityGroupId
    AssociationPropertyMetadata:
      VpcId: VpcId
  Image:
    Type: Json
    Description: The image list to be cached.
    MaxLength: 20
    Default: '["busybox"]'
  ImageCacheName:
    Type: String
    Description: Image cache name.
    Default: mytest
Resources:
  Eip:
    Type: ALIYUN::VPC::EIP
    Properties:
      InternetChargeType: PayByTraffic
      Bandwidth: 5
  ImageCache:
    Type: ALIYUN::ECI::ImageCache
    Properties:
      EipInstanceId:
        Ref: Eip
      Image:
        Ref: Image
      SecurityGroupId:
        Ref: SecurityGroupId
      VSwitchId:
        Ref: VSwitchId
      ImageCacheName:
        Ref: ImageCacheName
Outputs:
  ImageCacheId:
    Description: The ID of the image cache.
    Value:
      Fn::GetAtt:
        - ImageCache
        - ImageCacheId

JSON formato

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Description": "Test ECI ImageCache",
  "Parameters": {
    "ZoneId": {
      "Type": "String",
      "AssociationProperty": "ALIYUN::ECS::Instance:ZoneId"
    },
    "VpcId": {
      "Type": "String",
      "AssociationProperty": "ALIYUN::ECS::VPC::VPCId"
    },
    "VSwitchId": {
      "Type": "String",
      "AssociationProperty": "ALIYUN::ECS::VSwitch::VSwitchId",
      "AssociationPropertyMetadata": {
        "VpcId": "VpcId",
        "ZoneId": "ZoneId"
      }
    },
    "SecurityGroupId": {
      "Type": "String",
      "AssociationProperty": "ALIYUN::ECS::SecurityGroup::SecurityGroupId",
      "AssociationPropertyMetadata": {
        "VpcId": "VpcId"
      }
    },
    "Image": {
      "Type": "Json",
      "Description": "The image list to be cached.",
      "MaxLength": 20,
      "Default": "[\"busybox\"]"
    },
    "ImageCacheName": {
      "Type": "String",
      "Description": "Image cache name.",
      "Default": "mytest"
    }
  },
  "Resources": {
    "Eip": {
      "Type": "ALIYUN::VPC::EIP",
      "Properties": {
        "InternetChargeType": "PayByTraffic",
        "Bandwidth": 5
      }
    },
    "ImageCache": {
      "Type": "ALIYUN::ECI::ImageCache",
      "Properties": {
        "EipInstanceId": {
          "Ref": "Eip"
        },
        "Image": {
          "Ref": "Image"
        },
        "SecurityGroupId": {
          "Ref": "SecurityGroupId"
        },
        "VSwitchId": {
          "Ref": "VSwitchId"
        },
        "ImageCacheName": {
          "Ref": "ImageCacheName"
        }
      }
    }
  },
  "Outputs": {
    "ImageCacheId": {
      "Description": "The ID of the image cache.",
      "Value": {
        "Fn::GetAtt": [
          "ImageCache",
          "ImageCacheId"
        ]
      }
    }
  }
}