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

Resource Orchestration Service:ALIYUN::ALB::SecurityGroupAttachment

最終更新日:Mar 17, 2025

ALIYUN::ALB::SecurityGroupAttachment は、作成されたセキュリティグループを Application Load Balancer(ALB)インスタンスに関連付けるために使用されます。

構文

{
  "Type": "ALIYUN::ALB::SecurityGroupAttachment",
  "Properties": {
    "LoadBalancerId": String,
    "SecurityGroupIds": List
  }
}

プロパティ

プロパティ

タイプ

必須

編集可能

説明

制約

LoadBalancerId

String

はい

いいえ

ALB インスタンスの ID。

なし。

SecurityGroupIds

List

いいえ

はい

セキュリティグループの ID。

最大 4 つのセキュリティグループを関連付けることができます。

戻り値

Fn::GetAtt

なし。

YAML 形式

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  LoadBalancerId:
    Type: String
    Description:
      en: The ID of ALB instance.
    Required: true
  SecurityGroupIds:
    AssociationPropertyMetadata:
      Parameter:
        AssociationProperty: ALIYUN::ECS::SecurityGroup::SecurityGroupId
        Type: String
        Required: true
    AssociationProperty: List[Parameter]
    Type: Json
    Description:
      en: The IDs of the security group to which the ALB instance join.
    Required: false
    MinLength: 0
    MaxLength: 4
Resources:
  SecurityGroupAttachment:
    Type: ALIYUN::ALB::SecurityGroupAttachment
    Properties:
      LoadBalancerId:
        Ref: LoadBalancerId
      SecurityGroupIds:
        Ref: SecurityGroupIds
                        

JSON 形式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "LoadBalancerId": {
      "Type": "String",
      "Description": {
        "en": "The ID of ALB instance."
      },
      "Required": true
    },
    "SecurityGroupIds": {
      "AssociationPropertyMetadata": {
        "Parameter": {
          "AssociationProperty": "ALIYUN::ECS::SecurityGroup::SecurityGroupId",
          "Type": "String",
          "Required": true
        }
      },
      "AssociationProperty": "List[Parameter]",
      "Type": "Json",
      "Description": {
        "en": "The IDs of the security group to which the ALB instance join."
      },
      "Required": false,
      "MinLength": 0,
      "MaxLength": 4
    }
  },
  "Resources": {
    "SecurityGroupAttachment": {
      "Type": "ALIYUN::ALB::SecurityGroupAttachment",
      "Properties": {
        "LoadBalancerId": {
          "Ref": "LoadBalancerId"
        },
        "SecurityGroupIds": {
          "Ref": "SecurityGroupIds"
        }
      }
    }
  }
}