-
Notifications
You must be signed in to change notification settings - Fork 35
/
subscription.yml
84 lines (84 loc) · 1.78 KB
/
subscription.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
ROSTemplateFormatVersion: '2015-09-01'
Description:
zh-cn: 创建MNS主题、队列和订阅,支持日志记录与消息大小设置,通过参数自定义资源名称。
en: Create MNS topics, queues, and subscriptions with support for log recording
and message size configuration, enabling resource name customization through parameters.
Parameters:
TopicName:
Type: String
Description: Topic Name.
Default: mytest
SubscriptionName:
Type: String
Description: Subscription Name.
Default: mytest
QueueName:
Type: String
Description: Queue Name.
Default: mytest
LoggingEnabled:
Type: Boolean
Label: LoggingEnabled
Description: Whether Enable Logging.
Default: false
MaximumMessageSize:
Type: Number
Description: Maximum Message Size.
Default: 1024
Resources:
Topic:
Type: ALIYUN::MNS::Topic
Properties:
TopicName:
Ref: TopicName
Queue:
Type: ALIYUN::MNS::Queue
Properties:
QueueName:
Ref: QueueName
LoggingEnabled:
Ref: LoggingEnabled
MaximumMessageSize:
Ref: MaximumMessageSize
Subscription:
Type: ALIYUN::MNS::Subscription
Properties:
TopicName:
Fn::GetAtt:
- Topic
- TopicName
SubscriptionName:
Ref: SubscriptionName
Endpoint:
Fn::GetAtt:
- Queue
- QueueUrl
DependsOn:
- Queue
- Topic
Outputs:
QueueUrl:
Value:
Fn::GetAtt:
- Queue
- QueueUrl
TopicUrl:
Value:
Fn::GetAtt:
- Topic
- TopicUrl
TopicName:
Value:
Fn::GetAtt:
- Topic
- TopicName
ARN:
Value:
Fn::GetAtt:
- Topic
- ARN
SubscriptionUrl:
Value:
Fn::GetAtt:
- Subscription
- SubscriptionUrl