The ALIYUN::CR::RepoSyncRule resource creates rules to synchronize images between repositories.
Syntax
{
"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
}
}Properties
Property Name | Type | Required | Updatable | Description | Constraints |
InstanceId | String | Yes | No | The ID of the source CR instance. | None |
NamespaceName | String | Yes | No | The name of the source instance namespace. | None |
SyncScope | String | Yes | No | The synchronization type. | Valid values:
|
SyncRuleName | String | Yes | No | The name of the synchronization rule. | None |
SyncTrigger | String | Yes | No | Trigger the synchronization action. | Valid values:
|
TargetInstanceId | String | Yes | No | The ID of the target instance. | None |
TargetNamespaceName | String | Yes | No | The name of the target instance namespace. | None |
TargetRegionId | String | Yes | No | The ID of the target instance region. | None |
RepoName | String | No | No | The name of the source instance repository. | None |
RepoNameFilter | String | No | No | Repository filtering rule | Note This parameter is valid only when the synchronization type SyncScope is |
TagFilter | String | No | No | The tag filter rule. | None |
TargetRepoName | String | No | No | The name of the target instance image repository. | None |
TargetUserId | String | No | No | The UID of the account where the target instance resides. | Note When synchronizing images across accounts, use the account UID. |
Return Values
Fn::GetAtt
SyncRuleId: the synchronization rule ID.
Example
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"
]
}
}
}
}