edit-icon download-icon

ALIYUN::MEMCACHE::Instance

Last Updated: Mar 27, 2018

The ALIYUN::MEMCACHE::Instance type is used to create an ApsaraDB for Memcache instance.

Syntax

  1. {
  2. "Type" : "ALIYUN::MEMCACHE::Instance",
  3. "Properties" : {
  4. "VpcId" : String,
  5. "Capacity" : Integer,
  6. "PrivateIpAddr" : String,
  7. "ZoneId" : String,
  8. "SecurityIPArray" : String,
  9. "VSwitchId" : String,
  10. "NetworkType" : String,
  11. "Password" : String,
  12. "InstanceName" : String
  13. }
  14. }

Attributes

Attribute name Type Required? Description Constraint
Capacity integer Yes Storage space Value range: 128 MB to 51,200 MB. Value options: 128 MB, 256 MB, 512 MB, 1,024 MB, 2,048 MB, …. 51,200 MB. The unit is MB.
Password string Yes Password The password is a string of 8 to 30 characters and must contain digits and uppercase/lowercase letters.
VpcId string No VPC ID N/A
PrivateIpAddr string No Private IP address in VPC The private IP address must belong to the CIDR block specified by VpcId and VSwitchId.
ZoneId string No Zone ID N/A
SecurityIPArray string No Whitelist of the IP addresses allowed to access the instance The IP addresses are separated by commas and cannot be repeated. The list can contain a maximum of 1,000 IP addresses. Supported formats include %, 0.0.0.0/0, 10.23.12.24 (IP), and 10.23.12.24/24. (CIDR mode; classless inter-domain routing. /24 indicates the length of the prefix of an IP address. The range of the prefix length is [1, 32].) 0.0.0.0/0 indicates that no access restriction is applied. By default, no access restriction is applied.
VSwitchId string No VSwitch ID associated with the VPC ID N/A
NetworkType string No Network type Value options: CLASSIC and VPC.
InstanceName string No Instance name It can contain up to 128 characters.

Return values

Fn::GetAtt

  • InstanceStatus: status of the created instance.
  • InstanceId: ID of the created instance.
  • ConnectionDomain: domain name used to connect to the instance.
  • QPS: peak QPS of the instance.
  • InstanceName: name of the instance.
  • PrivateIpAddress: IP address of the instance in VPC (Classic networks do not have private IP addresses.)

Example

  1. {
  2. "ROSTemplateFormatVersion" : "2015-09-01",
  3. "Resources" : {
  4. "OcsInstance": {
  5. "Type": "ALIYUN::MEMCACHE::Instance",
  6. "Properties": {
  7. "Password": "YU76sdfsfdUY",
  8. "Capacity": 1024,
  9. "VpcId": "vpc-25o8sqkwb",
  10. "VSwitchId": "vsw-25rc1y5t9",
  11. "ZoneId": "cn-beijing-c"
  12. }
  13. }
  14. },
  15. "Outputs": {
  16. "ConnectionDomain": {
  17. "Description": " Intranet connection string",
  18. "Value": {
  19. "Fn::GetAtt": [
  20. "OcsInstance",
  21. "ConnectionDomain"
  22. ]
  23. }
  24. },
  25. "PrivateIpAddress": {
  26. "Description": " Internal IP address",
  27. "Value": {
  28. "Fn::GetAtt": [
  29. "OcsInstance",
  30. "PrivateIpAddress"
  31. ]
  32. }
  33. }
  34. }
  35. }
Thank you! We've received your feedback.