ALIYUN::REDIS::PrepayInstance is used to create an ApsaraDB for Redis instance that is billed using the subscription method.

Syntax

{
  "Type": "ALIYUN::REDIS::PrepayInstance",
  "Properties": {
    "VpcId": String,
    "EvictionPolicy": String,
    "Period": Integer,
    "ZoneId": String,
    "InstanceClass": String,
    "VSwitchId": String,
    "EngineVersion": String,
    "Password": String,
    "InstanceName": String
  }
}

Properties

Name Type Required Editable Description Validity
EngineVersion String No No The database version of the instance. Default value: 2.8. Valid values: 2.8, 4.0, and 5.0.
VpcId String No No The ID of the VPC. None
EvictionPolicy String No No The data eviction policy. Valid values: noeviction, allkeys-lru, volatile-lru, allkeys-random, volatile-random, and volatile-ttl.
Period Integer No No The renewal period of the instance. Unit: months. Valid values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, and 36.
ZoneId String No No The ID of the zone where the instance resides. None
InstanceClass String No No The type of the instance.

Capacity: 1 GB. Type: redis.master.small.default.

Capacity: 2 GB. Type: redis.master.mid.default.

Capacity: 4 GB. Type: redis.master.stand.default.

Capacity: 8 GB. Type: redis.master.large.default.

Capacity: 16 GB. Type: redis.master.2xlarge.default.

Capacity: 32 GB. Type: redis.master.4xlarge.default.

Capacity: 64 GB. Type: redis.master.8xlarge.default.

Capacity: 128 GB. Type: redis.sharding.2xlarge.default.

Capacity: 256 GB. Type: redis.sharding.4xlarge.default.

VSwitchId String No No The ID of the VSwitch that is connected to the specified VPC. None
Password String No No The password used to log on to the instance. The password must be 8 to 30 characters in length and must contain uppercase letters, lowercase letters, and digits.
InstanceName String No No The name of the instance. The name must be 2 to 128 characters in length and can contain letters, digits, underscores (_), hyphens (-), and periods (.).

Response parameters

Fn::GetAtt

  • InstanceId: the ID of the instance, which is globally unique.
  • OrderId: the order ID of the instance.
  • ConnectionDomain: the domain name used to connect to the instance.
  • Port: the port used to connect to the instance.

Examples

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "InstanceName": {
      "Type": "String",
      "Description": "Display name of the instance, [2, 128] English or Chinese characters, must start with a letter or Chinese in size, can contain numbers, '_' or '.', '-'"
    },
    "VpcId": {
      "Type": "String",
      "Description": "The VPC id to create ecs instance."
    },
    "EvictionPolicy": {
      "Type": "String",
      "Description": "The eviction policy of cache data storage.",
      "AllowedValues": [
        "noeviction",
        "allkeys-lru",
        "volatile-lru",
        "allkeys-random",
        "volatile-random",
        "volatile-ttl"
      ]
    },
    "ZoneId": {
      "Type": "String",
      "Description": "The zone id of input region."
    },
    "VSwitchId": {
      "Type": "String",
      "Description": "The vSwitch Id to create ecs instance."
    },
    "Period": {
      "Type": "Number",
      "Description": "The period of order, when choose Prepaid required.optional value 1-9, 12, 24, 36, Unit in month.",
      "AllowedValues": [
        1,
        2,
        3,
        4,
        5,
        6,
        7,
        8,
        9,
        12,
        24,
        36
      ],
      "Default": 1
    },
    "InstanceClass": {
      "Type": "String",
      "Description": "Redis instance type. Refer the Redis instance type reference, such as 'redis.master.small.default', 'redis.master.4xlarge.default', 'redis.sharding.mid.default' etc"
    },
    "Password": {
      "Type": "String",
      "Description": "The password of redis instance.length 8 to 30 characters, need to contain both uppercase and lowercase letters and numbers"
    }
  },
  "Resources": {
    "KvPrepayInstance": {
      "Type": "ALIYUN::REDIS::PrepayInstance",
      "Properties": {
        "InstanceName": {
          "Ref": "InstanceName"
        },
        "VpcId": {
          "Ref": "VpcId"
        },
        "EvictionPolicy": {
          "Ref": "EvictionPolicy"
        },
        "ZoneId": {
          "Ref": "ZoneId"
        },
        "VSwitchId": {
          "Ref": "VSwitchId"
        },
        "Period": {
          "Ref": "Period"
        },
        "InstanceClass": {
          "Ref": "InstanceClass"
        },
        "Password": {
          "Ref": "Password"
        }
      }
    }
  },
  "Outputs": {
    "ConnectionDomain": {
      "Description": "Connection domain of created instance.",
      "Value": {
        "Fn::GetAtt": [
          "KvPrepayInstance",
          "ConnectionDomain"
        ]
      }
    },
    "InstanceId": {
      "Description": "Instance id for created redis instance.",
      "Value": {
        "Fn::GetAtt": [
          "KvPrepayInstance",
          "InstanceId"
        ]
      }
    },
    "Port": {
      "Description": "Port of created instance.",
      "Value": {
        "Fn::GetAtt": [
          "KvPrepayInstance",
          "Port"
        ]
      }
    },
    "OrderId": {
      "Description": "Order Id of created instance.",
      "Value": {
        "Fn::GetAtt": [
          "KvPrepayInstance",
          "OrderId"
        ]
      }
    }
  }
}