ALIYUN::REDIS::Connection は、ApsaraDB for Redis インスタンスのパブリックエンドポイントを申請するために使用されます。
構文
{
"Type": "ALIYUN::REDIS::Connection",
"Properties": {
"ConnectionType": String,
"InstanceId": String,
"Port": Integer,
"ConnectionStringPrefix": String
}
}
プロパティ
プロパティ | タイプ | 必須 | 編集可能 | 説明 | 制約 |
ConnectionType | String | はい | いいえ | インスタンスの接続モード。 | 有効な値: |
InstanceId | String | はい | いいえ | インスタンスID。 | なし。 |
Port | Integer | はい | はい | インスタンスのポート番号。 | 有効な値:1024~65535。 |
ConnectionStringPrefix | String | はい | いいえ | パブリックエンドポイントのプレフィックス。 | プレフィックスは 8~40 文字で、小文字と数字を含めることができます。プレフィックスは小文字で始まる必要があります。
説明 パブリックエンドポイントは、<Prefix>.redis.rds.aliyuncs.com という形式です。 |
戻り値
Fn::GetAtt
ConnectionString: インスタンスのパブリックエンドポイント。
例
YAML 形式
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
InstanceId:
Type: String
Description: インスタンスID(グローバルに一意)
Resources:
Connection:
Type: ALIYUN::REDIS::Connection
Properties:
ConnectionType: Public
InstanceId:
Ref: InstanceId
Port: 1743
ConnectionStringPrefix: demo
Outputs:
ConnectionString:
Description: 割り当てられた接続文字列。
Value:
Fn::GetAtt:
- Connection
- ConnectionString
JSON 形式
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"InstanceId": {
"Type": "String",
"Description": "インスタンスID(グローバルに一意)"
}
},
"Resources": {
"Connection": {
"Type": "ALIYUN::REDIS::Connection",
"Properties": {
"ConnectionType": "Public",
"InstanceId": {
"Ref": "InstanceId"
},
"Port": 1743,
"ConnectionStringPrefix": "demo"
}
}
},
"Outputs": {
"ConnectionString": {
"Description": "割り当てられた接続文字列。",
"Value": {
"Fn::GetAtt": [
"Connection",
"ConnectionString"
]
}
}
}
}