すべてのプロダクト
Search
ドキュメントセンター

Resource Orchestration Service:ホストグループ

最終更新日:Mar 17, 2025

ALIYUN::DEVOPS::HostGroup は、ホストグループを作成するために使用されます。

構文

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

プロパティ

プロパティ

タイプ

必須

編集可能

説明

制約

Name

String

はい

はい

ホストグループの名前。

なし

OrganizationId

String

はい

いいえ

組織の ID。

Apsara DevOps にアクセスして、組織 ID を取得できます。

ServiceConnectionId

Integer

はい

いいえ

サービス接続の ID。

なし

AliyunRegion

String

いいえ

いいえ

Alibaba Cloud のリージョン。

なし

EcsType

String

いいえ

いいえ

Elastic Compute Service (ECS) インスタンスタイプ。

なし

EnvId

String

いいえ

いいえ

環境の ID。

なし

EcsLabelValue

String

いいえ

いいえ

ECS インスタンスタイプに追加されるタグ値。

なし

EcsLabelKey

String

いいえ

いいえ

ECS インスタンスタイプに追加されるタグキー。

なし

MachineInfos

List

いいえ

いいえ

ホストの構成情報。

詳細については、「MachineInfos プロパティ」をご参照ください。

Type

String

いいえ

いいえ

ホストグループのタイプ。

ECS タイプのホストグループのみがサポートされています。

TagIds

List

いいえ

いいえ

タグの ID。

最大 10 個のタグを指定できます。

MachineInfos 構文

"MachineInfos": [
  {
    "InstanceName": String,
    "MachineSn": String,
    "Ip": String,
    "AliyunRegionId": String
  }
]

MachineInfos プロパティ

プロパティ

タイプ

必須

編集可能

説明

制約

MachineSn

String

はい

いいえ

インスタンスの ID。

なし

AliyunRegionId

String

いいえ

いいえ

インスタンスのリージョン ID。

なし

InstanceName

String

いいえ

いいえ

インスタンスの名前。

なし

Ip

String

いいえ

いいえ

インスタンスにバインドされている IP アドレス。

なし

戻り値

Fn::GetAtt

HostGroupId: ホストグループの ID。

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

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": "ホストグループの ID。",
      "Value": {
        "Fn::GetAtt": [
          "HostGroup",
          "HostGroupId"
        ]
      }
    }
  }
}