O recurso ALIYUN::CDDC::DedicatedHost cria um host em um cluster dedicado.
O ApsaraDB for MyBase fornece clusters dedicados. O que é o ApsaraDB for MyBase?
Sintaxe
{
"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
}
}
Propriedades
|
Propriedade |
Tipo |
Obrigatório |
Editável |
Descrição |
Restrição |
|
DedicatedHostGroupId |
String |
Sim |
Não |
ID do cluster dedicado. |
Nenhuma. |
|
HostClass |
String |
Sim |
Sim |
Tipo de instância do host. |
Consulte os tipos válidos em Tipos de instância de hosts. |
|
PaymentType |
String |
Sim |
Não |
Método de faturamento do host. |
Suporta apenas PrePaid (assinatura). |
|
VSwitchId |
String |
Sim |
Não |
ID do vSwitch. |
Nenhuma. |
|
ZoneId |
String |
Sim |
Não |
ID da zona. |
Exemplo: em Use a API DescribeRegions para consultar as regiões disponíveis. |
|
AutoRenew |
String |
Não |
Não |
Indica se a renovação automática está ativada. |
Valores válidos:
|
|
HostName |
String |
Não |
Sim |
Nome do host. |
De 1 a 64 caracteres. Aceita letras, dígitos, sublinhados (_) e hifens (-). Deve começar com uma letra. |
|
ImageCategory |
String |
Não |
Não |
Tipo de imagem do host. |
Valores válidos:
|
|
OsPassword |
String |
Não |
Não |
Senha do host. |
Aplica-se apenas a clusters dedicados MyBase proprietários. De 8 a 30 caracteres. Deve incluir pelo menos três dos seguintes elementos: letras maiúsculas, letras minúsculas, dígitos e caracteres especiais. Caracteres especiais aceitos: |
|
Period |
String |
Não |
Não |
Unidade do período de assinatura. |
Valores válidos:
|
|
Tags |
List |
Não |
Sim |
As tags. |
Defina em Propriedades de Tags. |
|
UsedTime |
String |
Não |
Não |
Duração da assinatura. |
|
Sintaxe de Tags
"Tags": [
{
"TagKey": String,
"TagValue": String
}
]
Propriedades de Tags
|
Propriedade |
Tipo |
Obrigatório |
Editável |
Descrição |
Restrição |
|
TagKey |
String |
Não |
Não |
Chave da tag. |
De 1 a 128 caracteres. Não pode conter |
|
TagValue |
String |
Não |
Não |
Valor da tag. |
Até 128 caracteres. Não pode conter |
Valores de retorno
Fn::GetAtt
DiskAllocationRatio: uso de disco (%).
DedicatedHostId: ID do host no cluster dedicado.
MemAllocationRatio: uso de memória (%).
ZoneId: ID da zona.
DedicatedHostGroupId: ID do cluster dedicado.
AutoRenew: indica se a renovação automática está ativada.
VSwitchId: ID do vSwitch.
ImageCategory: tipo de imagem do host.
HostStorage: armazenamento total do host (GB).
StorageUsed: armazenamento utilizado (GB).
OpenPermission: indica se a concessão de permissão do SO do host está ativada.
HostType: tipo de armazenamento do host.
HostClass: tipo de instância do host.
HostCpu: CPU do host.
VpcId: ID da VPC.
EcsClassCode: tipo de instância ECS do host.
CpuAllocationRatio: utilização da CPU.
HostMem: memória do host.
PaymentType: método de faturamento.
MemoryUsed: memória utilizada (GB).
IpAddress: endereço IP do host.
CpuUsed: CPU utilizada (núcleos).
HostName: nome do host.
Exemplos
Formato 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
Formato 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"
]
}
}
}
}