Todos os produtos
Search
Central de documentação

Resource Orchestration Service:ALIYUN::BastionHost::Host

Última atualização: Jun 27, 2026

Use o tipo ALIYUN::BastionHost::Host para criar um host de O&M em um bastion host.

Sintaxe

{
  "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
  }
}

Propriedades

Propriedade

Tipo

Obrigatório

Editável

Descrição

Restrição

ActiveAddressType

String

Sim

Não

Tipo de endereço IP do host.

Valores válidos:

  • Public

  • Private

HostName

String

Sim

Sim

Nome do host.

O nome pode ter até 128 caracteres.

InstanceId

String

Sim

Não

ID do bastion host no qual o host será criado.

Nota

Chame a operação DescribeInstances para consultar o ID do bastion host.

OSType

String

Sim

Sim

Sistema operacional do host.

Valores válidos:

  • Linux

  • Windows

Source

String

Sim

Não

Origem do host.

Valores válidos:

  • Local: host em um data center

  • Ecs: instância do Elastic Compute Service (ECS)

  • Rds: host em um cluster dedicado do ApsaraDB MyBase

Comment

String

Não

Sim

Descrição do host.

A descrição pode ter até 500 caracteres.

HostPrivateAddress

String

Não

Sim

Nome de domínio privado ou endereço IP do host.

Aceita formato de nome de domínio ou endereço IP.

Nota

Especifique esta propriedade quando ActiveAddressType estiver definido como Private.

HostPublicAddress

String

Não

Sim

Nome de domínio público ou endereço IP do host.

Aceita formato de nome de domínio ou endereço IP.

Nota

Especifique esta propriedade quando ActiveAddressType estiver definido como Public.

InstanceRegionId

String

Não

Não

ID da região da instância ECS ou do host de cluster dedicado a ser criado.

Nenhuma.

SourceInstanceId

String

Não

Não

ID da instância ECS ou do host de cluster dedicado a ser criado.

Nenhuma.

Valores de retorno

Fn::GetAtt

HostId: o ID do host.

Exemplos

Formato YAML

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

Formato JSON

{
  "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"
        ]
      }
    }
  }
}