ALIYUN::ALB::Acl类型用于创建访问控制策略组。
语法
{
  "Type": "ALIYUN::ALB::Acl",
  "Properties": {
    "AclEntries": List,
    "ResourceGroupId": String,
    "AclName": String
  }
}属性
| 属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 | 
| AclEntries | List | 否 | 是 | 访问控制条目配置。 | 无 | 
| AclName | String | 否 | 是 | 访问控制策略组名称。 | 必须以大小写字母或中文开头,可包含数字,半角句号(.),下划线(_)和短划线(-),限制长度为2~128个字符。 | 
| ResourceGroupId | String | 否 | 否 | 资源组ID。 | 无 | 
AclEntries语法
"AclEntries": [
  {
    "Entry": String,
    "Description": String
  }
]AclEntries属性
| 属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 | 
| Entry | String | 是 | 否 | 访问控制条目IP地址段。 | 无 | 
| Description | String | 否 | 否 | 访问控制条目备注描述。 | 长度为2~256个字符,可包含英文字母、数字、中文、半角逗号(,)、半角句号(.)、半角分号(;)、正斜线(/)、at(@)、下划线(_)和短划线(-)。 | 
返回值
Fn::GetAtt
AclId:ACL实例ID。
示例
YAML格式
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  AclEntries:
    MaxLength: 1000
    Type: Json
  AclName:
    Description: 'The name of the ACL. The name must be 2 to 128 characters in length,
      and can contain
      letters, digits, hyphens (-) and underscores (_). It must start with a letter.'
    MaxLength: 128
    MinLength: 2
    Type: String
Resources:
  Acl:
    Properties:
      AclEntries:
        Ref: AclEntries
      AclName:
        Ref: AclName
    Type: ALIYUN::ALB::Acl
Outputs:
  AclId:
    Description: The ID of the ACL.
    Value:
      Fn::GetAtt:
      - Acl
      - AclIdJSON格式
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "AclEntries": {
      "Type": "Json",
      "MaxLength": 1000
    },
    "AclName": {
      "Type": "String",
      "Description": "The name of the ACL. The name must be 2 to 128 characters in length, and can contain\nletters, digits, hyphens (-) and underscores (_). It must start with a letter.",
      "MinLength": 2,
      "MaxLength": 128
    }
  },
  "Resources": {
    "Acl": {
      "Type": "ALIYUN::ALB::Acl",
      "Properties": {
        "AclEntries": {
          "Ref": "AclEntries"
        },
        "AclName": {
          "Ref": "AclName"
        }
      }
    }
  },
  "Outputs": {
    "AclId": {
      "Description": "The ID of the ACL.",
      "Value": {
        "Fn::GetAtt": [
          "Acl",
          "AclId"
        ]
      }
    }
  }
}该文章对您有帮助吗?