ALIYUN::FOAS::Cluster类型用于为独享模式订单创建集群。

语法

{
  "Type": "ALIYUN::FOAS::Cluster",
  "Properties": {
    "OrderId": String,
    "Description": String,
    "ClusterName": String,
    "OssBucket": String,
    "VSwitchId": String,
    "Order": Map
  }
}

属性

属性名称 类型 必须 允许更新 描述 约束
OrderId String 订单ID。 您只能指定属性Order或OrderId中的一个。建议使用OrderId。
Description String 集群描述。 无。
ClusterName String 集群名称。 由小写英文字母、数字、下划线组成,必须以英文字母开头,长度为3~64个字符。
OssBucket String OSS中Bucket名称。 无。
VSwitchId String 交换机ID。 无。
Order Map 订单详情。 StreamDefaultRole必须被授予AliyunBSSFullAccess策略。订单不能取消。

Order语法

"Order": {
  "PayModel": String,
  "SlaveSpec": String,
  "MasterSpec": String,
  "SlaveNumber": Integer,
  "Period": Integer,
  "MasterNumber": Integer
}

Order属性

属性名称 类型 必须 允许更新 描述 约束
PayModel String 付费模式。默认值:post。 取值范围:
  • pre:预付费
  • post:按量付费
SlaveSpec String Slave机器型号。例如:Ecs_8c32g。 无。
MasterSpec String Master机器型号。例如:Ecs_4c16g。 无。
SlaveNumber Integer Slave机器数量。 取值范围:2~1000。默认值:2。
Period Integer 预付费类型购买时长。单位:月。 取值范围:1~12。默认值:1。
MasterNumber Integer Master机器数量。 仅支持1台或3台。默认值:3。

返回值

Fn::GetAtt

  • OrderId:订单ID。
  • MasterInstanceInfos:主实例信息。
  • SecurityGroupId:安全组ID。
  • ClusterId:集群ID。
  • VSwitchIds:交换机ID。
  • State:集群状态。
  • EngineVersions:引擎版本。
  • SlaveInstanceInfos:从实例信息。

示例

JSON格式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Resources": {
    "Cluster": {
      "Type": "ALIYUN::FOAS::Cluster",
      "Properties": {
        "OrderId": {
          "Ref": "OrderId"
        },
        "Description": {
          "Ref": "Description"
        },
        "ClusterName": {
          "Ref": "ClusterName"
        },
        "OssBucket": {
          "Ref": "OssBucket"
        },
        "VSwitchId": {
          "Ref": "VSwitchId"
        },
        "Order": {
          "Ref": "Order"
        }
      }
    }
  },
  "Parameters": {
    "OrderId": {
      "MinLength": 1,
      "Type": "String",
      "Description": "Order Id. Only one of property Order or OrderId can be specified.\nOrderId is suggested."
    },
    "Description": {
      "MinLength": 1,
      "Type": "String",
      "Description": "Cluster description."
    },
    "ClusterName": {
      "AllowedPattern": "[a-z][a-z0-9_]{2,63}",
      "Type": "String",
      "Description": "Cluster name. It begins with a letter, and contains only lowercase English letters, numbers, underscores (_), and is limited to 3-64 characters."
    },
    "OssBucket": {
      "MinLength": 1,
      "Type": "String",
      "Description": "Bucket name in your OSS."
    },
    "VSwitchId": {
      "MinLength": 1,
      "Type": "String",
      "Description": "VSwitch ID."
    },
    "Order": {
      "Type": "Json",
      "Description": "Order detail. Only one of property Order or OrderId can be specified. Order is not suggested. Policy AliyunBSSFullAccess must be granted to StreamDefaultRole in RAM console. The order can not be cancelled."
    }
  },
  "Outputs": {
    "OrderId": {
      "Description": "Order ID.",
      "Value": {
        "Fn::GetAtt": [
          "Cluster",
          "OrderId"
        ]
      }
    },
    "MasterInstanceInfos": {
      "Description": "Master instance infos.",
      "Value": {
        "Fn::GetAtt": [
          "Cluster",
          "MasterInstanceInfos"
        ]
      }
    },
    "SecurityGroupId": {
      "Description": "Security group Id.",
      "Value": {
        "Fn::GetAtt": [
          "Cluster",
          "SecurityGroupId"
        ]
      }
    },
    "ClusterId": {
      "Description": "Cluster ID.",
      "Value": {
        "Fn::GetAtt": [
          "Cluster",
          "ClusterId"
        ]
      }
    },
    "VSwitchIds": {
      "Description": "VSwitch Ids.",
      "Value": {
        "Fn::GetAtt": [
          "Cluster",
          "VSwitchIds"
        ]
      }
    },
    "State": {
      "Description": "Cluster status.",
      "Value": {
        "Fn::GetAtt": [
          "Cluster",
          "State"
        ]
      }
    },
    "EngineVersions": {
      "Description": "Engine Versions.",
      "Value": {
        "Fn::GetAtt": [
          "Cluster",
          "EngineVersions"
        ]
      }
    },
    "SlaveInstanceInfos": {
      "Description": "Slave instance infos.",
      "Value": {
        "Fn::GetAtt": [
          "Cluster",
          "SlaveInstanceInfos"
        ]
      }
    }
  }
}

YAML格式

ROSTemplateFormatVersion: '2015-09-01'
Resources:
  Cluster:
    Type: ALIYUN::FOAS::Cluster
    Properties:
      OrderId:
        Ref: OrderId
      Description:
        Ref: Description
      ClusterName:
        Ref: ClusterName
      OssBucket:
        Ref: OssBucket
      VSwitchId:
        Ref: VSwitchId
      Order:
        Ref: Order
Parameters:
  OrderId:
    MinLength: 1
    Type: String
    Description: |-
      Order Id. Only one of property Order or OrderId can be specified.
      OrderId is suggested.
  Description:
    MinLength: 1
    Type: String
    Description: Cluster description.
  ClusterName:
    AllowedPattern: "[a-z][a-z0-9_]{2,63}"
    Type: String
    Description: Cluster name. It begins with a letter, and contains only lowercase
      English letters, numbers, underscores (_), and is limited to 3-64 characters.
  OssBucket:
    MinLength: 1
    Type: String
    Description: Bucket name in your OSS.
  VSwitchId:
    MinLength: 1
    Type: String
    Description: VSwitch ID.
  Order:
    Type: Json
    Description: Order detail. Only one of property Order or OrderId can be specified.
      Order is not suggested. Policy AliyunBSSFullAccess must be granted to StreamDefaultRole
      in RAM console.nThe order can not be cancelled.
Outputs:
  OrderId:
    Description: Order ID.
    Value:
      Fn::GetAtt:
      - Cluster
      - OrderId
  MasterInstanceInfos:
    Description: Master instance infos.
    Value:
      Fn::GetAtt:
      - Cluster
      - MasterInstanceInfos
  SecurityGroupId:
    Description: Security group Id.
    Value:
      Fn::GetAtt:
      - Cluster
      - SecurityGroupId
  ClusterId:
    Description: Cluster ID.
    Value:
      Fn::GetAtt:
      - Cluster
      - ClusterId
  VSwitchIds:
    Description: VSwitch Ids.
    Value:
      Fn::GetAtt:
      - Cluster
      - VSwitchIds
  State:
    Description: Cluster status.
    Value:
      Fn::GetAtt:
      - Cluster
      - State
  EngineVersions:
    Description: Engine Versions.
    Value:
      Fn::GetAtt:
      - Cluster
      - EngineVersions
  SlaveInstanceInfos:
    Description: Slave instance infos.
    Value:
      Fn::GetAtt:
      - Cluster
      - SlaveInstanceInfos