Alibaba Cloud では、次のリージョンでトピックを作成できます。
中国 (杭州)
中国 (上海)
中国 (北京)
中国 (張家口)
中国 (深圳)
シンガポール (シンガポール)
マレーシア (クアラルンプール)
ドイツ (フランクフルト)
構文
{
"Type": "ALIYUN::DATAHUB::Topic",
"Properties": {
"Comment": String,
"RecordType": String,
"ProjectName": String,
"RecordSchema": String,
"TopicName": String,
"ShardCount": Integer,
"Lifecycle": Integer
}
}
プロパティ
プロパティ | タイプ | 必須 | 編集可能 | 説明 | 制約 |
Comment | String | はい | いいえ | トピックの説明。 | 説明は 3 ~ 1,024 文字である必要があります。 |
RecordType | String | はい | いいえ | トピックのタイプ。 | 有効な値: TUPLE: 構造化データ BLOB: 非構造化データ
|
ProjectName | String | はい | いいえ | プロジェクトの名前。 | なし。 |
RecordSchema | String | いいえ | いいえ | トピックのスキーマの詳細。 | TUPLE タイプのトピックを作成する場合は、このプロパティを指定する必要があります。 BLOB タイプのトピックを作成する場合は、このプロパティを指定できません。 |
TopicName | String | はい | いいえ | トピックの名前。 | 名前は 3 ~ 64 文字で、数字、文字、アンダースコア (_) を使用できます。名前は大文字と小文字が区別され、文字で始まる必要があります。 |
ShardCount | Integer | いいえ | いいえ | トピックの初期シャード数。 | なし。 |
Lifecycle | Integer | いいえ | いいえ | データの有効期間 (TTL)。 | なし。 |
戻り値
Fn::GetAtt
ProjectName: プロジェクトの名前。
TopicName: トピックの名前。
例
YAML 形式
ROSTemplateFormatVersion: '2015-09-01'
Description: Test DataHub Topic
Parameters:
RecordType:
Type: String
Default: BLOB
AllowedValues:
- TUPLE
- BLOB
ProjectName:
Type: String
Default: mytest
TopicName:
Type: String
Default: mytest
Resources:
Topic:
Type: ALIYUN::DATAHUB::Topic
Properties:
Comment: Test Create Topic
RecordType:
Ref: RecordType
ProjectName:
Ref: ProjectName
TopicName:
Ref: TopicName
Outputs:
ProjectName:
Value:
Fn::GetAtt:
- Topic
- ProjectName
TopicName:
Value:
Fn::GetAtt:
- Topic
- TopicName
JSON 形式
{
"ROSTemplateFormatVersion": "2015-09-01",
"Description": "Test DataHub Topic",
"Parameters": {
"RecordType": {
"Type": "String",
"Default": "BLOB",
"AllowedValues": [
"TUPLE",
"BLOB"
]
},
"ProjectName": {
"Type": "String",
"Default": "mytest"
},
"TopicName": {
"Type": "String",
"Default": "mytest"
}
},
"Resources": {
"Topic": {
"Type": "ALIYUN::DATAHUB::Topic",
"Properties": {
"Comment": "Test Create Topic",
"RecordType": {
"Ref": "RecordType"
},
"ProjectName": {
"Ref": "ProjectName"
},
"TopicName": {
"Ref": "TopicName"
}
}
}
},
"Outputs": {
"ProjectName": {
"Value": {
"Fn::GetAtt": [
"Topic",
"ProjectName"
]
}
},
"TopicName": {
"Value": {
"Fn::GetAtt": [
"Topic",
"TopicName"
]
}
}
}
}