All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::NLB::SecurityGroupAttachment

更新時間:Nov 23, 2023

ALIYUN::NLB::SecurityGroupAttachment is used to bind a security group to a Network Load Balancer (NLB) instance.

Syntax

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

Properties

Property

Type

Required

Editable

Description

Constraint

LoadBalancerId

String

Yes

No

The ID of the NLB instance to which you want to bind a security group.

None.

SecurityGroupIds

List

Yes

No

The ID of the security group.

You can specify up to 10 security groups.

Return values

Fn::GetAtt

None.

Examples

  • YAML format

    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 format

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