ALIYUN::SAG::ACLRule類型用于添加訪問控制規則。
語法
{
"Type": "ALIYUN::SAG::ACLRule",
"Properties": {
"Direction": String,
"Description": String,
"AclId": String,
"SourceCidr": String,
"DestCidr": String,
"Priority": Integer,
"DestPortRange": String,
"Policy": String,
"IpProtocol": String,
"SourcePortRange": String,
"Type": String,
"DpiSignatureIds": List,
"Name": String,
"DpiGroupIds": List
}
}
屬性
屬性名稱 | 類型 | 必須 | 允許更新 | 描述 | 約束 |
Direction | String | 是 | 是 | 訪問控制規則應用方向。 | 取值:
|
Description | String | 否 | 是 | 訪問控制規則描述信息。 | 長度為1~512個字符。 |
AclId | String | 是 | 否 | 訪問控制實例ID。 | 無 |
SourceCidr | String | 是 | 是 | 源網段。 | 源網段格式為CIDR格式。例如:192.168.1.0/24。 |
DestCidr | String | 是 | 是 | 目的網段。 | 目的網段格式為CIDR格式。例如:192.168.10.0/24。 |
Priority | Integer | 否 | 是 | 訪問控制規則優先級。 | 取值范圍:1~100。 默認值:1。 |
DestPortRange | String | 是 | 是 | 目的端口范圍。 | 無 |
Policy | String | 是 | 是 | 訪問控制規則授權策略。 | 取值:
|
IpProtocol | String | 是 | 是 | 訪問控制規則應用的協議。 | 協議格式不區分大小寫。 |
SourcePortRange | String | 是 | 是 | 源端口范圍。 | 無 |
Type | String | 否 | 是 | 訪問控制規則類型。 | 取值:
|
DpiSignatureIds | List | 否 | 是 | 應用ID列表。 | 最多支持同時指定100個應用ID。 您可以調用ListDpiSignatures查詢應用ID及其對應的應用信息。 |
Name | String | 否 | 是 | 訪問控制規則的名稱。 | 長度為2~100個字符,必須以英文字母開頭。可包含英文字母、數字、下劃線(_)和短劃線(-)。 |
DpiGroupIds | List | 否 | 是 | 應用組ID。 | 最多支持同時指定100個應用組ID。 您可以調用ListDpiGroups查查詢應用組ID及其包含的應用信息。 |
返回值
Fn::GetAtt
AcrId:訪問控制規則ID。
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
Direction:
Type: String
Description: |-
Regular direction.
Value: in|out
AllowedValues:
- in
- out
Default: in
AclId:
Type: String
Description: Access control ID.
Default: acl-***
SourceCidr:
Type: String
Description: Source address, CIDR format and IP address range in IPv4 format.
Default: 192.168.1.0/24
DestCidr:
Type: String
Description: Destination address, CIDR format and IP address range in IPv4 format.
Default: 192.168.1.0/24
Priority:
Default: 1
Type: Number
Description: |-
Priority, ranging from 1 to 100.
Default: 1
MaxValue: 100
MinValue: 1
DestPortRange:
Type: String
Description: Destination port range, 80/80.
Default: 80/80
Policy:
Type: String
Description: 'Access: accept|drop'
AllowedValues:
- accept
- drop
Default: accept
IpProtocol:
Type: String
Description: Protocol, not case sensitive.
Default: ALL
SourcePortRange:
Type: String
Description: Source port range, 80/80.
Default: 80/80
Resources:
ACLRule:
Type: ALIYUN::SAG::ACLRule
Properties:
Direction:
Ref: Direction
AclId:
Ref: AclId
SourceCidr:
Ref: SourceCidr
DestCidr:
Ref: DestCidr
Priority:
Ref: Priority
DestPortRange:
Ref: DestPortRange
Policy:
Ref: Policy
IpProtocol:
Ref: IpProtocol
SourcePortRange:
Ref: SourcePortRange
Outputs:
AcrId:
Description: Access control rule ID.
Value:
Fn::GetAtt:
- ACLRule
- AcrId
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"Direction": {
"Type": "String",
"Description": "Regular direction.\nValue: in|out",
"AllowedValues": [
"in",
"out"
],
"Default": "in"
},
"AclId": {
"Type": "String",
"Description": "Access control ID.",
"Default": "acl-***"
},
"SourceCidr": {
"Type": "String",
"Description": "Source address, CIDR format and IP address range in IPv4 format.",
"Default": "192.168.1.0/24"
},
"DestCidr": {
"Type": "String",
"Description": "Destination address, CIDR format and IP address range in IPv4 format.",
"Default": "192.168.1.0/24"
},
"Priority": {
"Default": 1,
"Type": "Number",
"Description": "Priority, ranging from 1 to 100.\nDefault: 1",
"MaxValue": 100,
"MinValue": 1
},
"DestPortRange": {
"Type": "String",
"Description": "Destination port range, 80/80.",
"Default": "80/80"
},
"Policy": {
"Type": "String",
"Description": "Access: accept|drop",
"AllowedValues": [
"accept",
"drop"
],
"Default": "accept"
},
"IpProtocol": {
"Type": "String",
"Description": "Protocol, not case sensitive.",
"Default": "ALL"
},
"SourcePortRange": {
"Type": "String",
"Description": "Source port range, 80/80.",
"Default": "80/80"
}
},
"Resources": {
"ACLRule": {
"Type": "ALIYUN::SAG::ACLRule",
"Properties": {
"Direction": {
"Ref": "Direction"
},
"AclId": {
"Ref": "AclId"
},
"SourceCidr": {
"Ref": "SourceCidr"
},
"DestCidr": {
"Ref": "DestCidr"
},
"Priority": {
"Ref": "Priority"
},
"DestPortRange": {
"Ref": "DestPortRange"
},
"Policy": {
"Ref": "Policy"
},
"IpProtocol": {
"Ref": "IpProtocol"
},
"SourcePortRange": {
"Ref": "SourcePortRange"
}
}
}
},
"Outputs": {
"AcrId": {
"Description": "Access control rule ID.",
"Value": {
"Fn::GetAtt": [
"ACLRule",
"AcrId"
]
}
}
}
}