Skip to content

Commit 4472b28

Browse files
author
AWS
committed
Amazon Lex Model Building V2 Update: Add waiters that automatically poll for resource status for asynchronous operations, such as building a bot
1 parent f0cb56d commit 4472b28

File tree

2 files changed

+261
-0
lines changed

2 files changed

+261
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"type": "feature",
3+
"category": "Amazon Lex Model Building V2",
4+
"contributor": "",
5+
"description": "Add waiters that automatically poll for resource status for asynchronous operations, such as building a bot"
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,255 @@
1+
{
2+
"version":2,
3+
"waiters":{
4+
"BotAvailable":{
5+
"delay":10,
6+
"operation":"DescribeBot",
7+
"maxAttempts":35,
8+
"description":"Wait until a bot is available",
9+
"acceptors":[
10+
{
11+
"expected":"Available",
12+
"matcher":"path",
13+
"state":"success",
14+
"argument":"botStatus"
15+
},
16+
{
17+
"expected":"Deleting",
18+
"matcher":"path",
19+
"state":"failure",
20+
"argument":"botStatus"
21+
},
22+
{
23+
"expected":"Failed",
24+
"matcher":"path",
25+
"state":"failure",
26+
"argument":"botStatus"
27+
},
28+
{
29+
"expected":"Inactive",
30+
"matcher":"path",
31+
"state":"failure",
32+
"argument":"botStatus"
33+
}
34+
]
35+
},
36+
"BotAliasAvailable":{
37+
"delay":10,
38+
"operation":"DescribeBotAlias",
39+
"maxAttempts":35,
40+
"description":"Wait until a bot alias is available",
41+
"acceptors":[
42+
{
43+
"expected":"Available",
44+
"matcher":"path",
45+
"state":"success",
46+
"argument":"botAliasStatus"
47+
},
48+
{
49+
"expected":"Failed",
50+
"matcher":"path",
51+
"state":"failure",
52+
"argument":"botAliasStatus"
53+
},
54+
{
55+
"expected":"Deleting",
56+
"matcher":"path",
57+
"state":"failure",
58+
"argument":"botAliasStatus"
59+
}
60+
]
61+
},
62+
"BotExportCompleted":{
63+
"delay":10,
64+
"operation":"DescribeExport",
65+
"maxAttempts":35,
66+
"description":"Wait until a bot has been exported",
67+
"acceptors":[
68+
{
69+
"expected":"Completed",
70+
"matcher":"path",
71+
"state":"success",
72+
"argument":"exportStatus"
73+
},
74+
{
75+
"expected":"Deleting",
76+
"matcher":"path",
77+
"state":"failure",
78+
"argument":"exportStatus"
79+
},
80+
{
81+
"expected":"Failed",
82+
"matcher":"path",
83+
"state":"failure",
84+
"argument":"exportStatus"
85+
}
86+
]
87+
},
88+
"BotImportCompleted":{
89+
"delay":10,
90+
"operation":"DescribeImport",
91+
"maxAttempts":35,
92+
"description":"Wait until a bot has been imported",
93+
"acceptors":[
94+
{
95+
"expected":"Completed",
96+
"matcher":"path",
97+
"state":"success",
98+
"argument":"importStatus"
99+
},
100+
{
101+
"expected":"Deleting",
102+
"matcher":"path",
103+
"state":"failure",
104+
"argument":"importStatus"
105+
},
106+
{
107+
"expected":"Failed",
108+
"matcher":"path",
109+
"state":"failure",
110+
"argument":"importStatus"
111+
}
112+
]
113+
},
114+
"BotLocaleBuilt":{
115+
"delay":10,
116+
"operation":"DescribeBotLocale",
117+
"maxAttempts":35,
118+
"description":"Wait until a bot locale is built",
119+
"acceptors":[
120+
{
121+
"expected":"Built",
122+
"matcher":"path",
123+
"state":"success",
124+
"argument":"botLocaleStatus"
125+
},
126+
{
127+
"expected":"Deleting",
128+
"matcher":"path",
129+
"state":"failure",
130+
"argument":"botLocaleStatus"
131+
},
132+
{
133+
"expected":"Failed",
134+
"matcher":"path",
135+
"state":"failure",
136+
"argument":"botLocaleStatus"
137+
},
138+
{
139+
"expected":"NotBuilt",
140+
"matcher":"path",
141+
"state":"failure",
142+
"argument":"botLocaleStatus"
143+
}
144+
]
145+
},
146+
"BotLocaleExpressTestingAvailable":{
147+
"delay":10,
148+
"operation":"DescribeBotLocale",
149+
"maxAttempts":35,
150+
"description":"Wait until a bot locale build is ready for express testing",
151+
"acceptors":[
152+
{
153+
"expected":"Built",
154+
"matcher":"path",
155+
"state":"success",
156+
"argument":"botLocaleStatus"
157+
},
158+
{
159+
"expected":"ReadyExpressTesting",
160+
"matcher":"path",
161+
"state":"success",
162+
"argument":"botLocaleStatus"
163+
},
164+
{
165+
"expected":"Deleting",
166+
"matcher":"path",
167+
"state":"failure",
168+
"argument":"botLocaleStatus"
169+
},
170+
{
171+
"expected":"Failed",
172+
"matcher":"path",
173+
"state":"failure",
174+
"argument":"botLocaleStatus"
175+
},
176+
{
177+
"expected":"NotBuilt",
178+
"matcher":"path",
179+
"state":"failure",
180+
"argument":"botLocaleStatus"
181+
}
182+
]
183+
},
184+
"BotVersionAvailable":{
185+
"delay":10,
186+
"operation":"DescribeBotVersion",
187+
"maxAttempts":35,
188+
"description":"Wait until a bot version is available",
189+
"acceptors":[
190+
{
191+
"expected":"Available",
192+
"matcher":"path",
193+
"state":"success",
194+
"argument":"botStatus"
195+
},
196+
{
197+
"expected":"Deleting",
198+
"matcher":"path",
199+
"state":"failure",
200+
"argument":"botStatus"
201+
},
202+
{
203+
"expected":"Failed",
204+
"matcher":"path",
205+
"state":"failure",
206+
"argument":"botStatus"
207+
},
208+
{
209+
"state":"retry",
210+
"matcher":"status",
211+
"expected":404
212+
}
213+
]
214+
},
215+
"BotLocaleCreated":{
216+
"delay":10,
217+
"operation":"DescribeBotLocale",
218+
"maxAttempts":35,
219+
"description":"Wait unit a bot locale is created",
220+
"acceptors":[
221+
{
222+
"expected":"Built",
223+
"matcher":"path",
224+
"state":"success",
225+
"argument":"botLocaleStatus"
226+
},
227+
{
228+
"expected":"ReadyExpressTesting",
229+
"matcher":"path",
230+
"state":"success",
231+
"argument":"botLocaleStatus"
232+
},
233+
{
234+
"expected":"NotBuilt",
235+
"matcher":"path",
236+
"state":"success",
237+
"argument":"botLocaleStatus"
238+
},
239+
{
240+
"expected":"Deleting",
241+
"matcher":"path",
242+
"state":"failure",
243+
"argument":"botLocaleStatus"
244+
},
245+
{
246+
"expected":"Failed",
247+
"matcher":"path",
248+
"state":"failure",
249+
"argument":"botLocaleStatus"
250+
}
251+
]
252+
}
253+
}
254+
}
255+

0 commit comments

Comments
 (0)