ALIYUN::NLB::SecurityGroupAttachment

ALIYUN::NLB::SecurityGroupAttachment类型用于为网络型负载均衡实例绑定已创建的安全组。

语法

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

属性

属性名称

类型

必须

允许更新

描述

约束

LoadBalancerId

String

待绑定安全组的网络型负载均衡实例ID。

SecurityGroupIds

List

安全组ID。

最多支持10个安全组ID。

返回值

Fn::GetAtt

示例

  • YAML格式

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      LoadBalancerId:
        Description:
          en: The ID of the network-based server load balancer instance to be bound to
            the security group.
        Type: String
      SecurityGroupIds:
        AssociationProperty: List[Parameter]
        Description:
          en: List of security group id.
        MaxLength: 10
        Type: Json
    Resources:
      SecurityGroupAttachment:
        Properties:
          LoadBalancerId:
            Ref: LoadBalancerId
          SecurityGroupIds:
            Ref: SecurityGroupIds
        Type: ALIYUN::NLB::SecurityGroupAttachment
                            
  • JSON格式

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "LoadBalancerId": {
          "Type": "String",
          "Description": {
            "en": "The ID of the network-based server load balancer instance to be bound to the security group."
          }
        },
        "SecurityGroupIds": {
          "AssociationProperty": "List[Parameter]",
          "Type": "Json",
          "Description": {
            "en": "List of security group id."
          },
          "MaxLength": 10
        }
      },
      "Resources": {
        "SecurityGroupAttachment": {
          "Type": "ALIYUN::NLB::SecurityGroupAttachment",
          "Properties": {
            "LoadBalancerId": {
              "Ref": "LoadBalancerId"
            },
            "SecurityGroupIds": {
              "Ref": "SecurityGroupIds"
            }
          }
        }
      }
    }