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 | 否 | 否 | 镜像安全扫描引擎。 | 取值: 
 | 
| InstanceName | String | 是 | 否 | 容器镜像服务企业版实例的名称。 | 无 | 
| InstanceType | String | 是 | 否 | 容器镜像服务企业版实例类型。 | 取值: 
 | 
| Period | Integer | 否 | 否 | 预付费周期。 | 单位:月。 按年付费产品请输入12的整数倍。 说明  当创建预付费实例时,本参数必选。 | 
| InstanceStorageName | String | 否 | 否 | 容器镜像服务企业版使用的自定义OSS Bucket名称。 | 无 | 
| RenewalStatus | String | 否 | 否 | 自动续费状态。 | 取值: 
 | 
| RenewPeriod | Integer | 否 | 否 | 自动续费周期。 | 单位:月。 说明  当RenewalStatus取值为 AutoRenewal时,本参数必选。 | 
| ResourceGroupId | String | 否 | 是 | 资源组ID。 | 无 | 
返回值
Fn::GetAtt
- InstanceName:容器镜像服务企业版实例的名称。 
- ModifiedTime:容器镜像服务企业版实例的更新时间。 
- ResourceGroupId:容器镜像服务企业版实例的资源组ID。 
- InstanceId:容器镜像服务企业版的实例ID。 
- InstanceSpecification:容器镜像服务企业版的规格。 
- CreateTime:容器镜像服务企业版实例的创建时间。 
示例
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{
  "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"
        ]
      }
    }
  }
}该文章对您有帮助吗?