All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::CR::InstanceV2

Last Updated:Jul 20, 2026

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

Syntax

{
  "Type": "ALIYUN::CR::InstanceV2",
  "Properties": {
    "InstanceName": String,
    "InstanceType": String,
    "PaymentType": String,
    "CustomOssBucket": String,
    "DefaultOssBucket": Boolean,
    "ImageScanner": String,
    "Period": Integer,
    "Password": String,
    "ResourceGroupId": String,
    "RenewalStatus": String,
    "RenewPeriod": Integer
  }
}

Properties

Property

Type

Required

Allow Update

Description

Constraints

InstanceName

String

Yes

No

The instance name.

The value must be 3 to 30 characters in length and can contain lowercase letters, digits, and hyphens (-). The name cannot start or end with a hyphen.

InstanceType

String

Yes

No

The instance type of Container Registry Enterprise Edition.

Valid values:

  • Basic: Basic edition.

  • Standard: Standard edition.

  • Advanced: Advanced edition.

PaymentType

String

Yes

No

The payment type.

Valid values:

  • Subscription: Prepaid.

CustomOssBucket

String

No

No

The name of the custom OSS bucket.

None

DefaultOssBucket

Boolean

No

No

Specifies whether to use the default OSS bucket.

Valid values:

  • true: Use the default OSS bucket.

  • false: Use a custom OSS bucket.

ImageScanner

String

No

No

The security scanning engine for Container Registry Enterprise Edition.

Valid values:

  • ACR: Use the built-in Trivy scanning engine.

  • SAS: Use the enhanced cloud security scanning engine.

Password

String

No

Yes

The login password.

The password must be 8 to 32 characters in length and must contain at least two of the following types: letters, symbols, and digits.

Period

Integer

No

No

The prepayment period.

Unit: months. For annual billing, enter a multiple of 12.

Note

This parameter is required when you create a prepaid instance.

RenewalStatus

String

No

No

The auto-renewal status.

Valid values:

  • AutoRenewal: Auto-renewal.

  • ManualRenewal: Manual renewal.

Default: ManualRenewal.

RenewPeriod

Integer

No

No

The auto-renewal period.

Unit: months.

Note

This parameter is required when RenewalStatus is set to AutoRenewal.

ResourceGroupId

String

No

Yes

The resource group ID.

None

Return values

Fn::GetAtt

  • InstanceName: The name of the Container Registry instance.

  • ModifiedTime: The last modification time of the instance.

  • ResourceGroupId: The resource group ID.

  • EndTime: The expiration time of the instance.

  • InstanceIssue: Issues with the instance.

  • InstanceId: The ID of the Container Registry instance.

  • CreateTime: The creation time of the instance.

  • InstanceEndpoints: The network access endpoints of the instance.

  • RenewalStatus: The auto-renewal status.

  • RenewPeriod: The auto-renewal period, in months.

  • PaymentType: The payment type.

Examples

Scenario 1: Create a Container Registry Enterprise Edition instance (Basic edition)

ROSTemplateFormatVersion: '2015-09-01'
Description:
  en: Create a Container Registry Enterprise Edition instance (Basic edition) for a private image repository.
Parameters:
  InstanceName:
    Type: String
    Label: Container Registry instance name
    Description: Instance name. 3 to 30 characters in length. Can contain lowercase letters, digits, and hyphens (-). Cannot start or end with a hyphen.
    MinLength: 3
    MaxLength: 30
    Default: acr-enterprise-demo
Resources:
  Instance:
    Type: ALIYUN::CR::InstanceV2
    Properties:
      InstanceName:
        Ref: InstanceName
      PaymentType: Subscription
      InstanceType: Basic
      Period: 1
      DefaultOssBucket: true
Outputs:
  InstanceId:
    Description: Container Registry instance ID.
    Value:
      Fn::GetAtt:
        - Instance
        - InstanceId
  InstanceName:
    Description: Container Registry instance name.
    Value:
      Fn::GetAtt:
        - Instance
        - InstanceName
  InstanceEndpoints:
    Description: Network access endpoints of the Container Registry instance.
    Value:
      Fn::GetAtt:
        - Instance
        - InstanceEndpoints
  EndTime:
    Description: Expiration time of the Container Registry instance.
    Value:
      Fn::GetAtt:
        - Instance
        - EndTime
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Description": {
    "en": "Create a Container Registry Enterprise Edition instance (Basic edition) for a private image repository."
  },
  "Parameters": {
    "InstanceName": {
      "Type": "String",
      "Label": "Container Registry instance name",
      "Description": "Instance name. 3 to 30 characters in length. Can contain lowercase letters, digits, and hyphens (-). Cannot start or end with a hyphen.",
      "MinLength": 3,
      "MaxLength": 30,
      "Default": "acr-enterprise-demo"
    }
  },
  "Resources": {
    "Instance": {
      "Type": "ALIYUN::CR::InstanceV2",
      "Properties": {
        "InstanceName": {
          "Ref": "InstanceName"
        },
        "PaymentType": "Subscription",
        "InstanceType": "Basic",
        "Period": 1,
        "DefaultOssBucket": true
      }
    }
  },
  "Outputs": {
    "InstanceId": {
      "Description": "Container Registry instance ID.",
      "Value": {
        "Fn::GetAtt": ["Instance", "InstanceId"]
      }
    },
    "InstanceName": {
      "Description": "Container Registry instance name.",
      "Value": {
        "Fn::GetAtt": ["Instance", "InstanceName"]
      }
    },
    "InstanceEndpoints": {
      "Description": "Network access endpoints of the Container Registry instance.",
      "Value": {
        "Fn::GetAtt": ["Instance", "InstanceEndpoints"]
      }
    },
    "EndTime": {
      "Description": "Expiration time of the Container Registry instance.",
      "Value": {
        "Fn::GetAtt": ["Instance", "EndTime"]
      }
    }
  }
}

Scenario 2: Create a Standard edition instance with auto-renewal, SAS image security scanning, custom OSS storage, and resource group

ROSTemplateFormatVersion: '2015-09-01'
Description:
  en: Create a Container Registry Enterprise Edition instance with auto-renewal, SAS image security scanning, custom OSS storage, and resource group.
Parameters:
  InstanceName:
    Type: String
    Label: Container Registry instance name
    Description: Instance name. 3 to 30 characters in length. Can contain lowercase letters, digits, and hyphens (-). Cannot start or end with a hyphen.
    MinLength: 3
    MaxLength: 30
    Default: acr-enterprise-prod
  InstanceType:
    Type: String
    Label: Instance type
    Description: Container Registry Enterprise Edition instance type. Basic: Basic edition. Standard: Standard edition. Advanced: Advanced edition.
    AllowedValues:
      - Basic
      - Standard
      - Advanced
    Default: Standard
  Period:
    Type: Number
    Label: Subscription period
    Description: Prepayment period in months. For annual billing, enter a multiple of 12.
    AllowedValues:
      - 1
      - 2
      - 3
      - 6
      - 12
      - 24
      - 36
      - 48
      - 60
    Default: 12
  RenewalStatus:
    Type: String
    Label: Renewal method
    Description: Auto-renewal status. AutoRenewal: auto-renewal. ManualRenewal: manual renewal.
    AllowedValues:
      - AutoRenewal
      - ManualRenewal
    Default: ManualRenewal
  RenewPeriod:
    Type: Number
    Label: Auto-renewal period
    Description: Auto-renewal period in months. Takes effect only when RenewalStatus is set to AutoRenewal.
    MinValue: 1
    MaxValue: 12
    Default: 1
  ImageScanner:
    Type: String
    Label: Image security scanning engine
    Description: Image security scanning engine. ACR: built-in Trivy scanning engine. SAS: enhanced cloud security scanning engine.
    AllowedValues:
      - ACR
      - SAS
    Default: SAS
  UseDefaultOssBucket:
    Type: Boolean
    Label: Use default OSS bucket
    Description: true: use the default OSS bucket. false: use a custom OSS bucket.
    Default: true
  CustomOssBucket:
    Type: String
    Label: Custom OSS bucket name
    Description: Custom OSS bucket name. Takes effect only when UseDefaultOssBucket is set to false.
    Default: ''
  ResourceGroupId:
    Type: String
    Label: Resource group ID
    Description: Resource group ID. You can view IDs in the Resource Management console. If left empty, the default resource group is used.
    AssociationProperty: 'ALIYUN::ResourceManager::ResourceGroup::ResourceGroupId'
    Default: ''
Conditions:
  IsAutoRenewal:
    Fn::Equals:
      - Ref: RenewalStatus
      - AutoRenewal
  UseCustomBucket:
    Fn::Equals:
      - Ref: UseDefaultOssBucket
      - false
  HasResourceGroup:
    Fn::Not:
      - Fn::Equals:
          - Ref: ResourceGroupId
          - ''
Resources:
  Instance:
    Type: ALIYUN::CR::InstanceV2
    Properties:
      InstanceName:
        Ref: InstanceName
      PaymentType: Subscription
      InstanceType:
        Ref: InstanceType
      Period:
        Ref: Period
      RenewalStatus:
        Ref: RenewalStatus
      RenewPeriod:
        Fn::If:
          - IsAutoRenewal
          - Ref: RenewPeriod
          - Ref: ALIYUN::NoValue
      ImageScanner:
        Ref: ImageScanner
      DefaultOssBucket:
        Ref: UseDefaultOssBucket
      CustomOssBucket:
        Fn::If:
          - UseCustomBucket
          - Ref: CustomOssBucket
          - Ref: ALIYUN::NoValue
      ResourceGroupId:
        Fn::If:
          - HasResourceGroup
          - Ref: ResourceGroupId
          - Ref: ALIYUN::NoValue
Outputs:
  InstanceId:
    Description: Container Registry instance ID.
    Value:
      Fn::GetAtt:
        - Instance
        - InstanceId
  InstanceName:
    Description: Container Registry instance name.
    Value:
      Fn::GetAtt:
        - Instance
        - InstanceName
  InstanceEndpoints:
    Description: Network access endpoints of the Container Registry instance.
    Value:
      Fn::GetAtt:
        - Instance
        - InstanceEndpoints
  RenewalStatus:
    Description: Auto-renewal status.
    Value:
      Fn::GetAtt:
        - Instance
        - RenewalStatus
  ImageScanner:
    Description: Image security scanning engine.
    Value:
      Ref: ImageScanner
  EndTime:
    Description: Expiration time of the Container Registry instance.
    Value:
      Fn::GetAtt:
        - Instance
        - EndTime
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Description": {
    "en": "Create a Container Registry Enterprise Edition instance with auto-renewal, SAS image security scanning, custom OSS storage, and resource group."
  },
  "Parameters": {
    "InstanceName": {
      "Type": "String",
      "Label": "Container Registry instance name",
      "Description": "Instance name. 3 to 30 characters in length. Can contain lowercase letters, digits, and hyphens (-). Cannot start or end with a hyphen.",
      "MinLength": 3,
      "MaxLength": 30,
      "Default": "acr-enterprise-prod"
    },
    "InstanceType": {
      "Type": "String",
      "Label": "Instance type",
      "Description": "Container Registry Enterprise Edition instance type. Basic: Basic edition. Standard: Standard edition. Advanced: Advanced edition.",
      "AllowedValues": ["Basic", "Standard", "Advanced"],
      "Default": "Standard"
    },
    "Period": {
      "Type": "Number",
      "Label": "Subscription period",
      "Description": "Prepayment period in months. For annual billing, enter a multiple of 12.",
      "AllowedValues": [1, 2, 3, 6, 12, 24, 36, 48, 60],
      "Default": 12
    },
    "RenewalStatus": {
      "Type": "String",
      "Label": "Renewal method",
      "Description": "Auto-renewal status. AutoRenewal: auto-renewal. ManualRenewal: manual renewal.",
      "AllowedValues": ["AutoRenewal", "ManualRenewal"],
      "Default": "ManualRenewal"
    },
    "RenewPeriod": {
      "Type": "Number",
      "Label": "Auto-renewal period",
      "Description": "Auto-renewal period in months. Takes effect only when RenewalStatus is set to AutoRenewal.",
      "MinValue": 1,
      "MaxValue": 12,
      "Default": 1
    },
    "ImageScanner": {
      "Type": "String",
      "Label": "Image security scanning engine",
      "Description": "Image security scanning engine. ACR: built-in Trivy scanning engine. SAS: enhanced cloud security scanning engine.",
      "AllowedValues": ["ACR", "SAS"],
      "Default": "SAS"
    },
    "UseDefaultOssBucket": {
      "Type": "Boolean",
      "Label": "Use default OSS bucket",
      "Description": "true: use the default OSS bucket. false: use a custom OSS bucket.",
      "Default": true
    },
    "CustomOssBucket": {
      "Type": "String",
      "Label": "Custom OSS bucket name",
      "Description": "Custom OSS bucket name. Takes effect only when UseDefaultOssBucket is set to false.",
      "Default": ""
    },
    "ResourceGroupId": {
      "Type": "String",
      "Label": "Resource group ID",
      "Description": "Resource group ID. You can view IDs in the Resource Management console. If left empty, the default resource group is used.",
      "AssociationProperty": "ALIYUN::ResourceManager::ResourceGroup::ResourceGroupId",
      "Default": ""
    }
  },
  "Conditions": {
    "IsAutoRenewal": {
      "Fn::Equals": [{ "Ref": "RenewalStatus" }, "AutoRenewal"]
    },
    "UseCustomBucket": {
      "Fn::Equals": [{ "Ref": "UseDefaultOssBucket" }, false]
    },
    "HasResourceGroup": {
      "Fn::Not": [{ "Fn::Equals": [{ "Ref": "ResourceGroupId" }, ""] }]
    }
  },
  "Resources": {
    "Instance": {
      "Type": "ALIYUN::CR::InstanceV2",
      "Properties": {
        "InstanceName": { "Ref": "InstanceName" },
        "PaymentType": "Subscription",
        "InstanceType": { "Ref": "InstanceType" },
        "Period": { "Ref": "Period" },
        "RenewalStatus": { "Ref": "RenewalStatus" },
        "RenewPeriod": {
          "Fn::If": ["IsAutoRenewal", { "Ref": "RenewPeriod" }, { "Ref": "ALIYUN::NoValue" }]
        },
        "ImageScanner": { "Ref": "ImageScanner" },
        "DefaultOssBucket": { "Ref": "UseDefaultOssBucket" },
        "CustomOssBucket": {
          "Fn::If": ["UseCustomBucket", { "Ref": "CustomOssBucket" }, { "Ref": "ALIYUN::NoValue" }]
        },
        "ResourceGroupId": {
          "Fn::If": ["HasResourceGroup", { "Ref": "ResourceGroupId" }, { "Ref": "ALIYUN::NoValue" }]
        }
      }
    }
  },
  "Outputs": {
    "InstanceId": {
      "Description": "Container Registry instance ID.",
      "Value": { "Fn::GetAtt": ["Instance", "InstanceId"] }
    },
    "InstanceName": {
      "Description": "Container Registry instance name.",
      "Value": { "Fn::GetAtt": ["Instance", "InstanceName"] }
    },
    "InstanceEndpoints": {
      "Description": "Network access endpoints of the Container Registry instance.",
      "Value": { "Fn::GetAtt": ["Instance", "InstanceEndpoints"] }
    },
    "RenewalStatus": {
      "Description": "Auto-renewal status.",
      "Value": { "Fn::GetAtt": ["Instance", "RenewalStatus"] }
    },
    "ImageScanner": {
      "Description": "Image security scanning engine.",
      "Value": { "Ref": "ImageScanner" }
    },
    "EndTime": {
      "Description": "Expiration time of the Container Registry instance.",
      "Value": { "Fn::GetAtt": ["Instance", "EndTime"] }
    }
  }
}

Scenario 3: Create an Enterprise Edition instance with a namespace, image repository, RAM push account, and VPC private network access

ROSTemplateFormatVersion: '2015-09-01'
Description:
  en: Create a Container Registry Enterprise Edition instance with a namespace, image repository, RAM push account, and VPC private network access for end-to-end enterprise image repository initialization.
Parameters:
  InstanceName:
    Type: String
    Label: Container Registry instance name
    Description: Instance name. 3 to 30 characters in length. Can contain lowercase letters, digits, and hyphens (-). Cannot start or end with a hyphen.
    MinLength: 3
    MaxLength: 30
    Default: acr-enterprise-ci
  Namespace:
    Type: String
    Label: Namespace name
    Description: Image repository namespace name. 2 to 30 characters in length.
    MinLength: 2
    MaxLength: 30
    Default: app
  RepoName:
    Type: String
    Label: Repository name
    Description: Image repository name. 1 to 64 characters in length.
    MinLength: 1
    MaxLength: 64
    Default: web
  RamUserName:
    Type: String
    Label: RAM username
    Description: Name of the RAM user for pushing images.
    Default: acr-push-user
  ZoneId:
    Type: String
    Label: Zone
    Description: Zone of the VPC vSwitch.
    AssociationProperty: ALIYUN::ECS::Instance::ZoneId
Resources:
  Instance:
    Type: ALIYUN::CR::InstanceV2
    Properties:
      InstanceName:
        Ref: InstanceName
      PaymentType: Subscription
      InstanceType: Basic
      Period: 1
      DefaultOssBucket: true
  CrNamespace:
    Type: ALIYUN::CR::Namespace
    Properties:
      InstanceId:
        Fn::GetAtt:
          - Instance
          - InstanceId
      Namespace:
        Ref: Namespace
      AutoCreate: false
      DefaultVisibility: PRIVATE
    DependsOn: Instance
  Repository:
    Type: ALIYUN::CR::Repository
    Properties:
      InstanceId:
        Fn::GetAtt:
          - Instance
          - InstanceId
      RepoNamespace:
        Ref: Namespace
      RepoName:
        Ref: RepoName
      RepoType: PRIVATE
      Summary: Demo image repository created by ROS template
      Detail: This repository stores application images and supports push and pull operations by a RAM push account.
    DependsOn: CrNamespace
  RamUser:
    Type: ALIYUN::RAM::User
    Properties:
      UserName:
        Ref: RamUserName
      DisplayName: ACR Push User
      Comments: Used to push images to the Container Registry Enterprise Edition instance.
      DeletionForce: true
      PolicyAttachments:
        System:
          - AliyunContainerRegistryFullAccess
  AccessKey:
    Type: ALIYUN::RAM::AccessKey
    Properties:
      UserName:
        Fn::GetAtt:
          - RamUser
          - UserName
    DependsOn: RamUser
  Vpc:
    Type: ALIYUN::ECS::VPC
    Properties:
      CidrBlock: 192.168.0.0/16
      VpcName: acr-demo-vpc
  VSwitch:
    Type: ALIYUN::ECS::VSwitch
    Properties:
      ZoneId:
        Ref: ZoneId
      CidrBlock: 192.168.0.0/24
      VpcId:
        Ref: Vpc
      VSwitchName: acr-demo-vsw
  VpcLink:
    Type: ALIYUN::CR::InstanceVpcEndpointLinkedVpc
    Properties:
      InstanceId:
        Fn::GetAtt:
          - Instance
          - InstanceId
      VpcId:
        Ref: Vpc
      VswitchId:
        Ref: VSwitch
      ModuleName: Registry
      EnableCreateDNSRecordInPvzt: true
    DependsOn: Instance
Outputs:
  InstanceId:
    Description: Container Registry instance ID.
    Value:
      Fn::GetAtt:
        - Instance
        - InstanceId
  InstanceEndpoints:
    Description: Network access endpoints of the Container Registry instance (public and VPC endpoints).
    Value:
      Fn::GetAtt:
        - Instance
        - InstanceEndpoints
  NamespaceName:
    Description: Namespace name.
    Value:
      Fn::GetAtt:
        - CrNamespace
        - Namespace
  NamespaceId:
    Description: Namespace ID.
    Value:
      Fn::GetAtt:
        - CrNamespace
        - NamespaceId
  RepoId:
    Description: Image repository ID.
    Value:
      Fn::GetAtt:
        - Repository
        - RepoId
  RepoName:
    Description: Image repository name.
    Value:
      Fn::GetAtt:
        - Repository
        - RepoName
  AccessKeyId:
    Description: AccessKey ID of the RAM push account. Used for docker login and image push.
    Value:
      Fn::GetAtt:
        - AccessKey
        - AccessKeyId
  AccessKeySecret:
    Description: AccessKey secret of the RAM push account. Store securely. Used as the password for docker login.
    Value:
      Fn::GetAtt:
        - AccessKey
        - AccessKeySecret
  LoginCommand:
    Description: Sample container image login command. Replace <endpoint> with the public endpoint from InstanceEndpoints.
    Value:
      Fn::Sub:
        - docker login --username '${AccessKeyId}' --password-stdin <endpoint>
        - AccessKeyId:
            Fn::GetAtt:
              - AccessKey
              - AccessKeyId
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Description": {
    "en": "Create a Container Registry Enterprise Edition instance with a namespace, image repository, RAM push account, and VPC private network access for end-to-end enterprise image repository initialization."
  },
  "Parameters": {
    "InstanceName": {
      "Type": "String",
      "Label": "Container Registry instance name",
      "Description": "Instance name. 3 to 30 characters in length. Can contain lowercase letters, digits, and hyphens (-). Cannot start or end with a hyphen.",
      "MinLength": 3,
      "MaxLength": 30,
      "Default": "acr-enterprise-ci"
    },
    "Namespace": {
      "Type": "String",
      "Label": "Namespace name",
      "Description": "Image repository namespace name. 2 to 30 characters in length.",
      "MinLength": 2,
      "MaxLength": 30,
      "Default": "app"
    },
    "RepoName": {
      "Type": "String",
      "Label": "Repository name",
      "Description": "Image repository name. 1 to 64 characters in length.",
      "MinLength": 1,
      "MaxLength": 64,
      "Default": "web"
    },
    "RamUserName": {
      "Type": "String",
      "Label": "RAM username",
      "Description": "Name of the RAM user for pushing images.",
      "Default": "acr-push-user"
    },
    "ZoneId": {
      "Type": "String",
      "Label": "Zone",
      "Description": "Zone of the VPC vSwitch.",
      "AssociationProperty": "ALIYUN::ECS::Instance::ZoneId"
    }
  },
  "Resources": {
    "Instance": {
      "Type": "ALIYUN::CR::InstanceV2",
      "Properties": {
        "InstanceName": { "Ref": "InstanceName" },
        "PaymentType": "Subscription",
        "InstanceType": "Basic",
        "Period": 1,
        "DefaultOssBucket": true
      }
    },
    "CrNamespace": {
      "Type": "ALIYUN::CR::Namespace",
      "Properties": {
        "InstanceId": { "Fn::GetAtt": ["Instance", "InstanceId"] },
        "Namespace": { "Ref": "Namespace" },
        "AutoCreate": false,
        "DefaultVisibility": "PRIVATE"
      },
      "DependsOn": "Instance"
    },
    "Repository": {
      "Type": "ALIYUN::CR::Repository",
      "Properties": {
        "InstanceId": { "Fn::GetAtt": ["Instance", "InstanceId"] },
        "RepoNamespace": { "Ref": "Namespace" },
        "RepoName": { "Ref": "RepoName" },
        "RepoType": "PRIVATE",
        "Summary": "Demo image repository created by ROS template",
        "Detail": "This repository stores application images and supports push and pull operations by a RAM push account."
      },
      "DependsOn": "CrNamespace"
    },
    "RamUser": {
      "Type": "ALIYUN::RAM::User",
      "Properties": {
        "UserName": { "Ref": "RamUserName" },
        "DisplayName": "ACR Push User",
        "Comments": "Used to push images to the Container Registry Enterprise Edition instance.",
        "DeletionForce": true,
        "PolicyAttachments": {
          "System": ["AliyunContainerRegistryFullAccess"]
        }
      }
    },
    "AccessKey": {
      "Type": "ALIYUN::RAM::AccessKey",
      "Properties": {
        "UserName": { "Fn::GetAtt": ["RamUser", "UserName"] }
      },
      "DependsOn": "RamUser"
    },
    "Vpc": {
      "Type": "ALIYUN::ECS::VPC",
      "Properties": {
        "CidrBlock": "192.168.0.0/16",
        "VpcName": "acr-demo-vpc"
      }
    },
    "VSwitch": {
      "Type": "ALIYUN::ECS::VSwitch",
      "Properties": {
        "ZoneId": { "Ref": "ZoneId" },
        "CidrBlock": "192.168.0.0/24",
        "VpcId": { "Ref": "Vpc" },
        "VSwitchName": "acr-demo-vsw"
      }
    },
    "VpcLink": {
      "Type": "ALIYUN::CR::InstanceVpcEndpointLinkedVpc",
      "Properties": {
        "InstanceId": { "Fn::GetAtt": ["Instance", "InstanceId"] },
        "VpcId": { "Ref": "Vpc" },
        "VswitchId": { "Ref": "VSwitch" },
        "ModuleName": "Registry",
        "EnableCreateDNSRecordInPvzt": true
      },
      "DependsOn": "Instance"
    }
  },
  "Outputs": {
    "InstanceId": {
      "Description": "Container Registry instance ID.",
      "Value": { "Fn::GetAtt": ["Instance", "InstanceId"] }
    },
    "InstanceEndpoints": {
      "Description": "Network access endpoints of the Container Registry instance (public and VPC endpoints).",
      "Value": { "Fn::GetAtt": ["Instance", "InstanceEndpoints"] }
    },
    "NamespaceName": {
      "Description": "Namespace name.",
      "Value": { "Fn::GetAtt": ["CrNamespace", "Namespace"] }
    },
    "NamespaceId": {
      "Description": "Namespace ID.",
      "Value": { "Fn::GetAtt": ["CrNamespace", "NamespaceId"] }
    },
    "RepoId": {
      "Description": "Image repository ID.",
      "Value": { "Fn::GetAtt": ["Repository", "RepoId"] }
    },
    "RepoName": {
      "Description": "Image repository name.",
      "Value": { "Fn::GetAtt": ["Repository", "RepoName"] }
    },
    "AccessKeyId": {
      "Description": "AccessKey ID of the RAM push account. Used for docker login and image push.",
      "Value": { "Fn::GetAtt": ["AccessKey", "AccessKeyId"] }
    },
    "AccessKeySecret": {
      "Description": "AccessKey secret of the RAM push account. Store securely. Used as the password for docker login.",
      "Value": { "Fn::GetAtt": ["AccessKey", "AccessKeySecret"] }
    },
    "LoginCommand": {
      "Description": "Sample container image login command. Replace <endpoint> with the public endpoint from InstanceEndpoints.",
      "Value": {
        "Fn::Sub": [
          "docker login --username '${AccessKeyId}' --password-stdin <endpoint>",
          { "AccessKeyId": { "Fn::GetAtt": ["AccessKey", "AccessKeyId"] } }
        ]
      }
    }
  }
}