全部产品
Search
文档中心

资源编排:ALIYUN::CDDC::DedicatedHost

更新时间:Jun 21, 2024

ALIYUN::CDDC::DedicatedHost类型用于添加专属集群主机。

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

语法

{
  "Type": "ALIYUN::CDDC::DedicatedHost",
  "Properties": {
    "HostClass": String,
    "OsPassword": String,
    "ZoneId": String,
    "DedicatedHostGroupId": String,
    "AutoRenew": String,
    "VSwitchId": String,
    "UsedTime": String,
    "ImageCategory": String,
    "Period": String,
    "PaymentType": String,
    "HostName": String,
    "Tags": List
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

DedicatedHostGroupId

String

目标专属集群ID。

HostClass

String

主机的规格。

更多信息,请参见主机规格详情

PaymentType

String

主机的付费类型。

取值:PrePaid,表示预付费,即包年包月。

VSwitchId

String

交换机的ID。

ZoneId

String

可用区ID。

取值示例:cn-hangzhou-i,其中cn-hangzhou为地域信息。

您可以调用DescribeRegions接口查询地域信息。

AutoRenew

String

是否开启自动续费功能。

取值:

  • true:开启。

  • false(默认值):关闭。

HostName

String

主机的名称。

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

ImageCategory

String

主机的镜像。

取值:

  • WindowsWithMssqlEntAlwaysonLicense:SQL Server集群版。

  • WindowsWithMssqlStdLicense:SQL Server标准版。

  • WindowsWithMssqlEntLicense:SQL Server企业版。

  • WindowsWithMssqlWebLicense:SQL Server Web版。

  • AliLinux:其他主机镜像。

OsPassword

String

主机的密码。

仅集群类型为私有部署集群时,支持创建主机密码。

长度为8~30个字符。必须至少包含大写英文字母、小写英文字母、数字和特殊字符其中三项,支持的特殊字符为()\~!@#$%^&*-_+=|{}[]:;'<>,.?/

Period

String

主机的预付费周期。

取值:

  • Year:包年。

  • Month:包月。

  • Week:包周。

Tags

List

标签。

更多信息,请参见Tags属性

UsedTime

String

购买时长。

取值范围:

  • 当Period取值为Year时:1~5。

  • 当Period取值为Month时:1~9。

  • 当Period取值为Week时:1~3。

Tags语法

"Tags": [
  {
    "TagKey": String,
    "TagValue": String
  }
]

Tags属性

属性名称

类型

必须

允许更新

描述

约束

TagKey

String

标签键。

长度为1~128个字符,不能以aliyunacs:开头,不能包含http://https://

TagValue

String

标签值。

长度为0~128个字符,不能以aliyunacs:开头,不能包含http://https://

返回值

Fn::GetAtt

  • DiskAllocationRatio:磁盘使用率,单位为百分比。

  • DedicatedHostId:专属集群主机ID。

  • MemAllocationRatio:内存使用率,单位为百分比。

  • ZoneId:可用区ID。

  • DedicatedHostGroupId:目标专属集群ID。

  • AutoRenew:是否开启自动续费功能。

  • VSwitchId:交换机ID。

  • ImageCategory:主机的镜像类型。

  • HostStorage:主机的存储总量,单位为GB。

  • StorageUsed:存储使用量,单位为GB。

  • OpenPermission:主机的操作系统权限开放状态。

  • HostType:主机的存储类型。

  • HostClass:主机的规格。

  • HostCpu:主机CPU。

  • VpcId:专有网络ID。

  • EcsClassCode:ECS规格代码。

  • CpuAllocationRatio:CPU使用率。

  • HostMem:主机的内存。

  • PaymentType:付费类型。

  • MemoryUsed:内存使用量,单位为GB。

  • IpAddress:主机的IP地址。

  • CpuUsed:CPU使用量,单位为核。

  • HostName:主机的名称。

示例

YAML格式

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  HostClass:
    Type: String
    Description: Host Class
    Default: rds.i2g.2xlarge
  OsPassword:
    Type: String
    Default: Password123
  ZoneId:
    Type: String
    Description: Zone ID
    Default: cn-hangzhou-i
  DedicatedHostGroupId:
    Type: String
    Description: Dedicated Host Group ID
    Default: dhg-23h5e2axmuf4****
  VSwitchId:
    Type: String
    AssociationProperty: ALIYUN::ECS::VSwitch::VSwitchId
    AssociationPropertyMetadata:
      ZoneId: ${ZoneId}
  PaymentType:
    Type: String
    Description: Payment Type
    Default: PrePaid
Resources:
  CDDCDedicatedHost:
    Type: ALIYUN::CDDC::DedicatedHost
    Properties:
      HostClass:
        Ref: HostClass
      OsPassword:
        Ref: OsPassword
      ZoneId:
        Ref: ZoneId
      DedicatedHostGroupId:
        Ref: DedicatedHostGroupId
      VSwitchId:
        Ref: VSwitchId
      PaymentType:
        Ref: PaymentType
Outputs:
  DiskAllocationRatio:
    Description: Disk Allocation Ratio
    Value:
      Fn::GetAtt:
        - CDDCDedicatedHost
        - DiskAllocationRatio
  DedicatedHostId:
    Description: The first ID of the resource
    Value:
      Fn::GetAtt:
        - CDDCDedicatedHost
        - DedicatedHostId
  MemAllocationRatio:
    Description: Memory Allocation Ratio
    Value:
      Fn::GetAtt:
        - CDDCDedicatedHost
        - MemAllocationRatio
  ZoneId:
    Description: Zone ID
    Value:
      Fn::GetAtt:
        - CDDCDedicatedHost
        - ZoneId
  DedicatedHostGroupId:
    Description: Dedicated Host Group ID
    Value:
      Fn::GetAtt:
        - CDDCDedicatedHost
        - DedicatedHostGroupId
  AutoRenew:
    Description: Whether Auto Renew
    Value:
      Fn::GetAtt:
        - CDDCDedicatedHost
        - AutoRenew
  VSwitchId:
    Description: VSwitch ID
    Value:
      Fn::GetAtt:
        - CDDCDedicatedHost
        - VSwitchId
  ImageCategory:
    Description: Host Image Category
    Value:
      Fn::GetAtt:
        - CDDCDedicatedHost
        - ImageCategory
  HostStorage:
    Description: Host Storage
    Value:
      Fn::GetAtt:
        - CDDCDedicatedHost
        - HostStorage
  StorageUsed:
    Description: Storage Used
    Value:
      Fn::GetAtt:
        - CDDCDedicatedHost
        - StorageUsed
  OpenPermission:
    Description: Whether Open OS Permission
    Value:
      Fn::GetAtt:
        - CDDCDedicatedHost
        - OpenPermission
  HostType:
    Description: Host Storage Type
    Value:
      Fn::GetAtt:
        - CDDCDedicatedHost
        - HostType
  HostClass:
    Description: Host Class
    Value:
      Fn::GetAtt:
        - CDDCDedicatedHost
        - HostClass
  HostCpu:
    Description: Host CPU
    Value:
      Fn::GetAtt:
        - CDDCDedicatedHost
        - HostCpu
  VpcId:
    Description: VPC ID
    Value:
      Fn::GetAtt:
        - CDDCDedicatedHost
        - VpcId
  EcsClassCode:
    Description: ECS Class Code
    Value:
      Fn::GetAtt:
        - CDDCDedicatedHost
        - EcsClassCode
  CpuAllocationRatio:
    Description: CPU Allocation Ratio
    Value:
      Fn::GetAtt:
        - CDDCDedicatedHost
        - CpuAllocationRatio
  HostMem:
    Description: Host Memory
    Value:
      Fn::GetAtt:
        - CDDCDedicatedHost
        - HostMem
  PaymentType:
    Description: Payment Type
    Value:
      Fn::GetAtt:
        - CDDCDedicatedHost
        - PaymentType
  MemoryUsed:
    Description: Host Memory Used
    Value:
      Fn::GetAtt:
        - CDDCDedicatedHost
        - MemoryUsed
  IpAddress:
    Description: Host IP Address
    Value:
      Fn::GetAtt:
        - CDDCDedicatedHost
        - IpAddress
  CpuUsed:
    Description: CPU Used
    Value:
      Fn::GetAtt:
        - CDDCDedicatedHost
        - CpuUsed
  HostName:
    Description: Host Name
    Value:
      Fn::GetAtt:
        - CDDCDedicatedHost
        - HostName

JSON格式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "HostClass": {
      "Type": "String",
      "Description": "Host Class",
      "Default": "rds.i2g.2xlarge"
    },
    "OsPassword": {
      "Type": "String",
      "Default": "Password123"
    },
    "ZoneId": {
      "Type": "String",
      "Description": "Zone ID",
      "Default": "cn-hangzhou-i"
    },
    "DedicatedHostGroupId": {
      "Type": "String",
      "Description": "Dedicated Host Group ID",
      "Default": "dhg-23h5e2axmuf4****"
    },
    "VSwitchId": {
      "Type": "String",
      "AssociationProperty": "ALIYUN::ECS::VSwitch::VSwitchId",
      "AssociationPropertyMetadata": {
        "ZoneId": "${ZoneId}"
      }
    },
    "PaymentType": {
      "Type": "String",
      "Description": "Payment Type",
      "Default": "PrePaid"
    }
  },
  "Resources": {
    "CDDCDedicatedHost": {
      "Type": "ALIYUN::CDDC::DedicatedHost",
      "Properties": {
        "HostClass": {
          "Ref": "HostClass"
        },
        "OsPassword": {
          "Ref": "OsPassword"
        },
        "ZoneId": {
          "Ref": "ZoneId"
        },
        "DedicatedHostGroupId": {
          "Ref": "DedicatedHostGroupId"
        },
        "VSwitchId": {
          "Ref": "VSwitchId"
        },
        "PaymentType": {
          "Ref": "PaymentType"
        }
      }
    }
  },
  "Outputs": {
    "DiskAllocationRatio": {
      "Description": "Disk Allocation Ratio",
      "Value": {
        "Fn::GetAtt": [
          "CDDCDedicatedHost",
          "DiskAllocationRatio"
        ]
      }
    },
    "DedicatedHostId": {
      "Description": "The first ID of the resource",
      "Value": {
        "Fn::GetAtt": [
          "CDDCDedicatedHost",
          "DedicatedHostId"
        ]
      }
    },
    "MemAllocationRatio": {
      "Description": "Memory Allocation Ratio",
      "Value": {
        "Fn::GetAtt": [
          "CDDCDedicatedHost",
          "MemAllocationRatio"
        ]
      }
    },
    "ZoneId": {
      "Description": "Zone ID",
      "Value": {
        "Fn::GetAtt": [
          "CDDCDedicatedHost",
          "ZoneId"
        ]
      }
    },
    "DedicatedHostGroupId": {
      "Description": "Dedicated Host Group ID",
      "Value": {
        "Fn::GetAtt": [
          "CDDCDedicatedHost",
          "DedicatedHostGroupId"
        ]
      }
    },
    "AutoRenew": {
      "Description": "Whether Auto Renew",
      "Value": {
        "Fn::GetAtt": [
          "CDDCDedicatedHost",
          "AutoRenew"
        ]
      }
    },
    "VSwitchId": {
      "Description": "VSwitch ID",
      "Value": {
        "Fn::GetAtt": [
          "CDDCDedicatedHost",
          "VSwitchId"
        ]
      }
    },
    "ImageCategory": {
      "Description": "Host Image Category",
      "Value": {
        "Fn::GetAtt": [
          "CDDCDedicatedHost",
          "ImageCategory"
        ]
      }
    },
    "HostStorage": {
      "Description": "Host Storage",
      "Value": {
        "Fn::GetAtt": [
          "CDDCDedicatedHost",
          "HostStorage"
        ]
      }
    },
    "StorageUsed": {
      "Description": "Storage Used",
      "Value": {
        "Fn::GetAtt": [
          "CDDCDedicatedHost",
          "StorageUsed"
        ]
      }
    },
    "OpenPermission": {
      "Description": "Whether Open OS Permission",
      "Value": {
        "Fn::GetAtt": [
          "CDDCDedicatedHost",
          "OpenPermission"
        ]
      }
    },
    "HostType": {
      "Description": "Host Storage Type",
      "Value": {
        "Fn::GetAtt": [
          "CDDCDedicatedHost",
          "HostType"
        ]
      }
    },
    "HostClass": {
      "Description": "Host Class",
      "Value": {
        "Fn::GetAtt": [
          "CDDCDedicatedHost",
          "HostClass"
        ]
      }
    },
    "HostCpu": {
      "Description": "Host CPU",
      "Value": {
        "Fn::GetAtt": [
          "CDDCDedicatedHost",
          "HostCpu"
        ]
      }
    },
    "VpcId": {
      "Description": "VPC ID",
      "Value": {
        "Fn::GetAtt": [
          "CDDCDedicatedHost",
          "VpcId"
        ]
      }
    },
    "EcsClassCode": {
      "Description": "ECS Class Code",
      "Value": {
        "Fn::GetAtt": [
          "CDDCDedicatedHost",
          "EcsClassCode"
        ]
      }
    },
    "CpuAllocationRatio": {
      "Description": "CPU Allocation Ratio",
      "Value": {
        "Fn::GetAtt": [
          "CDDCDedicatedHost",
          "CpuAllocationRatio"
        ]
      }
    },
    "HostMem": {
      "Description": "Host Memory",
      "Value": {
        "Fn::GetAtt": [
          "CDDCDedicatedHost",
          "HostMem"
        ]
      }
    },
    "PaymentType": {
      "Description": "Payment Type",
      "Value": {
        "Fn::GetAtt": [
          "CDDCDedicatedHost",
          "PaymentType"
        ]
      }
    },
    "MemoryUsed": {
      "Description": "Host Memory Used",
      "Value": {
        "Fn::GetAtt": [
          "CDDCDedicatedHost",
          "MemoryUsed"
        ]
      }
    },
    "IpAddress": {
      "Description": "Host IP Address",
      "Value": {
        "Fn::GetAtt": [
          "CDDCDedicatedHost",
          "IpAddress"
        ]
      }
    },
    "CpuUsed": {
      "Description": "CPU Used",
      "Value": {
        "Fn::GetAtt": [
          "CDDCDedicatedHost",
          "CpuUsed"
        ]
      }
    },
    "HostName": {
      "Description": "Host Name",
      "Value": {
        "Fn::GetAtt": [
          "CDDCDedicatedHost",
          "HostName"
        ]
      }
    }
  }
}