ALIYUN::REDIS::PrepayInstance は、サブスクリプション方式の Tair (Redis) インスタンスを作成します。
構文
{
"Type": "ALIYUN::REDIS::PrepayInstance",
"Properties": {
"VpcId": String,
"EvictionPolicy": String,
"Period": Integer,
"ZoneId": String,
"InstanceClass": String,
"VpcPasswordFree": Boolean,
"VSwitchId": String,
"SecurityGroupId": String,
"EngineVersion": String,
"Password": String,
"SSLEnabled": String,
"InstanceName": String,
"BackupPolicy": Map,
"Tags": List,
"InstanceMaintainTime": Map,
"DeletionForce": Boolean,
"AutoPay": Boolean,
"Connections": Map,
"AutoRenewDuration": Integer,
"ProductType": String,
"SecondaryZoneId": String,
"ResourceGroupId": String,
"PeriodUnit": String,
"TairConfig": Map,
"ShardCount": Integer,
"ReadOnlyCount": Integer,
"SubscriptionDeletionForce": Boolean,
"NodeType": String,
"DeletionProtection": Boolean
}
}
プロパティ
|
プロパティ |
タイプ |
必須 |
編集可能 |
説明 |
制約 |
|
AutoPay |
Boolean |
いいえ |
いいえ |
自動支払いを有効にするかどうかを指定します。 |
有効値:
|
|
AutoRenewDuration |
Integer |
いいえ |
はい |
自動更新期間。 |
有効値:1~12。 単位:月。 インスタンスは、有効期限が切れる前にこの期間で自動的に更新されます。 |
|
BackupPolicy |
Map |
いいえ |
はい |
バックアップポリシー。 |
詳細については、「BackupPolicy のプロパティ」をご参照ください。 |
|
Connections |
Map |
いいえ |
はい |
インスタンスのエンドポイント。 |
詳細については、「Connections のプロパティ」をご参照ください。 |
|
DeletionForce |
Boolean |
いいえ |
はい |
インスタンスをゴミ箱に移動せずに即時削除するかどうかを指定します。 |
有効値:
|
|
DeletionProtection |
Boolean |
いいえ |
はい |
削除保護を有効にするかどうかを指定します。 |
有効値:
|
|
EngineVersion |
String |
いいえ |
はい |
データベースエンジンのバージョン。 |
有効値:
|
|
EvictionPolicy |
String |
いいえ |
いいえ |
立ち退きポリシー。 |
有効値:
|
|
InstanceClass |
String |
いいえ |
はい |
インスタンス仕様。 |
詳細については、「インスタンス仕様の概要」をご参照ください。 |
|
InstanceMaintainTime |
Map |
いいえ |
はい |
インスタンスのメンテナンスウィンドウ。 |
詳細については、「InstanceMaintainTime のプロパティ」をご参照ください。 |
|
InstanceName |
String |
いいえ |
はい |
インスタンス名。 |
2~128 文字である必要があります。文字または漢字で始める必要があります。文字、数字、漢字、アンダースコア (_)、ハイフン (-)、ピリオド (.) を使用できます。 |
|
NodeType |
String |
いいえ |
いいえ |
ノードタイプ。 |
有効値:
説明
クラウドネイティブ版インスタンスの場合は、 |
|
Password |
String |
いいえ |
はい |
インスタンスのパスワード。 |
8~32 文字で、大文字、小文字、数字、特殊文字の 3 種類以上を含む必要があります。サポートされている特殊文字: |
|
Period |
Integer |
いいえ |
いいえ |
サブスクリプション期間。 |
有効値:1~9、12、24、36。 単位:月。 |
|
PeriodUnit |
String |
いいえ |
いいえ |
サブスクリプション期間の単位。 |
有効値:
|
|
ProductType |
String |
いいえ |
いいえ |
プロダクトタイプ。 |
有効値:
|
|
ReadOnlyCount |
Integer |
いいえ |
いいえ |
プライマリアベイラビリティーゾーン内の読み取り専用レプリカの数。 |
説明
ReadOnlyCount パラメーターは、読み書き分離機能が有効になっているクラウドネイティブ版インスタンスにのみ適用されます。インスタンスがクラスターアーキテクチャを使用する場合、このパラメーターはシャードごとの読み取り専用レプリカの数を指定します。 |
|
ResourceGroupId |
String |
いいえ |
はい |
リソースグループの ID。 |
なし |
|
SecondaryZoneId |
String |
いいえ |
はい |
セカンダリアベイラビリティーゾーンの ID。 |
DescribeZones 操作を呼び出して、サポートされているアベイラビリティーゾーン ID を照会します。 説明
クロスゾーンディザスタリカバリーのために、プライマリノードとセカンダリノードを異なるゾーンにデプロイします。 |
|
SecurityGroupId |
String |
いいえ |
はい |
セキュリティグループの ID。 |
最大 10 個の ID をコンマ (,) で区切ります。 |
|
ShardCount |
Integer |
いいえ |
いいえ |
シャード数。 |
有効値:
|
|
SSLEnabled |
String |
いいえ |
はい |
SSL 暗号化の状態。 |
有効値:
|
|
SubscriptionDeletionForce |
Boolean |
いいえ |
いいえ |
サブスクリプションインスタンスのみ。 |
なし |
|
Tags |
List |
いいえ |
はい |
インスタンスのタグ。 |
インスタンスごとに最大 20 個のタグ。 詳細については、「Tags のプロパティ」をご参照ください。 |
|
TairConfig |
Map |
いいえ |
いいえ |
Tair の設定。 |
詳細については、「TairConfig のプロパティ」をご参照ください。 |
|
TLSProtocol |
String |
いいえ |
いいえ |
インスタンスの TLS バージョン。 |
有効値:
|
|
VpcId |
String |
いいえ |
いいえ |
VPC の ID。 |
なし |
|
VpcPasswordFree |
Boolean |
いいえ |
いいえ |
VPC 内でのパスワードなしのアクセスを有効にするかどうかを指定します。 |
有効値:
|
|
VSwitchId |
String |
いいえ |
いいえ |
vSwitch の ID。 |
なし |
|
ZoneId |
String |
いいえ |
いいえ |
アベイラビリティーゾーンの ID。 |
このパラメーターは、VPC 内のインスタンスに必須です。 複数のアベイラビリティーゾーンにインスタンスをデプロイするには、DescribeZones 操作を使用してサポートされているゾーン ID を検索します。 |
BackupPolicy の構文
"BackupPolicy": {
"PreferredBackupPeriod": "String",
"PreferredBackupTime": "String",
"EnableBackupLog": "Integer"
}
BackupPolicy のプロパティ
|
プロパティ |
タイプ |
必須 |
編集可能 |
説明 |
制約 |
|
PreferredBackupPeriod |
String |
はい |
はい |
バックアップ曜日。 |
有効値:
|
|
PreferredBackupTime |
String |
はい |
はい |
バックアップ時間ウィンドウ (UTC)。 |
フォーマット: |
|
EnableBackupLog |
Integer |
いいえ |
はい |
増分バックアップを有効にするかどうかを指定します。 |
有効値:
|
InstanceMaintainTime の構文
"InstanceMaintainTime": {
"MaintainStartTime": "String",
"MaintainEndTime": "String"
}
InstanceMaintainTime のプロパティ
|
プロパティ |
タイプ |
必須 |
編集可能 |
説明 |
制約 |
|
MaintainEndTime |
String |
いいえ |
いいえ |
メンテナンスウィンドウの終了時刻。 |
フォーマット: 説明
終了時刻は開始時刻のちょうど 1 時間後である必要があります。たとえば、MaintainStartTime が |
|
MaintainStartTime |
String |
いいえ |
いいえ |
メンテナンスウィンドウの開始時刻。 |
フォーマット: |
Tags の構文
"Tags": [
{
"Key": String,
"Value": String
}
]
Tags のプロパティ
|
プロパティ |
タイプ |
必須 |
編集可能 |
説明 |
制約 |
|
Key |
String |
はい |
いいえ |
タグキー。 |
タグキーは、アカウントとリージョン内で一意である必要があります。 |
|
Value |
String |
いいえ |
いいえ |
タグ値。 |
なし |
Connections の構文
"Connections": {
"VpcPrivateConnection": "Map",
"ClassicInnerConnection": "Map",
"DirectConnection": "Map",
"PublicConnection": "Map"
}
Connections のプロパティ
|
プロパティ |
タイプ |
必須 |
編集可能 |
説明 |
制約 |
|
ClassicInnerConnection |
Map |
いいえ |
はい |
クラシックネットワークエンドポイント。 |
詳細については、「ClassicInnerConnection のプロパティ」をご参照ください。 |
|
DirectConnection |
Map |
いいえ |
はい |
ダイレクト接続エンドポイント。 |
詳細については、「DirectConnection のプロパティ」をご参照ください。 |
|
PublicConnection |
Map |
いいえ |
はい |
パブリックエンドポイント。 |
詳細については、「PublicConnection のプロパティ」をご参照ください。 |
|
VpcPrivateConnection |
Map |
いいえ |
はい |
VPC エンドポイント。 |
詳細については、「VpcPrivateConnection のプロパティ」をご参照ください。 |
VpcPrivateConnection の構文
"VpcPrivateConnection": {
"ConnectionPort": Integer,
"ConnectionString": String
}
VpcPrivateConnection のプロパティ
|
プロパティ |
タイプ |
必須 |
編集可能 |
説明 |
制約 |
|
ConnectionPort |
Integer |
はい |
はい |
インスタンス上の ApsaraDB サービスのポート番号。 |
有効値:1024~65535。 |
|
ConnectionString |
String |
いいえ |
はい |
VPC エンドポイントのプレフィックス。 |
プレフィックスは 8~64 文字の長さで、小文字で始まり、小文字と数字のみを含む必要があります。 |
PublicConnection の構文
"PublicConnection": {
"ConnectionPort": Integer,
"ConnectionString": String
}
PublicConnection のプロパティ
|
プロパティ |
タイプ |
必須 |
編集可能 |
説明 |
制約 |
|
ConnectionPort |
Integer |
はい |
はい |
ApsaraDB インスタンスのサービスポート。 |
有効値:1024~65535。 |
|
ConnectionString |
String |
いいえ |
はい |
パブリックエンドポイントのプレフィックス。 |
8~64 文字の長さで、小文字で始まり、小文字と数字のみを含む必要があります。 |
DirectConnection の構文
"DirectConnection": {
"ConnectionPort": Integer,
"ConnectionString": String
}
DirectConnection のプロパティ
|
プロパティ |
タイプ |
必須 |
編集可能 |
説明 |
制約 |
|
ConnectionPort |
Integer |
はい |
はい |
ApsaraDB インスタンスのサービスポート。 |
有効値:1024~65535。 |
|
ConnectionString |
String |
いいえ |
はい |
プライベートエンドポイントのプレフィックス。 |
プレフィックスは 8~64 文字の長さで、小文字で始まり、小文字と数字のみを含む必要があります。 |
ClassicInnerConnection の構文
"ClassicInnerConnection": {
"ConnectionPort": Integer,
"ConnectionString": String
}
ClassicInnerConnection のプロパティ
|
プロパティ |
タイプ |
必須 |
編集可能 |
説明 |
制約 |
|
ConnectionPort |
Integer |
はい |
はい |
ApsaraDB インスタンスのサービスポート。 |
有効値:1024~65535。 |
|
ConnectionString |
String |
いいえ |
はい |
クラシックネットワークエンドポイントのプレフィックス。 |
プレフィックスは 8~64 文字の長さで、小文字で始まり、小文字と数字のみを含む必要があります。 |
TairConfig の構文
"BackupPolicy": {
"Storage": "Integer",
"StorageType": "String",
"ShardCount": "Integer"
}
TairConfig のプロパティ
|
プロパティ |
タイプ |
必須 |
編集可能 |
説明 |
制約 |
|
ShardCount |
Integer |
いいえ |
いいえ |
データシャードの数。 |
有効値:
|
|
Storage |
Integer |
いいえ |
いいえ |
クラウドディスクのストレージ容量。 |
インスタンス仕様によって異なります。詳細については、「ESSD/SSD ベースのインスタンス」をご参照ください。 |
|
StorageType |
String |
いいえ |
いいえ |
ストレージタイプ。 |
有効値:
|
戻り値
Fn::GetAtt
-
InstanceId:インスタンスの ID。
-
OrderId:注文の ID。
-
ConnectionDomain:インスタンスへのアクセスに使用されるエンドポイント。
-
Port:インスタンスへの接続に使用されるポート。
-
InstanceName:インスタンス名。
-
InstanceClass:インスタンス仕様。
-
VpcId:VPC の ID。
-
Capacity:インスタンスのストレージ容量。
-
InstanceType:インスタンスのエンジンタイプ。
-
ChargeType:インスタンスの課金方法。
-
PackageType:プランタイプ。
-
Connections:インスタンスがサポートする最大接続数。
-
ArchitectureType:インスタンスのアーキテクチャタイプ。
-
NodeType:インスタンスのノードタイプ。
-
HasRenewChangeOrder:アカウントに保留中の更新またはスケーリングの注文があるかどうか。
-
ResourceGroupId:リソースグループの ID。
-
QPS:インスタンスの理論上の秒間クエリ数 (QPS)。
-
ZoneId:インスタンスのゾーンの ID。
-
Bandwidth:インスタンスの帯域幅。単位:Mbps。
-
EngineVersion:インスタンスのエンジンバージョン。
-
NetworkType:インスタンスのネットワークタイプ。
-
VSwitchId:vSwitch の ID。
-
PrivateIp:インスタンスのプライベート IP アドレス。
-
PublicConnectionString:インスタンスのパブリック接続文字列。
-
VpcPrivateConnectionPort:VPC 内のインスタンスへのプライベート接続に使用されるポート。
-
ClassicInnerConnectionString:クラシックネットワーク経由でのインスタンスの内部接続文字列。
-
VpcPrivateConnectionString:インスタンスの VPC プライベート接続文字列。
-
PublicConnectionPort:インスタンスへのパブリック接続に使用されるポート。
-
DirectConnectionString:インスタンスのダイレクト接続文字列。
-
DirectConnectionPort:インスタンスへのダイレクト接続に使用されるポート。
-
ClassicInnerConnectionPort:クラシックネットワーク経由でのインスタンスへの内部接続に使用されるポート。
例
シナリオ 1:VPC ネットワークにデプロイされたサブスクリプション方式の Redis 標準版インスタンスの作成
ROSTemplateFormatVersion: '2015-09-01'
Description:
ja: VPC ネットワークにサブスクリプション方式の Redis 標準版インスタンスを作成します。
Parameters:
ZoneId:
Type: String
Label:
ja: アベイラビリティーゾーン
AssociationProperty: ALIYUN::ECS::Instance::ZoneId
VpcId:
Type: String
Label:
ja: VPC ID
AssociationProperty: ALIYUN::ECS::VPC::VPCId
VSwitchId:
Type: String
Label:
ja: VSwitch ID
AssociationProperty: ALIYUN::VPC::VSwitch::VSwitchId
AssociationPropertyMetadata:
VpcId: ${VpcId}
ZoneId: ${ZoneId}
InstanceName:
Type: String
Label:
ja: インスタンス名
Description:
ja: Redis インスタンス名、2~128 文字。
Default: my-redis
InstanceClass:
Type: String
Label:
ja: インスタンス仕様
Description:
ja: >-
Redis インスタンスの仕様。例:
redis.master.small.default (1 GB 主従版)、
redis.master.mid.default (2 GB 主従版)。
Default: redis.master.small.default
EngineVersion:
Type: String
Label:
ja: エンジンバージョン
Default: '5.0'
AllowedValues:
- '4.0'
- '5.0'
Password:
Type: String
Label:
ja: インスタンスパスワード
Description:
ja: 8~32 文字で、大文字、小文字、数字、特殊文字のうち 3 種類以上を含みます。
NoEcho: true
MinLength: 8
MaxLength: 32
Period:
Type: Number
Label:
ja: 期間 (月)
Description:
ja: サブスクリプション期間 (月単位)。
Default: 1
AllowedValues:
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 12
- 24
- 36
Resources:
RedisInstance:
Type: ALIYUN::REDIS::PrepayInstance
Properties:
InstanceName:
Ref: InstanceName
InstanceClass:
Ref: InstanceClass
EngineVersion:
Ref: EngineVersion
Password:
Ref: Password
VpcId:
Ref: VpcId
VSwitchId:
Ref: VSwitchId
ZoneId:
Ref: ZoneId
Period:
Ref: Period
AutoPay: true
Outputs:
InstanceId:
Label:
ja: インスタンス ID
Description:
ja: Redis インスタンスの ID。
Value:
Fn::GetAtt:
- RedisInstance
- InstanceId
ConnectionDomain:
Label:
ja: 接続ドメイン
Description:
ja: Redis インスタンスのプライベート接続ドメイン。
Value:
Fn::GetAtt:
- RedisInstance
- ConnectionDomain
Port:
Label:
ja: 接続ポート
Description:
ja: Redis インスタンスの接続ポート。
Value:
Fn::GetAtt:
- RedisInstance
- Port{
"ROSTemplateFormatVersion": "2015-09-01",
"Description": {
"ja": "VPC ネットワークにサブスクリプション方式の Redis 標準版インスタンスを作成します。"
},
"Parameters": {
"ZoneId": {
"Type": "String",
"Label": {
"ja": "アベイラビリティーゾーン"
},
"AssociationProperty": "ALIYUN::ECS::Instance::ZoneId"
},
"VpcId": {
"Type": "String",
"Label": {
"ja": "VPC ID"
},
"AssociationProperty": "ALIYUN::ECS::VPC::VPCId"
},
"VSwitchId": {
"Type": "String",
"Label": {
"ja": "VSwitch ID"
},
"AssociationProperty": "ALIYUN::VPC::VSwitch::VSwitchId",
"AssociationPropertyMetadata": {
"VpcId": "${VpcId}",
"ZoneId": "${ZoneId}"
}
},
"InstanceName": {
"Type": "String",
"Label": {
"ja": "インスタンス名"
},
"Description": {
"ja": "Redis インスタンス名、2~128 文字。"
},
"Default": "my-redis"
},
"InstanceClass": {
"Type": "String",
"Label": {
"ja": "インスタンス仕様"
},
"Description": {
"ja": "Redis インスタンスの仕様。例:redis.master.small.default (1 GB)、redis.master.mid.default (2 GB)。"
},
"Default": "redis.master.small.default"
},
"EngineVersion": {
"Type": "String",
"Label": {
"ja": "エンジンバージョン"
},
"Default": "5.0",
"AllowedValues": [
"4.0",
"5.0"
]
},
"Password": {
"Type": "String",
"Label": {
"ja": "インスタンスパスワード"
},
"Description": {
"ja": "8~32 文字で、大文字、小文字、数字、特殊文字のうち 3 種類以上を含みます。"
},
"NoEcho": true,
"MinLength": 8,
"MaxLength": 32
},
"Period": {
"Type": "Number",
"Label": {
"ja": "期間 (月)"
},
"Description": {
"ja": "サブスクリプション期間 (月単位)。"
},
"Default": 1,
"AllowedValues": [1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36]
}
},
"Resources": {
"RedisInstance": {
"Type": "ALIYUN::REDIS::PrepayInstance",
"Properties": {
"InstanceName": {
"Ref": "InstanceName"
},
"InstanceClass": {
"Ref": "InstanceClass"
},
"EngineVersion": {
"Ref": "EngineVersion"
},
"Password": {
"Ref": "Password"
},
"VpcId": {
"Ref": "VpcId"
},
"VSwitchId": {
"Ref": "VSwitchId"
},
"ZoneId": {
"Ref": "ZoneId"
},
"Period": {
"Ref": "Period"
},
"AutoPay": true
}
}
},
"Outputs": {
"InstanceId": {
"Label": {
"ja": "インスタンス ID"
},
"Description": {
"ja": "Redis インスタンスの ID。"
},
"Value": {
"Fn::GetAtt": [
"RedisInstance",
"InstanceId"
]
}
},
"ConnectionDomain": {
"Label": {
"ja": "接続ドメイン"
},
"Description": {
"ja": "Redis インスタンスのプライベート接続ドメイン。"
},
"Value": {
"Fn::GetAtt": [
"RedisInstance",
"ConnectionDomain"
]
}
},
"Port": {
"Label": {
"ja": "接続ポート"
},
"Description": {
"ja": "Redis インスタンスの接続ポート。"
},
"Value": {
"Fn::GetAtt": [
"RedisInstance",
"Port"
]
}
}
}
}シナリオ 2:バックアップポリシー、メンテナンスウィンドウ、SSL、タグを設定したサブスクリプション方式の Redis インスタンスの作成
ROSTemplateFormatVersion: '2015-09-01'
Description:
ja: バックアップポリシー、メンテナンスウィンドウ、SSL、タグを設定してサブスクリプション方式の Redis インスタンスを作成します。
Parameters:
ZoneId:
Type: String
Label:
ja: アベイラビリティーゾーン
AssociationProperty: ALIYUN::ECS::Instance::ZoneId
VpcId:
Type: String
Label:
ja: VPC ID
AssociationProperty: ALIYUN::ECS::VPC::VPCId
VSwitchId:
Type: String
Label:
ja: VSwitch ID
AssociationProperty: ALIYUN::VPC::VSwitch::VSwitchId
AssociationPropertyMetadata:
VpcId: ${VpcId}
ZoneId: ${ZoneId}
SecurityGroupId:
Type: String
Label:
ja: セキュリティグループ ID
AssociationProperty: ALIYUN::ECS::SecurityGroup::SecurityGroupId
AssociationPropertyMetadata:
VpcId: ${VpcId}
InstanceName:
Type: String
Label:
ja: インスタンス名
Default: prod-redis
InstanceClass:
Type: String
Label:
ja: インスタンス仕様
Default: redis.master.mid.default
Password:
Type: String
Label:
ja: インスタンスパスワード
NoEcho: true
MinLength: 8
MaxLength: 32
Period:
Type: Number
Label:
ja: 期間 (月)
Default: 3
AllowedValues:
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 12
- 24
- 36
AutoRenewDuration:
Type: Number
Label:
ja: 自動更新期間 (月)
Description:
ja: インスタンスの有効期限が切れた後の自動更新期間 (1~12 か月)。0 に設定すると無効になります。
Default: 1
MinValue: 0
MaxValue: 12
Resources:
RedisInstance:
Type: ALIYUN::REDIS::PrepayInstance
Properties:
InstanceName:
Ref: InstanceName
InstanceClass:
Ref: InstanceClass
EngineVersion: '5.0'
NodeType: MASTER_SLAVE
Password:
Ref: Password
VpcId:
Ref: VpcId
VSwitchId:
Ref: VSwitchId
ZoneId:
Ref: ZoneId
SecurityGroupId:
Ref: SecurityGroupId
Period:
Ref: Period
AutoPay: true
AutoRenewDuration:
Ref: AutoRenewDuration
SSLEnabled: Enable
DeletionProtection: true
BackupPolicy:
PreferredBackupPeriod: Monday,Wednesday,Friday
PreferredBackupTime: 18:00Z-19:00Z
EnableBackupLog: 1
InstanceMaintainTime:
MaintainStartTime: 17:00Z
MaintainEndTime: 18:00Z
Tags:
- Key: Environment
Value: Production
- Key: Service
Value: Cache
Outputs:
InstanceId:
Label:
ja: インスタンス ID
Value:
Fn::GetAtt:
- RedisInstance
- InstanceId
ConnectionDomain:
Label:
ja: 接続ドメイン
Value:
Fn::GetAtt:
- RedisInstance
- ConnectionDomain
Port:
Label:
ja: 接続ポート
Value:
Fn::GetAtt:
- RedisInstance
- Port
InstanceClass:
Label:
ja: インスタンス仕様
Value:
Fn::GetAtt:
- RedisInstance
- InstanceClass{
"ROSTemplateFormatVersion": "2015-09-01",
"Description": {
"ja": "バックアップポリシー、メンテナンスウィンドウ、SSL、タグを設定してサブスクリプション方式の Redis インスタンスを作成します。"
},
"Parameters": {
"ZoneId": {
"Type": "String",
"Label": {
"ja": "アベイラビリティーゾーン"
},
"AssociationProperty": "ALIYUN::ECS::Instance::ZoneId"
},
"VpcId": {
"Type": "String",
"Label": {
"ja": "VPC ID"
},
"AssociationProperty": "ALIYUN::ECS::VPC::VPCId"
},
"VSwitchId": {
"Type": "String",
"Label": {
"ja": "VSwitch ID"
},
"AssociationProperty": "ALIYUN::VPC::VSwitch::VSwitchId",
"AssociationPropertyMetadata": {
"VpcId": "${VpcId}",
"ZoneId": "${ZoneId}"
}
},
"SecurityGroupId": {
"Type": "String",
"Label": {
"ja": "セキュリティグループ ID"
},
"AssociationProperty": "ALIYUN::ECS::SecurityGroup::SecurityGroupId",
"AssociationPropertyMetadata": {
"VpcId": "${VpcId}"
}
},
"InstanceName": {
"Type": "String",
"Label": {
"ja": "インスタンス名"
},
"Default": "prod-redis"
},
"InstanceClass": {
"Type": "String",
"Label": {
"ja": "インスタンス仕様"
},
"Default": "redis.master.mid.default"
},
"Password": {
"Type": "String",
"Label": {
"ja": "インスタンスパスワード"
},
"NoEcho": true,
"MinLength": 8,
"MaxLength": 32
},
"Period": {
"Type": "Number",
"Label": {
"ja": "期間 (月)"
},
"Default": 3,
"AllowedValues": [1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36]
},
"AutoRenewDuration": {
"Type": "Number",
"Label": {
"ja": "自動更新期間 (月)"
},
"Description": {
"ja": "インスタンスの有効期限が切れた後の自動更新期間 (1~12 か月)。0 に設定すると無効になります。"
},
"Default": 1,
"MinValue": 0,
"MaxValue": 12
}
},
"Resources": {
"RedisInstance": {
"Type": "ALIYUN::REDIS::PrepayInstance",
"Properties": {
"InstanceName": {
"Ref": "InstanceName"
},
"InstanceClass": {
"Ref": "InstanceClass"
},
"EngineVersion": "5.0",
"NodeType": "MASTER_SLAVE",
"Password": {
"Ref": "Password"
},
"VpcId": {
"Ref": "VpcId"
},
"VSwitchId": {
"Ref": "VSwitchId"
},
"ZoneId": {
"Ref": "ZoneId"
},
"SecurityGroupId": {
"Ref": "SecurityGroupId"
},
"Period": {
"Ref": "Period"
},
"AutoPay": true,
"AutoRenewDuration": {
"Ref": "AutoRenewDuration"
},
"SSLEnabled": "Enable",
"DeletionProtection": true,
"BackupPolicy": {
"PreferredBackupPeriod": "Monday,Wednesday,Friday",
"PreferredBackupTime": "18:00Z-19:00Z",
"EnableBackupLog": 1
},
"InstanceMaintainTime": {
"MaintainStartTime": "17:00Z",
"MaintainEndTime": "18:00Z"
},
"Tags": [
{
"Key": "Environment",
"Value": "Production"
},
{
"Key": "Service",
"Value": "Cache"
}
]
}
}
},
"Outputs": {
"InstanceId": {
"Label": {
"ja": "インスタンス ID"
},
"Value": {
"Fn::GetAtt": [
"RedisInstance",
"InstanceId"
]
}
},
"ConnectionDomain": {
"Label": {
"ja": "接続ドメイン"
},
"Value": {
"Fn::GetAtt": [
"RedisInstance",
"ConnectionDomain"
]
}
},
"Port": {
"Label": {
"ja": "接続ポート"
},
"Value": {
"Fn::GetAtt": [
"RedisInstance",
"Port"
]
}
},
"InstanceClass": {
"Label": {
"ja": "インスタンス仕様"
},
"Value": {
"Fn::GetAtt": [
"RedisInstance",
"InstanceClass"
]
}
}
}
}シナリオ 3:クロスアベイラビリティーゾーンのディザスタリカバリー、読み書き分離、リソースグループを設定したサブスクリプション方式の Redis クラスター版インスタンスの作成
ROSTemplateFormatVersion: '2015-09-01'
Description:
ja: クロスアベイラビリティーゾーンのディザスタリカバリー、読み書き分離、リソースグループを設定してサブスクリプション方式の Redis クラスターインスタンスを作成します。
Parameters:
ZoneId:
Type: String
Label:
ja: プライマリゾーン
AssociationProperty: ALIYUN::ECS::Instance::ZoneId
SecondaryZoneId:
Type: String
Label:
ja: セカンダリゾーン
Description:
ja: >-
クロスアベイラビリティーゾーンのディザスタリカバリー用のセカンダリゾーン ID。
AssociationProperty: ALIYUN::ECS::Instance::ZoneId
VpcId:
Type: String
Label:
ja: VPC ID
AssociationProperty: ALIYUN::ECS::VPC::VPCId
VSwitchId:
Type: String
Label:
ja: VSwitch ID
AssociationProperty: ALIYUN::VPC::VSwitch::VSwitchId
AssociationPropertyMetadata:
VpcId: ${VpcId}
ZoneId: ${ZoneId}
InstanceName:
Type: String
Label:
ja: インスタンス名
Default: prod-redis-cluster
InstanceClass:
Type: String
Label:
ja: インスタンス仕様
Description:
ja: >-
Redis クラスターインスタンスの仕様。例:
redis.shard.small.ce (1 GB)、redis.shard.mid.ce (2 GB)。
Default: redis.shard.small.ce
Password:
Type: String
Label:
ja: インスタンスパスワード
NoEcho: true
MinLength: 8
MaxLength: 32
ShardCount:
Type: Number
Label:
ja: シャード数
Description:
ja: クラスターのシャード数、範囲 2~32。
Default: 4
MinValue: 2
MaxValue: 32
ReadOnlyCount:
Type: Number
Label:
ja: 読み取り専用ノード数
Description:
ja: 読み書き分離のためのシャードごとの読み取り専用ノード数。0 に設定すると無効になります。
Default: 1
MinValue: 0
MaxValue: 5
EvictionPolicy:
Type: String
Label:
ja: 立ち退きポリシー
Description:
ja: >-
メモリが満杯になったときのデータ立ち退きポリシー。
Default: volatile-lru
AllowedValues:
- noeviction
- allkeys-lru
- volatile-lru
- allkeys-random
- volatile-random
- volatile-ttl
ResourceGroupId:
Type: String
Label:
ja: リソースグループ ID
Description:
ja: リソースグループ ID。
AssociationProperty: ALIYUN::ResourceManager::ResourceGroup
Default: ''
Period:
Type: Number
Label:
ja: 期間 (月)
Default: 6
AllowedValues:
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 12
- 24
- 36
Resources:
RedisCluster:
Type: ALIYUN::REDIS::PrepayInstance
Properties:
InstanceName:
Ref: InstanceName
InstanceClass:
Ref: InstanceClass
EngineVersion: '5.0'
NodeType: MASTER_SLAVE
ProductType: OnECS
Password:
Ref: Password
VpcId:
Ref: VpcId
VSwitchId:
Ref: VSwitchId
ZoneId:
Ref: ZoneId
SecondaryZoneId:
Ref: SecondaryZoneId
ShardCount:
Ref: ShardCount
ReadOnlyCount:
Ref: ReadOnlyCount
EvictionPolicy:
Ref: EvictionPolicy
ResourceGroupId:
Ref: ResourceGroupId
Period:
Ref: Period
AutoPay: true
AutoRenewDuration: 1
DeletionProtection: true
DeletionForce: false
BackupPolicy:
PreferredBackupPeriod: Monday,Wednesday,Friday,Sunday
PreferredBackupTime: 18:00Z-19:00Z
EnableBackupLog: 1
Tags:
- Key: Environment
Value: Production
- Key: Architecture
Value: Cluster
Outputs:
InstanceId:
Label:
ja: インスタンス ID
Value:
Fn::GetAtt:
- RedisCluster
- InstanceId
ConnectionDomain:
Label:
ja: 接続ドメイン
Value:
Fn::GetAtt:
- RedisCluster
- ConnectionDomain
Port:
Label:
ja: 接続ポート
Value:
Fn::GetAtt:
- RedisCluster
- Port
Capacity:
Label:
ja: ストレージ容量
Description:
ja: Redis インスタンスのストレージ容量。
Value:
Fn::GetAtt:
- RedisCluster
- Capacity
OrderId:
Label:
ja: 注文 ID
Description:
ja: サブスクリプションの注文 ID。
Value:
Fn::GetAtt:
- RedisCluster
- OrderId{
"ROSTemplateFormatVersion": "2015-09-01",
"Description": {
"ja": "クロスアベイラビリティーゾーンのディザスタリカバリー、読み書き分離、リソースグループを設定してサブスクリプション方式の Redis クラスターインスタンスを作成します。"
},
"Parameters": {
"ZoneId": {
"Type": "String",
"Label": {
"ja": "プライマリゾーン"
},
"AssociationProperty": "ALIYUN::ECS::Instance::ZoneId"
},
"SecondaryZoneId": {
"Type": "String",
"Label": {
"ja": "セカンダリゾーン"
},
"Description": {
"ja": "クロスアベイラビリティーゾーンのディザスタリカバリー用のセカンダリゾーン ID。"
},
"AssociationProperty": "ALIYUN::ECS::Instance::ZoneId"
},
"VpcId": {
"Type": "String",
"Label": {
"ja": "VPC ID"
},
"AssociationProperty": "ALIYUN::ECS::VPC::VPCId"
},
"VSwitchId": {
"Type": "String",
"Label": {
"ja": "VSwitch ID"
},
"AssociationProperty": "ALIYUN::VPC::VSwitch::VSwitchId",
"AssociationPropertyMetadata": {
"VpcId": "${VpcId}",
"ZoneId": "${ZoneId}"
}
},
"InstanceName": {
"Type": "String",
"Label": {
"ja": "インスタンス名"
},
"Default": "prod-redis-cluster"
},
"InstanceClass": {
"Type": "String",
"Label": {
"ja": "インスタンス仕様"
},
"Description": {
"ja": "Redis クラスターインスタンスの仕様。例:redis.shard.small.ce (1 GB)、redis.shard.mid.ce (2 GB)。"
},
"Default": "redis.shard.small.ce"
},
"Password": {
"Type": "String",
"Label": {
"ja": "インスタンスパスワード"
},
"NoEcho": true,
"MinLength": 8,
"MaxLength": 32
},
"ShardCount": {
"Type": "Number",
"Label": {
"ja": "シャード数"
},
"Description": {
"ja": "クラスターのシャード数、範囲 2~32。"
},
"Default": 4,
"MinValue": 2,
"MaxValue": 32
},
"ReadOnlyCount": {
"Type": "Number",
"Label": {
"ja": "読み取り専用ノード数"
},
"Description": {
"ja": "読み書き分離のためのシャードごとの読み取り専用ノード数。0 に設定すると無効になります。"
},
"Default": 1,
"MinValue": 0,
"MaxValue": 5
},
"EvictionPolicy": {
"Type": "String",
"Label": {
"ja": "立ち退きポリシー"
},
"Description": {
"ja": "メモリが満杯になったときのデータ立ち退きポリシー。"
},
"Default": "volatile-lru",
"AllowedValues": [
"noeviction",
"allkeys-lru",
"volatile-lru",
"allkeys-random",
"volatile-random",
"volatile-ttl"
]
},
"ResourceGroupId": {
"Type": "String",
"Label": {
"ja": "リソースグループ ID"
},
"Description": {
"ja": "リソースグループ ID。"
},
"AssociationProperty": "ALIYUN::ResourceManager::ResourceGroup",
"Default": ""
},
"Period": {
"Type": "Number",
"Label": {
"ja": "期間 (月)"
},
"Default": 6,
"AllowedValues": [1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36]
}
},
"Resources": {
"RedisCluster": {
"Type": "ALIYUN::REDIS::PrepayInstance",
"Properties": {
"InstanceName": {
"Ref": "InstanceName"
},
"InstanceClass": {
"Ref": "InstanceClass"
},
"EngineVersion": "5.0",
"NodeType": "MASTER_SLAVE",
"ProductType": "OnECS",
"Password": {
"Ref": "Password"
},
"VpcId": {
"Ref": "VpcId"
},
"VSwitchId": {
"Ref": "VSwitchId"
},
"ZoneId": {
"Ref": "ZoneId"
},
"SecondaryZoneId": {
"Ref": "SecondaryZoneId"
},
"ShardCount": {
"Ref": "ShardCount"
},
"ReadOnlyCount": {
"Ref": "ReadOnlyCount"
},
"EvictionPolicy": {
"Ref": "EvictionPolicy"
},
"ResourceGroupId": {
"Ref": "ResourceGroupId"
},
"Period": {
"Ref": "Period"
},
"AutoPay": true,
"AutoRenewDuration": 1,
"DeletionProtection": true,
"DeletionForce": false,
"BackupPolicy": {
"PreferredBackupPeriod": "Monday,Wednesday,Friday,Sunday",
"PreferredBackupTime": "18:00Z-19:00Z",
"EnableBackupLog": 1
},
"Tags": [
{
"Key": "Environment",
"Value": "Production"
},
{
"Key": "Architecture",
"Value": "Cluster"
}
]
}
}
},
"Outputs": {
"InstanceId": {
"Label": {
"ja": "インスタンス ID"
},
"Value": {
"Fn::GetAtt": [
"RedisCluster",
"InstanceId"
]
}
},
"ConnectionDomain": {
"Label": {
"ja": "接続ドメイン"
},
"Value": {
"Fn::GetAtt": [
"RedisCluster",
"ConnectionDomain"
]
}
},
"Port": {
"Label": {
"ja": "接続ポート"
},
"Value": {
"Fn::GetAtt": [
"RedisCluster",
"Port"
]
}
},
"Capacity": {
"Label": {
"ja": "ストレージ容量"
},
"Description": {
"ja": "Redis インスタンスのストレージ容量。"
},
"Value": {
"Fn::GetAtt": [
"RedisCluster",
"Capacity"
]
}
},
"OrderId": {
"Label": {
"ja": "注文 ID"
},
"Description": {
"ja": "サブスクリプションの注文 ID。"
},
"Value": {
"Fn::GetAtt": [
"RedisCluster",
"OrderId"
]
}
}
}
}