Todos os produtos
Search
Central de documentação

Resource Orchestration Service:ALIYUN::ECI::ImageCache

Última atualização: Jun 27, 2026

Cria um cache de imagem para Elastic Container Instance (ECI).

Sintaxe

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

Propriedades

Nome da propriedade

Tipo

Obrigatório

Atualização permitida

Descrição

Restrições

EipInstanceId

String

Não

Não

ID do elastic IP address (EIP).

A instância ECI requer acesso à internet para baixar imagens. Use um EIP ou configure um NAT gateway para o vSwitch. Recomendamos o uso de NAT gateway.

Image

List

Sim

Não

Imagens a serem armazenadas em cache. Cada item é um ID de imagem.

Máximo: 20 imagens.

SecurityGroupId

String

Sim

Não

ID do grupo de segurança.

Nenhuma.

ResourceGroupId

String

Não

Não

ID do grupo de recursos.

Nenhuma.

VSwitchId

String

Sim

Não

ID do vSwitch.

Nenhuma.

ImageRegistryCredential

List

Não

Não

Credenciais de login do repositório de imagens.

Desnecessário para imagens do Alibaba Cloud Container Registry (ACR). Máximo: 10 repositórios.

ImageCacheName

String

Sim

Não

Nome do cache de imagem.

Nenhuma.

Sintaxe de ImageRegistryCredential

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

Propriedades de ImageRegistryCredential

Nome da propriedade

Tipo

Obrigatório

Atualização permitida

Descrição

Restrições

Server

String

Não

Não

Endereço do repositório de imagens, sem o prefixo http:// ou https://.

Nenhuma.

UserName

String

Não

Não

Nome de usuário do repositório de imagens.

Nenhuma.

Password

String

Não

Não

Senha do repositório de imagens.

Nenhuma.

Valores de retorno

Fn::GetAtt

  • ImageCacheId: ID do cache de imagem.

Exemplos

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