All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::CR::Instance

Last Updated:Sep 13, 2023

ALIYUN::CR::Instance is used to create a Container Registry Enterprise Edition instance.

Syntax

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

Properties

Property

Type

Required

Editable

Description

Constraint

InstanceStorageName

String

No

No

The name of the custom Object Storage Service (OSS) bucket that you want to use for the instance.

None

InstanceName

String

Yes

No

The instance name.

None

ResourceGroupId

String

No

Yes

The ID of the resource group to which the instance belongs.

None

ImageScanner

String

Yes

No

The type of the security scan engine for images.

Valid values:

  • ACR

  • SAS

RenewalStatus

String

No

No

The auto-renewal status of the instance.

Valid values:

  • AutoRenewal

  • ManualRenewal (default)

RenewPeriod

Integer

No

No

The auto-renewal cycle of the instance.

Unit: month.

Note

This property must be specified when RenewalStatus is set to AutoRenewal.

Period

Integer

Yes

No

The subscription duration.

Unit: month.

If you want to create a yearly subscription instance, specify an integral multiple of 12.

Note

This property must be specified when you create a subscription instance.

InstanceType

String

Yes

No

The instance type.

Valid values:

  • Basic

  • Standard

  • Advanced

Return values

Fn::GetAtt

  • InstanceName: the instance name.

  • ModifiedTime: the time when the instance was modified.

  • ResourceGroupId: the ID of the resource group to which the instance belongs.

  • InstanceId: the instance ID.

  • InstanceSpecification: the instance specification.

  • CreateTime: the time when the instance was created.

Examples

  • YAML format

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters: {}
    Resources:
      ExtensionResource:
        Type: ALIYUN::CR::Instance
        Properties:
          InstanceName: TestInstance
          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 format

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
      },
      "Resources": {
        "ExtensionResource": {
          "Type": "ALIYUN::CR::Instance",
          "Properties": {
            "InstanceName": "TestInstance",
            "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"
            ]
          }
        }
      }
    }