ALIYUN::CR::Instance

ALIYUN::CR::Instance类型用于创建一个容器镜像企业版实例。

语法

{
  "Type": "ALIYUN::CR::Instance",
  "Properties": {
    "InstanceStorageName": String,
    "InstanceName": String,
    "ResourceGroupId": String,
    "ImageScanner": String,
    "RenewalStatus": String,
    "RenewPeriod": Integer,
    "Period": Integer,
    "InstanceType": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

ImageScanner

String

镜像安全扫描引擎。

取值:

  • ACR

  • SAS

InstanceName

String

容器镜像服务企业版实例的名称。

InstanceType

String

容器镜像服务企业版实例类型。

取值:

  • Basic

  • Standard

  • Advanced

Period

Integer

预付费周期。

单位:月。

按年付费产品请输入12的整数倍。

说明

当创建预付费实例时,本参数必选。

InstanceStorageName

String

容器镜像服务企业版使用的自定义OSS Bucket名称。

RenewalStatus

String

自动续费状态。

取值:

  • AutoRenewal:自动续费。

  • ManualRenewal(默认值):手动续费。

RenewPeriod

Integer

自动续费周期。

单位:月。

说明

当RenewalStatus取值为 AutoRenewal时,本参数必选。

ResourceGroupId

String

资源组ID。

返回值

Fn::GetAtt

  • InstanceName:容器镜像服务企业版实例的名称。

  • ModifiedTime:容器镜像服务企业版实例的更新时间。

  • ResourceGroupId:容器镜像服务企业版实例的资源组ID。

  • InstanceId:容器镜像服务企业版的实例ID。

  • InstanceSpecification:容器镜像服务企业版的规格。

  • CreateTime:容器镜像服务企业版实例的创建时间。

示例

YAML格式

ROSTemplateFormatVersion: '2015-09-01'
Parameters: {}
Resources:
  ExtensionResource:
    Type: ALIYUN::CR::Instance
    Properties:
      Period: 1
      InstanceName: test
      ImageScanner: ACR
      InstanceType: Basic
Outputs:
  InstanceName:
    Description: InstanceName.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - InstanceName
  ModifiedTime:
    Description: Last modification time.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - ModifiedTime
  ResourceGroupId:
    Description: The ID of the resource group.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - ResourceGroupId
  InstanceId:
    Description: The first ID of the resource.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - InstanceId
  InstanceSpecification:
    Description: InstanceSpecification.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - InstanceSpecification
  CreateTime:
    Description: The creation time of the resource.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - CreateTime

JSON格式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
  },
  "Resources": {
    "ExtensionResource": {
      "Type": "ALIYUN::CR::Instance",
      "Properties": {
        "Period": 1,
        "InstanceName": "test",
        "ImageScanner": "ACR",
        "InstanceType": "Basic"
      }
    }
  },
  "Outputs": {
    "InstanceName": {
      "Description": "InstanceName.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "InstanceName"
        ]
      }
    },
    "ModifiedTime": {
      "Description": "Last modification time.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "ModifiedTime"
        ]
      }
    },
    "ResourceGroupId": {
      "Description": "The ID of the resource group.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "ResourceGroupId"
        ]
      }
    },
    "InstanceId": {
      "Description": "The first ID of the resource.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "InstanceId"
        ]
      }
    },
    "InstanceSpecification": {
      "Description": "InstanceSpecification.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "InstanceSpecification"
        ]
      }
    },
    "CreateTime": {
      "Description": "The creation time of the resource.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "CreateTime"
        ]
      }
    }
  }
}