Cria uma conta de host em uma instância do Bastion Host.
Sintaxe
{
"Type": "ALIYUN::BastionHost::HostAccount",
"Properties": {
"HostAccountName": String,
"HostId": String,
"InstanceId": String,
"ProtocolName": String,
"HostShareKeyId": String,
"PrivateKey": String,
"PassPhrase": String,
"PrivilegeType": String,
"Password": String,
"RotationMode": String
}
}
Propriedades
|
Parâmetro |
Tipo |
Obrigatório |
Atualize permitida |
Descrição |
Restrições |
|
HostAccountName |
String |
Sim |
Não |
Nome da conta do host. |
Nenhuma |
|
HostId |
String |
Sim |
Não |
ID do host. |
Nenhuma |
|
InstanceId |
String |
Sim |
Não |
ID da instância do Bastion Host. |
Nenhuma |
|
ProtocolName |
String |
Sim |
Não |
Nome do protocolo da conta do host. |
Valores válidos: SSH, RDP. |
|
HostShareKeyId |
String |
Não |
Não |
ID da chave compartilhada do host. |
Obrigatório se o protocolo for SSH. |
|
PassPhrase |
String |
Não |
Não |
Frase secreta da chave privada da conta do host. |
Obrigatório se o protocolo for SSH e a chave privada estiver criptografada. |
|
Password |
String |
Não |
Não |
Senha da conta do host. |
Obrigatório se o protocolo for SSH ou RDP. |
|
PrivateKey |
String |
Não |
Não |
Chave privada da conta do host. |
Obrigatório se o protocolo for SSH. |
|
PrivilegeType |
String |
Não |
Não |
Tipo de privilégio da conta do host. |
Valores válidos: Normal, Administrator. |
|
RotationMode |
String |
Não |
Não |
Modo de rotação de senha da conta do host. |
Valores válidos: Manual, Automatic. |
Valores de retorno
Fn::GetAtt
HostAccountId: ID da conta do host.
Exemplos
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
HostAccountName:
Type: String
Description:
en: The name of the host account.
Required: true
ProtocolName:
Type: String
Description:
en: 'The protocol name of the host account. Valid values: SSH, RDP.'
Required: true
InstanceId:
Type: String
Description:
en: The ID of the Bastion Host instance.
Required: true
HostId:
Type: String
Description:
en: The ID of the host.
Required: true
Password:
Type: String
Description:
en: The password of the host account. This parameter is required when the protocol is SSH or RDP.
Required: false
Resources:
HostAccount:
Type: ALIYUN::BastionHost::HostAccount
Properties:
HostAccountName:
Ref: HostAccountName
ProtocolName:
Ref: ProtocolName
InstanceId:
Ref: InstanceId
HostId:
Ref: HostId
Password:
Ref: Password
Outputs:
HostAccountId:
Description:
en: The ID of the host account.
Value:
Fn::GetAtt:
- HostAccount
- HostAccountId
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"HostAccountName": {
"Type": "String",
"Description": {
"en": "The name of the host account."
},
"Required": true
},
"ProtocolName": {
"Type": "String",
"Description": {
"en": "The protocol name of the host account. Valid values: SSH, RDP."
},
"Required": true
},
"InstanceId": {
"Type": "String",
"Description": {
"en": "The ID of the Bastion Host instance."
},
"Required": true
},
"HostId": {
"Type": "String",
"Description": {
"en": "The ID of the host."
},
"Required": true
},
"Password": {
"Type": "String",
"Description": {
"en": "The password of the host account. This parameter is required when the protocol is SSH or RDP."
},
"Required": false
}
},
"Resources": {
"HostAccount": {
"Type": "ALIYUN::BastionHost::HostAccount",
"Properties": {
"HostAccountName": {
"Ref": "HostAccountName"
},
"ProtocolName": {
"Ref": "ProtocolName"
},
"InstanceId": {
"Ref": "InstanceId"
},
"HostId": {
"Ref": "HostId"
},
"Password": {
"Ref": "Password"
}
}
}
},
"Outputs": {
"HostAccountId": {
"Description": {
"en": "The ID of the host account."
},
"Value": {
"Fn::GetAtt": [
"HostAccount",
"HostAccountId"
]
}
}
}
}