ALIYUN::MNS::Topic digunakan untuk membuat topik.
Sintaks
{
"Type": "ALIYUN::MNS::Topic",
"Properties": {
"LoggingEnabled": Boolean,
"TopicName": String,
"MaximumMessageSize": Integer,
"Tags": List
}
}Properti
Properti | Tipe | Diperlukan | Dapat Diedit | Deskripsi | Batasan |
TopicName | String | Ya | Tidak | Nama dari topik. | Nama harus unik untuk akun Alibaba Cloud di suatu wilayah. Panjang nama bisa mencapai 256 karakter dan dapat berisi huruf, angka, dan tanda hubung (-). Nama harus dimulai dengan huruf. |
MaximumMessageSize | Integer | Tidak | Ya | Ukuran maksimum pesan yang dapat dikirim ke topik. | Nilai valid: 1024 (1 KB) hingga 65536 (64 KB). Satuan: byte. Nilai default: 65536 (64 KB). |
LoggingEnabled | Boolean | Tidak | Ya | Menentukan apakah fitur manajemen log diaktifkan. | Nilai default: false. Nilai valid:
|
Tags | List | Tidak | Tidak | Tag dari topik. | Untuk informasi lebih lanjut, lihat bagian "Properti Tags" dari topik ini. |
Sintaks Tags
"Tags": [{
"Key": String,
"Value": String
}]Properti Tags
Properti | Tipe | Diperlukan | Dapat Diedit | Deskripsi | Batasan |
Key | String | Ya | Tidak | Kunci dari tag. | Tidak ada. |
Value | String | Tidak | Tidak | Nilai dari tag. | Tidak ada. |
Nilai kembali
Fn::GetAtt
TopicUrl: URL dari topik yang dibuat.
TopicName: Nama dari topik yang dibuat.
ARN.WithSlash: ARN dari topik yang dibuat.
Contoh
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
TopicName:
Type: String
Description: Nama topik
MinLength: 1
MaxLength: 256
Resources:
Topic:
Type: ALIYUN::MNS::Topic
Properties:
MaximumMessageSize: 1024
LoggingEnabled: false
TopicName:
Ref: TopicName
Outputs:
TopicUrl:
Description: URL dari topik yang dibuat
Value:
Fn::GetAtt:
- Topic
- TopicUrl
ARN:
Description: ARN untuk ALIYUN::ROS::CustomResource
Value:
Fn::GetAtt:
- Topic
- ARN.WithSlash
TopicName:
Description: Nama topik
Value:
Fn::GetAtt:
- Topic
- TopicName{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"TopicName": {
"Type": "String",
"Description": "Nama topik",
"MinLength": 1,
"MaxLength": 256
}
},
"Resources": {
"Topic": {
"Type": "ALIYUN::MNS::Topic",
"Properties": {
"MaximumMessageSize": 1024,
"LoggingEnabled": false,
"TopicName": {
"Ref": "TopicName"
}
}
}
},
"Outputs": {
"TopicUrl": {
"Description": "URL dari topik yang dibuat",
"Value": {
"Fn::GetAtt": [
"Topic",
"TopicUrl"
]
}
},
"ARN": {
"Description": "ARN untuk ALIYUN::ROS::CustomResource",
"Value": {
"Fn::GetAtt": [
"Topic",
"ARN.WithSlash"
]
}
},
"TopicName": {
"Description": "Nama topik",
"Value": {
"Fn::GetAtt": [
"Topic",
"TopicName"
]
}
}
}
}