DATASOURCE::ECI::ImageCaches

DATASOURCE::ECI::ImageCaches类型用于批量查询镜像缓存信息。

语法

{
  "Type": "DATASOURCE::ECI::ImageCaches",
  "Properties": {
    "SnapshotId": String,
    "ResourceGroupId": String,
    "ImageCacheId": String,
    "ImageCacheName": String,
    "Limit": Integer,
    "RefreshOptions": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

SnapshotId

String

镜像缓存对应的快照ID。

ResourceGroupId

String

所属资源组ID。

ImageCacheId

String

镜像缓存ID。

ImageCacheName

String

镜像缓存名称。

Limit

Integer

查询结果条数上限。

RefreshOptions

String

当资源栈更新时,数据源资源的刷新策略。

有效值:

  • Never(默认值):更新堆栈时,从不刷新数据源资源。

  • Always:更新堆栈时,始终刷新数据源资源。

返回值

Fn::GetAtt

  • ImageCacheIds:镜像缓存ID列表。

  • ImageCaches:镜像缓存列表。

属性名称

类型

描述

约束

ImageCacheIds

List

镜像缓存ID列表。

ImageCaches

List

镜像缓存列表。

ResourceGroupId

String

所属资源组ID。

Events

List

镜像缓存拉取镜像事件信息。

Images

List

镜像缓存包含的镜像列表。

ImageCacheId

String

镜像缓存ID。

Progress

String

镜像缓存对应快照的创建进度。

ContainerGroupId

String

容器组ID。

SnapshotId

String

镜像缓存对应的快照ID。

ImageCacheName

String

镜像缓存名称。

ExpireDateTime

String

过期时间。

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  ImageCacheId:
    Description:
      en: ImageCacheId.
    Required: false
    Type: String
  ImageCacheName:
    Description:
      en: ImageCacheName.
    Required: false
    Type: String
  Limit:
    Description:
      en: Number of pages.
    Required: false
    Type: Number
  ResourceGroupId:
    AssociationProperty: ALIYUN::ECS::ResourceGroup::ResourceGroupId
    Description:
      en: ResourceGroupId.
    Required: false
    Type: String
  SnapshotId:
    Description:
      en: SnapshotId.
    Required: false
    Type: String
Resources:
  ExtensionDataSource:
    Properties:
      ImageCacheId:
        Ref: ImageCacheId
      ImageCacheName:
        Ref: ImageCacheName
      Limit:
        Ref: Limit
      ResourceGroupId:
        Ref: ResourceGroupId
      SnapshotId:
        Ref: SnapshotId
    Type: DATASOURCE::ECI::ImageCaches
Outputs:
  ImageCacheIds:
    Description: The list of image cache IDs.
    Value:
      Fn::GetAtt:
      - ExtensionDataSource
      - ImageCacheIds
  ImageCaches:
    Description: The list of image caches.
    Value:
      Fn::GetAtt:
      - ExtensionDataSource
      - ImageCaches
                        
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "SnapshotId": {
      "Type": "String",
      "Description": {
        "en": "SnapshotId."
      },
      "Required": false
    },
    "ResourceGroupId": {
      "AssociationProperty": "ALIYUN::ECS::ResourceGroup::ResourceGroupId",
      "Type": "String",
      "Description": {
        "en": "ResourceGroupId."
      },
      "Required": false
    },
    "ImageCacheId": {
      "Type": "String",
      "Description": {
        "en": "ImageCacheId."
      },
      "Required": false
    },
    "ImageCacheName": {
      "Type": "String",
      "Description": {
        "en": "ImageCacheName."
      },
      "Required": false
    },
    "Limit": {
      "Type": "Number",
      "Description": {
        "en": "Number of pages."
      },
      "Required": false
    }
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::ECI::ImageCaches",
      "Properties": {
        "SnapshotId": {
          "Ref": "SnapshotId"
        },
        "ResourceGroupId": {
          "Ref": "ResourceGroupId"
        },
        "ImageCacheId": {
          "Ref": "ImageCacheId"
        },
        "ImageCacheName": {
          "Ref": "ImageCacheName"
        },
        "Limit": {
          "Ref": "Limit"
        }
      }
    }
  },
  "Outputs": {
    "ImageCacheIds": {
      "Description": "The list of image cache IDs.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ImageCacheIds"
        ]
      }
    },
    "ImageCaches": {
      "Description": "The list of image caches.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ImageCaches"
        ]
      }
    }
  }
}