Use `ALIYUN::EDAS::Cluster` to create a cluster.
Syntax
{
"Type": "ALIYUN::EDAS::Cluster",
"Properties": {
"VpcId": String,
"NetworkMode": Integer,
"LogicalRegionId": String,
"ClusterName": String,
"ClusterType": Integer,
"OversoldFactor": Integer,
"ResourceGroupId": String
}
}Properties
| Property | Type | Required | Update allowed | Description | Constraints |
| VpcId | String | No | No | The ID of the virtual private cloud (VPC). | This parameter is required if NetworkMode is set to 2. |
| NetworkMode | Integer | Yes | No | The network type. | Valid values:
|
| LogicalRegionId | String | No | No | The ID of the region for the custom namespace. | Format: PhysicalRegion:CustomNamespaceIdentifier.Example: |
| ResourceGroupId | String | No | Yes | The ID of the resource group. | None |
| ClusterName | String | Yes | No | The name of the cluster. | The name must be 1 to 64 characters in length. It can contain letters, digits, underscores (_), and periods (.). |
| ClusterType | Integer | Yes | No | The type of the cluster. | Valid values:
|
| OversoldFactor | Integer | No | No | The CPU overcommit ratio for the Docker cluster. | Valid values:
|
Return values
Fn::GetAtt
- ClusterName: The name of the cluster.
- IaasProvider: The IaaS provider.
- ClusterId: The ID of the cluster.
- ClusterType: The type of the cluster.
Examples
JSONformat{ "ROSTemplateFormatVersion": "2015-09-01", "Parameters": { "VpcId": { "Type": "String", "AssociationProperty": "ALIYUN::ECS::VPC::VPCId" } }, "Resources": { "Cluster": { "Type": "ALIYUN::EDAS::Cluster", "Properties": { "LogicalRegionId": { "Fn::Join": [ ":", [ { "Ref": "ALIYUN::Region" }, "prod" ] ] }, "OversoldFactor": 4, "VpcId": { "Ref": "VpcId" }, "ClusterName": "TestCluster", "NetworkMode": 2, "ClusterType": 2 } } }, "Outputs": { "ClusterName": { "Description": "Cluster name", "Value": { "Fn::GetAtt": [ "Cluster", "ClusterName" ] } }, "IaasProvider": { "Description": "Provider", "Value": { "Fn::GetAtt": [ "Cluster", "IaasProvider" ] } }, "ClusterId": { "Description": "Cluster ID", "Value": { "Fn::GetAtt": [ "Cluster", "ClusterId" ] } }, "ClusterType": { "Description": "Cluster type", "Value": { "Fn::GetAtt": [ "Cluster", "ClusterType" ] } } } }
该文章对您有帮助吗?