The ALIYUN::BastionHost::HostAccount type creates a host account.
Syntax
{
"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
}
}
Properties
|
Parameter |
Type |
Required |
Update allowed |
Description |
Constraints |
|
HostAccountName |
String |
Yes |
No |
The name of the host account. |
None |
|
HostId |
String |
Yes |
No |
The ID of the host. |
None |
|
InstanceId |
String |
Yes |
No |
The ID of the Bastion Host instance. |
None |
|
ProtocolName |
String |
Yes |
No |
The protocol name of the host account. |
Valid values: SSH, RDP. |
|
HostShareKeyId |
String |
No |
No |
The ID of the host share key. |
This parameter is required if the protocol is SSH. |
|
PassPhrase |
String |
No |
No |
The passphrase of the host account. |
This parameter is required if the protocol is SSH and the private key is encrypted. |
|
Password |
String |
No |
No |
The password of the host account. |
This parameter is required if the protocol is SSH or RDP. |
|
PrivateKey |
String |
No |
No |
The private key of the host account. |
This parameter is required if the protocol is SSH. |
|
PrivilegeType |
String |
No |
No |
The privilege type of the host account. |
Valid values: Normal, Administrator. |
|
RotationMode |
String |
No |
No |
The rotation mode of the host account. |
Valid values: Manual, Automatic. |
Return values
Fn::GetAtt
HostAccountId: The ID of the host account.
Examples
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"
]
}
}
}
}