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
JSON
format{ "ROSTemplateFormatVersion": "2015-09-01", "Parameters": { }, "Resources": { "NameSpace": { "Type": "ALIYUN::CR::Namespace", "Properties": { "AutoCreate": false, "DefaultVisibility": "PRIVATE", "Namespace": "TestNamespace" } } }, "Outputs": { "NamespaceId": { "Description": "The namespace id", "Value": { "Fn::GetAtt": [ "NameSpace", "NamespaceId" ] } } } }