ALIYUN::CR::Namespace is used to create a namespace.
Syntax
{
"Type": "ALIYUN::CR::Namespace",
"Properties": {
"Namespace": String,
"DefaultVisibility": String,
"AutoCreate": Boolean,
"InstanceId": String
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
Namespace | String | Yes | No | The name of the namespace. | The name must be 2 to 30 characters in length, and can contain lowercase letters, digits, hyphens (-), and underscores (_). The name cannot start with a hyphen (-) or underscore (_). |
DefaultVisibility | String | No | Yes | The default repository type. | Valid values:
|
AutoCreate | Boolean | No | Yes | Specifies whether the system automatically creates a repository. | Valid values:
|
InstanceId | String | No | No | The ID of the instance. | Example: cri-xkx6vujuhay0****. |
Return values
Fn::GetAtt
- NamespaceId: the ID of the namespace.
- InstanceId: the ID of the instance.
- Namespace: the name of the namespace.
Examples
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"AutoCreate": {
"Type": "Boolean",
"Description": "whether auto create repository",
"AllowedValues": [
true,
false
],
"Default": false
},
"DefaultVisibility": {
"Type": "String",
"Description": "repository default visibility, public or private",
"AllowedValues": [
"PUBLIC",
"PRIVATE"
],
"Default": "PRIVATE"
},
"Namespace": {
"Type": "String",
"Description": "domain name",
"MinLength": 2,
"MaxLength": 30
}
},
"Resources": {
"NameSpace": {
"Type": "ALIYUN::CR::Namespace",
"Properties": {
"AutoCreate": {
"Ref": "AutoCreate"
},
"DefaultVisibility": {
"Ref": "DefaultVisibility"
},
"Namespace": {
"Ref": "Namespace"
}
}
}
},
"Outputs": {
"NamespaceId": {
"Description": "The namespace id",
"Value": {
"Fn::GetAtt": [
"NameSpace",
"NamespaceId"
]
}
}
}
}