O recurso ALIYUN::DEVOPS::HostGroup crie um grupo de hosts.
Sintaxe
{
"Type": "ALIYUN::DEVOPS::HostGroup",
"Properties": {
"Name": String,
"OrganizationId": String,
"ServiceConnectionId": Integer,
"AliyunRegion": String,
"EcsType": String,
"EnvId": String,
"EcsLabelValue": String,
"EcsLabelKey": String,
"MachineInfos": List,
"Type": String,
"TagIds": List
}
}
Propriedades
|
Propriedade |
Tipo |
Obrigatória |
Editável |
Descrição |
Restrição |
|
Name |
String |
Sim |
Sim |
Nome do grupo de hosts. |
Nenhuma |
|
OrganizationId |
String |
Sim |
Não |
ID da organização. |
Nenhuma |
|
ServiceConnectionId |
Integer |
Sim |
Não |
ID da conexão de serviço. |
Nenhuma |
|
AliyunRegion |
String |
Não |
Não |
Região da Alibaba Cloud. |
Nenhuma |
|
EcsType |
String |
Não |
Não |
Tipo de instância do Elastic Compute Service (ECS). |
Nenhuma |
|
EnvId |
String |
Não |
Não |
ID do ambiente. |
Nenhuma |
|
EcsLabelValue |
String |
Não |
Não |
Valor da tag do tipo de instância ECS. |
Nenhuma |
|
EcsLabelKey |
String |
Não |
Não |
Chave da tag do tipo de instância ECS. |
Nenhuma |
|
MachineInfos |
List |
Não |
Não |
Configuração dos hosts. |
Para mais informações, consulte MachineInfos properties. |
|
Type |
String |
Não |
Não |
Tipo do grupo de hosts. |
Somente grupos de hosts do tipo ECS são compatíveis. |
|
TagIds |
List |
Não |
Não |
IDs das tags. |
Especifique até 10 tags. |
Sintaxe de MachineInfos
"MachineInfos": [
{
"InstanceName": String,
"MachineSn": String,
"Ip": String,
"AliyunRegionId": String
}
]
Propriedades de MachineInfos
|
Propriedade |
Tipo |
Obrigatória |
Editável |
Descrição |
Restrição |
|
MachineSn |
String |
Sim |
Não |
ID da instância. |
Nenhuma |
|
AliyunRegionId |
String |
Não |
Não |
ID da região da instância. |
Nenhuma |
|
InstanceName |
String |
Não |
Não |
Nome da instância. |
Nenhuma |
|
Ip |
String |
Não |
Não |
Endereço IP associado à instância. |
Nenhuma |
Valores de retorno
Fn::GetAtt
HostGroupId: o ID do grupo de hosts.
Exemplos
Formato YAML
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
ServiceConnectionId:
Type: Number
Description:
en: Service connection.
Required: true
OrganizationId:
Type: String
Description:
en: Corporate identity, also known as enterprise id, can obtain in cloud effect access links.
Required: true
Name:
Type: String
Description:
en: Host group name.
Required: true
Resources:
HostGroup:
Type: ALIYUN::DEVOPS::HostGroup
Properties:
ServiceConnectionId:
Ref: ServiceConnectionId
OrganizationId:
Ref: OrganizationId
Name:
Ref: Name
Outputs:
HostGroupId:
Description: The id of the host group.
Value:
Fn::GetAtt:
- HostGroup
- HostGroupId
Formato JSON
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"ServiceConnectionId": {
"Type": "Number",
"Description": {
"en": "Service connection."
},
"Required": true
},
"OrganizationId": {
"Type": "String",
"Description": {
"en": "Corporate identity, also known as enterprise id, can obtain in cloud effect access links."
},
"Required": true
},
"Name": {
"Type": "String",
"Description": {
"en": "Host group name."
},
"Required": true
}
},
"Resources": {
"HostGroup": {
"Type": "ALIYUN::DEVOPS::HostGroup",
"Properties": {
"ServiceConnectionId": {
"Ref": "ServiceConnectionId"
},
"OrganizationId": {
"Ref": "OrganizationId"
},
"Name": {
"Ref": "Name"
}
}
}
},
"Outputs": {
"HostGroupId": {
"Description": "The id of the host group.",
"Value": {
"Fn::GetAtt": [
"HostGroup",
"HostGroupId"
]
}
}
}
}