ALIYUN::BastionHost::Host is used to create a host for O&M in a bastion host.

Syntax

{
  "Type": "ALIYUN::BastionHost::Host",
  "Properties": {
    "Comment": String,
    "ActiveAddressType": String,
    "HostPrivateAddress": String,
    "InstanceRegionId": String,
    "HostPublicAddress": String,
    "InstanceId": String,
    "OSType": String,
    "SourceInstanceId": String,
    "HostName": String,
    "Source": String
  }
}

Properties

Property Type Required Editable Description Constraint
Comment String No Yes The description of the host. The description can be up to 500 characters in length.
ActiveAddressType String Yes No The IP address type of the host. Valid values:
  • Public
  • Private
HostPrivateAddress String No Yes The private IP address of the host. You can set this property to a domain name or an IP address.
Note This property is required if the ActiveAddressType property is set to Private.
InstanceRegionId String No No The ID of the region to which the Elastic Compute Service (ECS) instance or dedicated cluster host that you want to create belongs. None.
HostPublicAddress String No Yes The public IP address of the host. You can set this property to a domain name or an IP address.
Note This property is required if the ActiveAddressType property is set to Public.
InstanceId String Yes No The ID of the bastion host in which you want to create the host.
Note You can the DescribeInstances operation to query the ID of the bastion host.
OSType String Yes Yes The OS of the host. Valid values:
  • Linux
  • Windows
SourceInstanceId String No No The ID of the ECS instance or dedicated cluster host that you want to create. None.
HostName String Yes Yes The name of the host. The name can be up to 128 characters in length.
Source String Yes No The source of the host. Valid values:
  • Local: an on-premises host
  • Ecs: an ECS instance
  • Rds: a host in an ApsaraDB MyBase dedicated cluster

Return values

Fn::GetAtt

HostId: the ID of the host.

Examples

  • JSON format

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "ActiveAddressType": {
          "Type": "String",
          "Description": "The endpoint type of the host that you want to create. Valid values:\nPublic: a public endpoint\nPrivate: an internal endpoint",
          "AllowedValues": [
            "Private",
            "Public"
          ]
        },
        "InstanceId": {
          "Type": "String",
          "Description": "The ID of the Bastionhost instance where you want to create the host.\nNote: You can call the DescribeInstances operation to query the ID of the Bastionhost instance."
        },
        "OSType": {
          "Type": "String",
          "Description": "The operating system of the host that you want to create. Valid values:\n- Linux\n- Windows",
          "AllowedValues": [
            "Linux",
            "Windows"
          ]
        },
        "HostName": {
          "Type": "String",
          "Description": "The name of the host that you want to create. The name can be up to 128 characters in length.",
          "MaxLength": 128
        },
        "Source": {
          "Type": "String",
          "Description": "The source of the host that you want to create. Valid values:\n- Local: an on-premises host\n- Ecs: an Elastic Compute Service (ECS) instance\n- Rds: a host in a dedicated cluster",
          "AllowedValues": [
            "Ecs",
            "Local",
            "Rds"
          ]
        }
      },
      "Resources": {
        "Host": {
          "Type": "ALIYUN::BastionHost::Host",
          "Properties": {
            "ActiveAddressType": {
              "Ref": "ActiveAddressType"
            },
            "InstanceId": {
              "Ref": "InstanceId"
            },
            "OSType": {
              "Ref": "OSType"
            },
            "HostName": {
              "Ref": "HostName"
            },
            "Source": {
              "Ref": "Source"
            }
          }
        }
      },
      "Outputs": {
        "HostId": {
          "Description": "The ID of the host that was created.",
          "Value": {
            "Fn::GetAtt": [
              "Host",
              "HostId"
            ]
          }
        }
      }
    }
  • YAML format

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      ActiveAddressType:
        Type: String
        Description: |-
          The endpoint type of the host that you want to create. Valid values:
          Public: a public endpoint
          Private: an internal endpoint
        AllowedValues:
          - Private
          - Public
      InstanceId:
        Type: String
        Description: |-
          The ID of the Bastionhost instance where you want to create the host.
          Note: You can call the DescribeInstances operation to query the ID of the Bastionhost instance.
      OSType:
        Type: String
        Description: |-
          The operating system of the host that you want to create. Valid values:
          - Linux
          - Windows
        AllowedValues:
          - Linux
          - Windows
      HostName:
        Type: String
        Description: The name of the host that you want to create. The name can be up to 128 characters in length.
        MaxLength: 128
      Source:
        Type: String
        Description: |-
          The source of the host that you want to create. Valid values:
          - Local: an on-premises host
          - Ecs: an Elastic Compute Service (ECS) instance
          - Rds: a host in a dedicated cluster
        AllowedValues:
          - Ecs
          - Local
          - Rds
    Resources:
      Host:
        Type: ALIYUN::BastionHost::Host
        Properties:
          ActiveAddressType:
            Ref: ActiveAddressType
          InstanceId:
            Ref: InstanceId
          OSType:
            Ref: OSType
          HostName:
            Ref: HostName
          Source:
            Ref: Source
    Outputs:
      HostId:
        Description: The ID of the host that was created.
        Value:
          Fn::GetAtt:
            - Host
            - HostId