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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
#[allow(warnings)]
use hyper::Client;
use hyper::status::StatusCode;
use rusoto_core::request::DispatchSignedRequest;
use rusoto_core::region;
use std::fmt;
use std::error::Error;
use std::io;
use std::io::Read;
use rusoto_core::request::HttpDispatchError;
use rusoto_core::credential::{CredentialsError, ProvideAwsCredentials};
use serde_json;
use rusoto_core::signature::SignedRequest;
use serde_json::Value as SerdeJsonValue;
use serde_json::from_str;
#[doc="<p>Contains the parameters for ActivatePipeline.</p>"]
#[derive(Default,Debug,Clone,Serialize)]
pub struct ActivatePipelineInput {
#[doc="<p>A list of parameter values to pass to the pipeline at activation.</p>"]
#[serde(rename="parameterValues")]
#[serde(skip_serializing_if="Option::is_none")]
pub parameter_values: Option<Vec<ParameterValue>>,
#[doc="<p>The ID of the pipeline.</p>"]
#[serde(rename="pipelineId")]
pub pipeline_id: String,
#[doc="<p>The date and time to resume the pipeline. By default, the pipeline resumes from the last completed execution.</p>"]
#[serde(rename="startTimestamp")]
#[serde(skip_serializing_if="Option::is_none")]
pub start_timestamp: Option<f64>,
}
#[doc="<p>Contains the output of ActivatePipeline.</p>"]
#[derive(Default,Debug,Clone,Deserialize)]
pub struct ActivatePipelineOutput;
#[doc="<p>Contains the parameters for AddTags.</p>"]
#[derive(Default,Debug,Clone,Serialize)]
pub struct AddTagsInput {
#[doc="<p>The ID of the pipeline.</p>"]
#[serde(rename="pipelineId")]
pub pipeline_id: String,
#[doc="<p>The tags to add, as key/value pairs.</p>"]
#[serde(rename="tags")]
pub tags: Vec<Tag>,
}
#[doc="<p>Contains the output of AddTags.</p>"]
#[derive(Default,Debug,Clone,Deserialize)]
pub struct AddTagsOutput;
#[doc="<p>Contains the parameters for CreatePipeline.</p>"]
#[derive(Default,Debug,Clone,Serialize)]
pub struct CreatePipelineInput {
#[doc="<p>The description for the pipeline.</p>"]
#[serde(rename="description")]
#[serde(skip_serializing_if="Option::is_none")]
pub description: Option<String>,
#[doc="<p>The name for the pipeline. You can use the same name for multiple pipelines associated with your AWS account, because AWS Data Pipeline assigns each pipeline a unique pipeline identifier.</p>"]
#[serde(rename="name")]
pub name: String,
#[doc="<p>A list of tags to associate with the pipeline at creation. Tags let you control access to pipelines. For more information, see <a href=\"http://docs.aws.amazon.com/datapipeline/latest/DeveloperGuide/dp-control-access.html\">Controlling User Access to Pipelines</a> in the <i>AWS Data Pipeline Developer Guide</i>.</p>"]
#[serde(rename="tags")]
#[serde(skip_serializing_if="Option::is_none")]
pub tags: Option<Vec<Tag>>,
#[doc="<p>A unique identifier. This identifier is not the same as the pipeline identifier assigned by AWS Data Pipeline. You are responsible for defining the format and ensuring the uniqueness of this identifier. You use this parameter to ensure idempotency during repeated calls to <code>CreatePipeline</code>. For example, if the first call to <code>CreatePipeline</code> does not succeed, you can pass in the same unique identifier and pipeline name combination on a subsequent call to <code>CreatePipeline</code>. <code>CreatePipeline</code> ensures that if a pipeline already exists with the same name and unique identifier, a new pipeline is not created. Instead, you'll receive the pipeline identifier from the previous attempt. The uniqueness of the name and unique identifier combination is scoped to the AWS account or IAM user credentials.</p>"]
#[serde(rename="uniqueId")]
pub unique_id: String,
}
#[doc="<p>Contains the output of CreatePipeline.</p>"]
#[derive(Default,Debug,Clone,Deserialize)]
pub struct CreatePipelineOutput {
#[doc="<p>The ID that AWS Data Pipeline assigns the newly created pipeline. For example, <code>df-06372391ZG65EXAMPLE</code>.</p>"]
#[serde(rename="pipelineId")]
pub pipeline_id: String,
}
#[doc="<p>Contains the parameters for DeactivatePipeline.</p>"]
#[derive(Default,Debug,Clone,Serialize)]
pub struct DeactivatePipelineInput {
#[doc="<p>Indicates whether to cancel any running objects. The default is true, which sets the state of any running objects to <code>CANCELED</code>. If this value is false, the pipeline is deactivated after all running objects finish.</p>"]
#[serde(rename="cancelActive")]
#[serde(skip_serializing_if="Option::is_none")]
pub cancel_active: Option<bool>,
#[doc="<p>The ID of the pipeline.</p>"]
#[serde(rename="pipelineId")]
pub pipeline_id: String,
}
#[doc="<p>Contains the output of DeactivatePipeline.</p>"]
#[derive(Default,Debug,Clone,Deserialize)]
pub struct DeactivatePipelineOutput;
#[doc="<p>Contains the parameters for DeletePipeline.</p>"]
#[derive(Default,Debug,Clone,Serialize)]
pub struct DeletePipelineInput {
#[doc="<p>The ID of the pipeline.</p>"]
#[serde(rename="pipelineId")]
pub pipeline_id: String,
}
#[doc="<p>Contains the parameters for DescribeObjects.</p>"]
#[derive(Default,Debug,Clone,Serialize)]
pub struct DescribeObjectsInput {
#[doc="<p>Indicates whether any expressions in the object should be evaluated when the object descriptions are returned.</p>"]
#[serde(rename="evaluateExpressions")]
#[serde(skip_serializing_if="Option::is_none")]
pub evaluate_expressions: Option<bool>,
#[doc="<p>The starting point for the results to be returned. For the first call, this value should be empty. As long as there are more results, continue to call <code>DescribeObjects</code> with the marker value from the previous call to retrieve the next set of results.</p>"]
#[serde(rename="marker")]
#[serde(skip_serializing_if="Option::is_none")]
pub marker: Option<String>,
#[doc="<p>The IDs of the pipeline objects that contain the definitions to be described. You can pass as many as 25 identifiers in a single call to <code>DescribeObjects</code>.</p>"]
#[serde(rename="objectIds")]
pub object_ids: Vec<String>,
#[doc="<p>The ID of the pipeline that contains the object definitions.</p>"]
#[serde(rename="pipelineId")]
pub pipeline_id: String,
}
#[doc="<p>Contains the output of DescribeObjects.</p>"]
#[derive(Default,Debug,Clone,Deserialize)]
pub struct DescribeObjectsOutput {
#[doc="<p>Indicates whether there are more results to return.</p>"]
#[serde(rename="hasMoreResults")]
#[serde(skip_serializing_if="Option::is_none")]
pub has_more_results: Option<bool>,
#[doc="<p>The starting point for the next page of results. To view the next page of results, call <code>DescribeObjects</code> again with this marker value. If the value is null, there are no more results.</p>"]
#[serde(rename="marker")]
#[serde(skip_serializing_if="Option::is_none")]
pub marker: Option<String>,
#[doc="<p>An array of object definitions.</p>"]
#[serde(rename="pipelineObjects")]
pub pipeline_objects: Vec<PipelineObject>,
}
#[doc="<p>Contains the parameters for DescribePipelines.</p>"]
#[derive(Default,Debug,Clone,Serialize)]
pub struct DescribePipelinesInput {
#[doc="<p>The IDs of the pipelines to describe. You can pass as many as 25 identifiers in a single call. To obtain pipeline IDs, call <a>ListPipelines</a>.</p>"]
#[serde(rename="pipelineIds")]
pub pipeline_ids: Vec<String>,
}
#[doc="<p>Contains the output of DescribePipelines.</p>"]
#[derive(Default,Debug,Clone,Deserialize)]
pub struct DescribePipelinesOutput {
#[doc="<p>An array of descriptions for the specified pipelines.</p>"]
#[serde(rename="pipelineDescriptionList")]
pub pipeline_description_list: Vec<PipelineDescription>,
}
#[doc="<p>Contains the parameters for EvaluateExpression.</p>"]
#[derive(Default,Debug,Clone,Serialize)]
pub struct EvaluateExpressionInput {
#[doc="<p>The expression to evaluate.</p>"]
#[serde(rename="expression")]
pub expression: String,
#[doc="<p>The ID of the object.</p>"]
#[serde(rename="objectId")]
pub object_id: String,
#[doc="<p>The ID of the pipeline.</p>"]
#[serde(rename="pipelineId")]
pub pipeline_id: String,
}
#[doc="<p>Contains the output of EvaluateExpression.</p>"]
#[derive(Default,Debug,Clone,Deserialize)]
pub struct EvaluateExpressionOutput {
#[doc="<p>The evaluated expression.</p>"]
#[serde(rename="evaluatedExpression")]
pub evaluated_expression: String,
}
#[doc="<p>A key-value pair that describes a property of a pipeline object. The value is specified as either a string value (<code>StringValue</code>) or a reference to another object (<code>RefValue</code>) but not as both.</p>"]
#[derive(Default,Debug,Clone,Serialize,Deserialize)]
pub struct Field {
#[doc="<p>The field identifier.</p>"]
#[serde(rename="key")]
pub key: String,
#[doc="<p>The field value, expressed as the identifier of another object.</p>"]
#[serde(rename="refValue")]
#[serde(skip_serializing_if="Option::is_none")]
pub ref_value: Option<String>,
#[doc="<p>The field value, expressed as a String.</p>"]
#[serde(rename="stringValue")]
#[serde(skip_serializing_if="Option::is_none")]
pub string_value: Option<String>,
}
#[doc="<p>Contains the parameters for GetPipelineDefinition.</p>"]
#[derive(Default,Debug,Clone,Serialize)]
pub struct GetPipelineDefinitionInput {
#[doc="<p>The ID of the pipeline.</p>"]
#[serde(rename="pipelineId")]
pub pipeline_id: String,
#[doc="<p>The version of the pipeline definition to retrieve. Set this parameter to <code>latest</code> (default) to use the last definition saved to the pipeline or <code>active</code> to use the last definition that was activated.</p>"]
#[serde(rename="version")]
#[serde(skip_serializing_if="Option::is_none")]
pub version: Option<String>,
}
#[doc="<p>Contains the output of GetPipelineDefinition.</p>"]
#[derive(Default,Debug,Clone,Deserialize)]
pub struct GetPipelineDefinitionOutput {
#[doc="<p>The parameter objects used in the pipeline definition.</p>"]
#[serde(rename="parameterObjects")]
#[serde(skip_serializing_if="Option::is_none")]
pub parameter_objects: Option<Vec<ParameterObject>>,
#[doc="<p>The parameter values used in the pipeline definition.</p>"]
#[serde(rename="parameterValues")]
#[serde(skip_serializing_if="Option::is_none")]
pub parameter_values: Option<Vec<ParameterValue>>,
#[doc="<p>The objects defined in the pipeline.</p>"]
#[serde(rename="pipelineObjects")]
#[serde(skip_serializing_if="Option::is_none")]
pub pipeline_objects: Option<Vec<PipelineObject>>,
}
#[doc="<p><p>Identity information for the EC2 instance that is hosting the task runner. You can get this value by calling a metadata URI from the EC2 instance. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AESDG-chapter-instancedata.html\">Instance Metadata</a> in the <i>Amazon Elastic Compute Cloud User Guide.</i> Passing in this value proves that your task runner is running on an EC2 instance, and ensures the proper AWS Data Pipeline service charges are applied to your pipeline.</p></p>"]
#[derive(Default,Debug,Clone,Serialize)]
pub struct InstanceIdentity {
#[doc="<p>A description of an EC2 instance that is generated when the instance is launched and exposed to the instance via the instance metadata service in the form of a JSON representation of an object.</p>"]
#[serde(rename="document")]
#[serde(skip_serializing_if="Option::is_none")]
pub document: Option<String>,
#[doc="<p>A signature which can be used to verify the accuracy and authenticity of the information provided in the instance identity document.</p>"]
#[serde(rename="signature")]
#[serde(skip_serializing_if="Option::is_none")]
pub signature: Option<String>,
}
#[doc="<p>Contains the parameters for ListPipelines.</p>"]
#[derive(Default,Debug,Clone,Serialize)]
pub struct ListPipelinesInput {
#[doc="<p>The starting point for the results to be returned. For the first call, this value should be empty. As long as there are more results, continue to call <code>ListPipelines</code> with the marker value from the previous call to retrieve the next set of results.</p>"]
#[serde(rename="marker")]
#[serde(skip_serializing_if="Option::is_none")]
pub marker: Option<String>,
}
#[doc="<p>Contains the output of ListPipelines.</p>"]
#[derive(Default,Debug,Clone,Deserialize)]
pub struct ListPipelinesOutput {
#[doc="<p>Indicates whether there are more results that can be obtained by a subsequent call.</p>"]
#[serde(rename="hasMoreResults")]
#[serde(skip_serializing_if="Option::is_none")]
pub has_more_results: Option<bool>,
#[doc="<p>The starting point for the next page of results. To view the next page of results, call <code>ListPipelinesOutput</code> again with this marker value. If the value is null, there are no more results.</p>"]
#[serde(rename="marker")]
#[serde(skip_serializing_if="Option::is_none")]
pub marker: Option<String>,
#[doc="<p>The pipeline identifiers. If you require additional information about the pipelines, you can use these identifiers to call <a>DescribePipelines</a> and <a>GetPipelineDefinition</a>.</p>"]
#[serde(rename="pipelineIdList")]
pub pipeline_id_list: Vec<PipelineIdName>,
}
#[doc="<p>Contains a logical operation for comparing the value of a field with a specified value.</p>"]
#[derive(Default,Debug,Clone,Serialize)]
pub struct Operator {
#[doc="<p> The logical operation to be performed: equal (<code>EQ</code>), equal reference (<code>REF_EQ</code>), less than or equal (<code>LE</code>), greater than or equal (<code>GE</code>), or between (<code>BETWEEN</code>). Equal reference (<code>REF_EQ</code>) can be used only with reference fields. The other comparison types can be used only with String fields. The comparison types you can use apply only to certain object fields, as detailed below. </p> <p> The comparison operators EQ and REF_EQ act on the following fields: </p> <ul> <li>name</li> <li>@sphere</li> <li>parent</li> <li>@componentParent</li> <li>@instanceParent</li> <li>@status</li> <li>@scheduledStartTime</li> <li>@scheduledEndTime</li> <li>@actualStartTime</li> <li>@actualEndTime</li> </ul> <p> The comparison operators <code>GE</code>, <code>LE</code>, and <code>BETWEEN</code> act on the following fields: </p> <ul> <li>@scheduledStartTime</li> <li>@scheduledEndTime</li> <li>@actualStartTime</li> <li>@actualEndTime</li> </ul> <p>Note that fields beginning with the at sign (@) are read-only and set by the web service. When you name fields, you should choose names containing only alpha-numeric values, as symbols may be reserved by AWS Data Pipeline. User-defined fields that you add to a pipeline should prefix their name with the string \"my\".</p>"]
#[serde(rename="type")]
#[serde(skip_serializing_if="Option::is_none")]
pub type_: Option<String>,
#[doc="<p>The value that the actual field value will be compared with.</p>"]
#[serde(rename="values")]
#[serde(skip_serializing_if="Option::is_none")]
pub values: Option<Vec<String>>,
}
#[doc="<p>The attributes allowed or specified with a parameter object.</p>"]
#[derive(Default,Debug,Clone,Serialize,Deserialize)]
pub struct ParameterAttribute {
#[doc="<p>The field identifier.</p>"]
#[serde(rename="key")]
pub key: String,
#[doc="<p>The field value, expressed as a String.</p>"]
#[serde(rename="stringValue")]
pub string_value: String,
}
#[doc="<p>Contains information about a parameter object.</p>"]
#[derive(Default,Debug,Clone,Serialize,Deserialize)]
pub struct ParameterObject {
#[doc="<p>The attributes of the parameter object.</p>"]
#[serde(rename="attributes")]
pub attributes: Vec<ParameterAttribute>,
#[doc="<p>The ID of the parameter object. </p>"]
#[serde(rename="id")]
pub id: String,
}
#[doc="<p>A value or list of parameter values. </p>"]
#[derive(Default,Debug,Clone,Serialize,Deserialize)]
pub struct ParameterValue {
#[doc="<p>The ID of the parameter value.</p>"]
#[serde(rename="id")]
pub id: String,
#[doc="<p>The field value, expressed as a String.</p>"]
#[serde(rename="stringValue")]
pub string_value: String,
}
#[doc="<p>Contains pipeline metadata.</p>"]
#[derive(Default,Debug,Clone,Deserialize)]
pub struct PipelineDescription {
#[doc="<p>Description of the pipeline.</p>"]
#[serde(rename="description")]
#[serde(skip_serializing_if="Option::is_none")]
pub description: Option<String>,
#[doc="<p>A list of read-only fields that contain metadata about the pipeline: @userId, @accountId, and @pipelineState.</p>"]
#[serde(rename="fields")]
pub fields: Vec<Field>,
#[doc="<p>The name of the pipeline.</p>"]
#[serde(rename="name")]
pub name: String,
#[doc="<p>The pipeline identifier that was assigned by AWS Data Pipeline. This is a string of the form <code>df-297EG78HU43EEXAMPLE</code>.</p>"]
#[serde(rename="pipelineId")]
pub pipeline_id: String,
#[doc="<p>A list of tags to associated with a pipeline. Tags let you control access to pipelines. For more information, see <a href=\"http://docs.aws.amazon.com/datapipeline/latest/DeveloperGuide/dp-control-access.html\">Controlling User Access to Pipelines</a> in the <i>AWS Data Pipeline Developer Guide</i>.</p>"]
#[serde(rename="tags")]
#[serde(skip_serializing_if="Option::is_none")]
pub tags: Option<Vec<Tag>>,
}
#[doc="<p>Contains the name and identifier of a pipeline.</p>"]
#[derive(Default,Debug,Clone,Deserialize)]
pub struct PipelineIdName {
#[doc="<p>The ID of the pipeline that was assigned by AWS Data Pipeline. This is a string of the form <code>df-297EG78HU43EEXAMPLE</code>.</p>"]
#[serde(rename="id")]
#[serde(skip_serializing_if="Option::is_none")]
pub id: Option<String>,
#[doc="<p>The name of the pipeline.</p>"]
#[serde(rename="name")]
#[serde(skip_serializing_if="Option::is_none")]
pub name: Option<String>,
}
#[doc="<p>Contains information about a pipeline object. This can be a logical, physical, or physical attempt pipeline object. The complete set of components of a pipeline defines the pipeline.</p>"]
#[derive(Default,Debug,Clone,Serialize,Deserialize)]
pub struct PipelineObject {
#[doc="<p>Key-value pairs that define the properties of the object.</p>"]
#[serde(rename="fields")]
pub fields: Vec<Field>,
#[doc="<p>The ID of the object.</p>"]
#[serde(rename="id")]
pub id: String,
#[doc="<p>The name of the object.</p>"]
#[serde(rename="name")]
pub name: String,
}
#[doc="<p>Contains the parameters for PollForTask.</p>"]
#[derive(Default,Debug,Clone,Serialize)]
pub struct PollForTaskInput {
#[doc="<p>The public DNS name of the calling task runner.</p>"]
#[serde(rename="hostname")]
#[serde(skip_serializing_if="Option::is_none")]
pub hostname: Option<String>,
#[doc="<p>Identity information for the EC2 instance that is hosting the task runner. You can get this value from the instance using <code>http://169.254.169.254/latest/meta-data/instance-id</code>. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AESDG-chapter-instancedata.html\">Instance Metadata</a> in the <i>Amazon Elastic Compute Cloud User Guide.</i> Passing in this value proves that your task runner is running on an EC2 instance, and ensures the proper AWS Data Pipeline service charges are applied to your pipeline.</p>"]
#[serde(rename="instanceIdentity")]
#[serde(skip_serializing_if="Option::is_none")]
pub instance_identity: Option<InstanceIdentity>,
#[doc="<p>The type of task the task runner is configured to accept and process. The worker group is set as a field on objects in the pipeline when they are created. You can only specify a single value for <code>workerGroup</code> in the call to <code>PollForTask</code>. There are no wildcard values permitted in <code>workerGroup</code>; the string must be an exact, case-sensitive, match.</p>"]
#[serde(rename="workerGroup")]
pub worker_group: String,
}
#[doc="<p>Contains the output of PollForTask.</p>"]
#[derive(Default,Debug,Clone,Deserialize)]
pub struct PollForTaskOutput {
#[doc="<p>The information needed to complete the task that is being assigned to the task runner. One of the fields returned in this object is <code>taskId</code>, which contains an identifier for the task being assigned. The calling task runner uses <code>taskId</code> in subsequent calls to <a>ReportTaskProgress</a> and <a>SetTaskStatus</a>.</p>"]
#[serde(rename="taskObject")]
#[serde(skip_serializing_if="Option::is_none")]
pub task_object: Option<TaskObject>,
}
#[doc="<p>Contains the parameters for PutPipelineDefinition.</p>"]
#[derive(Default,Debug,Clone,Serialize)]
pub struct PutPipelineDefinitionInput {
#[doc="<p>The parameter objects used with the pipeline.</p>"]
#[serde(rename="parameterObjects")]
#[serde(skip_serializing_if="Option::is_none")]
pub parameter_objects: Option<Vec<ParameterObject>>,
#[doc="<p>The parameter values used with the pipeline.</p>"]
#[serde(rename="parameterValues")]
#[serde(skip_serializing_if="Option::is_none")]
pub parameter_values: Option<Vec<ParameterValue>>,
#[doc="<p>The ID of the pipeline.</p>"]
#[serde(rename="pipelineId")]
pub pipeline_id: String,
#[doc="<p>The objects that define the pipeline. These objects overwrite the existing pipeline definition.</p>"]
#[serde(rename="pipelineObjects")]
pub pipeline_objects: Vec<PipelineObject>,
}
#[doc="<p>Contains the output of PutPipelineDefinition.</p>"]
#[derive(Default,Debug,Clone,Deserialize)]
pub struct PutPipelineDefinitionOutput {
#[doc="<p>Indicates whether there were validation errors, and the pipeline definition is stored but cannot be activated until you correct the pipeline and call <code>PutPipelineDefinition</code> to commit the corrected pipeline.</p>"]
#[serde(rename="errored")]
pub errored: bool,
#[doc="<p>The validation errors that are associated with the objects defined in <code>pipelineObjects</code>.</p>"]
#[serde(rename="validationErrors")]
#[serde(skip_serializing_if="Option::is_none")]
pub validation_errors: Option<Vec<ValidationError>>,
#[doc="<p>The validation warnings that are associated with the objects defined in <code>pipelineObjects</code>.</p>"]
#[serde(rename="validationWarnings")]
#[serde(skip_serializing_if="Option::is_none")]
pub validation_warnings: Option<Vec<ValidationWarning>>,
}
#[doc="<p>Defines the query to run against an object.</p>"]
#[derive(Default,Debug,Clone,Serialize)]
pub struct Query {
#[doc="<p>List of selectors that define the query. An object must satisfy all of the selectors to match the query.</p>"]
#[serde(rename="selectors")]
#[serde(skip_serializing_if="Option::is_none")]
pub selectors: Option<Vec<Selector>>,
}
#[doc="<p>Contains the parameters for QueryObjects.</p>"]
#[derive(Default,Debug,Clone,Serialize)]
pub struct QueryObjectsInput {
#[doc="<p>The maximum number of object names that <code>QueryObjects</code> will return in a single call. The default value is 100. </p>"]
#[serde(rename="limit")]
#[serde(skip_serializing_if="Option::is_none")]
pub limit: Option<i64>,
#[doc="<p>The starting point for the results to be returned. For the first call, this value should be empty. As long as there are more results, continue to call <code>QueryObjects</code> with the marker value from the previous call to retrieve the next set of results.</p>"]
#[serde(rename="marker")]
#[serde(skip_serializing_if="Option::is_none")]
pub marker: Option<String>,
#[doc="<p>The ID of the pipeline.</p>"]
#[serde(rename="pipelineId")]
pub pipeline_id: String,
#[doc="<p>The query that defines the objects to be returned. The <code>Query</code> object can contain a maximum of ten selectors. The conditions in the query are limited to top-level String fields in the object. These filters can be applied to components, instances, and attempts.</p>"]
#[serde(rename="query")]
#[serde(skip_serializing_if="Option::is_none")]
pub query: Option<Query>,
#[doc="<p>Indicates whether the query applies to components or instances. The possible values are: <code>COMPONENT</code>, <code>INSTANCE</code>, and <code>ATTEMPT</code>.</p>"]
#[serde(rename="sphere")]
pub sphere: String,
}
#[doc="<p>Contains the output of QueryObjects.</p>"]
#[derive(Default,Debug,Clone,Deserialize)]
pub struct QueryObjectsOutput {
#[doc="<p>Indicates whether there are more results that can be obtained by a subsequent call.</p>"]
#[serde(rename="hasMoreResults")]
#[serde(skip_serializing_if="Option::is_none")]
pub has_more_results: Option<bool>,
#[doc="<p>The identifiers that match the query selectors.</p>"]
#[serde(rename="ids")]
#[serde(skip_serializing_if="Option::is_none")]
pub ids: Option<Vec<String>>,
#[doc="<p>The starting point for the next page of results. To view the next page of results, call <code>QueryObjects</code> again with this marker value. If the value is null, there are no more results.</p>"]
#[serde(rename="marker")]
#[serde(skip_serializing_if="Option::is_none")]
pub marker: Option<String>,
}
#[doc="<p>Contains the parameters for RemoveTags.</p>"]
#[derive(Default,Debug,Clone,Serialize)]
pub struct RemoveTagsInput {
#[doc="<p>The ID of the pipeline.</p>"]
#[serde(rename="pipelineId")]
pub pipeline_id: String,
#[doc="<p>The keys of the tags to remove.</p>"]
#[serde(rename="tagKeys")]
pub tag_keys: Vec<String>,
}
#[doc="<p>Contains the output of RemoveTags.</p>"]
#[derive(Default,Debug,Clone,Deserialize)]
pub struct RemoveTagsOutput;
#[doc="<p>Contains the parameters for ReportTaskProgress.</p>"]
#[derive(Default,Debug,Clone,Serialize)]
pub struct ReportTaskProgressInput {
#[doc="<p>Key-value pairs that define the properties of the ReportTaskProgressInput object.</p>"]
#[serde(rename="fields")]
#[serde(skip_serializing_if="Option::is_none")]
pub fields: Option<Vec<Field>>,
#[doc="<p>The ID of the task assigned to the task runner. This value is provided in the response for <a>PollForTask</a>.</p>"]
#[serde(rename="taskId")]
pub task_id: String,
}
#[doc="<p>Contains the output of ReportTaskProgress.</p>"]
#[derive(Default,Debug,Clone,Deserialize)]
pub struct ReportTaskProgressOutput {
#[doc="<p>If true, the calling task runner should cancel processing of the task. The task runner does not need to call <a>SetTaskStatus</a> for canceled tasks.</p>"]
#[serde(rename="canceled")]
pub canceled: bool,
}
#[doc="<p>Contains the parameters for ReportTaskRunnerHeartbeat.</p>"]
#[derive(Default,Debug,Clone,Serialize)]
pub struct ReportTaskRunnerHeartbeatInput {
#[doc="<p>The public DNS name of the task runner.</p>"]
#[serde(rename="hostname")]
#[serde(skip_serializing_if="Option::is_none")]
pub hostname: Option<String>,
#[doc="<p>The ID of the task runner. This value should be unique across your AWS account. In the case of AWS Data Pipeline Task Runner launched on a resource managed by AWS Data Pipeline, the web service provides a unique identifier when it launches the application. If you have written a custom task runner, you should assign a unique identifier for the task runner.</p>"]
#[serde(rename="taskrunnerId")]
pub taskrunner_id: String,
#[doc="<p>The type of task the task runner is configured to accept and process. The worker group is set as a field on objects in the pipeline when they are created. You can only specify a single value for <code>workerGroup</code>. There are no wildcard values permitted in <code>workerGroup</code>; the string must be an exact, case-sensitive, match.</p>"]
#[serde(rename="workerGroup")]
#[serde(skip_serializing_if="Option::is_none")]
pub worker_group: Option<String>,
}
#[doc="<p>Contains the output of ReportTaskRunnerHeartbeat.</p>"]
#[derive(Default,Debug,Clone,Deserialize)]
pub struct ReportTaskRunnerHeartbeatOutput {
#[doc="<p>Indicates whether the calling task runner should terminate.</p>"]
#[serde(rename="terminate")]
pub terminate: bool,
}
#[doc="<p>A comparision that is used to determine whether a query should return this object.</p>"]
#[derive(Default,Debug,Clone,Serialize)]
pub struct Selector {
#[doc="<p>The name of the field that the operator will be applied to. The field name is the \"key\" portion of the field definition in the pipeline definition syntax that is used by the AWS Data Pipeline API. If the field is not set on the object, the condition fails.</p>"]
#[serde(rename="fieldName")]
#[serde(skip_serializing_if="Option::is_none")]
pub field_name: Option<String>,
#[serde(rename="operator")]
#[serde(skip_serializing_if="Option::is_none")]
pub operator: Option<Operator>,
}
#[doc="<p>Contains the parameters for SetStatus.</p>"]
#[derive(Default,Debug,Clone,Serialize)]
pub struct SetStatusInput {
#[doc="<p>The IDs of the objects. The corresponding objects can be either physical or components, but not a mix of both types.</p>"]
#[serde(rename="objectIds")]
pub object_ids: Vec<String>,
#[doc="<p>The ID of the pipeline that contains the objects.</p>"]
#[serde(rename="pipelineId")]
pub pipeline_id: String,
#[doc="<p>The status to be set on all the objects specified in <code>objectIds</code>. For components, use <code>PAUSE</code> or <code>RESUME</code>. For instances, use <code>TRY_CANCEL</code>, <code>RERUN</code>, or <code>MARK_FINISHED</code>.</p>"]
#[serde(rename="status")]
pub status: String,
}
#[doc="<p>Contains the parameters for SetTaskStatus.</p>"]
#[derive(Default,Debug,Clone,Serialize)]
pub struct SetTaskStatusInput {
#[doc="<p>If an error occurred during the task, this value specifies the error code. This value is set on the physical attempt object. It is used to display error information to the user. It should not start with string \"Service_\" which is reserved by the system.</p>"]
#[serde(rename="errorId")]
#[serde(skip_serializing_if="Option::is_none")]
pub error_id: Option<String>,
#[doc="<p>If an error occurred during the task, this value specifies a text description of the error. This value is set on the physical attempt object. It is used to display error information to the user. The web service does not parse this value.</p>"]
#[serde(rename="errorMessage")]
#[serde(skip_serializing_if="Option::is_none")]
pub error_message: Option<String>,
#[doc="<p>If an error occurred during the task, this value specifies the stack trace associated with the error. This value is set on the physical attempt object. It is used to display error information to the user. The web service does not parse this value.</p>"]
#[serde(rename="errorStackTrace")]
#[serde(skip_serializing_if="Option::is_none")]
pub error_stack_trace: Option<String>,
#[doc="<p>The ID of the task assigned to the task runner. This value is provided in the response for <a>PollForTask</a>.</p>"]
#[serde(rename="taskId")]
pub task_id: String,
#[doc="<p>If <code>FINISHED</code>, the task successfully completed. If <code>FAILED</code>, the task ended unsuccessfully. Preconditions use false.</p>"]
#[serde(rename="taskStatus")]
pub task_status: String,
}
#[doc="<p>Contains the output of SetTaskStatus.</p>"]
#[derive(Default,Debug,Clone,Deserialize)]
pub struct SetTaskStatusOutput;
#[doc="<p>Tags are key/value pairs defined by a user and associated with a pipeline to control access. AWS Data Pipeline allows you to associate ten tags per pipeline. For more information, see <a href=\"http://docs.aws.amazon.com/datapipeline/latest/DeveloperGuide/dp-control-access.html\">Controlling User Access to Pipelines</a> in the <i>AWS Data Pipeline Developer Guide</i>.</p>"]
#[derive(Default,Debug,Clone,Serialize,Deserialize)]
pub struct Tag {
#[doc="<p>The key name of a tag defined by a user. For more information, see <a href=\"http://docs.aws.amazon.com/datapipeline/latest/DeveloperGuide/dp-control-access.html\">Controlling User Access to Pipelines</a> in the <i>AWS Data Pipeline Developer Guide</i>.</p>"]
#[serde(rename="key")]
pub key: String,
#[doc="<p>The optional value portion of a tag defined by a user. For more information, see <a href=\"http://docs.aws.amazon.com/datapipeline/latest/DeveloperGuide/dp-control-access.html\">Controlling User Access to Pipelines</a> in the <i>AWS Data Pipeline Developer Guide</i>.</p>"]
#[serde(rename="value")]
pub value: String,
}
#[doc="<p>Contains information about a pipeline task that is assigned to a task runner.</p>"]
#[derive(Default,Debug,Clone,Deserialize)]
pub struct TaskObject {
#[doc="<p>The ID of the pipeline task attempt object. AWS Data Pipeline uses this value to track how many times a task is attempted.</p>"]
#[serde(rename="attemptId")]
#[serde(skip_serializing_if="Option::is_none")]
pub attempt_id: Option<String>,
#[doc="<p>Connection information for the location where the task runner will publish the output of the task.</p>"]
#[serde(rename="objects")]
#[serde(skip_serializing_if="Option::is_none")]
pub objects: Option<::std::collections::HashMap<String, PipelineObject>>,
#[doc="<p>The ID of the pipeline that provided the task.</p>"]
#[serde(rename="pipelineId")]
#[serde(skip_serializing_if="Option::is_none")]
pub pipeline_id: Option<String>,
#[doc="<p>An internal identifier for the task. This ID is passed to the <a>SetTaskStatus</a> and <a>ReportTaskProgress</a> actions.</p>"]
#[serde(rename="taskId")]
#[serde(skip_serializing_if="Option::is_none")]
pub task_id: Option<String>,
}
#[doc="<p>Contains the parameters for ValidatePipelineDefinition.</p>"]
#[derive(Default,Debug,Clone,Serialize)]
pub struct ValidatePipelineDefinitionInput {
#[doc="<p>The parameter objects used with the pipeline.</p>"]
#[serde(rename="parameterObjects")]
#[serde(skip_serializing_if="Option::is_none")]
pub parameter_objects: Option<Vec<ParameterObject>>,
#[doc="<p>The parameter values used with the pipeline.</p>"]
#[serde(rename="parameterValues")]
#[serde(skip_serializing_if="Option::is_none")]
pub parameter_values: Option<Vec<ParameterValue>>,
#[doc="<p>The ID of the pipeline.</p>"]
#[serde(rename="pipelineId")]
pub pipeline_id: String,
#[doc="<p>The objects that define the pipeline changes to validate against the pipeline.</p>"]
#[serde(rename="pipelineObjects")]
pub pipeline_objects: Vec<PipelineObject>,
}
#[doc="<p>Contains the output of ValidatePipelineDefinition.</p>"]
#[derive(Default,Debug,Clone,Deserialize)]
pub struct ValidatePipelineDefinitionOutput {
#[doc="<p>Indicates whether there were validation errors.</p>"]
#[serde(rename="errored")]
pub errored: bool,
#[doc="<p>Any validation errors that were found.</p>"]
#[serde(rename="validationErrors")]
#[serde(skip_serializing_if="Option::is_none")]
pub validation_errors: Option<Vec<ValidationError>>,
#[doc="<p>Any validation warnings that were found.</p>"]
#[serde(rename="validationWarnings")]
#[serde(skip_serializing_if="Option::is_none")]
pub validation_warnings: Option<Vec<ValidationWarning>>,
}
#[doc="<p>Defines a validation error. Validation errors prevent pipeline activation. The set of validation errors that can be returned are defined by AWS Data Pipeline.</p>"]
#[derive(Default,Debug,Clone,Deserialize)]
pub struct ValidationError {
#[doc="<p>A description of the validation error.</p>"]
#[serde(rename="errors")]
#[serde(skip_serializing_if="Option::is_none")]
pub errors: Option<Vec<String>>,
#[doc="<p>The identifier of the object that contains the validation error.</p>"]
#[serde(rename="id")]
#[serde(skip_serializing_if="Option::is_none")]
pub id: Option<String>,
}
#[doc="<p>Defines a validation warning. Validation warnings do not prevent pipeline activation. The set of validation warnings that can be returned are defined by AWS Data Pipeline.</p>"]
#[derive(Default,Debug,Clone,Deserialize)]
pub struct ValidationWarning {
#[doc="<p>The identifier of the object that contains the validation warning.</p>"]
#[serde(rename="id")]
#[serde(skip_serializing_if="Option::is_none")]
pub id: Option<String>,
#[doc="<p>A description of the validation warning.</p>"]
#[serde(rename="warnings")]
#[serde(skip_serializing_if="Option::is_none")]
pub warnings: Option<Vec<String>>,
}
#[derive(Debug, PartialEq)]
pub enum ActivatePipelineError {
InternalServiceError(String),
InvalidRequest(String),
PipelineDeleted(String),
PipelineNotFound(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
Unknown(String),
}
impl ActivatePipelineError {
pub fn from_body(body: &str) -> ActivatePipelineError {
match from_str::<SerdeJsonValue>(body) {
Ok(json) => {
let raw_error_type = json.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or(body);
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServiceError" => {
ActivatePipelineError::InternalServiceError(String::from(error_message))
}
"InvalidRequestException" => {
ActivatePipelineError::InvalidRequest(String::from(error_message))
}
"PipelineDeletedException" => {
ActivatePipelineError::PipelineDeleted(String::from(error_message))
}
"PipelineNotFoundException" => {
ActivatePipelineError::PipelineNotFound(String::from(error_message))
}
"ValidationException" => {
ActivatePipelineError::Validation(error_message.to_string())
}
_ => ActivatePipelineError::Unknown(String::from(body)),
}
}
Err(_) => ActivatePipelineError::Unknown(String::from(body)),
}
}
}
impl From<serde_json::error::Error> for ActivatePipelineError {
fn from(err: serde_json::error::Error) -> ActivatePipelineError {
ActivatePipelineError::Unknown(err.description().to_string())
}
}
impl From<CredentialsError> for ActivatePipelineError {
fn from(err: CredentialsError) -> ActivatePipelineError {
ActivatePipelineError::Credentials(err)
}
}
impl From<HttpDispatchError> for ActivatePipelineError {
fn from(err: HttpDispatchError) -> ActivatePipelineError {
ActivatePipelineError::HttpDispatch(err)
}
}
impl From<io::Error> for ActivatePipelineError {
fn from(err: io::Error) -> ActivatePipelineError {
ActivatePipelineError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for ActivatePipelineError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ActivatePipelineError {
fn description(&self) -> &str {
match *self {
ActivatePipelineError::InternalServiceError(ref cause) => cause,
ActivatePipelineError::InvalidRequest(ref cause) => cause,
ActivatePipelineError::PipelineDeleted(ref cause) => cause,
ActivatePipelineError::PipelineNotFound(ref cause) => cause,
ActivatePipelineError::Validation(ref cause) => cause,
ActivatePipelineError::Credentials(ref err) => err.description(),
ActivatePipelineError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
ActivatePipelineError::Unknown(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AddTagsError {
InternalServiceError(String),
InvalidRequest(String),
PipelineDeleted(String),
PipelineNotFound(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
Unknown(String),
}
impl AddTagsError {
pub fn from_body(body: &str) -> AddTagsError {
match from_str::<SerdeJsonValue>(body) {
Ok(json) => {
let raw_error_type = json.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or(body);
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServiceError" => {
AddTagsError::InternalServiceError(String::from(error_message))
}
"InvalidRequestException" => {
AddTagsError::InvalidRequest(String::from(error_message))
}
"PipelineDeletedException" => {
AddTagsError::PipelineDeleted(String::from(error_message))
}
"PipelineNotFoundException" => {
AddTagsError::PipelineNotFound(String::from(error_message))
}
"ValidationException" => AddTagsError::Validation(error_message.to_string()),
_ => AddTagsError::Unknown(String::from(body)),
}
}
Err(_) => AddTagsError::Unknown(String::from(body)),
}
}
}
impl From<serde_json::error::Error> for AddTagsError {
fn from(err: serde_json::error::Error) -> AddTagsError {
AddTagsError::Unknown(err.description().to_string())
}
}
impl From<CredentialsError> for AddTagsError {
fn from(err: CredentialsError) -> AddTagsError {
AddTagsError::Credentials(err)
}
}
impl From<HttpDispatchError> for AddTagsError {
fn from(err: HttpDispatchError) -> AddTagsError {
AddTagsError::HttpDispatch(err)
}
}
impl From<io::Error> for AddTagsError {
fn from(err: io::Error) -> AddTagsError {
AddTagsError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for AddTagsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AddTagsError {
fn description(&self) -> &str {
match *self {
AddTagsError::InternalServiceError(ref cause) => cause,
AddTagsError::InvalidRequest(ref cause) => cause,
AddTagsError::PipelineDeleted(ref cause) => cause,
AddTagsError::PipelineNotFound(ref cause) => cause,
AddTagsError::Validation(ref cause) => cause,
AddTagsError::Credentials(ref err) => err.description(),
AddTagsError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
AddTagsError::Unknown(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreatePipelineError {
InternalServiceError(String),
InvalidRequest(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
Unknown(String),
}
impl CreatePipelineError {
pub fn from_body(body: &str) -> CreatePipelineError {
match from_str::<SerdeJsonValue>(body) {
Ok(json) => {
let raw_error_type = json.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or(body);
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServiceError" => {
CreatePipelineError::InternalServiceError(String::from(error_message))
}
"InvalidRequestException" => {
CreatePipelineError::InvalidRequest(String::from(error_message))
}
"ValidationException" => {
CreatePipelineError::Validation(error_message.to_string())
}
_ => CreatePipelineError::Unknown(String::from(body)),
}
}
Err(_) => CreatePipelineError::Unknown(String::from(body)),
}
}
}
impl From<serde_json::error::Error> for CreatePipelineError {
fn from(err: serde_json::error::Error) -> CreatePipelineError {
CreatePipelineError::Unknown(err.description().to_string())
}
}
impl From<CredentialsError> for CreatePipelineError {
fn from(err: CredentialsError) -> CreatePipelineError {
CreatePipelineError::Credentials(err)
}
}
impl From<HttpDispatchError> for CreatePipelineError {
fn from(err: HttpDispatchError) -> CreatePipelineError {
CreatePipelineError::HttpDispatch(err)
}
}
impl From<io::Error> for CreatePipelineError {
fn from(err: io::Error) -> CreatePipelineError {
CreatePipelineError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for CreatePipelineError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreatePipelineError {
fn description(&self) -> &str {
match *self {
CreatePipelineError::InternalServiceError(ref cause) => cause,
CreatePipelineError::InvalidRequest(ref cause) => cause,
CreatePipelineError::Validation(ref cause) => cause,
CreatePipelineError::Credentials(ref err) => err.description(),
CreatePipelineError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
CreatePipelineError::Unknown(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeactivatePipelineError {
InternalServiceError(String),
InvalidRequest(String),
PipelineDeleted(String),
PipelineNotFound(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
Unknown(String),
}
impl DeactivatePipelineError {
pub fn from_body(body: &str) -> DeactivatePipelineError {
match from_str::<SerdeJsonValue>(body) {
Ok(json) => {
let raw_error_type = json.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or(body);
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServiceError" => {
DeactivatePipelineError::InternalServiceError(String::from(error_message))
}
"InvalidRequestException" => {
DeactivatePipelineError::InvalidRequest(String::from(error_message))
}
"PipelineDeletedException" => {
DeactivatePipelineError::PipelineDeleted(String::from(error_message))
}
"PipelineNotFoundException" => {
DeactivatePipelineError::PipelineNotFound(String::from(error_message))
}
"ValidationException" => {
DeactivatePipelineError::Validation(error_message.to_string())
}
_ => DeactivatePipelineError::Unknown(String::from(body)),
}
}
Err(_) => DeactivatePipelineError::Unknown(String::from(body)),
}
}
}
impl From<serde_json::error::Error> for DeactivatePipelineError {
fn from(err: serde_json::error::Error) -> DeactivatePipelineError {
DeactivatePipelineError::Unknown(err.description().to_string())
}
}
impl From<CredentialsError> for DeactivatePipelineError {
fn from(err: CredentialsError) -> DeactivatePipelineError {
DeactivatePipelineError::Credentials(err)
}
}
impl From<HttpDispatchError> for DeactivatePipelineError {
fn from(err: HttpDispatchError) -> DeactivatePipelineError {
DeactivatePipelineError::HttpDispatch(err)
}
}
impl From<io::Error> for DeactivatePipelineError {
fn from(err: io::Error) -> DeactivatePipelineError {
DeactivatePipelineError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DeactivatePipelineError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeactivatePipelineError {
fn description(&self) -> &str {
match *self {
DeactivatePipelineError::InternalServiceError(ref cause) => cause,
DeactivatePipelineError::InvalidRequest(ref cause) => cause,
DeactivatePipelineError::PipelineDeleted(ref cause) => cause,
DeactivatePipelineError::PipelineNotFound(ref cause) => cause,
DeactivatePipelineError::Validation(ref cause) => cause,
DeactivatePipelineError::Credentials(ref err) => err.description(),
DeactivatePipelineError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
DeactivatePipelineError::Unknown(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeletePipelineError {
InternalServiceError(String),
InvalidRequest(String),
PipelineNotFound(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
Unknown(String),
}
impl DeletePipelineError {
pub fn from_body(body: &str) -> DeletePipelineError {
match from_str::<SerdeJsonValue>(body) {
Ok(json) => {
let raw_error_type = json.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or(body);
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServiceError" => {
DeletePipelineError::InternalServiceError(String::from(error_message))
}
"InvalidRequestException" => {
DeletePipelineError::InvalidRequest(String::from(error_message))
}
"PipelineNotFoundException" => {
DeletePipelineError::PipelineNotFound(String::from(error_message))
}
"ValidationException" => {
DeletePipelineError::Validation(error_message.to_string())
}
_ => DeletePipelineError::Unknown(String::from(body)),
}
}
Err(_) => DeletePipelineError::Unknown(String::from(body)),
}
}
}
impl From<serde_json::error::Error> for DeletePipelineError {
fn from(err: serde_json::error::Error) -> DeletePipelineError {
DeletePipelineError::Unknown(err.description().to_string())
}
}
impl From<CredentialsError> for DeletePipelineError {
fn from(err: CredentialsError) -> DeletePipelineError {
DeletePipelineError::Credentials(err)
}
}
impl From<HttpDispatchError> for DeletePipelineError {
fn from(err: HttpDispatchError) -> DeletePipelineError {
DeletePipelineError::HttpDispatch(err)
}
}
impl From<io::Error> for DeletePipelineError {
fn from(err: io::Error) -> DeletePipelineError {
DeletePipelineError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DeletePipelineError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeletePipelineError {
fn description(&self) -> &str {
match *self {
DeletePipelineError::InternalServiceError(ref cause) => cause,
DeletePipelineError::InvalidRequest(ref cause) => cause,
DeletePipelineError::PipelineNotFound(ref cause) => cause,
DeletePipelineError::Validation(ref cause) => cause,
DeletePipelineError::Credentials(ref err) => err.description(),
DeletePipelineError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
DeletePipelineError::Unknown(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeObjectsError {
InternalServiceError(String),
InvalidRequest(String),
PipelineDeleted(String),
PipelineNotFound(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
Unknown(String),
}
impl DescribeObjectsError {
pub fn from_body(body: &str) -> DescribeObjectsError {
match from_str::<SerdeJsonValue>(body) {
Ok(json) => {
let raw_error_type = json.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or(body);
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServiceError" => {
DescribeObjectsError::InternalServiceError(String::from(error_message))
}
"InvalidRequestException" => {
DescribeObjectsError::InvalidRequest(String::from(error_message))
}
"PipelineDeletedException" => {
DescribeObjectsError::PipelineDeleted(String::from(error_message))
}
"PipelineNotFoundException" => {
DescribeObjectsError::PipelineNotFound(String::from(error_message))
}
"ValidationException" => {
DescribeObjectsError::Validation(error_message.to_string())
}
_ => DescribeObjectsError::Unknown(String::from(body)),
}
}
Err(_) => DescribeObjectsError::Unknown(String::from(body)),
}
}
}
impl From<serde_json::error::Error> for DescribeObjectsError {
fn from(err: serde_json::error::Error) -> DescribeObjectsError {
DescribeObjectsError::Unknown(err.description().to_string())
}
}
impl From<CredentialsError> for DescribeObjectsError {
fn from(err: CredentialsError) -> DescribeObjectsError {
DescribeObjectsError::Credentials(err)
}
}
impl From<HttpDispatchError> for DescribeObjectsError {
fn from(err: HttpDispatchError) -> DescribeObjectsError {
DescribeObjectsError::HttpDispatch(err)
}
}
impl From<io::Error> for DescribeObjectsError {
fn from(err: io::Error) -> DescribeObjectsError {
DescribeObjectsError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DescribeObjectsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeObjectsError {
fn description(&self) -> &str {
match *self {
DescribeObjectsError::InternalServiceError(ref cause) => cause,
DescribeObjectsError::InvalidRequest(ref cause) => cause,
DescribeObjectsError::PipelineDeleted(ref cause) => cause,
DescribeObjectsError::PipelineNotFound(ref cause) => cause,
DescribeObjectsError::Validation(ref cause) => cause,
DescribeObjectsError::Credentials(ref err) => err.description(),
DescribeObjectsError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
DescribeObjectsError::Unknown(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribePipelinesError {
InternalServiceError(String),
InvalidRequest(String),
PipelineDeleted(String),
PipelineNotFound(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
Unknown(String),
}
impl DescribePipelinesError {
pub fn from_body(body: &str) -> DescribePipelinesError {
match from_str::<SerdeJsonValue>(body) {
Ok(json) => {
let raw_error_type = json.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or(body);
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServiceError" => {
DescribePipelinesError::InternalServiceError(String::from(error_message))
}
"InvalidRequestException" => {
DescribePipelinesError::InvalidRequest(String::from(error_message))
}
"PipelineDeletedException" => {
DescribePipelinesError::PipelineDeleted(String::from(error_message))
}
"PipelineNotFoundException" => {
DescribePipelinesError::PipelineNotFound(String::from(error_message))
}
"ValidationException" => {
DescribePipelinesError::Validation(error_message.to_string())
}
_ => DescribePipelinesError::Unknown(String::from(body)),
}
}
Err(_) => DescribePipelinesError::Unknown(String::from(body)),
}
}
}
impl From<serde_json::error::Error> for DescribePipelinesError {
fn from(err: serde_json::error::Error) -> DescribePipelinesError {
DescribePipelinesError::Unknown(err.description().to_string())
}
}
impl From<CredentialsError> for DescribePipelinesError {
fn from(err: CredentialsError) -> DescribePipelinesError {
DescribePipelinesError::Credentials(err)
}
}
impl From<HttpDispatchError> for DescribePipelinesError {
fn from(err: HttpDispatchError) -> DescribePipelinesError {
DescribePipelinesError::HttpDispatch(err)
}
}
impl From<io::Error> for DescribePipelinesError {
fn from(err: io::Error) -> DescribePipelinesError {
DescribePipelinesError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DescribePipelinesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribePipelinesError {
fn description(&self) -> &str {
match *self {
DescribePipelinesError::InternalServiceError(ref cause) => cause,
DescribePipelinesError::InvalidRequest(ref cause) => cause,
DescribePipelinesError::PipelineDeleted(ref cause) => cause,
DescribePipelinesError::PipelineNotFound(ref cause) => cause,
DescribePipelinesError::Validation(ref cause) => cause,
DescribePipelinesError::Credentials(ref err) => err.description(),
DescribePipelinesError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
DescribePipelinesError::Unknown(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum EvaluateExpressionError {
InternalServiceError(String),
InvalidRequest(String),
PipelineDeleted(String),
PipelineNotFound(String),
TaskNotFound(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
Unknown(String),
}
impl EvaluateExpressionError {
pub fn from_body(body: &str) -> EvaluateExpressionError {
match from_str::<SerdeJsonValue>(body) {
Ok(json) => {
let raw_error_type = json.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or(body);
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServiceError" => {
EvaluateExpressionError::InternalServiceError(String::from(error_message))
}
"InvalidRequestException" => {
EvaluateExpressionError::InvalidRequest(String::from(error_message))
}
"PipelineDeletedException" => {
EvaluateExpressionError::PipelineDeleted(String::from(error_message))
}
"PipelineNotFoundException" => {
EvaluateExpressionError::PipelineNotFound(String::from(error_message))
}
"TaskNotFoundException" => {
EvaluateExpressionError::TaskNotFound(String::from(error_message))
}
"ValidationException" => {
EvaluateExpressionError::Validation(error_message.to_string())
}
_ => EvaluateExpressionError::Unknown(String::from(body)),
}
}
Err(_) => EvaluateExpressionError::Unknown(String::from(body)),
}
}
}
impl From<serde_json::error::Error> for EvaluateExpressionError {
fn from(err: serde_json::error::Error) -> EvaluateExpressionError {
EvaluateExpressionError::Unknown(err.description().to_string())
}
}
impl From<CredentialsError> for EvaluateExpressionError {
fn from(err: CredentialsError) -> EvaluateExpressionError {
EvaluateExpressionError::Credentials(err)
}
}
impl From<HttpDispatchError> for EvaluateExpressionError {
fn from(err: HttpDispatchError) -> EvaluateExpressionError {
EvaluateExpressionError::HttpDispatch(err)
}
}
impl From<io::Error> for EvaluateExpressionError {
fn from(err: io::Error) -> EvaluateExpressionError {
EvaluateExpressionError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for EvaluateExpressionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for EvaluateExpressionError {
fn description(&self) -> &str {
match *self {
EvaluateExpressionError::InternalServiceError(ref cause) => cause,
EvaluateExpressionError::InvalidRequest(ref cause) => cause,
EvaluateExpressionError::PipelineDeleted(ref cause) => cause,
EvaluateExpressionError::PipelineNotFound(ref cause) => cause,
EvaluateExpressionError::TaskNotFound(ref cause) => cause,
EvaluateExpressionError::Validation(ref cause) => cause,
EvaluateExpressionError::Credentials(ref err) => err.description(),
EvaluateExpressionError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
EvaluateExpressionError::Unknown(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetPipelineDefinitionError {
InternalServiceError(String),
InvalidRequest(String),
PipelineDeleted(String),
PipelineNotFound(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
Unknown(String),
}
impl GetPipelineDefinitionError {
pub fn from_body(body: &str) -> GetPipelineDefinitionError {
match from_str::<SerdeJsonValue>(body) {
Ok(json) => {
let raw_error_type = json.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or(body);
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServiceError" => GetPipelineDefinitionError::InternalServiceError(String::from(error_message)),
"InvalidRequestException" => {
GetPipelineDefinitionError::InvalidRequest(String::from(error_message))
}
"PipelineDeletedException" => {
GetPipelineDefinitionError::PipelineDeleted(String::from(error_message))
}
"PipelineNotFoundException" => {
GetPipelineDefinitionError::PipelineNotFound(String::from(error_message))
}
"ValidationException" => {
GetPipelineDefinitionError::Validation(error_message.to_string())
}
_ => GetPipelineDefinitionError::Unknown(String::from(body)),
}
}
Err(_) => GetPipelineDefinitionError::Unknown(String::from(body)),
}
}
}
impl From<serde_json::error::Error> for GetPipelineDefinitionError {
fn from(err: serde_json::error::Error) -> GetPipelineDefinitionError {
GetPipelineDefinitionError::Unknown(err.description().to_string())
}
}
impl From<CredentialsError> for GetPipelineDefinitionError {
fn from(err: CredentialsError) -> GetPipelineDefinitionError {
GetPipelineDefinitionError::Credentials(err)
}
}
impl From<HttpDispatchError> for GetPipelineDefinitionError {
fn from(err: HttpDispatchError) -> GetPipelineDefinitionError {
GetPipelineDefinitionError::HttpDispatch(err)
}
}
impl From<io::Error> for GetPipelineDefinitionError {
fn from(err: io::Error) -> GetPipelineDefinitionError {
GetPipelineDefinitionError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for GetPipelineDefinitionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetPipelineDefinitionError {
fn description(&self) -> &str {
match *self {
GetPipelineDefinitionError::InternalServiceError(ref cause) => cause,
GetPipelineDefinitionError::InvalidRequest(ref cause) => cause,
GetPipelineDefinitionError::PipelineDeleted(ref cause) => cause,
GetPipelineDefinitionError::PipelineNotFound(ref cause) => cause,
GetPipelineDefinitionError::Validation(ref cause) => cause,
GetPipelineDefinitionError::Credentials(ref err) => err.description(),
GetPipelineDefinitionError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
GetPipelineDefinitionError::Unknown(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListPipelinesError {
InternalServiceError(String),
InvalidRequest(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
Unknown(String),
}
impl ListPipelinesError {
pub fn from_body(body: &str) -> ListPipelinesError {
match from_str::<SerdeJsonValue>(body) {
Ok(json) => {
let raw_error_type = json.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or(body);
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServiceError" => {
ListPipelinesError::InternalServiceError(String::from(error_message))
}
"InvalidRequestException" => {
ListPipelinesError::InvalidRequest(String::from(error_message))
}
"ValidationException" => {
ListPipelinesError::Validation(error_message.to_string())
}
_ => ListPipelinesError::Unknown(String::from(body)),
}
}
Err(_) => ListPipelinesError::Unknown(String::from(body)),
}
}
}
impl From<serde_json::error::Error> for ListPipelinesError {
fn from(err: serde_json::error::Error) -> ListPipelinesError {
ListPipelinesError::Unknown(err.description().to_string())
}
}
impl From<CredentialsError> for ListPipelinesError {
fn from(err: CredentialsError) -> ListPipelinesError {
ListPipelinesError::Credentials(err)
}
}
impl From<HttpDispatchError> for ListPipelinesError {
fn from(err: HttpDispatchError) -> ListPipelinesError {
ListPipelinesError::HttpDispatch(err)
}
}
impl From<io::Error> for ListPipelinesError {
fn from(err: io::Error) -> ListPipelinesError {
ListPipelinesError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for ListPipelinesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListPipelinesError {
fn description(&self) -> &str {
match *self {
ListPipelinesError::InternalServiceError(ref cause) => cause,
ListPipelinesError::InvalidRequest(ref cause) => cause,
ListPipelinesError::Validation(ref cause) => cause,
ListPipelinesError::Credentials(ref err) => err.description(),
ListPipelinesError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
ListPipelinesError::Unknown(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum PollForTaskError {
InternalServiceError(String),
InvalidRequest(String),
TaskNotFound(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
Unknown(String),
}
impl PollForTaskError {
pub fn from_body(body: &str) -> PollForTaskError {
match from_str::<SerdeJsonValue>(body) {
Ok(json) => {
let raw_error_type = json.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or(body);
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServiceError" => {
PollForTaskError::InternalServiceError(String::from(error_message))
}
"InvalidRequestException" => {
PollForTaskError::InvalidRequest(String::from(error_message))
}
"TaskNotFoundException" => {
PollForTaskError::TaskNotFound(String::from(error_message))
}
"ValidationException" => {
PollForTaskError::Validation(error_message.to_string())
}
_ => PollForTaskError::Unknown(String::from(body)),
}
}
Err(_) => PollForTaskError::Unknown(String::from(body)),
}
}
}
impl From<serde_json::error::Error> for PollForTaskError {
fn from(err: serde_json::error::Error) -> PollForTaskError {
PollForTaskError::Unknown(err.description().to_string())
}
}
impl From<CredentialsError> for PollForTaskError {
fn from(err: CredentialsError) -> PollForTaskError {
PollForTaskError::Credentials(err)
}
}
impl From<HttpDispatchError> for PollForTaskError {
fn from(err: HttpDispatchError) -> PollForTaskError {
PollForTaskError::HttpDispatch(err)
}
}
impl From<io::Error> for PollForTaskError {
fn from(err: io::Error) -> PollForTaskError {
PollForTaskError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for PollForTaskError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for PollForTaskError {
fn description(&self) -> &str {
match *self {
PollForTaskError::InternalServiceError(ref cause) => cause,
PollForTaskError::InvalidRequest(ref cause) => cause,
PollForTaskError::TaskNotFound(ref cause) => cause,
PollForTaskError::Validation(ref cause) => cause,
PollForTaskError::Credentials(ref err) => err.description(),
PollForTaskError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
PollForTaskError::Unknown(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum PutPipelineDefinitionError {
InternalServiceError(String),
InvalidRequest(String),
PipelineDeleted(String),
PipelineNotFound(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
Unknown(String),
}
impl PutPipelineDefinitionError {
pub fn from_body(body: &str) -> PutPipelineDefinitionError {
match from_str::<SerdeJsonValue>(body) {
Ok(json) => {
let raw_error_type = json.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or(body);
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServiceError" => PutPipelineDefinitionError::InternalServiceError(String::from(error_message)),
"InvalidRequestException" => {
PutPipelineDefinitionError::InvalidRequest(String::from(error_message))
}
"PipelineDeletedException" => {
PutPipelineDefinitionError::PipelineDeleted(String::from(error_message))
}
"PipelineNotFoundException" => {
PutPipelineDefinitionError::PipelineNotFound(String::from(error_message))
}
"ValidationException" => {
PutPipelineDefinitionError::Validation(error_message.to_string())
}
_ => PutPipelineDefinitionError::Unknown(String::from(body)),
}
}
Err(_) => PutPipelineDefinitionError::Unknown(String::from(body)),
}
}
}
impl From<serde_json::error::Error> for PutPipelineDefinitionError {
fn from(err: serde_json::error::Error) -> PutPipelineDefinitionError {
PutPipelineDefinitionError::Unknown(err.description().to_string())
}
}
impl From<CredentialsError> for PutPipelineDefinitionError {
fn from(err: CredentialsError) -> PutPipelineDefinitionError {
PutPipelineDefinitionError::Credentials(err)
}
}
impl From<HttpDispatchError> for PutPipelineDefinitionError {
fn from(err: HttpDispatchError) -> PutPipelineDefinitionError {
PutPipelineDefinitionError::HttpDispatch(err)
}
}
impl From<io::Error> for PutPipelineDefinitionError {
fn from(err: io::Error) -> PutPipelineDefinitionError {
PutPipelineDefinitionError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for PutPipelineDefinitionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for PutPipelineDefinitionError {
fn description(&self) -> &str {
match *self {
PutPipelineDefinitionError::InternalServiceError(ref cause) => cause,
PutPipelineDefinitionError::InvalidRequest(ref cause) => cause,
PutPipelineDefinitionError::PipelineDeleted(ref cause) => cause,
PutPipelineDefinitionError::PipelineNotFound(ref cause) => cause,
PutPipelineDefinitionError::Validation(ref cause) => cause,
PutPipelineDefinitionError::Credentials(ref err) => err.description(),
PutPipelineDefinitionError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
PutPipelineDefinitionError::Unknown(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum QueryObjectsError {
InternalServiceError(String),
InvalidRequest(String),
PipelineDeleted(String),
PipelineNotFound(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
Unknown(String),
}
impl QueryObjectsError {
pub fn from_body(body: &str) -> QueryObjectsError {
match from_str::<SerdeJsonValue>(body) {
Ok(json) => {
let raw_error_type = json.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or(body);
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServiceError" => {
QueryObjectsError::InternalServiceError(String::from(error_message))
}
"InvalidRequestException" => {
QueryObjectsError::InvalidRequest(String::from(error_message))
}
"PipelineDeletedException" => {
QueryObjectsError::PipelineDeleted(String::from(error_message))
}
"PipelineNotFoundException" => {
QueryObjectsError::PipelineNotFound(String::from(error_message))
}
"ValidationException" => {
QueryObjectsError::Validation(error_message.to_string())
}
_ => QueryObjectsError::Unknown(String::from(body)),
}
}
Err(_) => QueryObjectsError::Unknown(String::from(body)),
}
}
}
impl From<serde_json::error::Error> for QueryObjectsError {
fn from(err: serde_json::error::Error) -> QueryObjectsError {
QueryObjectsError::Unknown(err.description().to_string())
}
}
impl From<CredentialsError> for QueryObjectsError {
fn from(err: CredentialsError) -> QueryObjectsError {
QueryObjectsError::Credentials(err)
}
}
impl From<HttpDispatchError> for QueryObjectsError {
fn from(err: HttpDispatchError) -> QueryObjectsError {
QueryObjectsError::HttpDispatch(err)
}
}
impl From<io::Error> for QueryObjectsError {
fn from(err: io::Error) -> QueryObjectsError {
QueryObjectsError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for QueryObjectsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for QueryObjectsError {
fn description(&self) -> &str {
match *self {
QueryObjectsError::InternalServiceError(ref cause) => cause,
QueryObjectsError::InvalidRequest(ref cause) => cause,
QueryObjectsError::PipelineDeleted(ref cause) => cause,
QueryObjectsError::PipelineNotFound(ref cause) => cause,
QueryObjectsError::Validation(ref cause) => cause,
QueryObjectsError::Credentials(ref err) => err.description(),
QueryObjectsError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
QueryObjectsError::Unknown(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RemoveTagsError {
InternalServiceError(String),
InvalidRequest(String),
PipelineDeleted(String),
PipelineNotFound(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
Unknown(String),
}
impl RemoveTagsError {
pub fn from_body(body: &str) -> RemoveTagsError {
match from_str::<SerdeJsonValue>(body) {
Ok(json) => {
let raw_error_type = json.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or(body);
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServiceError" => {
RemoveTagsError::InternalServiceError(String::from(error_message))
}
"InvalidRequestException" => {
RemoveTagsError::InvalidRequest(String::from(error_message))
}
"PipelineDeletedException" => {
RemoveTagsError::PipelineDeleted(String::from(error_message))
}
"PipelineNotFoundException" => {
RemoveTagsError::PipelineNotFound(String::from(error_message))
}
"ValidationException" => RemoveTagsError::Validation(error_message.to_string()),
_ => RemoveTagsError::Unknown(String::from(body)),
}
}
Err(_) => RemoveTagsError::Unknown(String::from(body)),
}
}
}
impl From<serde_json::error::Error> for RemoveTagsError {
fn from(err: serde_json::error::Error) -> RemoveTagsError {
RemoveTagsError::Unknown(err.description().to_string())
}
}
impl From<CredentialsError> for RemoveTagsError {
fn from(err: CredentialsError) -> RemoveTagsError {
RemoveTagsError::Credentials(err)
}
}
impl From<HttpDispatchError> for RemoveTagsError {
fn from(err: HttpDispatchError) -> RemoveTagsError {
RemoveTagsError::HttpDispatch(err)
}
}
impl From<io::Error> for RemoveTagsError {
fn from(err: io::Error) -> RemoveTagsError {
RemoveTagsError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for RemoveTagsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RemoveTagsError {
fn description(&self) -> &str {
match *self {
RemoveTagsError::InternalServiceError(ref cause) => cause,
RemoveTagsError::InvalidRequest(ref cause) => cause,
RemoveTagsError::PipelineDeleted(ref cause) => cause,
RemoveTagsError::PipelineNotFound(ref cause) => cause,
RemoveTagsError::Validation(ref cause) => cause,
RemoveTagsError::Credentials(ref err) => err.description(),
RemoveTagsError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
RemoveTagsError::Unknown(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ReportTaskProgressError {
InternalServiceError(String),
InvalidRequest(String),
PipelineDeleted(String),
PipelineNotFound(String),
TaskNotFound(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
Unknown(String),
}
impl ReportTaskProgressError {
pub fn from_body(body: &str) -> ReportTaskProgressError {
match from_str::<SerdeJsonValue>(body) {
Ok(json) => {
let raw_error_type = json.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or(body);
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServiceError" => {
ReportTaskProgressError::InternalServiceError(String::from(error_message))
}
"InvalidRequestException" => {
ReportTaskProgressError::InvalidRequest(String::from(error_message))
}
"PipelineDeletedException" => {
ReportTaskProgressError::PipelineDeleted(String::from(error_message))
}
"PipelineNotFoundException" => {
ReportTaskProgressError::PipelineNotFound(String::from(error_message))
}
"TaskNotFoundException" => {
ReportTaskProgressError::TaskNotFound(String::from(error_message))
}
"ValidationException" => {
ReportTaskProgressError::Validation(error_message.to_string())
}
_ => ReportTaskProgressError::Unknown(String::from(body)),
}
}
Err(_) => ReportTaskProgressError::Unknown(String::from(body)),
}
}
}
impl From<serde_json::error::Error> for ReportTaskProgressError {
fn from(err: serde_json::error::Error) -> ReportTaskProgressError {
ReportTaskProgressError::Unknown(err.description().to_string())
}
}
impl From<CredentialsError> for ReportTaskProgressError {
fn from(err: CredentialsError) -> ReportTaskProgressError {
ReportTaskProgressError::Credentials(err)
}
}
impl From<HttpDispatchError> for ReportTaskProgressError {
fn from(err: HttpDispatchError) -> ReportTaskProgressError {
ReportTaskProgressError::HttpDispatch(err)
}
}
impl From<io::Error> for ReportTaskProgressError {
fn from(err: io::Error) -> ReportTaskProgressError {
ReportTaskProgressError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for ReportTaskProgressError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ReportTaskProgressError {
fn description(&self) -> &str {
match *self {
ReportTaskProgressError::InternalServiceError(ref cause) => cause,
ReportTaskProgressError::InvalidRequest(ref cause) => cause,
ReportTaskProgressError::PipelineDeleted(ref cause) => cause,
ReportTaskProgressError::PipelineNotFound(ref cause) => cause,
ReportTaskProgressError::TaskNotFound(ref cause) => cause,
ReportTaskProgressError::Validation(ref cause) => cause,
ReportTaskProgressError::Credentials(ref err) => err.description(),
ReportTaskProgressError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
ReportTaskProgressError::Unknown(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ReportTaskRunnerHeartbeatError {
InternalServiceError(String),
InvalidRequest(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
Unknown(String),
}
impl ReportTaskRunnerHeartbeatError {
pub fn from_body(body: &str) -> ReportTaskRunnerHeartbeatError {
match from_str::<SerdeJsonValue>(body) {
Ok(json) => {
let raw_error_type = json.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or(body);
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServiceError" => ReportTaskRunnerHeartbeatError::InternalServiceError(String::from(error_message)),
"InvalidRequestException" => {
ReportTaskRunnerHeartbeatError::InvalidRequest(String::from(error_message))
}
"ValidationException" => {
ReportTaskRunnerHeartbeatError::Validation(error_message.to_string())
}
_ => ReportTaskRunnerHeartbeatError::Unknown(String::from(body)),
}
}
Err(_) => ReportTaskRunnerHeartbeatError::Unknown(String::from(body)),
}
}
}
impl From<serde_json::error::Error> for ReportTaskRunnerHeartbeatError {
fn from(err: serde_json::error::Error) -> ReportTaskRunnerHeartbeatError {
ReportTaskRunnerHeartbeatError::Unknown(err.description().to_string())
}
}
impl From<CredentialsError> for ReportTaskRunnerHeartbeatError {
fn from(err: CredentialsError) -> ReportTaskRunnerHeartbeatError {
ReportTaskRunnerHeartbeatError::Credentials(err)
}
}
impl From<HttpDispatchError> for ReportTaskRunnerHeartbeatError {
fn from(err: HttpDispatchError) -> ReportTaskRunnerHeartbeatError {
ReportTaskRunnerHeartbeatError::HttpDispatch(err)
}
}
impl From<io::Error> for ReportTaskRunnerHeartbeatError {
fn from(err: io::Error) -> ReportTaskRunnerHeartbeatError {
ReportTaskRunnerHeartbeatError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for ReportTaskRunnerHeartbeatError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ReportTaskRunnerHeartbeatError {
fn description(&self) -> &str {
match *self {
ReportTaskRunnerHeartbeatError::InternalServiceError(ref cause) => cause,
ReportTaskRunnerHeartbeatError::InvalidRequest(ref cause) => cause,
ReportTaskRunnerHeartbeatError::Validation(ref cause) => cause,
ReportTaskRunnerHeartbeatError::Credentials(ref err) => err.description(),
ReportTaskRunnerHeartbeatError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
ReportTaskRunnerHeartbeatError::Unknown(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum SetStatusError {
InternalServiceError(String),
InvalidRequest(String),
PipelineDeleted(String),
PipelineNotFound(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
Unknown(String),
}
impl SetStatusError {
pub fn from_body(body: &str) -> SetStatusError {
match from_str::<SerdeJsonValue>(body) {
Ok(json) => {
let raw_error_type = json.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or(body);
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServiceError" => {
SetStatusError::InternalServiceError(String::from(error_message))
}
"InvalidRequestException" => {
SetStatusError::InvalidRequest(String::from(error_message))
}
"PipelineDeletedException" => {
SetStatusError::PipelineDeleted(String::from(error_message))
}
"PipelineNotFoundException" => {
SetStatusError::PipelineNotFound(String::from(error_message))
}
"ValidationException" => SetStatusError::Validation(error_message.to_string()),
_ => SetStatusError::Unknown(String::from(body)),
}
}
Err(_) => SetStatusError::Unknown(String::from(body)),
}
}
}
impl From<serde_json::error::Error> for SetStatusError {
fn from(err: serde_json::error::Error) -> SetStatusError {
SetStatusError::Unknown(err.description().to_string())
}
}
impl From<CredentialsError> for SetStatusError {
fn from(err: CredentialsError) -> SetStatusError {
SetStatusError::Credentials(err)
}
}
impl From<HttpDispatchError> for SetStatusError {
fn from(err: HttpDispatchError) -> SetStatusError {
SetStatusError::HttpDispatch(err)
}
}
impl From<io::Error> for SetStatusError {
fn from(err: io::Error) -> SetStatusError {
SetStatusError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for SetStatusError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for SetStatusError {
fn description(&self) -> &str {
match *self {
SetStatusError::InternalServiceError(ref cause) => cause,
SetStatusError::InvalidRequest(ref cause) => cause,
SetStatusError::PipelineDeleted(ref cause) => cause,
SetStatusError::PipelineNotFound(ref cause) => cause,
SetStatusError::Validation(ref cause) => cause,
SetStatusError::Credentials(ref err) => err.description(),
SetStatusError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
SetStatusError::Unknown(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum SetTaskStatusError {
InternalServiceError(String),
InvalidRequest(String),
PipelineDeleted(String),
PipelineNotFound(String),
TaskNotFound(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
Unknown(String),
}
impl SetTaskStatusError {
pub fn from_body(body: &str) -> SetTaskStatusError {
match from_str::<SerdeJsonValue>(body) {
Ok(json) => {
let raw_error_type = json.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or(body);
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServiceError" => {
SetTaskStatusError::InternalServiceError(String::from(error_message))
}
"InvalidRequestException" => {
SetTaskStatusError::InvalidRequest(String::from(error_message))
}
"PipelineDeletedException" => {
SetTaskStatusError::PipelineDeleted(String::from(error_message))
}
"PipelineNotFoundException" => {
SetTaskStatusError::PipelineNotFound(String::from(error_message))
}
"TaskNotFoundException" => {
SetTaskStatusError::TaskNotFound(String::from(error_message))
}
"ValidationException" => {
SetTaskStatusError::Validation(error_message.to_string())
}
_ => SetTaskStatusError::Unknown(String::from(body)),
}
}
Err(_) => SetTaskStatusError::Unknown(String::from(body)),
}
}
}
impl From<serde_json::error::Error> for SetTaskStatusError {
fn from(err: serde_json::error::Error) -> SetTaskStatusError {
SetTaskStatusError::Unknown(err.description().to_string())
}
}
impl From<CredentialsError> for SetTaskStatusError {
fn from(err: CredentialsError) -> SetTaskStatusError {
SetTaskStatusError::Credentials(err)
}
}
impl From<HttpDispatchError> for SetTaskStatusError {
fn from(err: HttpDispatchError) -> SetTaskStatusError {
SetTaskStatusError::HttpDispatch(err)
}
}
impl From<io::Error> for SetTaskStatusError {
fn from(err: io::Error) -> SetTaskStatusError {
SetTaskStatusError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for SetTaskStatusError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for SetTaskStatusError {
fn description(&self) -> &str {
match *self {
SetTaskStatusError::InternalServiceError(ref cause) => cause,
SetTaskStatusError::InvalidRequest(ref cause) => cause,
SetTaskStatusError::PipelineDeleted(ref cause) => cause,
SetTaskStatusError::PipelineNotFound(ref cause) => cause,
SetTaskStatusError::TaskNotFound(ref cause) => cause,
SetTaskStatusError::Validation(ref cause) => cause,
SetTaskStatusError::Credentials(ref err) => err.description(),
SetTaskStatusError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
SetTaskStatusError::Unknown(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ValidatePipelineDefinitionError {
InternalServiceError(String),
InvalidRequest(String),
PipelineDeleted(String),
PipelineNotFound(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
Unknown(String),
}
impl ValidatePipelineDefinitionError {
pub fn from_body(body: &str) -> ValidatePipelineDefinitionError {
match from_str::<SerdeJsonValue>(body) {
Ok(json) => {
let raw_error_type = json.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or(body);
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServiceError" => ValidatePipelineDefinitionError::InternalServiceError(String::from(error_message)),
"InvalidRequestException" => {
ValidatePipelineDefinitionError::InvalidRequest(String::from(error_message))
}
"PipelineDeletedException" => ValidatePipelineDefinitionError::PipelineDeleted(String::from(error_message)),
"PipelineNotFoundException" => ValidatePipelineDefinitionError::PipelineNotFound(String::from(error_message)),
"ValidationException" => {
ValidatePipelineDefinitionError::Validation(error_message.to_string())
}
_ => ValidatePipelineDefinitionError::Unknown(String::from(body)),
}
}
Err(_) => ValidatePipelineDefinitionError::Unknown(String::from(body)),
}
}
}
impl From<serde_json::error::Error> for ValidatePipelineDefinitionError {
fn from(err: serde_json::error::Error) -> ValidatePipelineDefinitionError {
ValidatePipelineDefinitionError::Unknown(err.description().to_string())
}
}
impl From<CredentialsError> for ValidatePipelineDefinitionError {
fn from(err: CredentialsError) -> ValidatePipelineDefinitionError {
ValidatePipelineDefinitionError::Credentials(err)
}
}
impl From<HttpDispatchError> for ValidatePipelineDefinitionError {
fn from(err: HttpDispatchError) -> ValidatePipelineDefinitionError {
ValidatePipelineDefinitionError::HttpDispatch(err)
}
}
impl From<io::Error> for ValidatePipelineDefinitionError {
fn from(err: io::Error) -> ValidatePipelineDefinitionError {
ValidatePipelineDefinitionError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for ValidatePipelineDefinitionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ValidatePipelineDefinitionError {
fn description(&self) -> &str {
match *self {
ValidatePipelineDefinitionError::InternalServiceError(ref cause) => cause,
ValidatePipelineDefinitionError::InvalidRequest(ref cause) => cause,
ValidatePipelineDefinitionError::PipelineDeleted(ref cause) => cause,
ValidatePipelineDefinitionError::PipelineNotFound(ref cause) => cause,
ValidatePipelineDefinitionError::Validation(ref cause) => cause,
ValidatePipelineDefinitionError::Credentials(ref err) => err.description(),
ValidatePipelineDefinitionError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
ValidatePipelineDefinitionError::Unknown(ref cause) => cause,
}
}
}
pub trait DataPipeline {
#[doc="<p>Validates the specified pipeline and starts processing pipeline tasks. If the pipeline does not pass validation, activation fails.</p> <p>If you need to pause the pipeline to investigate an issue with a component, such as a data source or script, call <a>DeactivatePipeline</a>.</p> <p>To activate a finished pipeline, modify the end date for the pipeline and then activate it.</p>"]
fn activate_pipeline(&self,
input: &ActivatePipelineInput)
-> Result<ActivatePipelineOutput, ActivatePipelineError>;
#[doc="<p>Adds or modifies tags for the specified pipeline.</p>"]
fn add_tags(&self, input: &AddTagsInput) -> Result<AddTagsOutput, AddTagsError>;
#[doc="<p>Creates a new, empty pipeline. Use <a>PutPipelineDefinition</a> to populate the pipeline.</p>"]
fn create_pipeline(&self,
input: &CreatePipelineInput)
-> Result<CreatePipelineOutput, CreatePipelineError>;
#[doc="<p>Deactivates the specified running pipeline. The pipeline is set to the <code>DEACTIVATING</code> state until the deactivation process completes.</p> <p>To resume a deactivated pipeline, use <a>ActivatePipeline</a>. By default, the pipeline resumes from the last completed execution. Optionally, you can specify the date and time to resume the pipeline.</p>"]
fn deactivate_pipeline(&self,
input: &DeactivatePipelineInput)
-> Result<DeactivatePipelineOutput, DeactivatePipelineError>;
#[doc="<p>Deletes a pipeline, its pipeline definition, and its run history. AWS Data Pipeline attempts to cancel instances associated with the pipeline that are currently being processed by task runners.</p> <p>Deleting a pipeline cannot be undone. You cannot query or restore a deleted pipeline. To temporarily pause a pipeline instead of deleting it, call <a>SetStatus</a> with the status set to <code>PAUSE</code> on individual components. Components that are paused by <a>SetStatus</a> can be resumed.</p>"]
fn delete_pipeline(&self, input: &DeletePipelineInput) -> Result<(), DeletePipelineError>;
#[doc="<p>Gets the object definitions for a set of objects associated with the pipeline. Object definitions are composed of a set of fields that define the properties of the object.</p>"]
fn describe_objects(&self,
input: &DescribeObjectsInput)
-> Result<DescribeObjectsOutput, DescribeObjectsError>;
#[doc="<p>Retrieves metadata about one or more pipelines. The information retrieved includes the name of the pipeline, the pipeline identifier, its current state, and the user account that owns the pipeline. Using account credentials, you can retrieve metadata about pipelines that you or your IAM users have created. If you are using an IAM user account, you can retrieve metadata about only those pipelines for which you have read permissions.</p> <p>To retrieve the full pipeline definition instead of metadata about the pipeline, call <a>GetPipelineDefinition</a>.</p>"]
fn describe_pipelines(&self,
input: &DescribePipelinesInput)
-> Result<DescribePipelinesOutput, DescribePipelinesError>;
#[doc="<p>Task runners call <code>EvaluateExpression</code> to evaluate a string in the context of the specified object. For example, a task runner can evaluate SQL queries stored in Amazon S3.</p>"]
fn evaluate_expression(&self,
input: &EvaluateExpressionInput)
-> Result<EvaluateExpressionOutput, EvaluateExpressionError>;
#[doc="<p>Gets the definition of the specified pipeline. You can call <code>GetPipelineDefinition</code> to retrieve the pipeline definition that you provided using <a>PutPipelineDefinition</a>.</p>"]
fn get_pipeline_definition
(&self,
input: &GetPipelineDefinitionInput)
-> Result<GetPipelineDefinitionOutput, GetPipelineDefinitionError>;
#[doc="<p>Lists the pipeline identifiers for all active pipelines that you have permission to access.</p>"]
fn list_pipelines(&self,
input: &ListPipelinesInput)
-> Result<ListPipelinesOutput, ListPipelinesError>;
#[doc="<p>Task runners call <code>PollForTask</code> to receive a task to perform from AWS Data Pipeline. The task runner specifies which tasks it can perform by setting a value for the <code>workerGroup</code> parameter. The task returned can come from any of the pipelines that match the <code>workerGroup</code> value passed in by the task runner and that was launched using the IAM user credentials specified by the task runner.</p> <p>If tasks are ready in the work queue, <code>PollForTask</code> returns a response immediately. If no tasks are available in the queue, <code>PollForTask</code> uses long-polling and holds on to a poll connection for up to a 90 seconds, during which time the first newly scheduled task is handed to the task runner. To accomodate this, set the socket timeout in your task runner to 90 seconds. The task runner should not call <code>PollForTask</code> again on the same <code>workerGroup</code> until it receives a response, and this can take up to 90 seconds. </p>"]
fn poll_for_task(&self,
input: &PollForTaskInput)
-> Result<PollForTaskOutput, PollForTaskError>;
#[doc="<p>Adds tasks, schedules, and preconditions to the specified pipeline. You can use <code>PutPipelineDefinition</code> to populate a new pipeline.</p> <p> <code>PutPipelineDefinition</code> also validates the configuration as it adds it to the pipeline. Changes to the pipeline are saved unless one of the following three validation errors exists in the pipeline. </p> <ol> <li>An object is missing a name or identifier field.</li> <li>A string or reference field is empty.</li> <li>The number of objects in the pipeline exceeds the maximum allowed objects.</li> <li>The pipeline is in a FINISHED state.</li> </ol> <p> Pipeline object definitions are passed to the <code>PutPipelineDefinition</code> action and returned by the <a>GetPipelineDefinition</a> action. </p>"]
fn put_pipeline_definition
(&self,
input: &PutPipelineDefinitionInput)
-> Result<PutPipelineDefinitionOutput, PutPipelineDefinitionError>;
#[doc="<p>Queries the specified pipeline for the names of objects that match the specified set of conditions.</p>"]
fn query_objects(&self,
input: &QueryObjectsInput)
-> Result<QueryObjectsOutput, QueryObjectsError>;
#[doc="<p>Removes existing tags from the specified pipeline.</p>"]
fn remove_tags(&self, input: &RemoveTagsInput) -> Result<RemoveTagsOutput, RemoveTagsError>;
#[doc="<p>Task runners call <code>ReportTaskProgress</code> when assigned a task to acknowledge that it has the task. If the web service does not receive this acknowledgement within 2 minutes, it assigns the task in a subsequent <a>PollForTask</a> call. After this initial acknowledgement, the task runner only needs to report progress every 15 minutes to maintain its ownership of the task. You can change this reporting time from 15 minutes by specifying a <code>reportProgressTimeout</code> field in your pipeline.</p> <p>If a task runner does not report its status after 5 minutes, AWS Data Pipeline assumes that the task runner is unable to process the task and reassigns the task in a subsequent response to <a>PollForTask</a>. Task runners should call <code>ReportTaskProgress</code> every 60 seconds.</p>"]
fn report_task_progress(&self,
input: &ReportTaskProgressInput)
-> Result<ReportTaskProgressOutput, ReportTaskProgressError>;
#[doc="<p>Task runners call <code>ReportTaskRunnerHeartbeat</code> every 15 minutes to indicate that they are operational. If the AWS Data Pipeline Task Runner is launched on a resource managed by AWS Data Pipeline, the web service can use this call to detect when the task runner application has failed and restart a new instance.</p>"]
fn report_task_runner_heartbeat
(&self,
input: &ReportTaskRunnerHeartbeatInput)
-> Result<ReportTaskRunnerHeartbeatOutput, ReportTaskRunnerHeartbeatError>;
#[doc="<p>Requests that the status of the specified physical or logical pipeline objects be updated in the specified pipeline. This update might not occur immediately, but is eventually consistent. The status that can be set depends on the type of object (for example, DataNode or Activity). You cannot perform this operation on <code>FINISHED</code> pipelines and attempting to do so returns <code>InvalidRequestException</code>.</p>"]
fn set_status(&self, input: &SetStatusInput) -> Result<(), SetStatusError>;
#[doc="<p>Task runners call <code>SetTaskStatus</code> to notify AWS Data Pipeline that a task is completed and provide information about the final status. A task runner makes this call regardless of whether the task was sucessful. A task runner does not need to call <code>SetTaskStatus</code> for tasks that are canceled by the web service during a call to <a>ReportTaskProgress</a>.</p>"]
fn set_task_status(&self,
input: &SetTaskStatusInput)
-> Result<SetTaskStatusOutput, SetTaskStatusError>;
#[doc="<p>Validates the specified pipeline definition to ensure that it is well formed and can be run without error.</p>"]
fn validate_pipeline_definition
(&self,
input: &ValidatePipelineDefinitionInput)
-> Result<ValidatePipelineDefinitionOutput, ValidatePipelineDefinitionError>;
}
pub struct DataPipelineClient<P, D>
where P: ProvideAwsCredentials,
D: DispatchSignedRequest
{
credentials_provider: P,
region: region::Region,
dispatcher: D,
}
impl<P, D> DataPipelineClient<P, D>
where P: ProvideAwsCredentials,
D: DispatchSignedRequest
{
pub fn new(request_dispatcher: D, credentials_provider: P, region: region::Region) -> Self {
DataPipelineClient {
credentials_provider: credentials_provider,
region: region,
dispatcher: request_dispatcher,
}
}
}
impl<P, D> DataPipeline for DataPipelineClient<P, D>
where P: ProvideAwsCredentials,
D: DispatchSignedRequest
{
#[doc="<p>Validates the specified pipeline and starts processing pipeline tasks. If the pipeline does not pass validation, activation fails.</p> <p>If you need to pause the pipeline to investigate an issue with a component, such as a data source or script, call <a>DeactivatePipeline</a>.</p> <p>To activate a finished pipeline, modify the end date for the pipeline and then activate it.</p>"]
fn activate_pipeline(&self,
input: &ActivatePipelineInput)
-> Result<ActivatePipelineOutput, ActivatePipelineError> {
let mut request = SignedRequest::new("POST", "datapipeline", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "DataPipeline.ActivatePipeline");
let encoded = serde_json::to_string(input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
let mut response = try!(self.dispatcher.dispatch(&request));
match response.status {
StatusCode::Ok => {
let mut body: Vec<u8> = Vec::new();
try!(response.body.read_to_end(&mut body));
Ok(serde_json::from_str::<ActivatePipelineOutput>(String::from_utf8_lossy(&body)
.as_ref())
.unwrap())
}
_ => {
let mut body: Vec<u8> = Vec::new();
try!(response.body.read_to_end(&mut body));
Err(ActivatePipelineError::from_body(String::from_utf8_lossy(&body).as_ref()))
}
}
}
#[doc="<p>Adds or modifies tags for the specified pipeline.</p>"]
fn add_tags(&self, input: &AddTagsInput) -> Result<AddTagsOutput, AddTagsError> {
let mut request = SignedRequest::new("POST", "datapipeline", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "DataPipeline.AddTags");
let encoded = serde_json::to_string(input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
let mut response = try!(self.dispatcher.dispatch(&request));
match response.status {
StatusCode::Ok => {
let mut body: Vec<u8> = Vec::new();
try!(response.body.read_to_end(&mut body));
Ok(serde_json::from_str::<AddTagsOutput>(String::from_utf8_lossy(&body).as_ref())
.unwrap())
}
_ => {
let mut body: Vec<u8> = Vec::new();
try!(response.body.read_to_end(&mut body));
Err(AddTagsError::from_body(String::from_utf8_lossy(&body).as_ref()))
}
}
}
#[doc="<p>Creates a new, empty pipeline. Use <a>PutPipelineDefinition</a> to populate the pipeline.</p>"]
fn create_pipeline(&self,
input: &CreatePipelineInput)
-> Result<CreatePipelineOutput, CreatePipelineError> {
let mut request = SignedRequest::new("POST", "datapipeline", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "DataPipeline.CreatePipeline");
let encoded = serde_json::to_string(input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
let mut response = try!(self.dispatcher.dispatch(&request));
match response.status {
StatusCode::Ok => {
let mut body: Vec<u8> = Vec::new();
try!(response.body.read_to_end(&mut body));
Ok(serde_json::from_str::<CreatePipelineOutput>(String::from_utf8_lossy(&body)
.as_ref())
.unwrap())
}
_ => {
let mut body: Vec<u8> = Vec::new();
try!(response.body.read_to_end(&mut body));
Err(CreatePipelineError::from_body(String::from_utf8_lossy(&body).as_ref()))
}
}
}
#[doc="<p>Deactivates the specified running pipeline. The pipeline is set to the <code>DEACTIVATING</code> state until the deactivation process completes.</p> <p>To resume a deactivated pipeline, use <a>ActivatePipeline</a>. By default, the pipeline resumes from the last completed execution. Optionally, you can specify the date and time to resume the pipeline.</p>"]
fn deactivate_pipeline(&self,
input: &DeactivatePipelineInput)
-> Result<DeactivatePipelineOutput, DeactivatePipelineError> {
let mut request = SignedRequest::new("POST", "datapipeline", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "DataPipeline.DeactivatePipeline");
let encoded = serde_json::to_string(input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
let mut response = try!(self.dispatcher.dispatch(&request));
match response.status {
StatusCode::Ok => {
let mut body: Vec<u8> = Vec::new();
try!(response.body.read_to_end(&mut body));
Ok(serde_json::from_str::<DeactivatePipelineOutput>(String::from_utf8_lossy(&body)
.as_ref())
.unwrap())
}
_ => {
let mut body: Vec<u8> = Vec::new();
try!(response.body.read_to_end(&mut body));
Err(DeactivatePipelineError::from_body(String::from_utf8_lossy(&body).as_ref()))
}
}
}
#[doc="<p>Deletes a pipeline, its pipeline definition, and its run history. AWS Data Pipeline attempts to cancel instances associated with the pipeline that are currently being processed by task runners.</p> <p>Deleting a pipeline cannot be undone. You cannot query or restore a deleted pipeline. To temporarily pause a pipeline instead of deleting it, call <a>SetStatus</a> with the status set to <code>PAUSE</code> on individual components. Components that are paused by <a>SetStatus</a> can be resumed.</p>"]
fn delete_pipeline(&self, input: &DeletePipelineInput) -> Result<(), DeletePipelineError> {
let mut request = SignedRequest::new("POST", "datapipeline", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "DataPipeline.DeletePipeline");
let encoded = serde_json::to_string(input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
let mut response = try!(self.dispatcher.dispatch(&request));
match response.status {
StatusCode::Ok => Ok(()),
_ => {
let mut body: Vec<u8> = Vec::new();
try!(response.body.read_to_end(&mut body));
Err(DeletePipelineError::from_body(String::from_utf8_lossy(&body).as_ref()))
}
}
}
#[doc="<p>Gets the object definitions for a set of objects associated with the pipeline. Object definitions are composed of a set of fields that define the properties of the object.</p>"]
fn describe_objects(&self,
input: &DescribeObjectsInput)
-> Result<DescribeObjectsOutput, DescribeObjectsError> {
let mut request = SignedRequest::new("POST", "datapipeline", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "DataPipeline.DescribeObjects");
let encoded = serde_json::to_string(input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
let mut response = try!(self.dispatcher.dispatch(&request));
match response.status {
StatusCode::Ok => {
let mut body: Vec<u8> = Vec::new();
try!(response.body.read_to_end(&mut body));
Ok(serde_json::from_str::<DescribeObjectsOutput>(String::from_utf8_lossy(&body)
.as_ref())
.unwrap())
}
_ => {
let mut body: Vec<u8> = Vec::new();
try!(response.body.read_to_end(&mut body));
Err(DescribeObjectsError::from_body(String::from_utf8_lossy(&body).as_ref()))
}
}
}
#[doc="<p>Retrieves metadata about one or more pipelines. The information retrieved includes the name of the pipeline, the pipeline identifier, its current state, and the user account that owns the pipeline. Using account credentials, you can retrieve metadata about pipelines that you or your IAM users have created. If you are using an IAM user account, you can retrieve metadata about only those pipelines for which you have read permissions.</p> <p>To retrieve the full pipeline definition instead of metadata about the pipeline, call <a>GetPipelineDefinition</a>.</p>"]
fn describe_pipelines(&self,
input: &DescribePipelinesInput)
-> Result<DescribePipelinesOutput, DescribePipelinesError> {
let mut request = SignedRequest::new("POST", "datapipeline", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "DataPipeline.DescribePipelines");
let encoded = serde_json::to_string(input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
let mut response = try!(self.dispatcher.dispatch(&request));
match response.status {
StatusCode::Ok => {
let mut body: Vec<u8> = Vec::new();
try!(response.body.read_to_end(&mut body));
Ok(serde_json::from_str::<DescribePipelinesOutput>(String::from_utf8_lossy(&body)
.as_ref())
.unwrap())
}
_ => {
let mut body: Vec<u8> = Vec::new();
try!(response.body.read_to_end(&mut body));
Err(DescribePipelinesError::from_body(String::from_utf8_lossy(&body).as_ref()))
}
}
}
#[doc="<p>Task runners call <code>EvaluateExpression</code> to evaluate a string in the context of the specified object. For example, a task runner can evaluate SQL queries stored in Amazon S3.</p>"]
fn evaluate_expression(&self,
input: &EvaluateExpressionInput)
-> Result<EvaluateExpressionOutput, EvaluateExpressionError> {
let mut request = SignedRequest::new("POST", "datapipeline", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "DataPipeline.EvaluateExpression");
let encoded = serde_json::to_string(input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
let mut response = try!(self.dispatcher.dispatch(&request));
match response.status {
StatusCode::Ok => {
let mut body: Vec<u8> = Vec::new();
try!(response.body.read_to_end(&mut body));
Ok(serde_json::from_str::<EvaluateExpressionOutput>(String::from_utf8_lossy(&body)
.as_ref())
.unwrap())
}
_ => {
let mut body: Vec<u8> = Vec::new();
try!(response.body.read_to_end(&mut body));
Err(EvaluateExpressionError::from_body(String::from_utf8_lossy(&body).as_ref()))
}
}
}
#[doc="<p>Gets the definition of the specified pipeline. You can call <code>GetPipelineDefinition</code> to retrieve the pipeline definition that you provided using <a>PutPipelineDefinition</a>.</p>"]
fn get_pipeline_definition
(&self,
input: &GetPipelineDefinitionInput)
-> Result<GetPipelineDefinitionOutput, GetPipelineDefinitionError> {
let mut request = SignedRequest::new("POST", "datapipeline", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "DataPipeline.GetPipelineDefinition");
let encoded = serde_json::to_string(input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
let mut response = try!(self.dispatcher.dispatch(&request));
match response.status {
StatusCode::Ok => {
let mut body: Vec<u8> = Vec::new();
try!(response.body.read_to_end(&mut body));
Ok(serde_json::from_str::<GetPipelineDefinitionOutput>(String::from_utf8_lossy(&body).as_ref()).unwrap())
}
_ => {
let mut body: Vec<u8> = Vec::new();
try!(response.body.read_to_end(&mut body));
Err(GetPipelineDefinitionError::from_body(String::from_utf8_lossy(&body).as_ref()))
}
}
}
#[doc="<p>Lists the pipeline identifiers for all active pipelines that you have permission to access.</p>"]
fn list_pipelines(&self,
input: &ListPipelinesInput)
-> Result<ListPipelinesOutput, ListPipelinesError> {
let mut request = SignedRequest::new("POST", "datapipeline", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "DataPipeline.ListPipelines");
let encoded = serde_json::to_string(input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
let mut response = try!(self.dispatcher.dispatch(&request));
match response.status {
StatusCode::Ok => {
let mut body: Vec<u8> = Vec::new();
try!(response.body.read_to_end(&mut body));
Ok(serde_json::from_str::<ListPipelinesOutput>(String::from_utf8_lossy(&body)
.as_ref())
.unwrap())
}
_ => {
let mut body: Vec<u8> = Vec::new();
try!(response.body.read_to_end(&mut body));
Err(ListPipelinesError::from_body(String::from_utf8_lossy(&body).as_ref()))
}
}
}
#[doc="<p>Task runners call <code>PollForTask</code> to receive a task to perform from AWS Data Pipeline. The task runner specifies which tasks it can perform by setting a value for the <code>workerGroup</code> parameter. The task returned can come from any of the pipelines that match the <code>workerGroup</code> value passed in by the task runner and that was launched using the IAM user credentials specified by the task runner.</p> <p>If tasks are ready in the work queue, <code>PollForTask</code> returns a response immediately. If no tasks are available in the queue, <code>PollForTask</code> uses long-polling and holds on to a poll connection for up to a 90 seconds, during which time the first newly scheduled task is handed to the task runner. To accomodate this, set the socket timeout in your task runner to 90 seconds. The task runner should not call <code>PollForTask</code> again on the same <code>workerGroup</code> until it receives a response, and this can take up to 90 seconds. </p>"]
fn poll_for_task(&self,
input: &PollForTaskInput)
-> Result<PollForTaskOutput, PollForTaskError> {
let mut request = SignedRequest::new("POST", "datapipeline", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "DataPipeline.PollForTask");
let encoded = serde_json::to_string(input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
let mut response = try!(self.dispatcher.dispatch(&request));
match response.status {
StatusCode::Ok => {
let mut body: Vec<u8> = Vec::new();
try!(response.body.read_to_end(&mut body));
Ok(serde_json::from_str::<PollForTaskOutput>(String::from_utf8_lossy(&body)
.as_ref())
.unwrap())
}
_ => {
let mut body: Vec<u8> = Vec::new();
try!(response.body.read_to_end(&mut body));
Err(PollForTaskError::from_body(String::from_utf8_lossy(&body).as_ref()))
}
}
}
#[doc="<p>Adds tasks, schedules, and preconditions to the specified pipeline. You can use <code>PutPipelineDefinition</code> to populate a new pipeline.</p> <p> <code>PutPipelineDefinition</code> also validates the configuration as it adds it to the pipeline. Changes to the pipeline are saved unless one of the following three validation errors exists in the pipeline. </p> <ol> <li>An object is missing a name or identifier field.</li> <li>A string or reference field is empty.</li> <li>The number of objects in the pipeline exceeds the maximum allowed objects.</li> <li>The pipeline is in a FINISHED state.</li> </ol> <p> Pipeline object definitions are passed to the <code>PutPipelineDefinition</code> action and returned by the <a>GetPipelineDefinition</a> action. </p>"]
fn put_pipeline_definition
(&self,
input: &PutPipelineDefinitionInput)
-> Result<PutPipelineDefinitionOutput, PutPipelineDefinitionError> {
let mut request = SignedRequest::new("POST", "datapipeline", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "DataPipeline.PutPipelineDefinition");
let encoded = serde_json::to_string(input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
let mut response = try!(self.dispatcher.dispatch(&request));
match response.status {
StatusCode::Ok => {
let mut body: Vec<u8> = Vec::new();
try!(response.body.read_to_end(&mut body));
Ok(serde_json::from_str::<PutPipelineDefinitionOutput>(String::from_utf8_lossy(&body).as_ref()).unwrap())
}
_ => {
let mut body: Vec<u8> = Vec::new();
try!(response.body.read_to_end(&mut body));
Err(PutPipelineDefinitionError::from_body(String::from_utf8_lossy(&body).as_ref()))
}
}
}
#[doc="<p>Queries the specified pipeline for the names of objects that match the specified set of conditions.</p>"]
fn query_objects(&self,
input: &QueryObjectsInput)
-> Result<QueryObjectsOutput, QueryObjectsError> {
let mut request = SignedRequest::new("POST", "datapipeline", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "DataPipeline.QueryObjects");
let encoded = serde_json::to_string(input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
let mut response = try!(self.dispatcher.dispatch(&request));
match response.status {
StatusCode::Ok => {
let mut body: Vec<u8> = Vec::new();
try!(response.body.read_to_end(&mut body));
Ok(serde_json::from_str::<QueryObjectsOutput>(String::from_utf8_lossy(&body)
.as_ref())
.unwrap())
}
_ => {
let mut body: Vec<u8> = Vec::new();
try!(response.body.read_to_end(&mut body));
Err(QueryObjectsError::from_body(String::from_utf8_lossy(&body).as_ref()))
}
}
}
#[doc="<p>Removes existing tags from the specified pipeline.</p>"]
fn remove_tags(&self, input: &RemoveTagsInput) -> Result<RemoveTagsOutput, RemoveTagsError> {
let mut request = SignedRequest::new("POST", "datapipeline", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "DataPipeline.RemoveTags");
let encoded = serde_json::to_string(input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
let mut response = try!(self.dispatcher.dispatch(&request));
match response.status {
StatusCode::Ok => {
let mut body: Vec<u8> = Vec::new();
try!(response.body.read_to_end(&mut body));
Ok(serde_json::from_str::<RemoveTagsOutput>(String::from_utf8_lossy(&body)
.as_ref())
.unwrap())
}
_ => {
let mut body: Vec<u8> = Vec::new();
try!(response.body.read_to_end(&mut body));
Err(RemoveTagsError::from_body(String::from_utf8_lossy(&body).as_ref()))
}
}
}
#[doc="<p>Task runners call <code>ReportTaskProgress</code> when assigned a task to acknowledge that it has the task. If the web service does not receive this acknowledgement within 2 minutes, it assigns the task in a subsequent <a>PollForTask</a> call. After this initial acknowledgement, the task runner only needs to report progress every 15 minutes to maintain its ownership of the task. You can change this reporting time from 15 minutes by specifying a <code>reportProgressTimeout</code> field in your pipeline.</p> <p>If a task runner does not report its status after 5 minutes, AWS Data Pipeline assumes that the task runner is unable to process the task and reassigns the task in a subsequent response to <a>PollForTask</a>. Task runners should call <code>ReportTaskProgress</code> every 60 seconds.</p>"]
fn report_task_progress(&self,
input: &ReportTaskProgressInput)
-> Result<ReportTaskProgressOutput, ReportTaskProgressError> {
let mut request = SignedRequest::new("POST", "datapipeline", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "DataPipeline.ReportTaskProgress");
let encoded = serde_json::to_string(input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
let mut response = try!(self.dispatcher.dispatch(&request));
match response.status {
StatusCode::Ok => {
let mut body: Vec<u8> = Vec::new();
try!(response.body.read_to_end(&mut body));
Ok(serde_json::from_str::<ReportTaskProgressOutput>(String::from_utf8_lossy(&body)
.as_ref())
.unwrap())
}
_ => {
let mut body: Vec<u8> = Vec::new();
try!(response.body.read_to_end(&mut body));
Err(ReportTaskProgressError::from_body(String::from_utf8_lossy(&body).as_ref()))
}
}
}
#[doc="<p>Task runners call <code>ReportTaskRunnerHeartbeat</code> every 15 minutes to indicate that they are operational. If the AWS Data Pipeline Task Runner is launched on a resource managed by AWS Data Pipeline, the web service can use this call to detect when the task runner application has failed and restart a new instance.</p>"]
fn report_task_runner_heartbeat
(&self,
input: &ReportTaskRunnerHeartbeatInput)
-> Result<ReportTaskRunnerHeartbeatOutput, ReportTaskRunnerHeartbeatError> {
let mut request = SignedRequest::new("POST", "datapipeline", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "DataPipeline.ReportTaskRunnerHeartbeat");
let encoded = serde_json::to_string(input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
let mut response = try!(self.dispatcher.dispatch(&request));
match response.status {
StatusCode::Ok => {
let mut body: Vec<u8> = Vec::new();
try!(response.body.read_to_end(&mut body));
Ok(serde_json::from_str::<ReportTaskRunnerHeartbeatOutput>(String::from_utf8_lossy(&body).as_ref()).unwrap())
}
_ => {
let mut body: Vec<u8> = Vec::new();
try!(response.body.read_to_end(&mut body));
Err(ReportTaskRunnerHeartbeatError::from_body(String::from_utf8_lossy(&body)
.as_ref()))
}
}
}
#[doc="<p>Requests that the status of the specified physical or logical pipeline objects be updated in the specified pipeline. This update might not occur immediately, but is eventually consistent. The status that can be set depends on the type of object (for example, DataNode or Activity). You cannot perform this operation on <code>FINISHED</code> pipelines and attempting to do so returns <code>InvalidRequestException</code>.</p>"]
fn set_status(&self, input: &SetStatusInput) -> Result<(), SetStatusError> {
let mut request = SignedRequest::new("POST", "datapipeline", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "DataPipeline.SetStatus");
let encoded = serde_json::to_string(input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
let mut response = try!(self.dispatcher.dispatch(&request));
match response.status {
StatusCode::Ok => Ok(()),
_ => {
let mut body: Vec<u8> = Vec::new();
try!(response.body.read_to_end(&mut body));
Err(SetStatusError::from_body(String::from_utf8_lossy(&body).as_ref()))
}
}
}
#[doc="<p>Task runners call <code>SetTaskStatus</code> to notify AWS Data Pipeline that a task is completed and provide information about the final status. A task runner makes this call regardless of whether the task was sucessful. A task runner does not need to call <code>SetTaskStatus</code> for tasks that are canceled by the web service during a call to <a>ReportTaskProgress</a>.</p>"]
fn set_task_status(&self,
input: &SetTaskStatusInput)
-> Result<SetTaskStatusOutput, SetTaskStatusError> {
let mut request = SignedRequest::new("POST", "datapipeline", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "DataPipeline.SetTaskStatus");
let encoded = serde_json::to_string(input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
let mut response = try!(self.dispatcher.dispatch(&request));
match response.status {
StatusCode::Ok => {
let mut body: Vec<u8> = Vec::new();
try!(response.body.read_to_end(&mut body));
Ok(serde_json::from_str::<SetTaskStatusOutput>(String::from_utf8_lossy(&body)
.as_ref())
.unwrap())
}
_ => {
let mut body: Vec<u8> = Vec::new();
try!(response.body.read_to_end(&mut body));
Err(SetTaskStatusError::from_body(String::from_utf8_lossy(&body).as_ref()))
}
}
}
#[doc="<p>Validates the specified pipeline definition to ensure that it is well formed and can be run without error.</p>"]
fn validate_pipeline_definition
(&self,
input: &ValidatePipelineDefinitionInput)
-> Result<ValidatePipelineDefinitionOutput, ValidatePipelineDefinitionError> {
let mut request = SignedRequest::new("POST", "datapipeline", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "DataPipeline.ValidatePipelineDefinition");
let encoded = serde_json::to_string(input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
let mut response = try!(self.dispatcher.dispatch(&request));
match response.status {
StatusCode::Ok => {
let mut body: Vec<u8> = Vec::new();
try!(response.body.read_to_end(&mut body));
Ok(serde_json::from_str::<ValidatePipelineDefinitionOutput>(String::from_utf8_lossy(&body).as_ref()).unwrap())
}
_ => {
let mut body: Vec<u8> = Vec::new();
try!(response.body.read_to_end(&mut body));
Err(ValidatePipelineDefinitionError::from_body(String::from_utf8_lossy(&body)
.as_ref()))
}
}
}
}
#[cfg(test)]
mod protocol_tests {}