The ALIYUN::CR::ArtifactLifecycleRule resource creates an artifact lifecycle management rule.
Syntax
{
"Type": "ALIYUN::CR::ArtifactLifecycleRule",
"Properties": {
"Auto": Boolean,
"InstanceId": String,
"NamespaceName": String,
"RetentionTagCount": Integer,
"RepoName": String,
"ScheduleTime": String,
"Scope": String,
"TagRegexp": String
}
}
Properties
|
Parameter |
Type |
Required |
Update allowed |
Description |
Constraints |
|
Auto |
Boolean |
Yes |
Yes |
Specifies whether to automatically execute the lifecycle management rule. |
None |
|
InstanceId |
String |
Yes |
No |
The ID of the ACR instance. |
None |
|
NamespaceName |
String |
No |
Yes |
The name of the namespace. |
None |
|
RepoName |
String |
No |
Yes |
The name of the image repository. |
None |
|
RetentionTagCount |
Integer |
No |
Yes |
The number of images to retain. |
None |
|
ScheduleTime |
String |
No |
Yes |
The execution schedule of the lifecycle management rule. |
None |
|
Scope |
String |
No |
Yes |
The deletion scope. |
None |
|
TagRegexp |
String |
No |
Yes |
A regular expression that indicates which image tags to retain. |
None |
Return values
Fn::GetAtt
-
Auto: Indicates whether the lifecycle management rule runs automatically.
-
NamespaceName: The name of the namespace.
-
RetentionTagCount: The number of images to retain.
-
ModifiedTime: The time the lifecycle management rule was last modified.
-
ScheduleTime: The execution schedule of the lifecycle management rule.
-
Scope: The deletion scope.
-
InstanceId: The ID of the ACR instance.
-
TagRegexp: A regular expression that indicates which image tags to retain.
-
CreateTime: The time the lifecycle management rule was created.
-
RepoName: The name of the image repository.
-
ArtifactLifecycleRuleId: The ID of the lifecycle management rule.
Examples
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
Auto:
Type: Boolean
Description: Specifies whether to automatically execute the lifecycle management rule.
Required: true
RetentionTagCount:
Type: Number
Description: The number of images that you want to retain.
Required: false
ScheduleTime:
Type: String
Description: The execution schedule of the lifecycle management rule.
Required: false
Scope:
Type: String
Description: The deletion scope.
Required: false
InstanceId:
Type: String
Description: The ID of the ACR instance.
Required: true
Resources:
ExtensionResource:
Type: ALIYUN::CR::ArtifactLifecycleRule
Properties:
Auto:
Ref: Auto
RetentionTagCount:
Ref: RetentionTagCount
ScheduleTime:
Ref: ScheduleTime
Scope:
Ref: Scope
InstanceId:
Ref: InstanceId
Outputs:
Auto:
Description: Indicates whether the lifecycle management rule runs automatically.
Value:
Fn::GetAtt:
- ExtensionResource
- Auto
NamespaceName:
Description: The name of the namespace.
Value:
Fn::GetAtt:
- ExtensionResource
- NamespaceName
RetentionTagCount:
Description: The number of images to retain.
Value:
Fn::GetAtt:
- ExtensionResource
- RetentionTagCount
ModifiedTime:
Description: The time when the lifecycle management rule was last modified.
Value:
Fn::GetAtt:
- ExtensionResource
- ModifiedTime
ScheduleTime:
Description: The execution schedule of the lifecycle management rule.
Value:
Fn::GetAtt:
- ExtensionResource
- ScheduleTime
Scope:
Description: The deletion scope.
Value:
Fn::GetAtt:
- ExtensionResource
- Scope
InstanceId:
Description: The ID of the ACR instance.
Value:
Fn::GetAtt:
- ExtensionResource
- InstanceId
TagRegexp:
Description: The regular expression that indicates which image tags are retained.
Value:
Fn::GetAtt:
- ExtensionResource
- TagRegexp
CreateTime:
Description: The time when the lifecycle management rule was created.
Value:
Fn::GetAtt:
- ExtensionResource
- CreateTime
RepoName:
Description: The name of the image repository.
Value:
Fn::GetAtt:
- ExtensionResource
- RepoName
ArtifactLifecycleRuleId:
Description: The ID of the lifecycle management rule.
Value:
Fn::GetAtt:
- ExtensionResource
- ArtifactLifecycleRuleId
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"Auto": {
"Type": "Boolean",
"Description": "Specifies whether to automatically execute the lifecycle management rule.",
"Required": true
},
"RetentionTagCount": {
"Type": "Number",
"Description": "The number of images that you want to retain.",
"Required": false
},
"ScheduleTime": {
"Type": "String",
"Description": "The execution schedule of the lifecycle management rule.",
"Required": false
},
"Scope": {
"Type": "String",
"Description": "The deletion scope.",
"Required": false
},
"InstanceId": {
"Type": "String",
"Description": "The ID of the ACR instance.",
"Required": true
}
},
"Resources": {
"ExtensionResource": {
"Type": "ALIYUN::CR::ArtifactLifecycleRule",
"Properties": {
"Auto": {
"Ref": "Auto"
},
"RetentionTagCount": {
"Ref": "RetentionTagCount"
},
"ScheduleTime": {
"Ref": "ScheduleTime"
},
"Scope": {
"Ref": "Scope"
},
"InstanceId": {
"Ref": "InstanceId"
}
}
}
},
"Outputs": {
"Auto": {
"Description": "Indicates whether the lifecycle management rule runs automatically.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Auto"
]
}
},
"NamespaceName": {
"Description": "The name of the namespace.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"NamespaceName"
]
}
},
"RetentionTagCount": {
"Description": "The number of images to retain.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"RetentionTagCount"
]
}
},
"ModifiedTime": {
"Description": "The time when the lifecycle management rule was last modified.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"ModifiedTime"
]
}
},
"ScheduleTime": {
"Description": "The execution schedule of the lifecycle management rule.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"ScheduleTime"
]
}
},
"Scope": {
"Description": "The deletion scope.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Scope"
]
}
},
"InstanceId": {
"Description": "The ID of the ACR instance.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"InstanceId"
]
}
},
"TagRegexp": {
"Description": "The regular expression that indicates which image tags are retained.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"TagRegexp"
]
}
},
"CreateTime": {
"Description": "The time when the lifecycle management rule was created.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"CreateTime"
]
}
},
"RepoName": {
"Description": "The name of the image repository.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"RepoName"
]
}
},
"ArtifactLifecycleRuleId": {
"Description": "The ID of the lifecycle management rule.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"ArtifactLifecycleRuleId"
]
}
}
}
}