ALIYUN::Memcache::Whitelist类型用于创建白名单。
语法
{
"Type": "ALIYUN::Memcache::Whitelist",
"Properties": {
"InstanceId": String,
"SecurityIpGroupName": String,
"SecurityIpGroupAttribute": String,
"SecurityIps": String
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
---|---|---|---|---|---|
InstanceId | String | 是 | 否 | 实例ID | 无 |
SecurityIpGroupName | String | 否 | 否 | IP白名单分组的名称 | 无 |
SecurityIpGroupAttribute | String | 否 | 否 | IP白名单分组的属性 | 默认不指定此参数。如果此参数取值为hidden,则这个IP白名单分组将不在控制台显示。 |
SecurityIps | String | 是 | 是 | IP白名单分组下的IP列表 | 最多1000个IP。IP之间以半角逗号(,)隔开,格式为:0.0.0.0/0,10.23.12.24,或者10.23.12.24/24(CIDR模式,无类域间路由。“/24”表示地址中前缀的长度,范围1~32)。 |
返回值
Fn::GetAtt
- SecurityIpGroupName:IP白名单分组的名称。
- SecurityIpGroupAttribute:IP白名单分组的属性。
- SecurityIps:IP白名单分组下的IP列表。
示例
JSON
格式
{
"ROSTemplateFormatVersion": "2015-09-01",
"Resources": {
"Whitelist": {
"Type": "ALIYUN::Memcache::Whitelist",
"Properties": {
"InstanceId": {
"Ref": "InstanceId"
},
"SecurityIpGroupName": {
"Ref": "SecurityIpGroupName"
},
"SecurityIpGroupAttribute": {
"Ref": "SecurityIpGroupAttribute"
},
"SecurityIps": {
"Ref": "SecurityIps"
}
}
}
},
"Parameters": {
"InstanceId": {
"Type": "String",
"Description": "Instance ID (globally unique)"
},
"SecurityIpGroupName": {
"AllowedPattern": "[a-z][a-zA-Z0-9_]*[a-zA-Z0-9]",
"MinLength": 2,
"Type": "String",
"Description": "Whitelist group",
"MaxLength": 32
},
"SecurityIpGroupAttribute": {
"Type": "String",
"Description": "The default is empty. For distinguishing between different attribute values, the console will not display the value of hidden whitelist packet."
},
"SecurityIps": {
"Type": "String",
"Description": "IP address whitelist to be modified"
}
},
"Outputs": {
"SecurityIpGroupName": {
"Description": "Whitelist group",
"Value": {
"Fn::GetAtt": [
"Whitelist",
"SecurityIpGroupName"
]
}
},
"SecurityIpGroupAttribute": {
"Description": "The default is empty. For distinguishing between different attribute values, the console will not display the value of hidden whitelist packet.",
"Value": {
"Fn::GetAtt": [
"Whitelist",
"SecurityIpGroupAttribute"
]
}
},
"SecurityIps": {
"Description": "IP address whitelist to be modified",
"Value": {
"Fn::GetAtt": [
"Whitelist",
"SecurityIps"
]
}
}
}
}
YAML
格式
ROSTemplateFormatVersion: '2015-09-01'
Resources:
Whitelist:
Type: 'ALIYUN::Memcache::Whitelist'
Properties:
InstanceId:
Ref: InstanceId
SecurityIpGroupName:
Ref: SecurityIpGroupName
SecurityIpGroupAttribute:
Ref: SecurityIpGroupAttribute
SecurityIps:
Ref: SecurityIps
Parameters:
InstanceId:
Type: String
Description: Instance ID (globally unique)
SecurityIpGroupName:
AllowedPattern: '[a-z][a-zA-Z0-9_]*[a-zA-Z0-9]'
MinLength: 2
Type: String
Description: Whitelist group
MaxLength: 32
SecurityIpGroupAttribute:
Type: String
Description: >-
The default is empty. For distinguishing between different attribute
values, the console will not display the value of hidden whitelist packet.
SecurityIps:
Type: String
Description: IP address whitelist to be modified
Outputs:
SecurityIpGroupName:
Description: Whitelist group
Value:
'Fn::GetAtt':
- Whitelist
- SecurityIpGroupName
SecurityIpGroupAttribute:
Description: >-
The default is empty. For distinguishing between different attribute
values, the console will not display the value of hidden whitelist packet.
Value:
'Fn::GetAtt':
- Whitelist
- SecurityIpGroupAttribute
SecurityIps:
Description: IP address whitelist to be modified
Value:
'Fn::GetAtt':
- Whitelist
- SecurityIps