Crie um host em um cluster dedicado Proprietary MyBase no ApsaraDB for MyBase.
Sintaxe
{
"Type": "ALIYUN::CDDC::MyBase",
"Properties": {
"EcsInstanceName": String,
"PeriodType": String,
"ResourceGroupId": String,
"UserData": String,
"DedicatedHostGroupDescription": String,
"DedicatedHostGroupId": String,
"AutoRenew": Boolean,
"EcsUniqueSuffix": Boolean,
"ImageId": String,
"UserDataInBase64": Boolean,
"EcsHostName": String,
"Engine": String,
"PasswordInherit": Boolean,
"KeyPairName": String,
"ZoneId": String,
"VSwitchId": String,
"SecurityGroupId": String,
"ECSClassList": List,
"Period": Integer,
"PayType": String,
"InternetChargeType": String,
"EcsDeploymentSetId": String,
"InternetMaxBandwidthOut": Integer,
"VpcId": String,
"OsPassword": String
}
}
Propriedades
|
Propriedade |
Tipo |
Obrigatório |
Editável |
Descrição |
Restrição |
|
ECSClassList |
List |
Sim |
Não |
Especificações da instância do Elastic Compute Service (ECS). |
Exemplo:
|
|
Engine |
String |
Sim |
Não |
Tipo de mecanismo de banco de dados. |
Valores válidos:
|
|
PayType |
String |
Sim |
Não |
Método de faturamento. |
Defina o valor como PrePaid. |
|
Period |
Integer |
Sim |
Não |
Duração da assinatura. |
Nenhuma. |
|
SecurityGroupId |
String |
Sim |
Não |
ID do grupo de segurança. |
Nenhuma. |
|
VpcId |
String |
Sim |
Não |
ID da Virtual Private Cloud (VPC). |
Nenhuma. |
|
VSwitchId |
String |
Sim |
Não |
ID do vSwitch. |
Nenhuma. |
|
ZoneId |
String |
Sim |
Não |
ID da zona. |
Nenhuma. |
|
AutoRenew |
Boolean |
Não |
Não |
Indica se a renovação automática está ativada. |
Valores válidos:
|
|
DedicatedHostGroupDescription |
String |
Não |
Não |
Nome do cluster dedicado Proprietary MyBase. |
Nenhuma. |
|
DedicatedHostGroupId |
String |
Não |
Não |
ID do cluster dedicado Proprietary MyBase. |
Nenhuma. |
|
EcsDeploymentSetId |
String |
Não |
Não |
ID do conjunto de implantação do ECS. |
Nenhuma. |
|
EcsHostName |
String |
Não |
Não |
Nome do host. |
|
|
EcsInstanceName |
String |
Não |
Não |
Nome da instância ECS. |
O nome deve ter de 2 a 128 caracteres. Deve começar com uma letra e não pode iniciar com O valor padrão desta propriedade é o valor da propriedade InstanceId. |
|
EcsUniqueSuffix |
Boolean |
Não |
Não |
Indica se sufixos sequenciais são anexados automaticamente aos valores de HostName e InstanceName ao criar várias instâncias. |
Os sufixos sequenciais variam de 001 a 999. Valores válidos:
Ao especificar o valor de HostName ou InstanceName no formato |
|
ImageId |
String |
Não |
Não |
ID da imagem personalizada. |
Para usar a imagem padrão, deixe esta propriedade vazia. |
|
InternetChargeType |
String |
Não |
Não |
Método de medição para uso de rede. |
Valores válidos:
|
|
InternetMaxBandwidthOut |
Integer |
Não |
Não |
Largura de banda pública de saída máxima. |
Unidade: Mbit/s. Valores válidos: 0 a 100. Valor padrão: 0. Defina esta propriedade com um valor maior que 0 atribui um endereço IP público à instância. |
|
KeyPairName |
String |
Não |
Não |
Nome do par de chaves. |
Nenhuma. |
|
OsPassword |
String |
Não |
Não |
Senha de logon do host. |
A senha deve atender aos seguintes requisitos:
Nota
Para especificar a senha de logon posteriormente, deixe esta propriedade vazia.
|
|
PasswordInherit |
Boolean |
Não |
Não |
Indica se a senha padrão da imagem é usada. |
Valores válidos:
Nota
Ao definir esta propriedade como true, você pode deixar OSPassword vazio. |
|
PeriodType |
String |
Não |
Não |
Unidade da duração da assinatura. |
Defina o valor como Monthly. |
|
ResourceGroupId |
String |
Não |
Não |
ID do grupo de recursos. |
Nenhuma. |
|
UserData |
String |
Não |
Não |
Dados do usuário. |
Os dados brutos do usuário podem ter até 16 KB de tamanho. |
|
UserDataInBase64 |
Boolean |
Não |
Não |
Indica se os dados do usuário são codificados em Base64. |
Valores válidos:
|
Valores de retorno
Fn::GetAtt
OrderIds: os IDs dos pedidos.
InstanceIds: os IDs das instâncias ECS criadas no host.
Exemplos
Formato YAML
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
AutoRenew:
Description:
en: Whether to enable auto renew.
Required: false
Type: Boolean
DedicatedHostGroupDescription:
Description:
en: The name of the dedicated cluster.
Required: false
Type: String
DedicatedHostGroupId:
Description:
en: The ID of the dedicated cluster.
Required: false
Type: String
ECSClassList:
AssociationProperty: List[Parameter]
AssociationPropertyMetadata:
Parameter:
Description:
en: ECS Class Properties.
Required: true
Type: Json
Description:
en: ECS Class List.
MaxLength: 1
MinLength: 1
Required: true
Type: Json
EcsDeploymentSetId:
Description:
en: The ID of the deployment set.
Required: false
Type: String
EcsHostName:
Description:
en: The host name of the ECS instance.
Required: false
Type: String
EcsInstanceName:
Description:
en: The name of the ECS instance.
Required: false
Type: String
EcsUniqueSuffix:
Description:
en: The unique suffix of the ECS instance.
Required: false
Type: Boolean
Engine:
Description:
en: Database type.
Required: true
Type: String
ImageId:
Description:
en: The image ID.
Required: false
Type: String
InternetChargeType:
AllowedValues:
- PayByTraffic
- PayByBandwidth
AssociationPropertyMetadata:
LocaleKey: InternetChargeType
Description:
en: "Network billing type. Value range: \nPayByBandwidth: billed based on fixed\
\ bandwidth. \nPayByTraffic: Pay by traffic usage."
Required: false
Type: String
InternetMaxBandwidthOut:
Description:
en: "Set internet output bandwidth of instance. Unit is Mbps(Mega bit per second).\
\ \nRange is [0,200]. Default is 1. \nWhile the property is not 0, public\
\ ip will be assigned for instance."
MinValue: 0
Required: false
Type: Number
KeyPairName:
Description:
en: The name of the key pair.
Required: false
Type: String
OsPassword:
Description:
en: Password of created ecs instance. Must contain at least 3 types of special
character, lower character, upper character, number.
Required: false
Type: String
PasswordInherit:
Description:
en: Whether to inherit the password from the parent cluster.
Required: false
Type: Boolean
PayType:
AllowedValues:
- Subscription
Description:
en: Payment type, currently only supports PrePaid.
Required: true
Type: String
Period:
AssociationProperty: PayPeriod
Description:
en: The period of the subscription in months.
MaxValue: 12
MinValue: 1
Required: true
Type: Number
PeriodType:
AssociationProperty: PayPeriodUnit
Description:
en: Prepaid type, currently only supports Monthly (monthly subscription).
Required: false
Type: String
ResourceGroupId:
Description:
en: Resource group id.
Required: false
Type: String
SecurityGroupId:
AssociationProperty: ALIYUN::ECS::SecurityGroup::SecurityGroupId
AssociationPropertyMetadata:
VpcId: ${VpcId}
Description:
en: The ID of the security group.
Required: true
Type: String
UserData:
AssociationProperty: TextArea
Description:
en: User-defined script data, the original data is up to 16KB.
Required: false
Type: String
UserDataInBase64:
Description:
en: The user data of the ECS instance.
Required: false
Type: Boolean
VSwitchId:
AssociationProperty: ALIYUN::VPC::VSwitch::VSwitchId
AssociationPropertyMetadata:
VpcId: ${VpcId}
ZoneId: ${ZoneId}
Description:
en: Virtual switch ID.
Required: true
Type: String
VpcId:
AssociationProperty: ALIYUN::ECS::VPC::VPCId
Description:
en: The ID of the VPC.
Required: true
Type: String
ZoneId:
AssociationProperty: ZoneId
Description:
en: Availability Zone ID.
Required: true
Type: String
Resources:
MyBase:
Properties:
AutoRenew:
Ref: AutoRenew
DedicatedHostGroupDescription:
Ref: DedicatedHostGroupDescription
DedicatedHostGroupId:
Ref: DedicatedHostGroupId
ECSClassList:
Ref: ECSClassList
EcsDeploymentSetId:
Ref: EcsDeploymentSetId
EcsHostName:
Ref: EcsHostName
EcsInstanceName:
Ref: EcsInstanceName
EcsUniqueSuffix:
Ref: EcsUniqueSuffix
Engine:
Ref: Engine
ImageId:
Ref: ImageId
InternetChargeType:
Ref: InternetChargeType
InternetMaxBandwidthOut:
Ref: InternetMaxBandwidthOut
KeyPairName:
Ref: KeyPairName
OsPassword:
Ref: OsPassword
PasswordInherit:
Ref: PasswordInherit
PayType:
Ref: PayType
Period:
Ref: Period
PeriodType:
Ref: PeriodType
ResourceGroupId:
Ref: ResourceGroupId
SecurityGroupId:
Ref: SecurityGroupId
UserData:
Ref: UserData
UserDataInBase64:
Ref: UserDataInBase64
VSwitchId:
Ref: VSwitchId
VpcId:
Ref: VpcId
ZoneId:
Ref: ZoneId
Type: ALIYUN::CDDC::MyBase
Outputs:
InstanceIds:
Description: The instance id list of created ecs instances
Value:
Fn::GetAtt:
- MyBase
- InstanceIds
OrderIds:
Description: The order id list.
Value:
Fn::GetAtt:
- MyBase
- OrderIds
Formato JSON
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"EcsInstanceName": {
"Type": "String",
"Description": {
"en": "The name of the ECS instance."
},
"Required": false
},
"PeriodType": {
"AssociationProperty": "PayPeriodUnit",
"Type": "String",
"Description": {
"en": "Prepaid type, currently only supports Monthly (monthly subscription)."
},
"Required": false
},
"ResourceGroupId": {
"Type": "String",
"Description": {
"en": "Resource group id."
},
"Required": false
},
"UserData": {
"AssociationProperty": "TextArea",
"Type": "String",
"Description": {
"en": "User-defined script data, the original data is up to 16KB."
},
"Required": false
},
"DedicatedHostGroupDescription": {
"Type": "String",
"Description": {
"en": "The name of the dedicated cluster."
},
"Required": false
},
"DedicatedHostGroupId": {
"Type": "String",
"Description": {
"en": "The ID of the dedicated cluster."
},
"Required": false
},
"AutoRenew": {
"Type": "Boolean",
"Description": {
"en": "Whether to enable auto renew."
},
"Required": false
},
"EcsUniqueSuffix": {
"Type": "Boolean",
"Description": {
"en": "The unique suffix of the ECS instance."
},
"Required": false
},
"ImageId": {
"Type": "String",
"Description": {
"en": "The image ID."
},
"Required": false
},
"UserDataInBase64": {
"Type": "Boolean",
"Description": {
"en": "The user data of the ECS instance."
},
"Required": false
},
"EcsHostName": {
"Type": "String",
"Description": {
"en": "The host name of the ECS instance."
},
"Required": false
},
"Engine": {
"Type": "String",
"Description": {
"en": "Database type."
},
"Required": true
},
"PasswordInherit": {
"Type": "Boolean",
"Description": {
"en": "Whether to inherit the password from the parent cluster."
},
"Required": false
},
"KeyPairName": {
"Type": "String",
"Description": {
"en": "The name of the key pair."
},
"Required": false
},
"ZoneId": {
"AssociationProperty": "ZoneId",
"Type": "String",
"Description": {
"en": "Availability Zone ID."
},
"Required": true
},
"VSwitchId": {
"AssociationPropertyMetadata": {
"VpcId": "${VpcId}",
"ZoneId": "${ZoneId}"
},
"AssociationProperty": "ALIYUN::VPC::VSwitch::VSwitchId",
"Type": "String",
"Description": {
"en": "Virtual switch ID."
},
"Required": true
},
"SecurityGroupId": {
"AssociationPropertyMetadata": {
"VpcId": "${VpcId}"
},
"AssociationProperty": "ALIYUN::ECS::SecurityGroup::SecurityGroupId",
"Type": "String",
"Description": {
"en": "The ID of the security group."
},
"Required": true
},
"ECSClassList": {
"AssociationPropertyMetadata": {
"Parameter": {
"Type": "Json",
"Description": {
"en": "ECS Class Properties."
},
"Required": true
}
},
"AssociationProperty": "List[Parameter]",
"Type": "Json",
"Description": {
"en": "ECS Class List."
},
"Required": true,
"MinLength": 1,
"MaxLength": 1
},
"Period": {
"AssociationProperty": "PayPeriod",
"Type": "Number",
"Description": {
"en": "The period of the subscription in months."
},
"Required": true,
"MinValue": 1,
"MaxValue": 12
},
"PayType": {
"Type": "String",
"Description": {
"en": "Payment type, currently only supports PrePaid."
},
"AllowedValues": [
"Subscription"
],
"Required": true
},
"InternetChargeType": {
"AssociationPropertyMetadata": {
"LocaleKey": "InternetChargeType"
},
"Type": "String",
"Description": {
"en": "Network billing type. Value range: \nPayByBandwidth: billed based on fixed bandwidth. \nPayByTraffic: Pay by traffic usage."
},
"AllowedValues": [
"PayByTraffic",
"PayByBandwidth"
],
"Required": false
},
"EcsDeploymentSetId": {
"Type": "String",
"Description": {
"en": "The ID of the deployment set."
},
"Required": false
},
"InternetMaxBandwidthOut": {
"Type": "Number",
"Description": {
"en": "Set internet output bandwidth of instance. Unit is Mbps(Mega bit per second). \nRange is [0,200]. Default is 1. \nWhile the property is not 0, public ip will be assigned for instance."
},
"Required": false,
"MinValue": 0
},
"VpcId": {
"AssociationProperty": "ALIYUN::ECS::VPC::VPCId",
"Type": "String",
"Description": {
"en": "The ID of the VPC."
},
"Required": true
},
"OsPassword": {
"Type": "String",
"Description": {
"en": "Password of created ecs instance. Must contain at least 3 types of special character, lower character, upper character, number."
},
"Required": false
}
},
"Resources": {
"MyBase": {
"Type": "ALIYUN::CDDC::MyBase",
"Properties": {
"EcsInstanceName": {
"Ref": "EcsInstanceName"
},
"PeriodType": {
"Ref": "PeriodType"
},
"ResourceGroupId": {
"Ref": "ResourceGroupId"
},
"UserData": {
"Ref": "UserData"
},
"DedicatedHostGroupDescription": {
"Ref": "DedicatedHostGroupDescription"
},
"DedicatedHostGroupId": {
"Ref": "DedicatedHostGroupId"
},
"AutoRenew": {
"Ref": "AutoRenew"
},
"EcsUniqueSuffix": {
"Ref": "EcsUniqueSuffix"
},
"ImageId": {
"Ref": "ImageId"
},
"UserDataInBase64": {
"Ref": "UserDataInBase64"
},
"EcsHostName": {
"Ref": "EcsHostName"
},
"Engine": {
"Ref": "Engine"
},
"PasswordInherit": {
"Ref": "PasswordInherit"
},
"KeyPairName": {
"Ref": "KeyPairName"
},
"ZoneId": {
"Ref": "ZoneId"
},
"VSwitchId": {
"Ref": "VSwitchId"
},
"SecurityGroupId": {
"Ref": "SecurityGroupId"
},
"ECSClassList": {
"Ref": "ECSClassList"
},
"Period": {
"Ref": "Period"
},
"PayType": {
"Ref": "PayType"
},
"InternetChargeType": {
"Ref": "InternetChargeType"
},
"EcsDeploymentSetId": {
"Ref": "EcsDeploymentSetId"
},
"InternetMaxBandwidthOut": {
"Ref": "InternetMaxBandwidthOut"
},
"VpcId": {
"Ref": "VpcId"
},
"OsPassword": {
"Ref": "OsPassword"
}
}
}
},
"Outputs": {
"OrderIds": {
"Description": "The order id list.",
"Value": {
"Fn::GetAtt": [
"MyBase",
"OrderIds"
]
}
},
"InstanceIds": {
"Description": "The instance id list of created ecs instances",
"Value": {
"Fn::GetAtt": [
"MyBase",
"InstanceIds"
]
}
}
}
}