全部产品
Search
文档中心

资源编排:ALIYUN::CDDC::DedicatedHostGroup

更新时间:Jun 21, 2024

ALIYUN::CDDC::DedicatedHostGroup类型用于创建专属集群。

关于专属集群的更多信息,请参见什么是云数据库专属集群MyBase

语法

{
  "Type": "ALIYUN::CDDC::DedicatedHostGroup",
  "Properties": {
    "DiskAllocationRatio": Integer,
    "AllocationPolicy": String,
    "VpcId": String,
    "MemAllocationRatio": Integer,
    "HostReplacePolicy": String,
    "CpuAllocationRatio": Integer,
    "Engine": String,
    "DedicatedHostGroupDesc": String,
    "OpenPermission": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

Engine

String

数据库引擎类型。

取值:

  • MySQL

  • SQLServer

  • PostgreSQL

  • Redis

VpcId

String

专属集群归属的专有网络ID。

AllocationPolicy

String

专属集群资源调度的分配策略。

取值:

  • Evenly(默认值):均衡分配,最大化追求更稳定的系统表现,优先从未分配资源或已分配资源较少的主机中分配资源。

  • Intensively:紧凑分配,最大化追求更充分的资源利用率,优先从创建时间较早且已分配资源较多的主机中分配资源。

CpuAllocationRatio

Integer

专属集群的CPU超配比。

取值范围:100%~300%。

默认值:200%,表示所有实例的CPU资源之和可以是实际CPU资源的2倍,充分利用资源。

DedicatedHostGroupDesc

String

专属集群的名称。

长度为1~64个字符,以英文字母或汉字开头,可包含英文字母、汉字、数字、下划线(_)和短划线(-)。

DiskAllocationRatio

Integer

专属集群的空间超配比。

取值范围:100%~300%。

默认值:200%,表示所有实例的空间资源之和可以是实际空间资源的2倍,充分利用资源。

HostReplacePolicy

String

主机故障时系统的处理策略。

取值:

  • Auto(默认值):自动替换主机。

  • Manual:手动替换主机。

说明

仅创建数据库引擎为MySQL的专属集群时,可以根据实际需求选择主机故障处理策略。其余引擎均使用默认值Auto。

MemAllocationRatio

Integer

专属集群中每台主机的内存最大使用率。

取值范围:0%~100%。

默认值:100%。

OpenPermission

String

是否开放专属集群内的主机的操作系统权限。

取值:

  • 0:关闭。

  • 1(默认值):开放。

返回值

Fn::GetAtt

  • DeployType:实例部署方式。

  • DiskAllocationRatio:主机空间超配比。

  • DiskUsedAmount:磁盘使用量。

  • InstanceNumber:主机的实例数量。

  • AllocationPolicy:主机资源分配策略。

  • HostReplacePolicy:主机故障处理策略。

  • DedicatedHostGroupId:专属集群ID。

  • BastionInstanceId:主机的主实例D。

  • MemAllocatedAmount:内存分配量。

  • OpenPermission:主机的操作系统权限。

  • MemAllocateRation:分配的内存比例。

  • DiskAllocatedAmount:磁盘分配容量。

  • Engine:主机的数据库引擎类型。

  • MemUtility:内存利用率。

  • MemAllocationRatio:主机的内存超配比。

  • CpuAllocateRation:CPU申请比例。

  • Text:主机的描述。

  • MemUsedAmount:内存使用量。

  • DedicatedHostGroupDesc:主机所属的专属集群名称。

  • VpcId:主机所属专属集群的专有网络ID。

  • DiskUtility:磁盘利用率。

  • CpuAllocationRatio:主机CPU超配比。

  • DiskAllocateRation:磁盘分配率。

  • HostNumber:主机的数量。

  • CpuAllocatedAmount:CPU申请量。

示例

YAML格式

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  VpcId:
    Type: String
    Description: VPC ID
    AssociationProperty: ALIYUN::ECS::VPC::VPCId
  Engine:
    Type: String
    Description: Database Engine Type
    Default: MySQL
Resources:
  CDDCDedicatedHostGroup:
    Type: ALIYUN::CDDC::DedicatedHostGroup
    Properties:
      VpcId:
        Ref: VpcId
      Engine:
        Ref: Engine
Outputs:
  DeployType:
    Description: DeployType
    Value:
      Fn::GetAtt:
        - CDDCDedicatedHostGroup
        - DeployType
  DiskAllocationRatio:
    Description: Disk Allocation Ratio
    Value:
      Fn::GetAtt:
        - CDDCDedicatedHostGroup
        - DiskAllocationRatio
  DiskUsedAmount:
    Description: DiskUsedAmount
    Value:
      Fn::GetAtt:
        - CDDCDedicatedHostGroup
        - DiskUsedAmount
  InstanceNumber:
    Description: Total Instance Number
    Value:
      Fn::GetAtt:
        - CDDCDedicatedHostGroup
        - InstanceNumber
  AllocationPolicy:
    Description: Allocation Policy
    Value:
      Fn::GetAtt:
        - CDDCDedicatedHostGroup
        - AllocationPolicy
  HostReplacePolicy:
    Description: Host Replace Policy
    Value:
      Fn::GetAtt:
        - CDDCDedicatedHostGroup
        - HostReplacePolicy
  DedicatedHostGroupId:
    Description: Dedicated Host Group ID
    Value:
      Fn::GetAtt:
        - CDDCDedicatedHostGroup
        - DedicatedHostGroupId
  BastionInstanceId:
    Description: BastionInstanceId
    Value:
      Fn::GetAtt:
        - CDDCDedicatedHostGroup
        - BastionInstanceId
  MemAllocatedAmount:
    Description: MemAllocatedAmount
    Value:
      Fn::GetAtt:
        - CDDCDedicatedHostGroup
        - MemAllocatedAmount
  OpenPermission:
    Description: Whether Open OS Permission
    Value:
      Fn::GetAtt:
        - CDDCDedicatedHostGroup
        - OpenPermission
  MemAllocateRation:
    Description: MemAllocateRation
    Value:
      Fn::GetAtt:
        - CDDCDedicatedHostGroup
        - MemAllocateRation
  DiskAllocatedAmount:
    Description: DiskAllocatedAmount
    Value:
      Fn::GetAtt:
        - CDDCDedicatedHostGroup
        - DiskAllocatedAmount
  Engine:
    Description: Database Engine Type
    Value:
      Fn::GetAtt:
        - CDDCDedicatedHostGroup
        - Engine
  MemUtility:
    Description: MemUtility
    Value:
      Fn::GetAtt:
        - CDDCDedicatedHostGroup
        - MemUtility
  MemAllocationRatio:
    Description: Memory Allocation Ratio
    Value:
      Fn::GetAtt:
        - CDDCDedicatedHostGroup
        - MemAllocationRatio
  CpuAllocateRation:
    Description: CpuAllocateRation
    Value:
      Fn::GetAtt:
        - CDDCDedicatedHostGroup
        - CpuAllocateRation
  Text:
    Description: Text
    Value:
      Fn::GetAtt:
        - CDDCDedicatedHostGroup
        - Text
  MemUsedAmount:
    Description: MemUsedAmount
    Value:
      Fn::GetAtt:
        - CDDCDedicatedHostGroup
        - MemUsedAmount
  DedicatedHostGroupDesc:
    Description: Dedicated Host Group Description
    Value:
      Fn::GetAtt:
        - CDDCDedicatedHostGroup
        - DedicatedHostGroupDesc
  VpcId:
    Description: VPC ID
    Value:
      Fn::GetAtt:
        - CDDCDedicatedHostGroup
        - VpcId
  DiskUtility:
    Description: DiskUtility
    Value:
      Fn::GetAtt:
        - CDDCDedicatedHostGroup
        - DiskUtility
  CpuAllocationRatio:
    Description: Cpu Allocation Ratio
    Value:
      Fn::GetAtt:
        - CDDCDedicatedHostGroup
        - CpuAllocationRatio
  DiskAllocateRation:
    Description: DiskAllocateRation
    Value:
      Fn::GetAtt:
        - CDDCDedicatedHostGroup
        - DiskAllocateRation
  HostNumber:
    Description: Total Host Number
    Value:
      Fn::GetAtt:
        - CDDCDedicatedHostGroup
        - HostNumber
  CpuAllocatedAmount:
    Description: CpuAllocatedAmount
    Value:
      Fn::GetAtt:
        - CDDCDedicatedHostGroup
        - CpuAllocatedAmount

JSON格式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "VpcId": {
      "Type": "String",
      "Description": "VPC ID",
      "AssociationProperty": "ALIYUN::ECS::VPC::VPCId"
    },
    "Engine": {
      "Type": "String",
      "Description": "Database Engine Type",
      "Default": "MySQL"
    }
  },
  "Resources": {
    "CDDCDedicatedHostGroup": {
      "Type": "ALIYUN::CDDC::DedicatedHostGroup",
      "Properties": {
        "VpcId": {
          "Ref": "VpcId"
        },
        "Engine": {
          "Ref": "Engine"
        }
      }
    }
  },
  "Outputs": {
    "DeployType": {
      "Description": "DeployType",
      "Value": {
        "Fn::GetAtt": [
          "CDDCDedicatedHostGroup",
          "DeployType"
        ]
      }
    },
    "DiskAllocationRatio": {
      "Description": "Disk Allocation Ratio",
      "Value": {
        "Fn::GetAtt": [
          "CDDCDedicatedHostGroup",
          "DiskAllocationRatio"
        ]
      }
    },
    "DiskUsedAmount": {
      "Description": "DiskUsedAmount",
      "Value": {
        "Fn::GetAtt": [
          "CDDCDedicatedHostGroup",
          "DiskUsedAmount"
        ]
      }
    },
    "InstanceNumber": {
      "Description": "Total Instance Number",
      "Value": {
        "Fn::GetAtt": [
          "CDDCDedicatedHostGroup",
          "InstanceNumber"
        ]
      }
    },
    "AllocationPolicy": {
      "Description": "Allocation Policy",
      "Value": {
        "Fn::GetAtt": [
          "CDDCDedicatedHostGroup",
          "AllocationPolicy"
        ]
      }
    },
    "HostReplacePolicy": {
      "Description": "Host Replace Policy",
      "Value": {
        "Fn::GetAtt": [
          "CDDCDedicatedHostGroup",
          "HostReplacePolicy"
        ]
      }
    },
    "DedicatedHostGroupId": {
      "Description": "Dedicated Host Group ID",
      "Value": {
        "Fn::GetAtt": [
          "CDDCDedicatedHostGroup",
          "DedicatedHostGroupId"
        ]
      }
    },
    "BastionInstanceId": {
      "Description": "BastionInstanceId",
      "Value": {
        "Fn::GetAtt": [
          "CDDCDedicatedHostGroup",
          "BastionInstanceId"
        ]
      }
    },
    "MemAllocatedAmount": {
      "Description": "MemAllocatedAmount",
      "Value": {
        "Fn::GetAtt": [
          "CDDCDedicatedHostGroup",
          "MemAllocatedAmount"
        ]
      }
    },
    "OpenPermission": {
      "Description": "Whether Open OS Permission",
      "Value": {
        "Fn::GetAtt": [
          "CDDCDedicatedHostGroup",
          "OpenPermission"
        ]
      }
    },
    "MemAllocateRation": {
      "Description": "MemAllocateRation",
      "Value": {
        "Fn::GetAtt": [
          "CDDCDedicatedHostGroup",
          "MemAllocateRation"
        ]
      }
    },
    "DiskAllocatedAmount": {
      "Description": "DiskAllocatedAmount",
      "Value": {
        "Fn::GetAtt": [
          "CDDCDedicatedHostGroup",
          "DiskAllocatedAmount"
        ]
      }
    },
    "Engine": {
      "Description": "Database Engine Type",
      "Value": {
        "Fn::GetAtt": [
          "CDDCDedicatedHostGroup",
          "Engine"
        ]
      }
    },
    "MemUtility": {
      "Description": "MemUtility",
      "Value": {
        "Fn::GetAtt": [
          "CDDCDedicatedHostGroup",
          "MemUtility"
        ]
      }
    },
    "MemAllocationRatio": {
      "Description": "Memory Allocation Ratio",
      "Value": {
        "Fn::GetAtt": [
          "CDDCDedicatedHostGroup",
          "MemAllocationRatio"
        ]
      }
    },
    "CpuAllocateRation": {
      "Description": "CpuAllocateRation",
      "Value": {
        "Fn::GetAtt": [
          "CDDCDedicatedHostGroup",
          "CpuAllocateRation"
        ]
      }
    },
    "Text": {
      "Description": "Text",
      "Value": {
        "Fn::GetAtt": [
          "CDDCDedicatedHostGroup",
          "Text"
        ]
      }
    },
    "MemUsedAmount": {
      "Description": "MemUsedAmount",
      "Value": {
        "Fn::GetAtt": [
          "CDDCDedicatedHostGroup",
          "MemUsedAmount"
        ]
      }
    },
    "DedicatedHostGroupDesc": {
      "Description": "Dedicated Host Group Description",
      "Value": {
        "Fn::GetAtt": [
          "CDDCDedicatedHostGroup",
          "DedicatedHostGroupDesc"
        ]
      }
    },
    "VpcId": {
      "Description": "VPC ID",
      "Value": {
        "Fn::GetAtt": [
          "CDDCDedicatedHostGroup",
          "VpcId"
        ]
      }
    },
    "DiskUtility": {
      "Description": "DiskUtility",
      "Value": {
        "Fn::GetAtt": [
          "CDDCDedicatedHostGroup",
          "DiskUtility"
        ]
      }
    },
    "CpuAllocationRatio": {
      "Description": "Cpu Allocation Ratio",
      "Value": {
        "Fn::GetAtt": [
          "CDDCDedicatedHostGroup",
          "CpuAllocationRatio"
        ]
      }
    },
    "DiskAllocateRation": {
      "Description": "DiskAllocateRation",
      "Value": {
        "Fn::GetAtt": [
          "CDDCDedicatedHostGroup",
          "DiskAllocateRation"
        ]
      }
    },
    "HostNumber": {
      "Description": "Total Host Number",
      "Value": {
        "Fn::GetAtt": [
          "CDDCDedicatedHostGroup",
          "HostNumber"
        ]
      }
    },
    "CpuAllocatedAmount": {
      "Description": "CpuAllocatedAmount",
      "Value": {
        "Fn::GetAtt": [
          "CDDCDedicatedHostGroup",
          "CpuAllocatedAmount"
        ]
      }
    }
  }
}