Todos os produtos
Search
Central de documentação

Resource Orchestration Service:ALIYUN::CR::RepoSyncRule

Última atualização: Jun 27, 2026

Crie regras de sincronização para repositórios de imagens do Container Registry (CR).

Sintaxe

{
  "Type": "ALIYUN::CR::RepoSyncRule",
  "Properties": {
    "InstanceId": String,
    "NamespaceName": String,
    "SyncScope": String,
    "SyncRuleName": String,
    "SyncTrigger": String,
    "TargetInstanceId": String,
    "TargetRegionId": String,
    "TargetNamespaceName": String,
    "RepoName": String,
    "RepoNameFilter": String,
    "TagFilter": String,
    "TargetRepoName": String,
    "TargetUserId": String
  }
}

Propriedades

Nome da propriedade

Tipo

Obrigatório

Atualizável

Descrição

Restrições

InstanceId

String

Sim

Não

ID da instância CR de source.

Nenhuma

NamespaceName

String

Sim

Não

Nome do namespace da instância de source.

Nenhuma

SyncScope

String

Sim

Não

Escopo da sincronização.

Valores válidos:

  • REPO: Sincroniza por repositório de imagens.

  • NAMESPACE: Sincroniza por namespace.

SyncRuleName

String

Sim

Não

Nome da regra de sincronização.

Nenhuma

SyncTrigger

String

Sim

Não

Modo de acionamento da sincronização.

Valores válidos:

  • INITIATIVE: Acionado manualmente.

  • PASSIVE: Acionado automaticamente.

TargetInstanceId

String

Sim

Não

ID da instância de destino.

Nenhuma

TargetNamespaceName

String

Sim

Não

Nome do namespace da instância de destino.

Nenhuma

TargetRegionId

String

Sim

Não

ID da região da instância de destino.

Nenhuma

RepoName

String

Não

Não

Nome do repositório da instância de source.

Nenhuma

RepoNameFilter

String

Não

Não

Regra de filtragem por nome de repositório.

Nota

Este parâmetro é válido apenas quando o tipo de sincronização SyncScope é NAMESPACE.

TagFilter

String

Não

Não

Regra de filtro de tag.

Nenhuma

TargetRepoName

String

Não

Não

Nome do repositório de imagens da instância de destino.

Nenhuma

TargetUserId

String

Não

Não

UID da conta proprietária da instância de destino.

Nota

Ao sincronizar imagens entre contas, utilize o UID da conta.

Valores de retorno

Fn::GetAtt

  • SyncRuleId: ID da regra de sincronização.

Exemplo

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  SyncScope:
    Type: String
    Description:
      en: 'The synchronization scope. Valid values: REPO, NAMESPACE'
    AllowedValues:
      - REPO
      - NAMESPACE
    Required: true
  InstanceId:
    Type: String
    Description:
      en: The ID of the CR instance.
    Required: true
  TargetInstanceId:
    Type: String
    Description:
      en: The ID of the destination instance.
    Required: true
  SyncRuleName:
    Type: String
    Description:
      en: The name of the image sync rule.
    Required: true
  NamespaceName:
    Type: String
    Description:
      en: The name of the CR namespace.
    Required: true
  SyncTrigger:
    Type: String
    Description:
      en: 'The mode of triggering the synchronization rule. Valid values: INITIATIVE, PASSIVE'
    AllowedValues:
      - INITIATIVE
      - PASSIVE
    Required: true
  TargetRegionId:
    Type: String
    Description:
      en: The ID of the destination region.
    Required: true
  TargetNamespaceName:
    Type: String
    Description:
      en: The name of the destination namespace.
    Required: true
Resources:
  ExtensionResource:
    Type: ALIYUN::CR::RepoSyncRule
    Properties:
      SyncScope:
        Ref: SyncScope
      InstanceId:
        Ref: InstanceId
      TargetInstanceId:
        Ref: TargetInstanceId
      SyncRuleName:
        Ref: SyncRuleName
      NamespaceName:
        Ref: NamespaceName
      SyncTrigger:
        Ref: SyncTrigger
      TargetRegionId:
        Ref: TargetRegionId
      TargetNamespaceName:
        Ref: TargetNamespaceName
Outputs:
  SyncRuleId:
    Description: The ID of the synchronization rule.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - SyncRuleId
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "SyncScope": {
      "Type": "String",
      "Description": {
        "en": "The synchronization scope. Valid values: REPO, NAMESPACE"
      },
      "AllowedValues": [
        "REPO",
        "NAMESPACE"
      ],
      "Required": true
    },
    "InstanceId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the CR instance."
      },
      "Required": true
    },
    "TargetInstanceId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the destination instance."
      },
      "Required": true
    },
    "SyncRuleName": {
      "Type": "String",
      "Description": {
        "en": "The name of the image sync rule."
      },
      "Required": true
    },
    "NamespaceName": {
      "Type": "String",
      "Description": {
        "en": "The name of the CR namespace."
      },
      "Required": true
    },
    "SyncTrigger": {
      "Type": "String",
      "Description": {
        "en": "The mode of triggering the synchronization rule. Valid values: INITIATIVE, PASSIVE"
      },
      "AllowedValues": [
        "INITIATIVE",
        "PASSIVE"
      ],
      "Required": true
    },
    "TargetRegionId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the destination region."
      },
      "Required": true
    },
    "TargetNamespaceName": {
      "Type": "String",
      "Description": {
        "en": "The name of the destination namespace."
      },
      "Required": true
    }
  },
  "Resources": {
    "ExtensionResource": {
      "Type": "ALIYUN::CR::RepoSyncRule",
      "Properties": {
        "SyncScope": {
          "Ref": "SyncScope"
        },
        "InstanceId": {
          "Ref": "InstanceId"
        },
        "TargetInstanceId": {
          "Ref": "TargetInstanceId"
        },
        "SyncRuleName": {
          "Ref": "SyncRuleName"
        },
        "NamespaceName": {
          "Ref": "NamespaceName"
        },
        "SyncTrigger": {
          "Ref": "SyncTrigger"
        },
        "TargetRegionId": {
          "Ref": "TargetRegionId"
        },
        "TargetNamespaceName": {
          "Ref": "TargetNamespaceName"
        }
      }
    }
  },
  "Outputs": {
    "SyncRuleId": {
      "Description": "The ID of the synchronization rule.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "SyncRuleId"
        ]
      }
    }
  }
}