文档

ALIYUN::Memcache::Instance

更新时间:

ALIYUN::Memcache::Instance类型用于创建Memcache实例。

语法

{
  "Type": "ALIYUN::Memcache::Instance",
  "Properties": {
    "VpcId": String,
    "Capacity": Integer,
    "ResourceGroupId": String,
    "BackupPolicy": Map,
    "CouponNo": String,
    "AutoRenewPeriod": String,
    "AutoUseCoupon": String,
    "ZoneId": String,
    "InstanceName": String,
    "AutoRenew": String,
    "InstanceClass": String,
    "VpcPasswordFree": Boolean,
    "VSwitchId": String,
    "ChargeType": String,
    "Period": String,
    "NetworkType": String,
    "Password": String,
    "Config": String,
    "PrivateIpAddress": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

VpcId

String

专有网络ID。

Capacity

Integer

实例容量。

必须指定Capacity或InstanceClass其中一个属性。详情请参见 实例规格表

单位:MB。

ResourceGroupId

String

资源组ID。

BackupPolicy

Map

备份策略。

详情请参见BackupPolicy属性

CouponNo

String

优惠码。

默认值:youhuiquan_promotion_option_id_for_blank。

AutoRenewPeriod

String

自动续费周期。

取值:

  • 1

  • 2

  • 3

  • 6

  • 12

单位:月。

说明

当AutoRenew为true时该参数必选。

AutoUseCoupon

String

是否使用代金券。

取值:

  • true

  • false(默认值)

ZoneId

String

可用区ID。

InstanceName

String

实例名称。

长度为2~128个字符。以英文字母或汉字开头,不支持空格( )和以下特殊字符:

@/:=”<>{[]}

AutoRenew

String

是否开启自动续费。

取值:

  • true

  • false(默认值)

InstanceClass

String

实例规格。

必须指定Capacity或InstanceClass其中一个属性。详情请参见实例规格表

VpcPasswordFree

Boolean

是否在专有网络中启用免密码访问该实例。

VSwitchId

String

交换机ID。

ChargeType

String

付费类型。

取值:

  • PrePaid:预付费。

  • PostPaid(默认值):按量付费。

Period

String

付费周期。

取值:

  • 1

  • 2

  • 3

  • 4

  • 5

  • 6

  • 7

  • 8

  • 9

  • 12

  • 24

  • 36

单位:月。

ChargeType(付费类型)为PrePaid时为必选参数。ChargeType为PostPaid时不支持指定该参数。

NetworkType

String

网络类型。

取值:

  • CLASSIC(默认值):经典网络。

  • VPC:专有网络。

Password

String

实例密码。

长度为8~32个字符。必须包含大写英文字母、小写英文字母、特殊字符和数字中至少三种,支持的特殊字符如下:

!@#$%^&*()_+-=

Config

String

实例的详细配置。

取值是JSON格式的字符串。

PrivateIpAddress

String

实例的私网IP地址。

私网IP需在实例所属的交换机网段内。

BackupPolicy语法

"BackupPolicy": {
  "PreferredBackupTime": String,
  "EnableBackupLog": Integer,
  "PreferredBackupPeriod": String
}

BackupPolicy属性

属性名称

类型

必须

允许更新

描述

约束

PreferredBackupTime

String

备份时间段。

格式:HH:mmZ-HH:mmZ

EnableBackupLog

Integer

是否开启增量备份。

取值:

  • 1:开启。

  • 0(默认值):关闭。

PreferredBackupPeriod

String

备份周期。

取值:

  • Monday

  • Tuesday

  • Wednesday

  • Thursday

  • Friday

  • Saturday

  • Sunday

返回值

Fn::GetAtt

  • InstanceId:实例ID。

  • InstanceName:实例名称。

  • ConnectionDomain:实例连接地址。

  • Port:实例端口。

  • QPS:每秒查询率。

示例

YAML格式

ROSTemplateFormatVersion: '2015-09-01'
Description:
  en: 'Alibaba Cloud ROS Sample Template: Create a VPC type memcache instance.'
  zh-cn: 阿里云资源编排示例模板: 创建一个 VPC类型 memcache 实例。
Parameters:
  ZoneId:
    Type: String
    Description:
      zh-cn: 创建实例的可用区,确保可用区支持Memcache资源规格的创建。
      en: Create an Availability Zone for an instance to ensure that the Availability Zone supports the creation of Memcache resource specifications.
    AssociationProperty: ALIYUN::ECS::Instance::ZoneId
    Label:
      en: Zone ID
      zh-cn: 可用区
  VPC:
    AssociationProperty: ALIYUN::ECS::VPC::VPCId
    Type: String
    Description:
      zh-cn: 现有虚拟专有网络的实例ID,控制台-VPC-专有网络下查询
      en: Please search the ID starts with (vpc-xxx)from console-Virtual Private Cloud
    Label:
      zh-cn: 现有VPC的实例ID
      en: Existing VPC Instance ID
  VSwitch:
    AssociationProperty: ALIYUN::ECS::VSwitch::VSwitchId
    Type: String
    Description:
      zh-cn: 现有业务网络交换机的实例ID,控制台-VPC-专有网络-交换机下查询
      en: Please search the business VSwitch ID starts with(vsw-xxx)from console-Virtual Private Cloud-VSwitches
    Label:
      zh-cn: 网络交换机ID
      en: Existing VSwitch ID
    AssociationPropertyMetadata:
      VpcId: VPC
      ZoneId: ZoneId
  InstanceClass:
    Type: String
    Description:
      en: Instance specifications
      zh-cn: 实例规格
    Default: memcache.master.small.default
    Label:
      zh-cn: 实例规格
      en: Instance Type
  Password:
    Type: String
    Description:
      en: 'Length 8~32 characters, can contain size letters, Numbers and special symbols, including: !@#$%^&*()_+-='
      zh-cn: 长度8~32个字符,可包含大小字母、数字及特殊符号(包含:!@#$%^&*()_+-=)
    ConstraintDescription:
      en: '8~32 characters, can contain size letters, Numbers and special symbols, including: !@#$%^&*()_+-='
      zh-cn: 8~32个字符,可包含大小字母、数字及特殊符号(包含:!@#$%^&*()_+-=)
    MaxLength: 32
    MinLength: 8
    NoEcho: true
    Label:
      en: Instance Password
      zh-cn: 实例密码
Resources:
  MemcacheInstance:
    Type: ALIYUN::Memcache::Instance
    Properties:
      VpcId:
        Ref: VPC
      VSwitchId:
        Ref: VSwitch
      InstanceClass:
        Ref: InstanceClass
      NetworkType: VPC
      Password:
        Ref: Password
      ZoneId:
        Ref: ZoneId
Outputs:
  ConnectionDomain:
    Description: Intranet connection string
    Value:
      Fn::GetAtt:
        - MemcacheInstance
        - ConnectionDomain
  InstanceId:
    Value:
      Fn::GetAtt:
        - MemcacheInstance
        - InstanceId
  QPS:
    Value:
      Fn::GetAtt:
        - MemcacheInstance
        - QPS
  Port:
    Value:
      Fn::GetAtt:
        - MemcacheInstance
        - Port

JSON格式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Description": {
    "en": "Alibaba Cloud ROS Sample Template: Create a VPC type memcache instance.",
    "zh-cn": "阿里云资源编排示例模板: 创建一个 VPC类型 memcache 实例。"
  },
  "Parameters": {
    "ZoneId": {
      "Type": "String",
      "Description": {
        "zh-cn": "创建实例的可用区,确保可用区支持Memcache资源规格的创建。",
        "en": "Create an Availability Zone for an instance to ensure that the Availability Zone supports the creation of Memcache resource specifications."
      },
      "AssociationProperty": "ALIYUN::ECS::Instance::ZoneId",
      "Label": {
        "en": "Zone ID",
        "zh-cn": "可用区"
      }
    },
    "VPC": {
      "AssociationProperty": "ALIYUN::ECS::VPC::VPCId",
      "Type": "String",
      "Description": {
        "zh-cn": "现有虚拟专有网络的实例ID,控制台-VPC-专有网络下查询",
        "en": "Please search the ID starts with (vpc-xxx)from console-Virtual Private Cloud"
      },
      "Label": {
        "zh-cn": "现有VPC的实例ID",
        "en": "Existing VPC Instance ID"
      }
    },
    "VSwitch": {
      "AssociationProperty": "ALIYUN::ECS::VSwitch::VSwitchId",
      "Type": "String",
      "Description": {
        "zh-cn": "现有业务网络交换机的实例ID,控制台-VPC-专有网络-交换机下查询",
        "en": "Please search the business VSwitch ID starts with(vsw-xxx)from console-Virtual Private Cloud-VSwitches"
      },
      "Label": {
        "zh-cn": "网络交换机ID",
        "en": "Existing VSwitch ID"
      },
      "AssociationPropertyMetadata": {
        "VpcId": "VPC",
        "ZoneId": "ZoneId"
      }
    },
    "InstanceClass": {
      "Type": "String",
      "Description": {
        "en": "Instance specifications",
        "zh-cn": "实例规格"
      },
      "Default": "memcache.master.small.default",
      "Label": {
        "zh-cn": "实例规格",
        "en": "Instance Type"
      }
    },
    "Password": {
      "Type": "String",
      "Description": {
        "en": "Length 8~32 characters, can contain size letters, Numbers and special symbols, including: !@#$%^&*()_+-=",
        "zh-cn": "长度8~32个字符,可包含大小字母、数字及特殊符号(包含:!@#$%^&*()_+-=)"
      },
      "ConstraintDescription": {
        "en": "8~32 characters, can contain size letters, Numbers and special symbols, including: !@#$%^&*()_+-=",
        "zh-cn": "8~32个字符,可包含大小字母、数字及特殊符号(包含:!@#$%^&*()_+-=)"
      },
      "MaxLength": 32,
      "MinLength": 8,
      "NoEcho": true,
      "Label": {
        "en": "Instance Password",
        "zh-cn": "实例密码"
      }
    }
  },
  "Resources": {
    "MemcacheInstance": {
      "Type": "ALIYUN::Memcache::Instance",
      "Properties": {
        "VpcId": {
          "Ref": "VPC"
        },
        "VSwitchId": {
          "Ref": "VSwitch"
        },
        "InstanceClass": {
          "Ref": "InstanceClass"
        },
        "NetworkType": "VPC",
        "Password": {
          "Ref": "Password"
        },
        "ZoneId": {
          "Ref": "ZoneId"
        }
      }
    }
  },
  "Outputs": {
    "ConnectionDomain": {
      "Description": "Intranet connection string",
      "Value": {
        "Fn::GetAtt": [
          "MemcacheInstance",
          "ConnectionDomain"
        ]
      }
    },
    "InstanceId": {
      "Value": {
        "Fn::GetAtt": [
          "MemcacheInstance",
          "InstanceId"
        ]
      }
    },
    "QPS": {
      "Value": {
        "Fn::GetAtt": [
          "MemcacheInstance",
          "QPS"
        ]
      }
    },
    "Port": {
      "Value": {
        "Fn::GetAtt": [
          "MemcacheInstance",
          "Port"
        ]
      }
    }
  }
}
  • 本页导读 (1)
文档反馈