ALIYUN::REDIS::Whitelist is used to configure an IP address whitelist for an ApsaraDB for Redis instance.

Syntax

{
  "Type": "ALIYUN::REDIS::Whitelist",
  "Properties": {
    "InstanceId": String,
    "SecurityIpGroupName": String,
    "SecurityIpGroupAttribute": String,
    "SecurityIps": String
  }
}

Properties

PropertyTypeRequiredEditableDescriptionConstraint
InstanceIdStringYesNoThe globally unique ID of the ApsaraDB for Redis instance. None.
SecurityIpGroupNameStringNoNoThe name of the whitelist. Default value: default. None.
SecurityIpGroupAttributeStringNoNoThe attribute value of the whitelist. By default, this property is empty. The whitelist of which the attribute value is set to hidden is not displayed in the console. None.
SecurityIpsStringYesYesThe IP addresses in the whitelist. Separate multiple IP addresses with commas (,). Supported formats are IP addresses such as 0.0.0.0/0 and 10.23.12.24, and CIDR blocks such as 10.23.12.24/24. In the sample CIDR block, /24 refers to the length of the IP address prefix. The IP address prefix must be 1 to 32 bits in length. Maximum value: 1000.

Return values

Fn::GetAtt

  • SecurityIpGroupName: the name of the whitelist.
  • SecurityIpGroupAttribute: the attribute value of the whitelist.
  • SecurityIps: the IP addresses in the whitelist.

Examples

  • YAML format

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      InstanceId:
        Type: String
        Description: The globally unique ID of the ApsaraDB for Redis instance.
    Resources:
      Whitelist:
        Type: ALIYUN::REDIS::Whitelist
        Properties:
          InstanceId:
            Ref: InstanceId
          SecurityIpGroupName: ros
          SecurityIpGroupAttribute: show
          SecurityIps: 0.0.0.0/0
    Outputs:
      SecurityIpGroupName:
        Description: The name of the whitelist.
        Value:
          Fn::GetAtt:
            - Whitelist
            - SecurityIpGroupName
      SecurityIpGroupAttribute:
        Description: The attribute value of the whitelist.
        Value:
          Fn::GetAtt:
            - Whitelist
            - SecurityIpGroupAttribute
      SecurityIps:
        Description: The IP addresses in the whitelist.
        Value:
          Fn::GetAtt:
            - Whitelist
            - SecurityIps            
  • JSON format

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "InstanceId": {
          "Type": "String",
          "Description": "The globally unique ID of the ApsaraDB for Redis instance."
        }
      },
      "Resources": {
        "Whitelist": {
          "Type": "ALIYUN::REDIS::Whitelist",
          "Properties": {
            "InstanceId": {
              "Ref": "InstanceId"
            },
            "SecurityIpGroupName": "ros",
            "SecurityIpGroupAttribute": "show",
            "SecurityIps": "0.0.0.0/0"
          }
        }
      },
      "Outputs": {
        "SecurityIpGroupName": {
          "Description": "The name of the whitelist.",
          "Value": {
            "Fn::GetAtt": [
              "Whitelist",
              "SecurityIpGroupName"
            ]
          }
        },
        "SecurityIpGroupAttribute": {
          "Description": "The attribute value of the whitelist.",
          "Value": {
            "Fn::GetAtt": [
              "Whitelist",
              "SecurityIpGroupAttribute"
            ]
          }
        },
        "SecurityIps": {
          "Description": "The IP addresses in the whitelist.",
          "Value": {
            "Fn::GetAtt": [
              "Whitelist",
              "SecurityIps"
            ]
          }
        }
      }
    }