ALIYUN::Memcache::Instance類型用于創(chuàng)建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其中一個屬性。詳情請參見 實例規(guī)格表。 單位:MB。 |
ResourceGroupId | String | 否 | 否 | 資源組ID。 | 無 |
BackupPolicy | Map | 否 | 是 | 備份策略。 | 詳情請參見BackupPolicy屬性。 |
CouponNo | String | 否 | 否 | 優(yōu)惠碼。 | 默認值:youhuiquan_promotion_option_id_for_blank。 |
AutoRenewPeriod | String | 否 | 否 | 自動續(xù)費周期。 | 取值:
單位:月。 說明 當AutoRenew為true時該參數必選。 |
AutoUseCoupon | String | 否 | 否 | 是否使用代金券。 | 取值:
|
ZoneId | String | 否 | 否 | 可用區(qū)ID。 | 無 |
InstanceName | String | 否 | 是 | 實例名稱。 | 長度為2~128個字符。以英文字母或漢字開頭,不支持空格( )和以下特殊字符:
|
AutoRenew | String | 否 | 否 | 是否開啟自動續(xù)費。 | 取值:
|
InstanceClass | String | 否 | 否 | 實例規(guī)格。 | 必須指定Capacity或InstanceClass其中一個屬性。詳情請參見實例規(guī)格表。 |
VpcPasswordFree | Boolean | 否 | 否 | 是否在專有網絡中啟用免密碼訪問該實例。 | 無 |
VSwitchId | String | 否 | 否 | 交換機ID。 | 無 |
ChargeType | String | 否 | 否 | 付費類型。 | 取值:
|
Period | String | 否 | 否 | 付費周期。 | 取值:
單位:月。 ChargeType(付費類型)為PrePaid時為必選參數。ChargeType為PostPaid時不支持指定該參數。 |
NetworkType | String | 否 | 否 | 網絡類型。 | 取值:
|
Password | String | 否 | 否 | 實例密碼。 | 長度為8~32個字符。必須包含大寫英文字母、小寫英文字母、特殊字符和數字中至少三種,支持的特殊字符如下:
|
Config | String | 否 | 否 | 實例的詳細配置。 | 取值是JSON格式的字符串。 |
PrivateIpAddress | String | 否 | 否 | 實例的私網IP地址。 | 私網IP需在實例所屬的交換機網段內。 |
BackupPolicy語法
"BackupPolicy": {
"PreferredBackupTime": String,
"EnableBackupLog": Integer,
"PreferredBackupPeriod": String
}
BackupPolicy屬性
屬性名稱 | 類型 | 必須 | 允許更新 | 描述 | 約束 |
PreferredBackupTime | String | 是 | 是 | 備份時間段。 | 格式: |
EnableBackupLog | Integer | 否 | 是 | 是否開啟增量備份。 | 取值:
|
PreferredBackupPeriod | String | 是 | 是 | 備份周期。 | 取值:
|
返回值
Fn::GetAtt
InstanceId:實例ID。
InstanceName:實例名稱。
ConnectionDomain:實例連接地址。
Port:實例端口。
QPS:每秒查詢率。
示例
ROSTemplateFormatVersion: '2015-09-01'
Description:
en: 'Alibaba Cloud ROS Sample Template: Create a VPC type memcache instance.'
zh-cn: 阿里云資源編排示例模板: 創(chuàng)建一個 VPC類型 memcache 實例。
Parameters:
ZoneId:
Type: String
Description:
zh-cn: 創(chuàng)建實例的可用區(qū),確保可用區(qū)支持Memcache資源規(guī)格的創(chuàng)建。
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: 可用區(qū)
VPC:
AssociationProperty: ALIYUN::ECS::VPC::VPCId
Type: String
Description:
zh-cn: 現(xiàn)有虛擬專有網絡的實例ID,控制臺-VPC-專有網絡下查詢
en: Please search the ID starts with (vpc-xxx)from console-Virtual Private Cloud
Label:
zh-cn: 現(xiàn)有VPC的實例ID
en: Existing VPC Instance ID
VSwitch:
AssociationProperty: ALIYUN::ECS::VSwitch::VSwitchId
Type: String
Description:
zh-cn: 現(xiàn)有業(yè)務網絡交換機的實例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: 實例規(guī)格
Default: memcache.master.small.default
Label:
zh-cn: 實例規(guī)格
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
{
"ROSTemplateFormatVersion": "2015-09-01",
"Description": {
"en": "Alibaba Cloud ROS Sample Template: Create a VPC type memcache instance.",
"zh-cn": "阿里云資源編排示例模板: 創(chuàng)建一個 VPC類型 memcache 實例。"
},
"Parameters": {
"ZoneId": {
"Type": "String",
"Description": {
"zh-cn": "創(chuàng)建實例的可用區(qū),確保可用區(qū)支持Memcache資源規(guī)格的創(chuàng)建。",
"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": "可用區(qū)"
}
},
"VPC": {
"AssociationProperty": "ALIYUN::ECS::VPC::VPCId",
"Type": "String",
"Description": {
"zh-cn": "現(xiàn)有虛擬專有網絡的實例ID,控制臺-VPC-專有網絡下查詢",
"en": "Please search the ID starts with (vpc-xxx)from console-Virtual Private Cloud"
},
"Label": {
"zh-cn": "現(xiàn)有VPC的實例ID",
"en": "Existing VPC Instance ID"
}
},
"VSwitch": {
"AssociationProperty": "ALIYUN::ECS::VSwitch::VSwitchId",
"Type": "String",
"Description": {
"zh-cn": "現(xiàn)有業(yè)務網絡交換機的實例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": "實例規(guī)格"
},
"Default": "memcache.master.small.default",
"Label": {
"zh-cn": "實例規(guī)格",
"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"
]
}
}
}
}