ALIYUN::CR::Repository is used to create an image repository.

Syntax

{
  "Type": "ALIYUN::CR::Repository",
  "Properties": {
    "RepoNamespace": String,
    "Summary": String,
    "RepoType": String,
    "Detail": String,
    "RepoName": String,
    "RepoSource": Map,
    "InstanceId": String,
    "TagImmutability": Boolean
  }
}

Properties

PropertyTypeRequiredEditableDescriptionConstraint
RepoNamespaceStringYesNoThe namespace to which the image repository belongs. None.
SummaryStringYesYesThe summary of the image repository. The summary must be 1 to 100 characters in length.
RepoTypeStringYesYesThe type of the image repository. Valid values:
  • PUBLIC: the public image repository. Public image repositories support anonymous downloads.
  • PRIVATE: the private image repository. You must log on to private image repositories before you download images from the repositories.
DetailStringNoYesThe description of the image repository. The Markdown format is supported. The description can be up to 2,000 characters in length.
RepoNameStringYesNoThe name of the image repository. The name must be 2 to 64 characters in length, and can contain lowercase letters, digits, periods (.), hyphens (-), and underscores (_).
RepoSourceMapNoNoThe source code repository and image build settings of the image repository. For more information, see RepoSource properties.
InstanceIdStringNoNoThe ID of the instance. Example: cri-xkx6vujuhay0****.
TagImmutabilityBooleanNoYesSpecifies whether the tag that is bound to the image repository is immutable. Valid values:
  • true: The tag is immutable.
  • false: The tag is mutable.

RepoSource syntax

"RepoSource": {
  "SourceRepoNamespace": String,
  "SourceRepoName": String,
  "IsOversea": Boolean,
  "IsDisableCache": Boolean,
  "SourceRepoType": String,
  "IsAutoBuild": Boolean
}

RepoSource properties

PropertyTypeRequiredEditableDescriptionConstraint
SourceRepoNamespaceStringYesNoThe namespace to which the source code repository belongs. None.
SourceRepoNameStringYesNoThe name of the source code repository. None.
IsOverseaBooleanYesNoSpecifies whether to enable image build in data centers outside the Chinese mainland. Valid values:
  • true: enables the feature.
  • false: disable the feature.
IsDisableCacheBooleanYesNoSpecifies whether to disable cache for image build. Valid values:
  • true: disables the feature.
  • false: enables the feature.
SourceRepoTypeStringYesNoThe type of the source code repository. Valid values:
  • PUBLIC
  • PRIVATE
IsAutoBuildBooleanYesNoSpecifies whether to enable automatic image build when code changes. Valid values:
  • true: enables the feature.
  • false: disables the feature.

Return values

Fn::GetAtt

  • RepoId: the ID of the image repository.
  • RepoName: the name of the image repository.
  • InstanceId: the ID of the instance.
  • RepoType: the type of the image repository.
  • RepoNamespace: the name of the image repository namespace.

Examples

  • YAMLformat

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters: {}
    Resources:
      Repository:
        Type: ALIYUN::CR::Repository
        Properties:
          RepoNamespace: DemoRepoNamespace
          Summary: test cr repository
          RepoType: PRIVATE
          RepoName: DemoRepo
    Outputs:
      RepoId:
        Description: The repo id
        Value:
          Fn::GetAtt:
            - Repository
            - RepoId
  • JSONformat

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
      },
      "Resources": {
        "Repository": {
          "Type": "ALIYUN::CR::Repository",
          "Properties": {
            "RepoNamespace": "DemoRepoNamespace",
            "Summary": "test cr repository",
            "RepoType": "PRIVATE",
            "RepoName": "DemoRepo"
          }
        }
      },
      "Outputs": {
        "RepoId": {
          "Description": "The repo id",
          "Value": {
            "Fn::GetAtt": [
              "Repository",
              "RepoId"
            ]
          }
        }
      }
    }

To view more examples, visit Repository.json and Repository.yml.