文档

ALIYUN::Memcache::Whitelist

更新时间:

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列表。

示例

YAML格式

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  InstanceId:
    Type: String
    Description: Memcache Instance Id
    Default: '****'
  SecurityIpGroupName:
    Type: String
    Default: mytest
Resources:
  Whitelist:
    Type: ALIYUN::Memcache::Whitelist
    Properties:
      InstanceId:
        Ref: InstanceId
      SecurityIpGroupName:
        Ref: SecurityIpGroupName
      SecurityIpGroupAttribute: test
      SecurityIps: 0.0.0.0/0
Outputs:
  SecurityIpGroupName:
    Value:
      Fn::GetAtt:
        - Whitelist
        - SecurityIpGroupName
  SecurityIpGroupAttribute:
    Value:
      Fn::GetAtt:
        - Whitelist
        - SecurityIpGroupAttribute
  SecurityIps:
    Value:
      Fn::GetAtt:
        - Whitelist
        - SecurityIps

JSON格式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "InstanceId": {
      "Type": "String",
      "Description": "Memcache Instance Id",
      "Default": "****"
    },
    "SecurityIpGroupName": {
      "Type": "String",
      "Default": "mytest"
    }
  },
  "Resources": {
    "Whitelist": {
      "Type": "ALIYUN::Memcache::Whitelist",
      "Properties": {
        "InstanceId": {
          "Ref": "InstanceId"
        },
        "SecurityIpGroupName": {
          "Ref": "SecurityIpGroupName"
        },
        "SecurityIpGroupAttribute": "test",
        "SecurityIps": "0.0.0.0/0"
      }
    }
  },
  "Outputs": {
    "SecurityIpGroupName": {
      "Value": {
        "Fn::GetAtt": [
          "Whitelist",
          "SecurityIpGroupName"
        ]
      }
    },
    "SecurityIpGroupAttribute": {
      "Value": {
        "Fn::GetAtt": [
          "Whitelist",
          "SecurityIpGroupAttribute"
        ]
      }
    },
    "SecurityIps": {
      "Value": {
        "Fn::GetAtt": [
          "Whitelist",
          "SecurityIps"
        ]
      }
    }
  }
}
  • 本页导读 (1)
文档反馈