文档

ALIYUN::ENS::NetworkAclAssociation

更新时间:

ALIYUN::ENS::NetworkAclAssociation类型用于绑定网络ACL至网络。

语法

{
  "Type": "ALIYUN::ENS::NetworkAclAssociation",
  "Properties": {
    "NetworkAclId": String,
    "NetworkIds": List
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

NetworkAclId

String

ACL ID。

NetworkIds

List

需要关联的网络ID

最多支持30个资源。

返回值

Fn::GetAtt

NetworkAclId:ACL ID。

示例

YAML格式

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  NetworkAclId:
    Type: String
    Description:
      en: The ID of the network ACL.
    Required: true
  NetworkIds:
    AssociationPropertyMetadata:
      Parameter:
        Type: String
        Required: false
    AssociationProperty: List[Parameter]
    Type: Json
    Description:
      en: The network id which you want to associate the network ACL.
    Required: true
    MinLength: 1
    MaxLength: 30
Resources:
  NetworkAclAssociation:
    Type: ALIYUN::ENS::NetworkAclAssociation
    Properties:
      NetworkAclId:
        Ref: NetworkAclId
      NetworkIds:
        Ref: NetworkIds
Outputs:
  NetworkAclId:
    Description: The network acl id to associate.
    Value:
      Fn::GetAtt:
        - NetworkAclAssociation
        - NetworkAclId

JSON格式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "NetworkAclId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the network ACL."
      },
      "Required": true
    },
    "NetworkIds": {
      "AssociationPropertyMetadata": {
        "Parameter": {
          "Type": "String",
          "Required": false
        }
      },
      "AssociationProperty": "List[Parameter]",
      "Type": "Json",
      "Description": {
        "en": "The network id which you want to associate the network ACL."
      },
      "Required": true,
      "MinLength": 1,
      "MaxLength": 30
    }
  },
  "Resources": {
    "NetworkAclAssociation": {
      "Type": "ALIYUN::ENS::NetworkAclAssociation",
      "Properties": {
        "NetworkAclId": {
          "Ref": "NetworkAclId"
        },
        "NetworkIds": {
          "Ref": "NetworkIds"
        }
      }
    }
  },
  "Outputs": {
    "NetworkAclId": {
      "Description": "The network acl id to associate.",
      "Value": {
        "Fn::GetAtt": [
          "NetworkAclAssociation",
          "NetworkAclId"
        ]
      }
    }
  }
}
                        
  • 本页导读 (1)